usecortex-ai 0.2.1__py3-none-any.whl → 0.2.2__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 (64) hide show
  1. usecortex_ai/__init__.py +18 -3
  2. usecortex_ai/client.py +7 -78
  3. usecortex_ai/core/client_wrapper.py +6 -8
  4. usecortex_ai/document/__init__.py +4 -0
  5. usecortex_ai/document/client.py +139 -0
  6. usecortex_ai/document/raw_client.py +312 -0
  7. usecortex_ai/embeddings/client.py +40 -70
  8. usecortex_ai/embeddings/raw_client.py +40 -70
  9. usecortex_ai/fetch/client.py +10 -0
  10. usecortex_ai/fetch/raw_client.py +10 -0
  11. usecortex_ai/search/client.py +74 -80
  12. usecortex_ai/search/raw_client.py +74 -80
  13. usecortex_ai/sources/client.py +28 -83
  14. usecortex_ai/sources/raw_client.py +28 -259
  15. usecortex_ai/tenant/client.py +152 -4
  16. usecortex_ai/tenant/raw_client.py +502 -4
  17. usecortex_ai/types/__init__.py +16 -2
  18. usecortex_ai/types/add_user_memory_response.py +36 -0
  19. usecortex_ai/types/app_sources_upload_data.py +10 -2
  20. usecortex_ai/types/attachment_model.py +34 -7
  21. usecortex_ai/types/batch_upload_data.py +10 -2
  22. usecortex_ai/types/body_scrape_webpage_upload_scrape_webpage_post.py +0 -2
  23. usecortex_ai/types/body_update_scrape_job_upload_update_webpage_patch.py +0 -2
  24. usecortex_ai/types/content_model.py +33 -6
  25. usecortex_ai/types/delete_memory_request.py +14 -3
  26. usecortex_ai/types/delete_sources.py +20 -0
  27. usecortex_ai/types/delete_sub_tenant_data.py +42 -0
  28. usecortex_ai/types/delete_user_memory_response.py +31 -0
  29. usecortex_ai/types/embeddings_create_collection_data.py +19 -4
  30. usecortex_ai/types/embeddings_delete_data.py +19 -4
  31. usecortex_ai/types/embeddings_get_data.py +19 -4
  32. usecortex_ai/types/embeddings_search_data.py +19 -4
  33. usecortex_ai/types/error_response.py +0 -1
  34. usecortex_ai/types/fetch_content_data.py +19 -5
  35. usecortex_ai/types/file_upload_result.py +9 -2
  36. usecortex_ai/types/generate_user_memory_response.py +32 -0
  37. usecortex_ai/types/list_sources_response.py +14 -3
  38. usecortex_ai/types/list_user_memories_response.py +32 -0
  39. usecortex_ai/types/markdown_upload_request.py +18 -5
  40. usecortex_ai/types/processing_status.py +14 -3
  41. usecortex_ai/types/relations.py +9 -2
  42. usecortex_ai/types/retrieve_user_memory_response.py +32 -0
  43. usecortex_ai/types/search_chunk.py +54 -17
  44. usecortex_ai/types/single_upload_data.py +10 -2
  45. usecortex_ai/types/source.py +34 -15
  46. usecortex_ai/types/source_model.py +63 -14
  47. usecortex_ai/types/sub_tenant_ids_data.py +24 -5
  48. usecortex_ai/types/tenant_create_data.py +19 -4
  49. usecortex_ai/types/tenant_stats.py +24 -5
  50. usecortex_ai/types/user_memory.py +31 -0
  51. usecortex_ai/upload/client.py +394 -79
  52. usecortex_ai/upload/raw_client.py +398 -103
  53. usecortex_ai/user/client.py +14 -6
  54. usecortex_ai/user/raw_client.py +14 -6
  55. usecortex_ai/user_memory/client.py +184 -50
  56. usecortex_ai/user_memory/raw_client.py +905 -88
  57. {usecortex_ai-0.2.1.dist-info → usecortex_ai-0.2.2.dist-info}/METADATA +1 -1
  58. usecortex_ai-0.2.2.dist-info/RECORD +100 -0
  59. usecortex_ai/raw_client.py +0 -90
  60. usecortex_ai/types/source_content.py +0 -26
  61. usecortex_ai-0.2.1.dist-info/RECORD +0 -91
  62. {usecortex_ai-0.2.1.dist-info → usecortex_ai-0.2.2.dist-info}/WHEEL +0 -0
  63. {usecortex_ai-0.2.1.dist-info → usecortex_ai-0.2.2.dist-info}/licenses/LICENSE +0 -0
  64. {usecortex_ai-0.2.1.dist-info → usecortex_ai-0.2.2.dist-info}/top_level.txt +0 -0
