A Python wrapper for the Amazon Product Advertising API.
Project description
This module offers a light-weight access to the latest version of the Amazon Product Advertising API without getting in your way.
The Amazon API itself provides programmatic access to Amazon’s product selection and discovery functionality. It has search and look up capabilities, provides information on products and other features such as Customer Reviews, Similar Products, Wish Lists and New and Used listings. More information about the API can be found at https://affiliate-program.amazon.com/gp/advertising/api/detail/main.html
All requests made by this module are signed as required since August 15, 2009.
Basic usage
In order to use this API you’ll obviously need an Amazon Associates Web Service account for which you must with Amazon at http://aws.amazon.com. Each account contains an AWSAccessKeyId and a SecretKey.
Here is an example how to use the API to search for books of a certain publisher:
AWS_KEY = '...' SECRET_KEY = '...' api = API(AWS_KEY, SECRET_KEY) node = api.item_search('Books', Publisher='Galileo Press')
The node object returned is a lxml.objectified element. All its attributes can be accessed the pythonic way:
# .pyval will convert the node content into int here total_results = node.Items.TotalResults.pyval total_pages = node.Items.TotalPages.pyval # get all books from result set and # print author and title for book in node.Items.Item: print '%s: "%s"' % (book.ItemAttributes.Author, book.ItemAttributes.Title)
Please refer to the lxml.objectify documentation for more details.
Status
This module is still undergoing development. The support for the Amazon Product API is currently limited to a number of operations. Supported so far are:
ItemLookup
ItemSearch
SimilarityLookup
ListLookup
ListSearch
Help
BrowseNodeLookup
More functionality is to follow as development progresses.
Installation
In order to install python-amazon-product-api you can use:
easy_install python-amazon-product-api
or download the source package from http://pypi.python.org/pypi/python-amazon-product-api, untar it and run
python setup.py install
You’ll also find binaries there to make your life easier if you happen to use a Windows system.
The development version is available bitbucket.org. Feel free to clone the repository and add your own features.
hg clone http://bitbucket.org/basti/python-amazon-product-api/
If you like what you see, drop me a line at basti at redtoad dot de.
License
This module is release under the BSD License. You can find the full text of the license in the LICENSE file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for python-amazon-product-api-0.2.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58685f0517592ec289743d3236b1db84758b6deea3c9322a8c04365b19af169a |
|
MD5 | 16d4b00604916536e0563cfbade2504f |
|
BLAKE2b-256 | c5ccd2c1a30398217ea35ea9703580131469823c3bb27191747a2510cb752d44 |
Hashes for python-amazon-product-api-0.2.3.win32-py2.5.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 952eed68a218712df2e3d691102f4161fe0183ac6a1774f873d05156f269ebaa |
|
MD5 | 16a3c443fd63cb303b1b2955547eb232 |
|
BLAKE2b-256 | 35bdf1ac69e39971bf882b6c4071b69ac3d82194b90f49a87cc0494f05f42462 |