Skip to content

πŸͺ🐍 A cookiecutter package to bootstrap python packages

License

Notifications You must be signed in to change notification settings

MaastrichtU-IDS/cookiecutter-python-package

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

45 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸͺ🐍 Cookiecutter for modern Python packages

A cookiecutter template for making new Python package repositories using modern tools for developments.

Tired of needing to install and configure 42 different packages for linting? Tired of having 15 config files at the root of the repository? With this template all configurations are stored in the pyproject.toml using the new standard project metadata, and ruff is used to perform a super-fast linting.

We use hatch for the overall project management and build backend. Hatch is a bit like poetry, it helps to tie together your python project and easily run scripts in virtual environments. But it is the solution supported by PyPA (the Python Packaging Authority), and relies on existing well established packages under the hood (like pip and venv), instead of re-implementing everything.

πŸ› οΈ Getting Started

  1. Install cookiecutter with:
pipx install cookiecutter
  1. Run cookiecutter with:
cookiecutter https://github.com/MaastrichtU-IDS/cookiecutter-python-package
  1. Enter the requested information, remember, package names should only have letters, numbers, and dashes.

  2. If you're working under version control, copy the repository into your folder tracked under git, commit the files, and push to your remote.

πŸ’ͺ Features

Your new python package will have the following:

  • Standard src/ layout
  • Declarative setup with pyproject.toml
  • Super fast linting and formatting with ruff and black
  • Reproducible tests with pytest
  • A command line interface with typer
  • Documentation build with mkdocs
  • A py.typed file so other packages can use your type hints
  • Automated running of tests on each push with GitHub Actions
  • A good and readable base .gitignore for python projects
  • A pre-formatted README with badges
  • A pre-formatted LICENSE file with the MIT License (you can change this to whatever you want, though)
  • A pre-formatted CONTRIBUTING guide
  • A pre-formatted CITATION.cff file

If you're looking for something similar but not quite like this see this list of alternatives templates.

About

πŸͺ🐍 A cookiecutter package to bootstrap python packages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published