athena-intelligence 0.1.210__py3-none-any.whl → 0.1.303__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 (62) hide show
  1. athena/__init__.py +232 -71
  2. athena/agents/__init__.py +33 -1
  3. athena/agents/client.py +81 -18
  4. athena/aop/client.py +2 -2
  5. athena/aop/raw_client.py +10 -11
  6. athena/assets/client.py +359 -2
  7. athena/assets/raw_client.py +562 -0
  8. athena/base_client.py +122 -22
  9. athena/client.py +23 -21
  10. athena/core/__init__.py +73 -20
  11. athena/core/client_wrapper.py +2 -2
  12. athena/core/force_multipart.py +4 -2
  13. athena/core/http_response.py +1 -1
  14. athena/core/pydantic_utilities.py +5 -2
  15. athena/environment.py +1 -2
  16. athena/errors/__init__.py +42 -7
  17. athena/errors/not_found_error.py +1 -2
  18. athena/query/__init__.py +28 -1
  19. athena/query/types/__init__.py +30 -1
  20. athena/threads/raw_client.py +4 -5
  21. athena/tools/__init__.py +47 -3
  22. athena/tools/client.py +161 -31
  23. athena/tools/raw_client.py +36 -34
  24. athena/tools/sheets/__init__.py +30 -0
  25. athena/tools/sheets/client.py +100 -122
  26. athena/tools/sheets/raw_client.py +91 -94
  27. athena/tools/sheets/types/__init__.py +36 -0
  28. athena/tools/sheets/types/update_sheet_range_request_values_item_item.py +5 -0
  29. athena/tools/types/__init__.py +28 -1
  30. athena/types/__init__.py +196 -54
  31. athena/types/aop_async_execute_response_out.py +0 -5
  32. athena/types/aop_execute_response_out.py +7 -6
  33. athena/types/backgroundcolor.py +7 -0
  34. athena/types/{document_chunk.py → border_model.py} +7 -4
  35. athena/types/border_style.py +7 -0
  36. athena/types/borders_model.py +58 -0
  37. athena/types/cell_format.py +49 -0
  38. athena/types/cell_format_horizontal_alignment.py +5 -0
  39. athena/types/cell_format_vertical_alignment.py +5 -0
  40. athena/types/color.py +7 -0
  41. athena/types/conversation_asset_info.py +13 -2
  42. athena/types/conversation_message.py +42 -0
  43. athena/types/conversation_result.py +67 -0
  44. athena/types/creatable_asset_type.py +5 -0
  45. athena/types/create_asset_response_out.py +46 -0
  46. athena/types/create_project_response_out.py +51 -0
  47. athena/types/dimension_properties.py +49 -0
  48. athena/types/get_table_response.py +7 -2
  49. athena/types/grid_range.py +39 -0
  50. athena/types/{file_chunk_request_out.py → number_format_model.py} +8 -4
  51. athena/types/number_format_type.py +21 -0
  52. athena/types/sheet.py +76 -0
  53. athena/types/tabcolor.py +7 -0
  54. athena/types/table_row_data.py +5 -0
  55. athena/types/text_format_model.py +28 -0
  56. athena/types/textrotation.py +5 -0
  57. athena/types/{asset_not_found_error.py → theme_color.py} +3 -2
  58. athena/types/thread_status_response_out.py +5 -0
  59. athena/types/wrap_strategy.py +5 -0
  60. {athena_intelligence-0.1.210.dist-info → athena_intelligence-0.1.303.dist-info}/METADATA +1 -1
  61. {athena_intelligence-0.1.210.dist-info → athena_intelligence-0.1.303.dist-info}/RECORD +62 -39
  62. {athena_intelligence-0.1.210.dist-info → athena_intelligence-0.1.303.dist-info}/WHEEL +0 -0
athena/tools/__init__.py CHANGED
@@ -2,7 +2,51 @@
2
2
 
3
3
  # isort: skip_file
4
4
 
5
- from .types import ToolsDataFrameRequestColumnsItem
6
- from . import calendar, email, sheets, structured_data_extractor, tasks
5
+ import typing
6
+ from importlib import import_module
7
7
 
