Package emma :: Package interface :: Class Interface
[hide private]
[frames] | no frames]

Class Interface

source code

complement.Complement --+
                        |
                       Interface

Instance Methods [hide private]
 
__init__(self, *args) source code
 
db_handler(self, event, data)
Default DB handler
source code

Inherited from complement.Complement: log, run, update_db

Method Details [hide private]

__init__(self, *args)
(Constructor)

source code 
Parameters:
  • identifier - complement unique identifier, on interface it is use for the Event invocation
  • conf - the configuration of the module as {item: value}
  • db - the database collection of the complement
Overrides: complement.Complement.__init__
(inherited documentation)

db_handler(self, event, data)

source code 

Default DB handler

Get a database search for the collection of the interface and return it's results.

Parameters:
  • event (l{event}) - event to be triggered, it must have all the elements
  • data (dict) - a db search, like {"type": "foo", "body": True}
Returns:
results of the db search