File tree 1 file changed +38
-0
lines changed
1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ Magento Python
2
+ **************
3
+
4
+ Python library to connect Magento Webservices
5
+
6
+ Check documentation source code
7
+
8
+ Examples:
9
+
10
+ from magento import *
11
+
12
+ url = 'http://domain.com/'
13
+ apiuser = 'user'
14
+ apipass = 'password'
15
+
16
+ """Product"""
17
+ with Product(url, apiuser, apipass) as product_api:
18
+ ofilter = {'created_at':{'from':'2011-09-15 00:00:00'}}
19
+ products = product_api.list(ofilter)
20
+
21
+ with ProductTypes(url, apiuser, apipass) as product_type_api:
22
+ product_type = product_type_api.list()
23
+
24
+ with Product(url, apiuser, apipass) as product_api:
25
+ sku = 'prod1'
26
+ product = product_api.info(sku)
27
+
28
+ """Websites"""
29
+ with API(url, apiuser, apipass) as magento_api:
30
+ websites = magento_api.call('ol_websites.list', [])
31
+ store_group = magento_api.call('ol_groups.list', [])
32
+ store_views = magento_api.call('ol_storeviews.list', [])
33
+
34
+ """Order"""
35
+ with Order(url, apiuser, apipass) as order_api:
36
+ order_increment_id = '100000001 '
37
+ status = 'canceled'
38
+ order_api.addcomment(order_increment_id, status)
You can’t perform that action at this time.
0 commit comments