apache_airflow_providers_imednet.hooks package

Airflow hook for retrieving an ImednetSDK instance.

class apache_airflow_providers_imednet.hooks.ImednetHook[source]

Bases: BaseHook

Retrieve an ImednetSDK instance from an Airflow connection.

__init__(imednet_conn_id='imednet_default')[source]

Initialize the Imednet hook.

Parameters:

imednet_conn_id (str) –

Return type:

None

describe_connection()[source]

Return redacted primitive metadata about resolved hook configuration.

Return type:

dict[str, str | int | float | bool | list[PrimitiveContainer] | dict[str, PrimitiveContainer] | None]

async get_async_conn()[source]

Return an authenticated AsyncImednetSDK for async triggers and tasks.

Return type:

AsyncImednetSDK

get_base_url()[source]

Return redacted iMednet API base URL for lineage/inspection without requiring secrets.

Return type:

str

get_conn()[source]

Return an authenticated ImednetSDK instance adhering to the Airflow BaseHook contract.

Return type:

ImednetSDK

get_sdk_client()[source]

Return an SDK client for use within task execution context.

Direct alias for get_conn().

Return type:

ImednetSDK

classmethod get_ui_field_behaviour()[source]

Return Airflow UI connection form customizations for imednet.

Return type:

dict[str, Any]

list_studies_metadata()[source]

Return primitive, serialization-safe study metadata for task mapping.

Return type:

list[dict[str, str | int | float | bool | list[PrimitiveContainer] | dict[str, PrimitiveContainer] | None]]

list_study_keys()[source]

Return primitive study keys for mapped Airflow task expansion.

Return type:

list[str]

async redact_error_message(raw_message)[source]

Redact sensitive patterns, URI credentials, and resolved connection secrets.

Parameters:

raw_message (str) –

Return type:

str

classmethod resolve_destination_connection(conn_id, destination)[source]

Resolve destination sink or SQL connection settings at task runtime.

Parameters:
  • conn_id (str) –

  • destination (str) –

Return type:

dict[str, Any]

test_connection()[source]

Validate connectivity and credentials against the configured iMednet Study endpoint.

Return type:

tuple[bool, str]