Skip to content

veit/cookiecutter-namespace-template

Repository files navigation

Cookiecutter Namespace Template

Cookiecutter Namespace Template for a Python package.

Downloads Versions Contributors License pre-commit.ci status Docs

Features

  • Testing setup with unittest or pytest

  • Tox testing: Setup to easily test for Python 3.9, 3.10, 3.11, 3.12, 3.13, and pypy.

  • Sphinx docs: Documentation ready for generation with, for example, ReadTheDocs

  • Bump My Version: Pre-configured version bumping with a single command

  • If the cookiecutter-namespace-template project template has been changed, you can apply these changes with

    $ cruft update
  • Optional auto-release to PyPI when you push a new tag to main (optional)

  • Optional command line interface using Typer or Click

Quickstart

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

    $ python -m pip install -U cruft
  2. Generate a Python package project:

    $ python -m cruft create https:/veit/cookiecutter-namespace-template.git
  3. Create a repo and put it there.

  4. Register your project with PyPI.

  5. Add the repo to your ReadTheDocs account and turn on the ReadTheDocs service hook.

  6. Release your package by pushing a new tag to main.

Pull requests

If you have differences in your preferred setup, I encourage you to fork this to create your own version. I also accept pull requests on this, if they’re small, atomic, and if they make my own packaging experience better.