groundx 2.3.3__tar.gz → 2.3.5__tar.gz

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 (99) hide show
  1. {groundx-2.3.3 → groundx-2.3.5}/PKG-INFO +1 -1
  2. {groundx-2.3.3 → groundx-2.3.5}/pyproject.toml +24 -4
  3. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/__init__.py +2 -0
  4. {groundx-2.3.3/src/groundx/documents → groundx-2.3.5/src/groundx/buckets}/__init__.py +2 -0
  5. groundx-2.3.5/src/groundx/buckets/client.py +422 -0
  6. groundx-2.3.3/src/groundx/buckets/client.py → groundx-2.3.5/src/groundx/buckets/raw_client.py +122 -235
  7. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/client.py +15 -17
  8. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/core/__init__.py +5 -0
  9. groundx-2.3.5/src/groundx/core/api_error.py +23 -0
  10. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/core/client_wrapper.py +4 -3
  11. groundx-2.3.5/src/groundx/core/force_multipart.py +16 -0
  12. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/core/http_client.py +70 -26
  13. groundx-2.3.5/src/groundx/core/http_response.py +55 -0
  14. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/core/jsonable_encoder.py +0 -1
  15. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/core/pydantic_utilities.py +69 -110
  16. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/core/serialization.py +7 -3
  17. {groundx-2.3.3/src/groundx/buckets → groundx-2.3.5/src/groundx/customer}/__init__.py +2 -0
  18. groundx-2.3.5/src/groundx/customer/client.py +100 -0
  19. groundx-2.3.3/src/groundx/customer/client.py → groundx-2.3.5/src/groundx/customer/raw_client.py +22 -43
  20. {groundx-2.3.3/src/groundx/groups → groundx-2.3.5/src/groundx/documents}/__init__.py +2 -0
  21. groundx-2.3.5/src/groundx/documents/client.py +1007 -0
  22. groundx-2.3.3/src/groundx/documents/client.py → groundx-2.3.5/src/groundx/documents/raw_client.py +240 -523
  23. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/errors/__init__.py +2 -0
  24. groundx-2.3.5/src/groundx/errors/bad_request_error.py +10 -0
  25. groundx-2.3.5/src/groundx/errors/unauthorized_error.py +10 -0
  26. {groundx-2.3.3/src/groundx/customer → groundx-2.3.5/src/groundx/groups}/__init__.py +2 -0
  27. groundx-2.3.5/src/groundx/groups/client.py +605 -0
  28. groundx-2.3.3/src/groundx/groups/client.py → groundx-2.3.5/src/groundx/groups/raw_client.py +166 -335
  29. groundx-2.3.5/src/groundx/health/__init__.py +4 -0
  30. groundx-2.3.5/src/groundx/health/client.py +170 -0
  31. groundx-2.3.3/src/groundx/health/client.py → groundx-2.3.5/src/groundx/health/raw_client.py +44 -87
  32. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/search/__init__.py +2 -0
  33. groundx-2.3.5/src/groundx/search/client.py +348 -0
  34. groundx-2.3.3/src/groundx/search/client.py → groundx-2.3.5/src/groundx/search/raw_client.py +58 -113
  35. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/search/types/__init__.py +2 -0
  36. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/__init__.py +2 -0
  37. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/bounding_box_detail.py +4 -4
  38. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/bucket_detail.py +5 -5
  39. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/bucket_list_response.py +3 -3
  40. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/bucket_response.py +3 -3
  41. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/bucket_update_detail.py +4 -4
  42. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/bucket_update_response.py +3 -3
  43. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/customer_detail.py +2 -2
  44. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/customer_response.py +3 -3
  45. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/document.py +4 -4
  46. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/document_detail.py +4 -4
  47. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/document_list_response.py +4 -4
  48. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/document_local_ingest_request.py +1 -0
  49. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/document_lookup_response.py +3 -3
  50. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/document_response.py +3 -3
  51. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/group_detail.py +4 -4
  52. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/group_list_response.py +3 -3
  53. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/group_response.py +3 -3
  54. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/health_response.py +3 -3
  55. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/health_response_health.py +3 -3
  56. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/health_service.py +5 -5
  57. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/ingest_local_document.py +3 -3
  58. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/ingest_local_document_metadata.py +4 -4
  59. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/ingest_remote_document.py +4 -4
  60. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/ingest_response.py +3 -3
  61. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/ingest_status.py +3 -3
  62. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/ingest_status_light.py +3 -3
  63. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/ingest_status_progress.py +3 -3
  64. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/ingest_status_progress_cancelled.py +3 -3
  65. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/ingest_status_progress_complete.py +3 -3
  66. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/ingest_status_progress_errors.py +3 -3
  67. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/ingest_status_progress_processing.py +3 -3
  68. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/message_response.py +2 -2
  69. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/meter_detail.py +2 -2
  70. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/processes_status_response.py +3 -3
  71. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/search_response.py +3 -3
  72. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/search_response_search.py +3 -3
  73. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/search_result_item.py +5 -5
  74. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/subscription_detail.py +3 -3
  75. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/subscription_detail_meters.py +5 -5
  76. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/website_source.py +4 -4
  77. groundx-2.3.3/src/groundx/core/api_error.py +0 -15
  78. groundx-2.3.3/src/groundx/errors/bad_request_error.py +0 -9
  79. groundx-2.3.3/src/groundx/errors/unauthorized_error.py +0 -9
  80. groundx-2.3.3/src/groundx/health/__init__.py +0 -2
  81. {groundx-2.3.3 → groundx-2.3.5}/LICENSE +0 -0
  82. {groundx-2.3.3 → groundx-2.3.5}/README.md +0 -0
  83. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/core/datetime_utils.py +0 -0
  84. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/core/file.py +0 -0
  85. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/core/query_encoder.py +0 -0
  86. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/core/remove_none_from_dict.py +0 -0
  87. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/core/request_options.py +0 -0
  88. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/csv_splitter.py +0 -0
  89. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/environment.py +0 -0
  90. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/ingest.py +0 -0
  91. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/py.typed +0 -0
  92. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/search/types/search_content_request_id.py +0 -0
  93. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/document_type.py +0 -0
  94. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/health_service_status.py +0 -0
  95. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/process_level.py +0 -0
  96. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/processing_status.py +0 -0
  97. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/sort.py +0 -0
  98. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/types/sort_order.py +0 -0
  99. {groundx-2.3.3 → groundx-2.3.5}/src/groundx/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: groundx
