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.2.0.tar.gz
(5.5 kB
view hashes)
Built Distribution
Close
Hashes for named_env-2.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89e9a7dfd1056f5706f900a8a1374e608fbbe2c0e25f7dfb4c24844fe8b749c7 |
|
MD5 | dc3829972de7d0567612a432f7228957 |
|
BLAKE2b-256 | e284b0f9b525141c9ad542f972cb3df7bbcccc9016a3d068a8d3249238600da1 |