depdigest.check_dependency#

depdigest.check_dependency(module_name, pypi_name=None, caller=None, exception_class=<class 'ImportError'>, *, conda_name=<object object>, conda_channel=None, doc_url=None, kind='python', executable=None)[source]#

Check a Python module or executable only when its capability is requested.

kind='executable' checks PATH (or an explicit executable path) without importing or running the engine. conda_name=None disables the Conda installation route; an omitted name preserves the legacy default. pypi_name=None omits pip. Installation remains the user’s responsibility.

Parameters:
  • module_name (str)

  • pypi_name (str)

  • caller (str)

  • exception_class (type)

  • conda_channel (str)

  • doc_url (str)

  • kind (str)

  • executable (str | None)