python-amazon-product-api /

Filename Size Date modified Message
418 B
470 B
6.8 KB
153 B
5.7 KB
1.4 KB
102 B
3.1 KB
120 B
2.7 KB
377 B
Python bindings for Amazon's Product Advertising API

This module offers a light-weight access to the latest version of the Amazon
Product Advertising API without getting in your way. 

The `Amazon Product Advertising API`_ 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
Reviews, Similar Products and New and Used listings.

.. _Amazon Product Advertising API:

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 Each account
contains an *AWSAccessKeyId* and a *SecretKey*. 

Here is an example how to use the API to search for books of a certain 

    AWS_KEY = '...'
    SECRET_KEY = '...'
    api = API(AWS_KEY, SECRET_KEY, 'de')
    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::
    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, 

Please refer to the more extensive `documentation`_ for more details.

.. _lxml.objectified:
.. _documentation:


This module is still undergoing development. All operations can be used with
the API's ``call(Operation=...)`` method. Additionally, there is a number of 
convenience methods that include for instance additional error checking.
These are currently limited to:
- ``ItemLookup``
- ``ItemSearch``
- ``SimilarityLookup``
- ``BrowseNodeLookup``

More functionality is to follow as development progresses. 


In order to install python-amazon-product-api you can use::

    pip python-amazon-product-api
or download the source package from, untar it and run ::
    python install

You'll also find binaries there to make your life easier if you happen to use
a Windows system. If not, please send me an e-mail and complain loudly!


The development version is available ``_. Feel free to clone the 
repository and add your own features. ::
    hg clone
Patches are always welcome! Please make sure that your change does not break 
the tests!



This module is release under the BSD License. You can find the full text of
the license in the LICENSE file.


.. include:: CHANGES
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.