Skip to content

tekumara/python-typed-template

Repository files navigation

Python typed template 🐍

Build

A minimal, generic, and opinionated template for typed ✨ python projects that includes:

Type hints are enforced. Uses a flat layout, ie: packages are defined at the top level. Naming conventions are as per PEP8, see Template parameters below. And not much else. This is meant to be generic, so anything specific to only a subset of projects probably lives elsewhere.

For more info see DESIGN.md.

Project development prerequisites

Projects created using this template have development prerequisites.

Template parameters

The template will ask for the following:

  • repo_name: The name of your repo. Repo names are lowered kebab-case, so hyphens rather than underscores, to be kind to humans.
  • package_name: The name of your main python package. A python package is a group of modules, ie: a directory with __init__.py file. Choose a short all-lowercase name without hyphens. The use of underscores is discouraged (see PEP8).
  • project_name: The name of the artifact when your project is built as a wheel. Project names are lowered kebab-case. In most cases the package name and project name will be the same. This is used in pyproject.toml and needed even if you aren't building a wheel.
  • description: a one line description of your project.

Getting started

cruft is recommended for creating projects.

To create a project, aka bake a cookie 🍪, using uv and cruft:

uvx cruft git@github.com:tekumara/python-typed-template.git
# replace repo-name below with the name you specified during template creation
cd repo-name
git init && git commit -m 'root commit' --allow-empty
make install

Contributing 🌱

Please do! See CONTRIBUTING.md

About

A minimal, generic, and opinionated template for typed ✨ python projects

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5