PyScaffold bootstraps new Python packages via the putup command, wiring setuptools, Git versioning, tests, and docs from a maintained template.
Overview
PyScaffold is a command-line project generator for creating Python packages structured for distribution on PyPI and installation with pip. Running putup with a project name creates a ready-made tree with packaging metadata, source layout, and common tooling hooks.
Generated projects configure most packaging details in setup.cfg, use setuptools-scm to derive versions from Git tags, and initialize a Git repository with an appropriate ignore file. Documentation scaffolding targets Sphinx, with optional Read the Docs compatibility and Numpy or Google docstring styles enabled by default.
Testing defaults rely on pytest and pytest-cov, often orchestrated through tox for isolated environments. Optional flags add pre-commit hooks, Cirrus CI templates, license selection from choosealicense.com, and integrations such as Django, Markdown readmes, or data-science layouts through separate extension packages.
Existing repositories can be converted or updated with putup --update without rewriting Git history. Extensions install as pyscaffoldext-* packages and extend the generator for GitLab, Travis, Cookiecutter, and custom workflows.
Key features
- putup project scaffolding
- setup.cfg-centered packaging
- Git tag versioning via setuptools-scm
- pytest and tox test layout
- Sphinx documentation starter
- pre-commit optional integration
- License flag from choosealicense
- Extensions for Django and Markdown
Use cases
- Starting a new PyPI-bound library
- Standardizing team package layout
- Migrating legacy projects to scaffold
- Open-source releases with docs and CI
- Django apps with scaffold extras