athena-intelligence 0.1.227__py3-none-any.whl → 0.1.357__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.

Potentially problematic release.


This version of athena-intelligence might be problematic. Click here for more details.

Files changed (55) hide show
  1. athena/__init__.py +223 -69
  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 +2 -2
  6. athena/assets/client.py +359 -2
  7. athena/assets/raw_client.py +562 -0
  8. athena/base_client.py +118 -18
  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 +0 -2
  16. athena/errors/__init__.py +42 -7
  17. athena/query/__init__.py +28 -1
  18. athena/query/types/__init__.py +30 -1
  19. athena/tools/__init__.py +39 -4
  20. athena/tools/client.py +161 -31
  21. athena/tools/raw_client.py +12 -9
  22. athena/tools/sheets/__init__.py +29 -2
  23. athena/tools/sheets/client.py +66 -101
  24. athena/tools/sheets/raw_client.py +66 -93
  25. athena/tools/sheets/types/__init__.py +31 -2
  26. athena/tools/sheets/types/{insert_table_row_request_row_data_item_value.py → update_sheet_range_request_values_item_item.py} +1 -1
  27. athena/tools/types/__init__.py +28 -1
  28. athena/types/__init__.py +187 -52
  29. athena/types/aop_execute_response_out.py +2 -1
  30. athena/types/border_model.py +32 -0
  31. athena/types/border_style.py +7 -0
  32. athena/types/borders_model.py +58 -0
  33. athena/types/cell_format.py +60 -0
  34. athena/types/cell_format_horizontal_alignment.py +5 -0
  35. athena/types/cell_format_vertical_alignment.py +5 -0
  36. athena/types/conversation_asset_info.py +8 -2
  37. athena/types/conversation_message.py +42 -0
  38. athena/types/conversation_result.py +67 -0
  39. athena/types/creatable_asset_type.py +5 -0
  40. athena/types/create_asset_response_out.py +46 -0
  41. athena/types/create_project_response_out.py +51 -0
  42. athena/types/dimension_properties.py +49 -0
  43. athena/types/grid_range.py +39 -0
  44. athena/types/{file_chunk_request_out.py → number_format_model.py} +8 -4
  45. athena/types/number_format_type.py +21 -0
  46. athena/types/sheet.py +83 -0
  47. athena/types/table_row_data.py +5 -0
  48. athena/types/text_format_model.py +37 -0
  49. athena/types/textrotation.py +5 -0
  50. athena/types/{document_chunk.py → theme_color.py} +3 -7
  51. athena/types/thread_status_response_out.py +5 -0
  52. athena/types/wrap_strategy.py +5 -0
  53. {athena_intelligence-0.1.227.dist-info → athena_intelligence-0.1.357.dist-info}/METADATA +1 -1
  54. {athena_intelligence-0.1.227.dist-info → athena_intelligence-0.1.357.dist-info}/RECORD +55 -36
  55. {athena_intelligence-0.1.227.dist-info → athena_intelligence-0.1.357.dist-info}/WHEEL +0 -0
@@ -4,11 +4,14 @@ import typing
4
4
 
5
5
  from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
6
6
  from ...core.request_options import RequestOptions
7
+ from ...types.cell_format import CellFormat
7
8
  from ...types.create_new_sheet_tab_response import CreateNewSheetTabResponse
8
9
  from ...types.get_table_response import GetTableResponse
10
+ from ...types.sheet import Sheet
9
11
  from ...types.sheet_operation_response import SheetOperationResponse
12
+ from ...types.table_row_data import TableRowData
10
13
  from .raw_client import AsyncRawSheetsClient, RawSheetsClient
11
- from .types.insert_table_row_request_row_data_item_value import InsertTableRowRequestRowDataItemValue
14
+ from .types.update_sheet_range_request_values_item_item import UpdateSheetRangeRequestValuesItemItem
12
15
 
13
16
  # this is used as the default value for optional parameters
14
17
  OMIT = typing.cast(typing.Any, ...)
@@ -393,10 +396,9 @@ class SheetsClient:
393
396
  asset_id: str,
394
397
  end_column: int,
395
398
  end_row: int,
399
+ formatting: CellFormat,
396
400
  start_column: int,
397
401
  start_row: int,
398
- type: str,
399
- value_json: str,
400
402
  sheet_id: typing.Optional[int] = OMIT,
