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.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.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.4.0.tar.gz (37.2 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.4.0-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dynamic_metadata-0.4.0.tar.gz
  • Upload date:
  • Size: 37.2 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.4.0.tar.gz
Algorithm Hash digest
SHA256 0cfc070be8994932009955f953a0e7cc609745a0bb6721d61579baef91323254
MD5 78778f1d76d3e5a7824c44bfdc26fb91
BLAKE2b-256 00b35606d764d261a09d436f4fc9c3c56bbd961fc71473003b7e69b378f7c6a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynamic_metadata-0.4.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.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dynamic_metadata-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef7a668f8b93e1d67d50b0e9853d02f5ea387c3eaccbef4661bf889b30d86f8c
MD5 01e9c53456d5f9d65a0e3df2af5807e7
BLAKE2b-256 7479c6137f2807746b879b0f241a50baaf5301f9d636c300302c9fe8ba05e6ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynamic_metadata-0.4.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