wallaroo.wallaroo_ml_ops_api_client.api.explainability.explainability_get_status API documentation

# wallaroo.wallaroo_ml_ops_api_client.api.explainability.explainability_get_status

View Source

      1from typing import Any, Dict, Optional, Union
      2
      3import httpx
      4
      5from ...client import Client
      6from ...models.explainability_get_status_response_200 import \
      7    ExplainabilityGetStatusResponse200
      8from ...models.explainability_get_status_response_400 import \
      9    ExplainabilityGetStatusResponse400
     10from ...models.explainability_get_status_response_401 import \
     11    ExplainabilityGetStatusResponse401
     12from ...models.explainability_get_status_response_500 import \
     13    ExplainabilityGetStatusResponse500
     14from ...types import Response
     15
     16
     17def _get_kwargs(
     18    *,
     19    client: Client,
     20
     21) -> Dict[str, Any]:
     22    url = "{}/v1/api/explainability/get_status".format(
     23        client.base_url)
     24
     25    headers: Dict[str, str] = client.get_headers()
     26    cookies: Dict[str, Any] = client.get_cookies()
     27
     28
     29
     30
     31
     32
     33
     34
     35
     36
     37
     38    return {
     39	    "method": "post",
     40        "url": url,
     41        "headers": headers,
     42        "cookies": cookies,
     43        "timeout": client.get_timeout(),
     44    }
     45
     46
     47def _parse_response(*, response: httpx.Response) -> Optional[Union[ExplainabilityGetStatusResponse200, ExplainabilityGetStatusResponse400, ExplainabilityGetStatusResponse401, ExplainabilityGetStatusResponse500]]:
     48    if response.status_code == 500:
     49        response_500 = ExplainabilityGetStatusResponse500.from_dict(response.json())
     50
     51
     52
     53        return response_500
     54    if response.status_code == 400:
     55        response_400 = ExplainabilityGetStatusResponse400.from_dict(response.json())
     56
     57
     58
     59        return response_400
     60    if response.status_code == 401:
     61        response_401 = ExplainabilityGetStatusResponse401.from_dict(response.json())
     62
     63
     64
     65        return response_401
     66    if response.status_code == 200:
     67        response_200 = ExplainabilityGetStatusResponse200.from_dict(response.json())
     68
     69
     70
     71        return response_200
     72    return None
     73
     74
     75def _build_response(*, response: httpx.Response) -> Response[Union[ExplainabilityGetStatusResponse200, ExplainabilityGetStatusResponse400, ExplainabilityGetStatusResponse401, ExplainabilityGetStatusResponse500]]:
     76    return Response(
     77        status_code=response.status_code,
     78        content=response.content,
     79        headers=response.headers,
     80        parsed=_parse_response(response=response),
     81    )
     82
     83
     84def sync_detailed(
     85    *,
     86    client: Client,
     87
     88) -> Response[Union[ExplainabilityGetStatusResponse200, ExplainabilityGetStatusResponse400, ExplainabilityGetStatusResponse401, ExplainabilityGetStatusResponse500]]:
     89    """Get explainability status
     90
     91     Get the status of the explainability feature.
     92
     93    Returns:
     94        Response[Union[ExplainabilityGetStatusResponse200, ExplainabilityGetStatusResponse400, ExplainabilityGetStatusResponse401, ExplainabilityGetStatusResponse500]]
     95    """
     96
     97
     98    kwargs = _get_kwargs(
     99        client=client,
    100
    101    )
    102
    103    response = httpx.request(
    104        verify=client.verify_ssl,
    105        **kwargs,
    106    )
    107
    108    return _build_response(response=response)
    109
    110def sync(
    111    *,
    112    client: Client,
    113
    114) -> Optional[Union[ExplainabilityGetStatusResponse200, ExplainabilityGetStatusResponse400, ExplainabilityGetStatusResponse401, ExplainabilityGetStatusResponse500]]:
    115    """Get explainability status
    116
    117     Get the status of the explainability feature.
    118
    119    Returns:
    120        Response[Union[ExplainabilityGetStatusResponse200, ExplainabilityGetStatusResponse400, ExplainabilityGetStatusResponse401, ExplainabilityGetStatusResponse500]]
    121    """
    122
    123
    124    return sync_detailed(
    125        client=client,
    126
    127    ).parsed
    128
    129async def asyncio_detailed(
    130    *,
    131    client: Client,
    132
    133) -> Response[Union[ExplainabilityGetStatusResponse200, ExplainabilityGetStatusResponse400, ExplainabilityGetStatusResponse401, ExplainabilityGetStatusResponse500]]:
    134    """Get explainability status
    135
    136     Get the status of the explainability feature.
    137
    138    Returns:
    139        Response[Union[ExplainabilityGetStatusResponse200, ExplainabilityGetStatusResponse400, ExplainabilityGetStatusResponse401, ExplainabilityGetStatusResponse500]]
    140    """
    141
    142
    143    kwargs = _get_kwargs(
    144        client=client,
    145
    146    )
    147
    148    async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
    149        response = await _client.request(
    150            **kwargs
    151        )
    152
    153    return _build_response(response=response)
    154
    155async def asyncio(
    156    *,
    157    client: Client,
    158
    159) -> Optional[Union[ExplainabilityGetStatusResponse200, ExplainabilityGetStatusResponse400, ExplainabilityGetStatusResponse401, ExplainabilityGetStatusResponse500]]:
    160    """Get explainability status
    161
    162     Get the status of the explainability feature.
    163
    164    Returns:
    165        Response[Union[ExplainabilityGetStatusResponse200, ExplainabilityGetStatusResponse400, ExplainabilityGetStatusResponse401, ExplainabilityGetStatusResponse500]]
    166    """
    167
    168
    169    return (await asyncio_detailed(
    170        client=client,
    171
    172    )).parsed

