Skip to main content

This python module provides a version class. Instances of this class may be used in representing and version numbers and compare them.

Project description

jk_version

Introduction

This python module provides a version class. Instances of this class may be used in representing and version numbers and compare them.

Information about this module can be found here:

Why this module?

...

Limitations of this module

...

How to use this module

Import this module

Please include this module into your application using the following code:

import jk_version

Parse a version number

Version numbers can either be specified as lists of integers or as a string. Examples:

  • Version([ 1, 7, 51 ])
  • Version(( 1, 7, 51 ))
  • Version("1.7.51")

Version numbering schema

For compatibility reasons the version number parser is designed to accept the following schema:

[ epoch ":" ] version_data

Where epoch is optional and - if present - must be an integer, and version_data is a regular version string consisting of decimal numbers separated by full stops.

Examples for valid version numbers:

  • 0
  • 0.1
  • 0.1.2
  • 2020.12.24
  • 2:0.1.2

Comparing version numbers

Version numbers can be compared. Example:

v1 = Version("0.1.2")
v2 = Version("0.2.0")
print(v2 > v1)

This will print: True

Contact Information

This work is Open Source. This enables you to use this work for free.

Please have in mind this also enables you to contribute. We, the subspecies of software developers, can create great things. But the more collaborate, the more fantastic these things can become. Therefore Feel free to contact the author(s) listed below, either for giving feedback, providing comments, hints, indicate possible collaborations, ideas, improvements. Or maybe for "only" reporting some bugs:

License

This software is provided under the following license:

  • Apache Software License 2.0

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

jk_version-0.2022.1.29.tar.gz (8.0 kB view details)

Uploaded Source

File details

Details for the file jk_version-0.2022.1.29.tar.gz.

File metadata

  • Download URL: jk_version-0.2022.1.29.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.26.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.10

File hashes

Hashes for jk_version-0.2022.1.29.tar.gz
Algorithm Hash digest
SHA256 0980d924430ca4bed162cdb2987d7307bd6ec5bc93fb8bbe2547a840eabd1b26
MD5 4c6c5ff405ccf1f643cf078d909b7bc1
BLAKE2b-256 179caa6e7f1e3f3db43dc732b70fa0e1ea352c7a150b666c66c75e86f34e63d5

See more details on using hashes here.

Supported by

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