Cookiecutter PyPackage


Cookiecutter template for a Python package, forked from briggySmalls/cookiecutter-pypackage.


This template focus following:

  • Target Python version: 3.5 - 3.9
  • Dependency tracking using Pipenv
  • Linting provided by both pylint, flake8, mypy [executed by GitHub Actions]
  • Formatting provided by isort, pipenv-setup, black [checked by GitHub Actions]
  • Analizing complexity and maintainability provided by radon, xenon [checked by GitHub Actions]
  • All development tasks (lint, format, analize, test, etc) excluding deployment wrapped up in a python CLI by invoke
  • Omit documentation workflows since this project targets early stages of development. In the early stages of development it is better to focus on providing working software and writing than providing comprehensive documentation.

    @see Manifesto for Agile Software Development



Install the latest Cookiecutter if you haven't installed it yet (this requires Cookiecutter 1.4.0 or higher):

pip install -U cookiecutter


Generate a Python package project:

cookiecutter --checkout master-yukihiko-shinoda

Then, you will interactively prompt some choices of templated values, for detail of templated values, see the Prompts.

Then initialized project direcotry is created in current directory.

Points to review after creating initialized project directory

1. Review support range if the one of your package is not Python 3.5 - 3.9

  • .github/workflows/test.yml
    • python_requires
    • classifiers
  • docs/ -> Get Started! -> 5. oldest Python version


Pin wheel version in Pipfle and execute pipenv lock if you prefer stability of deployment task.

Remaining task after creating initialized project directory


Commit and push to GitHub repository.


Activate your created repository on Code Climate.

If you prefer, Enable [Pull request comments] and [Pull request status updates] from [Repo Settings] -> [GitHub]

Copy and paste badge from [Repo Settings] -> [Badges] to this README file.


Copy "TEST REPORTER ID" from [Test Coverages]


register copied TEST REPORTER ID into secret in your pushed GitHub repository as name "CC_TEST_REPORTER_ID".


Activate your created repository on

Create a new account at or log into your existing account.

Click on the green Add Repo button in the top left corner and select repository you created in Step 1. A popup will ask you whether you want to pin your dependencies. Click on Pin to add the repo.

Once your repo is set up correctly, the badge will show your current update status.


Issue API token at PyPI and register into secret of your GitHub repository as name pypi_password


Create tag v[0-9]+.[0-9]+.[0-9]+ and push to GitHub repository to deploy into PyPI.

Then, get your code on! 😎 Add your package dependencies to your pipenv with pipenv install.