Skip to content

daxartio/python-project-template

Repository files navigation

Python Project Template

Features

  • MIT/Apache License
  • Makefile
  • Poetry (python packaging and dependency management made easy)
  • Formatting
    • ruff
    • isort
    • black
  • Linters
    • ruff
    • black
    • mypy
  • Pytest
  • Documentation with mkdocs
  • Github Actions
    • Github pages
    • Publish to pypi
    • Run tests and linters
    • Bump a version
    • Check a PR title
  • CLI

Quickstart

Install the latest Cookiecutter

pip install -U cookiecutter

Generate a Python project:

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

Then:

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