401
403
  request_options: typing.Optional[RequestOptions] = None,
402
404
  ) -> SheetOperationResponse:
@@ -414,18 +416,15 @@ class SheetsClient:
414
416
  end_row : int
415
417
  1-based ending row index
416
418
 
419
+ formatting : CellFormat
420
+ Cell format
421
+
417
422
  start_column : int
418
423
  1-based starting column index
419
424
 
420
425
  start_row : int
421
426
  1-based starting row index
422
427
 
423
- type : str
424
- Formatting type (e.g. backgroundColor, textFormat, borders, etc.)
425
-
426
- value_json : str
427
- JSON string for value param (e.g. '"#FF0000"' or '{"fontSize":12}')
428
-
429
428
  sheet_id : typing.Optional[int]
430
429
  Sheet ID (defaults to 1)
431
430
 
@@ -439,7 +438,7 @@ class SheetsClient:
439
438
 
440
439
  Examples
441
440
  --------
442
- from athena import Athena
441
+ from athena import Athena, CellFormat
443
442
 
444
443
  client = Athena(
445
444
  api_key="YOUR_API_KEY",
@@ -448,20 +447,18 @@ class SheetsClient:
448
447
  asset_id="asset_id",
449
448
  end_column=1,
450
449
  end_row=1,
450
+ formatting=CellFormat(),
451
451
  start_column=1,
452
452
  start_row=1,
453
- type="type",
454
- value_json="value_json",
455
453
  )
456
454
  """
457
455
  _response = self._raw_client.format_range(
458
456
  asset_id=asset_id,
459
457
  end_column=end_column,
460
458
  end_row=end_row,
459
+ formatting=formatting,
461
460
  start_column=start_column,
462
461
  start_row=start_row,
463
- type=type,
464
- value_json=value_json,
465
462
  sheet_id=sheet_id,
466
463
  request_options=request_options,
467
464
  )
@@ -473,7 +470,8 @@ class SheetsClient:
473
470
  asset_id: str,
474
471
  start_column: int,
475
472
  start_row: int,
476
- values: typing.Sequence[str],
473
+ values: typing.Sequence[typing.Sequence[typing.Optional[UpdateSheetRangeRequestValuesItemItem]]],
474
+ formatting: typing.Optional[typing.Sequence[typing.Sequence[typing.Optional[CellFormat]]]] = OMIT,
477
475
  sheet_id: typing.Optional[int] = OMIT,
478
476
  request_options: typing.Optional[RequestOptions] = None,
479
477
  ) -> SheetOperationResponse:
@@ -491,8 +489,11 @@ class SheetsClient:
491
489
  start_row : int
492
490
  1-based starting row index
493
491
 
494
- values : typing.Sequence[str]
495
- List of pipe-separated strings representing rows (e.g. ['A1|B1|C1', 'A2|B2|C2'])
492
+ values : typing.Sequence[typing.Sequence[typing.Optional[UpdateSheetRangeRequestValuesItemItem]]]
493
+ 2D list of cells for each row
494
+
495
+ formatting : typing.Optional[typing.Sequence[typing.Sequence[typing.Optional[CellFormat]]]]
496
+ Optional 2D list of cell formats matching the structure of values. Each row is a list of CellFormat objects for each cell in that row. Use None for cells without formatting. numberFormat is not required unless user explicity asked to change
496
497
 
497
498
  sheet_id : typing.Optional[int]
498
499
  Sheet ID (defaults to 1)
@@ -516,7 +517,7 @@ class SheetsClient:
516
517
  asset_id="asset_id",
517
518
  start_column=1,
518
519
  start_row=1,
519
- values=["values"],
520
+ values=[[]],
520
521
  )
521
522
  """
522
523
  _response = self._raw_client.update_range(
@@ -524,6 +525,7 @@ class SheetsClient:
524
525
  start_column=start_column,
525
526
  start_row=start_row,
526
527
  values=values,
528
+ formatting=formatting,
527
529
  sheet_id=sheet_id,
528
530
  request_options=request_options,
529
531
  )
@@ -631,14 +633,7 @@ class SheetsClient:
631
633
  return _response.data
632
634
 
