juftin's personal cookiecutter template for Python projects.
cookiecutter gh:juftin/cookiecutter-python- hatch for managing the project's virtual environment and development tools
- ruff for code formatting and linting
- mypy for type checking
- pip-tools for dependency management + lockfile
- pre-commit for managing git hooks
- GitHub Actions for CI/CD
- MkDocs and mkdocs-material for documentation
- GitHub Pages for hosting documentation
- semantic-release and gitmoji for automated releases
- Publishes to PyPI and Docker Hub
Install cookiecutter:
pipx install cookiecutterpipx is preferred, but you can also install with pip install --user.
Generate a Python project:
cookiecutter gh:juftin/cookiecutter-pythonChange to the root directory of your new project, create a Git repository, and install pre-commit
git init
pre-commit install
git add .
pre-commit run --all-files
git add .
git commitThis project uses GitHub Actions to deploy releases, documentation, and to publish artifacts to PyPI / Docker Hub. You will need to create secrets in your GitHub repository to enable these features.
PERSONAL_ACCESS_TOKEN: A GitHub Personal Access Token withrepopermissionsPYPI_TOKEN: Your PyPI token (optional)DOCKER_USERNAME: Your Docker Hub username (optional)DOCKER_TOKEN: Your Docker Hub token (optional)
This project generates its own documentation for how to use the project's tools. To view the documentation locally, run:
hatch run docs:serveOnce the server is running, you can view the documentation at localhost:8080/contributing or see a preview at juftin.com/cookiecutter-python/contributing.
