satorbis_kit.clients.airflow module¶
Airflow API client for workflow orchestration.
- exception satorbis_kit.clients.airflow.AirflowAPIError(*args: Any, **kwargs: Any)[source]¶
Bases:
RequestExceptionError raised for Airflow API related failures.
Subclasses
requests.exceptions.RequestExceptionso callers can either catch this specific type or treat it as a generic requests error.
- class satorbis_kit.clients.airflow.AirflowClient(base_url: str, username: str, password: str)[source]¶
Bases:
objectClient for communicating with Airflow API.
This class handles all HTTP communication with Airflow API for submitting and tracking DAG runs. It can be used across different modules in the package.
- base_url¶
Base URL for Airflow API
- username¶
Username for basic authentication
- password¶
Password for basic authentication
- session¶
Requests session with authentication configured
- TIMEOUT = 30¶
- VERIFY_SSL = True¶
- get_dag_run_status(dag_id: str, dag_run_id: str) Dict[str, Any][source]¶
Get status of a DAG run.
- Parameters:
dag_id – DAG identifier
dag_run_id – DAG run ID to query
- Returns:
Dictionary with DAG run status information
- Raises:
AirflowAPIError – If API request fails
- trigger_dag_run(dag_id: str, config: Dict[str, Any], timeout: int = None) Dict[str, Any][source]¶
Trigger a DAG run with configuration.
- Parameters:
dag_id – DAG identifier
config – Configuration dictionary to pass to the DAG (already formatted)
timeout – Optional timeout override (uses class default if not provided)
- Returns:
Dictionary with DAG run response including dag_run_id
- Raises:
AirflowAPIError – If API request fails