Skip to main content

A small library for handling and comparing Semantic Version Numbers

Project description

PyVersionNumber

A small library for handling Semantic Version Numbers

Installation

pip install PyVersionNumber

Usage

The following code sample shows the two ways to instantiate the VersionNumber class:

import PyVersionNumber

version = PyVersionNumber.VersionNumber("1.2.6")

OR

import PyVersionNumber

version = PyVersionNumber.VersionNumber(1, 2, 6)

From there, you can compare version numbers, perform mathematical operations on two version numbers, print the number out to the console (or cast to a string), or see if the version number indicates the product is in development according to Semantic Versioning Standards (the Major number = 0)

It is a very small and simple library which has many uses. Enjoy!

Contributing

If you wish to contribute, submit a PR and I would be happy to review it!

Project details


Download files

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

Source Distribution

PyVersionNumber-1.1.0.tar.gz (3.4 kB view details)

Uploaded Source

File details

Details for the file PyVersionNumber-1.1.0.tar.gz.

File metadata

  • Download URL: PyVersionNumber-1.1.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.7.0 pkginfo/1.7.1 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.55.2 CPython/3.9.1

File hashes

Hashes for PyVersionNumber-1.1.0.tar.gz
Algorithm Hash digest
SHA256 ebe4a0b0700531f6cf546fd365b6e225fbb6a03f9874324f9b37b1dc86105ce4
MD5 4780466e91f4c30d255e19b6ca1dc7f1
BLAKE2b-256 33dde8031b5e5dd6299724ae4b7cbbad55fb280127c732920c1860dc0236667f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page