{ "info": { "author": "Joe Wilson", "author_email": "", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "## orangearrow\n\n### A Python library for interacting with the Amazon Product Advertising API.\n\n#### What is it?\n\n[orangearrow](https://github.com/wreddily/orangearrow) is a Python library that simplifies usage of the [Amazon Product Advertising API](https://docs.aws.amazon.com/AWSECommerceService/latest/GSG/Welcome.html). It aims to be easy to use, flexible and gets out of your way when you need it to.\n\n#### What do I need to get started?\n\nYou will need an Amazon Associate Tag and Amazon API credentials. All of that is covered [here](https://docs.aws.amazon.com/AWSECommerceService/latest/DG/becomingDev.html).\n\n#### How do I use it?\n\nTo use Search or Lookup functionality, first create an instance of the `AmazonProductAPI` class. You will need to pass your Amazon API credentials like so:\n\n from orangearrow import AmazonProductAPI\n\n amazon_api = AmazonProductAPI(\n access_key='AKIAIOSFODNN7EXAMPLE',\n secret_key='1234567890',\n associate_tag='mytag-20'\n )\n\n##### Search\n\nTo search for items, use the `item_search` method with a valid [Search Index](https://docs.aws.amazon.com/AWSECommerceService/latest/DG/LocaleUS.html) and a list of keywords:\n\n search_response = amazon_api.item_search(\n 'Electronics',\n ['Television', 'Flatscreen',]\n )\n\nYou can also optionally pass a `page` parameter to paginate results:\n\n search_response = amazon_api.item_search(\n 'Electronics',\n ['Television', 'Flatscreen',],\n page=2\n )\n\nAs well as specifying [Response Groups](https://docs.aws.amazon.com/AWSECommerceService/latest/DG/CHAP_ResponseGroupsList.html) to filter the information that you want returned:\n\n search_response = amazon_api.item_search(\n 'Electronics',\n ['Television', 'Flatscreen',],\n page=2,\n response_groups=['Variations', 'Reviews',],\n )\n\nTo customize the request even further, you can add any [ItemSearch parameters supported by the Amazon API](https://docs.aws.amazon.com/AWSECommerceService/latest/DG/ItemSearch.html#ItemSearch-rp) into a `parameters` dictionary:\n\n search_response = amazon_api.item_search(\n 'Electronics',\n ['Television', 'Flatscreen',],\n parameters={\n 'Brand': 'Sony',\n 'MaximumPrice': '50000',\n }\n )\n\n##### Item Lookup\n\nThe `item_lookup` method can be used to look up individual items by their ASIN ID:\n\n product_response = amazon_api.item_lookup('B07D4FQB8S')\n\nOr by a different supported [IdType](https://docs.aws.amazon.com/AWSECommerceService/latest/DG/ItemLookup.html) and [Search Index](https://docs.aws.amazon.com/AWSECommerceService/latest/DG/LocaleUS.html):\n\n product_response = amazon_api.item_lookup(\n '602498631416',\n search_index='Music',\n id_type='UPC'\n )\n\nSimilar to the `search` method, `response_groups` and extra `parameters` supported by [ItemSearch](https://docs.aws.amazon.com/AWSECommerceService/latest/DG/ItemLookup.html#ItemLookup-rp) may also be used:\n\n product_response = amazon_api.item_lookup(\n '602498631416',\n search_index='Music',\n id_type='UPC',\n response_groups=['Reviews'],\n parameters={'TruncateReviewsAt': 200}\n )\n\n##### Similarity Lookup\n\nThe `similarity_lookup` method can be used to find similar items for one or more ASIN values:\n\n similarities_response = amazon_api.similarity_lookup(['B00JFC9ALE', 'B06XY1YTMJ'])\n\nThis method will also accept `response_groups` and additional `parameters` that are supported by [Similarity Lookup](https://docs.aws.amazon.com/AWSECommerceService/latest/DG/SimilarityLookup.html#SimilarityLookup-rp):\n\n similarities_response = amazon_api.similarity_lookup(\n ['B00JFC9ALE', 'B06XY1YTMJ'],\n response_groups=['EditorialReview'],\n parameters={'MerchantId': 'Amazon'}\n )\n\n##### Responses\n\nIn the Search and Lookup examples above, an instance of `AmazonProductAPIResponse` will be returned. The returned data can be accessed in a dictionary via the `data` property of the response:\n\n search_response.data\n\nOr the raw XML can be accessed via the `raw_response_content` property:\n\n search_response.raw_response_content\n\nIf any errors occurred, the following properties will contain error information:\n\n search_response.is_error\n search_response.error_code\n search_response.error_msg\n\nThe instance will also contain the response's status code and headers:\n\n search_response.status_code\n search_response.headers\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/wreddily/orangearrow", "keywords": "", "license": "Apache2", "maintainer": "", "maintainer_email": "", "name": "orangearrow", "package_url": "https://pypi.org/project/orangearrow/", "platform": "", "project_url": "https://pypi.org/project/orangearrow/", "project_urls": { "Homepage": "https://github.com/wreddily/orangearrow" }, "release_url": "https://pypi.org/project/orangearrow/0.9.64/", "requires_dist": [ "requests (>=2.20.0)", "xmltodict (>=0.10.2)" ], "requires_python": "", "summary": "A Python Library for interacting with the Amazon Product Advertising API.", "version": "0.9.64" }, "last_serial": 4622020, "releases": { "0.9.64": [ { "comment_text": "", "digests": { "md5": "231b569f71a3576374db0222725cf45c", "sha256": "7d012dc72ff0b7182bce424122e47c83402f50bb9b0a529a2b4d5acbf428701a" }, "downloads": -1, "filename": "orangearrow-0.9.64-py3-none-any.whl", "has_sig": false, "md5_digest": "231b569f71a3576374db0222725cf45c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5934, "upload_time": "2018-12-20T19:07:05", "url": "https://files.pythonhosted.org/packages/af/c7/594dac53f0f771b0a8dfd9ac35973b6c2de7b79d6f1d11ec2a7d0fdadff9/orangearrow-0.9.64-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9cb4ea69520c510ff760dd9c95b1c524", "sha256": "181c770459a33e4475b30a3522f1ce4f4054d5b8021298c59deba909f9507b25" }, "downloads": -1, "filename": "orangearrow-0.9.64.tar.gz", "has_sig": false, "md5_digest": "9cb4ea69520c510ff760dd9c95b1c524", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4590, "upload_time": "2018-12-20T19:07:07", "url": "https://files.pythonhosted.org/packages/09/ee/274602d48b4f295fa7543343a4ea4e91fe3aa0ba53d128e56cdc4085c580/orangearrow-0.9.64.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "231b569f71a3576374db0222725cf45c", "sha256": "7d012dc72ff0b7182bce424122e47c83402f50bb9b0a529a2b4d5acbf428701a" }, "downloads": -1, "filename": "orangearrow-0.9.64-py3-none-any.whl", "has_sig": false, "md5_digest": "231b569f71a3576374db0222725cf45c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5934, "upload_time": "2018-12-20T19:07:05", "url": "https://files.pythonhosted.org/packages/af/c7/594dac53f0f771b0a8dfd9ac35973b6c2de7b79d6f1d11ec2a7d0fdadff9/orangearrow-0.9.64-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9cb4ea69520c510ff760dd9c95b1c524", "sha256": "181c770459a33e4475b30a3522f1ce4f4054d5b8021298c59deba909f9507b25" }, "downloads": -1, "filename": "orangearrow-0.9.64.tar.gz", "has_sig": false, "md5_digest": "9cb4ea69520c510ff760dd9c95b1c524", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4590, "upload_time": "2018-12-20T19:07:07", "url": "https://files.pythonhosted.org/packages/09/ee/274602d48b4f295fa7543343a4ea4e91fe3aa0ba53d128e56cdc4085c580/orangearrow-0.9.64.tar.gz" } ] }