Fill .env templates by prompting for values and outputting KEY=value lines.
Project description
fillenv
Minimal Python project managed with uv.
Setup
# Create and sync environment (uses uv.lock/pyproject.toml)
uv sync
# Run a Python REPL using the environment
uv run python -V
Make commands
# Create and sync environment with dev/test extras
make setup
# Format code (ruff formatter)
make format
# Lint code (ruff lint)
make lint
# Run tests (pytest)
make test
Usage
Fill variables from a template and write KEY=value lines to a file:
# Install from PyPI
pip install fillenv
# Use the installed CLI (writes to .env or .env1, .env2, ...)
fillenv .env.template
# Or rely on default template path (".env.template" in CWD)
fillenv
# Alternatively via python -m
uv run python -m fillenv .env.template
# Or rely on default template path (".env.template" in CWD)
uv run python -m fillenv
# Specify output file (default: .env)
fillenv --output .env.production
# Overwrite existing output file
fillenv --overwrite
# Combine options
fillenv .env.template --output .env.local --overwrite
You can also import and call fillenv.cli.run(argv) from Python code.
Project layout
.
├── pyproject.toml
├── README.md
├── Makefile # common tasks: setup, format, lint, test
├── src/
│ └── fillenv/
│ ├── __init__.py
│ ├── __main__.py
│ ├── cli.py # entrypoint and command handling
│ ├── constants.py # shared constants
│ ├── parser.py # parse template into variables and prompts
│ ├── prompt.py # interactive prompting utilities
│ └── serialize.py # serialize variables to KEY=value lines
└── tests/...
Releasing
Update the version in pyproject.toml.
Create a build and upload to PyPI:
# Build (requires uv)
uv build
# Upload (requires twine and a configured token)
twine upload dist/*
Issues and releases:
- Issues: https://github.com/elmernocon/fillenv/issues
- Releases/Changelog: https://github.com/elmernocon/fillenv/releases
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fillenv-1.0.0.tar.gz.
File metadata
- Download URL: fillenv-1.0.0.tar.gz
- Upload date:
- Size: 48.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1e465e960140ac5a11aeb7ef327f05df2f2d93e154c3a1aade9309c614fbd4e
|
|
| MD5 |
6a705c56aa237c2d53d98a939d3deb97
|
|
| BLAKE2b-256 |
99730539bc9d78b7f327eaf6383488179c92cbe1be85ac18e971fd87ab0102d4
|
Provenance
The following attestation bundles were made for fillenv-1.0.0.tar.gz:
Publisher:
pypi.yml on elmernocon/fillenv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fillenv-1.0.0.tar.gz -
Subject digest:
c1e465e960140ac5a11aeb7ef327f05df2f2d93e154c3a1aade9309c614fbd4e - Sigstore transparency entry: 661158669
- Sigstore integration time:
-
Permalink:
elmernocon/fillenv@9d05feaa02d996e91021f718fac16b0078a882d7 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/elmernocon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@9d05feaa02d996e91021f718fac16b0078a882d7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file fillenv-1.0.0-py3-none-any.whl.
File metadata
- Download URL: fillenv-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e57cd7113e6c91afae9df531b73da7245de7c4c3ea5f22e4f2a1293472d54c16
|
|
| MD5 |
a1aaef015a3e572b1637f04b0fd53016
|
|
| BLAKE2b-256 |
95e297aca7938c00520587b54e36af613ec8db80e6bf0fe07f7c9c16d987679c
|
Provenance
The following attestation bundles were made for fillenv-1.0.0-py3-none-any.whl:
Publisher:
pypi.yml on elmernocon/fillenv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fillenv-1.0.0-py3-none-any.whl -
Subject digest:
e57cd7113e6c91afae9df531b73da7245de7c4c3ea5f22e4f2a1293472d54c16 - Sigstore transparency entry: 661158672
- Sigstore integration time:
-
Permalink:
elmernocon/fillenv@9d05feaa02d996e91021f718fac16b0078a882d7 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/elmernocon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@9d05feaa02d996e91021f718fac16b0078a882d7 -
Trigger Event:
release
-
Statement type: