Skip to main content

A package that allows you to import environment variables like any other module.

Project description

Environ Import

Environ Import is a python package that allows you to import environment variables from its environ and envnull modules which are dynamically typed from .env files.

Quickstart

Install using pip

pip install environ-import

Once installed, you can import environment variables from the environ module.

from environ import PATH
print(PATH)

# or

import environ
print(environ.PATH)

Environ Import automatically loads .env files using python-dotenv.

Import from the envnull module to avoid raising AttributeError when importing an undefined environment variable.

Dynamic Typing

The stub file generator is automatically run when the environ or envnull modules are imported. Types are generated based on the variables found in .env and .env.example files.

If you would like type hints to be availabe as soon a change has been made to a .env file, Environ Import provides a watchdog to automatically regenerate stub files when a change is detected.

python -m environ-import

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

environ_import-0.1.0.tar.gz (5.9 kB view hashes)

Uploaded Source

Built Distribution

environ_import-0.1.0-py3-none-any.whl (8.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page