Skip to main content

bump

Bumps package versions.

Example

By default, running bump in a directory with a setup.py will bump the “patch” number in place. If a pyproject.toml file with a [project].version field is also present, it will be updated with the same version number:

$ bump
1.0.1
$ git diff setup.py
─────────────────────────────────────────────────
modified: setup.py
─────────────────────────────────────────────────
@ setup.py:6 @ from setuptools import setup

setup(
    name='bump',
-    version='1.0.0',
+    version='1.0.1',
    description='Bumps package version numbers',
    long_description=open('README.rst').read(),
    license='MIT',

Conveniently bump will also return the new version number, so you can use it after running the command, for example:

$ export VERSION=`bump`
$ echo "The new version is $VERSION"
The new version is 1.0.1

Options

The bump command can also bump the major or minor version numbers, or set the pre-release identifier or local version segment:

$ bump --help
Usage: bump [OPTIONS] [INPUT] [OUTPUT]

Options:
  -M, --major     Bump major number. Ex.: 1.2.3 -> 2.2.3
  -m, --minor     Bump minor number. Ex.: 1.2.3 -> 1.3.3
  -p, --patch     Bump patch number. Ex.: 1.2.3 -> 1.2.4
  -r, --reset     Reset subversions. Ex.: Major bump from 1.2.3 will be 2.0.0
                  instead of 2.2.3
  --pre TEXT      Set the pre-release identifier
  --local TEXT    Set the local version segment
  --canonicalize  Canonicalize the new version
  --help          Show this message and exit.

The –reset option should be used alongside with minor or major bump.

You can configure these options by setting them in a .bump or setup.cfg configuration file as well, so you don’t have to specify them every time:

$ cat .bump
[bump]
input = some_directory/__file__.py
minor = true
patch = false
reset = true

pyproject.toml Support

bump also supports pyproject.toml files following PEP 621 standards. When both setup.py and pyproject.toml exist in the same directory, both files will be updated with the same version number automatically.

The tool looks for the version in the [project].version field:

[project]
name = "my-package"
version = "1.0.0"

When you run bump, both files will be synchronized:

$ bump
1.0.1
Updated pyproject.toml

This makes bump compatible with modern Python packaging tools like uv, poetry, and flit, while maintaining backward compatibility with traditional setup.py-only projects.

Metadata

Release files for bump 1.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 bump 1.4.0
File Size Uploaded
bump-1.4.0.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bump 1.4.0
File Interpreter ABI Platform
bump-1.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.5 kB

Release files / bump-1.4.0.tar.gz

Download URL bump-1.4.0.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1b58e1182660c282e332ddae1083a4c01ca47ec8d0f35a303acddca2d113bae8
BLAKE2b-256 checksum
How to use checksums
226811cb6c4df2d6583c532208dae3a09ed4281f3a942ca03a912b48acd66295
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 21, 2026.

Transparency log

Release files / bump-1.4.0-py3-none-any.whl

Download URL bump-1.4.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
34fe2eea2c4c80ca040d368c9789e8042b9d646922d55ef91157253c941366e9
BLAKE2b-256 checksum
How to use checksums
cc91f00b300285a0a7f3783fbbc0046c5d8d91bc11f8b6c7da03c3f4235165b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 21, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.3.0

1 release file

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

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