๐ Pattern - Modern Python Cookiecutter Project
Pattern is a modern, opinionated, cookiecutter template for your next Python project. Included is modern tooling and dependencies with sensible rules and settings. Also included is all the boilerplate documentation, GitHub actions, and project extras you would need to create good foundation for your next python project.
Setup New Project
Note
Make sure you have UV installed before you start.
Create new project:
uvx cookiecutter gh:wyattferguson/pattern
Alternatively you can use Cruft:
uvx cruft create gh:wyattferguson/pattern
Then just follow the prompts, pick the tools you want to install, and watch the magic happen.
Features
Everything comes preconfigured to work out of the box. On setup you can pick and choose what extras to install or to leave behind.
- ๐ฆ UV - Package and project manager
- ๐ฆ Ruff - Linter and code formatter.
- ๐ Typechecking with Ty or Mypy.
- ๐งช Pytest - Testing
- ๐ญ Coverage - Test coverage.
- ๐ญ Nox - Testing in multiple Python environments.
- ๐ต Taskipy - Task runner for CLI shortcuts.
- ๐ผ Portray - Doc generation and Github Pages deployment.
- ๐ก PyPI package publishing.
- ๐น GitHub Templates for documentation, feature requests, general reports, bug reports, and pull requests.
- ๐ต Pre-commit - Linting, formatting, and common bug checks on Git commits.
- ๐ฉ Changelog, Code of Conduct, and Contributing Guide templates.
- ๐ Docker support including extensive dockerignore file.
- ๐ธ VSCode - Settings and extension integrations.
- ๐ค Dependabot - Dependency scanning for new versions and security alerts.
- ๐งโโ๏ธ Semantic Pull Requests - Enforce pull request titles
- ๐ Cruft Support - Automatic template updates and validation.
Contributing
Contributions or suggestions are more then welcome! If you'd like to enhance to this project, please submit a pull request. For major changes, please open an issue first to discuss what you would like to change.
Alternative Cookiecutter Projects
If this cookiecutter isn't your cup of tea, you might like one of these alternatives.
- Fpgmaas cookiecutter-uv - fpgmaas version of a cookiecutter using UV.
- Bosd uv-hypermodern-python - bosd version of a cookiecutter uv project with github deployments.
- Cookiecutter pypackage - Cookiecutter template for a Python package.
- Neuroinformatics cookiecutter - Utility to create a basic Python project structure with tests, CI etc.
Contact + Support
Created by Wyatt Ferguson
For any questions or comments heres how you can reach me:
Follow me on Github @wyattferguson
Email me at wyattxdev@duck.com
Follow on BlueSky @wyattf