A disk-based key/value store in Python.
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] >>>
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size disk_dict-2.2.0.macosx-10.5-x86_64.exe (66.8 kB)||File type Windows Installer||Python version any||Upload date||Hashes View hashes|
|Filename, size disk_dict-2.2.0.tar.gz (3.4 kB)||File type Source||Python version None||Upload date||Hashes View hashes|
Hashes for disk_dict-2.2.0.macosx-10.5-x86_64.exe