Skip to main content

Version numbering for anarchists and software realists

Project description

looseversion - Version numbering for anarchists and software realists

A backwards/forwards-compatible fork of distutils.version.LooseVersion, for times when PEP-440 isn't what you need.

The goal of this package is to be a drop-in replacement for the original LooseVersion. It implements an identical interface and comparison logic to LooseVersion. The only major change is that a looseversion.LooseVersion is comparable to a distutils.version.LooseVersion, which means tools should not need to worry whether all dependencies that use LooseVersion have migrated.

If you are simply comparing versions of Python packages, consider moving to packaging.version.Version, which follows PEP-440. LooseVersion is better suited to interacting with heterogeneous version schemes that do not follow PEP-440.

Installation

From PyPI

pip install looseversion

From source

git clone https://github.com/effigies/looseversion.git
pip install looseversion/

Usage

>>> from looseversion import LooseVersion
>>> LooseVersion("1.0.0") < LooseVersion("2.0.0")
True
>>> LooseVersion("1.0.0") < "2"
True

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

looseversion-1.1.1.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

looseversion-1.1.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: looseversion-1.1.1.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.2

File hashes

Hashes for looseversion-1.1.1.tar.gz
Algorithm Hash digest
SHA256 c53cd228f8ceecd791f6ba9918ad750952afa672c4c896488e6297e6f72143fc
MD5 2038cf7fe57e53c4f5d45a23fbb814d6
BLAKE2b-256 091737797c68fa9d66b55c2a80fd2056d3d56cb3851eb8dd2f1b12273f1245ff

See more details on using hashes here.

File details

Details for the file looseversion-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for looseversion-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dabdb6cd7f30981d49e202b2514ac07ad79ae6eb28ff94a9dd780d5981a957b9
MD5 bb75f1ae97052f5456b9bec2b62d0302
BLAKE2b-256 f252bc9bd18bd7b14a82f686245e5e31c0f9b94c94ea761869d5cab35ad903dd

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