gcore 0.4.0__py3-none-any.whl → 0.5.0__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.
Potentially problematic release.
This version of gcore might be problematic. Click here for more details.
- gcore/_base_client.py +9 -2
- gcore/_client.py +9 -0
- gcore/_constants.py +2 -2
- gcore/_models.py +8 -5
- gcore/_version.py +1 -1
- gcore/pagination.py +192 -1
- gcore/resources/__init__.py +14 -0
- gcore/resources/cloud/baremetal/servers.py +2 -2
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +2 -2
- gcore/resources/cloud/inference/deployments/deployments.py +66 -33
- gcore/resources/cloud/inference/deployments/logs.py +7 -7
- gcore/resources/cloud/inference/inference.py +5 -5
- gcore/resources/cloud/inference/models.py +16 -15
- gcore/resources/cloud/inference/registry_credentials.py +16 -16
- gcore/resources/cloud/inference/secrets.py +4 -5
- gcore/resources/cloud/instances/instances.py +2 -2
- gcore/resources/cloud/secrets.py +14 -224
- gcore/resources/cloud/tasks.py +30 -28
- gcore/resources/fastedge/__init__.py +103 -0
- gcore/resources/fastedge/apps/__init__.py +33 -0
- gcore/resources/fastedge/apps/apps.py +932 -0
- gcore/resources/fastedge/apps/logs.py +248 -0
- gcore/resources/fastedge/binaries.py +286 -0
- gcore/resources/fastedge/fastedge.py +327 -0
- gcore/resources/fastedge/kv_stores.py +523 -0
- gcore/resources/fastedge/secrets.py +687 -0
- gcore/resources/fastedge/statistics.py +347 -0
- gcore/resources/fastedge/templates.py +652 -0
- gcore/types/cloud/__init__.py +2 -28
- gcore/types/cloud/baremetal/server_create_params.py +1 -1
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +1 -1
- gcore/types/cloud/inference/__init__.py +12 -8
- gcore/types/cloud/inference/deployment_create_params.py +224 -7
- gcore/types/cloud/inference/deployment_update_params.py +24 -3
- gcore/types/cloud/inference/deployments/__init__.py +1 -0
- gcore/types/cloud/inference/{inference_log.py → deployments/inference_deployment_log.py} +3 -3
- gcore/types/cloud/inference/inference_deployment.py +266 -0
- gcore/types/cloud/inference/{inference_apikey_secret.py → inference_deployment_api_key.py} +2 -2
- gcore/types/cloud/inference/{mlcatalog_model_card.py → inference_model.py} +2 -2
- gcore/types/cloud/inference/{inference_registry_credential.py → inference_registry_credentials.py} +2 -2
- gcore/types/cloud/inference/{inference_registry_credential_full.py → inference_registry_credentials_create.py} +2 -2
- gcore/types/cloud/inference/inference_secret.py +10 -3
- gcore/types/cloud/inference/model_list_params.py +2 -4
- gcore/types/cloud/{container_probe.py → inference/probe.py} +9 -9
- gcore/types/cloud/{container_probe_config.py → inference/probe_config.py} +5 -5
- gcore/types/cloud/{container_probe_exec.py → inference/probe_exec.py} +3 -3
- gcore/types/cloud/{container_probe_http_get.py → inference/probe_http_get.py} +3 -3
- gcore/types/cloud/{container_probe_tcp_socket.py → inference/probe_tcp_socket.py} +3 -3
- gcore/types/cloud/inference/secret_create_params.py +10 -4
- gcore/types/cloud/inference/secret_replace_params.py +10 -4
- gcore/types/cloud/{region_capacity.py → inference_region_capacity.py} +10 -3
- gcore/types/cloud/{region_capacity_list.py → inference_region_capacity_list.py} +4 -4
- gcore/types/cloud/instance_create_params.py +1 -1
- gcore/types/cloud/task_list_params.py +15 -14
- gcore/types/fastedge/__init__.py +48 -0
- gcore/types/fastedge/app.py +81 -0
- gcore/types/fastedge/app_create_params.py +56 -0
- gcore/types/fastedge/app_list_params.py +50 -0
- gcore/types/fastedge/app_param.py +56 -0
- gcore/types/fastedge/app_replace_params.py +17 -0
- gcore/types/fastedge/app_short.py +60 -0
- gcore/types/fastedge/app_update_params.py +56 -0
- gcore/types/fastedge/apps/__init__.py +6 -0
- gcore/types/fastedge/apps/log.py +28 -0
- gcore/types/fastedge/apps/log_list_params.py +37 -0
- gcore/types/fastedge/binary.py +40 -0
- gcore/types/fastedge/binary_list_response.py +12 -0
- gcore/types/fastedge/binary_short.py +32 -0
- gcore/types/fastedge/call_status.py +24 -0
- gcore/types/fastedge/client.py +57 -0
- gcore/types/fastedge/duration_stats.py +30 -0
- gcore/types/fastedge/kv_store.py +33 -0
- gcore/types/fastedge/kv_store_create_params.py +23 -0
- gcore/types/fastedge/kv_store_get_response.py +10 -0
- gcore/types/fastedge/kv_store_list_params.py +12 -0
- gcore/types/fastedge/kv_store_list_response.py +15 -0
- gcore/types/fastedge/kv_store_replace_params.py +23 -0
- gcore/types/fastedge/kv_store_short.py +19 -0
- gcore/types/fastedge/kv_store_stats.py +26 -0
- gcore/types/fastedge/secret.py +29 -0
- gcore/types/fastedge/secret_create_params.py +27 -0
- gcore/types/fastedge/secret_create_response.py +12 -0
- gcore/types/fastedge/secret_delete_params.py +12 -0
- gcore/types/fastedge/secret_list_params.py +15 -0
- gcore/types/{cloud → fastedge}/secret_list_response.py +2 -6
- gcore/types/fastedge/secret_replace_params.py +27 -0
- gcore/types/fastedge/secret_short.py +21 -0
- gcore/types/fastedge/secret_update_params.py +27 -0
- gcore/types/fastedge/statistic_get_call_series_params.py +28 -0
- gcore/types/fastedge/statistic_get_call_series_response.py +12 -0
- gcore/types/fastedge/statistic_get_duration_series_params.py +28 -0
- gcore/types/fastedge/statistic_get_duration_series_response.py +12 -0
- gcore/types/fastedge/template.py +31 -0
- gcore/types/fastedge/template_create_params.py +30 -0
- gcore/types/fastedge/template_delete_params.py +12 -0
- gcore/types/fastedge/template_list_params.py +25 -0
- gcore/types/fastedge/template_parameter.py +22 -0
- gcore/types/fastedge/template_parameter_param.py +21 -0
- gcore/types/fastedge/template_replace_params.py +30 -0
- gcore/types/fastedge/template_short.py +27 -0
- {gcore-0.4.0.dist-info → gcore-0.5.0.dist-info}/METADATA +7 -5
- {gcore-0.4.0.dist-info → gcore-0.5.0.dist-info}/RECORD +104 -69
- gcore/types/cloud/aws_iam_data.py +0 -13
- gcore/types/cloud/aws_iam_data_param.py +0 -15
- gcore/types/cloud/capacity.py +0 -13
- gcore/types/cloud/container_probe_config_create_param.py +0 -17
- gcore/types/cloud/container_probe_create_param.py +0 -38
- gcore/types/cloud/container_probe_exec_create_param.py +0 -13
- gcore/types/cloud/container_probe_http_get_create_param.py +0 -25
- gcore/types/cloud/container_probe_tcp_socket_create_param.py +0 -12
- gcore/types/cloud/container_scale.py +0 -25
- gcore/types/cloud/container_scale_trigger_rate.py +0 -13
- gcore/types/cloud/container_scale_trigger_sqs.py +0 -33
- gcore/types/cloud/container_scale_trigger_threshold.py +0 -10
- gcore/types/cloud/container_scale_triggers.py +0 -36
- gcore/types/cloud/deploy_status.py +0 -13
- gcore/types/cloud/inference/container.py +0 -26
- gcore/types/cloud/inference/inference.py +0 -95
- gcore/types/cloud/inference/mlcatalog_order_by_choices.py +0 -7
- gcore/types/cloud/inference_probes.py +0 -19
- gcore/types/cloud/ingress_opts_out.py +0 -16
- gcore/types/cloud/ingress_opts_param.py +0 -18
- gcore/types/cloud/secret_create_params.py +0 -66
- {gcore-0.4.0.dist-info → gcore-0.5.0.dist-info}/WHEEL +0 -0
- {gcore-0.4.0.dist-info → gcore-0.5.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Union
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing_extensions import Literal
|
|
8
|
+
|
|
9
|
+
import httpx
|
|
10
|
+
|
|
11
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
12
|
+
from ...._utils import maybe_transform
|
|
13
|
+
from ...._compat import cached_property
|
|
14
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
15
|
+
from ...._response import (
|
|
16
|
+
to_raw_response_wrapper,
|
|
17
|
+
to_streamed_response_wrapper,
|
|
18
|
+
async_to_raw_response_wrapper,
|
|
19
|
+
async_to_streamed_response_wrapper,
|
|
20
|
+
)
|
|
21
|
+
from ....pagination import SyncOffsetPageFastedgeAppLogs, AsyncOffsetPageFastedgeAppLogs
|
|
22
|
+
from ...._base_client import AsyncPaginator, make_request_options
|
|
23
|
+
from ....types.fastedge.apps import log_list_params
|
|
24
|
+
from ....types.fastedge.apps.log import Log
|
|
25
|
+
|
|
26
|
+
__all__ = ["LogsResource", "AsyncLogsResource"]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class LogsResource(SyncAPIResource):
|
|
30
|
+
@cached_property
|
|
31
|
+
def with_raw_response(self) -> LogsResourceWithRawResponse:
|
|
32
|
+
"""
|
|
33
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
34
|
+
the raw response object instead of the parsed content.
|
|
35
|
+
|
|
36
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
37
|
+
"""
|
|
38
|
+
return LogsResourceWithRawResponse(self)
|
|
39
|
+
|
|
40
|
+
@cached_property
|
|
41
|
+
def with_streaming_response(self) -> LogsResourceWithStreamingResponse:
|
|
42
|
+
"""
|
|
43
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
44
|
+
|
|
45
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
46
|
+
"""
|
|
47
|
+
return LogsResourceWithStreamingResponse(self)
|
|
48
|
+
|
|
49
|
+
def list(
|
|
50
|
+
self,
|
|
51
|
+
id: int,
|
|
52
|
+
*,
|
|
53
|
+
client_ip: str | NotGiven = NOT_GIVEN,
|
|
54
|
+
edge: str | NotGiven = NOT_GIVEN,
|
|
55
|
+
from_: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
56
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
57
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
58
|
+
search: str | NotGiven = NOT_GIVEN,
|
|
59
|
+
sort: Literal["desc", "asc"] | NotGiven = NOT_GIVEN,
|
|
60
|
+
to: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
61
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
62
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
63
|
+
extra_headers: Headers | None = None,
|
|
64
|
+
extra_query: Query | None = None,
|
|
65
|
+
extra_body: Body | None = None,
|
|
66
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
67
|
+
) -> SyncOffsetPageFastedgeAppLogs[Log]:
|
|
68
|
+
"""
|
|
69
|
+
List logs for the app
|
|
70
|
+
|
|
71
|
+
Args:
|
|
72
|
+
client_ip: Search by client IP
|
|
73
|
+
|
|
74
|
+
edge: Edge name
|
|
75
|
+
|
|
76
|
+
from_: Reporting period start time, RFC3339 format. Default 1 hour ago.
|
|
77
|
+
|
|
78
|
+
limit: Limit for pagination
|
|
79
|
+
|
|
80
|
+
offset: Offset for pagination
|
|
81
|
+
|
|
82
|
+
search: Search string
|
|
83
|
+
|
|
84
|
+
sort: Sort order (default desc)
|
|
85
|
+
|
|
86
|
+
to: Reporting period end time, RFC3339 format. Default current time in UTC.
|
|
87
|
+
|
|
88
|
+
extra_headers: Send extra headers
|
|
89
|
+
|
|
90
|
+
extra_query: Add additional query parameters to the request
|
|
91
|
+
|
|
92
|
+
extra_body: Add additional JSON properties to the request
|
|
93
|
+
|
|
94
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
95
|
+
"""
|
|
96
|
+
return self._get_api_list(
|
|
97
|
+
f"/fastedge/v1/apps/{id}/logs",
|
|
98
|
+
page=SyncOffsetPageFastedgeAppLogs[Log],
|
|
99
|
+
options=make_request_options(
|
|
100
|
+
extra_headers=extra_headers,
|
|
101
|
+
extra_query=extra_query,
|
|
102
|
+
extra_body=extra_body,
|
|
103
|
+
timeout=timeout,
|
|
104
|
+
query=maybe_transform(
|
|
105
|
+
{
|
|
106
|
+
"client_ip": client_ip,
|
|
107
|
+
"edge": edge,
|
|
108
|
+
"from_": from_,
|
|
109
|
+
"limit": limit,
|
|
110
|
+
"offset": offset,
|
|
111
|
+
"search": search,
|
|
112
|
+
"sort": sort,
|
|
113
|
+
"to": to,
|
|
114
|
+
},
|
|
115
|
+
log_list_params.LogListParams,
|
|
116
|
+
),
|
|
117
|
+
),
|
|
118
|
+
model=Log,
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
class AsyncLogsResource(AsyncAPIResource):
|
|
123
|
+
@cached_property
|
|
124
|
+
def with_raw_response(self) -> AsyncLogsResourceWithRawResponse:
|
|
125
|
+
"""
|
|
126
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
127
|
+
the raw response object instead of the parsed content.
|
|
128
|
+
|
|
129
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
130
|
+
"""
|
|
131
|
+
return AsyncLogsResourceWithRawResponse(self)
|
|
132
|
+
|
|
133
|
+
@cached_property
|
|
134
|
+
def with_streaming_response(self) -> AsyncLogsResourceWithStreamingResponse:
|
|
135
|
+
"""
|
|
136
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
137
|
+
|
|
138
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
139
|
+
"""
|
|
140
|
+
return AsyncLogsResourceWithStreamingResponse(self)
|
|
141
|
+
|
|
142
|
+
def list(
|
|
143
|
+
self,
|
|
144
|
+
id: int,
|
|
145
|
+
*,
|
|
146
|
+
client_ip: str | NotGiven = NOT_GIVEN,
|
|
147
|
+
edge: str | NotGiven = NOT_GIVEN,
|
|
148
|
+
from_: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
149
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
150
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
151
|
+
search: str | NotGiven = NOT_GIVEN,
|
|
152
|
+
sort: Literal["desc", "asc"] | NotGiven = NOT_GIVEN,
|
|
153
|
+
to: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
154
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
155
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
156
|
+
extra_headers: Headers | None = None,
|
|
157
|
+
extra_query: Query | None = None,
|
|
158
|
+
extra_body: Body | None = None,
|
|
159
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
160
|
+
) -> AsyncPaginator[Log, AsyncOffsetPageFastedgeAppLogs[Log]]:
|
|
161
|
+
"""
|
|
162
|
+
List logs for the app
|
|
163
|
+
|
|
164
|
+
Args:
|
|
165
|
+
client_ip: Search by client IP
|
|
166
|
+
|
|
167
|
+
edge: Edge name
|
|
168
|
+
|
|
169
|
+
from_: Reporting period start time, RFC3339 format. Default 1 hour ago.
|
|
170
|
+
|
|
171
|
+
limit: Limit for pagination
|
|
172
|
+
|
|
173
|
+
offset: Offset for pagination
|
|
174
|
+
|
|
175
|
+
search: Search string
|
|
176
|
+
|
|
177
|
+
sort: Sort order (default desc)
|
|
178
|
+
|
|
179
|
+
to: Reporting period end time, RFC3339 format. Default current time in UTC.
|
|
180
|
+
|
|
181
|
+
extra_headers: Send extra headers
|
|
182
|
+
|
|
183
|
+
extra_query: Add additional query parameters to the request
|
|
184
|
+
|
|
185
|
+
extra_body: Add additional JSON properties to the request
|
|
186
|
+
|
|
187
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
188
|
+
"""
|
|
189
|
+
return self._get_api_list(
|
|
190
|
+
f"/fastedge/v1/apps/{id}/logs",
|
|
191
|
+
page=AsyncOffsetPageFastedgeAppLogs[Log],
|
|
192
|
+
options=make_request_options(
|
|
193
|
+
extra_headers=extra_headers,
|
|
194
|
+
extra_query=extra_query,
|
|
195
|
+
extra_body=extra_body,
|
|
196
|
+
timeout=timeout,
|
|
197
|
+
query=maybe_transform(
|
|
198
|
+
{
|
|
199
|
+
"client_ip": client_ip,
|
|
200
|
+
"edge": edge,
|
|
201
|
+
"from_": from_,
|
|
202
|
+
"limit": limit,
|
|
203
|
+
"offset": offset,
|
|
204
|
+
"search": search,
|
|
205
|
+
"sort": sort,
|
|
206
|
+
"to": to,
|
|
207
|
+
},
|
|
208
|
+
log_list_params.LogListParams,
|
|
209
|
+
),
|
|
210
|
+
),
|
|
211
|
+
model=Log,
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
class LogsResourceWithRawResponse:
|
|
216
|
+
def __init__(self, logs: LogsResource) -> None:
|
|
217
|
+
self._logs = logs
|
|
218
|
+
|
|
219
|
+
self.list = to_raw_response_wrapper(
|
|
220
|
+
logs.list,
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
class AsyncLogsResourceWithRawResponse:
|
|
225
|
+
def __init__(self, logs: AsyncLogsResource) -> None:
|
|
226
|
+
self._logs = logs
|
|
227
|
+
|
|
228
|
+
self.list = async_to_raw_response_wrapper(
|
|
229
|
+
logs.list,
|
|
230
|
+
)
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
class LogsResourceWithStreamingResponse:
|
|
234
|
+
def __init__(self, logs: LogsResource) -> None:
|
|
235
|
+
self._logs = logs
|
|
236
|
+
|
|
237
|
+
self.list = to_streamed_response_wrapper(
|
|
238
|
+
logs.list,
|
|
239
|
+
)
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
class AsyncLogsResourceWithStreamingResponse:
|
|
243
|
+
def __init__(self, logs: AsyncLogsResource) -> None:
|
|
244
|
+
self._logs = logs
|
|
245
|
+
|
|
246
|
+
self.list = async_to_streamed_response_wrapper(
|
|
247
|
+
logs.list,
|
|
248
|
+
)
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
|
8
|
+
from ..._compat import cached_property
|
|
9
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
10
|
+
from ..._response import (
|
|
11
|
+
to_raw_response_wrapper,
|
|
12
|
+
to_streamed_response_wrapper,
|
|
13
|
+
async_to_raw_response_wrapper,
|
|
14
|
+
async_to_streamed_response_wrapper,
|
|
15
|
+
)
|
|
16
|
+
from ..._base_client import make_request_options
|
|
17
|
+
from ...types.fastedge.binary import Binary
|
|
18
|
+
from ...types.fastedge.binary_list_response import BinaryListResponse
|
|
19
|
+
|
|
20
|
+
__all__ = ["BinariesResource", "AsyncBinariesResource"]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class BinariesResource(SyncAPIResource):
|
|
24
|
+
@cached_property
|
|
25
|
+
def with_raw_response(self) -> BinariesResourceWithRawResponse:
|
|
26
|
+
"""
|
|
27
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
28
|
+
the raw response object instead of the parsed content.
|
|
29
|
+
|
|
30
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
31
|
+
"""
|
|
32
|
+
return BinariesResourceWithRawResponse(self)
|
|
33
|
+
|
|
34
|
+
@cached_property
|
|
35
|
+
def with_streaming_response(self) -> BinariesResourceWithStreamingResponse:
|
|
36
|
+
"""
|
|
37
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
38
|
+
|
|
39
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
40
|
+
"""
|
|
41
|
+
return BinariesResourceWithStreamingResponse(self)
|
|
42
|
+
|
|
43
|
+
def list(
|
|
44
|
+
self,
|
|
45
|
+
*,
|
|
46
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
47
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
48
|
+
extra_headers: Headers | None = None,
|
|
49
|
+
extra_query: Query | None = None,
|
|
50
|
+
extra_body: Body | None = None,
|
|
51
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
52
|
+
) -> BinaryListResponse:
|
|
53
|
+
"""List binaries"""
|
|
54
|
+
return self._get(
|
|
55
|
+
"/fastedge/v1/binaries",
|
|
56
|
+
options=make_request_options(
|
|
57
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
58
|
+
),
|
|
59
|
+
cast_to=BinaryListResponse,
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
def delete(
|
|
63
|
+
self,
|
|
64
|
+
id: int,
|
|
65
|
+
*,
|
|
66
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
67
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
68
|
+
extra_headers: Headers | None = None,
|
|
69
|
+
extra_query: Query | None = None,
|
|
70
|
+
extra_body: Body | None = None,
|
|
71
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
72
|
+
) -> None:
|
|
73
|
+
"""
|
|
74
|
+
Delete a binary
|
|
75
|
+
|
|
76
|
+
Args:
|
|
77
|
+
extra_headers: Send extra headers
|
|
78
|
+
|
|
79
|
+
extra_query: Add additional query parameters to the request
|
|
80
|
+
|
|
81
|
+
extra_body: Add additional JSON properties to the request
|
|
82
|
+
|
|
83
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
84
|
+
"""
|
|
85
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
86
|
+
return self._delete(
|
|
87
|
+
f"/fastedge/v1/binaries/{id}",
|
|
88
|
+
options=make_request_options(
|
|
89
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
90
|
+
),
|
|
91
|
+
cast_to=NoneType,
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
def get(
|
|
95
|
+
self,
|
|
96
|
+
id: int,
|
|
97
|
+
*,
|
|
98
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
99
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
100
|
+
extra_headers: Headers | None = None,
|
|
101
|
+
extra_query: Query | None = None,
|
|
102
|
+
extra_body: Body | None = None,
|
|
103
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
104
|
+
) -> Binary:
|
|
105
|
+
"""
|
|
106
|
+
Get binary
|
|
107
|
+
|
|
108
|
+
Args:
|
|
109
|
+
extra_headers: Send extra headers
|
|
110
|
+
|
|
111
|
+
extra_query: Add additional query parameters to the request
|
|
112
|
+
|
|
113
|
+
extra_body: Add additional JSON properties to the request
|
|
114
|
+
|
|
115
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
116
|
+
"""
|
|
117
|
+
return self._get(
|
|
118
|
+
f"/fastedge/v1/binaries/{id}",
|
|
119
|
+
options=make_request_options(
|
|
120
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
121
|
+
),
|
|
122
|
+
cast_to=Binary,
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
class AsyncBinariesResource(AsyncAPIResource):
|
|
127
|
+
@cached_property
|
|
128
|
+
def with_raw_response(self) -> AsyncBinariesResourceWithRawResponse:
|
|
129
|
+
"""
|
|
130
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
131
|
+
the raw response object instead of the parsed content.
|
|
132
|
+
|
|
133
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
134
|
+
"""
|
|
135
|
+
return AsyncBinariesResourceWithRawResponse(self)
|
|
136
|
+
|
|
137
|
+
@cached_property
|
|
138
|
+
def with_streaming_response(self) -> AsyncBinariesResourceWithStreamingResponse:
|
|
139
|
+
"""
|
|
140
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
141
|
+
|
|
142
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
143
|
+
"""
|
|
144
|
+
return AsyncBinariesResourceWithStreamingResponse(self)
|
|
145
|
+
|
|
146
|
+
async def list(
|
|
147
|
+
self,
|
|
148
|
+
*,
|
|
149
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
150
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
151
|
+
extra_headers: Headers | None = None,
|
|
152
|
+
extra_query: Query | None = None,
|
|
153
|
+
extra_body: Body | None = None,
|
|
154
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
155
|
+
) -> BinaryListResponse:
|
|
156
|
+
"""List binaries"""
|
|
157
|
+
return await self._get(
|
|
158
|
+
"/fastedge/v1/binaries",
|
|
159
|
+
options=make_request_options(
|
|
160
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
161
|
+
),
|
|
162
|
+
cast_to=BinaryListResponse,
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
async def delete(
|
|
166
|
+
self,
|
|
167
|
+
id: int,
|
|
168
|
+
*,
|
|
169
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
170
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
171
|
+
extra_headers: Headers | None = None,
|
|
172
|
+
extra_query: Query | None = None,
|
|
173
|
+
extra_body: Body | None = None,
|
|
174
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
175
|
+
) -> None:
|
|
176
|
+
"""
|
|
177
|
+
Delete a binary
|
|
178
|
+
|
|
179
|
+
Args:
|
|
180
|
+
extra_headers: Send extra headers
|
|
181
|
+
|
|
182
|
+
extra_query: Add additional query parameters to the request
|
|
183
|
+
|
|
184
|
+
extra_body: Add additional JSON properties to the request
|
|
185
|
+
|
|
186
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
187
|
+
"""
|
|
188
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
189
|
+
return await self._delete(
|
|
190
|
+
f"/fastedge/v1/binaries/{id}",
|
|
191
|
+
options=make_request_options(
|
|
192
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
193
|
+
),
|
|
194
|
+
cast_to=NoneType,
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
async def get(
|
|
198
|
+
self,
|
|
199
|
+
id: int,
|
|
200
|
+
*,
|
|
201
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
202
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
203
|
+
extra_headers: Headers | None = None,
|
|
204
|
+
extra_query: Query | None = None,
|
|
205
|
+
extra_body: Body | None = None,
|
|
206
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
207
|
+
) -> Binary:
|
|
208
|
+
"""
|
|
209
|
+
Get binary
|
|
210
|
+
|
|
211
|
+
Args:
|
|
212
|
+
extra_headers: Send extra headers
|
|
213
|
+
|
|
214
|
+
extra_query: Add additional query parameters to the request
|
|
215
|
+
|
|
216
|
+
extra_body: Add additional JSON properties to the request
|
|
217
|
+
|
|
218
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
219
|
+
"""
|
|
220
|
+
return await self._get(
|
|
221
|
+
f"/fastedge/v1/binaries/{id}",
|
|
222
|
+
options=make_request_options(
|
|
223
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
224
|
+
),
|
|
225
|
+
cast_to=Binary,
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
class BinariesResourceWithRawResponse:
|
|
230
|
+
def __init__(self, binaries: BinariesResource) -> None:
|
|
231
|
+
self._binaries = binaries
|
|
232
|
+
|
|
233
|
+
self.list = to_raw_response_wrapper(
|
|
234
|
+
binaries.list,
|
|
235
|
+
)
|
|
236
|
+
self.delete = to_raw_response_wrapper(
|
|
237
|
+
binaries.delete,
|
|
238
|
+
)
|
|
239
|
+
self.get = to_raw_response_wrapper(
|
|
240
|
+
binaries.get,
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
class AsyncBinariesResourceWithRawResponse:
|
|
245
|
+
def __init__(self, binaries: AsyncBinariesResource) -> None:
|
|
246
|
+
self._binaries = binaries
|
|
247
|
+
|
|
248
|
+
self.list = async_to_raw_response_wrapper(
|
|
249
|
+
binaries.list,
|
|
250
|
+
)
|
|
251
|
+
self.delete = async_to_raw_response_wrapper(
|
|
252
|
+
binaries.delete,
|
|
253
|
+
)
|
|
254
|
+
self.get = async_to_raw_response_wrapper(
|
|
255
|
+
binaries.get,
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
class BinariesResourceWithStreamingResponse:
|
|
260
|
+
def __init__(self, binaries: BinariesResource) -> None:
|
|
261
|
+
self._binaries = binaries
|
|
262
|
+
|
|
263
|
+
self.list = to_streamed_response_wrapper(
|
|
264
|
+
binaries.list,
|
|
265
|
+
)
|
|
266
|
+
self.delete = to_streamed_response_wrapper(
|
|
267
|
+
binaries.delete,
|
|
268
|
+
)
|
|
269
|
+
self.get = to_streamed_response_wrapper(
|
|
270
|
+
binaries.get,
|
|
271
|
+
)
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
class AsyncBinariesResourceWithStreamingResponse:
|
|
275
|
+
def __init__(self, binaries: AsyncBinariesResource) -> None:
|
|
276
|
+
self._binaries = binaries
|
|
277
|
+
|
|
278
|
+
self.list = async_to_streamed_response_wrapper(
|
|
279
|
+
binaries.list,
|
|
280
|
+
)
|
|
281
|
+
self.delete = async_to_streamed_response_wrapper(
|
|
282
|
+
binaries.delete,
|
|
283
|
+
)
|
|
284
|
+
self.get = async_to_streamed_response_wrapper(
|
|
285
|
+
binaries.get,
|
|
286
|
+
)
|