Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/openlabs/magento
Python API for Magento
https://github.com/openlabs/magento
Last synced: about 2 months ago
JSON representation
Python API for Magento
- Host: GitHub
- URL: https://github.com/openlabs/magento
- Owner: openlabs
- License: other
- Created: 2011-06-14T22:18:27.000Z (over 13 years ago)
- Default Branch: develop
- Last Pushed: 2017-07-24T22:30:10.000Z (about 7 years ago)
- Last Synced: 2024-06-21T17:10:11.195Z (3 months ago)
- Language: Python
- Homepage:
- Size: 335 KB
- Stars: 136
- Watchers: 32
- Forks: 82
- Open Issues: 4
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
Magento Python API
==================Python library to connect to Magento Webservices.
Check documentation source code
Usage
-----.. code-block:: python
import magento
url = 'http://domain.com/'
apiuser = 'user'
apipass = 'password'with magento.Product(url, apiuser, apipass) as product_api:
order_filter = {'created_at':{'from':'2011-09-15 00:00:00'}}
products = product_api.list(order_filter)with magento.ProductTypes(url, apiuser, apipass) as product_type_api:
product_type = product_type_api.list()
with magento.Product(url, apiuser, apipass) as product_api:
sku = 'prod1'
product = product_api.info(sku)with magento.API(url, apiuser, apipass) as magento_api:
# Calling custom APIs if you have extension modules on your
# magento installation
websites = magento_api.call('ol_websites.list', [])
store_group = magento_api.call('ol_groups.list', [])
store_views = magento_api.call('ol_storeviews.list', [])with magento.Order(url, apiuser, apipass) as order_api:
order_increment_id = '100000001 '
status = 'canceled'
order_api.addcomment(order_increment_id, status)with magento.Store(url, apiuser, apipass) as store_api:
store_id = '1'
store_view_info = store_api.info(store_id)
store_views = store_api.list()with magento.Magento(url, apiuser, apipass) as magento_api:
magento_info = magento_api.info()License
-------GNU Affero General Public License version 3
See LICENSE for more details