wallaroo.wallaroo_ml_ops_api_client.api.admin.admin_get_pipeline_internal_url API documentation

# wallaroo.wallaroo_ml_ops_api_client.api.admin.admin_get_pipeline_internal_url

View Source

      1from typing import Any, Dict, Optional, Union
      2
      3import httpx
      4
      5from ...client import Client
      6from ...models.admin_get_pipeline_internal_url_json_body import \
      7    AdminGetPipelineInternalUrlJsonBody
      8from ...models.admin_get_pipeline_internal_url_response_200 import \
      9    AdminGetPipelineInternalUrlResponse200
     10from ...models.admin_get_pipeline_internal_url_response_400 import \
     11    AdminGetPipelineInternalUrlResponse400
     12from ...models.admin_get_pipeline_internal_url_response_401 import \
     13    AdminGetPipelineInternalUrlResponse401
     14from ...models.admin_get_pipeline_internal_url_response_500 import \
     15    AdminGetPipelineInternalUrlResponse500
     16from ...types import Response
     17
     18
     19def _get_kwargs(
     20    *,
     21    client: Client,
     22    json_body: AdminGetPipelineInternalUrlJsonBody,
     23
     24) -> Dict[str, Any]:
     25    url = "{}/v1/api/admin/get_pipeline_internal_url".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[AdminGetPipelineInternalUrlResponse200, AdminGetPipelineInternalUrlResponse400, AdminGetPipelineInternalUrlResponse401, AdminGetPipelineInternalUrlResponse500]]:
     54    if response.status_code == 500:
     55        response_500 = AdminGetPipelineInternalUrlResponse500.from_dict(response.json())
     56
     57
     58
     59        return response_500
     60    if response.status_code == 400:
     61        response_400 = AdminGetPipelineInternalUrlResponse400.from_dict(response.json())
     62
     63
     64
     65        return response_400
     66    if response.status_code == 401:
     67        response_401 = AdminGetPipelineInternalUrlResponse401.from_dict(response.json())
     68
     69
     70
     71        return response_401
     72    if response.status_code == 200:
     73        response_200 = AdminGetPipelineInternalUrlResponse200.from_dict(response.json())
     74
     75
     76
     77        return response_200
     78    return None
     79
     80
     81def _build_response(*, response: httpx.Response) -> Response[Union[AdminGetPipelineInternalUrlResponse200, AdminGetPipelineInternalUrlResponse400, AdminGetPipelineInternalUrlResponse401, AdminGetPipelineInternalUrlResponse500]]:
     82    return Response(
     83        status_code=response.status_code,
     84        content=response.content,
     85        headers=response.headers,
     86        parsed=_parse_response(response=response),
     87    )
     88
     89
     90def sync_detailed(
     91    *,
     92    client: Client,
     93    json_body: AdminGetPipelineInternalUrlJsonBody,
     94
     95) -> Response[Union[AdminGetPipelineInternalUrlResponse200, AdminGetPipelineInternalUrlResponse400, AdminGetPipelineInternalUrlResponse401, AdminGetPipelineInternalUrlResponse500]]:
     96    """Returns the URL for the given pipeline that clients may send inferences to from inside of the
     97    cluster.
     98
     99     Returns the internal inference URL for a given pipeline.
    100
    101    Args:
    102        json_body (AdminGetPipelineInternalUrlJsonBody):  Request for pipeline URL-related
    103            operations.
    104
    105    Returns:
    106        Response[Union[AdminGetPipelineInternalUrlResponse200, AdminGetPipelineInternalUrlResponse400, AdminGetPipelineInternalUrlResponse401, AdminGetPipelineInternalUrlResponse500]]
    107    """
    108
    109
    110    kwargs = _get_kwargs(
    111        client=client,
    112json_body=json_body,
    113
    114    )
    115
    116    response = httpx.request(
    117        verify=client.verify_ssl,
    118        **kwargs,
    119    )
    120
    121    return _build_response(response=response)
    122
    123def sync(
    124    *,
    125    client: Client,
    126    json_body: AdminGetPipelineInternalUrlJsonBody,
    127
    128) -> Optional[Union[AdminGetPipelineInternalUrlResponse200, AdminGetPipelineInternalUrlResponse400, AdminGetPipelineInternalUrlResponse401, AdminGetPipelineInternalUrlResponse500]]:
    129    """Returns the URL for the given pipeline that clients may send inferences to from inside of the
    130    cluster.
    131
    132     Returns the internal inference URL for a given pipeline.
    133
    134    Args:
    135        json_body (AdminGetPipelineInternalUrlJsonBody):  Request for pipeline URL-related
    136            operations.
    137
    138    Returns:
    139        Response[Union[AdminGetPipelineInternalUrlResponse200, AdminGetPipelineInternalUrlResponse400, AdminGetPipelineInternalUrlResponse401, AdminGetPipelineInternalUrlResponse500]]
    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: AdminGetPipelineInternalUrlJsonBody,
    153
    154) -> Response[Union[AdminGetPipelineInternalUrlResponse200, AdminGetPipelineInternalUrlResponse400, AdminGetPipelineInternalUrlResponse401, AdminGetPipelineInternalUrlResponse500]]:
    155    """Returns the URL for the given pipeline that clients may send inferences to from inside of the
    156    cluster.
    157
    158     Returns the internal inference URL for a given pipeline.
    159
    160    Args:
    161        json_body (AdminGetPipelineInternalUrlJsonBody):  Request for pipeline URL-related
    162            operations.
    163
    164    Returns:
    165        Response[Union[AdminGetPipelineInternalUrlResponse200, AdminGetPipelineInternalUrlResponse400, AdminGetPipelineInternalUrlResponse401, AdminGetPipelineInternalUrlResponse500]]
    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)
    181
    182async def asyncio(
    183    *,
    184    client: Client,
    185    json_body: AdminGetPipelineInternalUrlJsonBody,
    186
    187) -> Optional[Union[AdminGetPipelineInternalUrlResponse200, AdminGetPipelineInternalUrlResponse400, AdminGetPipelineInternalUrlResponse401, AdminGetPipelineInternalUrlResponse500]]:
    188    """Returns the URL for the given pipeline that clients may send inferences to from inside of the
    189    cluster.
    190
    191     Returns the internal inference URL for a given pipeline.
    192
    193    Args:
    194        json_body (AdminGetPipelineInternalUrlJsonBody):  Request for pipeline URL-related
    195            operations.
    196
    197    Returns:
    198        Response[Union[AdminGetPipelineInternalUrlResponse200, AdminGetPipelineInternalUrlResponse400, AdminGetPipelineInternalUrlResponse401, AdminGetPipelineInternalUrlResponse500]]
    199    """
    200
    201
    202    return (await asyncio_detailed(
    203        client=client,
    204json_body=json_body,
    205
    206    )).parsed

