Skip to main content

A Python hook into the Amazon.com Product Advertising API

Project description

Description

Bottlenose takes care of everything you might want to do with the Amazon Product Advertising API. Unlike other libraries, Bottlenose doesn’t tell you what you can and can’t do. For example: let’s say Amazon adds a new possible value for their Operation parameter. No problem! Bottlenose lets you incorporate these changes into your code immediately, even without updating Bottlenose. How? Check it out below.

Usage

Creation:

>>> import bottlenose
>>> amazon = bottlenose.Amazon(access_key_id, secret_access_key, associate_tag)
>>> response = amazon.ItemLookup(ItemId = "0596520999", ResponseGroup =
    "Images", SearchIndex = "Books", IdType = "ISBN",
    Style="http://xml2json-xslt.googlecode.com/svn/trunk/xml2json.xslt")
{"ItemLookupResponse":{"OperationRequest":{"HTTPHeaders":{"Header":null},"Re...

Notice that I do not like XML. Despite this, you are free to omit the Style parameter when making your calls to Amazon. I like using an amazing XSLT stylesheet written by Doeke Zanstra that does its best to convert XML to JSON. As far as I can tell, it does a pretty amazing job with Amazon’s responses. I’ve included the stylesheet in this project if you’d like to host it yourself.

Want to grab some other data? No problem! Bottlenose to the rescue:

>>> response = amazon.Help(About = "ListSearch", HelpType = "Operation")
<?xml version="1.0" encoding="UTF-8"?><HelpResponse xmlns="http://webserv...

Any valid API call from the following is supported (in addition to any others that may be added in the future–the code is self-healing, it’s amazing!):

BrowseNodeLookup
CartAdd
CartClear
CartCreate
CartGet
CartModify
CustomerContentLookup
CustomerContentSearch
Help
ItemLookup
ItemSearch
ListLookup
ListSearch
SellerListingLookup
SellerListingSearch
SellerLookup
SimilarityLookup
TagLookup
TransactionLookup
VehiclePartLookup
VehiclePartSearch
VehicleSearch

For more information about these calls, please consult the Product Advertising API Developer Guide (http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/index.html).

License

Copyright &copy; 2010 Dan Loewenherz

See LICENSE for details.

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

bottlenose-0.1.1.tar.gz (3.5 kB view details)

Uploaded Source

File details

Details for the file bottlenose-0.1.1.tar.gz.

File metadata

  • Download URL: bottlenose-0.1.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for bottlenose-0.1.1.tar.gz
Algorithm Hash digest
SHA256 79248b516b5a99d4d9edcf8ac207a50485d7dfb14356d76474bb10bc26da8bbb
MD5 e079f6eefd1d3060eb02fe1685a370e1
BLAKE2b-256 750394817276dd49900fc397b8a858cb64e39778e673ec538c454b4f6fef1658

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page