@@ -17,7 +17,6 @@ from ..errors.unauthorized_error import UnauthorizedError
17
17
  from ..errors.unprocessable_entity_error import UnprocessableEntityError
18
18
  from ..types.actual_error_response import ActualErrorResponse
19
19
  from ..types.list_sources_response import ListSourcesResponse
20
- from ..types.sub_tenant_ids_data import SubTenantIdsData
21
20
 
22
21
  # this is used as the default value for optional parameters
23
22
  OMIT = typing.cast(typing.Any, ...)
@@ -35,11 +34,19 @@ class RawSourcesClient:
35
34
  request_options: typing.Optional[RequestOptions] = None,
36
35
  ) -> HttpResponse[ListSourcesResponse]:
37
36
  """
37
+ Retrieve all sources for a specific tenant.
38
+
39
+ Use this endpoint to fetch a complete list of all sources associated with your tenant. This includes documents, files, and other content you've uploaded for processing.
40
+
41
+ You can optionally specify a sub-tenant to narrow down the results to sources within that specific sub-tenant scope.
42
+
38
43
  Parameters
39
44
  ----------
40
45
  tenant_id : str
46
+ Unique identifier for the tenant/organization
41
47
 
42
48
  sub_tenant_id : typing.Optional[str]
49
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
43
50
 
44
51
  request_options : typing.Optional[RequestOptions]
45
52
  Request-specific configuration.
@@ -158,6 +165,12 @@ class RawSourcesClient:
158
165
  request_options: typing.Optional[RequestOptions] = None,
159
166
  ) -> HttpResponse[ListSourcesResponse]:
160
167
  """
168
+ Retrieve specific sources by their IDs.
169
+
170
+ Use this endpoint to fetch one or more sources by providing their unique identifiers. This is useful when you need detailed information about specific documents or content you've previously uploaded.
171
+
172
+ Provide the source IDs in the request body along with your tenant information to get the exact sources you need.
173
+
161
174
  Parameters
162
175
  ----------
163
176
  tenant_id : str
@@ -277,135 +290,6 @@ class RawSourcesClient:
277
290
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
278
291
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
279
292
 
