wallaroo.wallaroo_ml_ops_api_client.api.assay.assays_get_baseline API documentation

# wallaroo.wallaroo_ml_ops_api_client.api.assay.assays_get_baseline

View Source

      1from typing import Any, Dict, List, Optional, Union
      2
      3import httpx
      4
      5from ...client import Client
      6from ...models.assays_get_baseline_json_body import AssaysGetBaselineJsonBody
      7from ...models.assays_get_baseline_response_200_item import \
      8    AssaysGetBaselineResponse200Item
      9from ...models.assays_get_baseline_response_400 import \
     10    AssaysGetBaselineResponse400
     11from ...models.assays_get_baseline_response_401 import \
     12    AssaysGetBaselineResponse401
     13from ...models.assays_get_baseline_response_500 import \
     14    AssaysGetBaselineResponse500
     15from ...types import Response
     16
     17
     18def _get_kwargs(
     19    *,
     20    client: Client,
     21    json_body: AssaysGetBaselineJsonBody,
     22
     23) -> Dict[str, Any]:
     24    url = "{}/v1/api/assays/get_baseline".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[AssaysGetBaselineResponse400, AssaysGetBaselineResponse401, AssaysGetBaselineResponse500, List[Optional[AssaysGetBaselineResponse200Item]]]]:
     53    if response.status_code == 500:
     54        response_500 = AssaysGetBaselineResponse500.from_dict(response.json())
     55
     56
     57
     58        return response_500
     59    if response.status_code == 400:
     60        response_400 = AssaysGetBaselineResponse400.from_dict(response.json())
     61
     62
     63
     64        return response_400
     65    if response.status_code == 401:
     66        response_401 = AssaysGetBaselineResponse401.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 = response_200_item_data
     76            response_200_item: Optional[AssaysGetBaselineResponse200Item]
     77            if _response_200_item is None:
     78                response_200_item = None
     79            else:
     80                response_200_item = AssaysGetBaselineResponse200Item.from_dict(_response_200_item)
     81
     82
     83
     84            response_200.append(response_200_item)
     85
     86        return response_200
     87    return None
     88
     89
     90def _build_response(*, response: httpx.Response) -> Response[Union[AssaysGetBaselineResponse400, AssaysGetBaselineResponse401, AssaysGetBaselineResponse500, List[Optional[AssaysGetBaselineResponse200Item]]]]:
     91    return Response(
     92        status_code=response.status_code,
     93        content=response.content,
     94        headers=response.headers,
     95        parsed=_parse_response(response=response),
     96    )
     97
     98
     99def sync_detailed(
    100    *,
    101    client: Client,
    102    json_body: AssaysGetBaselineJsonBody,
    103
    104) -> Response[Union[AssaysGetBaselineResponse400, AssaysGetBaselineResponse401, AssaysGetBaselineResponse500, List[Optional[AssaysGetBaselineResponse200Item]]]]:
    105    """Get assay baseline
    106
    107     Retrieves an assay baseline.
    108
    109    Args:
    110        json_body (AssaysGetBaselineJsonBody):  Request to retrieve an assay baseline.
    111
    112    Returns:
    113        Response[Union[AssaysGetBaselineResponse400, AssaysGetBaselineResponse401, AssaysGetBaselineResponse500, List[Optional[AssaysGetBaselineResponse200Item]]]]
    114    """
    115
    116
    117    kwargs = _get_kwargs(
    118        client=client,
    119json_body=json_body,
    120
    121    )
    122
    123    response = httpx.request(
    124        verify=client.verify_ssl,
    125        **kwargs,
    126    )
    127
    128    return _build_response(response=response)
    129
    130def sync(
    131    *,
    132    client: Client,
    133    json_body: AssaysGetBaselineJsonBody,
    134
    135) -> Optional[Union[AssaysGetBaselineResponse400, AssaysGetBaselineResponse401, AssaysGetBaselineResponse500, List[Optional[AssaysGetBaselineResponse200Item]]]]:
    136    """Get assay baseline
    137
    138     Retrieves an assay baseline.
    139
    140    Args:
    141        json_body (AssaysGetBaselineJsonBody):  Request to retrieve an assay baseline.
    142
    143    Returns:
    144        Response[Union[AssaysGetBaselineResponse400, AssaysGetBaselineResponse401, AssaysGetBaselineResponse500, List[Optional[AssaysGetBaselineResponse200Item]]]]
    145    """
    146
    147
    148    return sync_detailed(
    149        client=client,
    150json_body=json_body,
    151
    152    ).parsed
    153
    154async def asyncio_detailed(
    155    *,
    156    client: Client,
    157    json_body: AssaysGetBaselineJsonBody,
    158
    159) -> Response[Union[AssaysGetBaselineResponse400, AssaysGetBaselineResponse401, AssaysGetBaselineResponse500, List[Optional[AssaysGetBaselineResponse200Item]]]]:
    160    """Get assay baseline
    161
    162     Retrieves an assay baseline.
    163
    164    Args:
    165        json_body (AssaysGetBaselineJsonBody):  Request to retrieve an assay baseline.
    166
    167    Returns:
    168        Response[Union[AssaysGetBaselineResponse400, AssaysGetBaselineResponse401, AssaysGetBaselineResponse500, List[Optional[AssaysGetBaselineResponse200Item]]]]
    169    """
    170
    171
    172    kwargs = _get_kwargs(
    173        client=client,
    174json_body=json_body,
    175
    176    )
    177
    178    async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
    179        response = await _client.request(
    180            **kwargs
    181        )
    182
    183    return _build_response(response=response)
    184
    185async def asyncio(
    186    *,
    187    client: Client,
    188    json_body: AssaysGetBaselineJsonBody,
    189
    190) -> Optional[Union[AssaysGetBaselineResponse400, AssaysGetBaselineResponse401, AssaysGetBaselineResponse500, List[Optional[AssaysGetBaselineResponse200Item]]]]:
    191    """Get assay baseline
    192
    193     Retrieves an assay baseline.
    194
    195    Args:
    196        json_body (AssaysGetBaselineJsonBody):  Request to retrieve an assay baseline.
    197
    198    Returns:
    199        Response[Union[AssaysGetBaselineResponse400, AssaysGetBaselineResponse401, AssaysGetBaselineResponse500, List[Optional[AssaysGetBaselineResponse200Item]]]]
    200    """
    201
    202
    203    return (await asyncio_detailed(
    204        client=client,
    205json_body=json_body,
    206
    207    )).parsed

