unique-search-proxy-sdk 2026.26.0.dev0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- unique_search_proxy_sdk/__init__.py +27 -0
- unique_search_proxy_sdk/_generated/__init__.py +8 -0
- unique_search_proxy_sdk/_generated/api/__init__.py +1 -0
- unique_search_proxy_sdk/_generated/api/configuration/__init__.py +1 -0
- unique_search_proxy_sdk/_generated/api/configuration/list_providers_v1_configuration_providers_get.py +128 -0
- unique_search_proxy_sdk/_generated/api/crawl/__init__.py +1 -0
- unique_search_proxy_sdk/_generated/api/crawl/crawl_v1_crawl_post.py +166 -0
- unique_search_proxy_sdk/_generated/api/health/__init__.py +1 -0
- unique_search_proxy_sdk/_generated/api/health/health_health_get.py +130 -0
- unique_search_proxy_sdk/_generated/api/health/ready_ready_get.py +130 -0
- unique_search_proxy_sdk/_generated/api/search/__init__.py +1 -0
- unique_search_proxy_sdk/_generated/api/search/search_v1_search_post.py +166 -0
- unique_search_proxy_sdk/_generated/client.py +282 -0
- unique_search_proxy_sdk/_generated/errors.py +16 -0
- unique_search_proxy_sdk/_generated/models/__init__.py +37 -0
- unique_search_proxy_sdk/_generated/models/basic_proxy_crawler.py +124 -0
- unique_search_proxy_sdk/_generated/models/content_types.py +98 -0
- unique_search_proxy_sdk/_generated/models/crawl_response.py +83 -0
- unique_search_proxy_sdk/_generated/models/crawl_url_result.py +161 -0
- unique_search_proxy_sdk/_generated/models/google_request.py +359 -0
- unique_search_proxy_sdk/_generated/models/google_request_safe_search.py +9 -0
- unique_search_proxy_sdk/_generated/models/google_request_site_search_filter_type_0.py +9 -0
- unique_search_proxy_sdk/_generated/models/health_health_get_response_health_health_get.py +47 -0
- unique_search_proxy_sdk/_generated/models/http_validation_error.py +79 -0
- unique_search_proxy_sdk/_generated/models/per_url_error.py +69 -0
- unique_search_proxy_sdk/_generated/models/providers_list_response.py +69 -0
- unique_search_proxy_sdk/_generated/models/ready_ready_get_response_ready_ready_get.py +47 -0
- unique_search_proxy_sdk/_generated/models/search_response.py +99 -0
- unique_search_proxy_sdk/_generated/models/validation_error.py +90 -0
- unique_search_proxy_sdk/_generated/models/web_search_result.py +89 -0
- unique_search_proxy_sdk/_generated/types.py +54 -0
- unique_search_proxy_sdk/_http.py +32 -0
- unique_search_proxy_sdk/_transport.py +63 -0
- unique_search_proxy_sdk/client.py +66 -0
- unique_search_proxy_sdk/converters.py +45 -0
- unique_search_proxy_sdk/crawl_client.py +74 -0
- unique_search_proxy_sdk/errors.py +81 -0
- unique_search_proxy_sdk/search_client.py +75 -0
- unique_search_proxy_sdk-2026.26.0.dev0.dist-info/METADATA +25 -0
- unique_search_proxy_sdk-2026.26.0.dev0.dist-info/RECORD +41 -0
- unique_search_proxy_sdk-2026.26.0.dev0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""OpenAPI HTTP SDK for the unique-search-proxy service.
|
|
2
|
+
|
|
3
|
+
The low-level client is **generated** under :mod:`unique_search_proxy_sdk._generated`
|
|
4
|
+
(``openapi-python-client``). :class:`UniqueSearchProxyClient` composes
|
|
5
|
+
:class:`SearchClient` and :class:`CrawlClient` for typed execution calls.
|
|
6
|
+
|
|
7
|
+
Config resolution and LLM call-schema projection live in
|
|
8
|
+
``unique_search_proxy_core`` (not in this SDK).
|
|
9
|
+
|
|
10
|
+
Regenerate after API changes::
|
|
11
|
+
|
|
12
|
+
uv run poe generate-sdk
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from unique_search_proxy_sdk._generated.client import Client as OpenAPIClient
|
|
16
|
+
from unique_search_proxy_sdk.client import UniqueSearchProxyClient
|
|
17
|
+
from unique_search_proxy_sdk.crawl_client import CrawlClient
|
|
18
|
+
from unique_search_proxy_sdk.errors import UniqueSearchProxyClientError
|
|
19
|
+
from unique_search_proxy_sdk.search_client import SearchClient
|
|
20
|
+
|
|
21
|
+
__all__ = [
|
|
22
|
+
"CrawlClient",
|
|
23
|
+
"OpenAPIClient",
|
|
24
|
+
"SearchClient",
|
|
25
|
+
"UniqueSearchProxyClient",
|
|
26
|
+
"UniqueSearchProxyClientError",
|
|
27
|
+
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains methods for accessing the API"""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains endpoint functions for accessing the API"""
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.providers_list_response import ProvidersListResponse
|
|
9
|
+
from ...types import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs() -> dict[str, Any]:
|
|
13
|
+
|
|
14
|
+
_kwargs: dict[str, Any] = {
|
|
15
|
+
"method": "get",
|
|
16
|
+
"url": "/v1/configuration/providers",
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return _kwargs
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _parse_response(
|
|
23
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
24
|
+
) -> ProvidersListResponse | None:
|
|
25
|
+
if response.status_code == 200:
|
|
26
|
+
response_200 = ProvidersListResponse.from_dict(response.json())
|
|
27
|
+
|
|
28
|
+
return response_200
|
|
29
|
+
|
|
30
|
+
if client.raise_on_unexpected_status:
|
|
31
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
32
|
+
else:
|
|
33
|
+
return None
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _build_response(
|
|
37
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
38
|
+
) -> Response[ProvidersListResponse]:
|
|
39
|
+
return Response(
|
|
40
|
+
status_code=HTTPStatus(response.status_code),
|
|
41
|
+
content=response.content,
|
|
42
|
+
headers=response.headers,
|
|
43
|
+
parsed=_parse_response(client=client, response=response),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def sync_detailed(
|
|
48
|
+
*,
|
|
49
|
+
client: AuthenticatedClient | Client,
|
|
50
|
+
) -> Response[ProvidersListResponse]:
|
|
51
|
+
"""List registered search engines and crawlers
|
|
52
|
+
|
|
53
|
+
Raises:
|
|
54
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
55
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
56
|
+
|
|
57
|
+
Returns:
|
|
58
|
+
Response[ProvidersListResponse]
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
kwargs = _get_kwargs()
|
|
62
|
+
|
|
63
|
+
response = client.get_httpx_client().request(
|
|
64
|
+
**kwargs,
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
return _build_response(client=client, response=response)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def sync(
|
|
71
|
+
*,
|
|
72
|
+
client: AuthenticatedClient | Client,
|
|
73
|
+
) -> ProvidersListResponse | None:
|
|
74
|
+
"""List registered search engines and crawlers
|
|
75
|
+
|
|
76
|
+
Raises:
|
|
77
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
78
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
79
|
+
|
|
80
|
+
Returns:
|
|
81
|
+
ProvidersListResponse
|
|
82
|
+
"""
|
|
83
|
+
|
|
84
|
+
return sync_detailed(
|
|
85
|
+
client=client,
|
|
86
|
+
).parsed
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
async def asyncio_detailed(
|
|
90
|
+
*,
|
|
91
|
+
client: AuthenticatedClient | Client,
|
|
92
|
+
) -> Response[ProvidersListResponse]:
|
|
93
|
+
"""List registered search engines and crawlers
|
|
94
|
+
|
|
95
|
+
Raises:
|
|
96
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
97
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
98
|
+
|
|
99
|
+
Returns:
|
|
100
|
+
Response[ProvidersListResponse]
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
kwargs = _get_kwargs()
|
|
104
|
+
|
|
105
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
106
|
+
|
|
107
|
+
return _build_response(client=client, response=response)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
async def asyncio(
|
|
111
|
+
*,
|
|
112
|
+
client: AuthenticatedClient | Client,
|
|
113
|
+
) -> ProvidersListResponse | None:
|
|
114
|
+
"""List registered search engines and crawlers
|
|
115
|
+
|
|
116
|
+
Raises:
|
|
117
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
118
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
119
|
+
|
|
120
|
+
Returns:
|
|
121
|
+
ProvidersListResponse
|
|
122
|
+
"""
|
|
123
|
+
|
|
124
|
+
return (
|
|
125
|
+
await asyncio_detailed(
|
|
126
|
+
client=client,
|
|
127
|
+
)
|
|
128
|
+
).parsed
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains endpoint functions for accessing the API"""
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.basic_proxy_crawler import BasicProxyCrawler
|
|
9
|
+
from ...models.crawl_response import CrawlResponse
|
|
10
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
*,
|
|
16
|
+
body: BasicProxyCrawler,
|
|
17
|
+
) -> dict[str, Any]:
|
|
18
|
+
headers: dict[str, Any] = {}
|
|
19
|
+
|
|
20
|
+
_kwargs: dict[str, Any] = {
|
|
21
|
+
"method": "post",
|
|
22
|
+
"url": "/v1/crawl",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
_kwargs["json"] = body.to_dict()
|
|
26
|
+
|
|
27
|
+
headers["Content-Type"] = "application/json"
|
|
28
|
+
|
|
29
|
+
_kwargs["headers"] = headers
|
|
30
|
+
return _kwargs
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _parse_response(
|
|
34
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
35
|
+
) -> CrawlResponse | HTTPValidationError | None:
|
|
36
|
+
if response.status_code == 200:
|
|
37
|
+
response_200 = CrawlResponse.from_dict(response.json())
|
|
38
|
+
|
|
39
|
+
return response_200
|
|
40
|
+
|
|
41
|
+
if response.status_code == 422:
|
|
42
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
43
|
+
|
|
44
|
+
return response_422
|
|
45
|
+
|
|
46
|
+
if client.raise_on_unexpected_status:
|
|
47
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
48
|
+
else:
|
|
49
|
+
return None
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _build_response(
|
|
53
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
54
|
+
) -> Response[CrawlResponse | HTTPValidationError]:
|
|
55
|
+
return Response(
|
|
56
|
+
status_code=HTTPStatus(response.status_code),
|
|
57
|
+
content=response.content,
|
|
58
|
+
headers=response.headers,
|
|
59
|
+
parsed=_parse_response(client=client, response=response),
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def sync_detailed(
|
|
64
|
+
*,
|
|
65
|
+
client: AuthenticatedClient | Client,
|
|
66
|
+
body: BasicProxyCrawler,
|
|
67
|
+
) -> Response[CrawlResponse | HTTPValidationError]:
|
|
68
|
+
"""Crawl URLs with a configured crawler
|
|
69
|
+
|
|
70
|
+
Args:
|
|
71
|
+
body (BasicProxyCrawler):
|
|
72
|
+
|
|
73
|
+
Raises:
|
|
74
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
75
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
76
|
+
|
|
77
|
+
Returns:
|
|
78
|
+
Response[CrawlResponse | HTTPValidationError]
|
|
79
|
+
"""
|
|
80
|
+
|
|
81
|
+
kwargs = _get_kwargs(
|
|
82
|
+
body=body,
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
response = client.get_httpx_client().request(
|
|
86
|
+
**kwargs,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
return _build_response(client=client, response=response)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def sync(
|
|
93
|
+
*,
|
|
94
|
+
client: AuthenticatedClient | Client,
|
|
95
|
+
body: BasicProxyCrawler,
|
|
96
|
+
) -> CrawlResponse | HTTPValidationError | None:
|
|
97
|
+
"""Crawl URLs with a configured crawler
|
|
98
|
+
|
|
99
|
+
Args:
|
|
100
|
+
body (BasicProxyCrawler):
|
|
101
|
+
|
|
102
|
+
Raises:
|
|
103
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
104
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
105
|
+
|
|
106
|
+
Returns:
|
|
107
|
+
CrawlResponse | HTTPValidationError
|
|
108
|
+
"""
|
|
109
|
+
|
|
110
|
+
return sync_detailed(
|
|
111
|
+
client=client,
|
|
112
|
+
body=body,
|
|
113
|
+
).parsed
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
async def asyncio_detailed(
|
|
117
|
+
*,
|
|
118
|
+
client: AuthenticatedClient | Client,
|
|
119
|
+
body: BasicProxyCrawler,
|
|
120
|
+
) -> Response[CrawlResponse | HTTPValidationError]:
|
|
121
|
+
"""Crawl URLs with a configured crawler
|
|
122
|
+
|
|
123
|
+
Args:
|
|
124
|
+
body (BasicProxyCrawler):
|
|
125
|
+
|
|
126
|
+
Raises:
|
|
127
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
128
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
129
|
+
|
|
130
|
+
Returns:
|
|
131
|
+
Response[CrawlResponse | HTTPValidationError]
|
|
132
|
+
"""
|
|
133
|
+
|
|
134
|
+
kwargs = _get_kwargs(
|
|
135
|
+
body=body,
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
139
|
+
|
|
140
|
+
return _build_response(client=client, response=response)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
async def asyncio(
|
|
144
|
+
*,
|
|
145
|
+
client: AuthenticatedClient | Client,
|
|
146
|
+
body: BasicProxyCrawler,
|
|
147
|
+
) -> CrawlResponse | HTTPValidationError | None:
|
|
148
|
+
"""Crawl URLs with a configured crawler
|
|
149
|
+
|
|
150
|
+
Args:
|
|
151
|
+
body (BasicProxyCrawler):
|
|
152
|
+
|
|
153
|
+
Raises:
|
|
154
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
155
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
156
|
+
|
|
157
|
+
Returns:
|
|
158
|
+
CrawlResponse | HTTPValidationError
|
|
159
|
+
"""
|
|
160
|
+
|
|
161
|
+
return (
|
|
162
|
+
await asyncio_detailed(
|
|
163
|
+
client=client,
|
|
164
|
+
body=body,
|
|
165
|
+
)
|
|
166
|
+
).parsed
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains endpoint functions for accessing the API"""
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.health_health_get_response_health_health_get import (
|
|
9
|
+
HealthHealthGetResponseHealthHealthGet,
|
|
10
|
+
)
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs() -> dict[str, Any]:
|
|
15
|
+
|
|
16
|
+
_kwargs: dict[str, Any] = {
|
|
17
|
+
"method": "get",
|
|
18
|
+
"url": "/health",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return _kwargs
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _parse_response(
|
|
25
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
26
|
+
) -> HealthHealthGetResponseHealthHealthGet | None:
|
|
27
|
+
if response.status_code == 200:
|
|
28
|
+
response_200 = HealthHealthGetResponseHealthHealthGet.from_dict(response.json())
|
|
29
|
+
|
|
30
|
+
return response_200
|
|
31
|
+
|
|
32
|
+
if client.raise_on_unexpected_status:
|
|
33
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
34
|
+
else:
|
|
35
|
+
return None
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def _build_response(
|
|
39
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
40
|
+
) -> Response[HealthHealthGetResponseHealthHealthGet]:
|
|
41
|
+
return Response(
|
|
42
|
+
status_code=HTTPStatus(response.status_code),
|
|
43
|
+
content=response.content,
|
|
44
|
+
headers=response.headers,
|
|
45
|
+
parsed=_parse_response(client=client, response=response),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def sync_detailed(
|
|
50
|
+
*,
|
|
51
|
+
client: AuthenticatedClient | Client,
|
|
52
|
+
) -> Response[HealthHealthGetResponseHealthHealthGet]:
|
|
53
|
+
"""Health
|
|
54
|
+
|
|
55
|
+
Raises:
|
|
56
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
57
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
58
|
+
|
|
59
|
+
Returns:
|
|
60
|
+
Response[HealthHealthGetResponseHealthHealthGet]
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
kwargs = _get_kwargs()
|
|
64
|
+
|
|
65
|
+
response = client.get_httpx_client().request(
|
|
66
|
+
**kwargs,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
return _build_response(client=client, response=response)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def sync(
|
|
73
|
+
*,
|
|
74
|
+
client: AuthenticatedClient | Client,
|
|
75
|
+
) -> HealthHealthGetResponseHealthHealthGet | None:
|
|
76
|
+
"""Health
|
|
77
|
+
|
|
78
|
+
Raises:
|
|
79
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
80
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
81
|
+
|
|
82
|
+
Returns:
|
|
83
|
+
HealthHealthGetResponseHealthHealthGet
|
|
84
|
+
"""
|
|
85
|
+
|
|
86
|
+
return sync_detailed(
|
|
87
|
+
client=client,
|
|
88
|
+
).parsed
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
async def asyncio_detailed(
|
|
92
|
+
*,
|
|
93
|
+
client: AuthenticatedClient | Client,
|
|
94
|
+
) -> Response[HealthHealthGetResponseHealthHealthGet]:
|
|
95
|
+
"""Health
|
|
96
|
+
|
|
97
|
+
Raises:
|
|
98
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
99
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
100
|
+
|
|
101
|
+
Returns:
|
|
102
|
+
Response[HealthHealthGetResponseHealthHealthGet]
|
|
103
|
+
"""
|
|
104
|
+
|
|
105
|
+
kwargs = _get_kwargs()
|
|
106
|
+
|
|
107
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
108
|
+
|
|
109
|
+
return _build_response(client=client, response=response)
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
async def asyncio(
|
|
113
|
+
*,
|
|
114
|
+
client: AuthenticatedClient | Client,
|
|
115
|
+
) -> HealthHealthGetResponseHealthHealthGet | None:
|
|
116
|
+
"""Health
|
|
117
|
+
|
|
118
|
+
Raises:
|
|
119
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
120
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
121
|
+
|
|
122
|
+
Returns:
|
|
123
|
+
HealthHealthGetResponseHealthHealthGet
|
|
124
|
+
"""
|
|
125
|
+
|
|
126
|
+
return (
|
|
127
|
+
await asyncio_detailed(
|
|
128
|
+
client=client,
|
|
129
|
+
)
|
|
130
|
+
).parsed
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.ready_ready_get_response_ready_ready_get import (
|
|
9
|
+
ReadyReadyGetResponseReadyReadyGet,
|
|
10
|
+
)
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs() -> dict[str, Any]:
|
|
15
|
+
|
|
16
|
+
_kwargs: dict[str, Any] = {
|
|
17
|
+
"method": "get",
|
|
18
|
+
"url": "/ready",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return _kwargs
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _parse_response(
|
|
25
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
26
|
+
) -> ReadyReadyGetResponseReadyReadyGet | None:
|
|
27
|
+
if response.status_code == 200:
|
|
28
|
+
response_200 = ReadyReadyGetResponseReadyReadyGet.from_dict(response.json())
|
|
29
|
+
|
|
30
|
+
return response_200
|
|
31
|
+
|
|
32
|
+
if client.raise_on_unexpected_status:
|
|
33
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
34
|
+
else:
|
|
35
|
+
return None
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def _build_response(
|
|
39
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
40
|
+
) -> Response[ReadyReadyGetResponseReadyReadyGet]:
|
|
41
|
+
return Response(
|
|
42
|
+
status_code=HTTPStatus(response.status_code),
|
|
43
|
+
content=response.content,
|
|
44
|
+
headers=response.headers,
|
|
45
|
+
parsed=_parse_response(client=client, response=response),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def sync_detailed(
|
|
50
|
+
*,
|
|
51
|
+
client: AuthenticatedClient | Client,
|
|
52
|
+
) -> Response[ReadyReadyGetResponseReadyReadyGet]:
|
|
53
|
+
"""Ready
|
|
54
|
+
|
|
55
|
+
Raises:
|
|
56
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
57
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
58
|
+
|
|
59
|
+
Returns:
|
|
60
|
+
Response[ReadyReadyGetResponseReadyReadyGet]
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
kwargs = _get_kwargs()
|
|
64
|
+
|
|
65
|
+
response = client.get_httpx_client().request(
|
|
66
|
+
**kwargs,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
return _build_response(client=client, response=response)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def sync(
|
|
73
|
+
*,
|
|
74
|
+
client: AuthenticatedClient | Client,
|
|
75
|
+
) -> ReadyReadyGetResponseReadyReadyGet | None:
|
|
76
|
+
"""Ready
|
|
77
|
+
|
|
78
|
+
Raises:
|
|
79
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
80
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
81
|
+
|
|
82
|
+
Returns:
|
|
83
|
+
ReadyReadyGetResponseReadyReadyGet
|
|
84
|
+
"""
|
|
85
|
+
|
|
86
|
+
return sync_detailed(
|
|
87
|
+
client=client,
|
|
88
|
+
).parsed
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
async def asyncio_detailed(
|
|
92
|
+
*,
|
|
93
|
+
client: AuthenticatedClient | Client,
|
|
94
|
+
) -> Response[ReadyReadyGetResponseReadyReadyGet]:
|
|
95
|
+
"""Ready
|
|
96
|
+
|
|
97
|
+
Raises:
|
|
98
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
99
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
100
|
+
|
|
101
|
+
Returns:
|
|
102
|
+
Response[ReadyReadyGetResponseReadyReadyGet]
|
|
103
|
+
"""
|
|
104
|
+
|
|
105
|
+
kwargs = _get_kwargs()
|
|
106
|
+
|
|
107
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
108
|
+
|
|
109
|
+
return _build_response(client=client, response=response)
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
async def asyncio(
|
|
113
|
+
*,
|
|
114
|
+
client: AuthenticatedClient | Client,
|
|
115
|
+
) -> ReadyReadyGetResponseReadyReadyGet | None:
|
|
116
|
+
"""Ready
|
|
117
|
+
|
|
118
|
+
Raises:
|
|
119
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
120
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
121
|
+
|
|
122
|
+
Returns:
|
|
123
|
+
ReadyReadyGetResponseReadyReadyGet
|
|
124
|
+
"""
|
|
125
|
+
|
|
126
|
+
return (
|
|
127
|
+
await asyncio_detailed(
|
|
128
|
+
client=client,
|
|
129
|
+
)
|
|
130
|
+
).parsed
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains endpoint functions for accessing the API"""
|