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.2.tar.gz
(11.6 kB
view details)
Built Distribution
hugedict-1.3.2-py3-none-any.whl
(14.8 kB
view details)
File details
Details for the file hugedict-1.3.2.tar.gz
.
File metadata
- Download URL: hugedict-1.3.2.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a68135005bb2a54ee4e761f5787bf41bc4b6417d8f175bd44e4463d321b5cd01 |
|
MD5 | ec379fcfd85db01e9d9a986e714bf952 |
|
BLAKE2b-256 | 58a399ff1ce856ed618dd15c659371d185eaa3f84732eddf7a868dd890f45b41 |
File details
Details for the file hugedict-1.3.2-py3-none-any.whl
.
File metadata
- Download URL: hugedict-1.3.2-py3-none-any.whl
- Upload date:
- Size: 14.8 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 | 4e06af0ed6f76e77cebb826fc247c34d8bd16ca553d276c296c5edb5e6e2110b |
|
MD5 | 04bff7c84d7300dcb489c6ae78f21f23 |
|
BLAKE2b-256 | b16c8bb7156a78c3473e712bf6b41403ce8729726ca675f733d30acaca56ae3b |