Skip to main content

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:

  1. Currently only works if installed and used in a virtual environment with write access to the venv folder.
  2. Currently keys can only be strings.
  3. Currently only the get, set and delete 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)

Uploaded Source

Built Distribution

magic_container-0.0.4-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page