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-1.0.1.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for named_env-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46d3559deab017e238672ce8f03924cf700614b4c491db264789362171a0b982 |
|
MD5 | 686c3097672bfea80a71b351c96019f4 |
|
BLAKE2b-256 | a554ba0be98e59c797b96e242511e4375be80920da9245f27c9b52c8e28bdcf4 |