A Cookiecutter template for Python packages with CI/CD, semantic versioning, and standard tooling.
pyproject.tomlconfiguration- GitHub Actions CI/CD workflows
- Semantic versioning with conventional commits
- Code quality: ruff, mypy, pre-commit
- Testing: pytest
- Documentation structure
Install Cookiecutter:
# Using pip
pip install cookiecutter
# Using uv
uv add cookiecutterGenerate a new project:
cookiecutter https://github.com/adilsaid64/py-templateYou'll be prompted for:
- Project name: The name of your project
- Package name: Python package name (auto-generated)
- Author name: Your name
- Author email: Your email address
- GitHub username: Your GitHub username
- Project description: Brief description
- Python version: Minimum Python version (default: 3.9)
- License: License type (default: Apache-2.0)
- Navigate to your project directory
- Initialise Git:
git init - Add remote:
git remote add origin https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.project_name.lower().replace(' ', '-') }}.git - Install dependencies:
uv pip install -e ".[dev]" - Install pre-commit hooks:
pre-commit install
{{cookiecutter.project_name}}/
├── src/
│ └── {{cookiecutter.package_name}}/
│ ├── __init__.py
│ └── main.py
├── examples/
│ └── quickstart.py
├── pyproject.toml
├── README.md
├── CONTRIBUTING.md
├── CHANGELOG.md
├── LICENSE
├── MANIFEST.in
└── .releaserc.json
See CONTRIBUTING.md for guidelines.
Apache-2.0 License.