Package pyaws :: Module ecs
[show private | hide private]
[frames | no frames]

Module pyaws.ecs

Python wrapper for AWS E-Commerce Serive APIs.

Based upon pyamazon (http://www.josephson.org/projects/pyamazon/) with efforts to meet the latest AWS specification.

The Amazon's web APIs specication is described here: http://www.amazon.com/webservices

You need a Amazon-provided license key to use these services. Follow the link above to get one. These functions will look in several places (in this order) for the license key: License: Python Software Foundation License
Classes
Bag Wrapper class for DOM nodes
pagedIterator Return a page-based iterator
wrappedIterator Return inherited list object,

Exceptions
AWSException Base class for all AWS exceptions
BadLocale  
ExactParameterRequirement  
ExceededMaximumParameterValues  
InsufficientParameterValues  
InternalError  
InvalidEnumeratedParameter  
InvalidISO8601Time  
InvalidOperationForMarketplace  
InvalidOperationParameter  
InvalidParameterCombination  
InvalidParameterValue  
InvalidResponseGroup  
InvalidServiceParameter  
InvalidSubscriptionId  
InvalidXSLTAddress  
MaximumParameterRequirement  
MinimumParameterRequirement  
MissingOperationParameter  
MissingParameterCombination  
MissingParameters  
MissingParameterValueCombination  
MissingServiceParameter  
NoLicenseKey  
ParameterOutOfRange  
ParameterRepeatedInRequest  
RestrictedParameterValueCombination  
XSLTTransformationError  

Function Summary
  BrowseNodeLookup(BrowseNodeId, ResponseGroup, AWSAccessKeyId)
BrowseNodeLookup in AWS
  buildException(els)
Build the exception from the returned DOM node
  buildRequest(argv)
Build the REST request URL from argv,
  CartAdd(Cart, Items, Quantities, ResponseGroup, AWSAccessKeyId)
CartAdd in ECS
  CartClear(Cart, ResponseGroup, AWSAccessKeyId)
CartClear in ECS
  CartCreate(Items, Quantities, ResponseGroup, AWSAccessKeyId)
CartCreate in ECS
  CartGet(Cart, ResponseGroup, AWSAccessKeyId)
CartGet in ECS
  CartModify(Cart, Items, Actions, ResponseGroup, AWSAccessKeyId)
CartModify in ECS
  CustomerContentLookup(CustomerId, ReviewPage, ResponseGroup, AWSAccessKeyId)
CustomerContentLookup in AWS
  CustomerContentSearch(Name, Email, CustomerPage, ResponseGroup, AWSAccessKeyId)
CustomerContentSearch in AWS
  getLicenseKey()
get license key
  getLocale()
get locale
  getVersion()
get version
  Help(HelpType, About, ResponseGroup, AWSAccessKeyId)
Help in AWS
  ItemLookup(ItemId, IdType, SearchIndex, MerchantId, Condition, DeliveryMethod, ISPUPostalCode, OfferPage, ReviewPage, VariationPage, ResponseGroup, AWSAccessKeyId)
ItemLookup in ECS
  ItemSearch(Keywords, SearchIndex, Availability, Title, Power, BrowseNode, Artist, Author, Actor, Director, AudienceRating, Manufacturer, MusicLabel, Composer, Publisher, Brand, Conductor, Orchestra, TextStream, ItemPage, Sort, City, Cuisine, Neighborhood, MinimumPrice, MaximumPrice, MerchantId, Condition, DeliveryMethod, ResponseGroup, AWSAccessKeyId)
ItemSearch in ECS
  ListLookup(ListType, ListId, ProductPage, ProductGroup, Sort, MerchantId, Condition, DeliveryMethod, ResponseGroup, AWSAccessKeyId)
ListLookup in ECS
  ListSearch(ListType, Name, FirstName, LastName, Email, City, State, ListPage, ResponseGroup, AWSAccessKeyId)
ListSearch in ECS
  query(url)
Send the query url and return the DOM
  rawIterator(XMLSearch, arguments, kwItems, plugins)
Return list of objects
  rawObject(XMLSearch, arguments, kwItem, plugins)
Return a unique object
  SellerListingLookup(SellerId, Id, IdType, ResponseGroup, AWSAccessKeyId)
SellerListingLookup in AWS
  SellerListingSearch(SellerId, Title, Sort, ListingPage, OfferStatus, ResponseGroup, AWSAccessKeyId)
SellerListingSearch in AWS
  SellerLookup(Sellers, ResponseGroup, AWSAccessKeyId)
SellerLookup in AWS
  setLicenseKey(license_key)
set license key
  setLocale(locale)
set locale
  SimilarityLookup(ItemId, SimilarityType, MerchantId, Condition, DeliveryMethod, ResponseGroup, AWSAccessKeyId)
SimilarityLookup in ECS
  TransactionLookup(TransactionId, ResponseGroup, AWSAccessKeyId)
TransactionLookup in AWS
  unmarshal(element, plugins, rc)
Return the Bag object with attributes populated using DOM element element: the root of the DOM element we are interested in plugins: callback functions to fine-tune the object structure rc: parent object, used in the recursive call This core function is inspired by Mark Pilgrim (f8dy@diveintomark.org) with some enhancement.
  XMLBrowseNodeLookup(BrowseNodeId, ResponseGroup, AWSAccessKeyId)
DOM representation of BrowseNodeLookup in AWS
  XMLCartAdd(Cart, Items, Quantities, ResponseGroup, AWSAccessKeyId)
DOM representation of CartAdd in ECS
  XMLCartClear(Cart, ResponseGroup, AWSAccessKeyId)
DOM representation of CartClear in ECS
  XMLCartCreate(Items, Quantities, ResponseGroup, AWSAccessKeyId)
DOM representation of CartCreate in ECS
  XMLCartGet(Cart, ResponseGroup, AWSAccessKeyId)
DOM representation of CartGet in ECS
  XMLCartModify(Cart, Items, Actions, ResponseGroup, AWSAccessKeyId)
DOM representation of CartModify in ECS
  XMLCustomerContentLookup(CustomerId, ReviewPage, ResponseGroup, AWSAccessKeyId)
DOM representation of CustomerContentLookup in AWS
  XMLCustomerContentSearch(Name, Email, CustomerPage, ResponseGroup, AWSAccessKeyId)
DOM representation of CustomerContentSearch in AWS
  XMLHelp(HelpType, About, ResponseGroup, AWSAccessKeyId)
DOM representation of Help in AWS
  XMLItemLookup(ItemId, IdType, SearchIndex, MerchantId, Condition, DeliveryMethod, ISPUPostalCode, OfferPage, ReviewPage, VariationPage, ResponseGroup, AWSAccessKeyId)
DOM representation of ItemLookup in ECS
  XMLItemSearch(Keywords, SearchIndex, Availability, Title, Power, BrowseNode, Artist, Author, Actor, Director, AudienceRating, Manufacturer, MusicLabel, Composer, Publisher, Brand, Conductor, Orchestra, TextStream, ItemPage, Sort, City, Cuisine, Neighborhood, MinimumPrice, MaximumPrice, MerchantId, Condition, DeliveryMethod, ResponseGroup, AWSAccessKeyId)
DOM representation of ItemSearch in ECS
  XMLListLookup(ListType, ListId, ProductPage, ProductGroup, Sort, MerchantId, Condition, DeliveryMethod, ResponseGroup, AWSAccessKeyId)
DOM representation of ListLookup in ECS
  XMLListSearch(ListType, Name, FirstName, LastName, Email, City, State, ListPage, ResponseGroup, AWSAccessKeyId)
DOM representation of ListSearch in ECS
  XMLSellerListingLookup(SellerId, Id, IdType, ResponseGroup, AWSAccessKeyId)
DOM representation of SellerListingLookup in AWS
  XMLSellerListingSearch(SellerId, Title, Sort, ListingPage, OfferStatus, ResponseGroup, AWSAccessKeyId)
DOM representation of SellerListingSearch in AWS
  XMLSellerLookup(Sellers, ResponseGroup, AWSAccessKeyId)
DOM representation of SellerLookup in AWS
  XMLSimilarityLookup(ItemId, SimilarityType, MerchantId, Condition, DeliveryMethod, ResponseGroup, AWSAccessKeyId)
DOM representation of SimilarityLookup in ECS
  XMLTransactionLookup(TransactionId, ResponseGroup, AWSAccessKeyId)
DOM representation of TransactionLookup in AWS

Variable Summary
str __author__ = 'Kun Xi < kunxi@kunxi.org >'
str __license__ = 'Python Software Foundation'
str __version__ = '0.2.0'
NoneType HTTP_PROXY = None                                                                  
str LOCALE = 'us'
str VERSION = '2007-02-22'

Function Details

BrowseNodeLookup(BrowseNodeId, ResponseGroup=None, AWSAccessKeyId=None)

BrowseNodeLookup in AWS

buildException(els)

Build the exception from the returned DOM node

Only the first exception is raised.

buildRequest(argv)

Build the REST request URL from argv,

all key, value pairs in argv are quoted.

CartAdd(Cart, Items, Quantities, ResponseGroup=None, AWSAccessKeyId=None)

CartAdd in ECS

CartClear(Cart, ResponseGroup=None, AWSAccessKeyId=None)

CartClear in ECS

CartCreate(Items, Quantities, ResponseGroup=None, AWSAccessKeyId=None)

CartCreate in ECS

CartGet(Cart, ResponseGroup=None, AWSAccessKeyId=None)

CartGet in ECS

CartModify(Cart, Items, Actions, ResponseGroup=None, AWSAccessKeyId=None)

CartModify in ECS

CustomerContentLookup(CustomerId, ReviewPage=1, ResponseGroup=None, AWSAccessKeyId=None)

CustomerContentLookup in AWS

CustomerContentSearch(Name=None, Email=None, CustomerPage=1, ResponseGroup=None, AWSAccessKeyId=None)

CustomerContentSearch in AWS

getLicenseKey()

get license key

if no license key is specified, BadLocale is raised.

getLocale()

get locale

getVersion()

get version

Help(HelpType, About, ResponseGroup=None, AWSAccessKeyId=None)

Help in AWS

ItemLookup(ItemId, IdType=None, SearchIndex=None, MerchantId=None, Condition=None, DeliveryMethod=None, ISPUPostalCode=None, OfferPage=None, ReviewPage=None, VariationPage=None, ResponseGroup=None, AWSAccessKeyId=None)

ItemLookup in ECS

ItemSearch(Keywords, SearchIndex='Blended', Availability=None, Title=None, Power=None, BrowseNode=None, Artist=None, Author=None, Actor=None, Director=None, AudienceRating=None, Manufacturer=None, MusicLabel=None, Composer=None, Publisher=None, Brand=None, Conductor=None, Orchestra=None, TextStream=None, ItemPage=None, Sort=None, City=None, Cuisine=None, Neighborhood=None, MinimumPrice=None, MaximumPrice=None, MerchantId=None, Condition=None, DeliveryMethod=None, ResponseGroup=None, AWSAccessKeyId=None)

ItemSearch in ECS

ListLookup(ListType, ListId, ProductPage=None, ProductGroup=None, Sort=None, MerchantId=None, Condition=None, DeliveryMethod=None, ResponseGroup=None, AWSAccessKeyId=None)

ListLookup in ECS

ListSearch(ListType, Name=None, FirstName=None, LastName=None, Email=None, City=None, State=None, ListPage=None, ResponseGroup=None, AWSAccessKeyId=None)

ListSearch in ECS

query(url)

Send the query url and return the DOM

Exception is raised if there is errors

rawIterator(XMLSearch, arguments, kwItems, plugins=None)

Return list of objects

rawObject(XMLSearch, arguments, kwItem, plugins=None)

Return a unique object

SellerListingLookup(SellerId, Id, IdType='Listing', ResponseGroup=None, AWSAccessKeyId=None)

SellerListingLookup in AWS

Notice: although the repsonse includes TotalPage, TotalResults, there is no ListingPage in the request, so we have to use rawIterator instead of pagedIterator. Hope Amazaon would fix this inconsistance

SellerListingSearch(SellerId, Title=None, Sort=None, ListingPage=None, OfferStatus=None, ResponseGroup=None, AWSAccessKeyId=None)

SellerListingSearch in AWS

SellerLookup(Sellers, ResponseGroup=None, AWSAccessKeyId=None)

SellerLookup in AWS

setLicenseKey(license_key=None)

set license key

license key can come from any number of locations; see module docs for search order. if no license key is specified, BadLocale is raised.

setLocale(locale)

set locale

if unsupported locale is set, BadLocale is raised.

SimilarityLookup(ItemId, SimilarityType=None, MerchantId=None, Condition=None, DeliveryMethod=None, ResponseGroup=None, AWSAccessKeyId=None)

SimilarityLookup in ECS

TransactionLookup(TransactionId, ResponseGroup=None, AWSAccessKeyId=None)

TransactionLookup in AWS

unmarshal(element, plugins=None, rc=None)

Return the Bag object with attributes populated using DOM element

element: the root of the DOM element we are interested in
plugins: callback functions to fine-tune the object structure
rc: parent object, used in the recursive call

This core function is inspired by Mark Pilgrim (f8dy@diveintomark.org)
with some enhancement. Each node.tagName is evalued by plugins' callback
functions:
        
        if plugins['isBypassed'] is true:
                this elment is ignored
        if plugins['isPivoted'] is true:
                this children of this elment is moved to grandparents
                this object is ignored.
        if plugins['isCollective'] is true:
                this elment is mapped to []
        if plugins['isCollected'] is true:
                this children of elment is appended to grandparent
                this object is ignored.

XMLBrowseNodeLookup(BrowseNodeId, ResponseGroup=None, AWSAccessKeyId=None)

DOM representation of BrowseNodeLookup in AWS

XMLCartAdd(Cart, Items, Quantities, ResponseGroup=None, AWSAccessKeyId=None)

DOM representation of CartAdd in ECS

XMLCartClear(Cart, ResponseGroup=None, AWSAccessKeyId=None)

DOM representation of CartClear in ECS

XMLCartCreate(Items, Quantities, ResponseGroup=None, AWSAccessKeyId=None)

DOM representation of CartCreate in ECS

XMLCartGet(Cart, ResponseGroup=None, AWSAccessKeyId=None)

DOM representation of CartGet in ECS

XMLCartModify(Cart, Items, Actions, ResponseGroup=None, AWSAccessKeyId=None)

DOM representation of CartModify in ECS

XMLCustomerContentLookup(CustomerId, ReviewPage=1, ResponseGroup=None, AWSAccessKeyId=None)

DOM representation of CustomerContentLookup in AWS

XMLCustomerContentSearch(Name=None, Email=None, CustomerPage=1, ResponseGroup=None, AWSAccessKeyId=None)

DOM representation of CustomerContentSearch in AWS

XMLHelp(HelpType, About, ResponseGroup=None, AWSAccessKeyId=None)

DOM representation of Help in AWS

XMLItemLookup(ItemId, IdType=None, SearchIndex=None, MerchantId=None, Condition=None, DeliveryMethod=None, ISPUPostalCode=None, OfferPage=None, ReviewPage=None, VariationPage=None, ResponseGroup=None, AWSAccessKeyId=None)

DOM representation of ItemLookup in ECS

XMLItemSearch(Keywords, SearchIndex='Blended', Availability=None, Title=None, Power=None, BrowseNode=None, Artist=None, Author=None, Actor=None, Director=None, AudienceRating=None, Manufacturer=None, MusicLabel=None, Composer=None, Publisher=None, Brand=None, Conductor=None, Orchestra=None, TextStream=None, ItemPage=None, Sort=None, City=None, Cuisine=None, Neighborhood=None, MinimumPrice=None, MaximumPrice=None, MerchantId=None, Condition=None, DeliveryMethod=None, ResponseGroup=None, AWSAccessKeyId=None)

DOM representation of ItemSearch in ECS

XMLListLookup(ListType, ListId, ProductPage=None, ProductGroup=None, Sort=None, MerchantId=None, Condition=None, DeliveryMethod=None, ResponseGroup=None, AWSAccessKeyId=None)

DOM representation of ListLookup in ECS

XMLListSearch(ListType, Name=None, FirstName=None, LastName=None, Email=None, City=None, State=None, ListPage=None, ResponseGroup=None, AWSAccessKeyId=None)

DOM representation of ListSearch in ECS

XMLSellerListingLookup(SellerId, Id, IdType='Listing', ResponseGroup=None, AWSAccessKeyId=None)

DOM representation of SellerListingLookup in AWS

XMLSellerListingSearch(SellerId, Title=None, Sort=None, ListingPage=None, OfferStatus=None, ResponseGroup=None, AWSAccessKeyId=None)

DOM representation of SellerListingSearch in AWS

XMLSellerLookup(Sellers, ResponseGroup=None, AWSAccessKeyId=None)

DOM representation of SellerLookup in AWS

XMLSimilarityLookup(ItemId, SimilarityType=None, MerchantId=None, Condition=None, DeliveryMethod=None, ResponseGroup=None, AWSAccessKeyId=None)

DOM representation of SimilarityLookup in ECS

XMLTransactionLookup(TransactionId, ResponseGroup=None, AWSAccessKeyId=None)

DOM representation of TransactionLookup in AWS

Variable Details

__author__

Type:
str
Value:
'Kun Xi < kunxi@kunxi.org >'                                           

__license__

Type:
str
Value:
'Python Software Foundation'                                           

__version__

Type:
str
Value:
'0.2.0'                                                                

HTTP_PROXY

Type:
NoneType
Value:
None                                                                  

LOCALE

Type:
str
Value:
'us'                                                                   

VERSION

Type:
str
Value:
'2007-02-22'                                                           

Generated by Epydoc 2.1 on Sun Apr 8 20:05:04 2007 http://epydoc.sf.net