KV provides a dictionary-like interface on top of SQLite. Keys can be unicode strings, numbers or None. Values are stored as JSON.
>>> from kv import KV
>>> db = KV('/tmp/demo.kv')
>>> db['hello'] = 'world'
>>> db[42] = ['answer', 2, {'ultimate': 'question'}]
>>> dict(db)
{42: [u'answer', 2, {u'ultimate': u'question'}], u'hello': u'world'}
There is a locking facility that uses SQLite’s transaction API:
>>> with kv.lock(): ... l = db[42] ... l += ['or is it?'] ... db[42] = l
And that’s about it. The code is really simple.
Metadata
Release files for kv 0.4.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 | Provenance | |
|---|---|---|---|---|
| kv-0.4.1.tar.gz | 2.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kv-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.5 kB
Release files / kv-0.4.1.tar.gz
| Download URL | kv-0.4.1.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e30ced1b2f57888763e3930174404d1a1bdd969069ae1abe76ead3aee1c73d5
|
|
BLAKE2b-256 checksum How to use checksums |
fa86aa368360866a86f68190171c32dd25ccc5d8430bedd86846f7150010076a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.10.8 Darwin/22.1.0
|
Release files / kv-0.4.1-py3-none-any.whl
| Download URL | kv-0.4.1-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
819df9b48d942ffebcf7af56ec2c4b7f4c76af156518275f6e43c604d04178d5
|
|
BLAKE2b-256 checksum How to use checksums |
0f1da5732ee0905afa00744e2d837dd1fb0bd4e28c379f001f611eeebaec442f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.10.8 Darwin/22.1.0
|
Security for kv 0.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.