Skip to main content

A dictionary-like object that is friendly with multiprocessing and uses key-value databases (e.g., RocksDB) as the underlying storage.

Project description

hugedict PyPI

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


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.1.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

hugedict-1.3.1-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file hugedict-1.3.1.tar.gz.

File metadata

  • Download URL: hugedict-1.3.1.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

Hashes for hugedict-1.3.1.tar.gz
Algorithm Hash digest
SHA256 9414cedc7e7456f5a7dc0595bf2b1d029f0152bb27c319a30f7f02a5e7fb1826
MD5 f6dba1a3a827ea5732536f024cd6557e
BLAKE2b-256 bdb46af9bac1a93b0e06bf4ec918f14c33297d724ef6f548f5348c8c253034c5

See more details on using hashes here.

File details

Details for the file hugedict-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: hugedict-1.3.1-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

Hashes for hugedict-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3ac58f5abb9f29249f39c49eb7ee69f92cd134bd3b0bfc9cdd2161c0cdeb714b
MD5 e551a3cc1484b5766c9a3c2560560703
BLAKE2b-256 b924926cfe2b0757e098d258f8d4d9ae82ca9e2e4364a8e82409522579145fec

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page