Skip to main content

Dict-style DBM based on sqlite3.

>>> import sqlite_dbm
>>> db = sqlite_dbm.open(':memory:')
>>> db['foo'] = ['bar', {'baz': 1}]
>>> db['foo']
['bar', {'baz': 1}]
>>> del db['foo']
>>> len(db)
0
>>> db.close()

Fast insert:

>>> db = sqlite_dbm.open(':memory:', auto_commit=False)
>>> for i in range(1000):
...     db[str(i)] = 'foo'
>>> db.commit()
>>> len(db)
1000
>>> db.clear()
>>> db.close()

sqlite_dbm.open options

  • filename - first required argument

  • auto_commit=True - auto commit after each db update

  • dumper=’pickle’ - one of ‘pickle’, ‘json’ or ‘marshal’ or ‘str’

  • compress_level=9 - if set it to 0, compression will be disabled

  • smart_compress=True - compress only if compressed size less than raw

  • pickle_protocol=2 - see pickle docs

Release files for sqlite-dbm 3.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sqlite-dbm 3.2.1
File Size Uploaded
sqlite_dbm-3.2.1.tar.gz 3.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sqlite-dbm 3.2.1
File Interpreter ABI Platform
sqlite_dbm-3.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 6.6 kB

Release files / sqlite_dbm-3.2.1.tar.gz

Download URL sqlite_dbm-3.2.1.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9d7e57615d3bf89d9704c28f1688ebb2a6a0fa3935e1aee1652bb5965dbde54f
BLAKE2b-256 checksum
How to use checksums
32b96413e05d117e4643150e4f0d60fbbc280bcc4e73d41829e61f55037de441
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / sqlite_dbm-3.2.1-py3-none-any.whl

Download URL sqlite_dbm-3.2.1-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5e152fe1a56e12140edca470a440c92f137e8346efdf3f2afe0f21eeed1f6565
BLAKE2b-256 checksum
How to use checksums
4e5291ca03fce8f08475eccc8d55e4303359c253b4010411e664f19d2fed1076
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release history Release notifications | RSS feed

This release

3.2.1 This release

2 release files

3.2.0

1 release file

3.1.0

1 release file

3.0.0

1 release file

2.1.1

1 release file

2.1.0

1 release file

2.0.0

1 release file

1.1.0

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page