autoread_dotenv

autoread_dotenv.__init__.

We assume following directory-structure: The virtualenv of your project must be created as a .venv-subfolder inside your project-directory.

This corresponds to poetry-config “in-project = true”. The .env-file must reside in the root of your project-directory.

<project-root>
    .env
    .venv/
        bin/
            python
        lib/
        lib64/
        pyvenv.cfg

We also support toplevel-symlinks to the corresponding .venv-files:
bin/       -> .venv/bin/
lib/       -> .venv/lib/
lib64/     -> .venv/lib64/
pyvenv.cfg -> .venv/pyvenv.cfg

Submodules

Attributes

__author__

__license__

__version__

Functions

get_dotenv_path()

Return the location of the .env for in-project virtualenvs.

entrypoint()

Set environment-variable from the in-project .env-file.

Package Contents

autoread_dotenv.__author__: str | list[str]
autoread_dotenv.__license__: str | list[str]
autoread_dotenv.__version__: str
autoread_dotenv.get_dotenv_path()

Return the location of the .env for in-project virtualenvs.

Return None of the .env-file does not exist.

Return type:

pathlib.Path | None

autoread_dotenv.entrypoint()

Set environment-variable from the in-project .env-file.

Return type:

None