wallaroo.wallaroo_ml_ops_api_client.api.assay.assays_filter API documentation

# wallaroo.wallaroo_ml_ops_api_client.api.assay.assays_filter

View Source

      1from typing import Any, Dict, List, Optional, Union
      2
      3import httpx
      4
      5from ...client import Client
      6from ...models.assays_filter_json_body import AssaysFilterJsonBody
      7from ...models.assays_filter_response_200_item import \
      8    AssaysFilterResponse200Item
      9from ...models.assays_filter_response_500 import AssaysFilterResponse500
     10from ...types import Response
     11
     12
     13def _get_kwargs(
     14    *,
     15    client: Client,
     16    json_body: AssaysFilterJsonBody,
     17
     18) -> Dict[str, Any]:
     19    url = "{}/v1/api/assays/filter".format(
     20        client.base_url)
     21
     22    headers: Dict[str, str] = client.get_headers()
     23    cookies: Dict[str, Any] = client.get_cookies()
     24
     25
     26
     27
     28
     29
     30
     31    json_json_body = json_body.to_dict()
     32
     33
     34
     35
     36
     37    return {
     38	    "method": "post",
     39        "url": url,
     40        "headers": headers,
     41        "cookies": cookies,
     42        "timeout": client.get_timeout(),
     43        "json": json_json_body,
     44    }
     45
     46
     47def _parse_response(*, response: httpx.Response) -> Optional[Union[AssaysFilterResponse500, List[AssaysFilterResponse200Item]]]:
     48    if response.status_code == 500:
     49        response_500 = AssaysFilterResponse500.from_dict(response.json())
     50
     51
     52
     53        return response_500
     54    if response.status_code == 200:
     55        response_200 = []
     56        _response_200 = response.json()
     57        for response_200_item_data in (_response_200):
     58            response_200_item = AssaysFilterResponse200Item.from_dict(response_200_item_data)
     59
     60
     61
     62            response_200.append(response_200_item)
     63
     64        return response_200
     65    return None
     66
     67
     68def _build_response(*, response: httpx.Response) -> Response[Union[AssaysFilterResponse500, List[AssaysFilterResponse200Item]]]:
     69    return Response(
     70        status_code=response.status_code,
     71        content=response.content,
     72        headers=response.headers,
     73        parsed=_parse_response(response=response),
     74    )
     75
     76
     77def sync_detailed(
     78    *,
     79    client: Client,
     80    json_body: AssaysFilterJsonBody,
     81
     82) -> Response[Union[AssaysFilterResponse500, List[AssaysFilterResponse200Item]]]:
     83    """Retrieve assay configs, filtered and sorted as requested.
     84
     85     Returns the list of existing assays filterable by assay name, id, active, creation date, and last
     86    run date.
     87
     88    Args:
     89        json_body (AssaysFilterJsonBody):
     90
     91    Returns:
     92        Response[Union[AssaysFilterResponse500, List[AssaysFilterResponse200Item]]]
     93    """
     94
     95
     96    kwargs = _get_kwargs(
     97        client=client,
     98json_body=json_body,
     99
    100    )
    101
    102    response = httpx.request(
    103        verify=client.verify_ssl,
    104        **kwargs,
    105    )
    106
    107    return _build_response(response=response)
    108
    109def sync(
    110    *,
    111    client: Client,
    112    json_body: AssaysFilterJsonBody,
    113
    114) -> Optional[Union[AssaysFilterResponse500, List[AssaysFilterResponse200Item]]]:
    115    """Retrieve assay configs, filtered and sorted as requested.
    116
    117     Returns the list of existing assays filterable by assay name, id, active, creation date, and last
    118    run date.
    119
    120    Args:
    121        json_body (AssaysFilterJsonBody):
    122
    123    Returns:
    124        Response[Union[AssaysFilterResponse500, List[AssaysFilterResponse200Item]]]
    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: AssaysFilterJsonBody,
    138
    139) -> Response[Union[AssaysFilterResponse500, List[AssaysFilterResponse200Item]]]:
    140    """Retrieve assay configs, filtered and sorted as requested.
    141
    142     Returns the list of existing assays filterable by assay name, id, active, creation date, and last
    143    run date.
    144
    145    Args:
    146        json_body (AssaysFilterJsonBody):
    147
    148    Returns:
    149        Response[Union[AssaysFilterResponse500, List[AssaysFilterResponse200Item]]]
    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)
    165
    166async def asyncio(
    167    *,
    168    client: Client,
    169    json_body: AssaysFilterJsonBody,
    170
    171) -> Optional[Union[AssaysFilterResponse500, List[AssaysFilterResponse200Item]]]:
    172    """Retrieve assay configs, filtered and sorted as requested.
    173
    174     Returns the list of existing assays filterable by assay name, id, active, creation date, and last
    175    run date.
    176
    177    Args:
    178        json_body (AssaysFilterJsonBody):
    179
    180    Returns:
    181        Response[Union[AssaysFilterResponse500, List[AssaysFilterResponse200Item]]]
    182    """
    183
    184
    185    return (await asyncio_detailed(
    186        client=client,
    187json_body=json_body,
    188
    189    )).parsed

