infinitecompute 0.1.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.
Files changed (82) hide show
  1. infinitecompute/__init__.py +3 -0
  2. infinitecompute/_api/__init__.py +8 -0
  3. infinitecompute/_api/api/__init__.py +1 -0
  4. infinitecompute/_api/api/audit/__init__.py +1 -0
  5. infinitecompute/_api/api/audit/list_audit_events_audit_events_get.py +272 -0
  6. infinitecompute/_api/api/catalog/__init__.py +1 -0
  7. infinitecompute/_api/api/catalog/list_images_images_get.py +187 -0
  8. infinitecompute/_api/api/catalog/list_server_types_server_types_get.py +187 -0
  9. infinitecompute/_api/api/health/__init__.py +1 -0
  10. infinitecompute/_api/api/health/health_health_get.py +135 -0
  11. infinitecompute/_api/api/keys/__init__.py +1 -0
  12. infinitecompute/_api/api/keys/me_me_get.py +133 -0
  13. infinitecompute/_api/api/servers/__init__.py +1 -0
  14. infinitecompute/_api/api/servers/close_ssh_servers_server_id_ssh_delete.py +162 -0
  15. infinitecompute/_api/api/servers/create_server_servers_post.py +182 -0
  16. infinitecompute/_api/api/servers/create_ssh_key_ssh_keys_post.py +167 -0
  17. infinitecompute/_api/api/servers/delete_server_servers_server_id_delete.py +162 -0
  18. infinitecompute/_api/api/servers/delete_ssh_key_ssh_keys_name_delete.py +158 -0
  19. infinitecompute/_api/api/servers/get_server_servers_server_id_get.py +162 -0
  20. infinitecompute/_api/api/servers/get_ssh_servers_server_id_ssh_get.py +162 -0
  21. infinitecompute/_api/api/servers/list_servers_servers_get.py +187 -0
  22. infinitecompute/_api/api/servers/list_ssh_keys_ssh_keys_get.py +187 -0
  23. infinitecompute/_api/api/servers/open_ssh_servers_server_id_ssh_put.py +162 -0
  24. infinitecompute/_api/api/servers/server_action_servers_server_id_actions_post.py +183 -0
  25. infinitecompute/_api/api/usage/__init__.py +1 -0
  26. infinitecompute/_api/api/usage/get_usage_usage_get.py +172 -0
  27. infinitecompute/_api/api/volumes/__init__.py +1 -0
  28. infinitecompute/_api/api/volumes/attach_volume_volumes_volume_id_attach_post.py +183 -0
  29. infinitecompute/_api/api/volumes/create_volume_volumes_post.py +182 -0
  30. infinitecompute/_api/api/volumes/delete_volume_volumes_volume_id_delete.py +162 -0
  31. infinitecompute/_api/api/volumes/detach_volume_volumes_volume_id_detach_post.py +162 -0
  32. infinitecompute/_api/api/volumes/get_volume_volumes_volume_id_get.py +162 -0
  33. infinitecompute/_api/api/volumes/list_backups_volumes_volume_id_backups_get.py +203 -0
  34. infinitecompute/_api/api/volumes/list_volumes_volumes_get.py +187 -0
  35. infinitecompute/_api/api/volumes/restore_backup_backups_backup_id_restore_post.py +199 -0
  36. infinitecompute/_api/client.py +272 -0
  37. infinitecompute/_api/errors.py +16 -0
  38. infinitecompute/_api/models/__init__.py +79 -0
  39. infinitecompute/_api/models/audit_actor.py +113 -0
  40. infinitecompute/_api/models/audit_event.py +212 -0
  41. infinitecompute/_api/models/audit_event_page.py +97 -0
  42. infinitecompute/_api/models/audit_resource.py +113 -0
  43. infinitecompute/_api/models/backup.py +165 -0
  44. infinitecompute/_api/models/backup_list.py +97 -0
  45. infinitecompute/_api/models/backup_restore.py +54 -0
  46. infinitecompute/_api/models/error_detail.py +77 -0
  47. infinitecompute/_api/models/error_response.py +67 -0
  48. infinitecompute/_api/models/health.py +69 -0
  49. infinitecompute/_api/models/image.py +216 -0
  50. infinitecompute/_api/models/image_list.py +97 -0
  51. infinitecompute/_api/models/me.py +85 -0
  52. infinitecompute/_api/models/me_key.py +86 -0
  53. infinitecompute/_api/models/me_user.py +69 -0
  54. infinitecompute/_api/models/price.py +80 -0
  55. infinitecompute/_api/models/server.py +292 -0
  56. infinitecompute/_api/models/server_action.py +54 -0
  57. infinitecompute/_api/models/server_address.py +77 -0
  58. infinitecompute/_api/models/server_create.py +118 -0
  59. infinitecompute/_api/models/server_list.py +97 -0
  60. infinitecompute/_api/models/server_type.py +168 -0
  61. infinitecompute/_api/models/server_type_gpu.py +99 -0
  62. infinitecompute/_api/models/server_type_list.py +97 -0
  63. infinitecompute/_api/models/site.py +69 -0
  64. infinitecompute/_api/models/ssh_access.py +143 -0
  65. infinitecompute/_api/models/ssh_key.py +85 -0
  66. infinitecompute/_api/models/ssh_key_create.py +50 -0
  67. infinitecompute/_api/models/ssh_key_list.py +97 -0
  68. infinitecompute/_api/models/usage.py +152 -0
  69. infinitecompute/_api/models/usage_server.py +143 -0
  70. infinitecompute/_api/models/usage_spend.py +124 -0
  71. infinitecompute/_api/models/usage_spend_line.py +85 -0
  72. infinitecompute/_api/models/volume.py +196 -0
  73. infinitecompute/_api/models/volume_attach.py +42 -0
  74. infinitecompute/_api/models/volume_create.py +58 -0
  75. infinitecompute/_api/models/volume_list.py +97 -0
  76. infinitecompute/_api/types.py +54 -0
  77. infinitecompute/cli.py +625 -0
  78. infinitecompute-0.1.0.dist-info/METADATA +54 -0
  79. infinitecompute-0.1.0.dist-info/RECORD +82 -0
  80. infinitecompute-0.1.0.dist-info/WHEEL +4 -0
  81. infinitecompute-0.1.0.dist-info/entry_points.txt +2 -0
  82. infinitecompute-0.1.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,3 @@