def sync_detailed( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.assays_get_baseline_json_body.AssaysGetBaselineJsonBody) -> wallaroo.wallaroo_ml_ops_api_client.types.Response[typing.Union[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_baseline_response_400.AssaysGetBaselineResponse400, wallaroo.wallaroo_ml_ops_api_client.models.assays_get_baseline_response_401.AssaysGetBaselineResponse401, wallaroo.wallaroo_ml_ops_api_client.models.assays_get_baseline_response_500.AssaysGetBaselineResponse500, typing.List[typing.Optional[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_baseline_response_200_item.AssaysGetBaselineResponse200Item]]]]: View Source

    100def sync_detailed(
    101    *,
    102    client: Client,
    103    json_body: AssaysGetBaselineJsonBody,
    104
    105) -> Response[Union[AssaysGetBaselineResponse400, AssaysGetBaselineResponse401, AssaysGetBaselineResponse500, List[Optional[AssaysGetBaselineResponse200Item]]]]:
    106    """Get assay baseline
    107
    108     Retrieves an assay baseline.
    109
    110    Args:
    111        json_body (AssaysGetBaselineJsonBody):  Request to retrieve an assay baseline.
    112
    113    Returns:
    114        Response[Union[AssaysGetBaselineResponse400, AssaysGetBaselineResponse401, AssaysGetBaselineResponse500, List[Optional[AssaysGetBaselineResponse200Item]]]]
    115    """
    116
    117
    118    kwargs = _get_kwargs(
    119        client=client,
    120json_body=json_body,
    121
    122    )
    123
    124    response = httpx.request(
    125        verify=client.verify_ssl,
    126        **kwargs,
    127    )
    128
    129    return _build_response(response=response)

Get assay baseline

Retrieves an assay baseline.

Args: json_body (AssaysGetBaselineJsonBody): Request to retrieve an assay baseline.

Returns: Response[Union[AssaysGetBaselineResponse400, AssaysGetBaselineResponse401, AssaysGetBaselineResponse500, List[Optional[AssaysGetBaselineResponse200Item]]]]

def sync( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.assays_get_baseline_json_body.AssaysGetBaselineJsonBody) -> Union[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_baseline_response_400.AssaysGetBaselineResponse400, wallaroo.wallaroo_ml_ops_api_client.models.assays_get_baseline_response_401.AssaysGetBaselineResponse401, wallaroo.wallaroo_ml_ops_api_client.models.assays_get_baseline_response_500.AssaysGetBaselineResponse500, List[Optional[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_baseline_response_200_item.AssaysGetBaselineResponse200Item]], NoneType]: View Source

    131def sync(
    132    *,
    133    client: Client,
    134    json_body: AssaysGetBaselineJsonBody,
    135
    136) -> Optional[Union[AssaysGetBaselineResponse400, AssaysGetBaselineResponse401, AssaysGetBaselineResponse500, List[Optional[AssaysGetBaselineResponse200Item]]]]:
    137    """Get assay baseline
    138
    139     Retrieves an assay baseline.
    140
    141    Args:
    142        json_body (AssaysGetBaselineJsonBody):  Request to retrieve an assay baseline.
    143
    144    Returns:
    145        Response[Union[AssaysGetBaselineResponse400, AssaysGetBaselineResponse401, AssaysGetBaselineResponse500, List[Optional[AssaysGetBaselineResponse200Item]]]]
    146    """
    147
    148
    149    return sync_detailed(
    150        client=client,
    151json_body=json_body,
    152
    153    ).parsed

