Skip to content

A modern cookiecutter template for creation of a Python package following best practices.

License

Notifications You must be signed in to change notification settings

tsantor/cookiecutter-pyproject

Repository files navigation

Cookiecutter PyProject

A modern cookiecutter template for creation of a Python package following best practices.

Features

The resulting generated Python package features:

  • pyproject.toml
  • ruff for formatting/linting
  • pytest and coverage for running tests
  • pre-commit to enforce formatting/linting before committing
  • click (optional if making a CLI app)
  • sentry-sdk for error reporting (optional)
  • twine for publishing to PyPI
  • Makefile with common development related commands
  • 100% test coverage
  • Passes ruff check linting

Quickstart

Install Cookiecutter, if you don't already have it:

python3 -m pip install -U cookiecutter

Generate a Python package:

cookiecutter https://github.com/tsantor/cookiecutter-pyproject.git

Development

make env
make pytest

Run make to view a list of available commands with descriptions.

Not Exactly What You Want?

This is what I want. It might not be what you want. If you have differences in your preferred setup, I encourage you to fork this to create your own version.

About

A modern cookiecutter template for creation of a Python package following best practices.

Resources

License

Stars

Watchers

Forks

Packages

No packages published