Skip to main content

Bump versions. Semantically.

Project description


Bumping versions. Semantically.

Usage is pretty simple:

>>> from semverpy import SemVerPy
>>> version = SemVerPy('1.0.0')
>>> version.bump_minor()
>>> str(version)

It also supports comparisons:

>>> version == SemVerPy('1.1.0')
>>> version > SemVerPy('1.0.0')
>>> version > SemVerPy('2.0.0')

When you bump a version, all the smaller version numbers are set to zeroes.

>>> version.bump_major()
>>> str(version)

You can also define a build number when bumping a version:

>>> version.bump_minor('buildinfo')
>>> str(version)

Lastly, if you define a partial version, you can be used as a dependency.

>>> version.satisfies(SemVerPy('2.0'))
>>> version.satisfies(SemVerPy('2.1'))
>>> version.satisfies(SemVerPy('2'))
>>> version == SemVerPy('2.1')

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for SemVerPy, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size SemVerPy-0.1.0.tar.gz (2.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page