def sync_detailed( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client) -> wallaroo.wallaroo_ml_ops_api_client.types.Response[typing.Union[wallaroo.wallaroo_ml_ops_api_client.models.explainability_get_status_response_200.ExplainabilityGetStatusResponse200, wallaroo.wallaroo_ml_ops_api_client.models.explainability_get_status_response_400.ExplainabilityGetStatusResponse400, wallaroo.wallaroo_ml_ops_api_client.models.explainability_get_status_response_401.ExplainabilityGetStatusResponse401, wallaroo.wallaroo_ml_ops_api_client.models.explainability_get_status_response_500.ExplainabilityGetStatusResponse500]]: View Source

     85def sync_detailed(
     86    *,
     87    client: Client,
     88
     89) -> Response[Union[ExplainabilityGetStatusResponse200, ExplainabilityGetStatusResponse400, ExplainabilityGetStatusResponse401, ExplainabilityGetStatusResponse500]]:
     90    """Get explainability status
     91
     92     Get the status of the explainability feature.
     93
     94    Returns:
     95        Response[Union[ExplainabilityGetStatusResponse200, ExplainabilityGetStatusResponse400, ExplainabilityGetStatusResponse401, ExplainabilityGetStatusResponse500]]
     96    """
     97
     98
     99    kwargs = _get_kwargs(
    100        client=client,
    101
    102    )
    103
    104    response = httpx.request(
    105        verify=client.verify_ssl,
    106        **kwargs,
    107    )
    108
    109    return _build_response(response=response)

Get explainability status

Get the status of the explainability feature.

Returns: Response[Union[ExplainabilityGetStatusResponse200, ExplainabilityGetStatusResponse400, ExplainabilityGetStatusResponse401, ExplainabilityGetStatusResponse500]]

def sync( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client) -> Union[wallaroo.wallaroo_ml_ops_api_client.models.explainability_get_status_response_200.ExplainabilityGetStatusResponse200, wallaroo.wallaroo_ml_ops_api_client.models.explainability_get_status_response_400.ExplainabilityGetStatusResponse400, wallaroo.wallaroo_ml_ops_api_client.models.explainability_get_status_response_401.ExplainabilityGetStatusResponse401, wallaroo.wallaroo_ml_ops_api_client.models.explainability_get_status_response_500.ExplainabilityGetStatusResponse500, NoneType]: View Source

    111def sync(
    112    *,
    113    client: Client,
    114
    115) -> Optional[Union[ExplainabilityGetStatusResponse200, ExplainabilityGetStatusResponse400, ExplainabilityGetStatusResponse401, ExplainabilityGetStatusResponse500]]:
    116    """Get explainability status
    117
    118     Get the status of the explainability feature.
    119
    120    Returns:
    121        Response[Union[ExplainabilityGetStatusResponse200, ExplainabilityGetStatusResponse400, ExplainabilityGetStatusResponse401, ExplainabilityGetStatusResponse500]]
    122    """
    123
    124
    125    return sync_detailed(
    126        client=client,
    127
    128    ).parsed

