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
Package Contents
Classes
Simple warning-formatting . |
Functions
Return the location of the .env for in-project virtualenvs. |
|
Set environment-variable from the in-project .env-file. |
Attributes
- autoread_dotenv.__version__ = '1.0.3'
- autoread_dotenv.__copyright__ = 'Copyright 2023 Libranet'
- autoread_dotenv.__license__ = 'MIT License'
- autoread_dotenv.DOTENV_INSTALLED = 1
- class autoread_dotenv.SimpleWarning
Simple warning-formatting .
- __enter__()
Enter contextmanager.
- Return type:
- __exit__(*args)
Exit contextmanager.
- Return type:
None
- static simple_message(message, *args, **kwargs)
Return a simple warning-message without any traceback-info.
- Parameters:
message (str) –
- Return type:
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:
Optional[pathlib.Path]
- autoread_dotenv.entrypoint()
Set environment-variable from the in-project .env-file.
- Return type:
None