Skip to main content
Logo

The poetry version command only updates version in pyproject.toml file. This plugin updates version in other files when poetry version <version> command is executed.

Build Status Coverage Status Python Versions PyPI version Licence

Getting Started

Prerequisites

  • python = ^3.10

  • poetry = ^2.0

Install

Install the plugin by poetry plugin command.

poetry self add poetry-bumpversion

Configure version replacements

Say you have __version__ variable set at your_package/__init__.py file

__version__ = "0.1.0" # It MUST match the version in pyproject.toml file

Add the following to your pyproject.toml file.

[tool.poetry_bumpversion.file."your_package/__init__.py"]
# Duplicate the line above to add more files

Now run poetry version patch --dry-run, if your output looks somewhat like below you are all set (dry-run does not update any file).

Bumping version from 0.5.0 to 0.5.1
poetry-bumpversion: processed file: your_package/__init__.py

If dry-run output looks fine you can run version update command without dry-run flag to check if version in both pyproject.toml and your_package/__init__.py file has been updated.

Advanced Usage

You can define search and replace terms to be more precise

[tool.poetry_bumpversion.file."your_package/__init__.py"]
search = '__version__ = "{current_version}"'
replace = '__version__ = "{new_version}"'

You can define replacements if you have same search/replace patterns across multiple files.

[[tool.poetry_bumpversion.replacements]]
files = ["your_package/__init__.py", "your_package/version.py"]
search = '__version__ = "{current_version}"'
replace = '__version__ = "{new_version}"'

[[tool.poetry_bumpversion.replacements]]
files = ["README.md"]
search = 'version: {current_version}'
replace = 'version: {new_version}'

Usage with Github Workflow

This plugin can be used to bump version automatically during publishing to PyPI using a GitHub workflow. When a release tag is created the workflow will use that tag name e.g 2.0.1 to update versions in every files, build the package and publish to PyPI. This is how this plugin is deployed to PyPI.

To get started you can copy the deploy workflow code from this repo to your repo and set it up.

License

This project is licensed under MIT License - see the LICENSE file for details.

Release files for poetry-bumpversion 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for poetry-bumpversion 0.4.0
File Size Uploaded
poetry_bumpversion-0.4.0.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for poetry-bumpversion 0.4.0
File Interpreter ABI Platform
poetry_bumpversion-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.6 kB

Release files / poetry_bumpversion-0.4.0.tar.gz

Download URL poetry_bumpversion-0.4.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a34e2cc97c549af6cdc3a7584e3ffab3b778afad01458ad37da4e7a91a1286e4
BLAKE2b-256 checksum
How to use checksums
6972a1b3c0c29ed8c64d95ac384ba24df89a2db6e6fcc8620a68f27139cbd79f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

Release files / poetry_bumpversion-0.4.0-py3-none-any.whl

Download URL poetry_bumpversion-0.4.0-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
40407c1420f136bc97448f2d8f49b60cb01703496cb815b4537d92a8b70fd5e6
BLAKE2b-256 checksum
How to use checksums
12bb12db1f8aa09df79935fe1bff023f8adc5bce5b79d287ee5357e0db6759af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page