def sync_detailed( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.assays_filter_json_body.AssaysFilterJsonBody) -> wallaroo.wallaroo_ml_ops_api_client.types.Response[typing.Union[wallaroo.wallaroo_ml_ops_api_client.models.assays_filter_response_500.AssaysFilterResponse500, typing.List[wallaroo.wallaroo_ml_ops_api_client.models.assays_filter_response_200_item.AssaysFilterResponse200Item]]]: View Source

     78def sync_detailed(
     79    *,
     80    client: Client,
     81    json_body: AssaysFilterJsonBody,
     82
     83) -> Response[Union[AssaysFilterResponse500, List[AssaysFilterResponse200Item]]]:
     84    """Retrieve assay configs, filtered and sorted as requested.
     85
     86     Returns the list of existing assays filterable by assay name, id, active, creation date, and last
     87    run date.
     88
     89    Args:
     90        json_body (AssaysFilterJsonBody):
     91
     92    Returns:
     93        Response[Union[AssaysFilterResponse500, List[AssaysFilterResponse200Item]]]
     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)

Retrieve assay configs, filtered and sorted as requested.

Returns the list of existing assays filterable by assay name, id, active, creation date, and last run date.

Args: json_body (AssaysFilterJsonBody):

Returns: Response[Union[AssaysFilterResponse500, List[AssaysFilterResponse200Item]]]

def sync( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.assays_filter_json_body.AssaysFilterJsonBody) -> Union[wallaroo.wallaroo_ml_ops_api_client.models.assays_filter_response_500.AssaysFilterResponse500, List[wallaroo.wallaroo_ml_ops_api_client.models.assays_filter_response_200_item.AssaysFilterResponse200Item], NoneType]: View Source

    110def sync(
    111    *,
    112    client: Client,
    113    json_body: AssaysFilterJsonBody,
    114
    115) -> Optional[Union[AssaysFilterResponse500, List[AssaysFilterResponse200Item]]]:
    116    """Retrieve assay configs, filtered and sorted as requested.
    117
    118     Returns the list of existing assays filterable by assay name, id, active, creation date, and last
    119    run date.
    120
    121    Args:
    122        json_body (AssaysFilterJsonBody):
    123
    124    Returns:
    125        Response[Union[AssaysFilterResponse500, List[AssaysFilterResponse200Item]]]
    126    """
    127
    128
    129    return sync_detailed(
    130        client=client,
    131json_body=json_body,
    132
    133    ).parsed

Retrieve assay configs, filtered and sorted as requested.

Returns the list of existing assays filterable by assay name, id, active, creation date, and last run date.

Args: json_body (AssaysFilterJsonBody):

Returns: Response[Union[AssaysFilterResponse500, List[AssaysFilterResponse200Item]]]

async def asyncio_detailed( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.assays_filter_json_body.AssaysFilterJsonBody) -> wallaroo.wallaroo_ml_ops_api_client.types.Response[typing.Union[wallaroo.wallaroo_ml_ops_api_client.models.assays_filter_response_500.AssaysFilterResponse500, typing.List[wallaroo.wallaroo_ml_ops_api_client.models.assays_filter_response_200_item.AssaysFilterResponse200Item]]]: View Source

    135async def asyncio_detailed(
    136    *,
    137    client: Client,
    138    json_body: AssaysFilterJsonBody,
    139
    140) -> Response[Union[AssaysFilterResponse500, List[AssaysFilterResponse200Item]]]:
    141    """Retrieve assay configs, filtered and sorted as requested.
    142
    143     Returns the list of existing assays filterable by assay name, id, active, creation date, and last
    144    run date.
    145
    146    Args:
    147        json_body (AssaysFilterJsonBody):
    148
    149    Returns:
    150        Response[Union[AssaysFilterResponse500, List[AssaysFilterResponse200Item]]]
    151    """
    152
    153
    154    kwargs = _get_kwargs(
    155        client=client,
    156json_body=json_body,
    157
    158    )
    159
    160    async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
    161        response = await _client.request(
    162            **kwargs
    163        )
    164
    165    return _build_response(response=response)

Retrieve assay configs, filtered and sorted as requested.

Returns the list of existing assays filterable by assay name, id, active, creation date, and last run date.

Args: json_body (AssaysFilterJsonBody):

Returns: Response[Union[AssaysFilterResponse500, List[AssaysFilterResponse200Item]]]

async def asyncio( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.assays_filter_json_body.AssaysFilterJsonBody) -> Union[wallaroo.wallaroo_ml_ops_api_client.models.assays_filter_response_500.AssaysFilterResponse500, List[wallaroo.wallaroo_ml_ops_api_client.models.assays_filter_response_200_item.AssaysFilterResponse200Item], NoneType]: View Source

    167async def asyncio(
    168    *,
    169    client: Client,
    170    json_body: AssaysFilterJsonBody,
    171
    172) -> Optional[Union[AssaysFilterResponse500, List[AssaysFilterResponse200Item]]]:
    173    """Retrieve assay configs, filtered and sorted as requested.
    174
    175     Returns the list of existing assays filterable by assay name, id, active, creation date, and last
    176    run date.
    177
    178    Args:
    179        json_body (AssaysFilterJsonBody):
    180
    181    Returns:
    182        Response[Union[AssaysFilterResponse500, List[AssaysFilterResponse200Item]]]
    183    """
    184
    185
    186    return (await asyncio_detailed(
    187        client=client,
    188json_body=json_body,
    189
    190    )).parsed

Retrieve assay configs, filtered and sorted as requested.

Returns the list of existing assays filterable by assay name, id, active, creation date, and last run date.

Args: json_body (AssaysFilterJsonBody):

Returns: Response[Union[AssaysFilterResponse500, List[AssaysFilterResponse200Item]]]