wallaroo.wallaroo_ml_ops_api_client.api.assay.assays_run_interactive_baseline API documentation

# wallaroo.wallaroo_ml_ops_api_client.api.assay.assays_run_interactive_baseline

View Source

      1from typing import Any, Dict, Optional, Union
      2
      3import httpx
      4
      5from ...client import Client
      6from ...models.assays_run_interactive_baseline_json_body import \
      7    AssaysRunInteractiveBaselineJsonBody
      8from ...models.assays_run_interactive_baseline_response_200 import \
      9    AssaysRunInteractiveBaselineResponse200
     10from ...models.assays_run_interactive_baseline_response_400 import \
     11    AssaysRunInteractiveBaselineResponse400
     12from ...models.assays_run_interactive_baseline_response_401 import \
     13    AssaysRunInteractiveBaselineResponse401
     14from ...models.assays_run_interactive_baseline_response_500 import \
     15    AssaysRunInteractiveBaselineResponse500
     16from ...types import Response
     17
     18
     19def _get_kwargs(
     20    *,
     21    client: Client,
     22    json_body: AssaysRunInteractiveBaselineJsonBody,
     23
     24) -> Dict[str, Any]:
     25    url = "{}/v1/api/assays/run_interactive_baseline".format(
     26        client.base_url)
     27
     28    headers: Dict[str, str] = client.get_headers()
     29    cookies: Dict[str, Any] = client.get_cookies()
     30
     31
     32
     33
     34
     35
     36
     37    json_json_body = json_body.to_dict()
     38
     39
     40
     41
     42
     43    return {
     44	    "method": "post",
     45        "url": url,
     46        "headers": headers,
     47        "cookies": cookies,
     48        "timeout": client.get_timeout(),
     49        "json": json_json_body,
     50    }
     51
     52
     53def _parse_response(*, response: httpx.Response) -> Optional[Union[AssaysRunInteractiveBaselineResponse400, AssaysRunInteractiveBaselineResponse401, AssaysRunInteractiveBaselineResponse500, Optional[AssaysRunInteractiveBaselineResponse200]]]:
     54    if response.status_code == 500:
     55        response_500 = AssaysRunInteractiveBaselineResponse500.from_dict(response.json())
     56
     57
     58
     59        return response_500
     60    if response.status_code == 400:
     61        response_400 = AssaysRunInteractiveBaselineResponse400.from_dict(response.json())
     62
     63
     64
     65        return response_400
     66    if response.status_code == 401:
     67        response_401 = AssaysRunInteractiveBaselineResponse401.from_dict(response.json())
     68
     69
     70
     71        return response_401
     72    if response.status_code == 200:
     73        _response_200 = response.json()
     74        response_200: Optional[AssaysRunInteractiveBaselineResponse200]
     75        if _response_200 is None:
     76            response_200 = None
     77        else:
     78            response_200 = AssaysRunInteractiveBaselineResponse200.from_dict(_response_200)
     79
     80
     81
     82        return response_200
     83    return None
     84
     85
     86def _build_response(*, response: httpx.Response) -> Response[Union[AssaysRunInteractiveBaselineResponse400, AssaysRunInteractiveBaselineResponse401, AssaysRunInteractiveBaselineResponse500, Optional[AssaysRunInteractiveBaselineResponse200]]]:
     87    return Response(
     88        status_code=response.status_code,
     89        content=response.content,
     90        headers=response.headers,
     91        parsed=_parse_response(response=response),
     92    )
     93
     94
     95def sync_detailed(
     96    *,
     97    client: Client,
     98    json_body: AssaysRunInteractiveBaselineJsonBody,
     99
    100) -> Response[Union[AssaysRunInteractiveBaselineResponse400, AssaysRunInteractiveBaselineResponse401, AssaysRunInteractiveBaselineResponse500, Optional[AssaysRunInteractiveBaselineResponse200]]]:
    101    """Create interactive baseline
    102
    103     Creates an interactive assay baseline.
    104
    105    Args:
    106        json_body (AssaysRunInteractiveBaselineJsonBody):  Request for interactive assay baseline.
    107
    108    Returns:
    109        Response[Union[AssaysRunInteractiveBaselineResponse400, AssaysRunInteractiveBaselineResponse401, AssaysRunInteractiveBaselineResponse500, Optional[AssaysRunInteractiveBaselineResponse200]]]
    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)
    125
    126def sync(
    127    *,
    128    client: Client,
    129    json_body: AssaysRunInteractiveBaselineJsonBody,
    130
    131) -> Optional[Union[AssaysRunInteractiveBaselineResponse400, AssaysRunInteractiveBaselineResponse401, AssaysRunInteractiveBaselineResponse500, Optional[AssaysRunInteractiveBaselineResponse200]]]:
    132    """Create interactive baseline
    133
    134     Creates an interactive assay baseline.
    135
    136    Args:
    137        json_body (AssaysRunInteractiveBaselineJsonBody):  Request for interactive assay baseline.
    138
    139    Returns:
    140        Response[Union[AssaysRunInteractiveBaselineResponse400, AssaysRunInteractiveBaselineResponse401, AssaysRunInteractiveBaselineResponse500, Optional[AssaysRunInteractiveBaselineResponse200]]]
    141    """
    142
    143
    144    return sync_detailed(
    145        client=client,
    146json_body=json_body,
    147
    148    ).parsed
    149
    150async def asyncio_detailed(
    151    *,
    152    client: Client,
    153    json_body: AssaysRunInteractiveBaselineJsonBody,
    154
    155) -> Response[Union[AssaysRunInteractiveBaselineResponse400, AssaysRunInteractiveBaselineResponse401, AssaysRunInteractiveBaselineResponse500, Optional[AssaysRunInteractiveBaselineResponse200]]]:
    156    """Create interactive baseline
    157
    158     Creates an interactive assay baseline.
    159
    160    Args:
    161        json_body (AssaysRunInteractiveBaselineJsonBody):  Request for interactive assay baseline.
    162
    163    Returns:
    164        Response[Union[AssaysRunInteractiveBaselineResponse400, AssaysRunInteractiveBaselineResponse401, AssaysRunInteractiveBaselineResponse500, Optional[AssaysRunInteractiveBaselineResponse200]]]
    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)
    180
    181async def asyncio(
    182    *,
    183    client: Client,
    184    json_body: AssaysRunInteractiveBaselineJsonBody,
    185
    186) -> Optional[Union[AssaysRunInteractiveBaselineResponse400, AssaysRunInteractiveBaselineResponse401, AssaysRunInteractiveBaselineResponse500, Optional[AssaysRunInteractiveBaselineResponse200]]]:
    187    """Create interactive baseline
    188
    189     Creates an interactive assay baseline.
    190
    191    Args:
    192        json_body (AssaysRunInteractiveBaselineJsonBody):  Request for interactive assay baseline.
    193
    194    Returns:
    195        Response[Union[AssaysRunInteractiveBaselineResponse400, AssaysRunInteractiveBaselineResponse401, AssaysRunInteractiveBaselineResponse500, Optional[AssaysRunInteractiveBaselineResponse200]]]
    196    """
    197
    198
    199    return (await asyncio_detailed(
    200        client=client,
    201json_body=json_body,
    202
    203    )).parsed

def sync_detailed( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.assays_run_interactive_baseline_json_body.AssaysRunInteractiveBaselineJsonBody) -> wallaroo.wallaroo_ml_ops_api_client.types.Response[typing.Union[wallaroo.wallaroo_ml_ops_api_client.models.assays_run_interactive_baseline_response_400.AssaysRunInteractiveBaselineResponse400, wallaroo.wallaroo_ml_ops_api_client.models.assays_run_interactive_baseline_response_401.AssaysRunInteractiveBaselineResponse401, wallaroo.wallaroo_ml_ops_api_client.models.assays_run_interactive_baseline_response_500.AssaysRunInteractiveBaselineResponse500, wallaroo.wallaroo_ml_ops_api_client.models.assays_run_interactive_baseline_response_200.AssaysRunInteractiveBaselineResponse200, NoneType]]: View Source

     96def sync_detailed(
     97    *,
     98    client: Client,
     99    json_body: AssaysRunInteractiveBaselineJsonBody,
    100
    101) -> Response[Union[AssaysRunInteractiveBaselineResponse400, AssaysRunInteractiveBaselineResponse401, AssaysRunInteractiveBaselineResponse500, Optional[AssaysRunInteractiveBaselineResponse200]]]:
    102    """Create interactive baseline
    103
    104     Creates an interactive assay baseline.
    105
    106    Args:
    107        json_body (AssaysRunInteractiveBaselineJsonBody):  Request for interactive assay baseline.
    108
    109    Returns:
    110        Response[Union[AssaysRunInteractiveBaselineResponse400, AssaysRunInteractiveBaselineResponse401, AssaysRunInteractiveBaselineResponse500, Optional[AssaysRunInteractiveBaselineResponse200]]]
    111    """
    112
    113
    114    kwargs = _get_kwargs(
    115        client=client,
    116json_body=json_body,
    117
    118    )
    119
    120    response = httpx.request(
    121        verify=client.verify_ssl,
    122        **kwargs,
    123    )
    124
    125    return _build_response(response=response)

