Thread-safe, magical and persistent dict for Python.
Project description
Magic Container
Thread-safe, lightweight and persistent dict for Python with a magical touch.
Contents
Installation:
pip install magic-container
Examples:
Use it like a dict:
from container import container
container["key"] = 3
print(container["key"])
del container["key"]
Or get the values while setting them if there aren't in the container:
from container import container
print(container["second_key"], lambda: 23)
Limitations:
- Currently only works if installed and used in a virtual environment with write access to the venv folder.
- Currently keys can only be strings.
- Currently only the
get
,set
anddelete
methods are defined.
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
magic-container-0.0.4.tar.gz
(3.2 kB
view details)
Built Distribution
File details
Details for the file magic-container-0.0.4.tar.gz
.
File metadata
- Download URL: magic-container-0.0.4.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0ddbe9eab64af78cce2dc41f07b29c36926e9857e9ba7a3067192efed2c6bb6 |
|
MD5 | 983a23aa5a607ba7d822f221b622e19e |
|
BLAKE2b-256 | 02e608a452bab546c711ab7c9d181ab370f72b865ff34057025c9f10a67b9450 |
File details
Details for the file magic_container-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: magic_container-0.0.4-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5223da4fa4e3a78fb34b40bfd43fe81d5a48bb27f9b73d20237781e9db51def |
|
MD5 | e4b0077d209738b3345168c42d2adb23 |
|
BLAKE2b-256 | 5bc7cae709309ac64bc4ce9f704c8e44b4cc3cd98c735bf07c076faa5bad1f30 |