Skip to main content

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

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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: looseversion-1.1.2.tar.gz
  • Upload date:
  • Size: 8.4 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.2.tar.gz
Algorithm Hash digest
SHA256 94d80bdbd0b6d57c11b886147ba1601f7d1531571621b81933b34537cbe469ad
MD5 c7f097fb8d8784f96967dbfe5d54acaa
BLAKE2b-256 703ba9a0f6067609a2db173ac3b0c5ec18a91512a49dcd71f0ec01f5298a37f8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: looseversion-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.2

File hashes

Hashes for looseversion-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9f5b29d9a230f7fd9ef9275b729d6454a03b4a8d5b6e1622d1ca9860ad415c9e
MD5 a1288ad5e3a659d8d4b5be90b6c2521d
BLAKE2b-256 ef01c12a04269340d7e2b904e9dd1d2df6b165871514ae63aec53baf19660c0d

See more details on using hashes here.

Release history Release notifications | RSS feed

1.3.0

2 files

1.2.0

2 files

This release

1.1.2 This release

2 files

1.1.1

2 files

1.1.0

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page