def sync_detailed( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.admin_get_pipeline_internal_url_json_body.AdminGetPipelineInternalUrlJsonBody) -> wallaroo.wallaroo_ml_ops_api_client.types.Response[typing.Union[wallaroo.wallaroo_ml_ops_api_client.models.admin_get_pipeline_internal_url_response_200.AdminGetPipelineInternalUrlResponse200, wallaroo.wallaroo_ml_ops_api_client.models.admin_get_pipeline_internal_url_response_400.AdminGetPipelineInternalUrlResponse400, wallaroo.wallaroo_ml_ops_api_client.models.admin_get_pipeline_internal_url_response_401.AdminGetPipelineInternalUrlResponse401, wallaroo.wallaroo_ml_ops_api_client.models.admin_get_pipeline_internal_url_response_500.AdminGetPipelineInternalUrlResponse500]]: View Source

     91def sync_detailed(
     92    *,
     93    client: Client,
     94    json_body: AdminGetPipelineInternalUrlJsonBody,
     95
     96) -> Response[Union[AdminGetPipelineInternalUrlResponse200, AdminGetPipelineInternalUrlResponse400, AdminGetPipelineInternalUrlResponse401, AdminGetPipelineInternalUrlResponse500]]:
     97    """Returns the URL for the given pipeline that clients may send inferences to from inside of the
     98    cluster.
     99
    100     Returns the internal inference URL for a given pipeline.
    101
    102    Args:
    103        json_body (AdminGetPipelineInternalUrlJsonBody):  Request for pipeline URL-related
    104            operations.
    105
    106    Returns:
    107        Response[Union[AdminGetPipelineInternalUrlResponse200, AdminGetPipelineInternalUrlResponse400, AdminGetPipelineInternalUrlResponse401, AdminGetPipelineInternalUrlResponse500]]
    108    """
    109
    110
    111    kwargs = _get_kwargs(
    112        client=client,
    113json_body=json_body,
    114
    115    )
    116
    117    response = httpx.request(
    118        verify=client.verify_ssl,
    119        **kwargs,
    120    )
    121
    122    return _build_response(response=response)

