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.0.1.tar.gz (3.3 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: PyVersionNumber-1.0.1.tar.gz
  • Upload date:
  • Size: 3.3 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.0.1.tar.gz
Algorithm Hash digest
SHA256 250dc4a856ab29b9c164d60ca096f83da764364648281c4d0e5c64892051cd8c
MD5 7306167522d99a92a7134e8986de8569
BLAKE2b-256 1a57b83ba85376822d039d00e00f334a521a19ade3d17332403f6c9fcde17519

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