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

pyrevit.versionmgr.about

Utility module for pyRevit project information.

Example

>>> from pyrevit.versionmgr import about
>>> a = about.get_pyrevit_about()
>>> a.subtitle
... 'python RAD Environment for Autodesk Revit®'
>>> a.copyright
... '© 2014-2019 Ehsan Iran-Nejad'
class pyrevit.versionmgr.about.PyRevitAbout(subtitle, madein, copyright)

pyRevit project info tuple.

subtitle

project subtitle

Type:str
madein

project made-in info

Type:str
copyright

project copyright info

Type:str
copyright

Alias for field number 2

madein

Alias for field number 1

subtitle

Alias for field number 0

pyrevit.versionmgr.about.get_pyrevit_about()

Return information about pyRevit project.

Returns:pyRevit project info tuple
Return type:PyRevitAbout

pyrevit.versionmgr.updater

Handle updating pyRevit repository and its extensions.

pyrevit.versionmgr.updater.check_for_updates()

Check whether any available repo has pending updates.

pyrevit.versionmgr.updater.get_all_extension_repos()

Return a list of repos for all installed extensions.

pyrevit.versionmgr.updater.get_thirdparty_ext_repos()

Return a list of repos for installed third-party extensions.

pyrevit.versionmgr.updater.get_updates(repo_info)

Fetch updates on repository.

Parameters:repo_info (pyrevit.coreutils.git.RepoInfo) – repository info wrapper object
pyrevit.versionmgr.updater.has_core_updates()

Check whether pyRevit repo has core updates.

This would require host application to be closed to release the file lock of core DLLs so they can be updated separately.

pyrevit.versionmgr.updater.has_pending_updates(repo_info)

Check for updates on repository.

Parameters:repo_info (pyrevit.coreutils.git.RepoInfo) – repository info wrapper object
pyrevit.versionmgr.updater.update_pyrevit()

Update pyrevit and its extension repositories.

pyrevit.versionmgr.updater.update_repo(repo_info)

Update repository.

Parameters:repo_info (pyrevit.coreutils.git.RepoInfo) – repository info wrapper object

pyrevit.versionmgr.upgrade

Perform upgrades between version, e.g. adding a new config parameter

pyrevit.versionmgr.upgrade.upgrade_existing_pyrevit()

Upgrade existing pyRevit deployment.

pyrevit.versionmgr.upgrade.upgrade_user_config(user_config)

Upgarde user configurations.

Parameters: