wallaroo.wallaroo_ml_ops_api_client.api.explainability.explainability_list_configs API documentation

# wallaroo.wallaroo_ml_ops_api_client.api.explainability.explainability_list_configs

View Source

      1from typing import Any, Dict, List, Optional, Union
      2
      3import httpx
      4
      5from ...client import Client
      6from ...models.explainability_list_configs_response_200_item import \
      7    ExplainabilityListConfigsResponse200Item
      8from ...models.explainability_list_configs_response_400 import \
      9    ExplainabilityListConfigsResponse400
     10from ...models.explainability_list_configs_response_401 import \
     11    ExplainabilityListConfigsResponse401
     12from ...models.explainability_list_configs_response_500 import \
     13    ExplainabilityListConfigsResponse500
     14from ...types import Response
     15
     16
     17def _get_kwargs(
     18    *,
     19    client: Client,
     20
     21) -> Dict[str, Any]:
     22    url = "{}/v1/api/explainability/list_configs".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[ExplainabilityListConfigsResponse400, ExplainabilityListConfigsResponse401, ExplainabilityListConfigsResponse500, List[Optional[ExplainabilityListConfigsResponse200Item]]]]:
     48    if response.status_code == 500:
     49        response_500 = ExplainabilityListConfigsResponse500.from_dict(response.json())
     50
     51
     52
     53        return response_500
     54    if response.status_code == 400:
     55        response_400 = ExplainabilityListConfigsResponse400.from_dict(response.json())
     56
     57
     58
     59        return response_400
     60    if response.status_code == 401:
     61        response_401 = ExplainabilityListConfigsResponse401.from_dict(response.json())
     62
     63
     64
     65        return response_401
     66    if response.status_code == 200:
     67        response_200 = []
     68        _response_200 = response.json()
     69        for response_200_item_data in (_response_200):
     70            _response_200_item = response_200_item_data
     71            response_200_item: Optional[ExplainabilityListConfigsResponse200Item]
     72            if _response_200_item is None:
     73                response_200_item = None
     74            else:
     75                response_200_item = ExplainabilityListConfigsResponse200Item.from_dict(_response_200_item)
     76
     77
     78
     79            response_200.append(response_200_item)
     80
     81        return response_200
     82    return None
     83
     84
     85def _build_response(*, response: httpx.Response) -> Response[Union[ExplainabilityListConfigsResponse400, ExplainabilityListConfigsResponse401, ExplainabilityListConfigsResponse500, List[Optional[ExplainabilityListConfigsResponse200Item]]]]:
     86    return Response(
     87        status_code=response.status_code,
     88        content=response.content,
     89        headers=response.headers,
     90        parsed=_parse_response(response=response),
     91    )
     92
     93
     94def sync_detailed(
     95    *,
     96    client: Client,
     97
     98) -> Response[Union[ExplainabilityListConfigsResponse400, ExplainabilityListConfigsResponse401, ExplainabilityListConfigsResponse500, List[Optional[ExplainabilityListConfigsResponse200Item]]]]:
     99    """List explainability configs
    100
    101     Returns a list of explainability configs.
    102
    103    Returns:
    104        Response[Union[ExplainabilityListConfigsResponse400, ExplainabilityListConfigsResponse401, ExplainabilityListConfigsResponse500, List[Optional[ExplainabilityListConfigsResponse200Item]]]]
    105    """
    106
    107
    108    kwargs = _get_kwargs(
    109        client=client,
    110
    111    )
    112
    113    response = httpx.request(
    114        verify=client.verify_ssl,
    115        **kwargs,
    116    )
    117
    118    return _build_response(response=response)
    119
    120def sync(
    121    *,
    122    client: Client,
    123
    124) -> Optional[Union[ExplainabilityListConfigsResponse400, ExplainabilityListConfigsResponse401, ExplainabilityListConfigsResponse500, List[Optional[ExplainabilityListConfigsResponse200Item]]]]:
    125    """List explainability configs
    126
    127     Returns a list of explainability configs.
    128
    129    Returns:
    130        Response[Union[ExplainabilityListConfigsResponse400, ExplainabilityListConfigsResponse401, ExplainabilityListConfigsResponse500, List[Optional[ExplainabilityListConfigsResponse200Item]]]]
    131    """
    132
    133
    134    return sync_detailed(
    135        client=client,
    136
    137    ).parsed
    138
    139async def asyncio_detailed(
    140    *,
    141    client: Client,
    142
    143) -> Response[Union[ExplainabilityListConfigsResponse400, ExplainabilityListConfigsResponse401, ExplainabilityListConfigsResponse500, List[Optional[ExplainabilityListConfigsResponse200Item]]]]:
    144    """List explainability configs
    145
    146     Returns a list of explainability configs.
    147
    148    Returns:
    149        Response[Union[ExplainabilityListConfigsResponse400, ExplainabilityListConfigsResponse401, ExplainabilityListConfigsResponse500, List[Optional[ExplainabilityListConfigsResponse200Item]]]]
    150    """
    151
    152
    153    kwargs = _get_kwargs(
    154        client=client,
    155
    156    )
    157
    158    async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
    159        response = await _client.request(
    160            **kwargs
    161        )
    162
    163    return _build_response(response=response)
    164
    165async def asyncio(
    166    *,
    167    client: Client,
    168
    169) -> Optional[Union[ExplainabilityListConfigsResponse400, ExplainabilityListConfigsResponse401, ExplainabilityListConfigsResponse500, List[Optional[ExplainabilityListConfigsResponse200Item]]]]:
    170    """List explainability configs
    171
    172     Returns a list of explainability configs.
    173
    174    Returns:
    175        Response[Union[ExplainabilityListConfigsResponse400, ExplainabilityListConfigsResponse401, ExplainabilityListConfigsResponse500, List[Optional[ExplainabilityListConfigsResponse200Item]]]]
    176    """
    177
    178
    179    return (await asyncio_detailed(
    180        client=client,
    181
    182    )).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_list_configs_response_400.ExplainabilityListConfigsResponse400, wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_response_401.ExplainabilityListConfigsResponse401, wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_response_500.ExplainabilityListConfigsResponse500, typing.List[typing.Optional[wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_response_200_item.ExplainabilityListConfigsResponse200Item]]]]: View Source

     95def sync_detailed(
     96    *,
     97    client: Client,
     98
     99) -> Response[Union[ExplainabilityListConfigsResponse400, ExplainabilityListConfigsResponse401, ExplainabilityListConfigsResponse500, List[Optional[ExplainabilityListConfigsResponse200Item]]]]:
    100    """List explainability configs
    101
    102     Returns a list of explainability configs.
    103
    104    Returns:
    105        Response[Union[ExplainabilityListConfigsResponse400, ExplainabilityListConfigsResponse401, ExplainabilityListConfigsResponse500, List[Optional[ExplainabilityListConfigsResponse200Item]]]]
    106    """
    107
    108
    109    kwargs = _get_kwargs(
    110        client=client,
    111
    112    )
    113
    114    response = httpx.request(
    115        verify=client.verify_ssl,
    116        **kwargs,
    117    )
    118
    119    return _build_response(response=response)

