Package pyperry :: Package adapter :: Module abstract_adapter :: Class AbstractAdapter
[frames] | no frames]

Class AbstractAdapter

source code

object --+
         |
        AbstractAdapter
Known Subclasses:

The base class for all adapters

Instance Methods
 
__init__(self, config, mode=None, middlewares=None, processors=[])
Create a new adapter object with the given configuration running as a `mode` adapter
source code
 
reset(self)
Clear out the stack causing it to be rebuilt on the next request
source code
 
__call__(self, **kwargs)
Makes a request to the stack
source code
 
execute(self, **kwargs)
Call read, write, or delete according to the mode kwarg.
source code
 
read(self, **kwargs)
Read from the datastore with the provided options
source code
 
write(self, **kwargs)
Write object's attributes to the datastore
source code
 
delete(self, **kwargs)
Delete the object from the datastore
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  adapter_types = ['read', 'write']
Properties
  stack
Setup the stack plumbing with the configured stack items

Inherited from object: __class__

Method Details

__init__(self, config, mode=None, middlewares=None, processors=[])
(Constructor)

source code 

Create a new adapter object with the given configuration running as a `mode` adapter

Overrides: object.__init__

Property Details

stack

Setup the stack plumbing with the configured stack items

Wrap each stack item (processors and middleware) in reverse order around the call to the adapter method. This will allow stack items to intercept requests, modify query information and pass it along, do things with the results of the query or any combination of these things.

Get Method:
unreachable.stack(self) - Setup the stack plumbing with the configured stack items