pyrevit.versionmgr

Utility functions for managing pyRevit versions.

Example

>>> from pyrevit import versionmgr
>>> v = versionmgr.get_pyrevit_version()
>>> v.get_formatted()
... '4.10-beta2'
class pyrevit.versionmgr._PyRevitVersion(patch_number)

pyRevit version wrapper.

Parameters:patch_number (str) – patch value
as_int_tuple()

Returns version as an int tuple (major, minor, patch)

as_str_tuple()

Returns version as an string tuple (‘major’, ‘minor’, ‘patch’)

get_formatted(nopatch=False)

Returns ‘major.minor:patch’ in string

pyrevit.versionmgr.get_pyrevit_cli_version()

Return version of shipped pyRevit CLI utility.

Returns:version string of pyRevit CLI utility binary
Return type:str
pyrevit.versionmgr.get_pyrevit_repo()

Return pyRevit repository.

Returns:repo wrapper object
Return type:pyrevit.coreutils.git.RepoInfo
pyrevit.versionmgr.get_pyrevit_version()

Return information about active pyRevit version.

Returns:version wrapper object
Return type:_PyRevitVersion