{
"info": {
"author": "Varghese Chacko",
"author_email": "varghese@atemon.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries :: Python Modules"
],
"description": "\nConnect to Flipkart Affiliates API with Python\n==============================================\n© 2017 ATEMON Technology Consultants LLP
\nLicense: MIT License (modified)
\nWebsite: http://www.atemon.com
\nAuthor: Varghese Chacko \n\n#### Install\n\n pip install Flipkart-AffiliatesAPI\n\n\n#### Usage\n\n from atemon.flipkart import FlipkartApi\n\n flipkart_api = API(\n fk_affiliate_id=,\n fk_affiliate_token=,\n )\n\n products = {}\n\n for category_name in flipkart_api.get_category_names():\n product_list = []\n product_list.extend(flipkart_api.get_products_from_category(category_name))\n\n while flipkart_api.has_more_products():\n product_list.extend(flipkart_api.get_next_products())\n\n products.update({category_name: product_list})\n\n### Example 1 - Get all products\n\n from atemon.flipkart import FlipkartApi\n\n flipkart_api = API(\n fk_affiliate_id=,\n fk_affiliate_token=,\n )\n products = {}\n categoty_name_list = flipkart_api.get_category_names()\n\n for category_name in categoty_name_list:\n\n product_list = []\n\n p = flipkart_api.get_products_from_category(category_name)\n product_list.extend(p)\n\n while flipkart_api.has_more_products():\n p_next = flipkart_api.get_next_products()\n product_list.extend(p_next)\n\n products.update({category_name: product_list})\n\n\n\n### Example 2 - Get Delta\n\n from atemon.flipkart import FlipkartApi\n\n flipkart_api = API(\n fk_affiliate_id=,\n fk_affiliate_token=,\n )\n products = {}\n categoty_name_list = flipkart_api.get_category_names()\n\n for category_name in categoty_name_list:\n\n product_list = []\n\n p = flipkart_api.get_products_from_category(category_name, list_type='delta')\n product_list.extend(p)\n\n while flipkart_api.has_more_products():\n p_next = flipkart_api.get_next_products() # Flipkart will take care of the delta if 'delta' is passed in get_products_from_category\n product_list.extend(p_next)\n\n products.update({category_name: product_list})\n\n\n\n#### Example 2 - Get Top\n\n from atemon.flipkart import FlipkartApi\n\n flipkart_api = API(\n fk_affiliate_id=,\n fk_affiliate_token=,\n )\n products = {}\n categoty_name_list = flipkart_api.get_category_names()\n\n for category_name in categoty_name_list:\n\n product_list = []\n\n p = flipkart_api.get_products_from_category(category_name, list_type='top')\n product_list.extend(p)\n\n while flipkart_api.has_more_products():\n p_next = flipkart_api.get_next_products() # Flipkart will take care of the top if 'top' is passed in get_products_from_category\n product_list.extend(p_next)\n\n products.update({category_name: product_list})\n\n#### Example 4- Get items in stock or get all items.\n\nBy default, the package gets only items instocks. The patameter 'in_stock' for get_products_from_category should be set to false to get all products.\n\n from atemon.flipkart import FlipkartApi\n\n flipkart_api = API(\n fk_affiliate_id=,\n fk_affiliate_token=,\n )\n products = {}\n categoty_name_list = flipkart_api.get_category_names()\n\n for category_name in categoty_name_list:\n\n product_list = []\n\n p = flipkart_api.get_products_from_category(category_name, list_type='top', in_stock=False)\n product_list.extend(p)\n\n while flipkart_api.has_more_products():\n p_next = flipkart_api.get_next_products() # Flipkart will take care of the top if 'top' is passed in get_products_from_category\n product_list.extend(p_next)\n\n products.update({category_name: product_list})\n\n\n### API Classes\n\n#### FlipkartApi\nThis class forms the core for connecting to flipkart affiliates API.\n\n from atemon.flipkart import FlipkartApi\n\n flipkart_api = FlipkartApi(\n fk_affiliate_id=,\n fk_affiliate_token=,\n in_stock=[True],\n list_type=['get']\n )\n\n\n - fk_affiliate_id - YourAffiliate ID.
\n - fk_affiliate_token - Your Affiliate Token.
\n - in_stock - True/False\n
\n - True - Show only prodcts in stock.
\n - False - Show prodcts in stock and not in stock.
\n
\n \n - list_type - Type of products listed.\n
\n - get - Get all products.
\n - delta - Get delta.
\n - top - Get top products.
\n
\n \n
\n\n#### Methods\n\n- flipkart_api.load_products_category_list() - Load list of categories from Flipkart.
\n- flipkart_api.load_products_dict() - Load list of products from Flipkart and returns the response from flipkart as a dictionary.
\n- flipkart_api.load_products_dict() - Load list of products from Flipkart and returns the response from flipkart as a dictionaey.
\n- flipkart_api.has_more_products() - Returns if there are more products. It relies purely on 'nextUrl' returned by Flipkart. In some cases, fetchicing 'nextUrl' may return no results
\n- flipkart_api.get_product_list_dict() - Returns products as a list of dict.
\n- flipkart_api.get_product_next_url() - Returns next url to load products.
\n- flipkart_api.get_products_category_dict() - Returns list of categories(dict).
\n- flipkart_api.get_category_names() - Returns category names as a list.
\n- flipkart_api.get_category_url(category_name=) - Returns url to load products from given category.
\n- flipkart_api.get_products_from_category(category_name=, list_type=['get'|'delta'|'top'], in_stock=[True|False])() - Load first set of products for given category as Product object.
\n- flipkart_api.get_next_products() - Returns next page of products list.
\n
\n\n#### Product\n from atemon.flipkart import Product\n\n data = {\n \"productShippingInfoV1\": {\n \"sellerName\": \"Suresh Kumar Singh\",\n \"sellerAverageRating\": 4.0,\n \"estimatedDeliveryTime\": \"\",\n \"shippingCharges\": {\n \"currency\": \"INR\",\n \"amount\": 0.0\n },\n \"sellerNoOfRatings\": 3524,\n \"sellerNoOfReviews\": 206\n },\n \"productBaseInfoV1\": {\n \"productDescription\": \"\",\n \"title\": \"HP 18-1310in All-in-One (AMD Zacate APU/ 2GB/ 500GB/ Win8)(Black, 379 mm x 476 mm, 6 kg, 46.99 Inch Screen)\",\n \"flipkartSellingPrice\": {\n \"currency\": \"INR\",\n \"amount\": 33400.0\n },\n \"flipkartSpecialPrice\": {\n \"currency\": \"INR\",\n \"amount\": 33400.0\n },\n \"productFamily\": [\n \"AIODX286TJZAVUZ2\"\n ],\n \"offers\": [\n \"Get Rs2500 MMT Hotel Gift Card & Flight Offer\",\n \"No Cost EMI on Bajaj Finserv with cart value > Rs. 4499\",\n \"Extra 10% off* with HDFC Bank Credit Cards\",\n \"Get 30% Cashback* on Payments via PhonePe\"\n ],\n \"productUrl\": \"http://dl.flipkart.com/dl/hp-18-1310in-all-in-one-amd-zacate-apu-2gb-500gb-win8/p/itmdx288zhxpb8ge?pid=AIODX286TJZAVUZ2&affid=joel0250g\",\n \"discountPercentage\": 9.0,\n \"productBrand\": \"HP\",\n \"inStock\": false,\n \"attributes\": {\n \"color\": \"\",\n \"sizeUnit\": \"\",\n \"storage\": \"\",\n \"displaySize\": \"\",\n \"size\": \"\"\n },\n \"maximumRetailPrice\": {\n \"currency\": \"INR\",\n \"amount\": 33400.0\n },\n \"categoryPath\": \"Computers>Desktop PCs>All In One PCs\",\n \"imageUrls\": {\n \"unknown\": \"http://img.fkcdn.com/image/allinone-desktop/u/z/2/hp-18-1310in-original-imadx2gjphmcpzgp.jpeg\",\n \"400x400\": \"http://img.fkcdn.com/image/allinone-desktop/u/z/2/hp-18-1310in-400x400-imadx2gjphmcpzgp.jpeg\",\n \"800x800\": \"http://img.fkcdn.com/image/allinone-desktop/u/z/2/hp-18-1310in-800x800-imadx2gjphmcpzgp.jpeg\",\n \"200x200\": \"http://img.fkcdn.com/image/allinone-desktop/u/z/2/hp-18-1310in-200x200-imadx2gjphmcpzgp.jpeg\"\n },\n \"codAvailable\": true,\n \"productId\": \"AIODX286TJZAVUZ2\"\n },\n \"categorySpecificInfoV1\": {\n \"specificationList\": [\n {\n \"values\": [\n {\n \"value\": [\n \"Keyboard, Mouse, Power Chord, User Manual, All In One Computer\"\n ],\n \"key\": \"In The Box\"\n }\n ],\n \"key\": \"Sales Package\"\n },\n {\n \"values\": [\n {\n \"value\": [\n \"18-1310in\"\n ],\n \"key\": \"Model Name\"\n },\n {\n \"value\": [\n \"18\"\n ],\n \"key\": \"Series\"\n },\n {\n \"value\": [\n \"E9T76AA\"\n ],\n \"key\": \"Part Number\"\n },\n {\n \"value\": [\n \"Black\"\n ],\n \"key\": \"Colour\"\n },\n {\n \"value\": [\n \"HP\"\n ],\n \"key\": \"Brand\"\n }\n ],\n \"key\": \"General\"\n },\n ],\n \"keySpecs\": [\n \"Windows 8\",\n \"AMD APU Quad Core A4\",\n \"HDD Capacity 500 GB\",\n \"RAM 2 GB DDR3\",\n \"46.99 cm Display\"\n ],\n \"lifeStyleInfo\": {\n \"idealFor\": null,\n \"neck\": null,\n \"sleeve\": null\n },\n \"detailedSpecs\": [\n \"Windows 8\",\n \"AMD APU Quad Core A4\",\n \"HDD Capacity 500 GB\",\n \"RAM 2 GB DDR3\",\n \"46.99 cm Display\"\n ],\n \"booksInfo\": {\n \"publisher\": null,\n \"language\": null,\n \"year\": 0,\n \"binding\": null,\n \"authors\": [],\n \"pages\": null\n }\n }\n }\n p = Product(data)\n## Contributors.\n\nYou are requested to report bugs and/or contribute to the package. We will try our best to keep track of any pull requests or bug reports. A mail with package name in subject line, sent to ```varghese@atemon.com```, will get quicker attention :)\n",
"description_content_type": null,
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/atemon/python-flipkart-affiliates-api",
"keywords": "flipkart",
"license": "MIT License",
"maintainer": "",
"maintainer_email": "",
"name": "Flipkart-AffiliatesAPI",
"package_url": "https://pypi.org/project/Flipkart-AffiliatesAPI/",
"platform": "",
"project_url": "https://pypi.org/project/Flipkart-AffiliatesAPI/",
"project_urls": {
"Homepage": "https://github.com/atemon/python-flipkart-affiliates-api"
},
"release_url": "https://pypi.org/project/Flipkart-AffiliatesAPI/0.0.1.2/",
"requires_dist": null,
"requires_python": "",
"summary": "",
"version": "0.0.1.2"
},
"last_serial": 3322841,
"releases": {
"0.0.1.0": [
{
"comment_text": "",
"digests": {
"md5": "e9a8b00db65de7fe6dc419889e6d740c",
"sha256": "33c84734366602abca234458e35af015f8d867293fce43c4e71620be2c2a44b8"
},
"downloads": -1,
"filename": "Flipkart-AffiliatesAPI-0.0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "e9a8b00db65de7fe6dc419889e6d740c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5663,
"upload_time": "2017-05-23T09:51:07",
"url": "https://files.pythonhosted.org/packages/5a/4d/b6fe9f500e627dc25f036a94bc9396896860008e63dec700dbbe9594d59c/Flipkart-AffiliatesAPI-0.0.1.0.tar.gz"
}
],
"0.0.1.1": [
{
"comment_text": "",
"digests": {
"md5": "a5eafb6e645aea6b0f29dcaf8a2b0935",
"sha256": "028ce83739d2a36ec65bb372097e59aa9d35a55fe0b536754d9e5c7537047af1"
},
"downloads": -1,
"filename": "Flipkart-AffiliatesAPI-0.0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "a5eafb6e645aea6b0f29dcaf8a2b0935",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8001,
"upload_time": "2017-06-04T13:52:41",
"url": "https://files.pythonhosted.org/packages/93/68/1fd67485255e3af51b386c860a9c8bee6243cf8db13513573f9753cc26e8/Flipkart-AffiliatesAPI-0.0.1.1.tar.gz"
}
],
"0.0.1.2": [
{
"comment_text": "",
"digests": {
"md5": "4ad45c463fb7485415b8c3cae84c9ede",
"sha256": "1e2b34b8a191441e8567c8145ade6be75bb984f61eaa86209c78d60ced3d49ca"
},
"downloads": -1,
"filename": "Flipkart-AffiliatesAPI-0.0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "4ad45c463fb7485415b8c3cae84c9ede",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8020,
"upload_time": "2017-11-10T17:35:23",
"url": "https://files.pythonhosted.org/packages/2f/ad/699db45df9538ac607875cac03baad200663e239b621024176c832ad211d/Flipkart-AffiliatesAPI-0.0.1.2.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "4ad45c463fb7485415b8c3cae84c9ede",
"sha256": "1e2b34b8a191441e8567c8145ade6be75bb984f61eaa86209c78d60ced3d49ca"
},
"downloads": -1,
"filename": "Flipkart-AffiliatesAPI-0.0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "4ad45c463fb7485415b8c3cae84c9ede",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8020,
"upload_time": "2017-11-10T17:35:23",
"url": "https://files.pythonhosted.org/packages/2f/ad/699db45df9538ac607875cac03baad200663e239b621024176c832ad211d/Flipkart-AffiliatesAPI-0.0.1.2.tar.gz"
}
]
}