This Cookiecutter template provides a standardized structure for creating Python packages. It's designed to streamline the initial setup process and promote best practices for package development.
- Standard repo structure
- Documentation with mkdocs with Material theme
- Test with pytest
- Coverage control with pytest-cov
- CI/CD with Github Workflows, includes default actions for building, testing, publishing the package.
- CLI example with Typer
- Code quality checks with Pre-commit
Optional dev tools:
- Code Formatting with Black formatter
- Dependencies and import cleaning with isort
The template supports Python 3.12.
- Python 3.12 or higher
- Cookiecutter
-
Install Cookiecutter if you haven't already:
pip install cookiecutter
-
Generate a new Python package project using this template:
cookiecutter gh:LouisStefanuto/cookiecutter-python
- Replace your_username with your GitHub username.
- Follow the prompts to provide information about your package, such as its name, description, author, etc.
- After filling out the prompts, the template will generate a new directory with your package files based on the provided information.
- Navigate to the generated directory and start developing your Python package!
If you encounter any issues with the template or have suggestions for improvements, feel free to open an issue or submit a pull request on the GitHub repository.