bundles / astropy latest / astropy / utils / introspection / minversion
function
astropy.utils.introspection:minversion
source: /astropy/utils/introspection.py :91
Signature
def minversion ( module : ModuleType | str , version : str , inclusive : bool = True ) → bool Summary
Returns True if the specified Python module satisfies a minimum version requirement, and False if not.
Parameters
module: module or `str`An imported module of which to check the version, or the name of that module (in which case an import of that module is attempted-- if this fails
Falseis returned).version: `str`The version as a string that this module must have at a minimum (e.g.
'0.12').inclusive: `bool`The specified version meets the requirement inclusively (i.e.
>=) as opposed to strictly greater than (default:True).
Examples
import astropy minversion(astropy, '0.4.4')✓
True
Aliases
-
astropy.utils.minversion