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.2.tar.gz
(5.6 kB
view hashes)
Built Distribution
Close
Hashes for named_env-2.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e38a5c81ac12f606b841a6be1a240d9f27f53e64744a1cc27cc9358a611be68 |
|
MD5 | deaca7492e85a947ce36a5de9a5e8f1b |
|
BLAKE2b-256 | b24883a96ca0bcd756aa0fbc49e22c1fe8c97b270e4854b6b7106a63caca6825 |