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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file environ_import-0.1.0.tar.gz.

File metadata

  • Download URL: environ_import-0.1.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Windows/10

File hashes

Hashes for environ_import-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cd342601d15905c8a84fdf3146dbf7641ca3628e8fb0bcd22e1222f396384327
MD5 28432d713cc33a4dbe3f6b82a399d253
BLAKE2b-256 5a9e829ae31720765e53dc4ac1227bc715e35f8229172caaffb90589c686eec3

See more details on using hashes here.

File details

Details for the file environ_import-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: environ_import-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Windows/10

File hashes

Hashes for environ_import-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f43ab7b8d78920a96a07b38541105c3ae2eaa8b831588c7d428e88264352f4e2
MD5 b4fb4ead17bc68b34a46ea018ef9b2a5
BLAKE2b-256 7dde7f85387604eb3d5c3a8c4ee4400a8d92e056afba692baf6f01007edcf4c5

See more details on using hashes here.

Supported by

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