dynamic-metadata
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:
- For users
— configure plugins in
pyproject.toml. - Bundled plugins
— the plugins shipped with this package (
ast,regex,template,from_file,static,readme_fragment,substitute,pin_installed). - For plugin authors — implement the hooks; no runtime dependency on this package required.
- For backend authors — drive plugins from a build backend by calling the reference loader.
- Reimplementing the loader — drive plugins without a dependency on this package.
Release files for dynamic-metadata 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dynamic_metadata-0.6.0.tar.gz | 55.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dynamic_metadata-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 89.3 kB
Release files / dynamic_metadata-0.6.0.tar.gz
| Download URL | dynamic_metadata-0.6.0.tar.gz |
|---|---|
| Size | 55.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a01ea4bbd5eda19b051889f9bc61d8d059d8113ff979fb3ce706343f4f6b9a73
|
|
BLAKE2b-256 checksum How to use checksums |
24b048deaa4c81bdcb92e99a6aecb9e242c79606842ac52952e1ffb55c59b603
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.
Transparency logRelease files / dynamic_metadata-0.6.0-py3-none-any.whl
| Download URL | dynamic_metadata-0.6.0-py3-none-any.whl |
|---|---|
| Size | 33.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
24feb00d794d409987a900f70272b0e47fca44867f66436de1c6c9e5f808e628
|
|
BLAKE2b-256 checksum How to use checksums |
6a9b8127a041502cabca313511567d975c52eabb6b0c626422287f4e46d6f9f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.
Transparency log