Skip to content

bsweger/pyprefab

Repository files navigation

pyprefab

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.

pyprefab demo

The scaffolding includes:

  • package files in the src layout format
  • pyproject.toml with dependency groups
  • CHANGELOG.md, CONTRIBUTING.md, .gitignore, and README.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

Quickstart

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

Project setup

See CONTRIBUTING.MD for information on setting up a local development environment for pyprefab.

About

Simple CLI for Python project scaffolding

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •