"Fossies" - the Fresh Open Source Software Archive 
Member "pyzor-1.0.0/pyzor/engines/__init__.py" (10 Dec 2014, 891 Bytes) of package /linux/privat/pyzor-1.0.0.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "__init__.py" see the
Fossies "Dox" file reference documentation and the latest
Fossies "Diffs" side-by-side code changes report:
0.9.0_vs_1.0.0.
1 """Database backends for pyzord.
2
3 The database class must expose a dictionary-like interface, allowing access
4 via __getitem__, __setitem__, and __delitem__. The key will be a forty
5 character string, and the value should be an instance of the Record class.
6
7 If the database backend cannot store the Record objects natively, then it
8 must transparently take care of translating to/from Record objects in
9 __setitem__ and __getitem__.
10
11 The database class should take care of expiring old values at the
12 appropriate interval.
13 """
14
15 from pyzor.engines import gdbm_
16 from pyzor.engines import mysql
17 from pyzor.engines import redis_
18 from pyzor.engines import redis_v0
19
20
21 __all__ = ["database_classes"]
22
23 database_classes = {"gdbm": gdbm_.handle,
24 "mysql": mysql.handle,
25 "redis_v0": redis_v0.handle,
26 "redis": redis_.handle,
27 }