Simple singleton to share variables across modules
Project description
Simple singleton to share variables across modules
Features
Use the basic module namespace functionality
Examples
import monist
dispatch = eval(monist.dispatch())
# set singleton value
monist.thing = 1
# access singleton value with fallback
# if monist.thing exists, return it, otherwise return some_default
asdf = dispatch('thing', some_default)
Importing monist as another name works also:
import monist as stage
stage.something = 2
Limitations
Almost certainly not thread-safe, appropriate for concurrency, etc.
License
Free software: MIT license
Documentation
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file monist-0.1.0.tar.gz.
File metadata
- Download URL: monist-0.1.0.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.25.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ad0e8bae1331763389152153d6ff5bb6daad9749e10e7db99e3c01d657b4519
|
|
| MD5 |
aaf0390474da2e15b5bd06183f93a7d0
|
|
| BLAKE2b-256 |
585983ba5a76d1a7c1e47373ad3b556fcd79372f7f974c34affdf5205cffc9f2
|
File details
Details for the file monist-0.1.0-py3-none-any.whl.
File metadata
- Download URL: monist-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.25.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7aa6888103de7a194b47c647d942d7c66475c2ef6e96e144e672dbc6faad7da7
|
|
| MD5 |
a4580606ac70e35a55747afd27013664
|
|
| BLAKE2b-256 |
26c3ed1f72843bc6d5e4d37b1e67acfe7af5084189ef3ed0b2c36e8411b7d95d
|