compare_version#
- compare_version(lib: str | Version, version_to_check: str, operator: str) bool [source]#
Compare the version of a librarie to a reference, giving the operator.
- Parameters:
- Returns:
True if the comparison between the version of the library and the reference version is respected
- Return type:
Example
>>> compare_version("geopandas", "0.10.0", ">=") True >>> compare_version(sertit.__version__, "1.0.0", ">=") True