https://github.com/dotenvx/python-dotenvx
[dotenvx.com] a better dotenv–from the creator of `dotenv`
https://github.com/dotenvx/python-dotenvx
dotenvx
Last synced: 4 months ago
JSON representation
[dotenvx.com] a better dotenv–from the creator of `dotenv`
- Host: GitHub
- URL: https://github.com/dotenvx/python-dotenvx
- Owner: dotenvx
- License: bsd-3-clause
- Created: 2024-10-18T15:36:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-02T17:35:15.000Z (about 1 year ago)
- Last Synced: 2025-12-01T09:09:01.847Z (6 months ago)
- Topics: dotenvx
- Language: Python
- Homepage: https://dotenvx.com
- Size: 38.1 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
> [!IMPORTANT]
>
> Warning: work in progress. until complete, please use [github.com/dotenvx/dotenvx](https://github.com/dotenvx/dotenvx) directly.
>
> see [python examples](https://dotenvx.com/docs/languages/python)
>
---
[](https://dotenvx.com)
*a better dotenv*–from the creator of [`dotenv`](https://github.com/motdotla/dotenv).
* run anywhere (cross-platform)
* multi-environment
* encrypted envs
### Quickstart [](http://badge.fury.io/py/python-dotenvx)
Install and use it in code just like `python-dotenv`.
```sh
pip install python-dotenvx
```
Then run `dotenvx-postinstall` to install the `dotenvx` binary (python-dotenvx is a wrapper).
```sh
dotenvx-postinstall
# or to specify the os-arch – useful for building binaries to a specific target such as linux-x86_64 on aws lambda
dotenvx-postinstall --os linux --arch x86_64
# you might also find you need to specify PYTHONPATH depend on how/where dotenvx installs to
PYTHONPATH=. bin/dotenvx-postinstall --os linux --arch x86_64
```
Then use it in code.
```python
# main.py
import os
from dotenvx import load_dotenvx
load_dotenvx() # take environment variables from .env.
print(os.getenv("S3_BUCKET"))
```