Is there a common parser for pyproject.toml
files? I was going to write this myself, but wanted to check if there was a commonly used implementation already available.
What would this common parser do? If it’s just parsing the toml, we have tomllib
in the standard library on 3.11+, and for earlier versions most people use tomli
. I help maintain several tools that use pyproject.toml
(mypy, black, pyanalyze), and we haven’t felt much need for a parser abstraction beyond just parsing the TOML.
3 Likes
Yeah, fair point. I think I was overcomplicating this. Thanks!
Also of interest may be @FFY00’s GitHub - FFY00/python-pyproject-metadata: PEP 621 metadata parsing — though you’ll need to use tomllib
anyway.
A
1 Like
This has been proposed at Add PEP 621 project table parsing and validation module · Issue #647 · pypa/packaging · GitHub .
1 Like