Validate pyproject.toml files
Project description
pyprojectcheck ✅
Validate pyproject.toml files for correctness and best practices.
Installation
pip install pyprojectcheck
Usage
CLI
# Check current directory
pyprojectcheck
# Check specific file
pyprojectcheck path/to/pyproject.toml
Python API
from pyprojectcheck import check_file, check
# Check a file
result = check_file("pyproject.toml")
print(result)
# Check content directly
content = """
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "mypackage"
version = "1.0.0"
"""
result = check(content)
if result.valid:
print("✅ Valid!")
else:
for error in result.errors:
print(error)
What It Checks
Errors
- Missing
[build-system]section - Missing
requiresorbuild-backend - Missing
[project]section - Missing
nameorversion - Invalid field types
Warnings
- Missing recommended fields (description, readme, license)
- Missing
requires-python - Missing
authors - Missing
urls
Output Example
⚠️ [project] Missing 'description' field (recommended)
⚠️ [project] Missing 'readme' field (recommended)
❌ [project.authors[0]] Author must have 'name' or 'email'
❌ Invalid: 1 error(s), 2 warning(s)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyprojectcheck_rj-1.0.0.tar.gz.
File metadata
- Download URL: pyprojectcheck_rj-1.0.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aedc702d77e5fc79159c0dc922aa895859eebc86753331670b2703ccf45ecf21
|
|
| MD5 |
082dd8d82b209efc0d3e2cdf2e70eb3c
|
|
| BLAKE2b-256 |
a5b3756a010e1e1f42ea3b688b250c7b2546a21b5f4cb8a7a8d80ae97c6d17ed
|
File details
Details for the file pyprojectcheck_rj-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pyprojectcheck_rj-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b6e2a3a74a556d0b882259e41df64753d8a2a559599e9b961989d7cc94d985a
|
|
| MD5 |
a914bc9eccf31fa0616c5bbf01654b5d
|
|
| BLAKE2b-256 |
cb3b6fa6cef8808f51c1afc4318b8ac28018542785156d6b5bd6a7844ea5bc9c
|