Get explainability status

Get the status of the explainability feature.

Returns: Response[Union[ExplainabilityGetStatusResponse200, ExplainabilityGetStatusResponse400, ExplainabilityGetStatusResponse401, ExplainabilityGetStatusResponse500]]

async def asyncio_detailed( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client) -> wallaroo.wallaroo_ml_ops_api_client.types.Response[typing.Union[wallaroo.wallaroo_ml_ops_api_client.models.explainability_get_status_response_200.ExplainabilityGetStatusResponse200, wallaroo.wallaroo_ml_ops_api_client.models.explainability_get_status_response_400.ExplainabilityGetStatusResponse400, wallaroo.wallaroo_ml_ops_api_client.models.explainability_get_status_response_401.ExplainabilityGetStatusResponse401, wallaroo.wallaroo_ml_ops_api_client.models.explainability_get_status_response_500.ExplainabilityGetStatusResponse500]]: View Source

    130async def asyncio_detailed(
    131    *,
    132    client: Client,
    133
    134) -> Response[Union[ExplainabilityGetStatusResponse200, ExplainabilityGetStatusResponse400, ExplainabilityGetStatusResponse401, ExplainabilityGetStatusResponse500]]:
    135    """Get explainability status
    136
    137     Get the status of the explainability feature.
    138
    139    Returns:
    140        Response[Union[ExplainabilityGetStatusResponse200, ExplainabilityGetStatusResponse400, ExplainabilityGetStatusResponse401, ExplainabilityGetStatusResponse500]]
    141    """
    142
    143
    144    kwargs = _get_kwargs(
    145        client=client,
    146
    147    )
    148
    149    async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
    150        response = await _client.request(
    151            **kwargs
    152        )
    153
    154    return _build_response(response=response)

Get explainability status

Get the status of the explainability feature.

Returns: Response[Union[ExplainabilityGetStatusResponse200, ExplainabilityGetStatusResponse400, ExplainabilityGetStatusResponse401, ExplainabilityGetStatusResponse500]]

async def asyncio( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client) -> Union[wallaroo.wallaroo_ml_ops_api_client.models.explainability_get_status_response_200.ExplainabilityGetStatusResponse200, wallaroo.wallaroo_ml_ops_api_client.models.explainability_get_status_response_400.ExplainabilityGetStatusResponse400, wallaroo.wallaroo_ml_ops_api_client.models.explainability_get_status_response_401.ExplainabilityGetStatusResponse401, wallaroo.wallaroo_ml_ops_api_client.models.explainability_get_status_response_500.ExplainabilityGetStatusResponse500, NoneType]: View Source

    156async def asyncio(
    157    *,
    158    client: Client,
    159
    160) -> Optional[Union[ExplainabilityGetStatusResponse200, ExplainabilityGetStatusResponse400, ExplainabilityGetStatusResponse401, ExplainabilityGetStatusResponse500]]:
    161    """Get explainability status
    162
    163     Get the status of the explainability feature.
    164
    165    Returns:
    166        Response[Union[ExplainabilityGetStatusResponse200, ExplainabilityGetStatusResponse400, ExplainabilityGetStatusResponse401, ExplainabilityGetStatusResponse500]]
    167    """
    168
    169
    170    return (await asyncio_detailed(
    171        client=client,
    172
    173    )).parsed

Get explainability status

Get the status of the explainability feature.

Returns: Response[Union[ExplainabilityGetStatusResponse200, ExplainabilityGetStatusResponse400, ExplainabilityGetStatusResponse401, ExplainabilityGetStatusResponse500]]