8
- __all__ = ["ToolsDataFrameRequestColumnsItem", "calendar", "email", "sheets", "structured_data_extractor", "tasks"]
8
+ if typing.TYPE_CHECKING:
9
+ from .types import ToolsDataFrameRequestColumnsItem
10
+ from . import calendar, email, sheets, structured_data_extractor, tasks
11
+ from .sheets import UpdateSheetRangeRequestValuesItemItem
12
+ _dynamic_imports: typing.Dict[str, str] = {
13
+ "ToolsDataFrameRequestColumnsItem": ".types",
14
+ "UpdateSheetRangeRequestValuesItemItem": ".sheets",
15
+ "calendar": ".calendar",
16
+ "email": ".email",
17
+ "sheets": ".sheets",
18
+ "structured_data_extractor": ".structured_data_extractor",
19
+ "tasks": ".tasks",
20
+ }
21
+
22
+
23
+ def __getattr__(attr_name: str) -> typing.Any:
24
+ module_name = _dynamic_imports.get(attr_name)
25
+ if module_name is None:
26
+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
27
+ try:
28
+ module = import_module(module_name, __package__)
29
+ if module_name == f".{attr_name}":
30
+ return module
31
+ else:
32
+ return getattr(module, attr_name)
33
+ except ImportError as e:
34
+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
35
+ except AttributeError as e:
36
+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
37
+
38
+
39
+ def __dir__():
40
+ lazy_attrs = list(_dynamic_imports.keys())
41
+ return sorted(lazy_attrs)
42
+
43
+
44
+ __all__ = [
45
+ "ToolsDataFrameRequestColumnsItem",
46
+ "UpdateSheetRangeRequestValuesItemItem",
47
+ "calendar",
48
+ "email",
49
+ "sheets",
50
+ "structured_data_extractor",
51
+ "tasks",
52
+ ]
athena/tools/client.py CHANGED
@@ -1,5 +1,7 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  import typing
4
6
 
5
7
  from .. import core
@@ -8,17 +10,17 @@ from ..core.request_options import RequestOptions
8
10
  from ..types.asset_content_request_out import AssetContentRequestOut
9
11
  from ..types.asset_screenshot_response_out import AssetScreenshotResponseOut
10
12
  from ..types.data_frame_request_out import DataFrameRequestOut
11
- from ..types.file_chunk_request_out import FileChunkRequestOut
12
13
  from ..types.folder_response import FolderResponse
13
14
  from ..types.save_asset_request_out import SaveAssetRequestOut
14
- from .calendar.client import AsyncCalendarClient, CalendarClient
15
- from .email.client import AsyncEmailClient, EmailClient
16
15
  from .raw_client import AsyncRawToolsClient, RawToolsClient
17
- from .sheets.client import AsyncSheetsClient, SheetsClient
18
- from .structured_data_extractor.client import AsyncStructuredDataExtractorClient, StructuredDataExtractorClient
19
- from .tasks.client import AsyncTasksClient, TasksClient
20
16
  from .types.tools_data_frame_request_columns_item import ToolsDataFrameRequestColumnsItem
21
17
 
18
+ if typing.TYPE_CHECKING:
19
+ from .calendar.client import AsyncCalendarClient, CalendarClient
20
+ from .email.client import AsyncEmailClient, EmailClient
21
+ from .sheets.client import AsyncSheetsClient, SheetsClient
22
+ from .structured_data_extractor.client import AsyncStructuredDataExtractorClient, StructuredDataExtractorClient
23
+ from .tasks.client import AsyncTasksClient, TasksClient
22
24
  # this is used as the default value for optional parameters
23
25
  OMIT = typing.cast(typing.Any, ...)
24
26
 
@@ -26,15 +28,12 @@ OMIT = typing.cast(typing.Any, ...)
26
28
  class ToolsClient:
27
29
  def __init__(self, *, client_wrapper: SyncClientWrapper):
28
30
  self._raw_client = RawToolsClient(client_wrapper=client_wrapper)
29
- self.calendar = CalendarClient(client_wrapper=client_wrapper)
30
-
31
- self.email = EmailClient(client_wrapper=client_wrapper)
32
-
33
- self.sheets = SheetsClient(client_wrapper=client_wrapper)
34
-
35
- self.structured_data_extractor = StructuredDataExtractorClient(client_wrapper=client_wrapper)
36
-
37
- self.tasks = TasksClient(client_wrapper=client_wrapper)
31
+ self._client_wrapper = client_wrapper
32
+ self._calendar: typing.Optional[CalendarClient] = None
33
+ self._email: typing.Optional[EmailClient] = None
34
+ self._sheets: typing.Optional[SheetsClient] = None
35
+ self._structured_data_extractor: typing.Optional[StructuredDataExtractorClient] = None
36
+ self._tasks: typing.Optional[TasksClient] = None
38
37
 
39
38
  @property
40
39
  def with_raw_response(self) -> RawToolsClient:
@@ -49,7 +48,7 @@ class ToolsClient:
49
48
 
50
49
  def get_asset_chunks(
51
50
  self, *, asset_ids: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None
52
- ) -> FileChunkRequestOut:
51
+ ) -> typing.Optional[typing.Any]:
53
52
  """
54
53
  Get the chunks of a file.
55
54
 
@@ -63,7 +62,7 @@ class ToolsClient:
63
62
 
64
63
  Returns
65
64
  -------
66
- FileChunkRequestOut
65
+ typing.Optional[typing.Any]
67
66
  Successful Response
68
67
 
69
68
  Examples
@@ -148,6 +147,7 @@ class ToolsClient:
148
147
  )
149
148
  client.tools.get_asset_screenshot(
150
149
  asset_id="asset_id",
150
+ page_number=1,
151
151
  )
152
152
  """
153
153
  _response = self._raw_client.get_asset_screenshot(
@@ -192,7 +192,12 @@ class ToolsClient:
192
192
  client = Athena(
193
193
  api_key="YOUR_API_KEY",
194
194
  )
195
- client.tools.list_contents()
195
+ client.tools.list_contents(
196
+ asset_id="asset_id",
197
+ folder_id="folder_id",
198
+ include_asset_details=True,
199
+ include_system_files=True,
200
+ )
196
201
  """
197
202
  _response = self._raw_client.list_contents(
198
203
  asset_id=asset_id,
@@ -251,6 +256,10 @@ class ToolsClient:
251
256
  )
252
257
  client.tools.data_frame(
253
258
  asset_id="asset_id",
259
+ row_limit=1,
260
+ index_column=1,
261
+ sheet_name="sheet_name",
262
+ separator="separator",
254
263
  )
255
264
  """
256
265
  _response = self._raw_client.data_frame(
@@ -281,6 +290,17 @@ class ToolsClient:
281
290
  -------
282
291
  typing.Iterator[bytes]
283
292
  Stream the file in original format.
293
+
294
+ Examples
295
+ --------
296
+ from athena import Athena
297
+
298
+ client = Athena(
299
+ api_key="YOUR_API_KEY",
300
+ )
301
+ client.tools.raw_data(
302
+ asset_id="asset_id",
303
+ )
284
304
  """
285
305
  with self._raw_client.raw_data(asset_id=asset_id, request_options=request_options) as r:
286
306
  yield from r.data
@@ -316,26 +336,65 @@ class ToolsClient:
316
336
  client = Athena(
317
337
  api_key="YOUR_API_KEY",
318
338
  )
319
- client.tools.save_asset()
339
+ client.tools.save_asset(
340
+ parent_folder_id="parent_folder_id",
341
+ )
320
342
  """
321
343
  _response = self._raw_client.save_asset(
322
344
  file=file, parent_folder_id=parent_folder_id, request_options=request_options
323
345
  )
324
346
  return _response.data
325
347
 
348
+ @property
349
+ def calendar(self):
350
+ if self._calendar is None:
351
+ from .calendar.client import CalendarClient # noqa: E402
326
352
 
327
- class AsyncToolsClient:
328
- def __init__(self, *, client_wrapper: AsyncClientWrapper):
329
- self._raw_client = AsyncRawToolsClient(client_wrapper=client_wrapper)
330
- self.calendar = AsyncCalendarClient(client_wrapper=client_wrapper)
353
+ self._calendar = CalendarClient(client_wrapper=self._client_wrapper)
354
+ return self._calendar
355
+
356
+ @property
357
+ def email(self):
358
+ if self._email is None:
359
+ from .email.client import EmailClient # noqa: E402
360
+
361
+ self._email = EmailClient(client_wrapper=self._client_wrapper)
362
+ return self._email
363
+
364
+ @property
365
+ def sheets(self):
366
+ if self._sheets is None:
367
+ from .sheets.client import SheetsClient # noqa: E402
331
368
 
332
- self.email = AsyncEmailClient(client_wrapper=client_wrapper)
369
+ self._sheets = SheetsClient(client_wrapper=self._client_wrapper)
370
+ return self._sheets
333
371
 
334
- self.sheets = AsyncSheetsClient(client_wrapper=client_wrapper)
372
+ @property
373
+ def structured_data_extractor(self):
374
+ if self._structured_data_extractor is None:
375
+ from .structured_data_extractor.client import StructuredDataExtractorClient # noqa: E402
376
+
377
+ self._structured_data_extractor = StructuredDataExtractorClient(client_wrapper=self._client_wrapper)
378
+ return self._structured_data_extractor
335
379
 
336
- self.structured_data_extractor = AsyncStructuredDataExtractorClient(client_wrapper=client_wrapper)
380
+ @property
381
+ def tasks(self):
382
+ if self._tasks is None:
383
+ from .tasks.client import TasksClient # noqa: E402
337
384
 
338
- self.tasks = AsyncTasksClient(client_wrapper=client_wrapper)
385
+ self._tasks = TasksClient(client_wrapper=self._client_wrapper)
386
+ return self._tasks
387
+
388
+
389
+ class AsyncToolsClient:
390
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
391
+ self._raw_client = AsyncRawToolsClient(client_wrapper=client_wrapper)
392
+ self._client_wrapper = client_wrapper
393
+ self._calendar: typing.Optional[AsyncCalendarClient] = None
394
+ self._email: typing.Optional[AsyncEmailClient] = None
395
+ self._sheets: typing.Optional[AsyncSheetsClient] = None
396
+ self._structured_data_extractor: typing.Optional[AsyncStructuredDataExtractorClient] = None
397
+ self._tasks: typing.Optional[AsyncTasksClient] = None
339
398
 
340
399
  @property
341
400
  def with_raw_response(self) -> AsyncRawToolsClient:
@@ -350,7 +409,7 @@ class AsyncToolsClient:
350
409
 
351
410
  async def get_asset_chunks(
352
411
  self, *, asset_ids: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None
353
- ) -> FileChunkRequestOut:
412
+ ) -> typing.Optional[typing.Any]:
354
413
  """
355
414
  Get the chunks of a file.
356
415
 
@@ -364,7 +423,7 @@ class AsyncToolsClient:
364
423
 
365
424
  Returns
366
425
  -------
367
- FileChunkRequestOut
426
+ typing.Optional[typing.Any]
368
427
  Successful Response
369
428
 
370
429
  Examples
@@ -470,6 +529,7 @@ class AsyncToolsClient:
470
529
  async def main() -> None:
471
530
  await client.tools.get_asset_screenshot(
472
531
  asset_id="asset_id",
532
+ page_number=1,
473
533
  )
474
534
 
475
535
 
@@ -522,7 +582,12 @@ class AsyncToolsClient:
522
582
 
523
583
 
524
584
  async def main() -> None:
525
- await client.tools.list_contents()
585
+ await client.tools.list_contents(
586
+ asset_id="asset_id",
587
+ folder_id="folder_id",
588
+ include_asset_details=True,
589
+ include_system_files=True,
590
+ )
526
591
 
527
592
 
528
593
  asyncio.run(main())
@@ -589,6 +654,10 @@ class AsyncToolsClient:
589
654
  async def main() -> None:
590
655
  await client.tools.data_frame(
591
656
  asset_id="asset_id",
657
+ row_limit=1,
658
+ index_column=1,
659
+ sheet_name="sheet_name",
660
+ separator="separator",
592
661
  )
593
662
 
594
663
 
@@ -622,6 +691,25 @@ class AsyncToolsClient:
622
691
  -------
623
692
  typing.AsyncIterator[bytes]
624
693
  Stream the file in original format.
694
+
695
+ Examples
696
+ --------
697
+ import asyncio
698
+
699
+ from athena import AsyncAthena
700
+
701
+ client = AsyncAthena(
702
+ api_key="YOUR_API_KEY",
703
+ )
704
+
705
+
706
+ async def main() -> None:
707
+ await client.tools.raw_data(
708
+ asset_id="asset_id",
709
+ )
710
+
711
+
712
+ asyncio.run(main())
625
713
  """
626
714
  async with self._raw_client.raw_data(asset_id=asset_id, request_options=request_options) as r:
627
715
  async for _chunk in r.data:
@@ -663,7 +751,9 @@ class AsyncToolsClient:
663
751
 
664
752
 
665
753
  async def main() -> None:
666
- await client.tools.save_asset()
754
+ await client.tools.save_asset(
755
+ parent_folder_id="parent_folder_id",
756
+ )
667
757
 
668
758
 
669
759
  asyncio.run(main())
@@ -672,3 +762,43 @@ class AsyncToolsClient:
672
762
  file=file, parent_folder_id=parent_folder_id, request_options=request_options
673
763
  )
674
764
  return _response.data
765
+
766
+ @property
767
+ def calendar(self):
768
+ if self._calendar is None:
769
+ from .calendar.client import AsyncCalendarClient # noqa: E402
770
+
771
+ self._calendar = AsyncCalendarClient(client_wrapper=self._client_wrapper)
772
+ return self._calendar
773
+
774
+ @property
775
+ def email(self):
776
+ if self._email is None:
777
+ from .email.client import AsyncEmailClient # noqa: E402
778
+
779
+ self._email = AsyncEmailClient(client_wrapper=self._client_wrapper)
780
+ return self._email
781
+
782
+ @property
783
+ def sheets(self):
784
+ if self._sheets is None:
785
+ from .sheets.client import AsyncSheetsClient # noqa: E402
786
+
787
+ self._sheets = AsyncSheetsClient(client_wrapper=self._client_wrapper)
788
+ return self._sheets
789
+
790
+ @property
791
+ def structured_data_extractor(self):
792
+ if self._structured_data_extractor is None:
793
+ from .structured_data_extractor.client import AsyncStructuredDataExtractorClient # noqa: E402
794
+
795
+ self._structured_data_extractor = AsyncStructuredDataExtractorClient(client_wrapper=self._client_wrapper)
796
+ return self._structured_data_extractor
797
+
798
+ @property
799
+ def tasks(self):
800
+ if self._tasks is None:
801
+ from .tasks.client import AsyncTasksClient # noqa: E402
802
+
803
+ self._tasks = AsyncTasksClient(client_wrapper=self._client_wrapper)
804
+ return self._tasks
@@ -18,11 +18,9 @@ from ..errors.unauthorized_error import UnauthorizedError
18
18
  from ..errors.unprocessable_entity_error import UnprocessableEntityError