Get assay baseline

Retrieves an assay baseline.

Args: json_body (AssaysGetBaselineJsonBody): Request to retrieve an assay baseline.

Returns: Response[Union[AssaysGetBaselineResponse400, AssaysGetBaselineResponse401, AssaysGetBaselineResponse500, List[Optional[AssaysGetBaselineResponse200Item]]]]

async def asyncio_detailed( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.assays_get_baseline_json_body.AssaysGetBaselineJsonBody) -> wallaroo.wallaroo_ml_ops_api_client.types.Response[typing.Union[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_baseline_response_400.AssaysGetBaselineResponse400, wallaroo.wallaroo_ml_ops_api_client.models.assays_get_baseline_response_401.AssaysGetBaselineResponse401, wallaroo.wallaroo_ml_ops_api_client.models.assays_get_baseline_response_500.AssaysGetBaselineResponse500, typing.List[typing.Optional[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_baseline_response_200_item.AssaysGetBaselineResponse200Item]]]]: View Source

    155async def asyncio_detailed(
    156    *,
    157    client: Client,
    158    json_body: AssaysGetBaselineJsonBody,
    159
    160) -> Response[Union[AssaysGetBaselineResponse400, AssaysGetBaselineResponse401, AssaysGetBaselineResponse500, List[Optional[AssaysGetBaselineResponse200Item]]]]:
    161    """Get assay baseline
    162
    163     Retrieves an assay baseline.
    164
    165    Args:
    166        json_body (AssaysGetBaselineJsonBody):  Request to retrieve an assay baseline.
    167
    168    Returns:
    169        Response[Union[AssaysGetBaselineResponse400, AssaysGetBaselineResponse401, AssaysGetBaselineResponse500, List[Optional[AssaysGetBaselineResponse200Item]]]]
    170    """
    171
    172
    173    kwargs = _get_kwargs(
    174        client=client,
    175json_body=json_body,
    176
    177    )
    178
    179    async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
    180        response = await _client.request(
    181            **kwargs
    182        )
    183
    184    return _build_response(response=response)

Get assay baseline

Retrieves an assay baseline.

Args: json_body (AssaysGetBaselineJsonBody): Request to retrieve an assay baseline.

Returns: Response[Union[AssaysGetBaselineResponse400, AssaysGetBaselineResponse401, AssaysGetBaselineResponse500, List[Optional[AssaysGetBaselineResponse200Item]]]]

async def asyncio( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.assays_get_baseline_json_body.AssaysGetBaselineJsonBody) -> Union[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_baseline_response_400.AssaysGetBaselineResponse400, wallaroo.wallaroo_ml_ops_api_client.models.assays_get_baseline_response_401.AssaysGetBaselineResponse401, wallaroo.wallaroo_ml_ops_api_client.models.assays_get_baseline_response_500.AssaysGetBaselineResponse500, List[Optional[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_baseline_response_200_item.AssaysGetBaselineResponse200Item]], NoneType]: View Source

    186async def asyncio(
    187    *,
    188    client: Client,
    189    json_body: AssaysGetBaselineJsonBody,
    190
    191) -> Optional[Union[AssaysGetBaselineResponse400, AssaysGetBaselineResponse401, AssaysGetBaselineResponse500, List[Optional[AssaysGetBaselineResponse200Item]]]]:
    192    """Get assay baseline
    193
    194     Retrieves an assay baseline.
    195
    196    Args:
    197        json_body (AssaysGetBaselineJsonBody):  Request to retrieve an assay baseline.
    198
    199    Returns:
    200        Response[Union[AssaysGetBaselineResponse400, AssaysGetBaselineResponse401, AssaysGetBaselineResponse500, List[Optional[AssaysGetBaselineResponse200Item]]]]
    201    """
    202
    203
    204    return (await asyncio_detailed(
    205        client=client,
    206json_body=json_body,
    207
    208    )).parsed

Get assay baseline

Retrieves an assay baseline.

Args: json_body (AssaysGetBaselineJsonBody): Request to retrieve an assay baseline.

Returns: Response[Union[AssaysGetBaselineResponse400, AssaysGetBaselineResponse401, AssaysGetBaselineResponse500, List[Optional[AssaysGetBaselineResponse200Item]]]]