Skip to main content

Dictionary read on disk

Project description

Dictionary read on disk

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.


You can install the method by typing:

pip install dikt

Basic usage

import dikt

# use any homogeneous dictionary
mapping = {"key_" + str(i): i for i in range(1000000)}

# dump the dictionary to file
# compression is an integer from 0 to 3, 3 giving the smallest file size
dikt.dump(mapping, "mapping.dikt", compression=1)

# loading object is extremely fast
mapping = dikt.load("mapping.dikt")

# accessing item directly from the disk
# without loading the whole JSON is ultra fast


Maixent Chenebaux

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

dikt-1.0.0.tar.gz (4.2 kB view hashes)

Uploaded source

Built Distribution

dikt-1.0.0-py3-none-any.whl (5.4 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page