get_extension_name#
- omni.ext.get_extension_name(ext_id: str) str #
Extract the extension name from extension id. E.g. omni.foo-1.2.3 -> omni.foo
- Parameters:
ext_id (str) – The full extension identifier in the format ‘name[-tag]-version’. Examples: ‘omni.foo-1.2.3’, ‘omni.bar-tag-2.0.1’
- Returns:
- The extension name including any tag, but excluding the version.
Examples: ‘omni.foo’, ‘omni.bar-tag’
- Return type:
str
Examples
>>> get_extension_name('omni.foo-1.2.3') 'omni.foo' >>> get_extension_name('omni.bar-tag-2.0.1') 'omni.bar-tag' >>> get_extension_name('simple.ext-0.1.0') 'simple.ext'