The pages here are intended for developers who are making or maintaining a package and want to follow modern best practices in Python.
New developers are encouraged to read the following pages. Veteran developers
should still check out the tutorials, as it has a guide on recommendations
for your CONTRIBUTING.md, and at least glance through other sections.
Following that, there are recommendations for style, intended to promote
good practices and to ensure continuity across the packages. There is a
dedicated page for static type checking with MyPy. There is then a guide
on simple packaging, compiled packaging, or even classic packaging,
which should help in ensuring a consistent developer and user experience when
working with distribution. The uv guide covers setting up a Python
environment and performing common development tasks in an existing project using
uv.
A section on CI follows, with a general setup guide, and then two choices for using CI to distribute your package, one for pure Python, and one for compiled extensions. You can read about setting up good tests on the pytest page, with coverage. There’s also a page on setting up docs, as well as a page on security best practices.