Dictionary like access to the filesystem.
Project description
FSDict
Design principles
- Every key of a fsdict must be of type 'str' or 'FunctionType'.
- A fsdict may not be part of a list.
- A fsdict may contain other fsdicts.
- Dictionaries in python are passed by reference; so are fsdicts. By default an fsdict is always passed by refernece. That is, its values are not copied but the fsdict is symlinked to the new position.
Internals
Keys of type 'str' work just as normal dictionary keys. Keys of type 'FunctionType' are used as filters for the keys of an fsdict. So
dictionary[lambda key: "foo" in key]
would return a generator which yields the values for keys which contain the string 'foo'.
Possible value types and how they are handled:
- fsdict - a directory
- 'bytes' type - written to file as is
- any other python object (except for 'bytes') - pickled
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file filesystem-dict-0.1.15.tar.gz
.
File metadata
- Download URL: filesystem-dict-0.1.15.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4db822334bd038ba89a43b1a8d70be2a987264e8f1d6c626762f31f1193edcd4 |
|
MD5 | e1497fca2f7d99eab84097c41a157682 |
|
BLAKE2b-256 | fa278c9a96a3f12002d11d037485b387ae4fc18195fa98c746e7e9e0b2d606e2 |
File details
Details for the file filesystem_dict-0.1.15-py3-none-any.whl
.
File metadata
- Download URL: filesystem_dict-0.1.15-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0f1df19cffc307d90159c59ee2976fbc11c1f77ccc69a7ad0be8ebf26a76969 |
|
MD5 | 48b1231a2b5173ae5f3ccd45ae1b8e17 |
|
BLAKE2b-256 | aa6523fcef670f75e1488913e2a79299908ff9b415597ec240b9e0ca63c48836 |