Skip to main content

Dict-style key value wrapper around some embeded databases

Project description

Dict-style key value wrapper around some embeded databases
==========================================================

Usage
=====

>>> import unidbm
>>> db = unidbm.open('sqlite', path=':memory:')

Set and get data:

>>> db[u'foo'] = ['bar', {'baz': 1}]
>>> db[u'foo']
['bar', {'baz': 1}]

Iterate:

>>> [key for key in db] == [u'foo']
True

Delete:

>>> del db[u'foo']
>>> len(db)
0

Backends
--------
- sqlite
- kyoto cabinet
- semidbm

Custom backend
--------------
Backend works with bytes (str in py2) keys and values.
It should implement next methods:

- __init__(self, path, **any_options)
- def __getitem__(self, key):
- def __setitem__(self, key, value):
- def __len__(self):
- def __iter__(self):
- def close(self):

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for unidbm, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size unidbm-0.1.1.tar.gz (3.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page