new_product = shopify.Product()
new_product.title = "My Product"
new_product.handle = "test-product"
new_product.variants = shopify.Variant({'options': {'option1' : ['S', 'M', 'L', 'XL'], 'option2' : ['Black', 'Blue', 'Green', 'Red']}, 'product_id': '123456789'})
new_product.variants = shopify.Variant({'options': [{'option1': 'Size', 'option2': 'Colour','option3': 'Material'}]})
new_product.variants = shopify.Variant([
{'title':'v1', 'option1': 'Red', 'option2': 'M'},
{'title':'v2', 'option1' :'Blue', 'option2' :'L'}
])
new_product.save()
if new_product.errors:
print new_product.errors.full_messages()
print "Done"