List explainability configs

Returns a list of explainability configs.

Returns: Response[Union[ExplainabilityListConfigsResponse400, ExplainabilityListConfigsResponse401, ExplainabilityListConfigsResponse500, List[Optional[ExplainabilityListConfigsResponse200Item]]]]

def sync( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client) -> Union[wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_response_400.ExplainabilityListConfigsResponse400, wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_response_401.ExplainabilityListConfigsResponse401, wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_response_500.ExplainabilityListConfigsResponse500, List[Optional[wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_response_200_item.ExplainabilityListConfigsResponse200Item]], NoneType]: View Source

    121def sync(
    122    *,
    123    client: Client,
    124
    125) -> Optional[Union[ExplainabilityListConfigsResponse400, ExplainabilityListConfigsResponse401, ExplainabilityListConfigsResponse500, List[Optional[ExplainabilityListConfigsResponse200Item]]]]:
    126    """List explainability configs
    127
    128     Returns a list of explainability configs.
    129
    130    Returns:
    131        Response[Union[ExplainabilityListConfigsResponse400, ExplainabilityListConfigsResponse401, ExplainabilityListConfigsResponse500, List[Optional[ExplainabilityListConfigsResponse200Item]]]]
    132    """
    133
    134
    135    return sync_detailed(
    136        client=client,
    137
    138    ).parsed

