TAGS :Viewed: 7 - Published at: a few seconds ago

[ How can I use the Shopify python api adapter to pull assets? ]

Shopify Python API on Github

I am able to get this far and pull in a list of all of the assets, but can't figure out how to actually pull them down from here. Any ideas?

session = shopify.Session(SHOP_NAME)
session.token = API_PASSWORD

assets = shopify.Asset.find()

Answer 1

shopify.Asset.find() is using the list endpoint which doesn't include the asset value, and it sounds like that is what you are after.

If you use the receive a single Asset endpoint, then you can also get the assets value.

asset = shopify.Asset.find(assets[0].key, theme_id=assets[0].theme_id)
print asset.value