Coder Social home page Coder Social logo

magento's Introduction

Magento Python API

Python library to connect to Magento Webservices.

Check documentation source code

Usage

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

magento's People

Contributors

glyphobet avatar tarunbhardwaj avatar iiijjjii avatar guewen avatar prakashpp avatar raimonesteve avatar sethwoodworth avatar www-xilus-es avatar

Watchers

hadi avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.