3
- Version: 2.3.3
3
+ Version: 2.3.5
4
4
  Summary:
5
5
  License: MIT
6
6
  Requires-Python: >=3.8,<4.0
@@ -3,7 +3,7 @@ name = "groundx"
3
3
 
4
4
  [tool.poetry]
5
5
  name = "groundx"
6
- version = "2.3.3"
6
+ version = "2.3.5"
7
7
  description = ""
8
8
  readme = "README.md"
9
9
  authors = []
@@ -45,13 +45,13 @@ tqdm = ">=4.60.0"
45
45
  types-tqdm = ">=4.60.0"
46
46
  typing_extensions = ">= 4.0.0"
47
47
 
48
- [tool.poetry.dev-dependencies]
49
- mypy = "1.0.1"
48
+ [tool.poetry.group.dev.dependencies]
49
+ mypy = "==1.13.0"
50
50
  pytest = "^7.4.0"
51
51
  pytest-asyncio = "^0.23.5"
52
52
  python-dateutil = "^2.9.0"
53
53
  types-python-dateutil = "^2.9.0.20240316"
54
- ruff = "^0.5.6"
54
+ ruff = "==0.11.5"
55
55
  types-requests = ">=2.0.0"
56
56
 
57
57
  [tool.pytest.ini_options]
@@ -64,6 +64,26 @@ plugins = ["pydantic.mypy"]
64
64
  [tool.ruff]
65
65
  line-length = 120
66
66
 
67
+ [tool.ruff.lint]
68
+ select = [
69
+ "E", # pycodestyle errors
70
+ "F", # pyflakes
71
+ "I", # isort
72
+ ]
73
+ ignore = [
74
+ "E402", # Module level import not at top of file
75
+ "E501", # Line too long
76
+ "E711", # Comparison to `None` should be `cond is not None`
77
+ "E712", # Avoid equality comparisons to `True`; use `if ...:` checks
78
+ "E721", # Use `is` and `is not` for type comparisons, or `isinstance()` for insinstance checks
79
+ "E722", # Do not use bare `except`
80
+ "E731", # Do not assign a `lambda` expression, use a `def`
81
+ "F821", # Undefined name
82
+ "F841" # Local variable ... is assigned to but never used
83
+ ]
84
+
85
+ [tool.ruff.lint.isort]
86
+ section-order = ["future", "standard-library", "third-party", "first-party"]
67
87
 
