Skip to content

Pitrified/python-project-template

Repository files navigation

Python project template

Set up a new Python project.

Follow the instructions in the meta README to set up a new project.

Happy coding!

IDEAs

Fancier automation with github actions (eg):

Support codecov.

Support documentation with sphinx or mkdocs.

Automatic dependency updates with uv-bump.

Expose a minimal FastAPI app.

Expose a minimal CLI app with Typer.

Convert the whole thing to a Copier template.

Town crier integration.

Release management with semantic versioning.

Move the entire package in a template subfolder. That is the real package that will be copied and renamed. Only leave renamer related things here. Maybe some ruff/precommit configs can be shared. The internal package can be installed by going in the template folder and treating it as a separate folder.

TODOs

Write a script to initialize the project (renamer)

  • Remove dependencies from the pyproject.toml file.
  • Automagically generate the optional dependencies list, by parsing the pyproject.toml file. The dependencies are the same as the ones in the pyproject.toml file, but by running uv add again the versions are updated.

pyproject.toml structure

  • Split dev dependencies into groups
    • lint
    • test
    • doc (?? we don't have any doc specific deps yet)
    • ci (?? we don't have any ci specific deps yet)
  • Add optional dependencies (extra sections)
    • some optional feature
    • full (all optional dependencies)

Detect secret

  • add info on how to keep it updated
  • add info on how to set it up
  • add info on how to handle false positives

Check that proj name is valid python package name

  • add check in renamer script
    • check for invalid characters (eg -, spaces, etc)
  • add info in readme

Get names from CLI

  • get project name from CLI arguments

About

Template for a new python project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages