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.
- athena/__init__.py +223 -69
- athena/agents/__init__.py +33 -1
- athena/agents/client.py +81 -18
- athena/aop/client.py +2 -2
- athena/aop/raw_client.py +2 -2
- athena/assets/client.py +359 -2
- athena/assets/raw_client.py +562 -0
- athena/base_client.py +118 -18
- athena/client.py +23 -21
- athena/core/__init__.py +73 -20
- athena/core/client_wrapper.py +2 -2
- athena/core/force_multipart.py +4 -2
- athena/core/http_response.py +1 -1
- athena/core/pydantic_utilities.py +5 -2
- athena/environment.py +0 -2
- athena/errors/__init__.py +42 -7
- athena/query/__init__.py +28 -1
- athena/query/types/__init__.py +30 -1
- athena/tools/__init__.py +39 -4
- athena/tools/client.py +161 -31
- athena/tools/raw_client.py +12 -9
- athena/tools/sheets/__init__.py +29 -2
- athena/tools/sheets/client.py +66 -101
- athena/tools/sheets/raw_client.py +66 -93
- athena/tools/sheets/types/__init__.py +31 -2
- athena/tools/sheets/types/{insert_table_row_request_row_data_item_value.py → update_sheet_range_request_values_item_item.py} +1 -1
- athena/tools/types/__init__.py +28 -1
- athena/types/__init__.py +187 -52
- athena/types/aop_execute_response_out.py +2 -1
- athena/types/border_model.py +32 -0
- athena/types/border_style.py +7 -0
- athena/types/borders_model.py +58 -0
- athena/types/cell_format.py +60 -0
- athena/types/cell_format_horizontal_alignment.py +5 -0
- athena/types/cell_format_vertical_alignment.py +5 -0
- athena/types/conversation_asset_info.py +8 -2
- athena/types/conversation_message.py +42 -0
- athena/types/conversation_result.py +67 -0
- athena/types/creatable_asset_type.py +5 -0
- athena/types/create_asset_response_out.py +46 -0
- athena/types/create_project_response_out.py +51 -0
- athena/types/dimension_properties.py +49 -0
- athena/types/grid_range.py +39 -0
- athena/types/{file_chunk_request_out.py → number_format_model.py} +8 -4
- athena/types/number_format_type.py +21 -0
- athena/types/sheet.py +83 -0
- athena/types/table_row_data.py +5 -0
- athena/types/text_format_model.py +37 -0
- athena/types/textrotation.py +5 -0
- athena/types/{document_chunk.py → theme_color.py} +3 -7
- athena/types/thread_status_response_out.py +5 -0
- athena/types/wrap_strategy.py +5 -0
- {athena_intelligence-0.1.227.dist-info → athena_intelligence-0.1.357.dist-info}/METADATA +1 -1
- {athena_intelligence-0.1.227.dist-info → athena_intelligence-0.1.357.dist-info}/RECORD +55 -36
- {athena_intelligence-0.1.227.dist-info → athena_intelligence-0.1.357.dist-info}/WHEEL +0 -0
|
@@ -10,10 +10,13 @@ from ...core.pydantic_utilities import parse_obj_as
|
|
|
10
10
|
from ...core.request_options import RequestOptions
|
|
11
11
|
from ...core.serialization import convert_and_respect_annotation_metadata
|
|
12
12
|
from ...errors.unprocessable_entity_error import UnprocessableEntityError
|
|
13
|
+
from ...types.cell_format import CellFormat
|
|
13
14
|
from ...types.create_new_sheet_tab_response import CreateNewSheetTabResponse
|
|
14
15
|
from ...types.get_table_response import GetTableResponse
|
|
16
|
+
from ...types.sheet import Sheet
|
|
15
17
|
from ...types.sheet_operation_response import SheetOperationResponse
|
|
16
|
-
from
|
|
18
|
+
from ...types.table_row_data import TableRowData
|
|
19
|
+
from .types.update_sheet_range_request_values_item_item import UpdateSheetRangeRequestValuesItemItem
|
|
17
20
|
|
|
18
21
|
# this is used as the default value for optional parameters
|
|
19
22
|
OMIT = typing.cast(typing.Any, ...)
|
|
@@ -504,10 +507,9 @@ class RawSheetsClient:
|
|
|
504
507
|
asset_id: str,
|
|
505
508
|
end_column: int,
|
|
506
509
|
end_row: int,
|
|
510
|
+
formatting: CellFormat,
|
|
507
511
|
start_column: int,
|
|
508
512
|
start_row: int,
|
|
509
|
-
type: str,
|
|
510
|
-
value_json: str,
|
|
511
513
|
sheet_id: typing.Optional[int] = OMIT,
|
|
512
514
|
request_options: typing.Optional[RequestOptions] = None,
|
|
513
515
|
) -> HttpResponse[SheetOperationResponse]:
|
|
@@ -525,18 +527,15 @@ class RawSheetsClient:
|
|
|
525
527
|
end_row : int
|
|
526
528
|
1-based ending row index
|
|
527
529
|
|
|
530
|
+
formatting : CellFormat
|
|
531
|
+
Cell format
|
|
532
|
+
|
|
528
533
|
start_column : int
|
|
529
534
|
1-based starting column index
|
|
530
535
|
|
|
531
536
|
start_row : int
|
|
532
537
|
1-based starting row index
|
|
533
538
|
|
|
534
|
-
type : str
|
|
535
|
-
Formatting type (e.g. backgroundColor, textFormat, borders, etc.)
|
|
536
|
-
|
|
537
|
-
value_json : str
|
|
538
|
-
JSON string for value param (e.g. '"#FF0000"' or '{"fontSize":12}')
|
|
539
|
-
|
|
540
539
|
sheet_id : typing.Optional[int]
|
|
541
540
|
Sheet ID (defaults to 1)
|
|
542
541
|
|
|
@@ -555,11 +554,12 @@ class RawSheetsClient:
|
|
|
555
554
|
"asset_id": asset_id,
|
|
556
555
|
"end_column": end_column,
|
|
557
556
|
"end_row": end_row,
|
|
557
|
+
"formatting": convert_and_respect_annotation_metadata(
|
|
558
|
+
object_=formatting, annotation=CellFormat, direction="write"
|
|
559
|
+
),
|
|
558
560
|
"sheet_id": sheet_id,
|
|
559
561
|
"start_column": start_column,
|
|
560
562
|
"start_row": start_row,
|
|
561
|
-
"type": type,
|
|
562
|
-
"value_json": value_json,
|
|
563
563
|
},
|
|
564
564
|
headers={
|
|
565
565
|
"content-type": "application/json",
|
|
@@ -599,7 +599,8 @@ class RawSheetsClient:
|
|
|
599
599
|
asset_id: str,
|
|
600
600
|
start_column: int,
|
|
601
601
|
start_row: int,
|
|
602
|
-
values: typing.Sequence[
|
|
602
|
+
values: typing.Sequence[typing.Sequence[typing.Optional[UpdateSheetRangeRequestValuesItemItem]]],
|
|
603
|
+
formatting: typing.Optional[typing.Sequence[typing.Sequence[typing.Optional[CellFormat]]]] = OMIT,
|
|
603
604
|
sheet_id: typing.Optional[int] = OMIT,
|
|
604
605
|
request_options: typing.Optional[RequestOptions] = None,
|
|
605
606
|
) -> HttpResponse[SheetOperationResponse]:
|
|
@@ -617,8 +618,11 @@ class RawSheetsClient:
|
|
|
617
618
|
start_row : int
|
|
618
619
|
1-based starting row index
|
|
619
620
|
|
|
620
|
-
values : typing.Sequence[
|
|
621
|
-
|
|
621
|
+
values : typing.Sequence[typing.Sequence[typing.Optional[UpdateSheetRangeRequestValuesItemItem]]]
|
|
622
|
+
2D list of cells for each row
|
|
623
|
+
|
|
624
|
+
formatting : typing.Optional[typing.Sequence[typing.Sequence[typing.Optional[CellFormat]]]]
|
|
625
|
+
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
|
|
622
626
|
|
|
623
627
|
sheet_id : typing.Optional[int]
|
|
624
628
|
Sheet ID (defaults to 1)
|
|
@@ -636,10 +640,19 @@ class RawSheetsClient:
|
|
|
636
640
|
method="POST",
|
|
637
641
|
json={
|
|
638
642
|
"asset_id": asset_id,
|
|
643
|
+
"formatting": convert_and_respect_annotation_metadata(
|
|
644
|
+
object_=formatting,
|
|
645
|
+
annotation=typing.Sequence[typing.Sequence[typing.Optional[CellFormat]]],
|
|
646
|
+
direction="write",
|
|
647
|
+
),
|
|
639
648
|
"sheet_id": sheet_id,
|
|
640
649
|
"start_column": start_column,
|
|
641
650
|
"start_row": start_row,
|
|
642
|
-
"values":
|
|
651
|
+
"values": convert_and_respect_annotation_metadata(
|
|
652
|
+
object_=values,
|
|
653
|
+
annotation=typing.Sequence[typing.Sequence[typing.Optional[UpdateSheetRangeRequestValuesItemItem]]],
|
|
654
|
+
direction="write",
|
|
655
|
+
),
|
|
643
656
|
},
|
|
644
657
|
headers={
|
|
645
658
|
"content-type": "application/json",
|
|
@@ -819,14 +832,7 @@ class RawSheetsClient:
|
|
|
819
832
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
820
833
|
|
|
821
834
|
def create_tab(
|
|
822
|
-
self,
|
|
823
|
-
*,
|
|
824
|
-
asset_id: str,
|
|
825
|
-
sheet_id: int,
|
|
826
|
-
title: str,
|
|
827
|
-
active_sheet_id: typing.Optional[int] = OMIT,
|
|
828
|
-
tab_color: typing.Optional[str] = OMIT,
|
|
829
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
835
|
+
self, *, asset_id: str, sheet: Sheet, request_options: typing.Optional[RequestOptions] = None
|
|
830
836
|
) -> HttpResponse[CreateNewSheetTabResponse]:
|
|
831
837
|
"""
|
|
832
838
|
Create a new tab in an Athena spreadsheet.
|
|
@@ -836,17 +842,8 @@ class RawSheetsClient:
|
|
|
836
842
|
asset_id : str
|
|
837
843
|
The ID of the spreadsheet asset
|
|
838
844
|
|
|
839
|
-
|
|
840
|
-
Sheet
|
|
841
|
-
|
|
842
|
-
title : str
|
|
843
|
-
Title of the new tab
|
|
844
|
-
|
|
845
|
-
active_sheet_id : typing.Optional[int]
|
|
846
|
-
Currently active sheet ID
|
|
847
|
-
|
|
848
|
-
tab_color : typing.Optional[str]
|
|
849
|
-
Optional color of the new tab
|
|
845
|
+
sheet : Sheet
|
|
846
|
+
Sheet Specification
|
|
850
847
|
|
|
851
848
|
request_options : typing.Optional[RequestOptions]
|
|
852
849
|
Request-specific configuration.
|
|
@@ -860,11 +857,8 @@ class RawSheetsClient:
|
|
|
860
857
|
"api/v0/tools/sheets/tab/create",
|
|
861
858
|
method="POST",
|
|
862
859
|
json={
|
|
863
|
-
"active_sheet_id": active_sheet_id,
|
|
864
860
|
"asset_id": asset_id,
|
|
865
|
-
"
|
|
866
|
-
"tab_color": tab_color,
|
|
867
|
-
"title": title,
|
|
861
|
+
"sheet": convert_and_respect_annotation_metadata(object_=sheet, annotation=Sheet, direction="write"),
|
|
868
862
|
},
|
|
869
863
|
headers={
|
|
870
864
|
"content-type": "application/json",
|
|
@@ -1222,7 +1216,7 @@ class RawSheetsClient:
|
|
|
1222
1216
|
self,
|
|
1223
1217
|
*,
|
|
1224
1218
|
asset_id: str,
|
|
1225
|
-
row_data: typing.Sequence[
|
|
1219
|
+
row_data: typing.Sequence[TableRowData],
|
|
1226
1220
|
table_name: str,
|
|
1227
1221
|
table_id: typing.Optional[str] = OMIT,
|
|
1228
1222
|
request_options: typing.Optional[RequestOptions] = None,
|
|
@@ -1235,7 +1229,7 @@ class RawSheetsClient:
|
|
|
1235
1229
|
asset_id : str
|
|
1236
1230
|
The ID of the spreadsheet asset
|
|
1237
1231
|
|
|
1238
|
-
row_data : typing.Sequence[
|
|
1232
|
+
row_data : typing.Sequence[TableRowData]
|
|
1239
1233
|
Array of row objects where keys are column names and values are cell values
|
|
1240
1234
|
|
|
1241
1235
|
table_name : str
|
|
@@ -1257,13 +1251,7 @@ class RawSheetsClient:
|
|
|
1257
1251
|
method="POST",
|
|
1258
1252
|
json={
|
|
1259
1253
|
"asset_id": asset_id,
|
|
1260
|
-
"row_data":
|
|
1261
|
-
object_=row_data,
|
|
1262
|
-
annotation=typing.Sequence[
|
|
1263
|
-
typing.Dict[str, typing.Optional[InsertTableRowRequestRowDataItemValue]]
|
|
1264
|
-
],
|
|
1265
|
-
direction="write",
|
|
1266
|
-
),
|
|
1254
|
+
"row_data": row_data,
|
|
1267
1255
|
"table_id": table_id,
|
|
1268
1256
|
"table_name": table_name,
|
|
1269
1257
|
},
|
|
@@ -1880,10 +1868,9 @@ class AsyncRawSheetsClient:
|
|
|
1880
1868
|
asset_id: str,
|
|
1881
1869
|
end_column: int,
|
|
1882
1870
|
end_row: int,
|
|
1871
|
+
formatting: CellFormat,
|
|
1883
1872
|
start_column: int,
|
|
1884
1873
|
start_row: int,
|
|
1885
|
-
type: str,
|
|
1886
|
-
value_json: str,
|
|
1887
1874
|
sheet_id: typing.Optional[int] = OMIT,
|
|
1888
1875
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1889
1876
|
) -> AsyncHttpResponse[SheetOperationResponse]:
|
|
@@ -1901,18 +1888,15 @@ class AsyncRawSheetsClient:
|
|
|
1901
1888
|
end_row : int
|
|
1902
1889
|
1-based ending row index
|
|
1903
1890
|
|
|
1891
|
+
formatting : CellFormat
|
|
1892
|
+
Cell format
|
|
1893
|
+
|
|
1904
1894
|
start_column : int
|
|
1905
1895
|
1-based starting column index
|
|
1906
1896
|
|
|
1907
1897
|
start_row : int
|
|
1908
1898
|
1-based starting row index
|
|
1909
1899
|
|
|
1910
|
-
type : str
|
|
1911
|
-
Formatting type (e.g. backgroundColor, textFormat, borders, etc.)
|
|
1912
|
-
|
|
1913
|
-
value_json : str
|
|
1914
|
-
JSON string for value param (e.g. '"#FF0000"' or '{"fontSize":12}')
|
|
1915
|
-
|
|
1916
1900
|
sheet_id : typing.Optional[int]
|
|
1917
1901
|
Sheet ID (defaults to 1)
|
|
1918
1902
|
|
|
@@ -1931,11 +1915,12 @@ class AsyncRawSheetsClient:
|
|
|
1931
1915
|
"asset_id": asset_id,
|
|
1932
1916
|
"end_column": end_column,
|
|
1933
1917
|
"end_row": end_row,
|
|
1918
|
+
"formatting": convert_and_respect_annotation_metadata(
|
|
1919
|
+
object_=formatting, annotation=CellFormat, direction="write"
|
|
1920
|
+
),
|
|
1934
1921
|
"sheet_id": sheet_id,
|
|
1935
1922
|
"start_column": start_column,
|
|
1936
1923
|
"start_row": start_row,
|
|
1937
|
-
"type": type,
|
|
1938
|
-
"value_json": value_json,
|
|
1939
1924
|
},
|
|
1940
1925
|
headers={
|
|
1941
1926
|
"content-type": "application/json",
|
|
@@ -1975,7 +1960,8 @@ class AsyncRawSheetsClient:
|
|
|
1975
1960
|
asset_id: str,
|
|
1976
1961
|
start_column: int,
|
|
1977
1962
|
start_row: int,
|
|
1978
|
-
values: typing.Sequence[
|
|
1963
|
+
values: typing.Sequence[typing.Sequence[typing.Optional[UpdateSheetRangeRequestValuesItemItem]]],
|
|
1964
|
+
formatting: typing.Optional[typing.Sequence[typing.Sequence[typing.Optional[CellFormat]]]] = OMIT,
|
|
1979
1965
|
sheet_id: typing.Optional[int] = OMIT,
|
|
1980
1966
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1981
1967
|
) -> AsyncHttpResponse[SheetOperationResponse]:
|
|
@@ -1993,8 +1979,11 @@ class AsyncRawSheetsClient:
|
|
|
1993
1979
|
start_row : int
|
|
1994
1980
|
1-based starting row index
|
|
1995
1981
|
|
|
1996
|
-
values : typing.Sequence[
|
|
1997
|
-
|
|
1982
|
+
values : typing.Sequence[typing.Sequence[typing.Optional[UpdateSheetRangeRequestValuesItemItem]]]
|
|
1983
|
+
2D list of cells for each row
|
|
1984
|
+
|
|
1985
|
+
formatting : typing.Optional[typing.Sequence[typing.Sequence[typing.Optional[CellFormat]]]]
|
|
1986
|
+
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
|
|
1998
1987
|
|
|
1999
1988
|
sheet_id : typing.Optional[int]
|
|
2000
1989
|
Sheet ID (defaults to 1)
|
|
@@ -2012,10 +2001,19 @@ class AsyncRawSheetsClient:
|
|
|
2012
2001
|
method="POST",
|
|
2013
2002
|
json={
|
|
2014
2003
|
"asset_id": asset_id,
|
|
2004
|
+
"formatting": convert_and_respect_annotation_metadata(
|
|
2005
|
+
object_=formatting,
|
|
2006
|
+
annotation=typing.Sequence[typing.Sequence[typing.Optional[CellFormat]]],
|
|
2007
|
+
direction="write",
|
|
2008
|
+
),
|
|
2015
2009
|
"sheet_id": sheet_id,
|
|
2016
2010
|
"start_column": start_column,
|
|
2017
2011
|
"start_row": start_row,
|
|
2018
|
-
"values":
|
|
2012
|
+
"values": convert_and_respect_annotation_metadata(
|
|
2013
|
+
object_=values,
|
|
2014
|
+
annotation=typing.Sequence[typing.Sequence[typing.Optional[UpdateSheetRangeRequestValuesItemItem]]],
|
|
2015
|
+
direction="write",
|
|
2016
|
+
),
|
|
2019
2017
|
},
|
|
2020
2018
|
headers={
|
|
2021
2019
|
"content-type": "application/json",
|
|
@@ -2195,14 +2193,7 @@ class AsyncRawSheetsClient:
|
|
|
2195
2193
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
2196
2194
|
|
|
2197
2195
|
async def create_tab(
|
|
2198
|
-
self,
|
|
2199
|
-
*,
|
|
2200
|
-
asset_id: str,
|
|
2201
|
-
sheet_id: int,
|
|
2202
|
-
title: str,
|
|
2203
|
-
active_sheet_id: typing.Optional[int] = OMIT,
|
|
2204
|
-
tab_color: typing.Optional[str] = OMIT,
|
|
2205
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
2196
|
+
self, *, asset_id: str, sheet: Sheet, request_options: typing.Optional[RequestOptions] = None
|
|
2206
2197
|
) -> AsyncHttpResponse[CreateNewSheetTabResponse]:
|
|
2207
2198
|
"""
|
|
2208
2199
|
Create a new tab in an Athena spreadsheet.
|
|
@@ -2212,17 +2203,8 @@ class AsyncRawSheetsClient:
|
|
|
2212
2203
|
asset_id : str
|
|
2213
2204
|
The ID of the spreadsheet asset
|
|
2214
2205
|
|
|
2215
|
-
|
|
2216
|
-
Sheet
|
|
2217
|
-
|
|
2218
|
-
title : str
|
|
2219
|
-
Title of the new tab
|
|
2220
|
-
|
|
2221
|
-
active_sheet_id : typing.Optional[int]
|
|
2222
|
-
Currently active sheet ID
|
|
2223
|
-
|
|
2224
|
-
tab_color : typing.Optional[str]
|
|
2225
|
-
Optional color of the new tab
|
|
2206
|
+
sheet : Sheet
|
|
2207
|
+
Sheet Specification
|
|
2226
2208
|
|
|
2227
2209
|
request_options : typing.Optional[RequestOptions]
|
|
2228
2210
|
Request-specific configuration.
|
|
@@ -2236,11 +2218,8 @@ class AsyncRawSheetsClient:
|
|
|
2236
2218
|
"api/v0/tools/sheets/tab/create",
|
|
2237
2219
|
method="POST",
|
|
2238
2220
|
json={
|
|
2239
|
-
"active_sheet_id": active_sheet_id,
|
|
2240
2221
|
"asset_id": asset_id,
|
|
2241
|
-
"
|
|
2242
|
-
"tab_color": tab_color,
|
|
2243
|
-
"title": title,
|
|
2222
|
+
"sheet": convert_and_respect_annotation_metadata(object_=sheet, annotation=Sheet, direction="write"),
|
|
2244
2223
|
},
|
|
2245
2224
|
headers={
|
|
2246
2225
|
"content-type": "application/json",
|
|
@@ -2598,7 +2577,7 @@ class AsyncRawSheetsClient:
|
|
|
2598
2577
|
self,
|
|
2599
2578
|
*,
|
|
2600
2579
|
asset_id: str,
|
|
2601
|
-
row_data: typing.Sequence[
|
|
2580
|
+
row_data: typing.Sequence[TableRowData],
|
|
2602
2581
|
table_name: str,
|
|
2603
2582
|
table_id: typing.Optional[str] = OMIT,
|
|
2604
2583
|
request_options: typing.Optional[RequestOptions] = None,
|
|
@@ -2611,7 +2590,7 @@ class AsyncRawSheetsClient:
|
|
|
2611
2590
|
asset_id : str
|
|
2612
2591
|
The ID of the spreadsheet asset
|
|
2613
2592
|
|
|
2614
|
-
row_data : typing.Sequence[
|
|
2593
|
+
row_data : typing.Sequence[TableRowData]
|
|
2615
2594
|
Array of row objects where keys are column names and values are cell values
|
|
2616
2595
|
|
|
2617
2596
|
table_name : str
|
|
@@ -2633,13 +2612,7 @@ class AsyncRawSheetsClient:
|
|
|
2633
2612
|
method="POST",
|
|
2634
2613
|
json={
|
|
2635
2614
|
"asset_id": asset_id,
|
|
2636
|
-
"row_data":
|
|
2637
|
-
object_=row_data,
|
|
2638
|
-
annotation=typing.Sequence[
|
|
2639
|
-
typing.Dict[str, typing.Optional[InsertTableRowRequestRowDataItemValue]]
|
|
2640
|
-
],
|
|
2641
|
-
direction="write",
|
|
2642
|
-
),
|
|
2615
|
+
"row_data": row_data,
|
|
2643
2616
|
"table_id": table_id,
|
|
2644
2617
|
"table_name": table_name,
|
|
2645
2618
|
},
|
|
@@ -2,6 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
# isort: skip_file
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
import typing
|
|
6
|
+
from importlib import import_module
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
if typing.TYPE_CHECKING:
|
|
9
|
+
from .update_sheet_range_request_values_item_item import UpdateSheetRangeRequestValuesItemItem
|
|
10
|
+
_dynamic_imports: typing.Dict[str, str] = {
|
|
11
|
+
"UpdateSheetRangeRequestValuesItemItem": ".update_sheet_range_request_values_item_item"
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def __getattr__(attr_name: str) -> typing.Any:
|
|
16
|
+
module_name = _dynamic_imports.get(attr_name)
|
|
17
|
+
if module_name is None:
|
|
18
|
+
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
|
|
19
|
+
try:
|
|
20
|
+
module = import_module(module_name, __package__)
|
|
21
|
+
if module_name == f".{attr_name}":
|
|
22
|
+
return module
|
|
23
|
+
else:
|
|
24
|
+
return getattr(module, attr_name)
|
|
25
|
+
except ImportError as e:
|
|
26
|
+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
|
|
27
|
+
except AttributeError as e:
|
|
28
|
+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def __dir__():
|
|
32
|
+
lazy_attrs = list(_dynamic_imports.keys())
|
|
33
|
+
return sorted(lazy_attrs)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
__all__ = ["UpdateSheetRangeRequestValuesItemItem"]
|
athena/tools/types/__init__.py
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
# isort: skip_file
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
import typing
|
|
6
|
+
from importlib import import_module
|
|
7
|
+
|
|
8
|
+
if typing.TYPE_CHECKING:
|
|
9
|
+
from .tools_data_frame_request_columns_item import ToolsDataFrameRequestColumnsItem
|
|
10
|
+
_dynamic_imports: typing.Dict[str, str] = {"ToolsDataFrameRequestColumnsItem": ".tools_data_frame_request_columns_item"}
|
|
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
|
+
|
|
6
33
|
|
|
7
34
|
__all__ = ["ToolsDataFrameRequestColumnsItem"]
|