{ "info": { "author": "Moltin, Inc.", "author_email": "support@moltin.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Build Tools" ], "description": "Python SDK\n==========\n\n[Website] (http://molt.in)\n\nLicense: MIT\n\nVersion: 1.0\n\nDescription\n-----------\n\nPython SDK for the Moltin eCommerce API\n\nInstallation\n------------\n\n::\n\n $ pip install moltin\n\nUsage\n-----\n\nInitialise the Moltin object with your ``client_id`` and\n``client_secret``, and optionally a specific API version (e.g. ``v1``).\n\n.. code:: python\n\n from moltin.moltin import Moltin\n \n m = Moltin(\"YOUR_CLIENT_ID\", \"YOUR_CLIENT_SECRET\"[, version=\"v1\"])\n\nAuthentication\n~~~~~~~~~~~~~~\n\nTo Authenticate, call the authenticate method.\n\n.. code:: python\n\n access_token = m.authenticate()\n # This returns an AccessToken object\n # access_token.token: the token string\n # access_token.has_expired(): has the token expired\n #\n # The access token is automatically passed to subsequent requests, \n # so you shouldn't normally need to use the returned token\n # except when persisting in a session or db\n\nAuthenticating with a username/password:\n\n.. code:: python\n\n access_token, refresh_token = m.authenticate(username=\"your_username\", password=\"your_password\")\n # refresh_token is a RefreshToken object.\n # refresh_token.token: the token string\n # Use this to re-authenticate without needing a user/pass\n\nAuthenticating with a refresh\\_token string:\n\n.. code:: python\n\n access_token = m.authenticate(refresh_token=\"refresh_token_string\")\n\nOnce authenticated, the access token is automatically passed to every\nrequest. If you need to pass in a previously stored token, use:\n\n.. code:: python\n\n m.set_access_token(\"access_token_string\")\n\nbefore making a request\n\nMaking API Calls\n~~~~~~~~~~~~~~~~\n\nThere's an easy way to interact with most endpoints:\n\n.. code:: python\n\n product = m.Product # Creates a product wrapper\n product.list() # lists all products\n product.create(params) # creates a product, params passed as a dict\n product.find(5) # finds product with id = 5\n product.find_by(params) # finds a single product by params passed as a dict,\n # e.g. {\"title\": \"Banana\"}\n product.update(5, params) # updates product with id = 5 with new params\n product.remove(5) # removes product with id = 5\n\nThe SDK also offers a way to make get, post, put and delete requests to\nAPI endpoints directly\n\nFor example:\n\n.. code:: python\n\n product = m.get('products/5') # get product with id = 5 \n new_product = m.post('products', {\n \"sku\": \"123456789\",\n \"title\": \"My first product\",\n \"slug\": \"my-first-product\",\n \"price\": 9.99,\n \"status\": 1,\n \"category\": 2,\n \"stock_level\": 15,\n \"stock_status\": 6,\n \"description\": \"This is my first product on Moltin\",\n \"requires_shipping\": 0\n }) # create a new product\n m.put('products/5', params) # update product with id = 5\n m.delete('products/5') # delete product with id = 5\n\nFor more examples, see the full API docs.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/moltin/python-sdk", "keywords": "ecommerce api sdk", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "moltin", "package_url": "https://pypi.org/project/moltin/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/moltin/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/moltin/python-sdk" }, "release_url": "https://pypi.org/project/moltin/1.0.1b1/", "requires_dist": null, "requires_python": null, "summary": "Moltin Python SDK", "version": "1.0.1b1" }, "last_serial": 1783578, "releases": { "0.9.0b1": [ { "comment_text": "", "digests": { "md5": "f1de2360de4ee87151f1bcd859620282", "sha256": "8a0f722941196a0f3287ca73277eee7ae8a7bf810ae23a7143e350d000177a2e" }, "downloads": -1, "filename": "moltin-0.9.0b1.tar.gz", "has_sig": false, "md5_digest": "f1de2360de4ee87151f1bcd859620282", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7899, "upload_time": "2015-06-06T14:26:52", "url": "https://files.pythonhosted.org/packages/6a/d3/a1317a8166db34250649e7ab2c39bc2c7161338e50b892f135846f4e9a2b/moltin-0.9.0b1.tar.gz" } ], "1.0.0b1": [ { "comment_text": "", "digests": { "md5": "7d0331ad1a2a166a9d35750cadfe1767", "sha256": "979419f1415287a940c67de43ada7a45559d85f90a594903f0bba7cccd327937" }, "downloads": -1, "filename": "moltin-1.0.0b1.tar.gz", "has_sig": false, "md5_digest": "7d0331ad1a2a166a9d35750cadfe1767", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8578, "upload_time": "2015-10-23T22:06:42", "url": "https://files.pythonhosted.org/packages/a8/be/2e7ece1b9648b6b3aa425aa9049667866ba0682313fd2b6ab9ed5a8f9fbd/moltin-1.0.0b1.tar.gz" } ], "1.0.1b1": [ { "comment_text": "", "digests": { "md5": "de58696cc6c900fc985ad379dd415f86", "sha256": "5e110996a188d3664c0d1257dad6f0091feffbc1bc997ff09e30a82cc3e451e8" }, "downloads": -1, "filename": "moltin-1.0.1b1.tar.gz", "has_sig": false, "md5_digest": "de58696cc6c900fc985ad379dd415f86", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8627, "upload_time": "2015-10-23T22:38:47", "url": "https://files.pythonhosted.org/packages/d5/47/4c6333d0438acfc89c1bc10aad7591ac5ab7e9f5baa339edae8f906ae3f8/moltin-1.0.1b1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "de58696cc6c900fc985ad379dd415f86", "sha256": "5e110996a188d3664c0d1257dad6f0091feffbc1bc997ff09e30a82cc3e451e8" }, "downloads": -1, "filename": "moltin-1.0.1b1.tar.gz", "has_sig": false, "md5_digest": "de58696cc6c900fc985ad379dd415f86", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8627, "upload_time": "2015-10-23T22:38:47", "url": "https://files.pythonhosted.org/packages/d5/47/4c6333d0438acfc89c1bc10aad7591ac5ab7e9f5baa339edae8f906ae3f8/moltin-1.0.1b1.tar.gz" } ] }