dictstore
dictstore is a simple local data store for Python that aims to provide an interface similar to a python dictionary.
Getting Started
Installation
pip install dictstore
Usage
# file: sample_1.py
from dictstore import DictStore
data = DictStore()
d[1] = 45
# file: sample_2.py
from dictstore import DictStore
data = DictStore()
print(d[1])
# output: 45
Considerations
-
dictstore uses an in memory dictionary to support fast reads
-
using multiple DictStore instances for the same data file is not supported. Instead DictStore class returns the same instance for the same data file throughout the python code (Singleton behaviour).
-
dictstore is best suited for CLIs or similar applications where values have to be remembered accross multiple runs.
-
The data file is a plain readable text file and no encryption is offered by dictstore.
-
dictstore might not be the fastest datastore, its promise is to get the work done and nothing more.
-
dictstore will evaluate the type of value for all the nested objects in a given value, this is done using a Tree.
-
This project has not be tested for concurrency safety. Please be cautious when using in projects involving multi-anything.
Keys
All Hashable Data Types are supported as keys.
Hashable Data Types
| Name | Type |
|---|---|
| String | str |
| Integer | int |
| Float | float |
| Tuple | tuple |
Values
Dictstore uses ast package and ast.literal_eval under the hood, so currently all the data types supported by ast.literal_eval except Ellipsis are supported as values.
strings, bytes, numbers, tuples, lists, dicts, sets, booleans, None.
For more information about ast.literal_eval visit the following link.
Metadata
Release files for dictstore 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| dictstore-1.0.0.tar.gz | 9.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dictstore-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.3 kB
Release files / dictstore-1.0.0.tar.gz
| Download URL | dictstore-1.0.0.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
209a292880c26c70807e285179b12eca2899f0de09491abed1af8c73caf7e419
|
|
BLAKE2b-256 checksum How to use checksums |
735600aa4e78403d7b11491a9070655e1820b35cef076be105f373e99e1e37e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / dictstore-1.0.0-py3-none-any.whl
| Download URL | dictstore-1.0.0-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
35053931a319741a22a83f3836bb7ec9a6d67652705a51ce85b43fff41aa7337
|
|
BLAKE2b-256 checksum How to use checksums |
d6a974142bdb764dc5da96e3d3c6c36b822da110e2126ac2cdbcaa1ff074ec6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Security for dictstore 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.