A template-driven command line interface (CLI) that creates the scaffolding for a fully-functional, modern Python package. The goal of pyprefab is to get you straight to writing application code by handling project startup tasks like logging setup and creating a test harness.
The scaffolding includes:
- package files in the src layout format
pyproject.toml
with dependency groupsCHANGELOG.md
,CONTRIBUTING.md
,.gitignore
, andREADME.md
- automated package versioning with setuptools-scm
- structlog-based pre-configured logging
- a pytest-based test harness
- a pre-commit configuration with common plugins like ruff for linting (optional)
- GitHub workflow that automatically runs code checks, tests, and a test coverage report
- GitHub workflow for publishing the package to PyPI
If you have uv
installed,
uv tool run
is the
fastest way to create a new Python package with pyprefab:
uvx pyprefab
Otherwise, use pip
or pipx
to install pyprefab:
python -m pip install pyprefab
python -m pyprefab
See CONTRIBUTING.MD for information on setting up a local development environment for pyprefab.