satorbis_kit.clients package

API clients for external services.

This module provides client classes for interacting with various external APIs such as Airflow, databases, and other services.

class satorbis_kit.clients.AirflowClient(base_url: str, username: str, password: str)[source]

Bases: object

Client 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

Submodules