Cookiecutter template for modern Python packages.
- GitHub repository: https://github.com/leodevian/cookiecutter-pypackage
- Documentation: https://github.com/leodevian/cookiecutter-pypackage/tree/main/docs
- License: MIT
- License choice
- Testing setup with pytest
- Code coverage endorsed by Codecov
- Automated testing with tox
- Type checking with mypy
- Git hooks setup with pre-commit
- Prevent large files from being committed with check-added-large-files
- Check for files with names that would conflict on a case-insensitive filesystem with check-case-conflict
- Check for files that contain merge conflict strings with check-merge-conflict
- Check for symlinks which do not point to anything with check-symlinks
- Replace or check mixed line ending with mixed-line-ending
- Verify syntax for TOML files with check-toml
- Verify syntax for YAML files with check-yaml
- Make sure files end in a newline and only a newline with end-of-file-fixer
- Trim trailing whitespaces with trailing-whitespace
- Lint with the Ruff linter
- Format code with the Ruff formatter
- Run Black on Python code blocks in documentation with blacken-docs
- Type check with mypy
- Fix common misspellings with codespell
- Check for missing docstrings with interrogate
- Ready for generation documentation with MkDocs
and Material for MkDocs
- Automatic documentation from sources with mkdocstrings
- Changelog based on Keep a Changelog with towncrier
- Semantic versioning with bump-my-version
- Creation of an empty Git repository (optional)
- Creation of a development environment with uv (optional)
- Installation of pre-commit hooks (optional)
Run the following command to generate your Python package.
uvx cookiecutter https://github.com/leodevian/cookiecutter-pypackage.git