autoread-dotenv
autoread-dotenv parses your .env file when starting any venv-based Python process:
Installation
Install with uv (preferred):
> uv add autoread-dotenv
If you are using Poetry:
> 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
entrypoint() never raises for a configuration problem (a missing, unreadable or
un-loadable .env, or a missing python-dotenv): it warns and carries on, so it cannot
break interpreter startup. To check afterwards whether loading actually succeeded, read
autoread_dotenv.last_load_status (a LoadStatus enum), which entrypoint() also returns:
import autoread_dotenv
from autoread_dotenv import LoadStatus
if autoread_dotenv.last_load_status is not LoadStatus.LOADED:
... # LoadStatus.MISSING / DOTENV_NOT_INSTALLED / LOAD_FAILED / NOT_RUN
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
the performance page 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
Metadata
Release files for autoread-dotenv 1.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| autoread_dotenv-1.0.7.tar.gz | 11.7 kB | With provenance | Details for autoread_dotenv-1.0.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| autoread_dotenv-1.0.7-py3-none-any.whl | Python 3 | none | any | Details for autoread_dotenv-1.0.7-py3-none-any.whl |
Total release size: 23.3 kB
Release files / autoread_dotenv-1.0.7.tar.gz
| Download URL | autoread_dotenv-1.0.7.tar.gz |
|---|---|
| Size | 11.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
895ecd270c53baac0999384a9f5f4853f6bd46a9f2d7afbf2154123ef1d780ce
|
|
BLAKE2b-256 checksum How to use checksums |
c869caf88a0aca7330aeb0723a25bdc72440fb69b42a360a64480a21abbe5598
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.
Transparency logRelease files / autoread_dotenv-1.0.7-py3-none-any.whl
| Download URL | autoread_dotenv-1.0.7-py3-none-any.whl |
|---|---|
| Size | 11.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5b97f6f42e4628471588650263307dd4eecef7d17d87e9d90f59956d762bc21a
|
|
BLAKE2b-256 checksum How to use checksums |
d4d374804119ec2fa3b47248fd63beb5117443031578565b8ad886018fb9b1a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.
Transparency logSecurity for autoread-dotenv 1.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for autoread_dotenv-1.0.7.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.