68
88
  [build-system]
69
89
  requires = ["poetry-core"]
@@ -1,5 +1,7 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ # isort: skip_file
4
+
3
5
  from .types import (
4
6
  BoundingBoxDetail,
5
7
  BucketDetail,
@@ -1,2 +1,4 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ # isort: skip_file
4
+
@@ -0,0 +1,422 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
6
+ from ..core.request_options import RequestOptions
7
+ from ..types.bucket_list_response import BucketListResponse
8
+ from ..types.bucket_response import BucketResponse
9
+ from ..types.bucket_update_response import BucketUpdateResponse
10
+ from ..types.message_response import MessageResponse
11
+ from .raw_client import AsyncRawBucketsClient, RawBucketsClient
12
+
13
+ # this is used as the default value for optional parameters
14
+ OMIT = typing.cast(typing.Any, ...)
15
+
16
+
17
+ class BucketsClient:
18
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
19
+ self._raw_client = RawBucketsClient(client_wrapper=client_wrapper)
20
+
21
+ @property
22
+ def with_raw_response(self) -> RawBucketsClient:
23
+ """
24
+ Retrieves a raw implementation of this client that returns raw responses.
25
+
26
+ Returns
27
+ -------
28
+ RawBucketsClient
29
+ """
30
+ return self._raw_client
31
+
32
+ def list(
33
+ self,
34
+ *,
35
+ n: typing.Optional[int] = None,
36
+ next_token: typing.Optional[str] = None,
37
+ request_options: typing.Optional[RequestOptions] = None,
38
+ ) -> BucketListResponse:
39
+ """
40
+ List all buckets within your GroundX account
41
+
42
+ Parameters
43
+ ----------
44
+ n : typing.Optional[int]
45
+ The maximum number of returned buckets. Accepts 1-100 with a default of 20.
46
+
47
+ next_token : typing.Optional[str]
48
+ A token for pagination. If the number of buckets for a given query is larger than n, the response will include a "nextToken" value. That token can be included in this field to retrieve the next batch of n buckets.
49
+
50
+ request_options : typing.Optional[RequestOptions]
51
+ Request-specific configuration.
52
+
53
+ Returns
54
+ -------
55
+ BucketListResponse
56
+ Look up success
57
+
58
+ Examples
59
+ --------
60
+ from groundx import GroundX
61
+
62
+ client = GroundX(
63
+ api_key="YOUR_API_KEY",
64
+ )
65
+ client.buckets.list()
66
+ """
67
+ _response = self._raw_client.list(n=n, next_token=next_token, request_options=request_options)
68
+ return _response.data
69
+
70
+ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] = None) -> BucketResponse:
71
+ """
72
+ Create a new bucket.
73
+
74
+ Parameters
75
+ ----------
76
+ name : str
77
+
78
+ request_options : typing.Optional[RequestOptions]
79
+ Request-specific configuration.
80
+
81
+ Returns
82
+ -------
83
+ BucketResponse
84
+ Bucket successfully created
85
+
86
+ Examples
87
+ --------
88
+ from groundx import GroundX
89
+
90
+ client = GroundX(
91
+ api_key="YOUR_API_KEY",
92
+ )
93
+ client.buckets.create(
94
+ name="your_bucket_name",
95
+ )
96
+ """
97
+ _response = self._raw_client.create(name=name, request_options=request_options)
98
+ return _response.data
99
+
100
+ def get(self, bucket_id: int, *, request_options: typing.Optional[RequestOptions] = None) -> BucketResponse:
101
+ """
102
+ Look up a specific bucket by its bucketId.
103
+
104
+ Parameters
105
+ ----------
106
+ bucket_id : int
107
+ The bucketId of the bucket to look up.
108
+
109
+ request_options : typing.Optional[RequestOptions]
110
+ Request-specific configuration.
111
+
112
+ Returns
113
+ -------
114
+ BucketResponse
115
+ Look up success
116
+
117
+ Examples
118
+ --------
119
+ from groundx import GroundX
120
+
121
+ client = GroundX(
122
+ api_key="YOUR_API_KEY",
123
+ )
124
+ client.buckets.get(
125
+ bucket_id=1,
126
+ )
127
+ """
128
+ _response = self._raw_client.get(bucket_id, request_options=request_options)
129
+ return _response.data
130
+
131
+ def update(
132
+ self, bucket_id: int, *, new_name: str, request_options: typing.Optional[RequestOptions] = None
133
+ ) -> BucketUpdateResponse:
134
+ """
135
+ Rename a bucket.
136
+
137
+ Parameters
138
+ ----------
139
+ bucket_id : int
140
+ The bucketId of the bucket being updated.
141
+
142
+ new_name : str
143
+ The new name of the bucket being renamed.
144
+
145
+ request_options : typing.Optional[RequestOptions]
146
+ Request-specific configuration.
147
+
148
+ Returns
149
+ -------
150
+ BucketUpdateResponse
151
+ Bucket successfully updated
152
+
153
+ Examples
154
+ --------
155
+ from groundx import GroundX
156
+
157
+ client = GroundX(
158
+ api_key="YOUR_API_KEY",
159
+ )
160
+ client.buckets.update(
161
+ bucket_id=1,
162
+ new_name="your_bucket_name",
163
+ )
164
+ """
165
+ _response = self._raw_client.update(bucket_id, new_name=new_name, request_options=request_options)
166
+ return _response.data
167
+
168
+ def delete(self, bucket_id: int, *, request_options: typing.Optional[RequestOptions] = None) -> MessageResponse:
169
+ """
170
+ Delete a bucket.
171
+
172
+ Parameters
173
+ ----------
174
+ bucket_id : int
175
+ The bucketId of the bucket being deleted.
176
+
177
+ request_options : typing.Optional[RequestOptions]
178
+ Request-specific configuration.
179
+
180
+ Returns
181
+ -------
182
+ MessageResponse
183
+ Bucket successfully deleted
184
+
185
+ Examples
186
+ --------
187
+ from groundx import GroundX
188
+
189
+ client = GroundX(
190
+ api_key="YOUR_API_KEY",
191
+ )
192
+ client.buckets.delete(
193
+ bucket_id=1,
194
+ )
195
+ """
196
+ _response = self._raw_client.delete(bucket_id, request_options=request_options)
197
+ return _response.data
198
+
199
+
200
+ class AsyncBucketsClient:
201
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
202
+ self._raw_client = AsyncRawBucketsClient(client_wrapper=client_wrapper)
203
+
204
+ @property
205
+ def with_raw_response(self) -> AsyncRawBucketsClient:
206
+ """
207
+ Retrieves a raw implementation of this client that returns raw responses.
208
+
209
+ Returns
210
+ -------
211
+ AsyncRawBucketsClient
212
+ """
213
+ return self._raw_client
214
+
215
+ async def list(
216
+ self,
217
+ *,
218
+ n: typing.Optional[int] = None,
219
+ next_token: typing.Optional[str] = None,
220
+ request_options: typing.Optional[RequestOptions] = None,
221
+ ) -> BucketListResponse:
222
+ """
223
+ List all buckets within your GroundX account
224
+
225
+ Parameters
226
+ ----------
227
+ n : typing.Optional[int]
228
+ The maximum number of returned buckets. Accepts 1-100 with a default of 20.
229
+
230
+ next_token : typing.Optional[str]
231
+ A token for pagination. If the number of buckets for a given query is larger than n, the response will include a "nextToken" value. That token can be included in this field to retrieve the next batch of n buckets.
232
+
233
+ request_options : typing.Optional[RequestOptions]
234
+ Request-specific configuration.
235
+
236
+ Returns
237
+ -------
238
+ BucketListResponse
239
+ Look up success
240
+
241
+ Examples
242
+ --------
243
+ import asyncio
244
+
245
+ from groundx import AsyncGroundX
246
+
247
+ client = AsyncGroundX(
248
+ api_key="YOUR_API_KEY",
249
+ )
250
+
251
+
252
+ async def main() -> None:
253
+ await client.buckets.list()
254
+
255
+
256
+ asyncio.run(main())
257
+ """
258
+ _response = await self._raw_client.list(n=n, next_token=next_token, request_options=request_options)
259
+ return _response.data
260
+
261
+ async def create(self, *, name: str, request_options: typing.Optional[RequestOptions] = None) -> BucketResponse:
262
+ """
263
+ Create a new bucket.
264
+
265
+ Parameters
266
+ ----------
267
+ name : str
268
+
269
+ request_options : typing.Optional[RequestOptions]
270
+ Request-specific configuration.
271
+
272
+ Returns
273
+ -------
274
+ BucketResponse
275
+ Bucket successfully created
276
+
277
+ Examples
278
+ --------
279
+ import asyncio
280
+
281
+ from groundx import AsyncGroundX
282
+
283
+ client = AsyncGroundX(
284
+ api_key="YOUR_API_KEY",
285
+ )
286
+
287
+
288
+ async def main() -> None:
289
+ await client.buckets.create(
290
+ name="your_bucket_name",
291
+ )
292
+
293
+
294
+ asyncio.run(main())
295
+ """
296
+ _response = await self._raw_client.create(name=name, request_options=request_options)
297
+ return _response.data
298
+
299
+ async def get(self, bucket_id: int, *, request_options: typing.Optional[RequestOptions] = None) -> BucketResponse:
300
+ """
301
+ Look up a specific bucket by its bucketId.
302
+
303
+ Parameters
304
+ ----------
305
+ bucket_id : int
306
+ The bucketId of the bucket to look up.
307
+
308
+ request_options : typing.Optional[RequestOptions]
309
+ Request-specific configuration.
310
+
311
+ Returns
312
+ -------
313
+ BucketResponse
314
+ Look up success
315
+
316
+ Examples
317
+ --------
318
+ import asyncio
319
+
320
+ from groundx import AsyncGroundX
321
+
322
+ client = AsyncGroundX(
323
+ api_key="YOUR_API_KEY",
324
+ )
325
+
326
+
327
+ async def main() -> None:
328
+ await client.buckets.get(
329
+ bucket_id=1,
330
+ )
331
+
332
+
333
+ asyncio.run(main())
334
+ """
335
+ _response = await self._raw_client.get(bucket_id, request_options=request_options)
336
+ return _response.data
337
+
338
+ async def update(
339
+ self, bucket_id: int, *, new_name: str, request_options: typing.Optional[RequestOptions] = None
340
+ ) -> BucketUpdateResponse:
341
+ """
342
+ Rename a bucket.
343
+
344
+ Parameters
345
+ ----------
346
+ bucket_id : int
347
+ The bucketId of the bucket being updated.
348
+
349
+ new_name : str
350
+ The new name of the bucket being renamed.
351
+
352
+ request_options : typing.Optional[RequestOptions]
353
+ Request-specific configuration.
354
+
355
+ Returns
356
+ -------
357
+ BucketUpdateResponse
358
+ Bucket successfully updated
359
+
360
+ Examples
361
+ --------
362
+ import asyncio
363
+
364
+ from groundx import AsyncGroundX
365
+
366
+ client = AsyncGroundX(
367
+ api_key="YOUR_API_KEY",
368
+ )
369
+
370
+
371
+ async def main() -> None:
372
+ await client.buckets.update(
373
+ bucket_id=1,
374
+ new_name="your_bucket_name",
375
+ )
376
+
377
+
378
+ asyncio.run(main())
379
+ """
380
+ _response = await self._raw_client.update(bucket_id, new_name=new_name, request_options=request_options)
381
+ return _response.data
382
+
383
+ async def delete(
384
+ self, bucket_id: int, *, request_options: typing.Optional[RequestOptions] = None
385
+ ) -> MessageResponse:
386
+ """
387
+ Delete a bucket.
388
+
389
+ Parameters
390
+ ----------
391
+ bucket_id : int
392
+ The bucketId of the bucket being deleted.
393
+
394
+ request_options : typing.Optional[RequestOptions]
395
+ Request-specific configuration.
396
+
397
+ Returns
398
+ -------
399
+ MessageResponse
400
+ Bucket successfully deleted
401
+
402
+ Examples
403
+ --------
404
+ import asyncio
405
+
406
+ from groundx import AsyncGroundX
407
+
408
+ client = AsyncGroundX(
409
+ api_key="YOUR_API_KEY",
410
+ )
411
+
412
+
413
+ async def main() -> None:
414
+ await client.buckets.delete(
415
+ bucket_id=1,
416
+ )
417
+
418
+
419
+ asyncio.run(main())
420
+ """
421
+ _response = await self._raw_client.delete(bucket_id, request_options=request_options)
422
+ return _response.data