Skip to main content

This project is intended to document dynamic-metadata support.

Project description

dynamic-metadata

Actions Status Documentation Status

PyPI version PyPI platforms

GitHub Discussion

[!WARNING]

This is still a WiP! The design may still change.

dynamic-metadata defines a plugin protocol that lets a Python build backend compute [project] fields (version, readme, dependencies, …) at build time. Plugins are configured as an ordered array of tables, [[tool.dynamic-metadata]], each naming a provider. Entries run in order, so a later entry sees every field an earlier entry produced.

A minimal example reads the version out of a file with the bundled regex plugin:

[build-system]
requires = ["...", "dynamic-metadata"]
build-backend = "..."

[project]
dynamic = ["description", "version"]

[[tool.dynamic-metadata]]
provider = "dynamic_metadata.plugins.regex"
field = "version"
input = "src/my_package/__init__.py"

Because entries run in order, a later one can reference an earlier result. Here the template plugin builds a description from the name and the version produced above:

[[tool.dynamic-metadata]]
provider = "dynamic_metadata.plugins.template"
field = "description"
result = "This is {project[name]}, version {project[version]}"

Your build backend must support dynamic-metadata for this to work. Build backends known to support this currently include:

  • scikit-build-core (1.0+)

If you have a build backend, it's easy to add support, you don't even need to depend on this project to do it.

The documentation is split by audience:

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

dynamic_metadata-0.3.0.tar.gz (25.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dynamic_metadata-0.3.0-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file dynamic_metadata-0.3.0.tar.gz.

File metadata

  • Download URL: dynamic_metadata-0.3.0.tar.gz
  • Upload date:
  • Size: 25.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dynamic_metadata-0.3.0.tar.gz
Algorithm Hash digest
SHA256 63f7e7a35d420501339441fffae7124da342b9601b30c9947843c085b8843152
MD5 b06dc4c82f6ce543214b0fb2448ad7ef
BLAKE2b-256 ee8d396dec7fadc1e41a384af68ac40533aa484df23cef4ed5f458eaca1ad100

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynamic_metadata-0.3.0.tar.gz:

Publisher: cd.yml on scikit-build/dynamic-metadata

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dynamic_metadata-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dynamic_metadata-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67ac465b13d1701a33f400c36ccbbfb4f393701b25de66d9cca3869de3fe6f00
MD5 b14d51f91090594e5ba67e0813c4f029
BLAKE2b-256 6175f7a8534c704d56f489e899e9c273ac686c486cdec83304a1320021b6fd6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynamic_metadata-0.3.0-py3-none-any.whl:

Publisher: cd.yml on scikit-build/dynamic-metadata

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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