19
19
  from ..errors.unsupported_media_type_error import UnsupportedMediaTypeError
20
20
  from ..types.asset_content_request_out import AssetContentRequestOut
21
- from ..types.asset_not_found_error import AssetNotFoundError
22
21
  from ..types.asset_screenshot_response_out import AssetScreenshotResponseOut
23
22
  from ..types.data_frame_request_out import DataFrameRequestOut
24
23
  from ..types.data_frame_unknown_format_error import DataFrameUnknownFormatError
25
- from ..types.file_chunk_request_out import FileChunkRequestOut
26
24
  from ..types.file_too_large_error import FileTooLargeError
27
25
  from ..types.folder_response import FolderResponse
28
26
  from ..types.save_asset_request_out import SaveAssetRequestOut
@@ -38,7 +36,7 @@ class RawToolsClient:
38
36
 
39
37
  def get_asset_chunks(
40
38
  self, *, asset_ids: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None
41
- ) -> HttpResponse[FileChunkRequestOut]:
39
+ ) -> HttpResponse[typing.Optional[typing.Any]]:
42
40
  """
43
41
  Get the chunks of a file.
44
42
 
@@ -52,7 +50,7 @@ class RawToolsClient:
52
50
 
53
51
  Returns
54
52
  -------
55
- HttpResponse[FileChunkRequestOut]
53
+ HttpResponse[typing.Optional[typing.Any]]
56
54
  Successful Response
57
55
  """
58
56
  _response = self._client_wrapper.httpx_client.request(
@@ -68,11 +66,13 @@ class RawToolsClient:
68
66
  omit=OMIT,
69
67
  )
70
68
  try:
69
+ if _response is None or not _response.text.strip():
70
+ return HttpResponse(response=_response, data=None)
71
71
  if 200 <= _response.status_code < 300:
72
72
  _data = typing.cast(
73
- FileChunkRequestOut,
73
+ typing.Optional[typing.Any],
74
74
  parse_obj_as(
75
- type_=FileChunkRequestOut, # type: ignore
75
+ type_=typing.Optional[typing.Any], # type: ignore
76
76
  object_=_response.json(),
77
77
  ),
78
78
  )
