sqlite-shelve
- Implements a shelve-like store in SQLite
- Applications incorporating this module can utilize the interfaces of SQLiteShelve class just like they do the Shelve class
- In most ordinary use cases, applications that use the builtin shelve module can switch to SQLiteShelve with the followng:
import sqliteshelve as shelve
d = shelve.open(filename) # opens existing SQLite3 database if it exists. Creates a new one if it does not
d[key] = data # store data at key (overwrites old data if
# using an existing key)
data = d[key] # retrieve a COPY of data at key (raise KeyError if no
# such key)
del d[key] # delete data stored at key (raises KeyError
# if no such key)
flag = d.has_key(key) # true if the key exists
klist = d.keys() # a list of all existing keys
d.close() #commits changes to Sqlite3 shelve store
- data, like in dbm, or BerkeleyDB-based storage libraries, is pickled with cpickle, but pickles with HIGHEST_PROTOCOL.
contains a script called shelve-tool, which is both a useful utility and provides an example for how sqlite-shelve can be used like the shelve module
Metadata
Release files for sqlite-shelve 2.2.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 | |
|---|---|---|---|
| sqlite-shelve-2.2.1.tar.gz | 6.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sqlite_shelve-2.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.2 kB
Release files / sqlite-shelve-2.2.1.tar.gz
| Download URL | sqlite-shelve-2.2.1.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49bfd073a014a0e89aa6c58567a347f33bec70d20397598c5fc5fb831ae8bd82
|
|
BLAKE2b-256 checksum How to use checksums |
6126e32ad260e6e5fe471844b95d89bce4f12d659378e44e80cc64372cfe9722
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|
Release files / sqlite_shelve-2.2.1-py3-none-any.whl
| Download URL | sqlite_shelve-2.2.1-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c09e08139bc858d8970cd0325433da80b1ebf72706280096dbcfddf071c73ab9
|
|
BLAKE2b-256 checksum How to use checksums |
fdede3c8ef8f8224828e419058e11b0a658e64c2c9784b5291fd4f29a6f6f1d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|