280
- def get_sub_tenant_ids(
281
- self, *, tenant_id: str, request_options: typing.Optional[RequestOptions] = None
282
- ) -> HttpResponse[SubTenantIdsData]:
283
- """
284
- Get all sub-tenant IDs (tenant IDs) contained within a specific Weaviate collection.
285
- Fetches the tenant IDs directly from Weaviate using default cluster credentials.
286
-
287
- Args:
288
- tenant_id: The tenant ID to fetch sub-tenant IDs for
289
- api_details: Authentication dependency
290
-
291
- Returns:
292
- SubTenantIdsData: Contains collection_name, sub_tenant_ids list, count, and success message
293
-
294
- Example:
295
- GET /list/sub_tenant_ids?tenant_id=my_tenant_123
296
-
297
- Parameters
298
- ----------
299
- tenant_id : str
300
-
301
- request_options : typing.Optional[RequestOptions]
302
- Request-specific configuration.
303
-
304
- Returns
305
- -------
306
- HttpResponse[SubTenantIdsData]
307
- Successful Response
308
- """
309
- _response = self._client_wrapper.httpx_client.request(
310
- "list/sub_tenant_ids",
311
- method="GET",
312
- params={
313
- "tenant_id": tenant_id,
314
- },
315
- request_options=request_options,
316
- )
317
- try:
318
- if 200 <= _response.status_code < 300:
319
- _data = typing.cast(
320
- SubTenantIdsData,
321
- parse_obj_as(
322
- type_=SubTenantIdsData, # type: ignore
323
- object_=_response.json(),
324
- ),
325
- )
326
- return HttpResponse(response=_response, data=_data)
327
- if _response.status_code == 400:
328
- raise BadRequestError(
329
- headers=dict(_response.headers),
330
- body=typing.cast(
331
- ActualErrorResponse,
332
- parse_obj_as(
333
- type_=ActualErrorResponse, # type: ignore
334
- object_=_response.json(),
335
- ),
336
- ),
337
- )
338
- if _response.status_code == 401:
339
- raise UnauthorizedError(
340
- headers=dict(_response.headers),
341
- body=typing.cast(
342
- ActualErrorResponse,
343
- parse_obj_as(
344
- type_=ActualErrorResponse, # type: ignore
345
- object_=_response.json(),
346
- ),
347
- ),
348
- )
349
- if _response.status_code == 403:
350
- raise ForbiddenError(
351
- headers=dict(_response.headers),
352
- body=typing.cast(
353
- ActualErrorResponse,
354
- parse_obj_as(
355
- type_=ActualErrorResponse, # type: ignore
356
- object_=_response.json(),
357
- ),
358
- ),
359
- )
360
- if _response.status_code == 404:
361
- raise NotFoundError(
362
- headers=dict(_response.headers),
363
- body=typing.cast(
364
- ActualErrorResponse,
365
- parse_obj_as(
366
- type_=ActualErrorResponse, # type: ignore
367
- object_=_response.json(),
368
- ),
369
- ),
370
- )
371
- if _response.status_code == 422:
372
- raise UnprocessableEntityError(
373
- headers=dict(_response.headers),
374
- body=typing.cast(
375
- typing.Optional[typing.Any],
376
- parse_obj_as(
377
- type_=typing.Optional[typing.Any], # type: ignore
378
- object_=_response.json(),
379
- ),
380
- ),
381
- )
382
- if _response.status_code == 500:
383
- raise InternalServerError(
384
- headers=dict(_response.headers),
385
- body=typing.cast(
386
- ActualErrorResponse,
387
- parse_obj_as(
388
- type_=ActualErrorResponse, # type: ignore
389
- object_=_response.json(),
390
- ),
391
- ),
392
- )
393
- if _response.status_code == 503:
394
- raise ServiceUnavailableError(
395
- headers=dict(_response.headers),
396
- body=typing.cast(
397
- ActualErrorResponse,
398
- parse_obj_as(
399
- type_=ActualErrorResponse, # type: ignore
400
- object_=_response.json(),
401
- ),
402
- ),
403
- )
404
- _response_json = _response.json()
405
- except JSONDecodeError:
406
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
407
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
408
-
409
293
 
410
294
  class AsyncRawSourcesClient:
411
295
  def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -419,11 +303,19 @@ class AsyncRawSourcesClient:
419
303
  request_options: typing.Optional[RequestOptions] = None,
420
304
  ) -> AsyncHttpResponse[ListSourcesResponse]:
421
305
  """
306
+ Retrieve all sources for a specific tenant.
307
+
308
+ Use this endpoint to fetch a complete list of all sources associated with your tenant. This includes documents, files, and other content you've uploaded for processing.
309
+
310
+ You can optionally specify a sub-tenant to narrow down the results to sources within that specific sub-tenant scope.
311
+
422
312
  Parameters
423
313
  ----------
424
314
  tenant_id : str
315
+ Unique identifier for the tenant/organization
425
316
 
426
317
  sub_tenant_id : typing.Optional[str]
318
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
427
319
 
428
320
  request_options : typing.Optional[RequestOptions]
429
321
  Request-specific configuration.
@@ -542,6 +434,12 @@ class AsyncRawSourcesClient:
542
434
  request_options: typing.Optional[RequestOptions] = None,
543
435
  ) -> AsyncHttpResponse[ListSourcesResponse]:
544
436
  """
437
+ Retrieve specific sources by their IDs.
438
+
439
+ Use this endpoint to fetch one or more sources by providing their unique identifiers. This is useful when you need detailed information about specific documents or content you've previously uploaded.
440
+
441
+ Provide the source IDs in the request body along with your tenant information to get the exact sources you need.
442
+
545
443
  Parameters
