![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
orangearrow is a Python library that simplifies usage of the Amazon Product Advertising API. It aims to be easy to use, flexible and gets out of your way when you need it to.
You will need an Amazon Associate Tag and Amazon API credentials. All of that is covered here.
To use Search or Lookup functionality, first create an instance of the AmazonProductAPI
class. You will need to pass your Amazon API credentials like so:
from orangearrow import AmazonProductAPI
amazon_api = AmazonProductAPI(
access_key='AKIAIOSFODNN7EXAMPLE',
secret_key='1234567890',
associate_tag='mytag-20'
)
To search for items, use the item_search
method with a valid Search Index and a list of keywords:
search_response = amazon_api.item_search(
'Electronics',
['Television', 'Flatscreen',]
)
You can also optionally pass a page
parameter to paginate results:
search_response = amazon_api.item_search(
'Electronics',
['Television', 'Flatscreen',],
page=2
)
As well as specifying Response Groups to filter the information that you want returned:
search_response = amazon_api.item_search(
'Electronics',
['Television', 'Flatscreen',],
page=2,
response_groups=['Variations', 'Reviews',],
)
To customize the request even further, you can add any ItemSearch parameters supported by the Amazon API into a parameters
dictionary:
search_response = amazon_api.item_search(
'Electronics',
['Television', 'Flatscreen',],
parameters={
'Brand': 'Sony',
'MaximumPrice': '50000',
}
)
The item_lookup
method can be used to look up individual items by their ASIN ID:
product_response = amazon_api.item_lookup('B07D4FQB8S')
Or by a different supported IdType and Search Index:
product_response = amazon_api.item_lookup(
'602498631416',
search_index='Music',
id_type='UPC'
)
Similar to the search
method, response_groups
and extra parameters
supported by ItemSearch may also be used:
product_response = amazon_api.item_lookup(
'602498631416',
search_index='Music',
id_type='UPC',
response_groups=['Reviews'],
parameters={'TruncateReviewsAt': 200}
)
The similarity_lookup
method can be used to find similar items for one or more ASIN values:
similarities_response = amazon_api.similarity_lookup(['B00JFC9ALE', 'B06XY1YTMJ'])
This method will also accept response_groups
and additional parameters
that are supported by Similarity Lookup:
similarities_response = amazon_api.similarity_lookup(
['B00JFC9ALE', 'B06XY1YTMJ'],
response_groups=['EditorialReview'],
parameters={'MerchantId': 'Amazon'}
)
In 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:
search_response.data
Or the raw XML can be accessed via the raw_response_content
property:
search_response.raw_response_content
If any errors occurred, the following properties will contain error information:
search_response.is_error
search_response.error_code
search_response.error_msg
The instance will also contain the response's status code and headers:
search_response.status_code
search_response.headers
FAQs
A Python Library for interacting with the Amazon Product Advertising API.
We found that orangearrow demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.