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

Uploaded Source

Built Distribution

hugedict-1.4.0-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

Hashes for hugedict-1.4.0.tar.gz
Algorithm Hash digest
SHA256 3df1fed58ba444c4b0004c7112a87a375c24ef3fcb041545f426f80d87306a1c
MD5 081b0bfdc2e31efd59f3756c94e92ca0
BLAKE2b-256 7ccc4251133a0060f9713935e9ada7fdf16d56fc45b7d57e2a4ab27b622a150a

See more details on using hashes here.

File details

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

File metadata

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

Hashes for hugedict-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0c3741b72cbe886619034aadf55732c6dbefb84db8d318bec89210b21c6c00a1
MD5 7f698d9627e0ccfa1097a5f715e49832
BLAKE2b-256 de3f9eb17613beb39da592df58a105e83addd3899126539bd31b47c40b0aa73c

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