autoread-dotenv
autoread-dotenv parses your .env file when starting any venv-based Python process:
Installation
Install via uv:
> uv add autoread-dotenv
Or add to your poetry-based project:
> poetry add autoread-dotenv
Install via pip:
> bin/pip install autoread-dotenv
Set up a local development environment
> just install
Usage
The only thing left to do for you is the create a .env in the root of your project.
Registered sitecustomize-entrypoint
The autoread_dotenv.entrypoint-function is registered as a sitecustomize-entrypoint in our pyproject.toml_:
[project.entry-points.sitecustomize]
autoread_dotenv = "autoread_dotenv:entrypoint"
Sitecustomize and all its registered entrypoints will be executed at the start of every python-process. For more information, please see sitecustomize-entrypoints
Avoid overriding existing environments variables
By default, your .env-file read by autoread-dotenv will override any pre-existing environment variables.
You can avoid this behaviour by setting AUTOREAD_ENFORCE_DOTENV=0.
Overriding where the .env-file is looked up
By default, autoread-dotenv locates your .env relative to sys.prefix, assuming the
in-project-virtualenv layout described above. For setups that don't follow that convention
(global installs, containers, editable mounts, ...), set AUTOREAD_DOTENV_PATH to the full path
of the .env-file to use instead - it takes precedence and skips the sys.prefix-based lookup
entirely:
> export AUTOREAD_DOTENV_PATH=/etc/myapp/production.env
Performance
autoread-dotenv runs on the start of every Python process in the venv, so its startup-time
cost is measured and tracked explicitly - see docs/performance.md for the
current numbers and how to reproduce them.
Compatibility
autoread-dotenv works on Python 3.9+, including PyPy3. Tested until Python 3.14.
Notable dependencies
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autoread_dotenv-1.0.6.tar.gz.
File metadata
- Download URL: autoread_dotenv-1.0.6.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bd2a034b18f30cd1a71a5bb9feb1618f891c091b0e00907ecff14aad8a0da48
|
|
| MD5 |
dee4ed3d9af13a0072f878d32385dcff
|
|
| BLAKE2b-256 |
52266f5d3ec0f59eb24f2dad157e9c6de4be90b263600281da3a51dd82ca65f8
|
Provenance
The following attestation bundles were made for autoread_dotenv-1.0.6.tar.gz:
Publisher:
releasing.yaml on libranet/autoread-dotenv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autoread_dotenv-1.0.6.tar.gz -
Subject digest:
3bd2a034b18f30cd1a71a5bb9feb1618f891c091b0e00907ecff14aad8a0da48 - Sigstore transparency entry: 2580316858
- Sigstore integration time:
-
Permalink:
libranet/autoread-dotenv@a8b74feb762dab23ef257ca42287e736680c9c83 -
Branch / Tag:
refs/tags/1.0.6 - Owner: https://github.com/libranet
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
releasing.yaml@a8b74feb762dab23ef257ca42287e736680c9c83 -
Trigger Event:
release
-
Statement type:
File details
Details for the file autoread_dotenv-1.0.6-py3-none-any.whl.
File metadata
- Download URL: autoread_dotenv-1.0.6-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0aa59b7eb329b6b97631944fbe9e224e71a8eb981f6ad59454851402778262f0
|
|
| MD5 |
bcb557bc50e0938ef95394cfef27e78d
|
|
| BLAKE2b-256 |
710088e09a00d3362a785a4a955f99a1da7abbffa9fe7a22d5a9eea833d3e196
|
Provenance
The following attestation bundles were made for autoread_dotenv-1.0.6-py3-none-any.whl:
Publisher:
releasing.yaml on libranet/autoread-dotenv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autoread_dotenv-1.0.6-py3-none-any.whl -
Subject digest:
0aa59b7eb329b6b97631944fbe9e224e71a8eb981f6ad59454851402778262f0 - Sigstore transparency entry: 2580316862
- Sigstore integration time:
-
Permalink:
libranet/autoread-dotenv@a8b74feb762dab23ef257ca42287e736680c9c83 -
Branch / Tag:
refs/tags/1.0.6 - Owner: https://github.com/libranet
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
releasing.yaml@a8b74feb762dab23ef257ca42287e736680c9c83 -
Trigger Event:
release
-
Statement type: