Skip to main content

PEP 621 metadata parsing

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyproject-metadata-0.7.1.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

pyproject_metadata-0.7.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file pyproject-metadata-0.7.1.tar.gz.

File metadata

  • Download URL: pyproject-metadata-0.7.1.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for pyproject-metadata-0.7.1.tar.gz
Algorithm Hash digest
SHA256 0a94f18b108b9b21f3a26a3d541f056c34edcb17dc872a144a15618fed7aef67
MD5 ca5e9527cff96153a976e14530b53746
BLAKE2b-256 38afb0e6a9eba989870fd26e10889446d1bec2e6d5be0a1bae2dc4dcda9ce199

See more details on using hashes here.

File details

Details for the file pyproject_metadata-0.7.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pyproject_metadata-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 28691fbb36266a819ec56c9fa1ecaf36f879d6944dfde5411e87fc4ff793aa60
MD5 613ccdb1469f79126cdbc822816345cb
BLAKE2b-256 c4cb4678dfd70cd2f2d8969e571cdc1bb1e9293c698f8d1cf428fadcf48d6e9f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page