wallaroo.wallaroo_ml_ops_api_client.api.misc.features_list API documentation

# wallaroo.wallaroo_ml_ops_api_client.api.misc.features_list

View Source

      1from typing import Any, Dict, Optional
      2
      3import httpx
      4
      5from ...client import Client
      6from ...models.features_list_response_200 import FeaturesListResponse200
      7from ...types import Response
      8
      9
     10def _get_kwargs(
     11    *,
     12    client: Client,
     13
     14) -> Dict[str, Any]:
     15    url = "{}/v1/api/features/list".format(
     16        client.base_url)
     17
     18    headers: Dict[str, str] = client.get_headers()
     19    cookies: Dict[str, Any] = client.get_cookies()
     20
     21
     22
     23
     24
     25
     26
     27
     28
     29
     30
     31    return {
     32	    "method": "post",
     33        "url": url,
     34        "headers": headers,
     35        "cookies": cookies,
     36        "timeout": client.get_timeout(),
     37    }
     38
     39
     40def _parse_response(*, response: httpx.Response) -> Optional[FeaturesListResponse200]:
     41    if response.status_code == 200:
     42        response_200 = FeaturesListResponse200.from_dict(response.json())
     43
     44
     45
     46        return response_200
     47    return None
     48
     49
     50def _build_response(*, response: httpx.Response) -> Response[FeaturesListResponse200]:
     51    return Response(
     52        status_code=response.status_code,
     53        content=response.content,
     54        headers=response.headers,
     55        parsed=_parse_response(response=response),
     56    )
     57
     58
     59def sync_detailed(
     60    *,
     61    client: Client,
     62
     63) -> Response[FeaturesListResponse200]:
     64    """List enabled features
     65
     66     List enabled features.
     67
     68    Returns:
     69        Response[FeaturesListResponse200]
     70    """
     71
     72
     73    kwargs = _get_kwargs(
     74        client=client,
     75
     76    )
     77
     78    response = httpx.request(
     79        verify=client.verify_ssl,
     80        **kwargs,
     81    )
     82
     83    return _build_response(response=response)
     84
     85def sync(
     86    *,
     87    client: Client,
     88
     89) -> Optional[FeaturesListResponse200]:
     90    """List enabled features
     91
     92     List enabled features.
     93
     94    Returns:
     95        Response[FeaturesListResponse200]
     96    """
     97
     98
     99    return sync_detailed(
    100        client=client,
    101
    102    ).parsed
    103
    104async def asyncio_detailed(
    105    *,
    106    client: Client,
    107
    108) -> Response[FeaturesListResponse200]:
    109    """List enabled features
    110
    111     List enabled features.
    112
    113    Returns:
    114        Response[FeaturesListResponse200]
    115    """
    116
    117
    118    kwargs = _get_kwargs(
    119        client=client,
    120
    121    )
    122
    123    async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
    124        response = await _client.request(
    125            **kwargs
    126        )
    127
    128    return _build_response(response=response)
    129
    130async def asyncio(
    131    *,
    132    client: Client,
    133
    134) -> Optional[FeaturesListResponse200]:
    135    """List enabled features
    136
    137     List enabled features.
    138
    139    Returns:
    140        Response[FeaturesListResponse200]
    141    """
    142
    143
    144    return (await asyncio_detailed(
    145        client=client,
    146
    147    )).parsed

def sync_detailed( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client) -> wallaroo.wallaroo_ml_ops_api_client.types.Response[wallaroo.wallaroo_ml_ops_api_client.models.features_list_response_200.FeaturesListResponse200]: View Source

    60def sync_detailed(
    61    *,
    62    client: Client,
    63
    64) -> Response[FeaturesListResponse200]:
    65    """List enabled features
    66
    67     List enabled features.
    68
    69    Returns:
    70        Response[FeaturesListResponse200]
    71    """
    72
    73
    74    kwargs = _get_kwargs(
    75        client=client,
    76
    77    )
    78
    79    response = httpx.request(
    80        verify=client.verify_ssl,
    81        **kwargs,
    82    )
    83
    84    return _build_response(response=response)

List enabled features

List enabled features.

Returns: Response[FeaturesListResponse200]

def sync( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client) -> Optional[wallaroo.wallaroo_ml_ops_api_client.models.features_list_response_200.FeaturesListResponse200]: View Source

     86def sync(
     87    *,
     88    client: Client,
     89
     90) -> Optional[FeaturesListResponse200]:
     91    """List enabled features
     92
     93     List enabled features.
     94
     95    Returns:
     96        Response[FeaturesListResponse200]
     97    """
     98
     99
    100    return sync_detailed(
    101        client=client,
    102
    103    ).parsed

List enabled features

List enabled features.

Returns: Response[FeaturesListResponse200]

async def asyncio_detailed( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client) -> wallaroo.wallaroo_ml_ops_api_client.types.Response[wallaroo.wallaroo_ml_ops_api_client.models.features_list_response_200.FeaturesListResponse200]: View Source

    105async def asyncio_detailed(
    106    *,
    107    client: Client,
    108
    109) -> Response[FeaturesListResponse200]:
    110    """List enabled features
    111
    112     List enabled features.
    113
    114    Returns:
    115        Response[FeaturesListResponse200]
    116    """
    117
    118
    119    kwargs = _get_kwargs(
    120        client=client,
    121
    122    )
    123
    124    async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
    125        response = await _client.request(
    126            **kwargs
    127        )
    128
    129    return _build_response(response=response)

List enabled features

List enabled features.

Returns: Response[FeaturesListResponse200]

async def asyncio( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client) -> Optional[wallaroo.wallaroo_ml_ops_api_client.models.features_list_response_200.FeaturesListResponse200]: View Source

    131async def asyncio(
    132    *,
    133    client: Client,
    134
    135) -> Optional[FeaturesListResponse200]:
    136    """List enabled features
    137
    138     List enabled features.
    139
    140    Returns:
    141        Response[FeaturesListResponse200]
    142    """
    143
    144
    145    return (await asyncio_detailed(
    146        client=client,
    147
    148    )).parsed

List enabled features

List enabled features.

Returns: Response[FeaturesListResponse200]