skip to Main Content

Shopify API upload a local image via python

import shopify from base64 import b64encode #omitted the shopify key shopify.ShopifyResource.set_site(shop_url) path = "product.jpg" new_product = shopify.Product() new_product.title = "title" new_product.body_html = "This is a test" image = shopify.Image() with open(path, "rb") as f: filename = path.split("/")[-1:][0] #encoded = b64encode(f.read())…

VIEW QUESTION
Back To Top
Search