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.1.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-0.1.1-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fillenv-0.1.1.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-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a46ca2d9a3f9741158178749f4c5616a90841c897d681be62f7bcc447f783277
MD5 6ea8c7d2c224a5bfc6872a128683e7a8
BLAKE2b-256 fd439c58748d82ca06417477299a48b4b3a311b1bec2a8b2d6fd648146690acb

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: fillenv-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 429cd3ecd77688b819421fbccb86cd73045516773877de25e53ce9dae4d56d0c
MD5 f5054425c6ae648a01dedc93560ae581
BLAKE2b-256 9b09533df402aedfda24a1cdbf8d99d11c8e91df8d27539789cf4cfc0cf68306

See more details on using hashes here.

Provenance

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