# libtmux._vendor.version.Version

- **Module:** libtmux._vendor.version
- **Package:** libtmux
- **Language:** Python
- **Kind:** class
- **Source:** https://github.com/tmux-python/libtmux/blob/036c521c4b83ce6e434eb50afe2a0d08a6a05e46/src/libtmux/_vendor/version.py#L173
- **Page:** https://libtmux.org/reference/py/libtmux-_vendor-version-version/

Class abstracts handling of a project's versions.

A :class:`Version` instance is comparison aware and can be compared and
sorted using the standard Python interfaces.

>>> v1 = Version("1.0a5")
>>> v2 = Version("1.0")
>>> v1
<Version('1.0a5')>
>>> v2
<Version('1.0')>
>>> v1 < v2
True
>>> v1 == v2
False
>>> v1 > v2
False
>>> v1 >= v2
False
>>> v1 <= v2
True

## Members

- `_regex` (attribute)
- `__init__` (method) — Initialize a Version object.
- `__repr__` (method) — Return representation of the Version that shows all internal state.
- `__str__` (method) — Return string representation of the version that can be rounded-tripped.
- `epoch` (property) — The epoch of the version.
- `release` (property) — The components of the "release" segment of the version.
- `pre` (property) — The pre-release segment of the version.
- `post` (property) — The post-release number of the version.
- `dev` (property) — The development number of the version.
- `local` (property) — The local version segment of the version.
- `public` (property) — The public portion of the version.
- `base_version` (property) — The "base version" of the version.
- `is_prerelease` (property) — Whether this version is a pre-release.
- `is_postrelease` (property) — Whether this version is a post-release.
- `is_devrelease` (property) — Whether this version is a development release.
- `major` (property) — The first item of :attr:`release` or ``0`` if unavailable.
- `minor` (property) — The second item of :attr:`release` or ``0`` if unavailable.
- `micro` (property) — The third item of :attr:`release` or ``0`` if unavailable.
- `_key` (attribute)
- `__hash__` (method)
- `__lt__` (method)
- `__le__` (method)
- `__eq__` (method)
- `__ge__` (method)
- `__gt__` (method)
- `__ne__` (method)