List explainability configs

Returns a list of explainability configs.

Returns: Response[Union[ExplainabilityListConfigsResponse400, ExplainabilityListConfigsResponse401, ExplainabilityListConfigsResponse500, List[Optional[ExplainabilityListConfigsResponse200Item]]]]

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_list_configs_response_400.ExplainabilityListConfigsResponse400, wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_response_401.ExplainabilityListConfigsResponse401, wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_response_500.ExplainabilityListConfigsResponse500, typing.List[typing.Optional[wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_response_200_item.ExplainabilityListConfigsResponse200Item]]]]: View Source

    140async def asyncio_detailed(
    141    *,
    142    client: Client,
    143
    144) -> Response[Union[ExplainabilityListConfigsResponse400, ExplainabilityListConfigsResponse401, ExplainabilityListConfigsResponse500, List[Optional[ExplainabilityListConfigsResponse200Item]]]]:
    145    """List explainability configs
    146
    147     Returns a list of explainability configs.
    148
    149    Returns:
    150        Response[Union[ExplainabilityListConfigsResponse400, ExplainabilityListConfigsResponse401, ExplainabilityListConfigsResponse500, List[Optional[ExplainabilityListConfigsResponse200Item]]]]
    151    """
    152
    153
    154    kwargs = _get_kwargs(
    155        client=client,
    156
    157    )
    158
    159    async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
    160        response = await _client.request(
    161            **kwargs
    162        )
    163
    164    return _build_response(response=response)

List explainability configs

Returns a list of explainability configs.

Returns: Response[Union[ExplainabilityListConfigsResponse400, ExplainabilityListConfigsResponse401, ExplainabilityListConfigsResponse500, List[Optional[ExplainabilityListConfigsResponse200Item]]]]

async def asyncio( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client) -> Union[wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_response_400.ExplainabilityListConfigsResponse400, wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_response_401.ExplainabilityListConfigsResponse401, wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_response_500.ExplainabilityListConfigsResponse500, List[Optional[wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_response_200_item.ExplainabilityListConfigsResponse200Item]], NoneType]: View Source

    166async def asyncio(
    167    *,
    168    client: Client,
    169
    170) -> Optional[Union[ExplainabilityListConfigsResponse400, ExplainabilityListConfigsResponse401, ExplainabilityListConfigsResponse500, List[Optional[ExplainabilityListConfigsResponse200Item]]]]:
    171    """List explainability configs
    172
    173     Returns a list of explainability configs.
    174
    175    Returns:
    176        Response[Union[ExplainabilityListConfigsResponse400, ExplainabilityListConfigsResponse401, ExplainabilityListConfigsResponse500, List[Optional[ExplainabilityListConfigsResponse200Item]]]]
    177    """
    178
    179
    180    return (await asyncio_detailed(
    181        client=client,
    182
    183    )).parsed

List explainability configs

Returns a list of explainability configs.

Returns: Response[Union[ExplainabilityListConfigsResponse400, ExplainabilityListConfigsResponse401, ExplainabilityListConfigsResponse500, List[Optional[ExplainabilityListConfigsResponse200Item]]]]