633
635
  def create_tab(
634
- self,
635
- *,
636
- asset_id: str,
637
- sheet_id: int,
638
- title: str,
639
- active_sheet_id: typing.Optional[int] = OMIT,
640
- tab_color: typing.Optional[str] = OMIT,
641
- request_options: typing.Optional[RequestOptions] = None,
636
+ self, *, asset_id: str, sheet: Sheet, request_options: typing.Optional[RequestOptions] = None
642
637
  ) -> CreateNewSheetTabResponse:
643
638
  """
644
639
  Create a new tab in an Athena spreadsheet.
@@ -648,17 +643,8 @@ class SheetsClient:
648
643
  asset_id : str
649
644
  The ID of the spreadsheet asset
650
645
 
651
- sheet_id : int
652
- Sheet ID of the new tab
653
-
654
- title : str
655
- Title of the new tab
656
-
657
- active_sheet_id : typing.Optional[int]
658
- Currently active sheet ID
659
-
660
- tab_color : typing.Optional[str]
661
- Optional color of the new tab
646
+ sheet : Sheet
647
+ Sheet Specification
662
648
 
663
649
  request_options : typing.Optional[RequestOptions]
664
650
  Request-specific configuration.
@@ -670,25 +656,23 @@ class SheetsClient:
670
656
 
671
657
  Examples
672
658
  --------
673
- from athena import Athena
659
+ from athena import Athena, Sheet
674
660
 
675
661
  client = Athena(
676
662
  api_key="YOUR_API_KEY",
677
663
  )
678
664
  client.tools.sheets.create_tab(
679
665
  asset_id="asset_id",
680
- sheet_id=1,
681
- title="title",
666
+ sheet=Sheet(
667
+ column_count=1,
668
+ index=1,
669
+ row_count=1,
670
+ sheet_id=1,
671
+ title="title",
672
+ ),
682
673
  )
683
674
  """
684
- _response = self._raw_client.create_tab(
685
- asset_id=asset_id,
686
- sheet_id=sheet_id,
687
- title=title,
688
- active_sheet_id=active_sheet_id,
689
- tab_color=tab_color,
690
- request_options=request_options,
691
- )
675
+ _response = self._raw_client.create_tab(asset_id=asset_id, sheet=sheet, request_options=request_options)
692
676
  return _response.data
693
677
 
694
678
  def delete_table_column(
@@ -940,7 +924,7 @@ class SheetsClient:
940
924
  self,
941
925
  *,
942
926
  asset_id: str,
943
- row_data: typing.Sequence[typing.Dict[str, typing.Optional[InsertTableRowRequestRowDataItemValue]]],
927
+ row_data: typing.Sequence[TableRowData],
944
928
  table_name: str,
945
929
  table_id: typing.Optional[str] = OMIT,
946
930
  request_options: typing.Optional[RequestOptions] = None,
@@ -953,7 +937,7 @@ class SheetsClient:
953
937
  asset_id : str
954
938
  The ID of the spreadsheet asset
955
939
 
956
- row_data : typing.Sequence[typing.Dict[str, typing.Optional[InsertTableRowRequestRowDataItemValue]]]
940
+ row_data : typing.Sequence[TableRowData]
957
941
  Array of row objects where keys are column names and values are cell values
958
942
 
959
943
  table_name : str
@@ -979,7 +963,7 @@ class SheetsClient:
979
963
  )
980
964
  client.tools.sheets.insert_table_row(
981
965
  asset_id="asset_id",
982
- row_data=[{}],
966
+ row_data=[{"key": "value"}],
983
967
  table_name="table_name",
984
968
  )
