Python package template with the modern toml-based style.
- Modern
pyproject.toml
-based configuration- Dynamic versioning with
setuptools_scm
- Typing support with
py.typed
- Dynamic versioning with
- Testing with
nox
/pytest
- Cross-platform CI integrations
- Coverage measurement with
pytest-cov
- Various linters
ruff
for linting, formatting, and import sortingmypy
/pyright
for static type checking
- Documentation with
sphinx
- Building with CI
git clone https://github.com/todo-group/pypkg_template.git
cd pypkg_template
pip install pip -U
pip install -e .[dev]
git clone https://github.com/todo-group/pypkg_template.git
cd pypkg_template
pip install pip -U
pip install pipenv
pipenv install --dev
pipenv shell
# Run all linters
pre-commit run -a
# Run unit tests in an isolated venv
nox
Documentation is automatically deployed on push: see https://todo-group.github.io/pypkg_template/.
# Build docs and output to `docs/build`
sphinx-build docs/source docs/build
# Build sdist/wheel and output to `dist`
python3 -m build