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.1.tar.gz
(5.6 kB
view hashes)
Built Distribution
Close
Hashes for named_env-2.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 879249930dbdadc1373361cb2357474346c3fa65526507fa68087a1889bf238e |
|
MD5 | 091630a9d477ff977b5093802808ec3c |
|
BLAKE2b-256 | 84a8b58927cd0b7d66192626f4e1316ff568bd9062abc4070b884e23e74f7a3b |