fast-dotenv-rs
A fast Rust-backed drop-in replacement for python-dotenv==1.2.2, built with
PyO3 and Maturin. It preserves the dotenv Python API, CLI, IPython extension,
interpolation rules, and file mutation behavior.
from dotenv import dotenv_values, load_dotenv
load_dotenv()
config = dotenv_values(".env")
The distribution is named fast-dotenv-rs, but existing application code keeps
importing dotenv.
Why this project
- Low migration cost: keep
from dotenv import load_dotenvand thedotenvCLI. - Verifiable compatibility: run the complete pinned
python-dotenv==1.2.2upstream suite, not only basicKEY=valueexamples. - Reproducible performance evidence: compare candidate and Oracle in isolated processes and validate values, types, and ordering before timing.
- Cross-platform packaging: build abi3 wheels with PyO3 and Maturin.
Status
Version 0.1.1 is the formal-release line. It makes Click a default dependency so a
plain public install provides the complete dotenv CLI. The release workflow
builds five native wheels and one sdist, publishes that immutable set through
Trusted Publishing, then reinstalls the base public package and passes the full
upstream compatibility suite on every advertised platform before creating the
formal GitHub Release. Until those public links exist, the release remains blocked.
GitHub Actions CI #3 passed all four jobs:
| Platform | Python | Installed-wheel verification |
|---|---|---|
| Linux x86-64 | 3.10 and 3.12 | Rust gates, project tests, 10,000-case differential gate, full upstream suite, artifact audit |
| macOS arm64 | 3.12 | wheel install, CLI, 219 upstream tests passed |
| Windows x86-64 | 3.12 | wheel install, CLI, 169 passed / 50 upstream platform skips |
The local Linux x86-64 / CPython 3.12 upstream result is:
218 passed, 1 skipped, 0 failed
The single Linux skip is an upstream platform/root condition. IPython was installed, so all three upstream IPython tests ran.
Installation
After the 0.1.1 public release exists, install the package with:
python -m pip install "fast-dotenv-rs==0.1.1"
Application code continues importing dotenv. To build from source instead:
git clone https://github.com/lowmiaq-gmail/fast-dotenv-rs.git
cd fast-dotenv-rs
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
python -m pip install -U pip maturin
maturin develop --release
Build a wheel:
maturin build --release --out wheelhouse
python -m pip install wheelhouse/*.whl
Do not install the Oracle in the same environment
Both python-dotenv and this project provide the top-level dotenv package and
the dotenv command. Installing both in one environment causes the last installed
distribution to overwrite the other. Use separate virtual environments for
candidate/Oracle comparisons.
Compatible surface
Top-level exports match python-dotenv==1.2.2:
from dotenv import (
dotenv_values, find_dotenv, get_cli_string, get_key,
load_dotenv, load_ipython_extension, set_key, unset_key,
)
The compatibility surface also includes:
dotenv.main.DotEnv,rewrite, andresolve_variables;- parser
Binding,Original,Reader,Position, and parser functions; - variable
Atom,Literal,Variable, andparse_variables; - CLI
list,set,get,unset, andrun; dotenv.ipython.IPythonDotEnvand the%dotenvmagic.
See docs/UPSTREAM-CONTRACT.md for signatures,
return values, logging, exceptions, filesystem effects, and environment behavior.
CLI
dotenv list
dotenv list --format=json
dotenv set DATABASE_URL 'postgres://localhost/app'
dotenv get DATABASE_URL
dotenv unset DATABASE_URL
dotenv run -- python app.py
python -m dotenv --version
Reproduce the compatibility gates
python -m pip install "pytest>=8,<9" "click>=5" "ipython>=8"
cargo test --all-targets
PYTHONPATH=python python -m pytest -q tests
bash scripts/run_upstream_full.sh
PYTHONPATH=python python scripts/run_differential.py
The upstream runner pins and verifies the official python-dotenv==1.2.2 sdist
and every upstream test fixture hash. It also checks that the candidate, not an
installed Oracle, owns the imported dotenv namespace.
Benchmark snapshot
On one Linux x86-64 / CPython 3.12 machine, isolated-process dotenv_values()
in-memory parsing workloads measured 15.957×–88.609× faster. The harness checks
the return type, item order, and values before timing.
python tests/benchmark.py --repeats 7 --warmup 2 --iterations 1000
These numbers do not represent file I/O, process startup, macOS, Windows, or every
application workload. See BENCHMARK.md for inputs, raw context,
and limitations.
Documentation
FULL-RELEASE-REPORT.md— current evidence and remaining release gates;docs/COMPATIBILITY.md— compatibility matrix;docs/UPSTREAM-CONTRACT.md— pinned upstream contract;docs/REUSE-AUDIT.md— reuse and license audit;docs/LAUNCH-SEO.md— launch, discovery, and adoption plan.docs/LAUNCH-STATUS.md— evidence-backed public launch status and review checkpoints.
License
Rust/PyO3 project code is MIT licensed. BSD-3-Clause notices for the upstream
compatibility baseline are recorded in THIRD_PARTY_NOTICES.md
and licenses/.
Metadata
Release files for fast-dotenv-rs 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fast_dotenv_rs-0.1.1.tar.gz | 787.9 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| fast_dotenv_rs-0.1.1-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| fast_dotenv_rs-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| fast_dotenv_rs-0.1.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| fast_dotenv_rs-0.1.1-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
| fast_dotenv_rs-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 1.8 MB
Release files / fast_dotenv_rs-0.1.1.tar.gz
| Download URL | fast_dotenv_rs-0.1.1.tar.gz |
|---|---|
| Size | 787.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7e624ecb00bfa47533f8c89fc360d98ae6bd6dfca1cae6866a45f4033ada1f4c
|
|
BLAKE2b-256 checksum How to use checksums |
6956371372afdd013daef3369a8c420181abc44f24f173968986658ef368abcf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 11, 2026.
Transparency logRelease files / fast_dotenv_rs-0.1.1-cp310-abi3-win_amd64.whl
| Download URL | fast_dotenv_rs-0.1.1-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 136.0 kB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
382931f250576bb955c00b1932b4a1cc125225ed77045ed6973866beac5df503
|
|
BLAKE2b-256 checksum How to use checksums |
9346eaebd49bc375cb296cce7228761bbf70da2c749350931ea5d50d6eacb55a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 11, 2026.
Transparency logRelease files / fast_dotenv_rs-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | fast_dotenv_rs-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 230.0 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
1e94993f6cd2e2d52313001cf0e1fcbc4c2e4f2d8fc2713349cf708552de698c
|
|
BLAKE2b-256 checksum How to use checksums |
009872b4dec1fcaf4e953696392954c0e890a7f6d414863ad881e8855557b4b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 11, 2026.
Transparency logRelease files / fast_dotenv_rs-0.1.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | fast_dotenv_rs-0.1.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 223.2 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
0e17f3693bb25c5052d962b62583f51fa174bf69e1b00a53c7c1f6e0f66ee88d
|
|
BLAKE2b-256 checksum How to use checksums |
15822714105325d1499ba420c1099fd0bc94932db81f6f4b9cb8f6fb944318d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 11, 2026.
Transparency logRelease files / fast_dotenv_rs-0.1.1-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | fast_dotenv_rs-0.1.1-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 207.0 kB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
ff8ac51cfeab9da3bcd2ee214e5c7047d3bcfd74c7da164ca1ff6ea078399a72
|
|
BLAKE2b-256 checksum How to use checksums |
e396102b1f4ea6c7b17c965aa51d968a77ac945b78834c5ad578034740a9f943
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 11, 2026.
Transparency logRelease files / fast_dotenv_rs-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | fast_dotenv_rs-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 214.1 kB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
05e99fe3eaf49529aac305b9ad673e33104909829d13be7fcd0564e0476f8506
|
|
BLAKE2b-256 checksum How to use checksums |
667c7739ca775b6f7f77ad42e5bce0ffd124f996dc2bf63ff3cd028d075f59c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 11, 2026.
Transparency log