uv-workspace-dynamic-versioning
A powerful Hatch plugin for dynamic versioning and dependency injection in uv workspaces.
📖 Context & Origin
This project was created to address a specific limitation in the existing uv-dynamic-versioning plugin when used within complex monorepos and uv workspaces.
As discussed in ninoseki/uv-dynamic-versioning#81, the standard implementation often calculates version distance and commit hashes based on the entire repository history. In a workspace with multiple packages, this leads to:
- False Positives: Packages bumping versions when unrelated code in the workspace changes.
- Inaccurate Metadata: Commit hashes reflecting global repo state rather than the state of the specific package.
uv-workspace-dynamic-versioning introduces Directory-Specific Patching. It re-calculates the Git distance and commit hash by filtering the history to the specific package subdirectory, ensuring that versions only reflect changes relevant to that package.
🚀 Key Features
- VCS-Powered Versioning: Automatically derive versions from Git, Mercurial, and more via Dunamai.
- Workspace Aware: Accurate
distanceandcommithash calculation restricted to the project subdirectory. - Dynamic Dependencies: Inject versions into
dependenciesusing Jinja2 templates (e.g.,pkg == {{ version.base }}). - Secure by Design: Sandboxed Jinja2 environment and Path Traversal protection.
- Highly Configurable: Custom formats, bumping logic, and fallback versions.
🛠 Quick Start
1. Installation
Add the plugin to your build-system.requires in pyproject.toml:
[build-system]
requires = ["hatchling", "uv-workspace-dynamic-versioning"]
build-backend = "hatchling.build"
2. Basic Configuration
Enable the version source and mark the version as dynamic:
[project]
name = "my-awesome-package"
dynamic = ["version"]
[tool.hatch.version]
source = "uv-workspace-dynamic-versioning"
📚 Documentation
For full guides and API reference, visit our Documentation Site.
⚖️ License
Distributed under the terms of the MIT license.
Metadata
Release files for uv-workspace-dynamic-versioning 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| uv_workspace_dynamic_versioning-0.1.5.tar.gz | 108.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| uv_workspace_dynamic_versioning-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 124.2 kB
Release files / uv_workspace_dynamic_versioning-0.1.5.tar.gz
| Download URL | uv_workspace_dynamic_versioning-0.1.5.tar.gz |
|---|---|
| Size | 108.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd263f17c2488393e9f51840cdddd7f66aa1592eea3cdaf235327a88f768a185
|
|
BLAKE2b-256 checksum How to use checksums |
717739e847f98ef13a499a0c3fd5f68cf0ad79dc772548b927eadb4ec3727dbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Apr 6, 2026.
Transparency logRelease files / uv_workspace_dynamic_versioning-0.1.5-py3-none-any.whl
| Download URL | uv_workspace_dynamic_versioning-0.1.5-py3-none-any.whl |
|---|---|
| Size | 15.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b2c37691b6ac1b81f69d2bf2598346a3429afecb56761b5dbd5e6f9d0bc62d98
|
|
BLAKE2b-256 checksum How to use checksums |
a6ec5f9f19595a474ce534f5850bb3df16e8aac4d0fc2416a663d398c2662d1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Apr 6, 2026.
Transparency log