skip to navigation
skip to content

Not Logged In

bottlenose 0.6.0

A Python hook into the Amazon.com Product Advertising API

Latest Version: 0.6.2

Bottlenose
==========

Description
-----------

Bottlenose is a thin Python wrapper over the Amazon Product Advertising API.
There is practically no overhead, and no magic (unless you add it yourself).

Before you get started, make sure you have both Amazon Product Advertising and
AWS accounts (yes, they are separate -- confusing, I know).

Features
--------

* Compatible with Python versions 2.4 and up
* Support for CA, CN, DE, ES, FR, IT, JP, UK, and US Amazon endpoints
* No requirements, except simplejson for Python pre-2.6
* Configurable query parsing
* Configurable throttling for batches of queries
* Configurable query caching
* Configurable error handling and retry

Usage
-----

#### 1. Available Search Methods:

```python
# Required
amazon = bottlenose.Amazon(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_ASSOCIATE_TAG)

# Search for a Specific Item
response = amazon.ItemLookup(ItemId="B007OZNUCE")

# Search for Items by Keywords
response = amazon.ItemSearch(Keywords="Kindle 3G", SearchIndex="All")

# Search for Images for an item
response = amazon.ItemLookup(ItemId="1449372422", ResponseGroup="Images")

# Search for Similar Items
response = amazon.SimilarityLookup(ItemId="B007OZNUCE")
```

#### 2. Available Shopping Related Methods:

```python
# Required
amazon = bottlenose.Amazon(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_ASSOCIATE_TAG)

# Create a cart
response = amazon.CartCreate(...)

# Adding to a cart
response = amazon.CartAdd(CartId, ...)

# Get a cart by ID
response = amazon.CartGet(CartId, ...)

# Modifying a cart
response = amazon.CartModify(ASIN,CartId,...)

# Clearing a cart
response = amazon.CartClear(CartId, ...)
```

#### 3. Sample Code

>>> import bottlenose
>>> amazon = bottlenose.Amazon(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_ASSOCIATE_TAG)
>>> response = amazon.ItemLookup(ItemId="0596520999", ResponseGroup="Images",
SearchIndex="Books", IdType="ISBN")
<itemlookupresponse xmlns="http://webservices.amazon...

Here's another example.

&gt;&gt;&gt; response = amazon.ItemSearch(Keywords=" kindle="" 3g",="" searchindex="All" )="" <?xml="" version="1.0" ?="">  
File Type Py Version Uploaded on Size
bottlenose-0.6.0.tar.gz (md5, pgp) Source 2014-03-23 7KB
  • Downloads (All Versions):
  • 111 downloads in the last day
  • 523 downloads in the last week
  • 2409 downloads in the last month