wallaroo.wallaroo_ml_ops_api_client.api.assay.assays_get_results API documentation

# wallaroo.wallaroo_ml_ops_api_client.api.assay.assays_get_results

View Source

      1from typing import Any, Dict, List, Optional, Union
      2
      3import httpx
      4
      5from ...client import Client
      6from ...models.assays_get_results_json_body import AssaysGetResultsJsonBody
      7from ...models.assays_get_results_response_200_item import \
      8    AssaysGetResultsResponse200Item
      9from ...models.assays_get_results_response_400 import \
     10    AssaysGetResultsResponse400
     11from ...models.assays_get_results_response_401 import \
     12    AssaysGetResultsResponse401
     13from ...models.assays_get_results_response_500 import \
     14    AssaysGetResultsResponse500
     15from ...types import Response
     16
     17
     18def _get_kwargs(
     19    *,
     20    client: Client,
     21    json_body: AssaysGetResultsJsonBody,
     22
     23) -> Dict[str, Any]:
     24    url = "{}/v1/api/assays/get_results".format(
     25        client.base_url)
     26
     27    headers: Dict[str, str] = client.get_headers()
     28    cookies: Dict[str, Any] = client.get_cookies()
     29
     30
     31
     32
     33
     34
     35
     36    json_json_body = json_body.to_dict()
     37
     38
     39
     40
     41
     42    return {
     43	    "method": "post",
     44        "url": url,
     45        "headers": headers,
     46        "cookies": cookies,
     47        "timeout": client.get_timeout(),
     48        "json": json_json_body,
     49    }
     50
     51
     52def _parse_response(*, response: httpx.Response) -> Optional[Union[AssaysGetResultsResponse400, AssaysGetResultsResponse401, AssaysGetResultsResponse500, List[AssaysGetResultsResponse200Item]]]:
     53    if response.status_code == 500:
     54        response_500 = AssaysGetResultsResponse500.from_dict(response.json())
     55
     56
     57
     58        return response_500
     59    if response.status_code == 400:
     60        response_400 = AssaysGetResultsResponse400.from_dict(response.json())
     61
     62
     63
     64        return response_400
     65    if response.status_code == 401:
     66        response_401 = AssaysGetResultsResponse401.from_dict(response.json())
     67
     68
     69
     70        return response_401
     71    if response.status_code == 200:
     72        response_200 = []
     73        _response_200 = response.json()
     74        for response_200_item_data in (_response_200):
     75            response_200_item = AssaysGetResultsResponse200Item.from_dict(response_200_item_data)
     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[AssaysGetResultsResponse400, AssaysGetResultsResponse401, AssaysGetResultsResponse500, List[AssaysGetResultsResponse200Item]]]:
     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    json_body: AssaysGetResultsJsonBody,
     98
     99) -> Response[Union[AssaysGetResultsResponse400, AssaysGetResultsResponse401, AssaysGetResultsResponse500, List[AssaysGetResultsResponse200Item]]]:
    100    """Get assay results
    101
    102     Returns assay results.
    103
    104    Args:
    105        json_body (AssaysGetResultsJsonBody):  Request to return assay results.
    106
    107    Returns:
    108        Response[Union[AssaysGetResultsResponse400, AssaysGetResultsResponse401, AssaysGetResultsResponse500, List[AssaysGetResultsResponse200Item]]]
    109    """
    110
    111
    112    kwargs = _get_kwargs(
    113        client=client,
    114json_body=json_body,
    115
    116    )
    117
    118    response = httpx.request(
    119        verify=client.verify_ssl,
    120        **kwargs,
    121    )
    122
    123    return _build_response(response=response)
    124
    125def sync(
    126    *,
    127    client: Client,
    128    json_body: AssaysGetResultsJsonBody,
    129
    130) -> Optional[Union[AssaysGetResultsResponse400, AssaysGetResultsResponse401, AssaysGetResultsResponse500, List[AssaysGetResultsResponse200Item]]]:
    131    """Get assay results
    132
    133     Returns assay results.
    134
    135    Args:
    136        json_body (AssaysGetResultsJsonBody):  Request to return assay results.
    137
    138    Returns:
    139        Response[Union[AssaysGetResultsResponse400, AssaysGetResultsResponse401, AssaysGetResultsResponse500, List[AssaysGetResultsResponse200Item]]]
    140    """
    141
    142
    143    return sync_detailed(
    144        client=client,
    145json_body=json_body,
    146
    147    ).parsed
    148
    149async def asyncio_detailed(
    150    *,
    151    client: Client,
    152    json_body: AssaysGetResultsJsonBody,
    153
    154) -> Response[Union[AssaysGetResultsResponse400, AssaysGetResultsResponse401, AssaysGetResultsResponse500, List[AssaysGetResultsResponse200Item]]]:
    155    """Get assay results
    156
    157     Returns assay results.
    158
    159    Args:
    160        json_body (AssaysGetResultsJsonBody):  Request to return assay results.
    161
    162    Returns:
    163        Response[Union[AssaysGetResultsResponse400, AssaysGetResultsResponse401, AssaysGetResultsResponse500, List[AssaysGetResultsResponse200Item]]]
    164    """
    165
    166
    167    kwargs = _get_kwargs(
    168        client=client,
    169json_body=json_body,
    170
    171    )
    172
    173    async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
    174        response = await _client.request(
    175            **kwargs
    176        )
    177
    178    return _build_response(response=response)
    179
    180async def asyncio(
    181    *,
    182    client: Client,
    183    json_body: AssaysGetResultsJsonBody,
    184
    185) -> Optional[Union[AssaysGetResultsResponse400, AssaysGetResultsResponse401, AssaysGetResultsResponse500, List[AssaysGetResultsResponse200Item]]]:
    186    """Get assay results
    187
    188     Returns assay results.
    189
    190    Args:
    191        json_body (AssaysGetResultsJsonBody):  Request to return assay results.
    192
    193    Returns:
    194        Response[Union[AssaysGetResultsResponse400, AssaysGetResultsResponse401, AssaysGetResultsResponse500, List[AssaysGetResultsResponse200Item]]]
    195    """
    196
    197
    198    return (await asyncio_detailed(
    199        client=client,
    200json_body=json_body,
    201
    202    )).parsed

def sync_detailed( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.assays_get_results_json_body.AssaysGetResultsJsonBody) -> wallaroo.wallaroo_ml_ops_api_client.types.Response[typing.Union[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_results_response_400.AssaysGetResultsResponse400, wallaroo.wallaroo_ml_ops_api_client.models.assays_get_results_response_401.AssaysGetResultsResponse401, wallaroo.wallaroo_ml_ops_api_client.models.assays_get_results_response_500.AssaysGetResultsResponse500, typing.List[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_results_response_200_item.AssaysGetResultsResponse200Item]]]: View Source

     95def sync_detailed(
     96    *,
     97    client: Client,
     98    json_body: AssaysGetResultsJsonBody,
     99
    100) -> Response[Union[AssaysGetResultsResponse400, AssaysGetResultsResponse401, AssaysGetResultsResponse500, List[AssaysGetResultsResponse200Item]]]:
    101    """Get assay results
    102
    103     Returns assay results.
    104
    105    Args:
    106        json_body (AssaysGetResultsJsonBody):  Request to return assay results.
    107
    108    Returns:
    109        Response[Union[AssaysGetResultsResponse400, AssaysGetResultsResponse401, AssaysGetResultsResponse500, List[AssaysGetResultsResponse200Item]]]
    110    """
    111
    112
    113    kwargs = _get_kwargs(
    114        client=client,
    115json_body=json_body,
    116
    117    )
    118
    119    response = httpx.request(
    120        verify=client.verify_ssl,
    121        **kwargs,
    122    )
    123
    124    return _build_response(response=response)

Get assay results

Returns assay results.

Args: json_body (AssaysGetResultsJsonBody): Request to return assay results.

Returns: Response[Union[AssaysGetResultsResponse400, AssaysGetResultsResponse401, AssaysGetResultsResponse500, List[AssaysGetResultsResponse200Item]]]

def sync( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.assays_get_results_json_body.AssaysGetResultsJsonBody) -> Union[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_results_response_400.AssaysGetResultsResponse400, wallaroo.wallaroo_ml_ops_api_client.models.assays_get_results_response_401.AssaysGetResultsResponse401, wallaroo.wallaroo_ml_ops_api_client.models.assays_get_results_response_500.AssaysGetResultsResponse500, List[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_results_response_200_item.AssaysGetResultsResponse200Item], NoneType]: View Source

    126def sync(
    127    *,
    128    client: Client,
    129    json_body: AssaysGetResultsJsonBody,
    130
    131) -> Optional[Union[AssaysGetResultsResponse400, AssaysGetResultsResponse401, AssaysGetResultsResponse500, List[AssaysGetResultsResponse200Item]]]:
    132    """Get assay results
    133
    134     Returns assay results.
    135
    136    Args:
    137        json_body (AssaysGetResultsJsonBody):  Request to return assay results.
    138
    139    Returns:
    140        Response[Union[AssaysGetResultsResponse400, AssaysGetResultsResponse401, AssaysGetResultsResponse500, List[AssaysGetResultsResponse200Item]]]
    141    """
    142
    143
    144    return sync_detailed(
    145        client=client,
    146json_body=json_body,
    147
    148    ).parsed

Get assay results

Returns assay results.

Args: json_body (AssaysGetResultsJsonBody): Request to return assay results.

Returns: Response[Union[AssaysGetResultsResponse400, AssaysGetResultsResponse401, AssaysGetResultsResponse500, List[AssaysGetResultsResponse200Item]]]

async def asyncio_detailed( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.assays_get_results_json_body.AssaysGetResultsJsonBody) -> wallaroo.wallaroo_ml_ops_api_client.types.Response[typing.Union[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_results_response_400.AssaysGetResultsResponse400, wallaroo.wallaroo_ml_ops_api_client.models.assays_get_results_response_401.AssaysGetResultsResponse401, wallaroo.wallaroo_ml_ops_api_client.models.assays_get_results_response_500.AssaysGetResultsResponse500, typing.List[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_results_response_200_item.AssaysGetResultsResponse200Item]]]: View Source

    150async def asyncio_detailed(
    151    *,
    152    client: Client,
    153    json_body: AssaysGetResultsJsonBody,
    154
    155) -> Response[Union[AssaysGetResultsResponse400, AssaysGetResultsResponse401, AssaysGetResultsResponse500, List[AssaysGetResultsResponse200Item]]]:
    156    """Get assay results
    157
    158     Returns assay results.
    159
    160    Args:
    161        json_body (AssaysGetResultsJsonBody):  Request to return assay results.
    162
    163    Returns:
    164        Response[Union[AssaysGetResultsResponse400, AssaysGetResultsResponse401, AssaysGetResultsResponse500, List[AssaysGetResultsResponse200Item]]]
    165    """
    166
    167
    168    kwargs = _get_kwargs(
    169        client=client,
    170json_body=json_body,
    171
    172    )
    173
    174    async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
    175        response = await _client.request(
    176            **kwargs
    177        )
    178
    179    return _build_response(response=response)

Get assay results

Returns assay results.

Args: json_body (AssaysGetResultsJsonBody): Request to return assay results.

Returns: Response[Union[AssaysGetResultsResponse400, AssaysGetResultsResponse401, AssaysGetResultsResponse500, List[AssaysGetResultsResponse200Item]]]

async def asyncio( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.assays_get_results_json_body.AssaysGetResultsJsonBody) -> Union[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_results_response_400.AssaysGetResultsResponse400, wallaroo.wallaroo_ml_ops_api_client.models.assays_get_results_response_401.AssaysGetResultsResponse401, wallaroo.wallaroo_ml_ops_api_client.models.assays_get_results_response_500.AssaysGetResultsResponse500, List[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_results_response_200_item.AssaysGetResultsResponse200Item], NoneType]: View Source

    181async def asyncio(
    182    *,
    183    client: Client,
    184    json_body: AssaysGetResultsJsonBody,
    185
    186) -> Optional[Union[AssaysGetResultsResponse400, AssaysGetResultsResponse401, AssaysGetResultsResponse500, List[AssaysGetResultsResponse200Item]]]:
    187    """Get assay results
    188
    189     Returns assay results.
    190
    191    Args:
    192        json_body (AssaysGetResultsJsonBody):  Request to return assay results.
    193
    194    Returns:
    195        Response[Union[AssaysGetResultsResponse400, AssaysGetResultsResponse401, AssaysGetResultsResponse500, List[AssaysGetResultsResponse200Item]]]
    196    """
    197
    198
    199    return (await asyncio_detailed(
    200        client=client,
    201json_body=json_body,
    202
    203    )).parsed

Get assay results

Returns assay results.

Args: json_body (AssaysGetResultsJsonBody): Request to return assay results.

Returns: Response[Union[AssaysGetResultsResponse400, AssaysGetResultsResponse401, AssaysGetResultsResponse500, List[AssaysGetResultsResponse200Item]]]