Sebastian Rahlf avatar Sebastian Rahlf committed e409f6f

Initial wiki main page.

Comments (0)

Files changed (1)

-== Welcome ==
-
-Welcome to your wiki! This is the default page we've installed for your convenience. Go ahead and edit it.
-
-=== Wiki features ===
-
-This wiki uses the [[http://www.wikicreole.org/|Creole]] syntax, and is fully compatible with the 1.0 specification.
-
-The wiki itself is actually a hg repository, which means you can clone it, edit it locally/offline, add images or any other file type, and push it back to us. It will be live immediately.
-
-Go ahead and try:
-
-{{{
-$ hg clone http://bitbucket.org/basti/python-amazon-product-api/wiki/
-}}}
-
-Wiki pages are normal files, with the .wiki extension. You can edit them locally, as well as creating new ones.
-
-=== Syntax highlighting ===
-
-You can also highlight snippets of text, we use the excellent [[http://www.pygments.org/|Pygments]] library.
-
-Here's an example of some Python code:
-
-{{{
-#!python
-
-def wiki_rocks(text):
-	formatter = lambda t: "funky"+t
-	return formatter(text)
-}}}
-
-You can check out the source of this page to see how that's done, and make sure to bookmark [[http://pygments.org/docs/lexers/|the vast library of Pygment lexers]], we accept the 'short name' or the 'mimetype' of anything in there.
-
-Have fun!
+{{http://bitbucket.org/basti/python-amazon-product-api/raw/9326ff794b2a/docs/static/python-amazon-logo.png|logo}}
+
+= python-amazon-product-api =
+
+This is a python wrapper around the Amazon Product Advertising API. 
+Although there are a bunch of python modules around (e.g. pyaws), they are either far too complex or were not supporting the latest API (2009-07-01). Also (since August 15, 2009) all calls to the Product Advertising API must be authenticated using request signatures. I couldn't find a library that supported this.
+
+== Features ==
+
+The support for this API is currently limited to 
+ * ItemLookup 
+ * ItemSearch
+
+More functionality is to follow as development progresses.
+
+== Requirements ==
+
+The only requirement is [[http://codespeak.net/lxml/objectify.html|python-lxml]] >=2.1.5. However, there is an idea of enabling people to use their own (have a look at this code <<changeset 13038ec48586>>).
+
+== Example ==
+
+{{{
+#!python
+from amazon.product import API
+
+AWS_KEY = '...'
+SECRET_KEY = '...'
+
+api = API(AWS_KEY, SECRET_KEY)
+node = api.item_search('Books', Publisher='Galileo Press')
+
+# .pyval will convert the node content into int here
+total_results = root.Items.TotalResults.pyval
+total_pages = root.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,
+                        book.ItemAttributes.Title)
+}}}
+
+The node object returned is a lxml.objectified element. All its content can be accessed using the [[http://codespeak.net/lxml/objectify.html|lxml.objectify]] API.
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 ProjectModifiedEvent.java.
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.