check_component

Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.

check_component(name: str, domain: str) → bool[source]

Return whether name is registered in a HABIT plugin domain.

This is a lightweight pre-flight check before building a HabitatSpec or calling list_plugins(). It resolves the domain through the same registry mapping used by the plugin discovery API.

Parameters:
  • name – Registered implementation name (e.g. "kmeans", "slic").

  • domain – Plugin domain key (e.g. "habitat_model_fitter", "supervoxelizer"). See list_plugins() for the supported domain names.

Returns:

True when name appears in the domain registry; False when the domain is unknown or the name is not registered.