uv-dynamic-versioning
Dynamic versioning based on VCS tags for uv/hatch project
What it is and what it does
uv-dynamic-versioning is a Hatch plugin that automates package versioning by reading version information from VCS tags (via dunamai) and injecting it into your build. It offers two main features: a version source plugin that sets the package version from git tags, and a metadata hook plugin that can dynamically adjust dependencies based on the detected version—useful for monorepo setups where different versions need different dependency configurations.
The plugin integrates into Hatch's build system through the pyproject.toml [build-system] configuration and works with hatchling as the build backend. It depends on dunamai for VCS tag parsing, jinja2 for templating, and tomlkit for TOML manipulation. The project is actively maintained and used by several high-profile projects including IBM/Agentics, microsoft/agent-framework, and pydantic/pydantic-ai.
Use it for:
- Automatically version Python packages from git tags without manual version bumping in source files
- Manage monorepo projects where different packages need version-specific dependency configurations
- Integrate version information into package metadata at build time without hardcoding versions
- Replace manual version management in pyproject.toml with VCS-driven versioning for CI/CD pipelines
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Hatch plugin that automatically derives package versions from VCS tags and can dynamically set dependencies based on version information, designed for use with uv and hatch build systems.
Yes. This is a well-maintained, actively-used build plugin with low install friction, no security vulnerabilities, and a permissive MIT license. Install it if you use Hatch and want to automate versioning from git tags or manage dynamic dependencies in a monorepo. Note the current limitation: it does not work with the uv build backend, only with hatchling.
Install
uv-dynamic-versioning on PyPI
pip
pip install uv-dynamic-versioninguv
uv add uv-dynamic-versioningpoetry
poetry add uv-dynamic-versioningInstalling uv-dynamic-versioning
Before you install
Low install friction with a pure-Python wheel distribution. Actively maintained with recent releases; last commit on 2026-08-11 and 201 repository stars indicate ongoing development.
License in practice
MIT License permits unrestricted use, modification, and distribution with minimal restrictions, making it safe for both open-source and commercial projects.
Quickstart
# Add to pyproject.toml [build-system]
[build-system]
requires = ["hatchling", "uv-dynamic-versioning"]
build-backend = "hatchling.build"
# Then configure version source in [tool.hatch.version]
[tool.hatch.version]
source = "regex"
path = "src/__init__.py"
pattern = "__version__ = ['\"](?P<version>[^'\"]*)['\"]"
Requires Python 3.10 or later; does not currently work with the uv build backend (only with hatchling).
Verify before relying
- Whether the monorepo metadata hook feature works reliably across complex dependency graphs
- Performance impact when used in large monorepos with many interdependent packages
Package facts
| License | MIT License Copyright (c) 2024 Manabu Niseki Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (<4.0,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — dunamai, hatchling, jinja2, tomlkit |
| Maintenance | actively maintained — 145 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 8,631,606/month — #1,601 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: uv_dynamic_versioning-0.14.0-py3-none-any.whl
Keywords: hatch, uv
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
hatch-vcsA Hatch plugin that automatically determines…
permissive · top 1,000 on PyPI
hatchling-autoextras-hookA Hatchling metadata hook that automatically…
permissive · top 5,000 on PyPI
poetry-dynamic-versioningA Poetry plugin that automatically derives and…
permissive · top 5,000 on PyPI
versioningitAutomatically determines your Python package's…
permissive · top 5,000 on PyPI
dunamaiDunamai generates dynamic, standards-compliant…
permissive · top 5,000 on PyPI
uv-sortAlphabetically sorts dependencies in uv's…
permissive · top 15,000 on PyPI
hatch_build_scriptsA Hatch build plugin that runs arbitrary shell…
permissive · top 15,000 on PyPI
hatch-regex-commitA Hatch plugin that automatically creates Git…
permissive · top 15,000 on PyPI
hatch-requirements-txtA Hatchling plugin that reads project…
permissive · top 5,000 on PyPI