Skip to main content

An example package. Checks if a version is equal to, greater or less than another version

Project description


An example package. Checks if a version is equal to, greater or less than another version

  • Free software: BSD 3-Clause License


pip install version-comparator

You can also install the in-development version with:

pip install



The goal of this question is to write a software library that accepts 2 version string as input and returns whether one is greater than, equal, or less than the other. As an example: “1.2” is greater than “1.1”.


To use Distributed LRU Cache in a project:

from version_comparator import comparator

comparator.compare_versions('1.2.1', '1.2.1')


0: The version are equal
1: The version is greater then the other version
-1: The version is less than the other version


To run the all tests run:


Note, to combine the coverage data from all the tox environments run:

set PYTEST_ADDOPTS=--cov-append
PYTEST_ADDOPTS=--cov-append tox


0.0.1 (2020-01-29)

  • First release on PyPI.

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

version-comparator-0.0.2.tar.gz (9.4 kB view hashes)

Uploaded source

Built Distribution

version_comparator-0.0.2-py2.py3-none-any.whl (5.2 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page