experimental/sources/: pyproject-metadata-0.8.0 metadata and description

Simple index

PEP 621 metadata parsing

author_email Filipe LaĆ­ns <lains@riseup.net>
classifiers
  • License :: OSI Approved :: MIT License
  • Programming Language :: Python :: 3
  • Programming Language :: Python :: 3 :: Only
  • Programming Language :: Python :: 3.7
  • Programming Language :: Python :: 3.8
  • Programming Language :: Python :: 3.9
  • Programming Language :: Python :: 3.10
  • Programming Language :: Python :: 3.11
  • Programming Language :: Python :: 3.12
description_content_type text/markdown
project_urls
  • changelog, https://pep621.readthedocs.io/en/stable/changelog.html
  • homepage, https://github.com/pypa/pyproject-metadata
provides_extras test
requires_dist
  • packaging>=19.0
  • furo>=2023.9.10 ; extra == "docs"
  • sphinx-autodoc-typehints>=1.10.0 ; extra == "docs"
  • sphinx~=7.0 ; extra == "docs"
  • pytest-cov[toml]>=2 ; extra == "test"
  • pytest>=6.2.4 ; extra == "test"
  • tomli>=1.0.0 ; extra == "test" and (python_version<"3.11")
requires_python >=3.7
File Tox results History
pyproject_metadata-0.8.0.tar.gz
Size
15 KB
Type
Source

pyproject-metadata

pre-commit.ci status checks tests codecov Documentation Status

Dataclass for PEP 621 metadata with support for core metadata generation

This project does not implement the parsing of pyproject.toml containing PEP 621 metadata.

Instead, given a Python data structure representing PEP 621 metadata (already parsed), it will validate this input and generate a PEP 643-compliant metadata file (e.g. PKG-INFO).

Usage

After installing pyproject-metadata, you can use it as a library in your scripts and programs:

from pyproject_metadata import StandardMetadata

parsed_pyproject = { ... }  # you can use parsers like `tomli` to obtain this dict
metadata = StandardMetadata.from_pyproject(parsed_pyproject)
print(metadata.entrypoints)  # same fields as defined in PEP 621

pkg_info = metadata.as_rfc822()
print(str(pkg_info))  # core metadata