A secure dotenv–from the creator of dotenv.
- Encrypt
- Commit
- Ship
Quickstart
With uv installed, create a project and add python-dotenvx.
uv init hello-dotenvx
cd hello-dotenvx
uv add python-dotenvx
Create these two files in the project directory.
.env
HELLO=World
index.py
import os
from dotenvx import load_dotenv
load_dotenv()
print(f"Hello {os.environ['HELLO']}")
Run the script from that directory.
uv run index.py
The script prints Hello World.
Usage
Install dotenvx.
$ curl -sfS https://dotenvx.sh | sh
◈ installed (2.38.2:/usr/local/bin/dotenvx)
Encrypt your secrets in .env files. The values become ciphertext and only your private key can unlock them.
$ dotenvx encrypt
◈ encrypted .env (039 BCA) via .env.keys ⛉
Commit your encrypted .env files with your code. It's safe. Now you can securely share secrets through git.
$ git add .env
$ git commit -m "encrypt .env"
Ship your code and secrets together. Dotenvx uses your private key to decrypt and inject your secrets just-in-time to your code.
$ python index.py
⟐ injected env (2) from .env (039 BCA) via .env.keys ⛉
Design
Three widely used and proven primitives make up Dotenvx's design. Git, .env, and secp256k1.
We chose git because it is the best way to deliver digital goods. It is the container ship of the digital world. All code travels on its ships. Why not secrets? Why invent an inferior secrets delivery mechanism when the world class one is right there at your fingertips.
We chose .env because it is the open standard for loading secrets into code. It represents environment variables, the core primitive that all secrets end up injected into at runtime of code.
Lastly, we needed to choose an encryption algorithm. Encryption of the values inside the .env file would allow us to place those values with code, leveraging git's distribution advantages while still following the twelve-factor config – by separating the decryption key from the code (environment).
It was important that we choose a proven, simple, asymmetric standard with small keys. We chose secp256k1, battle-tested by Bitcoin for more than seventeen years. We made cryptography an opinionated choice so developers wouldn't have to. Encryption just worked.
The result is a system built entirely from primitives, developers already understand, and infrastructure they already use. Secrets can travel with code without becoming part of the code. Git distributes them, .env defines how apps consume them, and secp256k1 keeps their values unreadable. The kicker, all this works by setting a single private key on your infrastructure - no more risky async coordination of secrets, no more centralized downtime risk. Your secrets are always just there with your code, ready to be unlocked at runtime.
Metadata
Release files for python-dotenvx 3.1.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.1.2-cp38-abi3-win_amd64.whl | CPython 3.8 | abi3 | Windows x86-64 | Details for python_dotenvx-3.1.2-cp38-abi3-win_amd64.whl |
| python_dotenvx-3.1.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.1.2-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
| python_dotenvx-3.1.2-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl | CPython 3.8 | abi3 | Linux glibc 2.17+ ARM64 | Details for python_dotenvx-3.1.2-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
| python_dotenvx-3.1.2-cp38-abi3-macosx_11_0_arm64.whl | CPython 3.8 | abi3 | macOS 11.0+ ARM64 | Details for python_dotenvx-3.1.2-cp38-abi3-macosx_11_0_arm64.whl |
| python_dotenvx-3.1.2-cp38-abi3-macosx_10_12_x86_64.whl | CPython 3.8 | abi3 | macOS 10.12+ x86-64 | Details for python_dotenvx-3.1.2-cp38-abi3-macosx_10_12_x86_64.whl |
Total release size: 8.0 MB
Release files / python_dotenvx-3.1.2-cp38-abi3-win_amd64.whl
| Download URL | python_dotenvx-3.1.2-cp38-abi3-win_amd64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.8 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
cf429ee88f94a032254172f7ed72cc48f5ea0932d3c7200457ecc8f4093535e3
|
|
BLAKE2b-256 checksum How to use checksums |
46eb6b74462499af9ff8174d2bd11d699a27eea27e91db6ee338073c360f3a58
|
| 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 21, 2026.
Transparency logRelease files / python_dotenvx-3.1.2-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | python_dotenvx-3.1.2-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
3d669d61b152a2ce4330ca2e9e8b1ef3b7dda78873e10789395003e3b8b0f062
|
|
BLAKE2b-256 checksum How to use checksums |
4fa441cf1fd8701b1e1a2da5dc9bab232c581293df1e7bc6cc8a35142fbf7277
|
| 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 21, 2026.
Transparency logRelease files / python_dotenvx-3.1.2-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | python_dotenvx-3.1.2-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
6e92ba834dc73cbc2b281a098346e9d94f39c72d60d0aaf0eaf4bd31ff3380ff
|
|
BLAKE2b-256 checksum How to use checksums |
8c9ee757e6042067220d9a76418242ef16cc6cf5303572f81ab8aca4a8509d03
|
| 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 21, 2026.
Transparency logRelease files / python_dotenvx-3.1.2-cp38-abi3-macosx_11_0_arm64.whl
| Download URL | python_dotenvx-3.1.2-cp38-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.8 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
99350a54cb61388d15ee62e23c489f377d4e4bc5517c64c681bdd6b7e6979be8
|
|
BLAKE2b-256 checksum How to use checksums |
23e18749ea01f6fb830969b527969efcfd1c5bc69bd0e2ed11c0cf844f0188a6
|
| 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 21, 2026.
Transparency logRelease files / python_dotenvx-3.1.2-cp38-abi3-macosx_10_12_x86_64.whl
| Download URL | python_dotenvx-3.1.2-cp38-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.8 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
2a0402fb8fb5cd0546d84da79fea3523db88f174e0fce2a27165ba3abedc7733
|
|
BLAKE2b-256 checksum How to use checksums |
2c49fafcdb80e62fa47c42dbd28199b7a5a3517b21d726c087f0b4ddc41dc6e1
|
| 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 21, 2026.
Transparency logSecurity for python-dotenvx 3.1.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.1.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 21, 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.