Returns the URL for the given pipeline that clients may send inferences to from inside of the cluster.

Returns the internal inference URL for a given pipeline.

Args: json_body (AdminGetPipelineInternalUrlJsonBody): Request for pipeline URL-related operations.

Returns: Response[Union[AdminGetPipelineInternalUrlResponse200, AdminGetPipelineInternalUrlResponse400, AdminGetPipelineInternalUrlResponse401, AdminGetPipelineInternalUrlResponse500]]

def sync( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.admin_get_pipeline_internal_url_json_body.AdminGetPipelineInternalUrlJsonBody) -> Union[wallaroo.wallaroo_ml_ops_api_client.models.admin_get_pipeline_internal_url_response_200.AdminGetPipelineInternalUrlResponse200, wallaroo.wallaroo_ml_ops_api_client.models.admin_get_pipeline_internal_url_response_400.AdminGetPipelineInternalUrlResponse400, wallaroo.wallaroo_ml_ops_api_client.models.admin_get_pipeline_internal_url_response_401.AdminGetPipelineInternalUrlResponse401, wallaroo.wallaroo_ml_ops_api_client.models.admin_get_pipeline_internal_url_response_500.AdminGetPipelineInternalUrlResponse500, NoneType]: View Source

    124def sync(
    125    *,
    126    client: Client,
    127    json_body: AdminGetPipelineInternalUrlJsonBody,
    128
    129) -> Optional[Union[AdminGetPipelineInternalUrlResponse200, AdminGetPipelineInternalUrlResponse400, AdminGetPipelineInternalUrlResponse401, AdminGetPipelineInternalUrlResponse500]]:
    130    """Returns the URL for the given pipeline that clients may send inferences to from inside of the
    131    cluster.
    132
    133     Returns the internal inference URL for a given pipeline.
    134
    135    Args:
    136        json_body (AdminGetPipelineInternalUrlJsonBody):  Request for pipeline URL-related
    137            operations.
    138
    139    Returns:
    140        Response[Union[AdminGetPipelineInternalUrlResponse200, AdminGetPipelineInternalUrlResponse400, AdminGetPipelineInternalUrlResponse401, AdminGetPipelineInternalUrlResponse500]]
    141    """
    142
    143
    144    return sync_detailed(
    145        client=client,
    146json_body=json_body,
    147
    148    ).parsed

Returns the URL for the given pipeline that clients may send inferences to from inside of the cluster.

Returns the internal inference URL for a given pipeline.

Args: json_body (AdminGetPipelineInternalUrlJsonBody): Request for pipeline URL-related operations.

Returns: Response[Union[AdminGetPipelineInternalUrlResponse200, AdminGetPipelineInternalUrlResponse400, AdminGetPipelineInternalUrlResponse401, AdminGetPipelineInternalUrlResponse500]]

