poetry-dynamic-versioning
Plugin for Poetry to enable dynamic versioning based on VCS tags
What it is and what it does
poetry-dynamic-versioning is a Poetry plugin that automatically derives your project's version from version control tags at build time. Instead of manually maintaining a version string in pyproject.toml, you tag your repository (e.g., `git tag v1.0.0`), and the plugin reads that tag, injects the version into your build artifacts, then cleans up so your working directory stays unchanged. It uses Dunamai under the hood to parse tags from Git, Mercurial, and several other VCS systems, and supports custom tag patterns and version formatting via regular expressions or Jinja templates.
The plugin integrates with Poetry's build system at two levels: as a PEP 517 build backend for compatibility with other build frontends, and as a Poetry CLI command for direct integration with `poetry build` and related commands. Configuration is minimal—enable it in pyproject.toml, set your VCS and tag pattern if needed, and the plugin handles the rest. It's designed for projects that want version numbers to stay in sync with their release tags without manual edits or commits.
Use it for:
- Automatically version Python packages from Git tags in CI/CD pipelines without editing pyproject.toml.
- Maintain a clean repository by keeping version strings as placeholders and deriving real versions at build time.
- Support multiple VCS systems (Git, Mercurial, etc.) with a single configuration.
- Inject custom version metadata (commit hash, dirty flag, branch name) into build artifacts using Jinja templates.
- Ensure build artifacts always reflect the exact VCS state they were built from, improving reproducibility.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Poetry plugin that automatically derives and injects version numbers from version control tags into your project during builds, using Dunamai to support multiple VCS systems.
Yes. This is a stable, actively maintained plugin with no known vulnerabilities, low install friction, and a clear use case for projects that want version control to be the single source of truth for versioning. Install it if you use Poetry 1.2.0+ and want to eliminate manual version management in your build workflow.
Install
poetry-dynamic-versioning on PyPI
pip
pip install poetry-dynamic-versioninguv
uv add poetry-dynamic-versioningpoetry
poetry add poetry-dynamic-versioningInstalling poetry-dynamic-versioning
Before you install
Low friction install via Poetry's plugin system. Actively maintained with recent commits and no known vulnerabilities. Requires Poetry 1.2.0+ and Python 3.7+.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
# Install with plugin support
poetry self add "poetry-dynamic-versioning[plugin]"
# Enable in your project
poetry dynamic-versioning enable
# Or manually add to pyproject.toml:
# [tool.poetry-dynamic-versioning]
# enable = true
# Then tag your repo and build
git tag v1.0.0
poetry build
Requires Poetry 1.2.0+ and a supported VCS (Git, Mercurial, Darcs, Bazaar, Subversion, Fossil, or Pijul) with at least one version tag present.
Verify before relying
- Whether the plugin works seamlessly with all Poetry 2.0+ workflows beyond the documented install path.
- Performance impact on large projects or repositories with many tags.
- Compatibility with monorepo setups or projects with multiple pyproject.toml files.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — dunamai, tomlkit, jinja2 |
| Maintenance | actively maintained — 180 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,990,242/month — #2,407 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: poetry_dynamic_versioning-1.10.0-py3-none-any.whl
Keywords: poetry, plugin, version, versioning, dynamic
Tags
More Version Control packages
Automatically extracts and manages Python…
permissive · top 1,000 on PyPI
dulwichDulwich provides pure Python access to Git…
unclear · top 1,000 on PyPI
setuptools-rustsetuptools-rust is a setuptools plugin that…
permissive · top 5,000 on PyPI
pygit2pygit2 provides Python bindings to libgit2,…
copyleft · top 5,000 on PyPI
whatthepatchParses and applies patch files in multiple diff…
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-dynamic-versioningA Hatch plugin that automatically derives…
permissive · top 5,000 on PyPI
poetry-multiproject-pluginA Poetry plugin that enables building and…
permissive · top 15,000 on PyPI
poetry-plugin-shellA Poetry plugin that launches a subshell with…
permissive · top 15,000 on PyPI
poetryPoetry is a dependency management and packaging…
permissive · top 1,000 on PyPI
poetry-corepoetry-core is a PEP 517 build backend that…
permissive · top 1,000 on PyPI
versioneer-518Automates version management in…
permissive · top 15,000 on PyPI
poethepoetA task runner that reads task definitions from…
permissive · top 5,000 on PyPI
poetry-plugin-exportExports Poetry's locked dependency tree to…
permissive · top 1,000 on PyPI