How to use Python Shopify library to update a product

joephi
Visitor
1 0 0

 

 

As the title says, I'd like to update a product using the shopify library in python. 

I have the following code:

 

 

 

 

session = shopify.Session(shop_url, api_version, shopify_token)
shopify.ShopifyResource.activate_session(session)

shop = shopify.Shop.current()
product = shopify.Product.find(product_id)
product.title = "New Title"
product.save()

 

 

 

 

However, .save() returns a code 301.

On another note, is there better documentation for the Shopify library? The github page is extremely scarce, it covers next to nothing of the library.

Replies 0 (0)