Using the Python API

urip
New Member
2 0 0

I don't understand how could there be so little documentation for the Python API. How could those few lines in Github really cover it all?

For example, I want to get all variants for a specific product and go over them. Practically using this URL: /admin/products/#{id}/variants.json

I have no clue how to do this using the Python library. Am I supposed to reverse engineer it hoping to find a way?
 

0 Likes
Chris_Saunders
Shopify Staff
Shopify Staff
582 0 49

Shopify API requests include all variants for a product in the Product JSON.

Simply fetch the product you are interested in and range over your product.variants.

The API uses pythons equivalent to ActiveResource, so if you wanted you could check out the shopify_api gem and see if that helps you.

0 Likes
haroldsolorzano
New Member
1 0 0

This post and question were created in 2014... and now, in 2020, the same problem are still

 

But the solution to python is:

help(<<insert your module or object here>>)

 

0 Likes