985
969
  """
@@ -1500,10 +1484,9 @@ class AsyncSheetsClient:
1500
1484
  asset_id: str,
1501
1485
  end_column: int,
1502
1486
  end_row: int,
1487
+ formatting: CellFormat,
1503
1488
  start_column: int,
1504
1489
  start_row: int,
1505
- type: str,
1506
- value_json: str,
1507
1490
  sheet_id: typing.Optional[int] = OMIT,
1508
1491
  request_options: typing.Optional[RequestOptions] = None,
1509
1492
  ) -> SheetOperationResponse:
@@ -1521,18 +1504,15 @@ class AsyncSheetsClient:
1521
1504
  end_row : int
1522
1505
  1-based ending row index
1523
1506
 
1507
+ formatting : CellFormat
1508
+ Cell format
1509
+
1524
1510
  start_column : int
1525
1511
  1-based starting column index
1526
1512
 
1527
1513
  start_row : int
1528
1514
  1-based starting row index
1529
1515
 
1530
- type : str
1531
- Formatting type (e.g. backgroundColor, textFormat, borders, etc.)
1532
-
1533
- value_json : str
1534
- JSON string for value param (e.g. '"#FF0000"' or '{"fontSize":12}')
1535
-
1536
1516
  sheet_id : typing.Optional[int]
1537
1517
  Sheet ID (defaults to 1)
1538
1518
 
@@ -1548,7 +1528,7 @@ class AsyncSheetsClient:
1548
1528
  --------
1549
1529
  import asyncio
1550
1530
 
1551
- from athena import AsyncAthena
1531
+ from athena import AsyncAthena, CellFormat
1552
1532
 
1553
1533
  client = AsyncAthena(
1554
1534
  api_key="YOUR_API_KEY",
@@ -1560,10 +1540,9 @@ class AsyncSheetsClient:
1560
1540
  asset_id="asset_id",
1561
1541
  end_column=1,
1562
1542
  end_row=1,
1543
+ formatting=CellFormat(),
1563
1544
  start_column=1,
1564
1545
  start_row=1,
1565
- type="type",
1566
- value_json="value_json",
1567
1546
  )
1568
1547
 
1569
1548
 
@@ -1573,10 +1552,9 @@ class AsyncSheetsClient:
1573
1552
  asset_id=asset_id,
1574
1553
  end_column=end_column,
1575
1554
  end_row=end_row,
1555
+ formatting=formatting,
1576
1556
  start_column=start_column,
1577
1557
  start_row=start_row,
1578
- type=type,
1579
- value_json=value_json,
1580
1558
  sheet_id=sheet_id,
1581
1559
  request_options=request_options,
1582
1560
  )
@@ -1588,7 +1566,8 @@ class AsyncSheetsClient:
1588
1566
  asset_id: str,
1589
1567
  start_column: int,
1590
1568
  start_row: int,
1591
- values: typing.Sequence[str],
1569
+ values: typing.Sequence[typing.Sequence[typing.Optional[UpdateSheetRangeRequestValuesItemItem]]],
1570
+ formatting: typing.Optional[typing.Sequence[typing.Sequence[typing.Optional[CellFormat]]]] = OMIT,
1592
1571
  sheet_id: typing.Optional[int] = OMIT,
1593
1572
  request_options: typing.Optional[RequestOptions] = None,
1594
1573
  ) -> SheetOperationResponse:
@@ -1606,8 +1585,11 @@ class AsyncSheetsClient:
1606
1585
  start_row : int
1607
1586
  1-based starting row index
1608
1587
 
1609
- values : typing.Sequence[str]
1610
- List of pipe-separated strings representing rows (e.g. ['A1|B1|C1', 'A2|B2|C2'])
1588
+ values : typing.Sequence[typing.Sequence[typing.Optional[UpdateSheetRangeRequestValuesItemItem]]]
1589
+ 2D list of cells for each row
1590
+
1591
+ formatting : typing.Optional[typing.Sequence[typing.Sequence[typing.Optional[CellFormat]]]]
1592
+ Optional 2D list of cell formats matching the structure of values. Each row is a list of CellFormat objects for each cell in that row. Use None for cells without formatting. numberFormat is not required unless user explicity asked to change
1611
1593
 
1612
1594
  sheet_id : typing.Optional[int]
1613
1595
  Sheet ID (defaults to 1)
@@ -1636,7 +1618,7 @@ class AsyncSheetsClient:
1636
1618
  asset_id="asset_id",
1637
1619
  start_column=1,
1638
1620
  start_row=1,
1639
- values=["values"],
1621
+ values=[[]],
1640
1622
  )
1641
1623
 
1642
1624
 
@@ -1647,6 +1629,7 @@ class AsyncSheetsClient:
1647
1629
  start_column=start_column,
1648
1630
  start_row=start_row,
1649
1631
  values=values,
1632
+ formatting=formatting,
1650
1633
  sheet_id=sheet_id,
1651
1634
  request_options=request_options,
1652
1635
  )
@@ -1770,14 +1753,7 @@ class AsyncSheetsClient:
1770
1753
  return _response.data
1771
1754
 
1772
1755
  async def create_tab(
1773
- self,
1774
- *,
1775
- asset_id: str,
1776
- sheet_id: int,
1777
- title: str,
1778
- active_sheet_id: typing.Optional[int] = OMIT,
1779
- tab_color: typing.Optional[str] = OMIT,
1780
- request_options: typing.Optional[RequestOptions] = None,
1756
+ self, *, asset_id: str, sheet: Sheet, request_options: typing.Optional[RequestOptions] = None
1781
1757
  ) -> CreateNewSheetTabResponse:
1782
1758
  """
