{ "info": { "author": "Fulfi.IO Inc.", "author_email": "help@fulfil.io", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4" ], "description": "======================================\nPython Flipkart Marketplace API Client\n======================================\n\n.. image:: https://img.shields.io/travis/fulfilio/python-flipkart.svg\n :target: https://travis-ci.org/fulfilio/python-flipkart\n\n.. image:: https://img.shields.io/pypi/v/python-flipkart.svg\n :target: https://pypi.python.org/pypi/python-flipkart\n\n\nPython Flipkart Marketplace API Client\n\n* Free software: BSD license\n* Documentation: https://python-flipkart.readthedocs.org.\n\nInstalling\n----------\n\nFrom PYPI:\n\n.. code-block:: shell\n\n $ pip install python-flipkart\n\nFrom source code (advanced users and for development):\n\n.. code-block:: shell\n\n $ git clone https://github.com/fulfilio/python-flipkart.git\n $ cd python-flipkart\n $ python setup.py install\n\n\nExample Usage\n-------------\n\n.. code-block:: python\n\n from flipkart import FlipkartAPI, Authentication\n\n auth = Authentication('app id', 'app secret', sandbox=True)\n token = auth.get_token_from_client_credentials()\n\n flipkart = FlipkartAPI(token['access_token'], sandbox=True, debug=True)\n orders = flipkart.search_orders()\n\n\nGet listings of a SKU\n`````````````````````\n\n.. code-block:: python\n\n sku = flipkart.sku('my-special-sku', fsn='TSHDBN3326TEZHQZ')\n for listing in sku.listings:\n print listing.attributes['mrp']\n\n\nCreate a listing\n````````````````\n\n.. code-block:: python\n\n sku = flipkart.sku('my-special-sku', fsn='TSHDBN3326TEZHQZ')\n listing = sku.create_listing(\n mrp=2400,\n selling_price=2300,\n listing_status=\"INACTIVE\",\n fulfilled_by=\"seller\",\n national_shipping_charge=20,\n zonal_shipping_charge=20,\n local_shipping_charge=20,\n procurement_sla=3,\n stock_count=23,\n )\n listing.save()\n print listing.mrp\n\nUpdate a listing\n````````````````\n\n.. code-block:: python\n\n listing = flipkart.listing('LSTTSHDBN332XDYBZ5MHX30XI')\n listing.attributes['mrp'] = 2600\n listing.save()\n\n\nSearching for orders\n````````````````````\n\n.. code-block:: python\n\n orders = flipkart.search_orders()\n\nFind only orders of selected SKUs:\n\n.. code-block:: python\n\n orders = flipkart.search_orders(\n filters={'sku': ['my-sku-1', 'my-sku-2']}\n )\n\nFilter by state:\n\n.. code-block:: python\n\n orders = flipkart.search_orders(\n filters={'states': ['Approved']}\n )\n\n.. tip::\n\n For a list of valid state see `API documentation \n `_\n\nFetching a specific order item\n``````````````````````````````\n\n.. code-block:: python\n\n order_item = flipkart.order_item('1731')\n order_item.attributes['quantity']\n\nOr to get several order items at once\n\n.. code-block:: python\n\n order_items = flipkart.order_items('1731', '1732')\n\nOnce the order is ready to pack, generate a label\n\n.. code-block:: python\n\n label_request = order_item.generate_label(\n date.today(), # Invoice date\n 'INV12345', # Invoice number\n )\n\nWhen there are items that need serial numbers\n\n.. code-block:: python\n\n label_request = order_item.generate_label(\n date.today(), # Invoice date\n 'INV12345', # Invoice number\n [['IMEI1']],\n )\n\nIf the item was dual sim\n\n.. code-block:: python\n\n label_request = order_item.generate_label(\n date.today(), # Invoice date\n 'INV12345', # Invoice number\n [['IMEI1', 'IMEI2']],\n )\n\nIf 2 units of dual sim mobiles\n\n.. code-block:: python\n\n label_request = order_item.generate_label(\n date.today(), # Invoice date\n 'INV12345', # Invoice number\n [['IMEI1', 'IMEI2'], ['IMEI3', 'IMEI4']],\n )\n\nThe response of ``generate_label`` is a Label Request. The label request\nis a lazy API. The status can be refreshed by calling\n\n.. code-block:: python\n\n label_request.refresh_status()\n\nOnce the status is cleared, the item can be shipped out. To get the label\nto ship call the ``get_label`` method to get a PDF of the label and\npossibly the invoice.\n\n.. code-block:: python\n\n pdf = order_item.get_label()\n\nOnce your shipment is ready to be picked by Flipkart logistics partner,\ncall the ready to ``dispatch`` API.\n\n\n.. code-block:: python\n\n order_item.dispatch()\n\n\nGetting shipment details\n````````````````````````\n\nThe Shipments API gives the shipping details for orderitems\n\n.. code-block:: python\n\n order_item.get_shipment_details()\n\nthe response items can be seen on `Flipkart API documentation \n`_\n\n\nGetting Access Token\n````````````````````\n\nIf you have registered an application with your seller credentials and\nwould like to access resources in your account, you could use the\napplication id and secret alone to do so. The authentication helper in the\nAPI gives you a convenient way to get tokens\n\n.. code-block:: python\n\n from auth import Authentication\n\n auth = Authentication(\n '',\n '',\n sandbox=True, # If you are using sandbox\n )\n auth.get_token_from_client_credentials()\n\nFeatures\n--------\n\n* TODO\n\n\n\n\nHistory\n-------\n\n0.2.0\n`````\n\n* Major update with complete Order Item API\n* Added examples to the README\n\n0.1.2\n`````\n\n* Make version numbers consistent.\n\n0.1.1\n`````\n\n* Renamed package to python-flipkart.", "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/fulfilio/python-flipkart", "keywords": "python flipkart", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "python-flipkart", "package_url": "https://pypi.org/project/python-flipkart/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/python-flipkart/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/fulfilio/python-flipkart" }, "release_url": "https://pypi.org/project/python-flipkart/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "Python Flipkart Marketplace API Client", "version": "0.2.0" }, "last_serial": 1677297, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "78fa7252fe815002139a8612ed5bba16", "sha256": "e48345033bb2f45a585d3ba2265881255db007f4db98a3152fd1d0e4a911a442" }, "downloads": -1, "filename": "python-flipkart-0.1.0.tar.gz", "has_sig": false, "md5_digest": "78fa7252fe815002139a8612ed5bba16", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16057, "upload_time": "2015-07-18T06:49:27", "url": "https://files.pythonhosted.org/packages/60/fb/396694117cb90d85dc0b7fd8df84302b97bff824fea4e33d1d7d547c981b/python-flipkart-0.1.0.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "3546b56fd0683bcc3803234a5d329470", "sha256": "57a83c4926b79d00eba3a51f81f91e757c91d1b0a124ec78896815d3cad1a990" }, "downloads": -1, "filename": "python-flipkart-0.1.2.tar.gz", "has_sig": false, "md5_digest": "3546b56fd0683bcc3803234a5d329470", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16062, "upload_time": "2015-07-18T06:52:13", "url": "https://files.pythonhosted.org/packages/38/e7/4cea1010ef3e638fc190a0030bb75e57f63db45573f5304e83bad98a50c9/python-flipkart-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "7fe8d476d9e727a8897497dc72e820dc", "sha256": "6f48160939fbc8345f358be4f495ca767177f59096ced8085f8b60350f32ba11" }, "downloads": -1, "filename": "python-flipkart-0.2.0.tar.gz", "has_sig": false, "md5_digest": "7fe8d476d9e727a8897497dc72e820dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19823, "upload_time": "2015-08-14T11:10:20", "url": "https://files.pythonhosted.org/packages/00/eb/1b1ab6f9c8c5f4154462a3e660db7278f022a8b8dff44cfbf1bd3c54a773/python-flipkart-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7fe8d476d9e727a8897497dc72e820dc", "sha256": "6f48160939fbc8345f358be4f495ca767177f59096ced8085f8b60350f32ba11" }, "downloads": -1, "filename": "python-flipkart-0.2.0.tar.gz", "has_sig": false, "md5_digest": "7fe8d476d9e727a8897497dc72e820dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19823, "upload_time": "2015-08-14T11:10:20", "url": "https://files.pythonhosted.org/packages/00/eb/1b1ab6f9c8c5f4154462a3e660db7278f022a8b8dff44cfbf1bd3c54a773/python-flipkart-0.2.0.tar.gz" } ] }