Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/daxartio/python-project-template

A template Python project with a focus on best practices
https://github.com/daxartio/python-project-template

cookiecutter cookiecutter-template mkdocs pyo3 python python-template template

Last synced: 2 months ago
JSON representation

A template Python project with a focus on best practices

Awesome Lists containing this project

README

        

# Python Project Template

## Features

- [x] MIT/Apache License
- [x] Makefile
- [x] [Poetry](https://python-poetry.org/) (python packaging and dependency management made easy)
- [x] Formatting
- [x] ruff
- [x] isort
- [x] black
- [x] Linters
- [x] ruff
- [x] black
- [x] mypy
- [x] Pytest
- [x] Documentation with [mkdocs](https://www.mkdocs.org/)
- [x] Github Actions
- [x] Github pages
- [x] Publish to pypi
- [x] Run tests and linters
- [x] Bump a version
- [x] Check a PR title
- [ ] CLI
- [x] [argparse](https://docs.python.org/3/howto/argparse.html)
- [ ] [typer](https://typer.tiangolo.com)

## Quickstart

Install the latest Cookiecutter

```
pip install -U cookiecutter
```

Generate a Python project:

```
cookiecutter https://github.com/daxartio/python-project-template.git
```

Then:

```bash
cd ./your-project

make install
make format lint test
```

1. Generate an API token, see https://pypi.org/help/
2. Add the token to https://github.com/username/your-project/settings/secrets/actions
- PYPI_USERNAME `__token__`
- PYPI_PASSWORD `pypi-...`
3. Workflow permissions https://github.com/username/your-project/settings/actions
1. Set "Read and write permissions" to true