546
444
  ----------
547
445
  tenant_id : str
@@ -660,132 +558,3 @@ class AsyncRawSourcesClient:
660
558
  except JSONDecodeError:
661
559
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
662
560
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
663
-
664
- async def get_sub_tenant_ids(
665
- self, *, tenant_id: str, request_options: typing.Optional[RequestOptions] = None
666
- ) -> AsyncHttpResponse[SubTenantIdsData]:
667
- """
668
- Get all sub-tenant IDs (tenant IDs) contained within a specific Weaviate collection.
669
- Fetches the tenant IDs directly from Weaviate using default cluster credentials.
670
-
671
- Args:
672
- tenant_id: The tenant ID to fetch sub-tenant IDs for
673
- api_details: Authentication dependency
674
-
675
- Returns:
676
- SubTenantIdsData: Contains collection_name, sub_tenant_ids list, count, and success message
677
-
678
- Example:
679
- GET /list/sub_tenant_ids?tenant_id=my_tenant_123
680
-
681
- Parameters
682
- ----------
683
- tenant_id : str
684
-
685
- request_options : typing.Optional[RequestOptions]
686
- Request-specific configuration.
687
-
688
- Returns
689
- -------
690
- AsyncHttpResponse[SubTenantIdsData]
691
- Successful Response
692
- """
693
- _response = await self._client_wrapper.httpx_client.request(
694
- "list/sub_tenant_ids",
695
- method="GET",
696
- params={
697
- "tenant_id": tenant_id,
698
- },
699
- request_options=request_options,
700
- )
701
- try:
702
- if 200 <= _response.status_code < 300:
703
- _data = typing.cast(
704
- SubTenantIdsData,
705
- parse_obj_as(
706
- type_=SubTenantIdsData, # type: ignore
707
- object_=_response.json(),
708
- ),
709
- )
710
- return AsyncHttpResponse(response=_response, data=_data)
711
- if _response.status_code == 400:
712
- raise BadRequestError(
713
- headers=dict(_response.headers),
714
- body=typing.cast(
715
- ActualErrorResponse,
716
- parse_obj_as(
717
- type_=ActualErrorResponse, # type: ignore
718
- object_=_response.json(),
719
- ),
720
- ),
721
- )
722
- if _response.status_code == 401:
723
- raise UnauthorizedError(
724
- headers=dict(_response.headers),
725
- body=typing.cast(
726
- ActualErrorResponse,
727
- parse_obj_as(
728
- type_=ActualErrorResponse, # type: ignore
729
- object_=_response.json(),
730
- ),
731
- ),
732
- )
733
- if _response.status_code == 403:
734
- raise ForbiddenError(
735
- headers=dict(_response.headers),
736
- body=typing.cast(
737
- ActualErrorResponse,
738
- parse_obj_as(
739
- type_=ActualErrorResponse, # type: ignore
740
- object_=_response.json(),
741
- ),
742
- ),
743
- )
744
- if _response.status_code == 404:
745
- raise NotFoundError(
746
- headers=dict(_response.headers),
747
- body=typing.cast(
748
- ActualErrorResponse,
749
- parse_obj_as(
750
- type_=ActualErrorResponse, # type: ignore
751
- object_=_response.json(),
752
- ),
753
- ),
754
- )
755
- if _response.status_code == 422:
756
- raise UnprocessableEntityError(
757
- headers=dict(_response.headers),
758
- body=typing.cast(
759
- typing.Optional[typing.Any],
760
- parse_obj_as(
761
- type_=typing.Optional[typing.Any], # type: ignore
762
- object_=_response.json(),
763
- ),
764
- ),
765
- )
766
- if _response.status_code == 500:
767
- raise InternalServerError(
768
- headers=dict(_response.headers),
769
- body=typing.cast(
770
- ActualErrorResponse,
771
- parse_obj_as(
772
- type_=ActualErrorResponse, # type: ignore
773
- object_=_response.json(),
774
- ),
775
- ),
776
- )
777
- if _response.status_code == 503:
778
- raise ServiceUnavailableError(
779
- headers=dict(_response.headers),
780
- body=typing.cast(
781
- ActualErrorResponse,
782
- parse_obj_as(
783
- type_=ActualErrorResponse, # type: ignore
784
- object_=_response.json(),
785
- ),
786
- ),
787
- )
788
- _response_json = _response.json()
789
- except JSONDecodeError:
790
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
791
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
@@ -4,6 +4,8 @@ import typing
4
4
 
