hezar.utils.integration_utils module

hezar.utils.integration_utils.check_dependencies(backends: list[Backends | str])[source]

A wrapper function to verify if the dependencies of the function are installed.

Parameters:

backends – A list of dependencies.

hezar.utils.integration_utils.get_lib_version(lib: str)[source]
hezar.utils.integration_utils.is_backend_available(backend: Backends)[source]

Check if the backend package is installed or not

Parameters:

backend – Package name

Returns:

Whether the package is available or not

hezar.utils.integration_utils.verify_dependencies(obj, backends: List[str | Backends] | None = None)[source]

Check if all the required dependencies are installed or not.

Parameters:
  • obj – The target object to check. (Usually self)

  • backends – A list of dependency names of type str or Backends

Raises:

ModuleNotFoundError