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.

Source Distribution

unidbm-0.1.1.tar.gz (3.8 kB view details)

Uploaded Source

File details

Details for the file unidbm-0.1.1.tar.gz.

File metadata

  • Download URL: unidbm-0.1.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for unidbm-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f7e5f8bd70796d8e7deb1b30884ee4d140e7b19dea89175b9dcc342867ba9212
MD5 3713299c6f1a1dce0f6f71d434119fc1
BLAKE2b-256 df704836744aff14c70dd5d8a915f7a6daef9269160640879a8a273c0e8bd875

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page