Create interactive baseline

Creates an interactive assay baseline.

Args: json_body (AssaysRunInteractiveBaselineJsonBody): Request for interactive assay baseline.

Returns: Response[Union[AssaysRunInteractiveBaselineResponse400, AssaysRunInteractiveBaselineResponse401, AssaysRunInteractiveBaselineResponse500, Optional[AssaysRunInteractiveBaselineResponse200]]]

def sync( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.assays_run_interactive_baseline_json_body.AssaysRunInteractiveBaselineJsonBody) -> Union[wallaroo.wallaroo_ml_ops_api_client.models.assays_run_interactive_baseline_response_400.AssaysRunInteractiveBaselineResponse400, wallaroo.wallaroo_ml_ops_api_client.models.assays_run_interactive_baseline_response_401.AssaysRunInteractiveBaselineResponse401, wallaroo.wallaroo_ml_ops_api_client.models.assays_run_interactive_baseline_response_500.AssaysRunInteractiveBaselineResponse500, wallaroo.wallaroo_ml_ops_api_client.models.assays_run_interactive_baseline_response_200.AssaysRunInteractiveBaselineResponse200, NoneType]: View Source

    127def sync(
    128    *,
    129    client: Client,
    130    json_body: AssaysRunInteractiveBaselineJsonBody,
    131
    132) -> Optional[Union[AssaysRunInteractiveBaselineResponse400, AssaysRunInteractiveBaselineResponse401, AssaysRunInteractiveBaselineResponse500, Optional[AssaysRunInteractiveBaselineResponse200]]]:
    133    """Create interactive baseline
    134
    135     Creates an interactive assay baseline.
    136
    137    Args:
    138        json_body (AssaysRunInteractiveBaselineJsonBody):  Request for interactive assay baseline.
    139
    140    Returns:
    141        Response[Union[AssaysRunInteractiveBaselineResponse400, AssaysRunInteractiveBaselineResponse401, AssaysRunInteractiveBaselineResponse500, Optional[AssaysRunInteractiveBaselineResponse200]]]
    142    """
    143
    144
    145    return sync_detailed(
    146        client=client,
    147json_body=json_body,
    148
    149    ).parsed

Create interactive baseline

Creates an interactive assay baseline.

Args: json_body (AssaysRunInteractiveBaselineJsonBody): Request for interactive assay baseline.

Returns: Response[Union[AssaysRunInteractiveBaselineResponse400, AssaysRunInteractiveBaselineResponse401, AssaysRunInteractiveBaselineResponse500, Optional[AssaysRunInteractiveBaselineResponse200]]]

