Simple test :
response=requests.get('https://wordpress.site/wp-json/wc/v3/products/attributes',headers=hdr, auth=requests.auth.HTTPBasicAuth('login', 'password'))
But for any reason I received a 403 command.
Same command with curl works :
curl -vvvv -u login:password https://wordpress.site/wp-json/wc/v3/products/attributes
Simple, but don't know why.
Default user agent for Python :
Default user agent for curl
Well it works with (add a space before the /) :
User-Agent: python-requests /2.28.1
Still a mystery. Not from python side, maybe from planethoster.com side or wordpress ? One day, I will have time to go further…