One version package to rule them all, One version package to find them, One version package to bring them all, and in the darkness bind them.
pip install awesomeversionAwesomeVersion
One version package to rule them all, One version package to find them, One version package to bring them all, and in the darkness bind them.
Make anything a version object, and compare against a vast section of other version formats.
Installation
python3 -m pip install awesomeversion
Development
Note
Development is only supported inside the provided devcontainer (such as GitHub Codespaces or VS Code Remote - Containers). Other local or system Python environments are not supported for development or contribution. All scripts and workflows assume the devcontainer environment.
This project uses the "Scripts to Rule Them All" pattern for development tasks:
# Set up the project for development
./script/setup
# Run tests
./script/test
# Run linting and formatting
./script/lint
# Run coverage
./script/coverage
When using the devcontainer or GitHub Codespaces, a welcome message with available scripts is automatically displayed on startup.
AwesomeVersion class
The AwesomeVersion class takes a version as the first argument, you can also pass in additional kwargs to customize the version object.
| Argument | Description |
|---|---|
version | The version string to parse. |
ensure_strategy | Match the AwesomeVersion object against spesific strategies when creating if. If it does not match AwesomeVersionStrategyException will be raised |
find_first_match |