genvid.toolbox.sdk_folder

Constants

GENVID_SDK_FOLDER_GUARD_FILENAME Name of the guard file that must be present at the root of the Genvid MILE SDK installation folder.
RE_VERSION_MATCH Compiled regular expression object.

Functions

get_sdk_default_installation(() -> str) Returns the default Genvid MILE SDK installation registered.
get_sdk_version((folder: pathlib.Path) -> str) Return the version of the Genvid MILE SDK pointed to by folder.
list_registered_sdk(…) Returns all registered Genvid MILE SDK installations.
search_for_guardfile(…) Lookup for a guard file in start_dir or its parents.
set_sdk_default_installation(…) Set the default Genvid MILE SDK installation registered.
genvid.toolbox.sdk_folder.GENVID_SDK_FOLDER_GUARD_FILENAME = 'THIS_IS_GENVID_SDK_FOLDER'

Name of the guard file that must be present at the root of the Genvid MILE SDK installation folder.

To be valid, the file must contain a valid version number.

Changed in version 1.40.0: Moved from BaseTool to this module.

See also

RE_VERSION_MATCH

genvid.toolbox.sdk_folder.RE_VERSION_MATCH = re.compile('(?P<version>(\\d+).(\\d+).(\\d+).(\\d+))')

A compiled regular expression that match a valid Genvid MILE SDK version number.

genvid.toolbox.sdk_folder.get_sdk_default_installation() → str

Returns the default Genvid MILE SDK installation registered.

See also

GENVID_SDK_FOLDER.

genvid.toolbox.sdk_folder.set_sdk_default_installation(sdkpath: pathlib.Path)

Set the default Genvid MILE SDK installation registered.

Parameters:sdkpath – The new folder path to set. No validation is done on the path.
genvid.toolbox.sdk_folder.get_sdk_version(folder: pathlib.Path) → str

Return the version of the Genvid MILE SDK pointed to by folder.

Parameters:

folder – The folder to check for the Genvid MILE SDK version.

Raises:
Returns:

The Genvid MILE SDK version.

genvid.toolbox.sdk_folder.list_registered_sdk() → typing.Iterable[typing.Tuple[str, str]]

Returns all registered Genvid MILE SDK installations.

Returns:An iterable of tuple of the name of the Genvid MILE SDK and its installation folder.
genvid.toolbox.sdk_folder.search_for_guardfile(start_dir: pathlib.Path, *, guardfile: str = 'THIS_IS_GENVID_SDK_FOLDER') → typing.Optional[str]

Lookup for a guard file in start_dir or its parents.

Parameters:
  • start_dir – The folder to lookup.
  • guardfile – The guard file to find.