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

Uploaded Source

Built Distribution

looseversion-1.0.3-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for looseversion-1.0.3.tar.gz
Algorithm Hash digest
SHA256 035288860e1afe67d63ea9c700dd9d095c724e2e5722a39029dd91652d4316ed
MD5 e4a9d84a436af26ad3e838d3f59498a5
BLAKE2b-256 0ee8f18d7af585a2cc948a26b5e2dedc69729213d201525f79685050f6d621a5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for looseversion-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 670a84dd6ac4d6131ed646751bcfdd9d11d8b26f311ff6d66cd6bedd9b6d4a85
MD5 2606b07988057f764f3b7ffc8434d1b8
BLAKE2b-256 693d75367c0634b05deb049582b31215fef2b596a49fcf0bbcd11eff98fb26a3

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