yera.setup.model_discovery.registry

Find model setup operations for configured provider connections.

Symbols

def find_model_setups — Find model setup operations for configured provider connections.
def get_model_setup — Get model setup bound to one provider connection.

find_model_setups

find_model_setups(
    providers: Providers,
    dependencies: Mapping[str, bool],
) → tuple[ModelSetup, ...]

Find model setup operations for configured provider connections.

One setup object is created for each configured connection belonging to an integration whose Python dependencies are available. Providers without configured connections are omitted.

Parameters

providers
type: Providers

Configured provider connections.

dependencies
type: Mapping[str, bool]

Dependency availability returned by find_dependencies.

Returns

type: ModelSetup

Model setup objects in provider presentation order and connection configuration order.

get_model_setup

get_model_setup(
    provider_type: str,
    connection_name: str,
    connection: BaseConnection,
) → ModelSetup | None

Get model setup bound to one provider connection.

Parameters

provider_type
type: str

Provider integration owning the connection.

connection_name
type: str

Name assigned to the connection.

connection
type: BaseConnection

Typed provider connection configuration.

Returns

type: ModelSetup | None

A model setup bound to the connection, or None when the provider does not support model setup.