SemanticVersion

class SemanticVersion(major, minor=0, patch=0)[source]

Parses a (semantic) version number given by major.minor.patch.

Semantic versioning is a standard defined by https://semver.org/ with the following increments:

major

When you make breaking changes

minor

When you add functionality in a backwards compatible manner

patch

When you make backwards compatible changes

Methods

__init__(major[, minor, patch])

count(value, /)

Return number of occurrences of value.

index(value[, start, stop])

Return first index of value.

Attributes

major

minor

patch