Registry / serialization / awesomeversion

awesomeversion

JSON →
library25.8.0pypypi✓ verified 23d ago

AwesomeVersion is a Python library designed to parse, compare, and manage various version formats, acting as a universal solution for version string manipulation. It allows making anything a version object and comparing it against a wide range of other version formats. The library is actively maintained with frequent releases, often multiple times a month, providing continuous improvements and new features.

pip install awesomeversion
INSTALL
IMPORT
SIG · AWESOMEVERSION
A
awesomeversion
serializationpythonv25.8.0
Install
1.5s avg
Import
51ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v25.8.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.054s · 17.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.048s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AwesomeVersion
from awesomeversion import AwesomeVersion

Initialize `AwesomeVersion` objects and use them for comparisons, attribute access (like checking for beta status), and range checks. This demonstrates the core functionality of parsing and comparing version strings.

from awesomeversion import AwesomeVersion # Basic comparison current = AwesomeVersion("1.2.2") upstream = AwesomeVersion("1.2.3") print(f"Is upstream newer than current? {upstream > current}") # Version with a pre-release tag version_beta = AwesomeVersion("1.2.3b0") print(f"Is version_beta a beta release? {version_beta.beta}") # Check if a version is within a range range_check = AwesomeVersion("1.5.0").in_range("1.0.0", "2.0.0") print(f"Is 1.5.0 in range 1.0.0-2.0.0? {range_check}")
awesomeversion --version
Debug
Known issues
breakingSupport for Python 3.8 was officially removed. Projects using AwesomeVersion 25.5.0 or newer must run on Python 3.9 or later.
fix
Upgrade your Python environment to version 3.9 or higher.
affects: >=25.5.0
breakingThe use of positional arguments when creating an `AwesomeVersion` object was deprecated in version 22.8.0 and completely removed in version 24.6.0. Attempting to use positional arguments will now raise an error.
fix
Always use keyword arguments (e.g., `AwesomeVersion(version='1.2.3', ensure_strategy=True)`) when initializing `AwesomeVersion`.
affects: >=24.6.0
breakingThe `AwesomeVersion.ensure_strategy` method was deprecated and subsequently removed in version 22.6.0. Direct calls to this method will no longer work.
fix
Instead of directly calling `ensure_strategy`, pass `ensure_strategy=True` or `find_first_match=True` as keyword arguments to the `AwesomeVersion` constructor if you need this functionality.
affects: >=22.6.0
gotchaWhen using `find_first_match` without explicitly setting an `ensure_strategy` in the `AwesomeVersion` constructor, the library attempts to auto-detect the version strategy. This implicit behavior can lead to unexpected parsing if the auto-detected strategy doesn't match your expectation, making it a potential footgun for robust version parsing. Warnings regarding this behavior were added in 22.8.0 and clarified in 24.6.0.
fix
Always explicitly provide the `ensure_strategy` argument (e.g., `ensure_strategy='semver'`) when using `find_first_match` to guarantee the desired parsing behavior.
affects: All versions when using `find_first_match` implicitly
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'awesomeversion'
The 'awesomeversion' package is not installed in the Python environment.
fix
Install the package using pip: 'pip install awesomeversion'.
ImportError: cannot import name 'AwesomeVersion' from 'awesomeversion'
The 'awesomeversion' package is installed, but the 'AwesomeVersion' class cannot be imported, possibly due to an incorrect import statement or installation issue.
fix
Ensure the correct import statement: 'from awesomeversion import AwesomeVersion'. If the issue persists, reinstall the package: 'pip install --force-reinstall awesomeversion'.
TypeError: '>' not supported between instances of 'AwesomeVersion' and 'str'
Attempting to compare an 'AwesomeVersion' object directly with a string without proper conversion.
fix
Ensure both operands are 'AwesomeVersion' instances: 'AwesomeVersion('1.2.3') > AwesomeVersion('1.2.2')'.
AttributeError: 'AwesomeVersion' object has no attribute 'major'
Accessing a non-existent attribute 'major' on an 'AwesomeVersion' object.
fix
Use the correct attribute name: 'AwesomeVersion('1.2.3').major'.
ValueError: Invalid version string: '1.2.3-beta'
Providing an improperly formatted version string to 'AwesomeVersion'.
fix
Ensure the version string is correctly formatted: 'AwesomeVersion('1.2.3b0')'.
Upgrade
Version history
25.8.0latest on PyPI · released Aug 3, 2025
Audit
Dependencies
pythonrequiredMinimum Python version required for the library.
Agent activity
25 hits · last 30 days
node
22
OpenAI (training)
1
Resources
awesomeversion — pip install awesomeversion · libregistry