Amazon Product Advertising API 5.0 wrapper for Python
Project description
Amazon Product Advertising API 5.0 wrapper for Python
A simple Python wrapper for the last version of the Amazon Product Advertising API. This module allows to get product information from Amazon using the official API in an easier way. Like Bottlenose you can use cache reader and writer to limit the number of api calls.
Features
- Object oriented interface for simple usage.
- Get multiple products at once.
- Use cache to save api calls
- Ask for new features through the issues section.
Installation
You can install or upgrade the module with:
pip install amazon-paapi5 --upgrade
Usage guide
Basic usage:
from amazon.paapi import AmazonAPI
amazon = AmazonAPI(KEY, SECRET, TAG, COUNTRY)
products = amazon.search_items('harry potter')
Get multiple product information:
products = amazon.get_items(item_ids=['B01N5IB20Q','B01F9G43WU'])
print(product[0].image_large)
print(product[1].prices.price)
Get variations
products = amazon.get_variations(asin=['B01N5IB20Q','B01F9G43WU'])
Get browse nodes
browseNodes = amazon.get_browse_nodes(browse_node_ids=['473535031'])
Use cache reader and writer
DATA = []
def custom_save_function(url, data):
DATA.append({'url':url, 'data': data})
def custom_retrieval_function(url):
for item in DATA:
if item["url"] == url:
return item['data']
return None
amazon = AmazonAPI(KEY, SECRET, TAG, COUNTRY, CacheReader=custom_retrieval_function, CacheWriter=custom_save_function)
products = amazon.search_items('harry potter')
Changelog
Version 1.0.0
- CacheReader and CacheWriter
- Enable throttling
Version 0.1.0
- First release
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
amazon-paapi5-1.0.0.tar.gz
(8.3 kB
view hashes)
Built Distribution
Close
Hashes for amazon_paapi5-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b18f66dec991dcccbf11cc86e39741bfc32267ad3b29545aeea57119bc92da2 |
|
MD5 | fd987d9d12b911e359f20167138c12be |
|
BLAKE2b-256 | 9abcf639705fd20a20f235bb5e442eb450047a69e383ea9c41cefb1f812d837f |