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.0.0.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for named_env-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 418a93d1fd522f815fca2767029aa5637afa077a47e461acda7dae29a7ba5f51 |
|
MD5 | b1950e667c69e6180873919711bb40a7 |
|
BLAKE2b-256 | 92eaea5d1f6408ba185cda0489d56671cd44e60ad5907baa94cc867b840806a3 |