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.3.0.tar.gz
(5.7 kB
view hashes)
Built Distribution
Close
Hashes for named_env-2.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea76d5af561dbcec24fb9196f53c2ad7d20fb319cf2ad9a542140409d6f75edc |
|
MD5 | f695960838aa4fb2d0c6bf66406e4e1a |
|
BLAKE2b-256 | 8fecf33d7f53c9e45b097c5f30f8b0e6e5aaeb9f4a6b857a1047dccecdd9c5cb |