async def asyncio_detailed( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.assays_run_interactive_baseline_json_body.AssaysRunInteractiveBaselineJsonBody) -> wallaroo.wallaroo_ml_ops_api_client.types.Response[typing.Union[wallaroo.wallaroo_ml_ops_api_client.models.assays_run_interactive_baseline_response_400.AssaysRunInteractiveBaselineResponse400, wallaroo.wallaroo_ml_ops_api_client.models.assays_run_interactive_baseline_response_401.AssaysRunInteractiveBaselineResponse401, wallaroo.wallaroo_ml_ops_api_client.models.assays_run_interactive_baseline_response_500.AssaysRunInteractiveBaselineResponse500, wallaroo.wallaroo_ml_ops_api_client.models.assays_run_interactive_baseline_response_200.AssaysRunInteractiveBaselineResponse200, NoneType]]: View Source

    151async def asyncio_detailed(
    152    *,
    153    client: Client,
    154    json_body: AssaysRunInteractiveBaselineJsonBody,
    155
    156) -> Response[Union[AssaysRunInteractiveBaselineResponse400, AssaysRunInteractiveBaselineResponse401, AssaysRunInteractiveBaselineResponse500, Optional[AssaysRunInteractiveBaselineResponse200]]]:
    157    """Create interactive baseline
    158
    159     Creates an interactive assay baseline.
    160
    161    Args:
    162        json_body (AssaysRunInteractiveBaselineJsonBody):  Request for interactive assay baseline.
    163
    164    Returns:
    165        Response[Union[AssaysRunInteractiveBaselineResponse400, AssaysRunInteractiveBaselineResponse401, AssaysRunInteractiveBaselineResponse500, Optional[AssaysRunInteractiveBaselineResponse200]]]
    166    """
    167
    168
    169    kwargs = _get_kwargs(
    170        client=client,
    171json_body=json_body,
    172
    173    )
    174
    175    async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
    176        response = await _client.request(
    177            **kwargs
    178        )
    179
    180    return _build_response(response=response)

Create interactive baseline

Creates an interactive assay baseline.

Args: json_body (AssaysRunInteractiveBaselineJsonBody): Request for interactive assay baseline.

Returns: Response[Union[AssaysRunInteractiveBaselineResponse400, AssaysRunInteractiveBaselineResponse401, AssaysRunInteractiveBaselineResponse500, Optional[AssaysRunInteractiveBaselineResponse200]]]

async def asyncio( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.assays_run_interactive_baseline_json_body.AssaysRunInteractiveBaselineJsonBody) -> Union[wallaroo.wallaroo_ml_ops_api_client.models.assays_run_interactive_baseline_response_400.AssaysRunInteractiveBaselineResponse400, wallaroo.wallaroo_ml_ops_api_client.models.assays_run_interactive_baseline_response_401.AssaysRunInteractiveBaselineResponse401, wallaroo.wallaroo_ml_ops_api_client.models.assays_run_interactive_baseline_response_500.AssaysRunInteractiveBaselineResponse500, wallaroo.wallaroo_ml_ops_api_client.models.assays_run_interactive_baseline_response_200.AssaysRunInteractiveBaselineResponse200, NoneType]: View Source

    182async def asyncio(
    183    *,
    184    client: Client,
    185    json_body: AssaysRunInteractiveBaselineJsonBody,
    186
    187) -> Optional[Union[AssaysRunInteractiveBaselineResponse400, AssaysRunInteractiveBaselineResponse401, AssaysRunInteractiveBaselineResponse500, Optional[AssaysRunInteractiveBaselineResponse200]]]:
    188    """Create interactive baseline
    189
    190     Creates an interactive assay baseline.
    191
    192    Args:
    193        json_body (AssaysRunInteractiveBaselineJsonBody):  Request for interactive assay baseline.
    194
    195    Returns:
    196        Response[Union[AssaysRunInteractiveBaselineResponse400, AssaysRunInteractiveBaselineResponse401, AssaysRunInteractiveBaselineResponse500, Optional[AssaysRunInteractiveBaselineResponse200]]]
    197    """
    198
    199
    200    return (await asyncio_detailed(
    201        client=client,
    202json_body=json_body,
    203
    204    )).parsed

Create interactive baseline

Creates an interactive assay baseline.

Args: json_body (AssaysRunInteractiveBaselineJsonBody): Request for interactive assay baseline.

Returns: Response[Union[AssaysRunInteractiveBaselineResponse400, AssaysRunInteractiveBaselineResponse401, AssaysRunInteractiveBaselineResponse500, Optional[AssaysRunInteractiveBaselineResponse200]]]