5
5
  from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
6
6
  from ..core.request_options import RequestOptions
7
+ from ..types.delete_sub_tenant_data import DeleteSubTenantData
8
+ from ..types.sub_tenant_ids_data import SubTenantIdsData
7
9
  from ..types.tenant_stats import TenantStats
8
10
  from .raw_client import AsyncRawTenantClient, RawTenantClient
9
11
 
@@ -31,15 +33,21 @@ class TenantClient:
31
33
  request_options: typing.Optional[RequestOptions] = None,
32
34
  ) -> TenantStats:
33
35
  """
34
- Get tenant stats.
36
+ Retrieve usage stats for your tenant.
35
37
 
36
- This endpoint returns stats for tenant.
38
+ Use this endpoint to check whether a tenant exists and view core metrics like total indexed objects and vector dimension. This helps you validate setup and monitor ingestion.
39
+
40
+ Expected outcome
41
+ - You receive the current object count and vector dimension for the tenant.
42
+ - If the tenant does not exist, you get a not-found error.
37
43
 
38
44
  Parameters
39
45
  ----------
40
46
  tenant_id : str
47
+ Unique identifier for the tenant/organization
41
48
 
42
49
  sub_tenant_id : typing.Optional[str]
50
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
43
51
 
44
52
  request_options : typing.Optional[RequestOptions]
45
53
  Request-specific configuration.
@@ -61,6 +69,69 @@ class TenantClient:
61
69
  )
62
70
  return _response.data
63
71
 
72
+ def get_sub_tenant_ids(
73
+ self, *, tenant_id: str, request_options: typing.Optional[RequestOptions] = None
74
+ ) -> SubTenantIdsData:
75
+ """
76
+ Retrieve all sub-tenant IDs contained within a specific tenant. Fetches the sub-tenant IDs directly from the underlying data store.
77
+
78
+ Parameters
79
+ ----------
80
+ tenant_id : str
81
+
82
+ request_options : typing.Optional[RequestOptions]
83
+ Request-specific configuration.
84
+
85
+ Returns
86
+ -------
87
+ SubTenantIdsData
88
+ Successful Response
89
+
90
+ Examples
91
+ --------
92
+ from usecortex-ai import CortexAI
93
+
94
+ client = CortexAI(token="YOUR_TOKEN", )
95
+ client.tenant.get_sub_tenant_ids(tenant_id='tenant_id', )
96
+ """
97
+ _response = self._raw_client.get_sub_tenant_ids(tenant_id=tenant_id, request_options=request_options)
98
+ return _response.data
99
+
100
+ def delete_sub_tenant(
101
+ self, *, tenant_id: str, sub_tenant_id: str, request_options: typing.Optional[RequestOptions] = None
102
+ ) -> DeleteSubTenantData:
103
+ """
104
+ Delete a sub-tenant from a given tenant.
105
+
106
+ This endpoint deletes a specific sub-tenant from the specified tenant.
107
+ It validates that the sub-tenant is not the primary/default sub-tenant before deletion.
108
+
109
+ Parameters
110
+ ----------
111
+ tenant_id : str
112
+
113
+ sub_tenant_id : str
114
+
115
+ request_options : typing.Optional[RequestOptions]
116
+ Request-specific configuration.
117
+
118
+ Returns
119
+ -------
120
+ DeleteSubTenantData
121
+ Successful Response
122
+
123
+ Examples
124
+ --------
125
+ from usecortex-ai import CortexAI
126
+
127
+ client = CortexAI(token="YOUR_TOKEN", )
128
+ client.tenant.delete_sub_tenant(tenant_id='tenant_id', sub_tenant_id='sub_tenant_id', )
129
+ """
130
+ _response = self._raw_client.delete_sub_tenant(
131
+ tenant_id=tenant_id, sub_tenant_id=sub_tenant_id, request_options=request_options
132
+ )
133
+ return _response.data
134
+
64
135
 
65
136
  class AsyncTenantClient:
66
137
  def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -85,15 +156,21 @@ class AsyncTenantClient:
85
156
  request_options: typing.Optional[RequestOptions] = None,
86
157
  ) -> TenantStats:
87
158
  """