1
+ """ic: the Infinite Compute command line."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,8 @@
1
+ """A client library for accessing Infinite Compute API"""
2
+
3
+ from .client import AuthenticatedClient, Client
4
+
5
+ __all__ = (
6
+ "AuthenticatedClient",
7
+ "Client",
8
+ )
@@ -0,0 +1 @@
1
+ """Contains methods for accessing the API"""
@@ -0,0 +1 @@
1
+ """Contains endpoint functions for accessing the API"""
@@ -0,0 +1,272 @@
1
+ import datetime
2
+ from http import HTTPStatus
3
+ from typing import Any
4
+
5
+ import httpx
6
+
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.audit_event_page import AuditEventPage
9
+ from ...models.error_response import ErrorResponse
10
+ from ...types import UNSET, Response, Unset
11
+
12
+
13
+ def _get_kwargs(
14
+ *,
15
+ person: None | str | Unset = UNSET,
16
+ action: None | str | Unset = UNSET,
17
+ since: datetime.datetime | None | Unset = UNSET,
18
+ until: datetime.datetime | None | Unset = UNSET,
19
+ limit: int | Unset = 50,
20
+ cursor: None | str | Unset = UNSET,
21
+ ) -> dict[str, Any]:
22
+
23
+ params: dict[str, Any] = {}
24
+
25
+ json_person: None | str | Unset
26
+ if isinstance(person, Unset):
27
+ json_person = UNSET
28
+ else:
29
+ json_person = person
30
+ params["person"] = json_person
31
+
32
+ json_action: None | str | Unset
33
+ if isinstance(action, Unset):
34
+ json_action = UNSET
35
+ else:
36
+ json_action = action
37
+ params["action"] = json_action
38
+
39
+ json_since: None | str | Unset
40
+ if isinstance(since, Unset):
41
+ json_since = UNSET
42
+ elif isinstance(since, datetime.datetime):
43
+ json_since = since.isoformat()
44
+ else:
45
+ json_since = since
46
+ params["since"] = json_since
47
+
48
+ json_until: None | str | Unset
49
+ if isinstance(until, Unset):
50
+ json_until = UNSET
51
+ elif isinstance(until, datetime.datetime):
52
+ json_until = until.isoformat()
53
+ else:
54
+ json_until = until
55
+ params["until"] = json_until
56
+
57
+ params["limit"] = limit
58
+
59
+ json_cursor: None | str | Unset
60
+ if isinstance(cursor, Unset):
61
+ json_cursor = UNSET
62
+ else:
63
+ json_cursor = cursor
64
+ params["cursor"] = json_cursor
65
+
66
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
67
+
68
+ _kwargs: dict[str, Any] = {
69
+ "method": "get",
70
+ "url": "/audit-events",
71
+ "params": params,
72
+ }
73
+
74
+ return _kwargs
75
+
76
+
77
+ def _parse_response(
78
+ *, client: AuthenticatedClient | Client, response: httpx.Response
79
+ ) -> AuditEventPage | ErrorResponse:
80
+ if response.status_code == 200:
81
+ response_200 = AuditEventPage.from_dict(response.json())
82
+
83
+ return response_200
84
+
85
+ response_default = ErrorResponse.from_dict(response.json())
86
+
87
+ return response_default
88
+
89
+
90
+ def _build_response(
91
+ *, client: AuthenticatedClient | Client, response: httpx.Response
92
+ ) -> Response[AuditEventPage | ErrorResponse]:
93
+ return Response(
94
+ status_code=HTTPStatus(response.status_code),
95
+ content=response.content,
96
+ headers=response.headers,
97
+ parsed=_parse_response(client=client, response=response),
98
+ )
99
+
100
+
101
+ def sync_detailed(
102
+ *,
103
+ client: AuthenticatedClient,
104
+ person: None | str | Unset = UNSET,
105
+ action: None | str | Unset = UNSET,
106
+ since: datetime.datetime | None | Unset = UNSET,
107
+ until: datetime.datetime | None | Unset = UNSET,
108
+ limit: int | Unset = 50,
109
+ cursor: None | str | Unset = UNSET,
110
+ ) -> Response[AuditEventPage | ErrorResponse]:
111
+ """List Audit Events
112
+
113
+ Who changed what in this project, newest first (project owners' keys only)
114
+
115
+ Args:
116
+ person (None | str | Unset): Only this user id's actions
117
+ action (None | str | Unset): An action ("server.create") or a resource ("server")
118
+ since (datetime.datetime | None | Unset): RFC 3339, inclusive
119
+ until (datetime.datetime | None | Unset): RFC 3339, exclusive
120
+ limit (int | Unset): Default: 50.
121
+ cursor (None | str | Unset):
122
+
123
+ Raises:
124
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
125
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
126
+
127
+ Returns:
128
+ Response[AuditEventPage | ErrorResponse]
129
+ """
130
+
131
+ kwargs = _get_kwargs(
132
+ person=person,
133
+ action=action,
134
+ since=since,
135
+ until=until,
136
+ limit=limit,
137
+ cursor=cursor,
138
+ )
139
+
140
+ response = client.get_httpx_client().request(
141
+ **kwargs,
142
+ )
143
+
144
+ return _build_response(client=client, response=response)
145
+
146
+
147
+ def sync(
148
+ *,
149
+ client: AuthenticatedClient,
150
+ person: None | str | Unset = UNSET,
151
+ action: None | str | Unset = UNSET,
152
+ since: datetime.datetime | None | Unset = UNSET,
153
+ until: datetime.datetime | None | Unset = UNSET,
154
+ limit: int | Unset = 50,
155
+ cursor: None | str | Unset = UNSET,
156
+ ) -> AuditEventPage | ErrorResponse | None:
157
+ """List Audit Events
158
+
159
+ Who changed what in this project, newest first (project owners' keys only)
160
+
161
+ Args:
162
+ person (None | str | Unset): Only this user id's actions
163
+ action (None | str | Unset): An action ("server.create") or a resource ("server")
164
+ since (datetime.datetime | None | Unset): RFC 3339, inclusive
165
+ until (datetime.datetime | None | Unset): RFC 3339, exclusive
166
+ limit (int | Unset): Default: 50.
167
+ cursor (None | str | Unset):
168
+
169
+ Raises:
170
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
171
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
172
+
173
+ Returns:
174
+ AuditEventPage | ErrorResponse
175
+ """
176
+
177
+ return sync_detailed(
178
+ client=client,
179
+ person=person,
180
+ action=action,
181
+ since=since,
182
+ until=until,
183
+ limit=limit,
184
+ cursor=cursor,
185
+ ).parsed
186
+
187
+
188
+ async def asyncio_detailed(
189
+ *,
190
+ client: AuthenticatedClient,
191
+ person: None | str | Unset = UNSET,
192
+ action: None | str | Unset = UNSET,
193
+ since: datetime.datetime | None | Unset = UNSET,
194
+ until: datetime.datetime | None | Unset = UNSET,
195
+ limit: int | Unset = 50,
196
+ cursor: None | str | Unset = UNSET,
197
+ ) -> Response[AuditEventPage | ErrorResponse]:
198
+ """List Audit Events
199
+
200
+ Who changed what in this project, newest first (project owners' keys only)
201
+
202
+ Args:
203
+ person (None | str | Unset): Only this user id's actions
204
+ action (None | str | Unset): An action ("server.create") or a resource ("server")
205
+ since (datetime.datetime | None | Unset): RFC 3339, inclusive
206
+ until (datetime.datetime | None | Unset): RFC 3339, exclusive
207
+ limit (int | Unset): Default: 50.
208
+ cursor (None | str | Unset):
209
+
210
+ Raises:
211
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
212
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
213
+
214
+ Returns:
215
+ Response[AuditEventPage | ErrorResponse]
216
+ """
217
+
218
+ kwargs = _get_kwargs(
219
+ person=person,
220
+ action=action,
221
+ since=since,
222
+ until=until,
223
+ limit=limit,
224
+ cursor=cursor,
225
+ )
226
+
227
+ response = await client.get_async_httpx_client().request(**kwargs)
228
+
229
+ return _build_response(client=client, response=response)
230
+
231
+
232
+ async def asyncio(
233
+ *,
234
+ client: AuthenticatedClient,
235
+ person: None | str | Unset = UNSET,
236
+ action: None | str | Unset = UNSET,
237
+ since: datetime.datetime | None | Unset = UNSET,
238
+ until: datetime.datetime | None | Unset = UNSET,
239
+ limit: int | Unset = 50,
240
+ cursor: None | str | Unset = UNSET,
241
+ ) -> AuditEventPage | ErrorResponse | None:
242
+ """List Audit Events
243
+
244
+ Who changed what in this project, newest first (project owners' keys only)
245
+
246
+ Args:
247
+ person (None | str | Unset): Only this user id's actions
248
+ action (None | str | Unset): An action ("server.create") or a resource ("server")
249
+ since (datetime.datetime | None | Unset): RFC 3339, inclusive
250
+ until (datetime.datetime | None | Unset): RFC 3339, exclusive
251
+ limit (int | Unset): Default: 50.
252
+ cursor (None | str | Unset):
253
+
254
+ Raises:
255
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
256
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
257
+
258
+ Returns:
259
+ AuditEventPage | ErrorResponse
260
+ """
261
+
262
+ return (
263
+ await asyncio_detailed(
264
+ client=client,
265
+ person=person,
266
+ action=action,
267
+ since=since,
268
+ until=until,
269
+ limit=limit,
270
+ cursor=cursor,
271
+ )
272
+ ).parsed
@@ -0,0 +1 @@
1
+ """Contains endpoint functions for accessing the API"""
@@ -0,0 +1,187 @@
1
+ from http import HTTPStatus
2
+ from typing import Any
3
+
4
+ import httpx
5
+
6
+ from ...client import AuthenticatedClient, Client
7
+ from ...models.error_response import ErrorResponse
8
+ from ...models.image_list import ImageList
9
+ from ...types import UNSET, Response, Unset
10
+
11
+
12
+ def _get_kwargs(
13
+ *,
14
+ limit: int | Unset = 50,
15
+ cursor: None | str | Unset = UNSET,
16
+ ) -> dict[str, Any]:
17
+
18
+ params: dict[str, Any] = {}
19
+
20
+ params["limit"] = limit
21
+
22
+ json_cursor: None | str | Unset
23
+ if isinstance(cursor, Unset):
24
+ json_cursor = UNSET
25
+ else:
26
+ json_cursor = cursor
27
+ params["cursor"] = json_cursor
28
+
29
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
30
+
31
+ _kwargs: dict[str, Any] = {
32
+ "method": "get",
33
+ "url": "/images",
34
+ "params": params,
35
+ }
36
+
37
+ return _kwargs
38
+
39
+
40
+ def _parse_response(
41
+ *, client: AuthenticatedClient | Client, response: httpx.Response
42
+ ) -> ErrorResponse | ImageList:
43
+ if response.status_code == 200:
44
+ response_200 = ImageList.from_dict(response.json())
45
+
46
+ return response_200
47
+
48
+ response_default = ErrorResponse.from_dict(response.json())
49
+
50
+ return response_default
51
+
52
+
53
+ def _build_response(
54
+ *, client: AuthenticatedClient | Client, response: httpx.Response
55
+ ) -> Response[ErrorResponse | ImageList]:
56
+ return Response(
57
+ status_code=HTTPStatus(response.status_code),
58
+ content=response.content,
59
+ headers=response.headers,
60
+ parsed=_parse_response(client=client, response=response),
61
+ )
62
+
63
+
64
+ def sync_detailed(
65
+ *,
66
+ client: AuthenticatedClient,
67
+ limit: int | Unset = 50,
68
+ cursor: None | str | Unset = UNSET,
69
+ ) -> Response[ErrorResponse | ImageList]:
70
+ """List Images
71
+
72
+ Images this project can launch from: public ones and its own, by name
73
+
74
+ Args:
75
+ limit (int | Unset): Items per page Default: 50.
76
+ cursor (None | str | Unset): next_cursor from the previous page
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
+ Response[ErrorResponse | ImageList]
84
+ """
85
+
86
+ kwargs = _get_kwargs(
87
+ limit=limit,
88
+ cursor=cursor,
89
+ )
90
+
91
+ response = client.get_httpx_client().request(
92
+ **kwargs,
93
+ )
94
+
95
+ return _build_response(client=client, response=response)
96
+
97
+
98
+ def sync(
99
+ *,
100
+ client: AuthenticatedClient,
101
+ limit: int | Unset = 50,
102
+ cursor: None | str | Unset = UNSET,
103
+ ) -> ErrorResponse | ImageList | None:
104
+ """List Images
105
+
106
+ Images this project can launch from: public ones and its own, by name
107
+
108
+ Args:
109
+ limit (int | Unset): Items per page Default: 50.
110
+ cursor (None | str | Unset): next_cursor from the previous page
111
+
112
+ Raises:
113
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
114
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
115
+
116
+ Returns:
117
+ ErrorResponse | ImageList
118
+ """
119
+
120
+ return sync_detailed(
121
+ client=client,
122
+ limit=limit,
123
+ cursor=cursor,
124
+ ).parsed
125
+
126
+
127
+ async def asyncio_detailed(
128
+ *,
129
+ client: AuthenticatedClient,
130
+ limit: int | Unset = 50,
131
+ cursor: None | str | Unset = UNSET,
132
+ ) -> Response[ErrorResponse | ImageList]:
133
+ """List Images
134
+
135
+ Images this project can launch from: public ones and its own, by name
136
+
137
+ Args:
138
+ limit (int | Unset): Items per page Default: 50.
139
+ cursor (None | str | Unset): next_cursor from the previous page
140
+
141
+ Raises:
142
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
143
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
144
+
145
+ Returns:
146
+ Response[ErrorResponse | ImageList]
147
+ """
148
+
149
+ kwargs = _get_kwargs(
150
+ limit=limit,
151
+ cursor=cursor,
152
+ )
153
+
154
+ response = await client.get_async_httpx_client().request(**kwargs)
155
+
156
+ return _build_response(client=client, response=response)
157
+
158
+
159
+ async def asyncio(
160
+ *,
161
+ client: AuthenticatedClient,
162
+ limit: int | Unset = 50,
163
+ cursor: None | str | Unset = UNSET,
164
+ ) -> ErrorResponse | ImageList | None:
165
+ """List Images
166
+
167
+ Images this project can launch from: public ones and its own, by name
168
+
169
+ Args:
170
+ limit (int | Unset): Items per page Default: 50.
171
+ cursor (None | str | Unset): next_cursor from the previous page
172
+
173
+ Raises:
174
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
175
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
176
+
177
+ Returns:
178
+ ErrorResponse | ImageList
179
+ """
180
+
181
+ return (
182
+ await asyncio_detailed(
183
+ client=client,
184
+ limit=limit,
185
+ cursor=cursor,
186
+ )
187
+ ).parsed
@@ -0,0 +1,187 @@
1
+ from http import HTTPStatus
2
+ from typing import Any
3
+
4
+ import httpx
5
+
6
+ from ...client import AuthenticatedClient, Client
7
+ from ...models.error_response import ErrorResponse
8
+ from ...models.server_type_list import ServerTypeList
9
+ from ...types import UNSET, Response, Unset
10
+
11
+
12
+ def _get_kwargs(
13
+ *,
14
+ limit: int | Unset = 50,
15
+ cursor: None | str | Unset = UNSET,
16
+ ) -> dict[str, Any]:
17
+
18
+ params: dict[str, Any] = {}
19
+
20
+ params["limit"] = limit
21
+
22
+ json_cursor: None | str | Unset
23
+ if isinstance(cursor, Unset):
24
+ json_cursor = UNSET
25
+ else:
26
+ json_cursor = cursor
27
+ params["cursor"] = json_cursor
28
+
29
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
30
+
31
+ _kwargs: dict[str, Any] = {
32
+ "method": "get",
33
+ "url": "/server-types",
34
+ "params": params,
35
+ }
36
+
37
+ return _kwargs
38
+
39
+
40
+ def _parse_response(
41
+ *, client: AuthenticatedClient | Client, response: httpx.Response
42
+ ) -> ErrorResponse | ServerTypeList:
43
+ if response.status_code == 200:
44
+ response_200 = ServerTypeList.from_dict(response.json())
45
+
46
+ return response_200
47
+
48
+ response_default = ErrorResponse.from_dict(response.json())
49
+
50
+ return response_default
51
+
52
+
53
+ def _build_response(
54
+ *, client: AuthenticatedClient | Client, response: httpx.Response
55
+ ) -> Response[ErrorResponse | ServerTypeList]:
56
+ return Response(
57
+ status_code=HTTPStatus(response.status_code),
58
+ content=response.content,
59
+ headers=response.headers,
60
+ parsed=_parse_response(client=client, response=response),
61
+ )
62
+
63
+
64
+ def sync_detailed(
65
+ *,
66
+ client: AuthenticatedClient,
67
+ limit: int | Unset = 50,
68
+ cursor: None | str | Unset = UNSET,
69
+ ) -> Response[ErrorResponse | ServerTypeList]:
70
+ """List Server Types
71
+
72
+ Server types this project can launch, by name
73
+
74
+ Args:
75
+ limit (int | Unset): Items per page Default: 50.
76
+ cursor (None | str | Unset): next_cursor from the previous page
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
+ Response[ErrorResponse | ServerTypeList]
84
+ """
85
+
86
+ kwargs = _get_kwargs(
87
+ limit=limit,
88
+ cursor=cursor,
89
+ )
90
+
91
+ response = client.get_httpx_client().request(
92
+ **kwargs,
93
+ )
94
+
95
+ return _build_response(client=client, response=response)
96
+
97
+
98
+ def sync(
99
+ *,
100
+ client: AuthenticatedClient,
101
+ limit: int | Unset = 50,
102
+ cursor: None | str | Unset = UNSET,
103
+ ) -> ErrorResponse | ServerTypeList | None:
104
+ """List Server Types
105
+
106
+ Server types this project can launch, by name
107
+
108
+ Args:
109
+ limit (int | Unset): Items per page Default: 50.
110
+ cursor (None | str | Unset): next_cursor from the previous page
111
+
112
+ Raises:
113
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
114
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
115
+
116
+ Returns:
117
+ ErrorResponse | ServerTypeList
118
+ """
119
+
120
+ return sync_detailed(
121
+ client=client,
122
+ limit=limit,
123
+ cursor=cursor,
124
+ ).parsed
125
+
126
+
127
+ async def asyncio_detailed(
128
+ *,
129
+ client: AuthenticatedClient,
130
+ limit: int | Unset = 50,
131
+ cursor: None | str | Unset = UNSET,
132
+ ) -> Response[ErrorResponse | ServerTypeList]:
133
+ """List Server Types
134
+
135
+ Server types this project can launch, by name
136
+
137
+ Args:
138
+ limit (int | Unset): Items per page Default: 50.
139
+ cursor (None | str | Unset): next_cursor from the previous page
140
+
141
+ Raises:
142
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
143
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
144
+
145
+ Returns:
146
+ Response[ErrorResponse | ServerTypeList]
147
+ """
148
+
149
+ kwargs = _get_kwargs(
150
+ limit=limit,
151
+ cursor=cursor,
152
+ )
153
+
154
+ response = await client.get_async_httpx_client().request(**kwargs)
155
+
156
+ return _build_response(client=client, response=response)
157
+
158
+
159
+ async def asyncio(
160
+ *,
161
+ client: AuthenticatedClient,
162
+ limit: int | Unset = 50,
163
+ cursor: None | str | Unset = UNSET,
164
+ ) -> ErrorResponse | ServerTypeList | None:
165
+ """List Server Types
166
+
167
+ Server types this project can launch, by name
168
+
169
+ Args:
170
+ limit (int | Unset): Items per page Default: 50.
171
+ cursor (None | str | Unset): next_cursor from the previous page
172
+
173
+ Raises:
174
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
175
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
176
+
177
+ Returns:
178
+ ErrorResponse | ServerTypeList
179
+ """
180
+
181
+ return (
182
+ await asyncio_detailed(
183
+ client=client,
184
+ limit=limit,
185
+ cursor=cursor,
186
+ )
187
+ ).parsed
@@ -0,0 +1 @@
1
+ """Contains endpoint functions for accessing the API"""