Environment variables verifier and type converter.
Project description
ExenENV
Environment variables verifier and type converter.
Installation
Library is available for installation from PyPI
$ pip install exenenv
Basic Usage
import os
from exenenv import EnvironmentProfile
os.environ["REQUIRED_VARIABLE"] = "20" # assume it's set to this
class Environment(EnvironmentProfile):
REQUIRED_VARIABLE: int
DEFAULT_VALUE_VARIABLE: float = 30.0
env = Environment()
env.load()
print(f"{env.REQUIRED_VARIABLE=}\n{env.DEFAULT_VALUE_VARIABLE=}")
env.REQUIRED_VARIABLE=20
env.DEFAULT_VALUE_VARIABLE=30.0
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
exenenv-1.0.tar.gz
(2.8 kB
view hashes)
Built Distribution
exenenv-1.0-py3-none-any.whl
(3.3 kB
view hashes)