pyproject
pyproject is a linter and language server for
pyproject.toml
files.
pyproject brings real-time feedback to your pyproject.toml files, including:
-
Syntax validation and schema compliance for project and tool configuration.
-
Over 30 built-in rules for project metadata and dependencies, including PEP 508 validation, version bounds, deprecations, and available updates.
-
Diagnostics directly in your editor, so configuration errors are caught before the tools that consume your project file run.
If you need help with pyproject please feel free to open an issue. Feature
requests and bug reports are always welcome!
Installation
pyproject should run on any system, including Linux, MacOS, and the BSDs.
The easiest way to install it is by using cargo, the Rust package manager:
cargo install pyproject
Otherwise, see below for the complete package list:
Cross-platform
| Package Manager | Package | Command |
|---|---|---|
| Cargo | pyproject | cargo install pyproject |
| Homebrew | terror/tap/pyproject | brew install terror/tap/pyproject |
| Pip | pyproject | pip install pyproject |
n.b. Since we publish a release to PyPI, tools like
uv work right out of the box, i.e.
uvx pyproject check should just work with sensible default rules.
Pre-built binaries
Pre-built binaries for Linux, MacOS, and Windows can be found on the releases page.
Usage
pyproject can be used from the command-line or as a language server.
CLI
Below is the output of pyproject --help:
pyproject 0.2.1
Usage: pyproject <COMMAND>
Commands:
check Check a pyproject.toml file for errors and warnings [aliases: lint]
format Format a pyproject.toml file [aliases: fmt]
server Start the language server [aliases: lsp]
Options:
-h, --help Print help
-V, --version Print version
n.b. Running pyproject check or pyproject format on their own will
attempt to perform actions on the nearest pyproject.toml file, walking
backwards from the current location.
Language Server
Start the language server with pyproject server or pyproject lsp. The
server communicates over standard input and output and provides diagnostics,
completions, hover descriptions, and formatting for pyproject.toml files.
Configuration
You can configure rules in your pyproject.toml under the [tool.pyproject]
section.
Each rule can be set to a severity level (error, warning, hint,
information (or info), or off) using either a simple string or a table
with a level field:
[tool.pyproject.rules]
project-unknown-keys = "warning"
project-dependency-updates = { level = "hint" }
project-requires-python-upper-bound = "off"
Rule identifiers are shown in diagnostic output (e.g.,
error[project-unknown-keys]). Rules that aren't explicitly configured use
their default severity level.
Prior Art
This project was inspired by a language server I saw for
Cargo.toml files,
namely crates-lsp. I couldn't find
similar a tool for
pyproject.toml
files, so I thought I'd write one.
Metadata
Release files for pyproject 1!0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyproject-1!0.2.1.tar.gz | 1.2 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| pyproject-1!0.2.1-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| pyproject-1!0.2.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details |
| pyproject-1!0.2.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | Python 3 | none | Linux glibc 2.17+ ARM64 | Details |
| pyproject-1!0.2.1-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl | Python 3 | none | macOS 10.12+ x86-64, macOS 10.12+ universal2 (ARM64, x86-64), macOS 11.0+ ARM64 | Details |
Total release size: 27.8 MB
Release files / pyproject-1!0.2.1.tar.gz
| Download URL | pyproject-1!0.2.1.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4efc7e1cf90a38d262a96bc32e5faf40d968c27ffe5c5e5623d9ad44c600e2d
|
|
BLAKE2b-256 checksum How to use checksums |
809203e7167743cb98f90847f6a11cf9d66f2c01b28e2e6f0a8f51d196ddfd53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Release files / pyproject-1!0.2.1-py3-none-win_amd64.whl
| Download URL | pyproject-1!0.2.1-py3-none-win_amd64.whl |
|---|---|
| Size | 5.8 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
bc453973f9bb4e84c5943f961482cacb5d97eadc34ba13cb70128f789951f0bc
|
|
BLAKE2b-256 checksum How to use checksums |
a88fea7c4613bca71cea21ab2ebd772981a15c1372b647ea7c1737a453bd01be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Release files / pyproject-1!0.2.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pyproject-1!0.2.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 5.7 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
0e6a417d77f00edbb150075819b34cac51979a5a1263b4615ed44e9a123670df
|
|
BLAKE2b-256 checksum How to use checksums |
ef1c25903f1d56a615959246aff3a2bf05554b8cd58c2b4ae9a1a828dba4b631
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Release files / pyproject-1!0.2.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | pyproject-1!0.2.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 5.4 MB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
cec3f87fd2b1e8594586eb6961e00c30ed39050c2861d92358c9853fff805789
|
|
BLAKE2b-256 checksum How to use checksums |
c88b4908dce035e73c5abd467befac9a92fa71e583c1601687e89b8cd9433469
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Release files / pyproject-1!0.2.1-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
| Download URL | pyproject-1!0.2.1-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl |
|---|---|
| Size | 9.7 MB |
| Tags | Python 3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
18e8bbb68b5abfdb47cc6b7628762764e18235b3c6ffa4acdc50b06e34a0ae40
|
|
BLAKE2b-256 checksum How to use checksums |
f6290f622e6069169956d59e4ab02ce7242d5777b4dc28c3f4f6e083b548cafd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|