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.1.0.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for named_env-2.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d51b5809a63d6a9763da541dbfb1a4998802a481707a91485b572fabed494d2a |
|
MD5 | 68d5dfe025eb1ec26f93badf86240dba |
|
BLAKE2b-256 | 028a350a8eea95661343985ddc8d89d2193e218df1632149a5e933a8e0a24b0f |