lionheart/bottlenose — pull request #28 by davidmarin (2014-03-17 05:46:56+00:00)
Title: Many useful hooks

Added many useful hooks. These allow you to:

* specify a parser of your choice, so you can get something other than a raw bytestring from API calls
* specify max queries per second, so you can easily make batch queries
* specify caching behavior
* specify error handling, with the ability to retry on exceptions of your choice

As an aside, my first approach, before creating these hooks was to subclass `Amazon`, and the fact that `Amazon` and `AmazonCall` are part of the same hierarchy made this awkward. I think adding hooks is
a better approach in any case, but my inclination would be for `AmazonCall` to be a very simple class whose fields are the operation and the API instance (an `Amazon`) and which has a single method, `__call__`.