athena-intelligence 0.1.201__tar.gz → 0.1.203__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 (118) hide show
  1. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/PKG-INFO +1 -1
  2. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/pyproject.toml +1 -1
  3. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/__init__.py +2 -0
  4. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/core/client_wrapper.py +2 -2
  5. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/tools/sheets/client.py +219 -0
  6. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/tools/sheets/raw_client.py +291 -0
  7. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/__init__.py +2 -0
  8. athena_intelligence-0.1.203/src/athena/types/get_table_response.py +37 -0
  9. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/README.md +0 -0
  10. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/agents/__init__.py +0 -0
  11. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/agents/client.py +0 -0
  12. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/agents/drive/__init__.py +0 -0
  13. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/agents/drive/client.py +0 -0
  14. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/agents/drive/raw_client.py +0 -0
  15. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/agents/general/__init__.py +0 -0
  16. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/agents/general/client.py +0 -0
  17. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/agents/general/raw_client.py +0 -0
  18. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/agents/raw_client.py +0 -0
  19. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/agents/research/__init__.py +0 -0
  20. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/agents/research/client.py +0 -0
  21. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/agents/research/raw_client.py +0 -0
  22. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/agents/sql/__init__.py +0 -0
  23. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/agents/sql/client.py +0 -0
  24. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/agents/sql/raw_client.py +0 -0
  25. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/assets/__init__.py +0 -0
  26. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/assets/client.py +0 -0
  27. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/assets/raw_client.py +0 -0
  28. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/base_client.py +0 -0
  29. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/client.py +0 -0
  30. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/core/__init__.py +0 -0
  31. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/core/api_error.py +0 -0
  32. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/core/datetime_utils.py +0 -0
  33. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/core/file.py +0 -0
  34. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/core/force_multipart.py +0 -0
  35. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/core/http_client.py +0 -0
  36. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/core/http_response.py +0 -0
  37. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/core/jsonable_encoder.py +0 -0
  38. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/core/pydantic_utilities.py +0 -0
  39. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/core/query_encoder.py +0 -0
  40. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/core/remove_none_from_dict.py +0 -0
  41. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/core/request_options.py +0 -0
  42. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/core/serialization.py +0 -0
  43. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/environment.py +0 -0
  44. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/errors/__init__.py +0 -0
  45. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/errors/bad_request_error.py +0 -0
  46. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/errors/content_too_large_error.py +0 -0
  47. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/errors/internal_server_error.py +0 -0
  48. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/errors/not_found_error.py +0 -0
  49. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/errors/unauthorized_error.py +0 -0
  50. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/errors/unprocessable_entity_error.py +0 -0
  51. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/errors/unsupported_media_type_error.py +0 -0
  52. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/py.typed +0 -0
  53. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/query/__init__.py +0 -0
  54. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/query/client.py +0 -0
  55. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/query/raw_client.py +0 -0
  56. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/query/types/__init__.py +0 -0
  57. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/query/types/query_execute_request_database_asset_ids.py +0 -0
  58. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/tools/__init__.py +0 -0
  59. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/tools/calendar/__init__.py +0 -0
  60. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/tools/calendar/client.py +0 -0
  61. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/tools/calendar/raw_client.py +0 -0
  62. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/tools/client.py +0 -0
  63. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/tools/email/__init__.py +0 -0
  64. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/tools/email/client.py +0 -0
  65. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/tools/email/raw_client.py +0 -0
  66. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/tools/raw_client.py +0 -0
  67. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/tools/sheets/__init__.py +0 -0
  68. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/tools/structured_data_extractor/__init__.py +0 -0
  69. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/tools/structured_data_extractor/client.py +0 -0
  70. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/tools/structured_data_extractor/raw_client.py +0 -0
  71. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/tools/tasks/__init__.py +0 -0
  72. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/tools/tasks/client.py +0 -0
  73. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/tools/tasks/raw_client.py +0 -0
  74. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/tools/types/__init__.py +0 -0
  75. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/tools/types/tools_data_frame_request_columns_item.py +0 -0
  76. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/asset_content_request_out.py +0 -0
  77. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/asset_node.py +0 -0
  78. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/asset_not_found_error.py +0 -0
  79. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/asset_screenshot_response_out.py +0 -0
  80. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/chunk.py +0 -0
  81. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/chunk_content_item.py +0 -0
  82. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/chunk_result.py +0 -0
  83. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/chunk_result_chunk_id.py +0 -0
  84. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/content.py +0 -0
  85. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/create_new_sheet_tab_response.py +0 -0
  86. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/custom_agent_response.py +0 -0
  87. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/data_frame_request_out.py +0 -0
  88. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/data_frame_request_out_columns_item.py +0 -0
  89. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/data_frame_request_out_data_item_item.py +0 -0
  90. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/data_frame_request_out_index_item.py +0 -0
  91. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/data_frame_unknown_format_error.py +0 -0
  92. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/document_chunk.py +0 -0
  93. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/drive_agent_response.py +0 -0
  94. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/file_chunk_request_out.py +0 -0
  95. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/file_too_large_error.py +0 -0
  96. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/folder_response.py +0 -0
  97. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/general_agent_config.py +0 -0
  98. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/general_agent_config_enabled_tools_item.py +0 -0
  99. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/general_agent_request.py +0 -0
  100. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/general_agent_response.py +0 -0
  101. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/general_agent_response_message.py +0 -0
  102. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/general_agent_response_message_kwargs.py +0 -0
  103. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/id.py +0 -0
  104. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/image_url_content.py +0 -0
  105. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/input_message.py +0 -0
  106. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/input_message_content_item.py +0 -0
  107. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/paginated_assets_out.py +0 -0
  108. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/parent_folder_error.py +0 -0
  109. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/prompt_message.py +0 -0
  110. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/public_asset_out.py +0 -0
  111. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/research_agent_response.py +0 -0
  112. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/save_asset_request_out.py +0 -0
  113. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/sheet_operation_response.py +0 -0
  114. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/sql_agent_response.py +0 -0
  115. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/structured_data_extractor_response.py +0 -0
  116. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/text_content.py +0 -0
  117. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/types/type.py +0 -0
  118. {athena_intelligence-0.1.201 → athena_intelligence-0.1.203}/src/athena/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: athena-intelligence
