Skip to main content

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!

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

Uploaded Source

File details

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

File metadata

  • Download URL: PyVersionNumber-1.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 755fd2ac088c80aa1275bbe04f15d309627c2805966ba38238a6e521042b5c62
MD5 24a71d6e2f21043684539a3dbdac692e
BLAKE2b-256 3fbc4bd1fddaecc957355022b68f26d169d143b3dfda207acc2c3e28456c16d7

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.1.1 This release

1 file

1.1.0

1 file

1.0.1

1 file

1.0.0

1 file

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