A disk-based key/value store in Python.
Project description
DiskDict is a hashtable on your hard drive. It allows you to store KAZILLIONS (!) of key/value pairs and interact with them as you would a Python dictionary, all the while never storing more than two key/value pairs in memory simultaneously. The key/value pairs can be anything that’s serializable (you specify the serializer and deserializer, with repr and eval as the default). Since we’re operating on the disk, big O of all operations are dependent on the host operating system’s file access complexities.
>>> from disk_dict import DiskDict >>> from numpy import array >>> dd = DiskDict('my_disk_dict') >>> a = array([[1,2],[3,4]]) >>> dd[a] = 'I was pointed to by ' + repr(a) >>> dd[a] 'I was pointed to by array([[1, 2],\n [3, 4]])' >>> del dd[a] >>> dd[a] >>>
PyPI: https://pypi.python.org/pypi?name=disk_dict&:action=display
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
disk_dict-2.1.0.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for disk_dict-2.1.0.macosx-10.5-x86_64.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | f93c34d0e28e96f8686004db264866fafd2b8b4c440f7a584f58beb21d56fe93 |
|
MD5 | 99dd0b46105118e8b64e3e2a35093462 |
|
BLAKE2b-256 | cd653ad9e307e3eb910a4939ce8d56b469a1a918b23a70d2b79d5198c4eed30b |