1783
1759
  Create a new tab in an Athena spreadsheet.
@@ -1787,17 +1763,8 @@ class AsyncSheetsClient:
1787
1763
  asset_id : str
1788
1764
  The ID of the spreadsheet asset
1789
1765
 
1790
- sheet_id : int
1791
- Sheet ID of the new tab
1792
-
1793
- title : str
1794
- Title of the new tab
1795
-
1796
- active_sheet_id : typing.Optional[int]
1797
- Currently active sheet ID
1798
-
1799
- tab_color : typing.Optional[str]
1800
- Optional color of the new tab
1766
+ sheet : Sheet
1767
+ Sheet Specification
1801
1768
 
1802
1769
  request_options : typing.Optional[RequestOptions]
1803
1770
  Request-specific configuration.
@@ -1811,7 +1778,7 @@ class AsyncSheetsClient:
1811
1778
  --------
1812
1779
  import asyncio
1813
1780
 
1814
- from athena import AsyncAthena
1781
+ from athena import AsyncAthena, Sheet
1815
1782
 
1816
1783
  client = AsyncAthena(
1817
1784
  api_key="YOUR_API_KEY",
@@ -1821,21 +1788,19 @@ class AsyncSheetsClient:
1821
1788
  async def main() -> None:
1822
1789
  await client.tools.sheets.create_tab(
1823
1790
  asset_id="asset_id",
1824
- sheet_id=1,
1825
- title="title",
1791
+ sheet=Sheet(
1792
+ column_count=1,
1793
+ index=1,
1794
+ row_count=1,
1795
+ sheet_id=1,
1796
+ title="title",
1797
+ ),
1826
1798
  )
1827
1799
 
1828
1800
 
1829
1801
  asyncio.run(main())
1830
1802
  """
1831
- _response = await self._raw_client.create_tab(
1832
- asset_id=asset_id,
1833
- sheet_id=sheet_id,
1834
- title=title,
1835
- active_sheet_id=active_sheet_id,
1836
- tab_color=tab_color,
1837
- request_options=request_options,
1838
- )
1803
+ _response = await self._raw_client.create_tab(asset_id=asset_id, sheet=sheet, request_options=request_options)
1839
1804
  return _response.data
1840
1805
 
1841
1806
  async def delete_table_column(
@@ -2119,7 +2084,7 @@ class AsyncSheetsClient:
2119
2084
  self,
2120
2085
  *,
2121
2086
  asset_id: str,
2122
- row_data: typing.Sequence[typing.Dict[str, typing.Optional[InsertTableRowRequestRowDataItemValue]]],
2087
+ row_data: typing.Sequence[TableRowData],
2123
2088
  table_name: str,
2124
2089
  table_id: typing.Optional[str] = OMIT,
2125
2090
  request_options: typing.Optional[RequestOptions] = None,
@@ -2132,7 +2097,7 @@ class AsyncSheetsClient:
2132
2097
  asset_id : str
2133
2098
  The ID of the spreadsheet asset
2134
2099
 
2135
- row_data : typing.Sequence[typing.Dict[str, typing.Optional[InsertTableRowRequestRowDataItemValue]]]
2100
+ row_data : typing.Sequence[TableRowData]
2136
2101
  Array of row objects where keys are column names and values are cell values
2137
2102
 
2138
2103
  table_name : str
@@ -2163,7 +2128,7 @@ class AsyncSheetsClient:
2163
2128
  async def main() -> None:
2164
2129
  await client.tools.sheets.insert_table_row(
2165
2130
  asset_id="asset_id",
2166
- row_data=[{}],
2131
+ row_data=[{"key": "value"}],
2167
2132
  table_name="table_name",
2168
2133
  )
2169
2134