What Python libraries do folks use for querying Amazon product data? (Amazon Associates Web Service – used to be called E-Commerce API, or something along those lines).
Based on my research, PyAWS seems okay, but still pretty raw (and hasn’t been updated in a while). Wondering if there’s an obvious canonical library that I’m just missing.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
There is now another alternative: python-amazon-product-api. It supports API version 2009-11-01 2010-12-01.
Method 2
I’m using Bottlenose, Dan Loewenherz’s “super awesome Python wrapper for the Amazon Product Advertising API”. It doesn’t parse the XML, so I’m using lxml.objectify:
ACCESS_KEY_ID = "..." SECRET_KEY = "..." ASSOC_TAG = "..." import bottlenose amazon = bottlenose.Amazon(ACCESS_KEY_ID, SECRET_KEY, ASSOC_TAG) response=amazon.ItemLookup(ItemId="B0018AFK38", ResponseGroup="OfferSummary") from lxml import objectify root = objectify.fromstring(response) root.Items.Item.OfferSummary.LowestNewPrice.FormattedPrice
Method 3
If what you are looking for is a simple, object oriented access to Amazon products (lookup and search), try python-amazon-simple-product-api. Its a new project i’ve just released:
http://github.com/yoavaviram/python-amazon-simple-product-api
Its the new kid on the block!
Method 4
PyAWS is no longer hosted on SourceForge. The latest version (0.3.0) is available via the authors website.
Make sure you also grab the patch for Amazons latest API changes, mentioned in the comments.
Method 5
pyaws seems to be the best one out there. I used it here (my source code) It worked fine for me.
Method 6
How about boto? Anyone have any experience with it? I just started looking for a Python package for Amazon and boto looks up to date (v1.8c release 28-Jun-2009), active and complete (has a long list of supported interfaces).
Method 7
The only other library I’m aware of is pyAmazon, which is the predecessor of pyaws. If you’re familiar with the Amazon API (or are willing to become so), you could probably put together something yourself with ZSI.
Method 8
pyaws is the best in my opinion. The most available version is 0.2.0, but there is also a version 0.3.0 that is somewhat harder to find. The best maintained version of it that I have found though, which is based on 0.3.0, is on bitbucket.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0