@@ -92,9 +92,9 @@ class RawToolsClient:
92
92
  raise NotFoundError(
93
93
  headers=dict(_response.headers),
94
94
  body=typing.cast(
95
- AssetNotFoundError,
95
+ typing.Optional[typing.Any],
96
96
  parse_obj_as(
97
- type_=AssetNotFoundError, # type: ignore
97
+ type_=typing.Optional[typing.Any], # type: ignore
98
98
  object_=_response.json(),
99
99
  ),
100
100
  ),
@@ -166,9 +166,9 @@ class RawToolsClient:
166
166
  raise NotFoundError(
167
167
  headers=dict(_response.headers),
168
168
  body=typing.cast(
169
- AssetNotFoundError,
169
+ typing.Optional[typing.Any],
170
170
  parse_obj_as(
171
- type_=AssetNotFoundError, # type: ignore
171
+ type_=typing.Optional[typing.Any], # type: ignore
172
172
  object_=_response.json(),
173
173
  ),
174
174
  ),
@@ -247,9 +247,9 @@ class RawToolsClient:
247
247
  raise NotFoundError(
248
248
  headers=dict(_response.headers),
249
249
  body=typing.cast(
250
- AssetNotFoundError,
250
+ typing.Optional[typing.Any],
251
251
  parse_obj_as(
252
- type_=AssetNotFoundError, # type: ignore
252
+ type_=typing.Optional[typing.Any], # type: ignore
253
253
  object_=_response.json(),
254
254
  ),
255
255
  ),
@@ -358,9 +358,9 @@ class RawToolsClient:
358
358
  raise NotFoundError(
359
359
  headers=dict(_response.headers),
360
360
  body=typing.cast(
361
- AssetNotFoundError,
361
+ typing.Optional[typing.Any],
362
362
  parse_obj_as(
363
- type_=AssetNotFoundError, # type: ignore
363
+ type_=typing.Optional[typing.Any], # type: ignore
364
364
  object_=_response.json(),
365
365
  ),
366
366
  ),
@@ -458,9 +458,9 @@ class RawToolsClient:
458
458
  raise NotFoundError(
459
459
  headers=dict(_response.headers),
460
460
  body=typing.cast(
461
- AssetNotFoundError,
461
+ typing.Optional[typing.Any],
462
462
  parse_obj_as(
463
- type_=AssetNotFoundError, # type: ignore
463
+ type_=typing.Optional[typing.Any], # type: ignore
464
464
  object_=_response.json(),
465
465
  ),
466
466
  ),
@@ -554,9 +554,9 @@ class RawToolsClient:
554
554
  raise NotFoundError(
555
555
  headers=dict(_response.headers),
556
556
  body=typing.cast(
557
- AssetNotFoundError,
557
+ typing.Optional[typing.Any],
558
558
  parse_obj_as(
559
- type_=AssetNotFoundError, # type: ignore
559
+ type_=typing.Optional[typing.Any], # type: ignore
560
560
  object_=_response.json(),
561
561
  ),
562
562
  ),
@@ -685,7 +685,7 @@ class AsyncRawToolsClient:
685
685
 
686
686
  async def get_asset_chunks(
687
687
  self, *, asset_ids: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None
688
- ) -> AsyncHttpResponse[FileChunkRequestOut]:
688
+ ) -> AsyncHttpResponse[typing.Optional[typing.Any]]:
689
689
  """
690
690
  Get the chunks of a file.
691
691
 
@@ -699,7 +699,7 @@ class AsyncRawToolsClient:
699
699
 
700
700
  Returns
701
701
  -------
702
- AsyncHttpResponse[FileChunkRequestOut]
702
+ AsyncHttpResponse[typing.Optional[typing.Any]]
703
703
  Successful Response
704
704
  """
705
705
  _response = await self._client_wrapper.httpx_client.request(
@@ -715,11 +715,13 @@ class AsyncRawToolsClient:
715
715
  omit=OMIT,
716
716
  )
717
717
  try:
718
+ if _response is None or not _response.text.strip():
719
+ return AsyncHttpResponse(response=_response, data=None)
718
720
  if 200 <= _response.status_code < 300:
719
721
  _data = typing.cast(
720
- FileChunkRequestOut,
722
+ typing.Optional[typing.Any],
721
723
  parse_obj_as(
722
- type_=FileChunkRequestOut, # type: ignore
724
+ type_=typing.Optional[typing.Any], # type: ignore
723
725
  object_=_response.json(),
724
726
  ),
725
727
  )
@@ -739,9 +741,9 @@ class AsyncRawToolsClient:
739
741
  raise NotFoundError(
740
742
  headers=dict(_response.headers),
741
743
  body=typing.cast(
742
- AssetNotFoundError,
744
+ typing.Optional[typing.Any],
743
745
  parse_obj_as(
744
- type_=AssetNotFoundError, # type: ignore
746
+ type_=typing.Optional[typing.Any], # type: ignore
745
747
  object_=_response.json(),
746
748
  ),
747
749
  ),
@@ -813,9 +815,9 @@ class AsyncRawToolsClient:
813
815
  raise NotFoundError(
814
816
  headers=dict(_response.headers),
815
817
  body=typing.cast(
816
- AssetNotFoundError,
818
+ typing.Optional[typing.Any],
817
819
  parse_obj_as(
818
- type_=AssetNotFoundError, # type: ignore
820
+ type_=typing.Optional[typing.Any], # type: ignore
819
821
  object_=_response.json(),
820
822
  ),
821
823
  ),
@@ -894,9 +896,9 @@ class AsyncRawToolsClient:
894
896
  raise NotFoundError(
895
897
  headers=dict(_response.headers),
896
898
  body=typing.cast(
897
- AssetNotFoundError,
899
+ typing.Optional[typing.Any],
898
900
  parse_obj_as(
899
- type_=AssetNotFoundError, # type: ignore
901
+ type_=typing.Optional[typing.Any], # type: ignore
900
902
  object_=_response.json(),
901
903
  ),
902
904
  ),
@@ -1005,9 +1007,9 @@ class AsyncRawToolsClient:
1005
1007
  raise NotFoundError(
1006
1008
  headers=dict(_response.headers),
1007
1009
  body=typing.cast(
1008
- AssetNotFoundError,
1010
+ typing.Optional[typing.Any],
1009
1011
  parse_obj_as(
1010
- type_=AssetNotFoundError, # type: ignore
1012
+ type_=typing.Optional[typing.Any], # type: ignore
1011
1013
  object_=_response.json(),
1012
1014
  ),
1013
1015
  ),
@@ -1105,9 +1107,9 @@ class AsyncRawToolsClient:
1105
1107
  raise NotFoundError(
1106
1108
  headers=dict(_response.headers),
1107
1109
  body=typing.cast(
1108
- AssetNotFoundError,
1110
+ typing.Optional[typing.Any],
1109
1111
  parse_obj_as(
1110
- type_=AssetNotFoundError, # type: ignore
1112
+ type_=typing.Optional[typing.Any], # type: ignore
1111
1113
  object_=_response.json(),
1112
1114
  ),
1113
1115
  ),
@@ -1202,9 +1204,9 @@ class AsyncRawToolsClient:
1202
1204
  raise NotFoundError(
1203
1205
  headers=dict(_response.headers),
1204
1206
  body=typing.cast(
1205
- AssetNotFoundError,
1207
+ typing.Optional[typing.Any],
1206
1208
  parse_obj_as(
1207
- type_=AssetNotFoundError, # type: ignore
1209
+ type_=typing.Optional[typing.Any], # type: ignore
1208
1210
  object_=_response.json(),
1209
1211
  ),
1210
1212
  ),
@@ -2,3 +2,33 @@
2
2
 
3
3
  # isort: skip_file
4
4
 
5
+ import typing
6
+ from importlib import import_module
7
+
8
+ if typing.TYPE_CHECKING:
9
+ from .types import UpdateSheetRangeRequestValuesItemItem
10
+ _dynamic_imports: typing.Dict[str, str] = {"UpdateSheetRangeRequestValuesItemItem": ".types"}
11
+
12
+
13
+ def __getattr__(attr_name: str) -> typing.Any:
14
+ module_name = _dynamic_imports.get(attr_name)
15
+ if module_name is None:
16
+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
17
+ try:
18
+ module = import_module(module_name, __package__)
19
+ if module_name == f".{attr_name}":
20
+ return module
21
+ else:
22
+ return getattr(module, attr_name)
23
+ except ImportError as e:
24
+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
25
+ except AttributeError as e:
26
+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
27
+
28
+
29
+ def __dir__():
30
+ lazy_attrs = list(_dynamic_imports.keys())
31
+ return sorted(lazy_attrs)
32
+
33
+
34
+ __all__ = ["UpdateSheetRangeRequestValuesItemItem"]