A dictionary-like object that is friendly with multiprocessing and uses key-value databases (e.g., RocksDB) as the underlying storage.
Project description
hugedict
A dictionary-like object that is friendly with multiprocessing and uses key-value databases (e.g., RocksDB) as the underlying storage.
Installation
pip install hugedict
Usage
from hugedict.rocksdb import RocksDBDict
# replace K and V for the types you are using
mapping: Dict[K, V] = RocksDBDict(
dbpath, # path to db file
create_if_missing=create_if_missing, # whether to create database if missing
read_only=read_only, # open database in read only mode
deser_key=bytes.decode, # decode the key from bytes
ser_key=str.encode, # encode the key to bytes
deser_value=bytes.decode, # decode the value from bytes
ser_value=str.encode, # encode the value from bytes
db_options=db_options, # other rocksdb options
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hugedict-1.3.3.tar.gz
(11.7 kB
view details)
Built Distribution
hugedict-1.3.3-py3-none-any.whl
(15.0 kB
view details)
File details
Details for the file hugedict-1.3.3.tar.gz
.
File metadata
- Download URL: hugedict-1.3.3.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2899dbccf00b09687b837e81460bad6d31bb9b31ca41cb3c2e3a2ffd35ba3d35 |
|
MD5 | 3ddbe86ff3182fa667a3b48ec8445c7e |
|
BLAKE2b-256 | a7b53a98efce3f4d26c8660058d1e1d6be4e6a5cc8df4c5074b56c2420060a86 |
File details
Details for the file hugedict-1.3.3-py3-none-any.whl
.
File metadata
- Download URL: hugedict-1.3.3-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e90d59e33f01defc6e30cee56e738cff75fc2e5789db546778a6add7ea5acfca |
|
MD5 | 329ff93ced133f1efe31053c34118eb7 |
|
BLAKE2b-256 | 2d2b3708ef2409ff7dede05d63c595f08e9d22246bdbf57a35be0f640330ead3 |