Class-based environment variables typed specification
Project description
named-env
Class-based environment variables typed specification.
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.0.tar.gz
(4.3 kB
view hashes)
Built Distribution
Close
Hashes for named_env-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 264ac5bb9dcb5fe46060f39ed267660481da74dc4885dd1558383b1807195efb |
|
MD5 | 3dd453821caed260f8b71641e186a526 |
|
BLAKE2b-256 | db37427b68249488f1867f23a625cf79ee84d1b7cf5aec5d7f95593518c0f36c |