a better dotenv–from the creator of dotenv.
- run anywhere (cross-platform)
- multi-environment
- encrypted envs
Quickstart 
Keep the familiar load_dotenv() entry point with dotenvx loading semantics.
pip install python-dotenvx
The wheel includes the native dotenvx SDK and Rust primitives.
# main.py
import os
from dotenvx import load_dotenv
load_dotenv() # take environment variables from .env
print(os.getenv("S3_BUCKET"))
You can also parse values without changing the environment:
from dotenvx import dotenv_values
values = dotenv_values(".env")
Encrypted values can be decrypted using DOTENV_PRIVATE_KEY from the
environment or a neighboring .env.keys file. For keys in Armor or another
custody provider, install a dotenvx CLI with command-sdk and the matching
feature on PATH.
Loading errors and policy
The main entry points use the shared dotenvx-sdk Rust loader. Errors are printed
to stderr and available values still load by default. Use strict=True, or set
strictness in the current directory's Dotenvxfile, to raise before changing
os.environ. Dotenvxfile required/type/file validation is shared with the CLI.
Ignore selected diagnostics with ignore=["DECRYPTION_FAILED"].
The loader returns redaction metadata without changing application values; the adapter does not install application-output redaction hooks.
Deliberately smaller Python API
load_dotenv() and dotenv_values() accept an optional file path, or stream=
for text input. Loading supports override=, strict=, and ignore=. Options
after the file path are keyword-only. load_dotenvx(path, override=False) remains
available and returns the resolved mapping after loading it.
Parsing, expansion, UTF-8 file decoding, and local key discovery belong to the
shared Rust loader. Python no longer implements a second parser for bare keys
or rewrites dollar signs to disable interpolation. Bare keys without = are
ignored; use KEY= for an empty string. Single quotes preserve literal dollars.
The legacy interpolate, encoding, and verbose options, and the no-op
find_dotenv(usecwd=...) option, are no longer supported. find_dotenv() still
searches upward from the current directory.
Shared file selection
The Rust loader owns file discovery, directory expansion, conventions, and
key-based filename inference. Pass one path or a list of paths; use
convention="nextjs" or convention="flow", and key_files="custom.keys" when
needed. The same file-selection and error-ignore environment variables used by
the CLI are supported. find_dotenv() delegates upward searching to Rust.
load_dotenv(convention="nextjs")
load_dotenv([".env.production", ".env"])
load_dotenv("app", key_files="shared/.env.keys")
Metadata
Release files for python-dotenvx 3.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| python_dotenvx-3.0.2-cp38-abi3-win_amd64.whl | CPython 3.8 | abi3 | Windows x86-64 | Details for python_dotenvx-3.0.2-cp38-abi3-win_amd64.whl |
| python_dotenvx-3.0.2-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | CPython 3.8 | abi3 | Linux glibc 2.17+ x86-64 | Details for python_dotenvx-3.0.2-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
| python_dotenvx-3.0.2-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl | CPython 3.8 | abi3 | Linux glibc 2.17+ ARM64 | Details for python_dotenvx-3.0.2-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
| python_dotenvx-3.0.2-cp38-abi3-macosx_11_0_arm64.whl | CPython 3.8 | abi3 | macOS 11.0+ ARM64 | Details for python_dotenvx-3.0.2-cp38-abi3-macosx_11_0_arm64.whl |
| python_dotenvx-3.0.2-cp38-abi3-macosx_10_12_x86_64.whl | CPython 3.8 | abi3 | macOS 10.12+ x86-64 | Details for python_dotenvx-3.0.2-cp38-abi3-macosx_10_12_x86_64.whl |
Total release size: 7.0 MB
Release files / python_dotenvx-3.0.2-cp38-abi3-win_amd64.whl
| Download URL | python_dotenvx-3.0.2-cp38-abi3-win_amd64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.8 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
6350eb3e667af35f6b80fbd6b4796f260fa26eab6247ee27e11edc1b852d5745
|
|
BLAKE2b-256 checksum How to use checksums |
5ebc3ab1685c2b92b933c81d341689ee77aef72240d85556a23010b44ceba024
|
| 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 13, 2026.
Transparency logRelease files / python_dotenvx-3.0.2-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | python_dotenvx-3.0.2-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
c21bed0070f756d1835db515635107cdd8f73bdd2003c13be8de7d55ef573ebf
|
|
BLAKE2b-256 checksum How to use checksums |
f82d8c16ed6ea22987d23ce19b6e3bc63802fb3174916b52b540012f66709c29
|
| 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 13, 2026.
Transparency logRelease files / python_dotenvx-3.0.2-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | python_dotenvx-3.0.2-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
47fc002e40cf65fe3f36f3a4cff9ce456cc2e6c47014de2e6579ca8f8920833d
|
|
BLAKE2b-256 checksum How to use checksums |
52a97e010289c20b9441ff5d023bdbf9dce08a63af37245dc7e7b935fe5b2d0f
|
| 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 13, 2026.
Transparency logRelease files / python_dotenvx-3.0.2-cp38-abi3-macosx_11_0_arm64.whl
| Download URL | python_dotenvx-3.0.2-cp38-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.8 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4dbae8807e905c33b5537e33d5c91b7151e4ec1343a293110643c281760c5693
|
|
BLAKE2b-256 checksum How to use checksums |
0f86a6381e2ee0d52c1e279291aac57ef7ac39eb4fbc0a2363886f4dfd8483a4
|
| 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 13, 2026.
Transparency logRelease files / python_dotenvx-3.0.2-cp38-abi3-macosx_10_12_x86_64.whl
| Download URL | python_dotenvx-3.0.2-cp38-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.8 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
90c22c8c9c281a4e2ada3db27a32676d3af0d90f4cbcc040e2eb10d554db99a3
|
|
BLAKE2b-256 checksum How to use checksums |
ef1c99a821386b85873de2b228f5bec9e64b954f64dd4cc7db87fd6c2be600b9
|
| 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 13, 2026.
Transparency logSecurity for python-dotenvx 3.0.2
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
All 5 files in this release have been uploaded with provenance metadata.
Attestation for python_dotenvx-3.0.2-cp38-abi3-win_amd64.whl
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 13, 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.