magento2 – Unable to access magento PUT API service via Python

I'm trying to update a particular product in Magento via PUT using python. I use OAuth1Service for authentication with Magento. GET products actually gives me all Magento products where the PUT payload does not take the payload.

my charge is a json string

& # 39; & # 39; & # 39; {
"product": {
"price": 1,
"extension_attributes": {
"stock_item": {"qty": 2}
}
}
} & # 39; & # 39; & # 39;

my sales request looks like this, the headers contain the authentication token and the type of content it contains.

payload = json.loads (product)
r = session.put (
"Products / 12345",
headers = headers,
data = json.dumps (payload),
)

and instead of giving me this error

enter the description of the image here