Python API#
Functions for importing Python packages and modules with enhanced error handling and deprecation notices.
- deprecated(
- obj: _F | None = None,
- reason: str | None = None,
- replacement: str | None = None,
- removal_version: str | None = None,
Mark a public function or class as deprecated.
- Parameters:
obj – Function or class to decorate when used as
@deprecated.reason – Optional explanation for the deprecation.
replacement – Optional replacement API name or import path.
removal_version – Optional version when the symbol is expected to be removed.
- Returns:
A decorated function/class, or a decorator when called with keyword arguments.
Example:
>>> import isaacsim.core.deprecation_manager as deprecation_manager >>> >>> @deprecation_manager.deprecated(replacement="new_function", removal_version="6.0") ... def old_function(): ... return new_function()
- import_module(name: str) ModuleType#
Try to import a Python package/module and return it.
If a package or module is not found, an error message will be logged and the application will exit. A notice with further instructions will also be logged for the following packages:
torch
- Parameters:
name – The name of the package/module to import.
- Returns:
The imported module.
Example:
>>> from isaacsim.core.deprecation_manager import import_module >>> >>> numpy = import_module("numpy")