Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Bump versions. Semantically.

Project Description

SemVerPy

Bumping versions. Semantically.

Usage is pretty simple:

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

It also supports comparisons:

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

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

>>> version.bump_major()
<SemVerPy(2.0.0)>
>>> str(version)
'2.0.0'

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

>>> version.bump_minor('buildinfo')
<SemVerPy(2.1.0-buildinfo)>
>>> str(version)
'2.1.0-buildinfo'

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

>>> version.satisfies(SemVerPy('2.0'))
False
>>> version.satisfies(SemVerPy('2.1'))
True
>>> version.satisfies(SemVerPy('2'))
True
>>> version == SemVerPy('2.1')
False
Release History

Release History

This version
History Node

0.1.0

History Node

0.0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
SemVerPy-0.1.0.tar.gz (2.8 kB) Copy SHA256 Checksum SHA256 Source May 9, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting