Skip to main content

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:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fillenv-1.0.0.tar.gz (48.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fillenv-1.0.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

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

Hashes for fillenv-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c1e465e960140ac5a11aeb7ef327f05df2f2d93e154c3a1aade9309c614fbd4e
MD5 6a705c56aa237c2d53d98a939d3deb97
BLAKE2b-256 99730539bc9d78b7f327eaf6383488179c92cbe1be85ac18e971fd87ab0102d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for fillenv-1.0.0.tar.gz:

Publisher: pypi.yml on elmernocon/fillenv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for fillenv-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e57cd7113e6c91afae9df531b73da7245de7c4c3ea5f22e4f2a1293472d54c16
MD5 a1aaef015a3e572b1637f04b0fd53016
BLAKE2b-256 95e297aca7938c00520587b54e36af613ec8db80e6bf0fe07f7c9c16d987679c

See more details on using hashes here.

Provenance

The following attestation bundles were made for fillenv-1.0.0-py3-none-any.whl:

Publisher: pypi.yml on elmernocon/fillenv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page