async def asyncio_detailed( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.admin_get_pipeline_internal_url_json_body.AdminGetPipelineInternalUrlJsonBody) -> wallaroo.wallaroo_ml_ops_api_client.types.Response[typing.Union[wallaroo.wallaroo_ml_ops_api_client.models.admin_get_pipeline_internal_url_response_200.AdminGetPipelineInternalUrlResponse200, wallaroo.wallaroo_ml_ops_api_client.models.admin_get_pipeline_internal_url_response_400.AdminGetPipelineInternalUrlResponse400, wallaroo.wallaroo_ml_ops_api_client.models.admin_get_pipeline_internal_url_response_401.AdminGetPipelineInternalUrlResponse401, wallaroo.wallaroo_ml_ops_api_client.models.admin_get_pipeline_internal_url_response_500.AdminGetPipelineInternalUrlResponse500]]: View Source

    150async def asyncio_detailed(
    151    *,
    152    client: Client,
    153    json_body: AdminGetPipelineInternalUrlJsonBody,
    154
    155) -> Response[Union[AdminGetPipelineInternalUrlResponse200, AdminGetPipelineInternalUrlResponse400, AdminGetPipelineInternalUrlResponse401, AdminGetPipelineInternalUrlResponse500]]:
    156    """Returns the URL for the given pipeline that clients may send inferences to from inside of the
    157    cluster.
    158
    159     Returns the internal inference URL for a given pipeline.
    160
    161    Args:
    162        json_body (AdminGetPipelineInternalUrlJsonBody):  Request for pipeline URL-related
    163            operations.
    164
    165    Returns:
    166        Response[Union[AdminGetPipelineInternalUrlResponse200, AdminGetPipelineInternalUrlResponse400, AdminGetPipelineInternalUrlResponse401, AdminGetPipelineInternalUrlResponse500]]
    167    """
    168
    169
    170    kwargs = _get_kwargs(
    171        client=client,
    172json_body=json_body,
    173
    174    )
    175
    176    async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
    177        response = await _client.request(
    178            **kwargs
    179        )
    180
    181    return _build_response(response=response)

Returns the URL for the given pipeline that clients may send inferences to from inside of the cluster.

Returns the internal inference URL for a given pipeline.

Args: json_body (AdminGetPipelineInternalUrlJsonBody): Request for pipeline URL-related operations.

Returns: Response[Union[AdminGetPipelineInternalUrlResponse200, AdminGetPipelineInternalUrlResponse400, AdminGetPipelineInternalUrlResponse401, AdminGetPipelineInternalUrlResponse500]]

async def asyncio( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.admin_get_pipeline_internal_url_json_body.AdminGetPipelineInternalUrlJsonBody) -> Union[wallaroo.wallaroo_ml_ops_api_client.models.admin_get_pipeline_internal_url_response_200.AdminGetPipelineInternalUrlResponse200, wallaroo.wallaroo_ml_ops_api_client.models.admin_get_pipeline_internal_url_response_400.AdminGetPipelineInternalUrlResponse400, wallaroo.wallaroo_ml_ops_api_client.models.admin_get_pipeline_internal_url_response_401.AdminGetPipelineInternalUrlResponse401, wallaroo.wallaroo_ml_ops_api_client.models.admin_get_pipeline_internal_url_response_500.AdminGetPipelineInternalUrlResponse500, NoneType]: View Source

    183async def asyncio(
    184    *,
    185    client: Client,
    186    json_body: AdminGetPipelineInternalUrlJsonBody,
    187
    188) -> Optional[Union[AdminGetPipelineInternalUrlResponse200, AdminGetPipelineInternalUrlResponse400, AdminGetPipelineInternalUrlResponse401, AdminGetPipelineInternalUrlResponse500]]:
    189    """Returns the URL for the given pipeline that clients may send inferences to from inside of the
    190    cluster.
    191
    192     Returns the internal inference URL for a given pipeline.
    193
    194    Args:
    195        json_body (AdminGetPipelineInternalUrlJsonBody):  Request for pipeline URL-related
    196            operations.
    197
    198    Returns:
    199        Response[Union[AdminGetPipelineInternalUrlResponse200, AdminGetPipelineInternalUrlResponse400, AdminGetPipelineInternalUrlResponse401, AdminGetPipelineInternalUrlResponse500]]
    200    """
    201
    202
    203    return (await asyncio_detailed(
    204        client=client,
    205json_body=json_body,
    206
    207    )).parsed

Returns the URL for the given pipeline that clients may send inferences to from inside of the cluster.

Returns the internal inference URL for a given pipeline.

Args: json_body (AdminGetPipelineInternalUrlJsonBody): Request for pipeline URL-related operations.

Returns: Response[Union[AdminGetPipelineInternalUrlResponse200, AdminGetPipelineInternalUrlResponse400, AdminGetPipelineInternalUrlResponse401, AdminGetPipelineInternalUrlResponse500]]