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.

Files changed (125) hide show
  1. gcore/_base_client.py +9 -2
  2. gcore/_client.py +9 -0
  3. gcore/_constants.py +2 -2
  4. gcore/_models.py +8 -5
  5. gcore/_version.py +1 -1
  6. gcore/pagination.py +192 -1
  7. gcore/resources/__init__.py +14 -0
  8. gcore/resources/cloud/baremetal/servers.py +2 -2
  9. gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +2 -2
  10. gcore/resources/cloud/inference/deployments/deployments.py +66 -33
  11. gcore/resources/cloud/inference/deployments/logs.py +7 -7
  12. gcore/resources/cloud/inference/inference.py +5 -5
  13. gcore/resources/cloud/inference/models.py +16 -15
  14. gcore/resources/cloud/inference/registry_credentials.py +16 -16
  15. gcore/resources/cloud/inference/secrets.py +4 -5
  16. gcore/resources/cloud/instances/instances.py +2 -2
  17. gcore/resources/cloud/secrets.py +14 -224
  18. gcore/resources/cloud/tasks.py +30 -28
  19. gcore/resources/fastedge/__init__.py +103 -0
  20. gcore/resources/fastedge/apps/__init__.py +33 -0
  21. gcore/resources/fastedge/apps/apps.py +932 -0
  22. gcore/resources/fastedge/apps/logs.py +248 -0
  23. gcore/resources/fastedge/binaries.py +286 -0
  24. gcore/resources/fastedge/fastedge.py +327 -0
  25. gcore/resources/fastedge/kv_stores.py +523 -0
  26. gcore/resources/fastedge/secrets.py +687 -0
  27. gcore/resources/fastedge/statistics.py +347 -0
  28. gcore/resources/fastedge/templates.py +652 -0
  29. gcore/types/cloud/__init__.py +2 -28
  30. gcore/types/cloud/baremetal/server_create_params.py +1 -1
  31. gcore/types/cloud/gpu_baremetal_cluster_create_params.py +1 -1
  32. gcore/types/cloud/inference/__init__.py +12 -8
  33. gcore/types/cloud/inference/deployment_create_params.py +224 -7
  34. gcore/types/cloud/inference/deployment_update_params.py +24 -3
  35. gcore/types/cloud/inference/deployments/__init__.py +1 -0
  36. gcore/types/cloud/inference/{inference_log.py → deployments/inference_deployment_log.py} +3 -3
  37. gcore/types/cloud/inference/inference_deployment.py +266 -0
  38. gcore/types/cloud/inference/{inference_apikey_secret.py → inference_deployment_api_key.py} +2 -2
  39. gcore/types/cloud/inference/{mlcatalog_model_card.py → inference_model.py} +2 -2
  40. gcore/types/cloud/inference/{inference_registry_credential.py → inference_registry_credentials.py} +2 -2
  41. gcore/types/cloud/inference/{inference_registry_credential_full.py → inference_registry_credentials_create.py} +2 -2
  42. gcore/types/cloud/inference/inference_secret.py +10 -3
  43. gcore/types/cloud/inference/model_list_params.py +2 -4
  44. gcore/types/cloud/{container_probe.py → inference/probe.py} +9 -9
  45. gcore/types/cloud/{container_probe_config.py → inference/probe_config.py} +5 -5
  46. gcore/types/cloud/{container_probe_exec.py → inference/probe_exec.py} +3 -3
  47. gcore/types/cloud/{container_probe_http_get.py → inference/probe_http_get.py} +3 -3
  48. gcore/types/cloud/{container_probe_tcp_socket.py → inference/probe_tcp_socket.py} +3 -3
  49. gcore/types/cloud/inference/secret_create_params.py +10 -4
  50. gcore/types/cloud/inference/secret_replace_params.py +10 -4
  51. gcore/types/cloud/{region_capacity.py → inference_region_capacity.py} +10 -3
  52. gcore/types/cloud/{region_capacity_list.py → inference_region_capacity_list.py} +4 -4
  53. gcore/types/cloud/instance_create_params.py +1 -1
  54. gcore/types/cloud/task_list_params.py +15 -14
  55. gcore/types/fastedge/__init__.py +48 -0
  56. gcore/types/fastedge/app.py +81 -0
  57. gcore/types/fastedge/app_create_params.py +56 -0
  58. gcore/types/fastedge/app_list_params.py +50 -0
  59. gcore/types/fastedge/app_param.py +56 -0
  60. gcore/types/fastedge/app_replace_params.py +17 -0
  61. gcore/types/fastedge/app_short.py +60 -0
  62. gcore/types/fastedge/app_update_params.py +56 -0
  63. gcore/types/fastedge/apps/__init__.py +6 -0
  64. gcore/types/fastedge/apps/log.py +28 -0
  65. gcore/types/fastedge/apps/log_list_params.py +37 -0
  66. gcore/types/fastedge/binary.py +40 -0
  67. gcore/types/fastedge/binary_list_response.py +12 -0
  68. gcore/types/fastedge/binary_short.py +32 -0
  69. gcore/types/fastedge/call_status.py +24 -0
  70. gcore/types/fastedge/client.py +57 -0
  71. gcore/types/fastedge/duration_stats.py +30 -0
  72. gcore/types/fastedge/kv_store.py +33 -0
  73. gcore/types/fastedge/kv_store_create_params.py +23 -0
  74. gcore/types/fastedge/kv_store_get_response.py +10 -0
  75. gcore/types/fastedge/kv_store_list_params.py +12 -0
  76. gcore/types/fastedge/kv_store_list_response.py +15 -0
  77. gcore/types/fastedge/kv_store_replace_params.py +23 -0
  78. gcore/types/fastedge/kv_store_short.py +19 -0
  79. gcore/types/fastedge/kv_store_stats.py +26 -0
  80. gcore/types/fastedge/secret.py +29 -0
  81. gcore/types/fastedge/secret_create_params.py +27 -0
  82. gcore/types/fastedge/secret_create_response.py +12 -0
  83. gcore/types/fastedge/secret_delete_params.py +12 -0
  84. gcore/types/fastedge/secret_list_params.py +15 -0
  85. gcore/types/{cloud → fastedge}/secret_list_response.py +2 -6
  86. gcore/types/fastedge/secret_replace_params.py +27 -0
  87. gcore/types/fastedge/secret_short.py +21 -0
  88. gcore/types/fastedge/secret_update_params.py +27 -0
  89. gcore/types/fastedge/statistic_get_call_series_params.py +28 -0
  90. gcore/types/fastedge/statistic_get_call_series_response.py +12 -0
  91. gcore/types/fastedge/statistic_get_duration_series_params.py +28 -0
  92. gcore/types/fastedge/statistic_get_duration_series_response.py +12 -0
  93. gcore/types/fastedge/template.py +31 -0
  94. gcore/types/fastedge/template_create_params.py +30 -0
  95. gcore/types/fastedge/template_delete_params.py +12 -0
  96. gcore/types/fastedge/template_list_params.py +25 -0
  97. gcore/types/fastedge/template_parameter.py +22 -0
  98. gcore/types/fastedge/template_parameter_param.py +21 -0
  99. gcore/types/fastedge/template_replace_params.py +30 -0
  100. gcore/types/fastedge/template_short.py +27 -0
  101. {gcore-0.4.0.dist-info → gcore-0.5.0.dist-info}/METADATA +7 -5
  102. {gcore-0.4.0.dist-info → gcore-0.5.0.dist-info}/RECORD +104 -69
  103. gcore/types/cloud/aws_iam_data.py +0 -13
  104. gcore/types/cloud/aws_iam_data_param.py +0 -15
  105. gcore/types/cloud/capacity.py +0 -13
  106. gcore/types/cloud/container_probe_config_create_param.py +0 -17
  107. gcore/types/cloud/container_probe_create_param.py +0 -38
  108. gcore/types/cloud/container_probe_exec_create_param.py +0 -13
  109. gcore/types/cloud/container_probe_http_get_create_param.py +0 -25
  110. gcore/types/cloud/container_probe_tcp_socket_create_param.py +0 -12
  111. gcore/types/cloud/container_scale.py +0 -25
  112. gcore/types/cloud/container_scale_trigger_rate.py +0 -13
  113. gcore/types/cloud/container_scale_trigger_sqs.py +0 -33
  114. gcore/types/cloud/container_scale_trigger_threshold.py +0 -10
  115. gcore/types/cloud/container_scale_triggers.py +0 -36
  116. gcore/types/cloud/deploy_status.py +0 -13
  117. gcore/types/cloud/inference/container.py +0 -26
  118. gcore/types/cloud/inference/inference.py +0 -95
  119. gcore/types/cloud/inference/mlcatalog_order_by_choices.py +0 -7
  120. gcore/types/cloud/inference_probes.py +0 -19
  121. gcore/types/cloud/ingress_opts_out.py +0 -16
  122. gcore/types/cloud/ingress_opts_param.py +0 -18
  123. gcore/types/cloud/secret_create_params.py +0 -66
  124. {gcore-0.4.0.dist-info → gcore-0.5.0.dist-info}/WHEEL +0 -0
  125. {gcore-0.4.0.dist-info → gcore-0.5.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,327 @@
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 .secrets import (
8
+ SecretsResource,
9
+ AsyncSecretsResource,
10
+ SecretsResourceWithRawResponse,
11
+ AsyncSecretsResourceWithRawResponse,
12
+ SecretsResourceWithStreamingResponse,
13
+ AsyncSecretsResourceWithStreamingResponse,
14
+ )
15
+ from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
16
+ from .binaries import (
17
+ BinariesResource,
18
+ AsyncBinariesResource,
19
+ BinariesResourceWithRawResponse,
20
+ AsyncBinariesResourceWithRawResponse,
21
+ BinariesResourceWithStreamingResponse,
22
+ AsyncBinariesResourceWithStreamingResponse,
23
+ )
24
+ from ..._compat import cached_property
25
+ from .apps.apps import (
26
+ AppsResource,
27
+ AsyncAppsResource,
28
+ AppsResourceWithRawResponse,
29
+ AsyncAppsResourceWithRawResponse,
30
+ AppsResourceWithStreamingResponse,
31
+ AsyncAppsResourceWithStreamingResponse,
32
+ )
33
+ from .kv_stores import (
34
+ KvStoresResource,
35
+ AsyncKvStoresResource,
36
+ KvStoresResourceWithRawResponse,
37
+ AsyncKvStoresResourceWithRawResponse,
38
+ KvStoresResourceWithStreamingResponse,
39
+ AsyncKvStoresResourceWithStreamingResponse,
40
+ )
41
+ from .templates import (
42
+ TemplatesResource,
43
+ AsyncTemplatesResource,
44
+ TemplatesResourceWithRawResponse,
45
+ AsyncTemplatesResourceWithRawResponse,
46
+ TemplatesResourceWithStreamingResponse,
47
+ AsyncTemplatesResourceWithStreamingResponse,
48
+ )
49
+ from .statistics import (
50
+ StatisticsResource,
51
+ AsyncStatisticsResource,
52
+ StatisticsResourceWithRawResponse,
53
+ AsyncStatisticsResourceWithRawResponse,
54
+ StatisticsResourceWithStreamingResponse,
55
+ AsyncStatisticsResourceWithStreamingResponse,
56
+ )
57
+ from ..._resource import SyncAPIResource, AsyncAPIResource
58
+ from ..._response import (
59
+ to_raw_response_wrapper,
60
+ to_streamed_response_wrapper,
61
+ async_to_raw_response_wrapper,
62
+ async_to_streamed_response_wrapper,
63
+ )
64
+ from ..._base_client import make_request_options
65
+ from ...types.fastedge.client import Client
66
+
67
+ __all__ = ["FastedgeResource", "AsyncFastedgeResource"]
68
+
69
+
70
+ class FastedgeResource(SyncAPIResource):
71
+ @cached_property
72
+ def templates(self) -> TemplatesResource:
73
+ return TemplatesResource(self._client)
74
+
75
+ @cached_property
76
+ def secrets(self) -> SecretsResource:
77
+ return SecretsResource(self._client)
78
+
79
+ @cached_property
80
+ def binaries(self) -> BinariesResource:
81
+ return BinariesResource(self._client)
82
+
83
+ @cached_property
84
+ def statistics(self) -> StatisticsResource:
85
+ return StatisticsResource(self._client)
86
+
87
+ @cached_property
88
+ def apps(self) -> AppsResource:
89
+ return AppsResource(self._client)
90
+
91
+ @cached_property
92
+ def kv_stores(self) -> KvStoresResource:
93
+ return KvStoresResource(self._client)
94
+
95
+ @cached_property
96
+ def with_raw_response(self) -> FastedgeResourceWithRawResponse:
97
+ """
98
+ This property can be used as a prefix for any HTTP method call to return
99
+ the raw response object instead of the parsed content.
100
+
101
+ For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
102
+ """
103
+ return FastedgeResourceWithRawResponse(self)
104
+
105
+ @cached_property
106
+ def with_streaming_response(self) -> FastedgeResourceWithStreamingResponse:
107
+ """
108
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
109
+
110
+ For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
111
+ """
112
+ return FastedgeResourceWithStreamingResponse(self)
113
+
114
+ def get_account_overview(
115
+ self,
116
+ *,
117
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
118
+ # The extra values given here take precedence over values defined on the client or passed to this method.
119
+ extra_headers: Headers | None = None,
120
+ extra_query: Query | None = None,
121
+ extra_body: Body | None = None,
122
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
123
+ ) -> Client:
124
+ """Get status and limits for the client"""
125
+ return self._get(
126
+ "/fastedge/v1/me",
127
+ options=make_request_options(
128
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
129
+ ),
130
+ cast_to=Client,
131
+ )
132
+
133
+
134
+ class AsyncFastedgeResource(AsyncAPIResource):
135
+ @cached_property
136
+ def templates(self) -> AsyncTemplatesResource:
137
+ return AsyncTemplatesResource(self._client)
138
+
139
+ @cached_property
140
+ def secrets(self) -> AsyncSecretsResource:
141
+ return AsyncSecretsResource(self._client)
142
+
143
+ @cached_property
144
+ def binaries(self) -> AsyncBinariesResource:
145
+ return AsyncBinariesResource(self._client)
146
+
147
+ @cached_property
148
+ def statistics(self) -> AsyncStatisticsResource:
149
+ return AsyncStatisticsResource(self._client)
150
+
151
+ @cached_property
152
+ def apps(self) -> AsyncAppsResource:
153
+ return AsyncAppsResource(self._client)
154
+
155
+ @cached_property
156
+ def kv_stores(self) -> AsyncKvStoresResource:
157
+ return AsyncKvStoresResource(self._client)
158
+
159
+ @cached_property
160
+ def with_raw_response(self) -> AsyncFastedgeResourceWithRawResponse:
161
+ """
162
+ This property can be used as a prefix for any HTTP method call to return
163
+ the raw response object instead of the parsed content.
164
+
165
+ For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
166
+ """
167
+ return AsyncFastedgeResourceWithRawResponse(self)
168
+
169
+ @cached_property
170
+ def with_streaming_response(self) -> AsyncFastedgeResourceWithStreamingResponse:
171
+ """
172
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
173
+
174
+ For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
175
+ """
176
+ return AsyncFastedgeResourceWithStreamingResponse(self)
177
+
178
+ async def get_account_overview(
179
+ self,
180
+ *,
181
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
182
+ # The extra values given here take precedence over values defined on the client or passed to this method.
183
+ extra_headers: Headers | None = None,
184
+ extra_query: Query | None = None,
185
+ extra_body: Body | None = None,
186
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
187
+ ) -> Client:
188
+ """Get status and limits for the client"""
189
+ return await self._get(
190
+ "/fastedge/v1/me",
191
+ options=make_request_options(
192
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
193
+ ),
194
+ cast_to=Client,
195
+ )
196
+
197
+
198
+ class FastedgeResourceWithRawResponse:
199
+ def __init__(self, fastedge: FastedgeResource) -> None:
200
+ self._fastedge = fastedge
201
+
202
+ self.get_account_overview = to_raw_response_wrapper(
203
+ fastedge.get_account_overview,
204
+ )
205
+
206
+ @cached_property
207
+ def templates(self) -> TemplatesResourceWithRawResponse:
208
+ return TemplatesResourceWithRawResponse(self._fastedge.templates)
209
+
210
+ @cached_property
211
+ def secrets(self) -> SecretsResourceWithRawResponse:
212
+ return SecretsResourceWithRawResponse(self._fastedge.secrets)
213
+
214
+ @cached_property
215
+ def binaries(self) -> BinariesResourceWithRawResponse:
216
+ return BinariesResourceWithRawResponse(self._fastedge.binaries)
217
+
218
+ @cached_property
219
+ def statistics(self) -> StatisticsResourceWithRawResponse:
220
+ return StatisticsResourceWithRawResponse(self._fastedge.statistics)
221
+
222
+ @cached_property
223
+ def apps(self) -> AppsResourceWithRawResponse:
224
+ return AppsResourceWithRawResponse(self._fastedge.apps)
225
+
226
+ @cached_property
227
+ def kv_stores(self) -> KvStoresResourceWithRawResponse:
228
+ return KvStoresResourceWithRawResponse(self._fastedge.kv_stores)
229
+
230
+
231
+ class AsyncFastedgeResourceWithRawResponse:
232
+ def __init__(self, fastedge: AsyncFastedgeResource) -> None:
233
+ self._fastedge = fastedge
234
+
235
+ self.get_account_overview = async_to_raw_response_wrapper(
236
+ fastedge.get_account_overview,
237
+ )
238
+
239
+ @cached_property
240
+ def templates(self) -> AsyncTemplatesResourceWithRawResponse:
241
+ return AsyncTemplatesResourceWithRawResponse(self._fastedge.templates)
242
+
243
+ @cached_property
244
+ def secrets(self) -> AsyncSecretsResourceWithRawResponse:
245
+ return AsyncSecretsResourceWithRawResponse(self._fastedge.secrets)
246
+
247
+ @cached_property
248
+ def binaries(self) -> AsyncBinariesResourceWithRawResponse:
249
+ return AsyncBinariesResourceWithRawResponse(self._fastedge.binaries)
250
+
251
+ @cached_property
252
+ def statistics(self) -> AsyncStatisticsResourceWithRawResponse:
253
+ return AsyncStatisticsResourceWithRawResponse(self._fastedge.statistics)
254
+
255
+ @cached_property
256
+ def apps(self) -> AsyncAppsResourceWithRawResponse:
257
+ return AsyncAppsResourceWithRawResponse(self._fastedge.apps)
258
+
259
+ @cached_property
260
+ def kv_stores(self) -> AsyncKvStoresResourceWithRawResponse:
261
+ return AsyncKvStoresResourceWithRawResponse(self._fastedge.kv_stores)
262
+
263
+
264
+ class FastedgeResourceWithStreamingResponse:
265
+ def __init__(self, fastedge: FastedgeResource) -> None:
266
+ self._fastedge = fastedge
267
+
268
+ self.get_account_overview = to_streamed_response_wrapper(
269
+ fastedge.get_account_overview,
270
+ )
271
+
272
+ @cached_property
273
+ def templates(self) -> TemplatesResourceWithStreamingResponse:
274
+ return TemplatesResourceWithStreamingResponse(self._fastedge.templates)
275
+
276
+ @cached_property
277
+ def secrets(self) -> SecretsResourceWithStreamingResponse:
278
+ return SecretsResourceWithStreamingResponse(self._fastedge.secrets)
279
+
280
+ @cached_property
281
+ def binaries(self) -> BinariesResourceWithStreamingResponse:
282
+ return BinariesResourceWithStreamingResponse(self._fastedge.binaries)
283
+
284
+ @cached_property
285
+ def statistics(self) -> StatisticsResourceWithStreamingResponse:
286
+ return StatisticsResourceWithStreamingResponse(self._fastedge.statistics)
287
+
288
+ @cached_property
289
+ def apps(self) -> AppsResourceWithStreamingResponse:
290
+ return AppsResourceWithStreamingResponse(self._fastedge.apps)
291
+
292
+ @cached_property
293
+ def kv_stores(self) -> KvStoresResourceWithStreamingResponse:
294
+ return KvStoresResourceWithStreamingResponse(self._fastedge.kv_stores)
295
+
296
+
297
+ class AsyncFastedgeResourceWithStreamingResponse:
298
+ def __init__(self, fastedge: AsyncFastedgeResource) -> None:
299
+ self._fastedge = fastedge
300
+
301
+ self.get_account_overview = async_to_streamed_response_wrapper(
302
+ fastedge.get_account_overview,
303
+ )
304
+
305
+ @cached_property
306
+ def templates(self) -> AsyncTemplatesResourceWithStreamingResponse:
307
+ return AsyncTemplatesResourceWithStreamingResponse(self._fastedge.templates)
308
+
309
+ @cached_property
310
+ def secrets(self) -> AsyncSecretsResourceWithStreamingResponse:
311
+ return AsyncSecretsResourceWithStreamingResponse(self._fastedge.secrets)
312
+
313
+ @cached_property
314
+ def binaries(self) -> AsyncBinariesResourceWithStreamingResponse:
315
+ return AsyncBinariesResourceWithStreamingResponse(self._fastedge.binaries)
316
+
317
+ @cached_property
318
+ def statistics(self) -> AsyncStatisticsResourceWithStreamingResponse:
319
+ return AsyncStatisticsResourceWithStreamingResponse(self._fastedge.statistics)
320
+
321
+ @cached_property
322
+ def apps(self) -> AsyncAppsResourceWithStreamingResponse:
323
+ return AsyncAppsResourceWithStreamingResponse(self._fastedge.apps)
324
+
325
+ @cached_property
326
+ def kv_stores(self) -> AsyncKvStoresResourceWithStreamingResponse:
327
+ return AsyncKvStoresResourceWithStreamingResponse(self._fastedge.kv_stores)