httk.db.storable module

class httk.db.storable.Storable(types=None, index=None)[source]

Bases: object

Superclass for handling various forms of data storage, retreival, etc. Class object representing data should inherit from Storable.

All public variables must be initalized in a call to storable_init() inside __init__(). Other member variables are OK, but must begin with ‘_’, and all methods must handle these variables not being initialized. For private variables that needs to be preserved: let them start with ‘_’ AND declare them in storable_init().

classmethod find_all(obj, store, member, value, types)[source]

Convinience method to do a very simple search of type: find all entries where member = value.

classmethod find_one(obj, store, member, value, types)[source]

Convinience^2 method to do a very simple search of type: find one entry where member = value.

storable_init(store, updatesid=None, **keyvals)[source]

All Storable objects need to call this method in __init__(). Name should be a ‘somewhat qualified’ class name.

trivialstore = <httk.db.storable.TrivialStore object>
classmethod variable(searcher, name, types, outid=None, parent=None)[source]
class httk.db.storable.TrivialStore[source]

Bases: object

Very simple storage class that just stores everything into an individual dictionary, just like regular python objects work

new(table, types, keyvals)[source]
retrieve(table, types, sid)[source]
httk.db.storable.storable_props(*props)[source]
httk.db.storable.storable_types(name, *keyvals, **flags)[source]