88
- Get tenant stats.
159
+ Retrieve usage stats for your tenant.
160
+
161
+ Use this endpoint to check whether a tenant exists and view core metrics like total indexed objects and vector dimension. This helps you validate setup and monitor ingestion.
89
162
 
90
- This endpoint returns stats for tenant.
163
+ Expected outcome
164
+ - You receive the current object count and vector dimension for the tenant.
165
+ - If the tenant does not exist, you get a not-found error.
91
166
 
92
167
  Parameters
93
168
  ----------
94
169
  tenant_id : str
170
+ Unique identifier for the tenant/organization
95
171
 
96
172
  sub_tenant_id : typing.Optional[str]
173
+ Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id
97
174
 
98
175
  request_options : typing.Optional[RequestOptions]
99
176
  Request-specific configuration.
@@ -118,3 +195,74 @@ class AsyncTenantClient:
118
195
  tenant_id=tenant_id, sub_tenant_id=sub_tenant_id, request_options=request_options
119
196
  )
120
197
  return _response.data
198
+
199
+ async def get_sub_tenant_ids(
200
+ self, *, tenant_id: str, request_options: typing.Optional[RequestOptions] = None
201
+ ) -> SubTenantIdsData:
202
+ """
203
+ Retrieve all sub-tenant IDs contained within a specific tenant. Fetches the sub-tenant IDs directly from the underlying data store.
204
+
205
+ Parameters
206
+ ----------
207
+ tenant_id : str
208
+
209
+ request_options : typing.Optional[RequestOptions]
210
+ Request-specific configuration.
211
+
212
+ Returns
213
+ -------
214
+ SubTenantIdsData
215
+ Successful Response
216
+
217
+ Examples
218
+ --------
219
+ import asyncio
220
+
221
+ from usecortex-ai import AsyncCortexAI
222
+
223
+ client = AsyncCortexAI(token="YOUR_TOKEN", )
224
+ async def main() -> None:
225
+ await client.tenant.get_sub_tenant_ids(tenant_id='tenant_id', )
226
+ asyncio.run(main())
227
+ """
228
+ _response = await self._raw_client.get_sub_tenant_ids(tenant_id=tenant_id, request_options=request_options)
229
+ return _response.data
230
+
231
+ async def delete_sub_tenant(
232
+ self, *, tenant_id: str, sub_tenant_id: str, request_options: typing.Optional[RequestOptions] = None
233
+ ) -> DeleteSubTenantData:
234
+ """
235
+ Delete a sub-tenant from a given tenant.
236
+
237
+ This endpoint deletes a specific sub-tenant from the specified tenant.
238
+ It validates that the sub-tenant is not the primary/default sub-tenant before deletion.
239
+
240
+ Parameters
241
+ ----------
242
+ tenant_id : str
243
+
244
+ sub_tenant_id : str
245
+
246
+ request_options : typing.Optional[RequestOptions]
247
+ Request-specific configuration.
248
+
249
+ Returns
250
+ -------
251
+ DeleteSubTenantData
252
+ Successful Response
253
+
254
+ Examples
255
+ --------
256
+ import asyncio
257
+
258
+ from usecortex-ai import AsyncCortexAI
259
+
260
+ client = AsyncCortexAI(token="YOUR_TOKEN", )
261
+ async def main() -> None:
262
+ await client.tenant.delete_sub_tenant(tenant_id='tenant_id', sub_tenant_id='sub_tenant_id', )
263
+ asyncio.run(main())
264
+ """
265
+ _response = await self._raw_client.delete_sub_tenant(
266
+ tenant_id=tenant_id, sub_tenant_id=sub_tenant_id, request_options=request_options
267
+ )
268
+ return _response.data