Skip to main content

A library for comparing version strings

Project description

Compare package versions in all their varied glory.

[Home | GitLab | PyPI]

Description

This module provides the compare() function which compares two version strings and returns a negative value, zero, or a positive value depending on whether the first string represents a version number lower than, equal to, or higher than the second one, and the key_compare() function which may be used as a key for e.g. sorted().

This module does not strive for completeness in the formats of version strings that it supports. Some version strings sorted by its rules are:

  • 0.1.0
  • 0.2.alpha
  • 0.2
  • 0.2.1
  • 0.2a
  • 0.2a.1
  • 0.2a3
  • 0.2a4
  • 0.2p3
  • 1.0~bpo3
  • 1.0.beta
  • 1.0.beta.2
  • 1.0.beta2
  • 1.0.beta3
  • 1.0
  • 1.0.4
  • 1:0.3

See the change log (the docs/changes.md file in the source distribution) for the history of trivver development.

Contact

This module is developed in a Gitlab repository. The author is Peter Pentchev.

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

trivver-2.2.3.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

trivver-2.2.3-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file trivver-2.2.3.tar.gz.

File metadata

  • Download URL: trivver-2.2.3.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for trivver-2.2.3.tar.gz
Algorithm Hash digest
SHA256 7f450c705353e4b064fea4506dcf0cc9bb4dbce0bf4d6f57b877a445c035cbcb
MD5 dae7ea37086ebf1ddce575ca375692dd
BLAKE2b-256 6016a13c52bafc5179e62bf7d3cced567139a01bfb6af0fa82ca6050a27db571

See more details on using hashes here.

File details

Details for the file trivver-2.2.3-py3-none-any.whl.

File metadata

  • Download URL: trivver-2.2.3-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for trivver-2.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a3e4a9a83c8f044b984b6905dcf5df7622585f206fb8abf69211d0fab6adac98
MD5 235b75597cea08a84de25f9e9258b261
BLAKE2b-256 7d8395877f901c0aee41a5ccdb196a8f3dd5d1199968b09b6541b12f094348f1

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