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

# Uses same write behavior (.env, or .env1, .env2, ...)
uv run python -m fillenv

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-0.1.0.tar.gz (37.9 kB view details)

Uploaded Source

Built Distribution

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

fillenv-0.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file fillenv-0.1.0.tar.gz.

File metadata

  • Download URL: fillenv-0.1.0.tar.gz
  • Upload date:
  • Size: 37.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fillenv-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8b863e53d06d82338c0f203c5367202586d5246f52fd919cb39608dd3b805aea
MD5 661e40d10c3e3594db955b43997a4590
BLAKE2b-256 73a4db21a57d564f31ff8d5ed3bf7a60c7fe4abc0b8e03cb21d8c5d21ff09d7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for fillenv-0.1.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-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fillenv-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fillenv-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 94d2e0c118ecf9aae57c16f96dd85d7ea9515ea9b29d3626c406601b94b0497b
MD5 6406a4fa3c4d5b34fb7275999b27d41f
BLAKE2b-256 29f9d4585589909271a42791244159c74901c9bfb47cc319ae976f8f28280779

See more details on using hashes here.

Provenance

The following attestation bundles were made for fillenv-0.1.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