dunamai
Dynamic version generation
What it is and what it does
Dunamai is a library and CLI tool that derives version strings from your version control system's tags, letting you avoid manually managing version numbers in code. It works with multiple VCS backends and outputs versions in PEP 440, Semantic Versioning, or custom formats—useful for CI/CD pipelines that need to uniquely identify nightly builds, per-commit releases, or production versions based solely on repository state.
The library provides both a programmatic API (the Version class) and a command-line interface. You can use it to generate a version at build time, embed it statically in your package, or compute it dynamically at runtime. It supports custom tag patterns, format templates, and version bumping, and works with projects in any language—for Python specifically, it means you don't need a setup.py to manage versions.
Use it for:
- Generate unique version identifiers for nightly or per-commit CI builds without manual tagging
- Automatically version releases by creating a git tag, eliminating manual version string updates
- Embed a dynamic version in a Python package's __version__ attribute at build or import time
- Validate custom version format strings against PEP 440 or Semantic Versioning standards
- Extract and inspect individual version components (base, stage, distance, commit hash) for conditional build logic
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Dunamai generates dynamic, standards-compliant version strings from version control system tags, supporting Git, Mercurial, Darcs, Subversion, Bazaar, Fossil, and Pijul with output in PEP 440, Semantic Versioning, or custom formats.
Yes. Dunamai is actively maintained, has no known vulnerabilities, minimal dependencies, and solves a real problem in CI/CD and release workflows. It's well-suited for projects that want version strings derived from VCS state without the overhead of Versioneer or manual version management. Install it if you need dynamic versioning tied to your repository tags.
Install
dunamai on PyPI
pip
pip install dunamaiuv
uv add dunamaipoetry
poetry add dunamaiInstalling dunamai
Before you install
Low friction: pure Python wheel with only two runtime dependencies (packaging and importlib-metadata). Actively maintained with a recent release; last commit 2026-08-02.
License in practice
MIT license (permissive): you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install dunamai
from dunamai import Version
version = Version.from_any_vcs()
print(version.serialize())
Verify before relying
- Whether all seven VCS backends (Git, Mercurial, Darcs, Subversion, Bazaar, Fossil, Pijul) are equally well-tested and production-ready
- Performance characteristics when run on very large repositories or in CI/CD pipelines with frequent invocations
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.5) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — packaging, importlib-metadata |
| Maintenance | actively maintained — 12 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 15,496,339/month — #1,185 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dunamai-1.26.2-py3-none-any.whl
Keywords: version, versioning, dynamic
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
poetry-dynamic-versioningA Poetry plugin that automatically derives and…
permissive · top 5,000 on PyPI
setuptools-git-versioningAutomatically generates PEP 440-compliant…
permissive · top 5,000 on PyPI
uv-dynamic-versioningA Hatch plugin that automatically derives…
permissive · top 5,000 on PyPI
versioningitAutomatically determines your Python package's…
permissive · top 5,000 on PyPI
versioneerVersioneer automates version management in…
permissive · top 5,000 on PyPI
versioneer-518Automates version management in…
permissive · top 15,000 on PyPI
bumpversionA command-line tool that automates version…
permissive · top 5,000 on PyPI
parverparver parses and manipulates PEP 440 version…
permissive · top 5,000 on PyPI
bump2versionA command-line tool that automates version…
permissive · top 5,000 on PyPI
okonomiyakiOkonomiyaki parses and manipulates metadata for…
permissive · top 15,000 on PyPI