https://github.com/mbeacom/python-template
This project is an opinionated python template
https://github.com/mbeacom/python-template
cli example-project examples poetry python python-3-11 python-3-12 python-3-13 python3 template templates typer
Last synced: 5 days ago
JSON representation
This project is an opinionated python template
- Host: GitHub
- URL: https://github.com/mbeacom/python-template
- Owner: mbeacom
- License: mit
- Created: 2023-07-04T01:15:53.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-24T19:34:44.000Z (9 months ago)
- Last Synced: 2025-04-24T20:36:52.416Z (9 months ago)
- Topics: cli, example-project, examples, poetry, python, python-3-11, python-3-12, python-3-13, python3, template, templates, typer
- Language: Python
- Homepage: https://mbeacom.github.io/python-template/
- Size: 606 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# python-template
[](https://github.com/mbeacom/python-template/actions/workflows/validate.yaml)
[](https://github.com/mbeacom/python-template/actions/workflows/pre-commit.yaml)
[](https://codecov.io/github/mbeacom/python-template?branch=main)
[](https://pypi.org/project/python-template-x/)
[](https://github.com/mbeacom/python-template/actions/workflows/github-code-scanning/codeql)
[](https://securityscorecards.dev/viewer/?uri=github.com/mbeacom/python-template)
This project is an opinionated python template.
## Usage
This project uses:
- [poetry](https://python-poetry.org/) for dependency management and packaging.
- [poethepoet](https://poethepoet.natn.io/) for task running.
- [pytest](https://docs.pytest.org/en/stable/) for testing.
- [black](https://black.readthedocs.io/en/stable/) for auto-formatting.
- [mypy](https://mypy.readthedocs.io/en/stable/) for static type checking.
- [pre-commit](https://pre-commit.com/) for git hooks.
- [ruff](https://beta.ruff.rs/docs/) for linting.
- [mkdocs](https://www.mkdocs.org/) for documentation.
Ensure you have installed the relevant dependencies before continuing.
### Install dependencies
```bash
poetry install
```
### Run tests
```bash
poetry run poe test
```
## GitHub Actions Setup
### Validation Workflow
#### CodeCov.io
The workflow is automatically setup to pass along coverage reports to CodeCov.io.
You must set the `CODECOV_TOKEN` secret in your repository settings.
Otherwise, disable the routine in the `.github/workflows/validate.yaml` file.
### Publishing Workflow
Ensure you have Discussions enabled in your repository settings,
or remove `discussion_category_name` from the `.github/workflows/publish.yaml` file.
#### PyPi
The workflow is automatically setup to publish to PyPi.
You must set the `POETRY_PYPI_TOKEN_PYPI` secret in your repository settings.
Otherwise, disable the routine in the `.github/workflows/publish.yaml` file.