Skip to content

Setup of py-template

TLDR: same as, but needs GitHub Actions Secrets set on a repo/organization level and poetry + pre-commit setup.

WARNING: use repository name which is ABSENT from or package index of your choosing (unless you want to release privately, then see here).

Initial Setup

  • Click green button Use this template
  • Name your repository, but remember to use NAME ABSENT in and use snake_case for a name!
  • Enable gh-pages branch on / to have your documentation hosted (see here)
  • Enable hosted renovatebot, see here
  • Create poetry environment (make sure you have it installed, see here for more info)
  • Enable pre-commit hooks locally

Last two steps can also be quickly wrapped in a single function usable from your shell, see here for more information

Setup Credentials for Semantic Release to PyPI

If you don't want to release your package, you don't have to perform this step!

Please add to your repository's Encrypted Secrets the following:

  • PYPI_NAME - any name of package index, e.g. pypi or test-pypi
  • PYPI_URL - url to hosting:

  • - for test-pypi

  • - for pypi

  • PYPI_TOKEN - account-wide token allowing for package creation

Additionally for

To upload to package registry one has to manually add:

poetry config http-basic.dialogue ${{ secrets.PYPI_TOKEN }} ${{ secrets.PYPI_TOKEN }}

as the first command in Deploy to registry here .