3
- Version: 0.1.201
3
+ Version: 0.1.203
4
4
  Summary: Athena Intelligence Python Library
5
5
  Requires-Python: >=3.9,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -3,7 +3,7 @@ name = "athena-intelligence"
3
3
 
4
4
  [tool.poetry]
5
5
  name = "athena-intelligence"
6
- version = "0.1.201"
6
+ version = "0.1.203"
7
7
  description = "Athena Intelligence Python Library"
8
8
  readme = "README.md"
9
9
  authors = []
@@ -32,6 +32,7 @@ from .types import (
32
32
  GeneralAgentResponse,
33
33
  GeneralAgentResponseMessage,
34
34
  GeneralAgentResponseMessageKwargs,
35
+ GetTableResponse,
35
36
  Id,
36
37
  ImageUrlContent,
37
38
  InputMessage,
@@ -101,6 +102,7 @@ __all__ = [
101
102
  "GeneralAgentResponse",
102
103
  "GeneralAgentResponseMessage",
103
104
  "GeneralAgentResponseMessageKwargs",
105
+ "GetTableResponse",
104
106
  "Id",
105
107
  "ImageUrlContent",
106
108
  "InputMessage",
@@ -22,10 +22,10 @@ class BaseClientWrapper:
22
22
 
23
23
  def get_headers(self) -> typing.Dict[str, str]:
24
24
  headers: typing.Dict[str, str] = {
25
- "User-Agent": "athena-intelligence/0.1.201",
25
+ "User-Agent": "athena-intelligence/0.1.203",
26
26
  "X-Fern-Language": "Python",
27
27
  "X-Fern-SDK-Name": "athena-intelligence",
28
- "X-Fern-SDK-Version": "0.1.201",
28
+ "X-Fern-SDK-Version": "0.1.203",
29
29
  **(self.get_custom_headers() or {}),
30
30
  }
31
31
  headers["X-API-KEY"] = self.api_key
@@ -5,6 +5,7 @@ import typing
5
5
  from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
6
6
  from ...core.request_options import RequestOptions
7
7
  from ...types.create_new_sheet_tab_response import CreateNewSheetTabResponse
8
+ from ...types.get_table_response import GetTableResponse
8
9
  from ...types.sheet_operation_response import SheetOperationResponse
9
10
  from .raw_client import AsyncRawSheetsClient, RawSheetsClient
10
11
 
@@ -527,6 +528,61 @@ class SheetsClient:
527
528
  )
528
529
  return _response.data
529
530
 
531
+ def insert_row(
532
+ self,
533
+ *,
534
+ asset_id: str,
535
+ reference_row_index: int,
536
+ num_rows: typing.Optional[int] = OMIT,
537
+ sheet_id: typing.Optional[int] = OMIT,
538
+ request_options: typing.Optional[RequestOptions] = None,
539
+ ) -> SheetOperationResponse:
540
+ """
541
+ Insert a row in an Athena spreadsheet.
542
+
543
+ Parameters
544
+ ----------
545
+ asset_id : str
546
+ The ID of the spreadsheet asset
547
+
548
+ reference_row_index : int
549
+ 1-based reference row index where to insert
550
+
551
+ num_rows : typing.Optional[int]
552
+ Number of rows to insert
553
+
554
+ sheet_id : typing.Optional[int]
555
+ Sheet ID (defaults to 1)
556
+
557
+ request_options : typing.Optional[RequestOptions]
558
+ Request-specific configuration.
559
+
560
+ Returns
561
+ -------
562
+ SheetOperationResponse
563
+ Successful Response
564
+
565
+ Examples
566
+ --------
567
+ from athena import Athena
568
+
569
+ client = Athena(
570
+ api_key="YOUR_API_KEY",
571
+ )
572
+ client.tools.sheets.insert_row(
573
+ asset_id="asset_id",
574
+ reference_row_index=1,
575
+ )
576
+ """
577
+ _response = self._raw_client.insert_row(
578
+ asset_id=asset_id,
579
+ reference_row_index=reference_row_index,
580
+ num_rows=num_rows,
581
+ sheet_id=sheet_id,
582
+ request_options=request_options,
583
+ )
584
+ return _response.data
585
+
530
586
  def duplicate_sheet(
531
587
  self,
532
588
  *,
@@ -828,6 +884,52 @@ class SheetsClient:
828
884
  )
829
885
  return _response.data
830
886
 
887
+ def get_table(
888
+ self,
889
+ *,
890
+ asset_id: str,
891
+ table_id: typing.Optional[str] = OMIT,
892
+ table_name: typing.Optional[str] = OMIT,
893
+ request_options: typing.Optional[RequestOptions] = None,
894
+ ) -> GetTableResponse:
895
+ """
896
+ Retrieve table data from an Athena spreadsheet.
897
+
898
+ Parameters
899
+ ----------
900
+ asset_id : str
901
+ The ID of the spreadsheet asset
902
+
903
+ table_id : typing.Optional[str]
904
+ Table ID to retrieve
905
+
906
+ table_name : typing.Optional[str]
907
+ Table name to retrieve
908
+
909
+ request_options : typing.Optional[RequestOptions]
910
+ Request-specific configuration.
911
+
912
+ Returns
913
+ -------
914
+ GetTableResponse
915
+ Successful Response
916
+
917
+ Examples
918
+ --------
919
+ from athena import Athena
920
+
921
+ client = Athena(
922
+ api_key="YOUR_API_KEY",
923
+ )
924
+ client.tools.sheets.get_table(
925
+ asset_id="asset_id",
926
+ )
927
+ """
928
+ _response = self._raw_client.get_table(
929
+ asset_id=asset_id, table_id=table_id, table_name=table_name, request_options=request_options
930
+ )
931
+ return _response.data
932
+
831
933
  def update_table(
832
934
  self,
833
935
  *,
@@ -1488,6 +1590,69 @@ class AsyncSheetsClient:
1488
1590
  )
1489
1591
  return _response.data
1490
1592
 
1593
+ async def insert_row(
1594
+ self,
1595
+ *,
1596
+ asset_id: str,
1597
+ reference_row_index: int,
1598
+ num_rows: typing.Optional[int] = OMIT,
1599
+ sheet_id: typing.Optional[int] = OMIT,
1600
+ request_options: typing.Optional[RequestOptions] = None,
1601
+ ) -> SheetOperationResponse:
1602
+ """
1603
+ Insert a row in an Athena spreadsheet.
1604
+
1605
+ Parameters
1606
+ ----------
1607
+ asset_id : str
1608
+ The ID of the spreadsheet asset
1609
+
1610
+ reference_row_index : int
1611
+ 1-based reference row index where to insert
1612
+
1613
+ num_rows : typing.Optional[int]
1614
+ Number of rows to insert
1615
+
1616
+ sheet_id : typing.Optional[int]
1617
+ Sheet ID (defaults to 1)
1618
+
1619
+ request_options : typing.Optional[RequestOptions]
1620
+ Request-specific configuration.
1621
+
1622
+ Returns
1623
+ -------
1624
+ SheetOperationResponse
1625
+ Successful Response
1626
+
1627
+ Examples
1628
+ --------
1629
+ import asyncio
1630
+
1631
+ from athena import AsyncAthena
1632
+
1633
+ client = AsyncAthena(
1634
+ api_key="YOUR_API_KEY",
1635
+ )
1636
+
1637
+
1638
+ async def main() -> None:
1639
+ await client.tools.sheets.insert_row(
1640
+ asset_id="asset_id",
1641
+ reference_row_index=1,
1642
+ )
1643
+
1644
+
1645
+ asyncio.run(main())
1646
+ """
1647
+ _response = await self._raw_client.insert_row(
1648
+ asset_id=asset_id,
1649
+ reference_row_index=reference_row_index,
1650
+ num_rows=num_rows,
1651
+ sheet_id=sheet_id,
1652
+ request_options=request_options,
1653
+ )
1654
+ return _response.data
1655
+
1491
1656
  async def duplicate_sheet(
1492
1657
  self,
1493
1658
  *,
@@ -1829,6 +1994,60 @@ class AsyncSheetsClient:
1829
1994
  )
1830
1995
  return _response.data
1831
1996
 
1997
+ async def get_table(
1998
+ self,
1999
+ *,
2000
+ asset_id: str,
2001
+ table_id: typing.Optional[str] = OMIT,
2002
+ table_name: typing.Optional[str] = OMIT,
2003
+ request_options: typing.Optional[RequestOptions] = None,
2004
+ ) -> GetTableResponse:
2005
+ """
2006
+ Retrieve table data from an Athena spreadsheet.
2007
+
2008
+ Parameters
2009
+ ----------
2010
+ asset_id : str
2011
+ The ID of the spreadsheet asset
2012
+
2013
+ table_id : typing.Optional[str]
2014
+ Table ID to retrieve
2015
+
2016
+ table_name : typing.Optional[str]
2017
+ Table name to retrieve
2018
+
2019
+ request_options : typing.Optional[RequestOptions]
2020
+ Request-specific configuration.
2021
+
2022
+ Returns
2023
+ -------
2024
+ GetTableResponse
2025
+ Successful Response
2026
+
2027
+ Examples
2028
+ --------
2029
+ import asyncio
2030
+
2031
+ from athena import AsyncAthena
2032
+
2033
+ client = AsyncAthena(
2034
+ api_key="YOUR_API_KEY",
2035
+ )
2036
+
2037
+
2038
+ async def main() -> None:
2039
+ await client.tools.sheets.get_table(
2040
+ asset_id="asset_id",
2041
+ )
2042
+
2043
+
2044
+ asyncio.run(main())
2045
+ """
2046
+ _response = await self._raw_client.get_table(
2047
+ asset_id=asset_id, table_id=table_id, table_name=table_name, request_options=request_options
2048
+ )
2049
+ return _response.data
2050
+
1832
2051
  async def update_table(
1833
2052
  self,
1834
2053
  *,
@@ -10,6 +10,7 @@ from ...core.pydantic_utilities import parse_obj_as
10
10
  from ...core.request_options import RequestOptions
11
11
  from ...errors.unprocessable_entity_error import UnprocessableEntityError
12
12
  from ...types.create_new_sheet_tab_response import CreateNewSheetTabResponse
13
+ from ...types.get_table_response import GetTableResponse
13
14
  from ...types.sheet_operation_response import SheetOperationResponse
14
15
 
15
16
  # this is used as the default value for optional parameters
@@ -670,6 +671,81 @@ class RawSheetsClient:
670
671
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
671
672
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
672
673
 
674
+ def insert_row(
675
+ self,
676
+ *,
677
+ asset_id: str,
678
+ reference_row_index: int,
679
+ num_rows: typing.Optional[int] = OMIT,
680
+ sheet_id: typing.Optional[int] = OMIT,
681
+ request_options: typing.Optional[RequestOptions] = None,
682
+ ) -> HttpResponse[SheetOperationResponse]:
683
+ """
684
+ Insert a row in an Athena spreadsheet.
685
+
686
+ Parameters
687
+ ----------
688
+ asset_id : str
689
+ The ID of the spreadsheet asset
690
+
691
+ reference_row_index : int
692
+ 1-based reference row index where to insert
693
+
694
+ num_rows : typing.Optional[int]
695
+ Number of rows to insert
696
+
697
+ sheet_id : typing.Optional[int]
698
+ Sheet ID (defaults to 1)
699
+
700
+ request_options : typing.Optional[RequestOptions]
701
+ Request-specific configuration.
702
+
703
+ Returns
704
+ -------
705
+ HttpResponse[SheetOperationResponse]
706
+ Successful Response
707
+ """
708
+ _response = self._client_wrapper.httpx_client.request(
709
+ "api/v0/tools/sheets/row/insert",
710
+ method="POST",
711
+ json={
712
+ "asset_id": asset_id,
713
+ "num_rows": num_rows,
714
+ "reference_row_index": reference_row_index,
715
+ "sheet_id": sheet_id,
716
+ },
717
+ headers={
718
+ "content-type": "application/json",
719
+ },
720
+ request_options=request_options,
721
+ omit=OMIT,
722
+ )
723
+ try:
724
+ if 200 <= _response.status_code < 300:
725
+ _data = typing.cast(
726
+ SheetOperationResponse,
727
+ parse_obj_as(
728
+ type_=SheetOperationResponse, # type: ignore
729
+ object_=_response.json(),
730
+ ),
731
+ )
732
+ return HttpResponse(response=_response, data=_data)
733
+ if _response.status_code == 422:
734
+ raise UnprocessableEntityError(
735
+ headers=dict(_response.headers),
736
+ body=typing.cast(
737
+ typing.Optional[typing.Any],
738
+ parse_obj_as(
739
+ type_=typing.Optional[typing.Any], # type: ignore
740
+ object_=_response.json(),
741
+ ),
742
+ ),
743
+ )
744
+ _response_json = _response.json()
745
+ except JSONDecodeError:
746
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
747
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
748
+
673
749
  def duplicate_sheet(
674
750
  self,
675
751
  *,
@@ -1065,6 +1141,76 @@ class RawSheetsClient:
1065
1141
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1066
1142
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
1067
1143
 
1144
+ def get_table(
1145
+ self,
1146
+ *,
1147
+ asset_id: str,
1148
+ table_id: typing.Optional[str] = OMIT,
1149
+ table_name: typing.Optional[str] = OMIT,
1150
+ request_options: typing.Optional[RequestOptions] = None,
1151
+ ) -> HttpResponse[GetTableResponse]:
1152
+ """
1153
+ Retrieve table data from an Athena spreadsheet.
1154
+
1155
+ Parameters
1156
+ ----------
1157
+ asset_id : str
1158
+ The ID of the spreadsheet asset
1159
+
1160
+ table_id : typing.Optional[str]
1161
+ Table ID to retrieve
1162
+
1163
+ table_name : typing.Optional[str]
1164
+ Table name to retrieve
1165
+
1166
+ request_options : typing.Optional[RequestOptions]
1167
+ Request-specific configuration.
1168
+
1169
+ Returns
1170
+ -------
1171
+ HttpResponse[GetTableResponse]
1172
+ Successful Response
1173
+ """
1174
+ _response = self._client_wrapper.httpx_client.request(
1175
+ "api/v0/tools/sheets/table/get",
1176
+ method="POST",
1177
+ json={
1178
+ "asset_id": asset_id,
1179
+ "table_id": table_id,
1180
+ "table_name": table_name,
1181
+ },
1182
+ headers={
1183
+ "content-type": "application/json",
1184
+ },
1185
+ request_options=request_options,
1186
+ omit=OMIT,
1187
+ )
1188
+ try:
1189
+ if 200 <= _response.status_code < 300:
1190
+ _data = typing.cast(
1191
+ GetTableResponse,
1192
+ parse_obj_as(
1193
+ type_=GetTableResponse, # type: ignore
1194
+ object_=_response.json(),
1195
+ ),
1196
+ )
1197
+ return HttpResponse(response=_response, data=_data)
1198
+ if _response.status_code == 422:
1199
+ raise UnprocessableEntityError(
1200
+ headers=dict(_response.headers),
1201
+ body=typing.cast(
1202
+ typing.Optional[typing.Any],
1203
+ parse_obj_as(
1204
+ type_=typing.Optional[typing.Any], # type: ignore
1205
+ object_=_response.json(),
1206
+ ),
1207
+ ),
1208
+ )
1209
+ _response_json = _response.json()
1210
+ except JSONDecodeError:
1211
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1212
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
1213
+
1068
1214
  def update_table(
1069
1215
  self,
1070
1216
  *,
@@ -1815,6 +1961,81 @@ class AsyncRawSheetsClient:
1815
1961
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1816
1962
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
1817
1963
 
1964
+ async def insert_row(
1965
+ self,
1966
+ *,
1967
+ asset_id: str,
1968
+ reference_row_index: int,
1969
+ num_rows: typing.Optional[int] = OMIT,
1970
+ sheet_id: typing.Optional[int] = OMIT,
1971
+ request_options: typing.Optional[RequestOptions] = None,
1972
+ ) -> AsyncHttpResponse[SheetOperationResponse]:
1973
+ """
1974
+ Insert a row in an Athena spreadsheet.
1975
+
1976
+ Parameters
1977
+ ----------
1978
+ asset_id : str
1979
+ The ID of the spreadsheet asset
1980
+
1981
+ reference_row_index : int
1982
+ 1-based reference row index where to insert
1983
+
1984
+ num_rows : typing.Optional[int]
1985
+ Number of rows to insert
1986
+
1987
+ sheet_id : typing.Optional[int]
1988
+ Sheet ID (defaults to 1)
1989
+
1990
+ request_options : typing.Optional[RequestOptions]
1991
+ Request-specific configuration.
1992
+
1993
+ Returns
1994
+ -------
1995
+ AsyncHttpResponse[SheetOperationResponse]
1996
+ Successful Response
1997
+ """
1998
+ _response = await self._client_wrapper.httpx_client.request(
1999
+ "api/v0/tools/sheets/row/insert",
2000
+ method="POST",
2001
+ json={
2002
+ "asset_id": asset_id,
2003
+ "num_rows": num_rows,
2004
+ "reference_row_index": reference_row_index,
2005
+ "sheet_id": sheet_id,
2006
+ },
2007
+ headers={
2008
+ "content-type": "application/json",
2009
+ },
2010
+ request_options=request_options,
2011
+ omit=OMIT,
2012
+ )
2013
+ try:
2014
+ if 200 <= _response.status_code < 300:
2015
+ _data = typing.cast(
2016
+ SheetOperationResponse,
2017
+ parse_obj_as(
2018
+ type_=SheetOperationResponse, # type: ignore
2019
+ object_=_response.json(),
2020
+ ),
2021
+ )
2022
+ return AsyncHttpResponse(response=_response, data=_data)
2023
+ if _response.status_code == 422:
2024
+ raise UnprocessableEntityError(
2025
+ headers=dict(_response.headers),
2026
+ body=typing.cast(
2027
+ typing.Optional[typing.Any],
2028
+ parse_obj_as(
2029
+ type_=typing.Optional[typing.Any], # type: ignore
2030
+ object_=_response.json(),
2031
+ ),
2032
+ ),
2033
+ )
2034
+ _response_json = _response.json()
2035
+ except JSONDecodeError:
2036
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
2037
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
2038
+
1818
2039
  async def duplicate_sheet(
1819
2040
  self,
1820
2041
  *,
@@ -2210,6 +2431,76 @@ class AsyncRawSheetsClient:
2210
2431
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
2211
2432
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
2212
2433
 
2434
+ async def get_table(
2435
+ self,
2436
+ *,
2437
+ asset_id: str,
2438
+ table_id: typing.Optional[str] = OMIT,
2439
+ table_name: typing.Optional[str] = OMIT,
2440
+ request_options: typing.Optional[RequestOptions] = None,
2441
+ ) -> AsyncHttpResponse[GetTableResponse]:
2442
+ """
2443
+ Retrieve table data from an Athena spreadsheet.
2444
+
2445
+ Parameters
2446
+ ----------
2447
+ asset_id : str
2448
+ The ID of the spreadsheet asset
2449
+
2450
+ table_id : typing.Optional[str]
2451
+ Table ID to retrieve
2452
+
2453
+ table_name : typing.Optional[str]
2454
+ Table name to retrieve
2455
+
2456
+ request_options : typing.Optional[RequestOptions]
2457
+ Request-specific configuration.
2458
+
2459
+ Returns
2460
+ -------
2461
+ AsyncHttpResponse[GetTableResponse]
2462
+ Successful Response
2463
+ """
2464
+ _response = await self._client_wrapper.httpx_client.request(
2465
+ "api/v0/tools/sheets/table/get",
2466
+ method="POST",
2467
+ json={
2468
+ "asset_id": asset_id,
2469
+ "table_id": table_id,
2470
+ "table_name": table_name,
2471
+ },
2472
+ headers={
2473
+ "content-type": "application/json",
2474
+ },
2475
+ request_options=request_options,
2476
+ omit=OMIT,
2477
+ )
2478
+ try:
2479
+ if 200 <= _response.status_code < 300:
2480
+ _data = typing.cast(
2481
+ GetTableResponse,
2482
+ parse_obj_as(
2483
+ type_=GetTableResponse, # type: ignore
2484
+ object_=_response.json(),
2485
+ ),
2486
+ )
2487
+ return AsyncHttpResponse(response=_response, data=_data)
2488
+ if _response.status_code == 422:
2489
+ raise UnprocessableEntityError(
2490
+ headers=dict(_response.headers),
2491
+ body=typing.cast(
2492
+ typing.Optional[typing.Any],
2493
+ parse_obj_as(
2494
+ type_=typing.Optional[typing.Any], # type: ignore
2495
+ object_=_response.json(),
2496
+ ),
2497
+ ),
2498
+ )
2499
+ _response_json = _response.json()
2500
+ except JSONDecodeError:
2501
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
2502
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
2503
+
2213
2504
  async def update_table(
2214
2505
  self,
2215
2506
  *,
@@ -29,6 +29,7 @@ from .general_agent_request import GeneralAgentRequest
29
29
  from .general_agent_response import GeneralAgentResponse
30
30
  from .general_agent_response_message import GeneralAgentResponseMessage
31
31
  from .general_agent_response_message_kwargs import GeneralAgentResponseMessageKwargs
32
+ from .get_table_response import GetTableResponse
32
33
  from .id import Id
33
34
  from .image_url_content import ImageUrlContent
34
35
  from .input_message import InputMessage
@@ -79,6 +80,7 @@ __all__ = [
79
80
  "GeneralAgentResponse",
80
81
  "GeneralAgentResponseMessage",
81
82
  "GeneralAgentResponseMessageKwargs",
83
+ "GetTableResponse",
82
84
  "Id",
83
85
  "ImageUrlContent",
84
86
  "InputMessage",
@@ -0,0 +1,37 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+
8
+
9
+ class GetTableResponse(UniversalBaseModel):
10
+ asset_id: str = pydantic.Field()
11
+ """
12
+ The ID of the spreadsheet asset
13
+ """
14
+
15
+ data: typing.List[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field()
16
+ """
17
+ Array of row objects with column names as keys
18
+ """
19
+
20
+ message: str = pydantic.Field()
21
+ """
22
+ Success message or error description
23
+ """
24
+
25
+ success: bool = pydantic.Field()
26
+ """
27
+ Whether the operation was successful
28
+ """
29
+
30
+ if IS_PYDANTIC_V2:
31
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
32
+ else:
33
+
34
+ class Config:
35
+ frozen = True
36
+ smart_union = True
37
+ extra = pydantic.Extra.allow