version#


class Version(package)[source]#

Bases: object

Assists in checking the version of a Python package based on the __version__ attribute

Parameters:

package – the package object

is_at_least(*components: int)[source]#

Checks this version against the given version components. This version object must contain at least the respective number of components

Parameters:

components – version components in order (i.e. major, minor, patch, etc.)

Returns:

True if the version is at least the given version, False otherwise

is_at_most(*components: int)[source]#

Checks this version against the given version components. This version object must contain at least the respective number of components

Parameters:

components – version components in order (i.e. major, minor, patch, etc.)

Returns:

True if the version is at most the given version, False otherwise

is_equal(*components: int)[source]#

Checks this version against the given version components. This version object must contain at least the respective number of components

Parameters:

components – version components in order (i.e. major, minor, patch, etc.)

Returns:

True if the version is the given version, False otherwise