This project is intended to document dynamic-metadata support.
Project description
dynamic-metadata
[!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:
- For users
— configure plugins in
pyproject.toml. - Bundled plugins
— the plugins shipped with this package (
regex,template,static,fragment,substitute). - 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.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cfc070be8994932009955f953a0e7cc609745a0bb6721d61579baef91323254
|
|
| MD5 |
78778f1d76d3e5a7824c44bfdc26fb91
|
|
| BLAKE2b-256 |
00b35606d764d261a09d436f4fc9c3c56bbd961fc71473003b7e69b378f7c6a7
|
Provenance
The following attestation bundles were made for dynamic_metadata-0.4.0.tar.gz:
Publisher:
cd.yml on scikit-build/dynamic-metadata
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dynamic_metadata-0.4.0.tar.gz -
Subject digest:
0cfc070be8994932009955f953a0e7cc609745a0bb6721d61579baef91323254 - Sigstore transparency entry: 2039992091
- Sigstore integration time:
-
Permalink:
scikit-build/dynamic-metadata@aa989efd1d2bfe5c5d0261fba9d4ebfa75dd416b -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/scikit-build
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@aa989efd1d2bfe5c5d0261fba9d4ebfa75dd416b -
Trigger Event:
release
-
Statement type:
File details
Details for the file dynamic_metadata-0.4.0-py3-none-any.whl.
File metadata
- Download URL: dynamic_metadata-0.4.0-py3-none-any.whl
- Upload date:
- Size: 23.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef7a668f8b93e1d67d50b0e9853d02f5ea387c3eaccbef4661bf889b30d86f8c
|
|
| MD5 |
01e9c53456d5f9d65a0e3df2af5807e7
|
|
| BLAKE2b-256 |
7479c6137f2807746b879b0f241a50baaf5301f9d636c300302c9fe8ba05e6ee
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dynamic_metadata-0.4.0-py3-none-any.whl -
Subject digest:
ef7a668f8b93e1d67d50b0e9853d02f5ea387c3eaccbef4661bf889b30d86f8c - Sigstore transparency entry: 2039992240
- Sigstore integration time:
-
Permalink:
scikit-build/dynamic-metadata@aa989efd1d2bfe5c5d0261fba9d4ebfa75dd416b -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/scikit-build
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@aa989efd1d2bfe5c5d0261fba9d4ebfa75dd416b -
Trigger Event:
release
-
Statement type: