skillfed

dunamai

Dynamic version generation

dunamai v1.26.2 15.5M downloads/30d#1,185 on PyPI384
Permissive license MIT Active released

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 dunamai

uv

uv add dunamai

poetry

poetry add dunamai

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: End Users/DesktopLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

dynamic version from git tagsvcs-based version generationpep 440 version stringssemantic versioning from vcsautomatic version bumpingci/cd version taggingversion control system versioning
version-managementci-cdvcs-integration

More Build Tools packages