skillfed

uv-dynamic-versioning

Dynamic versioning based on VCS tags for uv/hatch project

uv-dynamic-versioning v0.14.0 8.6M downloads/30d#1,601 on PyPI201
Permissive 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) Active released

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-versioning

uv

uv add uv-dynamic-versioning

poetry

poetry add uv-dynamic-versioning

Installing 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

Framework :: HatchLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

hatch dynamic versioningvcs tag versioningautomatic version from githatch build plugindynamic dependencies hatch
build-automationmonorepovcs-integration

More Build Tools packages