Skip to content

gbarba/magento

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magento Python
**************

Python library to connect Magento Webservices

Check documentation source code

Examples:

from magento import *

url = 'http://domain.com/'
apiuser = 'user'
apipass = 'password'

"""Product"""
with Product(url, apiuser, apipass) as product_api:
    ofilter = {'created_at':{'from':'2011-09-15 00:00:00'}}
    products = product_api.list(ofilter)

with ProductTypes(url, apiuser, apipass) as product_type_api:
    product_type = product_type_api.list()
    
with Product(url, apiuser, apipass) as product_api:
    sku = 'prod1'
    product = product_api.info(sku)

"""Websites"""
with API(url, apiuser, apipass) as magento_api:
    websites = magento_api.call('ol_websites.list', [])
    store_group = magento_api.call('ol_groups.list', [])
    store_views = magento_api.call('ol_storeviews.list', [])

"""Order"""
with Order(url, apiuser, apipass) as order_api:
    order_increment_id = '100000001 '
    status = 'canceled'
    order_api.addcomment(order_increment_id, status)

Releases

No releases published

Packages

No packages published