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):
==========================================================
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):
Release files for unidbm 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| unidbm-0.1.1.tar.gz | 3.8 kB | Details |
Release files / unidbm-0.1.1.tar.gz
| Download URL | unidbm-0.1.1.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f7e5f8bd70796d8e7deb1b30884ee4d140e7b19dea89175b9dcc342867ba9212
|
|
BLAKE2b-256 checksum How to use checksums |
df704836744aff14c70dd5d8a915f7a6daef9269160640879a8a273c0e8bd875
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |