wallaroo.wallaroo_ml_ops_api_client.api.assay.assays_get_assay_results API documentation

# wallaroo.wallaroo_ml_ops_api_client.api.assay.assays_get_assay_results

View Source

      1from typing import Any, Dict, List, Optional, Union
      2
      3import httpx
      4
      5from ...client import Client
      6from ...models.assays_get_assay_results_json_body import \
      7    AssaysGetAssayResultsJsonBody
      8from ...models.assays_get_assay_results_response_200_item import \
      9    AssaysGetAssayResultsResponse200Item
     10from ...models.assays_get_assay_results_response_500 import \
     11    AssaysGetAssayResultsResponse500
     12from ...types import Response
     13
     14
     15def _get_kwargs(
     16    *,
     17    client: Client,
     18    json_body: AssaysGetAssayResultsJsonBody,
     19
     20) -> Dict[str, Any]:
     21    url = "{}/v1/api/assays/get_assay_results".format(
     22        client.base_url)
     23
     24    headers: Dict[str, str] = client.get_headers()
     25    cookies: Dict[str, Any] = client.get_cookies()
     26
     27
     28
     29
     30
     31
     32
     33    json_json_body = json_body.to_dict()
     34
     35
     36
     37
     38
     39    return {
     40	    "method": "post",
     41        "url": url,
     42        "headers": headers,
     43        "cookies": cookies,
     44        "timeout": client.get_timeout(),
     45        "json": json_json_body,
     46    }
     47
     48
     49def _parse_response(*, response: httpx.Response) -> Optional[Union[AssaysGetAssayResultsResponse500, List[AssaysGetAssayResultsResponse200Item]]]:
     50    if response.status_code == 500:
     51        response_500 = AssaysGetAssayResultsResponse500.from_dict(response.json())
     52
     53
     54
     55        return response_500
     56    if response.status_code == 200:
     57        response_200 = []
     58        _response_200 = response.json()
     59        for response_200_item_data in (_response_200):
     60            response_200_item = AssaysGetAssayResultsResponse200Item.from_dict(response_200_item_data)
     61
     62
     63
     64            response_200.append(response_200_item)
     65
     66        return response_200
     67    return None
     68
     69
     70def _build_response(*, response: httpx.Response) -> Response[Union[AssaysGetAssayResultsResponse500, List[AssaysGetAssayResultsResponse200Item]]]:
     71    return Response(
     72        status_code=response.status_code,
     73        content=response.content,
     74        headers=response.headers,
     75        parsed=_parse_response(response=response),
     76    )
     77
     78
     79def sync_detailed(
     80    *,
     81    client: Client,
     82    json_body: AssaysGetAssayResultsJsonBody,
     83
     84) -> Response[Union[AssaysGetAssayResultsResponse500, List[AssaysGetAssayResultsResponse200Item]]]:
     85    """Temporary mockup to get get assay results by assay_id.
     86
     87     Returns assay results.
     88
     89    Args:
     90        json_body (AssaysGetAssayResultsJsonBody):  Request to return assay results.
     91
     92    Returns:
     93        Response[Union[AssaysGetAssayResultsResponse500, List[AssaysGetAssayResultsResponse200Item]]]
     94    """
     95
     96
     97    kwargs = _get_kwargs(
     98        client=client,
     99json_body=json_body,
    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    json_body: AssaysGetAssayResultsJsonBody,
    114
    115) -> Optional[Union[AssaysGetAssayResultsResponse500, List[AssaysGetAssayResultsResponse200Item]]]:
    116    """Temporary mockup to get get assay results by assay_id.
    117
    118     Returns assay results.
    119
    120    Args:
    121        json_body (AssaysGetAssayResultsJsonBody):  Request to return assay results.
    122
    123    Returns:
    124        Response[Union[AssaysGetAssayResultsResponse500, List[AssaysGetAssayResultsResponse200Item]]]
    125    """
    126
    127
    128    return sync_detailed(
    129        client=client,
    130json_body=json_body,
    131
    132    ).parsed
    133
    134async def asyncio_detailed(
    135    *,
    136    client: Client,
    137    json_body: AssaysGetAssayResultsJsonBody,
    138
    139) -> Response[Union[AssaysGetAssayResultsResponse500, List[AssaysGetAssayResultsResponse200Item]]]:
    140    """Temporary mockup to get get assay results by assay_id.
    141
    142     Returns assay results.
    143
    144    Args:
    145        json_body (AssaysGetAssayResultsJsonBody):  Request to return assay results.
    146
    147    Returns:
    148        Response[Union[AssaysGetAssayResultsResponse500, List[AssaysGetAssayResultsResponse200Item]]]
    149    """
    150
    151
    152    kwargs = _get_kwargs(
    153        client=client,
    154json_body=json_body,
    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    json_body: AssaysGetAssayResultsJsonBody,
    169
    170) -> Optional[Union[AssaysGetAssayResultsResponse500, List[AssaysGetAssayResultsResponse200Item]]]:
    171    """Temporary mockup to get get assay results by assay_id.
    172
    173     Returns assay results.
    174
    175    Args:
    176        json_body (AssaysGetAssayResultsJsonBody):  Request to return assay results.
    177
    178    Returns:
    179        Response[Union[AssaysGetAssayResultsResponse500, List[AssaysGetAssayResultsResponse200Item]]]
    180    """
    181
    182
    183    return (await asyncio_detailed(
    184        client=client,
    185json_body=json_body,
    186
    187    )).parsed

def sync_detailed( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.assays_get_assay_results_json_body.AssaysGetAssayResultsJsonBody) -> wallaroo.wallaroo_ml_ops_api_client.types.Response[typing.Union[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_assay_results_response_500.AssaysGetAssayResultsResponse500, typing.List[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_assay_results_response_200_item.AssaysGetAssayResultsResponse200Item]]]: View Source

     80def sync_detailed(
     81    *,
     82    client: Client,
     83    json_body: AssaysGetAssayResultsJsonBody,
     84
     85) -> Response[Union[AssaysGetAssayResultsResponse500, List[AssaysGetAssayResultsResponse200Item]]]:
     86    """Temporary mockup to get get assay results by assay_id.
     87
     88     Returns assay results.
     89
     90    Args:
     91        json_body (AssaysGetAssayResultsJsonBody):  Request to return assay results.
     92
     93    Returns:
     94        Response[Union[AssaysGetAssayResultsResponse500, List[AssaysGetAssayResultsResponse200Item]]]
     95    """
     96
     97
     98    kwargs = _get_kwargs(
     99        client=client,
    100json_body=json_body,
    101
    102    )
    103
    104    response = httpx.request(
    105        verify=client.verify_ssl,
    106        **kwargs,
    107    )
    108
    109    return _build_response(response=response)

Temporary mockup to get get assay results by assay_id.

Returns assay results.

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

Returns: Response[Union[AssaysGetAssayResultsResponse500, List[AssaysGetAssayResultsResponse200Item]]]

def sync( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.assays_get_assay_results_json_body.AssaysGetAssayResultsJsonBody) -> Union[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_assay_results_response_500.AssaysGetAssayResultsResponse500, List[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_assay_results_response_200_item.AssaysGetAssayResultsResponse200Item], NoneType]: View Source

    111def sync(
    112    *,
    113    client: Client,
    114    json_body: AssaysGetAssayResultsJsonBody,
    115
    116) -> Optional[Union[AssaysGetAssayResultsResponse500, List[AssaysGetAssayResultsResponse200Item]]]:
    117    """Temporary mockup to get get assay results by assay_id.
    118
    119     Returns assay results.
    120
    121    Args:
    122        json_body (AssaysGetAssayResultsJsonBody):  Request to return assay results.
    123
    124    Returns:
    125        Response[Union[AssaysGetAssayResultsResponse500, List[AssaysGetAssayResultsResponse200Item]]]
    126    """
    127
    128
    129    return sync_detailed(
    130        client=client,
    131json_body=json_body,
    132
    133    ).parsed

Temporary mockup to get get assay results by assay_id.

Returns assay results.

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

Returns: Response[Union[AssaysGetAssayResultsResponse500, List[AssaysGetAssayResultsResponse200Item]]]

async def asyncio_detailed( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.assays_get_assay_results_json_body.AssaysGetAssayResultsJsonBody) -> wallaroo.wallaroo_ml_ops_api_client.types.Response[typing.Union[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_assay_results_response_500.AssaysGetAssayResultsResponse500, typing.List[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_assay_results_response_200_item.AssaysGetAssayResultsResponse200Item]]]: View Source

    135async def asyncio_detailed(
    136    *,
    137    client: Client,
    138    json_body: AssaysGetAssayResultsJsonBody,
    139
    140) -> Response[Union[AssaysGetAssayResultsResponse500, List[AssaysGetAssayResultsResponse200Item]]]:
    141    """Temporary mockup to get get assay results by assay_id.
    142
    143     Returns assay results.
    144
    145    Args:
    146        json_body (AssaysGetAssayResultsJsonBody):  Request to return assay results.
    147
    148    Returns:
    149        Response[Union[AssaysGetAssayResultsResponse500, List[AssaysGetAssayResultsResponse200Item]]]
    150    """
    151
    152
    153    kwargs = _get_kwargs(
    154        client=client,
    155json_body=json_body,
    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)

Temporary mockup to get get assay results by assay_id.

Returns assay results.

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

Returns: Response[Union[AssaysGetAssayResultsResponse500, List[AssaysGetAssayResultsResponse200Item]]]

async def asyncio( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.assays_get_assay_results_json_body.AssaysGetAssayResultsJsonBody) -> Union[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_assay_results_response_500.AssaysGetAssayResultsResponse500, List[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_assay_results_response_200_item.AssaysGetAssayResultsResponse200Item], NoneType]: View Source

    166async def asyncio(
    167    *,
    168    client: Client,
    169    json_body: AssaysGetAssayResultsJsonBody,
    170
    171) -> Optional[Union[AssaysGetAssayResultsResponse500, List[AssaysGetAssayResultsResponse200Item]]]:
    172    """Temporary mockup to get get assay results by assay_id.
    173
    174     Returns assay results.
    175
    176    Args:
    177        json_body (AssaysGetAssayResultsJsonBody):  Request to return assay results.
    178
    179    Returns:
    180        Response[Union[AssaysGetAssayResultsResponse500, List[AssaysGetAssayResultsResponse200Item]]]
    181    """
    182
    183
    184    return (await asyncio_detailed(
    185        client=client,
    186json_body=json_body,
    187
    188    )).parsed

Temporary mockup to get get assay results by assay_id.

Returns assay results.

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

Returns: Response[Union[AssaysGetAssayResultsResponse500, List[AssaysGetAssayResultsResponse200Item]]]