Automatically generate .env files from .env.example template files
Project description
A Python app to generate dotenv (.env) files from templates.
Features
Quickstart
Install Python DotEnver
$ pip install dotenver
Create a .env.example following this example
# Full line comments will be kept # Simple usage NAME= ## dotenver:first_name # Pass parameters to fakers ENABLED= ## dotenver:boolean(chance_of_getting_true=50) # Name your values MYSQL_PASSWORD= ## dotenver:password:my_password(length=20) # And get the same value again, when the name is repeated. DB_PASSWORD= ## dotenver:password:my_password() # Output your values within double or single quotes DOUBLE_QUOTED= ## dotenver:last_name(quotes='"') SINGLE_QUOTED= ## dotenver:last_name(quotes="'") # Literal values are possible STATIC_VARIABLE=
static value# export syntax can be used export EXPORTED_VARIABLE=exportedRun python DotEnver form the CLI
$ dotenver -r
You now have a new .env file ready to use.
For more usage options run
$ dotenver -h
Docker
A Docker image is provided. To use it, mount your source code to /var/lib/dotenver/ and run the container.
$ docker run -ti --rm -v "${PWD}:/var/lib/dotenver/" jmfederico/dotenver
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dotenver-1.3.0.tar.gz
(8.2 kB
view details)
Built Distribution
File details
Details for the file dotenver-1.3.0.tar.gz
.
File metadata
- Download URL: dotenver-1.3.0.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.7.4 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6e49c7ec11ed3d8b760463349da3179c833ea4c899fd0c52e2b4d3edc689992 |
|
MD5 | 5f59fbec16a7652462c4a7b981031783 |
|
BLAKE2b-256 | 2e92472a6d304d40cb98527f39ac7f1cf37e6f0c9d32f1188a9c18140e9fc0f6 |
File details
Details for the file dotenver-1.3.0-py3-none-any.whl
.
File metadata
- Download URL: dotenver-1.3.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.7.4 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6a1bad980ffd9e0f29539b82221b2088771c06bcfae1105eda0a9579b425ed6 |
|
MD5 | 65f3668c2a67aee85bff415fc6215c3b |
|
BLAKE2b-256 | 0e938c17013a1ee0f35db60e6e4ff73804759c17eec102fe0ffa74aa7f817698 |