Class-based environment variables typed specification
Project description
named-env
Class-based environment variables typed specification.
Installation
pip install named-env
Usage example
from named_env import EnvironmentNamespace, RequiredInteger
import os
class WebApplicationEnvironmentNamespace(EnvironmentNamespace):
WEB_SERVER_PORT = RequiredInteger()
env = WebApplicationEnvironmentNamespace()
if __name__ == "__main__":
os.environ["WEB_SERVER_PORT"] = "80"
print(env.WEB_SERVER_PORT) # 80
print(type(env.WEB_SERVER_PORT)) # int
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
named_env-2.3.1.tar.gz
(5.5 kB
view hashes)
Built Distribution
Close
Hashes for named_env-2.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79a3224415e04d470c85db6b4f3623da9f1d57d4ff8f56613419b107f7ef9783 |
|
MD5 | aee71de979053d5c81860f7d05063306 |
|
BLAKE2b-256 | 406bc2246c953a9188173ce448f9f43d48fb750dc371d029868b6fd651a15a72 |