/EnvConfigurator

Python - Load/Parse your Environment Variables in Just 3 Lines

Primary LanguagePythonMIT LicenseMIT

EnvConfigurator

Python's Last Environment Handler, Ever

N|Solid

EnvConfigurator is a Python package aimed towrds handling environment in two lines of code while running any Python application.

Features

  • Load and set .env file for you.
  • Parse and get environment variable as per your criteria.
  • Criteria can include var_type, optional, choices, custom message and default value.
  • Import and Use in just 3 lines of code.
  • Access your Environment Variable with . (dot)

Tech

  • [Python] - Python

And of course EnvConfigurator itself is open source with a public repository on GitHub.

Installation

EnvConfigurator requires Python3 to run.

pip install EnvConfigurator

Usage

from EnvConfigurator import EnvVar, EnvParser

env_vars = [
        EnvVar("DB_NAME", str),
]

parsed_env = EnvParser(env_vars).all

# Access your environment variable with dot notation
print(parsed_env.DB_NAME)

Development

Want to contribute? Great!

Fork Gihub repository and create a Pull Request.

Run tests before submitting the request

python manage.py test

License

MIT

Free Software, Hell Yeah!