Package bw :: Module hermesclient :: Class HermesClient
[frames] | no frames]

Class HermesClient

object --+
         |
        HermesClient

Create a client for a REST based service. Any methods called on this instance will be directly called on the client as GET requests.

Instance Methods
 
__init__(self, uri, headers=None, target=None)
Creates a client to the web-service with end-point uri.
 
__getattribute__(self, key)
x.__getattribute__('name') <==> x.name
 
__call__(self, *args, **kwargs)
 
callable_generator(self, method_name)

Inherited from object: __delattr__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables
  headers = {'Accept': 'text/xml;application/xml,application/rss...
  target = None
Properties

Inherited from object: __class__

Method Details

__init__(self, uri, headers=None, target=None)
(Constructor)

 

Creates a client to the web-service with end-point uri.

Parameters:
  • uri - The service end-point to use.
  • headers - Optional. Is a dictionary of request headers to be sent in each request.
  • target - Optional. Is a callable which accepts a xml.dom.minidom.Document and returns something else acceptable to the client (default: HermesResource)

    This class has no pre-defined methods. Any method calls are automatically converted to service requests.

Overrides: object.__init__

__getattribute__(self, key)

 

x.__getattribute__('name') <==> x.name

Overrides: object.__getattribute__
(inherited documentation)

Class Variable Details

headers

Value:
{'Accept': 'text/xml;application/xml,application/rss+xml,application/a\
tom+xml'}