File size: 1,008 Bytes
3232d64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"""
Base API client module for Mezura.
"""

import logging
from typing import Dict, Any, Optional, Type

# Create logger
logger = logging.getLogger(__name__)

class APIClient:
    """Base class for API clients."""
    
    def __init__(self):
        """Initialize the API client."""
        pass

def get_api_client(evaluation_type: str = None) -> Optional[Any]:
    """
    Get the appropriate API client for the given evaluation type.
    
    Args:
        evaluation_type: The type of evaluation (unused, always returns AirflowClient)
        
    Returns:
        Optional[Any]: An instance of the AirflowClient, or None if not available
    """
    try:
        # Import here to avoid circular imports
        from api.clients.airflow_client import AirflowClient
        
        # Always return AirflowClient as it's the only client used in the application
        return AirflowClient()
        
    except Exception as e:
        logger.error(f"Error creating API client: {e}")
        return None