dataflow.providers.base¶

Base provider class for the Haive Registry System.

This module defines the base provider class that all specific entity providers inherit from.

Classes¶

EntityProvider

Base class for entity providers.

Module Contents¶

class dataflow.providers.base.EntityProvider(entity_type)¶

Bases: abc.ABC

Base class for entity providers.

Entity providers are responsible for discovering, registering, and managing specific types of entities in the registry system.

Initialize the entity provider.

Parameters:

entity_type (haive.dataflow.models.EntityType) – Type of entity this provider handles

add_configuration(registry_id, config_type, config_data)¶

Add a configuration to a registry entity.

Parameters:
  • registry_id (str) – Registry entity ID

  • config_type (haive.dataflow.models.ConfigType) – Type of configuration

  • config_data (Any) – Configuration data

Return type:

None

add_dependency(registry_id, dependent_id, dependency_type)¶

Add a dependency between registry entities.

Parameters:
  • registry_id (str) – ID of the entity that depends on another

  • dependent_id (str) – ID of the entity being depended on

  • dependency_type (haive.dataflow.models.DependencyType) – Type of dependency

Return type:

None

add_environment_vars(registry_id, env_vars)¶

Add environment variables to a registry entity.

Parameters:
  • registry_id (str) – Registry entity ID

  • env_vars (dict[str, bool]) – Dictionary mapping environment variable names to required flag

Return type:

None

add_import_log(import_session, entity_name, status, message=None, traceback_str=None)¶

Add an import log entry.

Parameters:
  • import_session (str) – Import session identifier

  • entity_name (str) – Name of the entity being imported

  • status (haive.dataflow.models.ImportStatus) – Import status

  • message (str | None) – Optional message

  • traceback_str (str | None) – Optional traceback string

Return type:

None

abstractmethod discover(module_paths=None)¶

Discover and register entities.

Parameters:

module_paths (list[str] | None) – Optional list of module paths to search

Returns:

List of registered entity IDs

Return type:

list[str]

discover_modules(base_path)¶

Discover all modules under a base path.

Parameters:

base_path (str) – Base module path

Returns:

List of discovered module paths

Return type:

list[str]

abstractmethod get_default_search_paths()¶

Get default search paths for entity discovery.

Returns:

List of package paths to search

Return type:

list[str]

is_pydantic_model(obj)¶

Check if an object is a Pydantic model.

Parameters:

obj (Any) – Object to check

Returns:

True if it’s a Pydantic model, False otherwise

Return type:

bool