Awesome pyproject.toml
pyproject.toml
is a new configuration file defined in
PEP 518, expanded in
PEP 621 and
PEP 660. It is design to store
build system requirements, but it can also store any tool configuration for your
Python project, possibly replacing the need for setup.cfg
or other
tool-specific files.
- PEP 518 -- File specification.
- PEP 621 -- Storing project metadata in pyproject.toml
- PEP 660 -- Editable installs for pyproject.toml based builds (wheel based)
We think pyproject.toml
is pretty awesome, so this
awesome list contains projects already
using it, or discussing its inclusion.
Do you know of any other project not included here? Please submit a PR!
Contents
- Testing
- Code Formatting
- Code Analysis
- Packaging & Project Management
- Project Templates
- Other Tools
- Articles
- Open PEPs
- Projects discussing the use of pyproject.toml
Testing
- Coverage.py - Code coverage measurement for Python.
- ptr - Python Test Runner (ptr) was born to run tests in an opinionated way, within arbitrary code repositories.
- pytest - A testing framework that makes it easy to write small tests, yet scales to support complex functional testing.
- pytest-env - A pytest plugin that enables you to set environment variables in a pyproject.toml file.
- Tox - A generic virtualenv manager to run test in different environments.
- Ward - A modern Python test framework designed to help you find and fix flaws faster.
Code Formatting
- autoflake - Removes unused imports and unused variables as reported by pyflakes.
- autoimport - Automatically add missing imports and remove unused imports.
- autopep8 - A tool that automatically formats Python code to conform to the PEP 8 style guide.
- Black - The uncompromising Python code formatter.
- Blue - The slightly less uncompromising Python code formatter.
- Darker - Apply black reformatting to Python files only in regions changed since a given commit.
- flake8-isort - flake8 plugin that integrates isort.
- isort - A Python utility / library to sort imports alphabetically, and automatically separated into sections.
- pyproject-fmt - Apply a consistent format to your pyproject.toml file with comment support.
- YAPF - A formatter for Python files.
Code Analysis
- Bandit - A tool designed to find common security issues in Python code.
- deptry - A command line tool to check for issues with dependencies in a Python project, such as obsolete or missing dependencies.
- FlakeHell - Flake8 wrapper to make it nice, legacy-friendly, configurable.
- flake8-pyproject - Plugin for Flake8 that reads configuration from pyproject.toml and injects the config into Flake8
- import-linter - Import Linter defines and enforces rules for the imports within and between Python packages.
- interrogate - Interrogate a codebase for docstring coverage.
- Mypy - An optional static type checker for Python (PEP 484).
- Nitpick - Flake8 plugin to enforce the same tool configuration (flake8, isort, mypy, Pylint...) across multiple Python projects.
- pydocstyle - A static analysis tool for checking compliance with Python docstring conventions.
- Pylint - A tool that checks for errors in Python code, tries to enforce a coding standard and looks for code smells.
- Pyright - Static type checker for Python.
- pytest-pylint - A pytest plugin for running pylint against your codebase.
- Refurb - A tool for refurbishing and modernizing Python codebases.
- Robocop - Tool for static code analysis of Robot Framework language.
- Ruff - An extremely fast Python linter, written in Rust.
- Unimport - Detects unused python libraries.
- validate-pyproject - A command line tool and Python library for validating pyproject.toml files based on JSON Schema, and includes checks for PEP 517, PEP 518 and PEP 621.
- Vulture - Finds unused code in Python programs.
- wemake-python-styleguide - The strictest and most opinionated python linter ever!
Packaging & Project Management
- BeeWare Briefcase - Tools to support converting a Python project into a standalone native application.
- check-wheel-contents - Check your wheels have the right contents.
- DepHell - Project management for Python. Manage packages: convert between formats, lock, install, resolve, isolate, test, build graph, show outdated, audit. Manage venvs, build package, bump version.
- Flit - A simple way to put Python packages and modules on PyPI.
- Hatch - Modern, extensible Python project manager.
- Maturin - Build and publish crates with pyo3, rust-cpython and cffi bindings as well as rust binaries as python packages.
- PDM - A modern Python package manager with PEP 582 support.
- pip - The package installer for Python. You can use pip to install packages from the Python Package Index and other indexes.
- Poetry - A tool for dependency management and packaging in Python. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.
- Pyflow - An installation and dependency system for Python.
- setuptools - Easily download, build, install, upgrade, and uninstall Python packages.
- setuptools_scm - Handles managing your Python package versions in SCM metadata instead of declaring them as the version argument or in a SCM managed file.
Project Templates
Python project templates or project generators supporting pyproject.toml
.
- cookiecutter-poetry - A modern cookiecutter template for Python projects that use Poetry for their dependency management.
- cookiecutter-pylibrary - Cookiecutter template for a Python python library.
- Hypermodern Cookiecutter - Cookiecutter template for a Python package based on the Hypermodern Python article series.
- Jace's Python Template - A template for new Python libraries.
- Poetry Cookiecutter - A modern Cookiecutter template for scaffolding Python packages and apps.
- PyPA Sample Project - A sample project that exists for PyPUG's "Tutorial on Packaging and Distributing Projects".
- PyScaffold - Python project template generator with batteries included.
- Python Packages Project Generator - Cookiecutter template with state-of-the-art libraries and best development practices for Python.
- Tyrannosaurus - An opinionated, 2021+ Python template and project generator with many integrations and an automated CI/CD workflow triggered only through Git and GitHub.
- wemake-django-template - Bleeding edge django template focused on code quality and security.
- wemake-python-package - Bleeding edge cookiecutter template to create new python packages.
Other Tools
- Autohooks - Library for managing git hooks.
- Commitizen - Create commiting rules for projects, auto bump versions and auto changelog generation.
- datamodel-code-genrator - Creates Pydantic data-model code from OpenAPI/JSON Schema files.
- django-pyproject - Django package to store some or all of your settings in your pyproject.toml file.
- ini2toml - Automatically translates .ini/.cfg files into TOML.
- Poe the Poet - A task runner that works well with Poetry.
- Poetrify - Convert a Pipfile (or requirements.txt) to pyproject.toml for Poetry.
- poetry-setup - Generate setup.py (setuptools) from pyproject.toml.
- poetry-version - Python library for extracting version from poetry pyproject.toml file.
- Python License Checker - Check python packages from requirement.txt/pyproject.toml and report issues.
- Tartufo - Searches through git repositories and their history for high entropy strings and secrets.
- towncrier - A utility to produce useful, summarised news files for your project.
- Vendy - A tool for vendoring third-party packages into your project.
- zsh-autoswitch-virtualenv - ZSH plugin to automatically switch python virtualenvs and Pipenvs as you move between directories.
Articles
Open PEPs
Python Enhancement Proposals (PEPs) still under consideration related to pyproject.toml.
- None at the moment
Rejected/Withdrawn/Superseded
- PEP 631 β Dependency specification in pyproject.toml based on PEP 508
- PEP 633 β Dependency specification in pyproject.toml using an exploded TOML table
- PEP 650 β Specifying Installer Requirements for Python Projects
- PEP 665 β A file format to list Python dependencies for reproducibility of an application
pyproject.toml
Projects discussing the use of Some project are still considering the adoption of the pyproject.toml
file.
These entries link directly to the project discussion.
- Alembic - A database migrations tool for SQLAlchemy.
- AWS SAM - CLI tool to build, test, debug, and deploy Serverless applications using AWS SAM.
- Briefcase Bootstrap Template - A template for starting a Python app that will be deployed using briefcase.
- bumpversion - Version-bump your software with a single command.
- bump2version - An interim fork with the intent to merge back to the original project.
- Dependency Parser - A parser for Python dependency files.
- flake8 - A python tool that glues together pep8, pyflakes, mccabe, and third-party plugins to check the style and quality of some python code.
- gitlint - Linting for your git commit messages.
- Invoke - Library for managing shell-oriented subprocesses and organizing executable Python code into CLI-invokable tasks.
- mach-nix - Create highly reproducible python environments.
- nose2 - The successor to nose. Its purpose is to extend unittest to make testing nicer and easier to understand.
- prospector - A tool to analyse Python code and output information about errors, potential problems, convention violations and complexity.
- pycodestyle - A tool to check your Python code against some of the style conventions in PEP 8.
- pyenv - Simple Python version management.
- pytest-benchmark - A pytest fixture for benchmarking code.
- Pylama - Code audit tool for Python and JavaScript. Pylama wraps these tools: pycodestyle, pydocstyle, PyFlakes, Mccabe, Pylint, Radon, gjslint, eradicate, mypy.
- PyOxidizer - A modern Python application packaging and distribution tool.
- pypyr - Task-runner cli & api for automation pipelines. Automate anything by combining commands, different scripts in different languages & applications into one pipeline process.
- pytype - A static type analyzer for Python code.
- pyup - tool to update your project's dependencies on GitHub. Runs on pyup.io, comes with a command line interface.
- Radon - A Python tool that computes various metrics from the source code.
- readthedocs.org - Read the Docs hosts documentation for the open source community.
- Spack - A flexible package manager that supports multiple versions, configurations, platforms, and compilers.
- zest.releaser - Python software releasing made easy and repeatable.
License
To the extent possible under law, the authors have waived all copyright and related or neighbouring rights to this work.