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 hashes)
Built Distribution
Close
Hashes for magic_container-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5223da4fa4e3a78fb34b40bfd43fe81d5a48bb27f9b73d20237781e9db51def |
|
MD5 | e4b0077d209738b3345168c42d2adb23 |
|
BLAKE2b-256 | 5bc7cae709309ac64bc4ce9f704c8e44b4cc3cd98c735bf07c076faa5bad1f30 |