Shopify Python API Undocumented

This was frustrating. Both pyactiveresource and Shopify Python API are undocumented, and looking at the source is frustrating as it’s all so dynamic. Had to go all the way to activeresource.
To query a record which relies on another one, pass the class constructor an argument called `prefix_options`. In it must be a dict which corresponds to arguments in the URL (look at source) denoted by source_prefix.

In my case, source_prefix contained $product_id, so my call looked like this:

image = shopify.Image(prefix_options={‘product_id’: product.id})

Leave a Comment