dataflow.registry.lazy_core¶

Lazy-loading Registry System for Haive.

This module provides a lazy-loading version of the registry system that only initializes the Supabase connection when actually needed, preventing heavy initialization at import time.

The lazy registry system maintains the same interface as the original but defers expensive operations until they’re actually used.

Classes¶

LazyRegistrySystem

Lazy-loading registry system that initializes components on-demand.

Functions¶

get_registry_system()

Get the singleton registry system instance.

Module Contents¶

class dataflow.registry.lazy_core.LazyRegistrySystem¶

Lazy-loading registry system that initializes components on-demand.

This class provides the same interface as RegistrySystem but defers expensive initialization (like Supabase connection) until actually needed.

Initialize the lazy registry system without heavy operations.

add_configuration(registry_id, config_type, config_data)¶

Add configuration to an entity (lazy initialization).

Parameters:
  • registry_id (str)

  • config_type (str)

  • config_data (dict[str, Any])

Return type:

str

get_configurations(registry_id)¶

Get all configurations for an entity (lazy initialization).

Parameters:

registry_id (str)

Return type:

list[dict[str, Any]]

get_entities_by_type(entity_type)¶

Get all entities of a specific type (lazy initialization).

Parameters:

entity_type (haive.dataflow.registry.registry.models.EntityType)

Return type:

list[dict[str, Any]]

get_entity(entity_id)¶

Get a specific entity by ID (lazy initialization).

Parameters:

entity_id (str)

Return type:

dict[str, Any] | None

register_entity(name, type, description='', module_path='', class_name='', metadata=None, **kwargs)¶

Register a new entity (lazy initialization).

Parameters:
  • name (str)

  • type (haive.dataflow.registry.registry.models.EntityType)

  • description (str)

  • module_path (str)

  • class_name (str)

  • metadata (dict[str, Any] | None)

Return type:

str

search_entities(query, entity_type=None, metadata_filter=None)¶

Search entities by query (lazy initialization).

Parameters:
  • query (str)

  • entity_type (haive.dataflow.registry.registry.models.EntityType | None)

  • metadata_filter (dict[str, Any] | None)

Return type:

list[dict[str, Any]]

dataflow.registry.lazy_core.get_registry_system()¶

Get the singleton registry system instance.

Return type:

LazyRegistrySystem