skip to navigation
skip to content

bottlenose 1.0.1

A Python hook into the Amazon.com Product Advertising API



Bottlenose
==========

[![Version](https://img.shields.io/pypi/v/bottlenose.svg?style=flat)](https://pypi.python.org/pypi/restmapper)
[![License](https://img.shields.io/pypi/l/bottlenose.svg?style=flat)](https://pypi.python.org/pypi/restmapper)
[![Downloads](http://img.shields.io/pypi/dm/bottlenose.svg?style=flat)](https://pypi.python.org/pypi/restmapper)

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, IN, 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:

##### Required

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

##### Search for a Specific Item

```python
response = amazon.ItemLookup(ItemId="B007OZNUCE")
```

##### Search for Items by Keywords

```python
response = amazon.ItemSearch(Keywords="Kindle 3G", SearchIndex="All")
```

##### Search for Images for an item

```python
response = amazon.ItemLookup(ItemId="1449372422", ResponseGroup="Images")
```

##### Search for Similar Items

```python
response = amazon.SimilarityLookup(ItemId="B007OZNUCE")
```

#### 2. Available Shopping Related Methods:

##### Required

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

##### Create a cart

```python
response = amazon.CartCreate(...)
```

##### Adding to a cart

```python
response = amazon.CartAdd(CartId, ...)
```

##### Get a cart by ID

```python
response = amazon.CartGet(CartId, ...)
```

##### Modifying a cart

```python
response = amazon.CartModify(ASIN, CartId,...)
```

##### Clearing a cart

```python
response = amazon.CartClear(CartId, ...)
```

#### 3. Sample Code
```python
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")
print(response)
# <itemlookupresponse xmlns="http://webservices.amazon...&lt;br&gt;```&lt;br&gt;&lt;br&gt;Here is another example.&lt;br&gt;```python&lt;br&gt; response = amazon.ItemSearch(Keywords=" kindle="" 3g",="" searchindex="All" )<br=""> #  
File Type Py Version Uploaded on Size
bottlenose-1.0.1.tar.gz (md5, pgp) Source 2016-07-30 11KB