athena-intelligence 0.1.197__py3-none-any.whl → 0.1.199__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.
- athena/__init__.py +4 -0
- athena/core/client_wrapper.py +2 -2
- athena/tools/__init__.py +2 -2
- athena/tools/client.py +5 -0
- athena/tools/sheets/__init__.py +4 -0
- athena/tools/sheets/client.py +1918 -0
- athena/tools/sheets/raw_client.py +2306 -0
- athena/types/__init__.py +4 -0
- athena/types/create_new_sheet_tab_response.py +37 -0
- athena/types/sheet_operation_response.py +32 -0
- {athena_intelligence-0.1.197.dist-info → athena_intelligence-0.1.199.dist-info}/METADATA +1 -1
- {athena_intelligence-0.1.197.dist-info → athena_intelligence-0.1.199.dist-info}/RECORD +13 -8
- {athena_intelligence-0.1.197.dist-info → athena_intelligence-0.1.199.dist-info}/WHEEL +0 -0
@@ -0,0 +1,1918 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import typing
|
4
|
+
|
5
|
+
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
6
|
+
from ...core.request_options import RequestOptions
|
7
|
+
from ...types.create_new_sheet_tab_response import CreateNewSheetTabResponse
|
8
|
+
from ...types.sheet_operation_response import SheetOperationResponse
|
9
|
+
from .raw_client import AsyncRawSheetsClient, RawSheetsClient
|
10
|
+
|
11
|
+
# this is used as the default value for optional parameters
|
12
|
+
OMIT = typing.cast(typing.Any, ...)
|
13
|
+
|
14
|
+
|
15
|
+
class SheetsClient:
|
16
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
17
|
+
self._raw_client = RawSheetsClient(client_wrapper=client_wrapper)
|
18
|
+
|
19
|
+
@property
|
20
|
+
def with_raw_response(self) -> RawSheetsClient:
|
21
|
+
"""
|
22
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
23
|
+
|
24
|
+
Returns
|
25
|
+
-------
|
26
|
+
RawSheetsClient
|
27
|
+
"""
|
28
|
+
return self._raw_client
|
29
|
+
|
30
|
+
def update_cell(
|
31
|
+
self,
|
32
|
+
*,
|
33
|
+
asset_id: str,
|
34
|
+
column: int,
|
35
|
+
row: int,
|
36
|
+
value: str,
|
37
|
+
sheet_id: typing.Optional[int] = OMIT,
|
38
|
+
request_options: typing.Optional[RequestOptions] = None,
|
39
|
+
) -> SheetOperationResponse:
|
40
|
+
"""
|
41
|
+
Update a single cell in an Athena spreadsheet.
|
42
|
+
|
43
|
+
Parameters
|
44
|
+
----------
|
45
|
+
asset_id : str
|
46
|
+
The ID of the spreadsheet asset
|
47
|
+
|
48
|
+
column : int
|
49
|
+
1-based column index (e.g., 1 = column A)
|
50
|
+
|
51
|
+
row : int
|
52
|
+
1-based row index (e.g., 1 = first row)
|
53
|
+
|
54
|
+
value : str
|
55
|
+
Value to set in the cell
|
56
|
+
|
57
|
+
sheet_id : typing.Optional[int]
|
58
|
+
Sheet ID (defaults to 1)
|
59
|
+
|
60
|
+
request_options : typing.Optional[RequestOptions]
|
61
|
+
Request-specific configuration.
|
62
|
+
|
63
|
+
Returns
|
64
|
+
-------
|
65
|
+
SheetOperationResponse
|
66
|
+
Successful Response
|
67
|
+
|
68
|
+
Examples
|
69
|
+
--------
|
70
|
+
from athena import Athena
|
71
|
+
|
72
|
+
client = Athena(
|
73
|
+
api_key="YOUR_API_KEY",
|
74
|
+
)
|
75
|
+
client.tools.sheets.update_cell(
|
76
|
+
asset_id="asset_id",
|
77
|
+
column=1,
|
78
|
+
row=1,
|
79
|
+
value="value",
|
80
|
+
)
|
81
|
+
"""
|
82
|
+
_response = self._raw_client.update_cell(
|
83
|
+
asset_id=asset_id, column=column, row=row, value=value, sheet_id=sheet_id, request_options=request_options
|
84
|
+
)
|
85
|
+
return _response.data
|
86
|
+
|
87
|
+
def delete_cells(
|
88
|
+
self,
|
89
|
+
*,
|
90
|
+
asset_id: str,
|
91
|
+
end_column_index: int,
|
92
|
+
end_row_index: int,
|
93
|
+
start_column_index: int,
|
94
|
+
start_row_index: int,
|
95
|
+
sheet_id: typing.Optional[int] = OMIT,
|
96
|
+
request_options: typing.Optional[RequestOptions] = None,
|
97
|
+
) -> SheetOperationResponse:
|
98
|
+
"""
|
99
|
+
Delete cells from an Athena spreadsheet.
|
100
|
+
|
101
|
+
Parameters
|
102
|
+
----------
|
103
|
+
asset_id : str
|
104
|
+
The ID of the spreadsheet asset
|
105
|
+
|
106
|
+
end_column_index : int
|
107
|
+
1-based ending column index
|
108
|
+
|
109
|
+
end_row_index : int
|
110
|
+
1-based ending row index
|
111
|
+
|
112
|
+
start_column_index : int
|
113
|
+
1-based starting column index
|
114
|
+
|
115
|
+
start_row_index : int
|
116
|
+
1-based starting row index
|
117
|
+
|
118
|
+
sheet_id : typing.Optional[int]
|
119
|
+
Sheet ID (defaults to 1)
|
120
|
+
|
121
|
+
request_options : typing.Optional[RequestOptions]
|
122
|
+
Request-specific configuration.
|
123
|
+
|
124
|
+
Returns
|
125
|
+
-------
|
126
|
+
SheetOperationResponse
|
127
|
+
Successful Response
|
128
|
+
|
129
|
+
Examples
|
130
|
+
--------
|
131
|
+
from athena import Athena
|
132
|
+
|
133
|
+
client = Athena(
|
134
|
+
api_key="YOUR_API_KEY",
|
135
|
+
)
|
136
|
+
client.tools.sheets.delete_cells(
|
137
|
+
asset_id="asset_id",
|
138
|
+
end_column_index=1,
|
139
|
+
end_row_index=1,
|
140
|
+
start_column_index=1,
|
141
|
+
start_row_index=1,
|
142
|
+
)
|
143
|
+
"""
|
144
|
+
_response = self._raw_client.delete_cells(
|
145
|
+
asset_id=asset_id,
|
146
|
+
end_column_index=end_column_index,
|
147
|
+
end_row_index=end_row_index,
|
148
|
+
start_column_index=start_column_index,
|
149
|
+
start_row_index=start_row_index,
|
150
|
+
sheet_id=sheet_id,
|
151
|
+
request_options=request_options,
|
152
|
+
)
|
153
|
+
return _response.data
|
154
|
+
|
155
|
+
def delete_column(
|
156
|
+
self,
|
157
|
+
*,
|
158
|
+
asset_id: str,
|
159
|
+
column_indexes: typing.Sequence[int],
|
160
|
+
sheet_id: typing.Optional[int] = OMIT,
|
161
|
+
request_options: typing.Optional[RequestOptions] = None,
|
162
|
+
) -> SheetOperationResponse:
|
163
|
+
"""
|
164
|
+
Delete columns from an Athena spreadsheet.
|
165
|
+
|
166
|
+
Parameters
|
167
|
+
----------
|
168
|
+
asset_id : str
|
169
|
+
The ID of the spreadsheet asset
|
170
|
+
|
171
|
+
column_indexes : typing.Sequence[int]
|
172
|
+
List of 1-based column indexes to delete
|
173
|
+
|
174
|
+
sheet_id : typing.Optional[int]
|
175
|
+
Sheet ID (defaults to 1)
|
176
|
+
|
177
|
+
request_options : typing.Optional[RequestOptions]
|
178
|
+
Request-specific configuration.
|
179
|
+
|
180
|
+
Returns
|
181
|
+
-------
|
182
|
+
SheetOperationResponse
|
183
|
+
Successful Response
|
184
|
+
|
185
|
+
Examples
|
186
|
+
--------
|
187
|
+
from athena import Athena
|
188
|
+
|
189
|
+
client = Athena(
|
190
|
+
api_key="YOUR_API_KEY",
|
191
|
+
)
|
192
|
+
client.tools.sheets.delete_column(
|
193
|
+
asset_id="asset_id",
|
194
|
+
column_indexes=[1],
|
195
|
+
)
|
196
|
+
"""
|
197
|
+
_response = self._raw_client.delete_column(
|
198
|
+
asset_id=asset_id, column_indexes=column_indexes, sheet_id=sheet_id, request_options=request_options
|
199
|
+
)
|
200
|
+
return _response.data
|
201
|
+
|
202
|
+
def insert_column(
|
203
|
+
self,
|
204
|
+
*,
|
205
|
+
asset_id: str,
|
206
|
+
reference_column_index: int,
|
207
|
+
sheet_id: typing.Optional[int] = OMIT,
|
208
|
+
request_options: typing.Optional[RequestOptions] = None,
|
209
|
+
) -> SheetOperationResponse:
|
210
|
+
"""
|
211
|
+
Insert a column in an Athena spreadsheet.
|
212
|
+
|
213
|
+
Parameters
|
214
|
+
----------
|
215
|
+
asset_id : str
|
216
|
+
The ID of the spreadsheet asset
|
217
|
+
|
218
|
+
reference_column_index : int
|
219
|
+
1-based reference column index where to insert
|
220
|
+
|
221
|
+
sheet_id : typing.Optional[int]
|
222
|
+
Sheet ID (defaults to 1)
|
223
|
+
|
224
|
+
request_options : typing.Optional[RequestOptions]
|
225
|
+
Request-specific configuration.
|
226
|
+
|
227
|
+
Returns
|
228
|
+
-------
|
229
|
+
SheetOperationResponse
|
230
|
+
Successful Response
|
231
|
+
|
232
|
+
Examples
|
233
|
+
--------
|
234
|
+
from athena import Athena
|
235
|
+
|
236
|
+
client = Athena(
|
237
|
+
api_key="YOUR_API_KEY",
|
238
|
+
)
|
239
|
+
client.tools.sheets.insert_column(
|
240
|
+
asset_id="asset_id",
|
241
|
+
reference_column_index=1,
|
242
|
+
)
|
243
|
+
"""
|
244
|
+
_response = self._raw_client.insert_column(
|
245
|
+
asset_id=asset_id,
|
246
|
+
reference_column_index=reference_column_index,
|
247
|
+
sheet_id=sheet_id,
|
248
|
+
request_options=request_options,
|
249
|
+
)
|
250
|
+
return _response.data
|
251
|
+
|
252
|
+
def clear_formatting(
|
253
|
+
self,
|
254
|
+
*,
|
255
|
+
asset_id: str,
|
256
|
+
end_column_index: int,
|
257
|
+
end_row_index: int,
|
258
|
+
start_column_index: int,
|
259
|
+
start_row_index: int,
|
260
|
+
sheet_id: typing.Optional[int] = OMIT,
|
261
|
+
request_options: typing.Optional[RequestOptions] = None,
|
262
|
+
) -> SheetOperationResponse:
|
263
|
+
"""
|
264
|
+
Clear formatting from cells in an Athena spreadsheet.
|
265
|
+
|
266
|
+
Parameters
|
267
|
+
----------
|
268
|
+
asset_id : str
|
269
|
+
The ID of the spreadsheet asset
|
270
|
+
|
271
|
+
end_column_index : int
|
272
|
+
1-based ending column index
|
273
|
+
|
274
|
+
end_row_index : int
|
275
|
+
1-based ending row index
|
276
|
+
|
277
|
+
start_column_index : int
|
278
|
+
1-based starting column index
|
279
|
+
|
280
|
+
start_row_index : int
|
281
|
+
1-based starting row index
|
282
|
+
|
283
|
+
sheet_id : typing.Optional[int]
|
284
|
+
Sheet ID (defaults to 1)
|
285
|
+
|
286
|
+
request_options : typing.Optional[RequestOptions]
|
287
|
+
Request-specific configuration.
|
288
|
+
|
289
|
+
Returns
|
290
|
+
-------
|
291
|
+
SheetOperationResponse
|
292
|
+
Successful Response
|
293
|
+
|
294
|
+
Examples
|
295
|
+
--------
|
296
|
+
from athena import Athena
|
297
|
+
|
298
|
+
client = Athena(
|
299
|
+
api_key="YOUR_API_KEY",
|
300
|
+
)
|
301
|
+
client.tools.sheets.clear_formatting(
|
302
|
+
asset_id="asset_id",
|
303
|
+
end_column_index=1,
|
304
|
+
end_row_index=1,
|
305
|
+
start_column_index=1,
|
306
|
+
start_row_index=1,
|
307
|
+
)
|
308
|
+
"""
|
309
|
+
_response = self._raw_client.clear_formatting(
|
310
|
+
asset_id=asset_id,
|
311
|
+
end_column_index=end_column_index,
|
312
|
+
end_row_index=end_row_index,
|
313
|
+
start_column_index=start_column_index,
|
314
|
+
start_row_index=start_row_index,
|
315
|
+
sheet_id=sheet_id,
|
316
|
+
request_options=request_options,
|
317
|
+
)
|
318
|
+
return _response.data
|
319
|
+
|
320
|
+
def clear_range(
|
321
|
+
self,
|
322
|
+
*,
|
323
|
+
asset_id: str,
|
324
|
+
num_columns: int,
|
325
|
+
num_rows: int,
|
326
|
+
start_column: int,
|
327
|
+
start_row: int,
|
328
|
+
sheet_id: typing.Optional[int] = OMIT,
|
329
|
+
request_options: typing.Optional[RequestOptions] = None,
|
330
|
+
) -> SheetOperationResponse:
|
331
|
+
"""
|
332
|
+
Clear a range of cells in an Athena spreadsheet.
|
333
|
+
|
334
|
+
Parameters
|
335
|
+
----------
|
336
|
+
asset_id : str
|
337
|
+
The ID of the spreadsheet asset
|
338
|
+
|
339
|
+
num_columns : int
|
340
|
+
Number of columns to clear
|
341
|
+
|
342
|
+
num_rows : int
|
343
|
+
Number of rows to clear
|
344
|
+
|
345
|
+
start_column : int
|
346
|
+
1-based starting column index
|
347
|
+
|
348
|
+
start_row : int
|
349
|
+
1-based starting row index
|
350
|
+
|
351
|
+
sheet_id : typing.Optional[int]
|
352
|
+
Sheet ID (defaults to 1)
|
353
|
+
|
354
|
+
request_options : typing.Optional[RequestOptions]
|
355
|
+
Request-specific configuration.
|
356
|
+
|
357
|
+
Returns
|
358
|
+
-------
|
359
|
+
SheetOperationResponse
|
360
|
+
Successful Response
|
361
|
+
|
362
|
+
Examples
|
363
|
+
--------
|
364
|
+
from athena import Athena
|
365
|
+
|
366
|
+
client = Athena(
|
367
|
+
api_key="YOUR_API_KEY",
|
368
|
+
)
|
369
|
+
client.tools.sheets.clear_range(
|
370
|
+
asset_id="asset_id",
|
371
|
+
num_columns=1,
|
372
|
+
num_rows=1,
|
373
|
+
start_column=1,
|
374
|
+
start_row=1,
|
375
|
+
)
|
376
|
+
"""
|
377
|
+
_response = self._raw_client.clear_range(
|
378
|
+
asset_id=asset_id,
|
379
|
+
num_columns=num_columns,
|
380
|
+
num_rows=num_rows,
|
381
|
+
start_column=start_column,
|
382
|
+
start_row=start_row,
|
383
|
+
sheet_id=sheet_id,
|
384
|
+
request_options=request_options,
|
385
|
+
)
|
386
|
+
return _response.data
|
387
|
+
|
388
|
+
def format_range(
|
389
|
+
self,
|
390
|
+
*,
|
391
|
+
asset_id: str,
|
392
|
+
end_column: int,
|
393
|
+
end_row: int,
|
394
|
+
start_column: int,
|
395
|
+
start_row: int,
|
396
|
+
type: str,
|
397
|
+
value_json: str,
|
398
|
+
sheet_id: typing.Optional[int] = OMIT,
|
399
|
+
request_options: typing.Optional[RequestOptions] = None,
|
400
|
+
) -> SheetOperationResponse:
|
401
|
+
"""
|
402
|
+
Apply formatting to a range of cells in an Athena spreadsheet.
|
403
|
+
|
404
|
+
Parameters
|
405
|
+
----------
|
406
|
+
asset_id : str
|
407
|
+
The ID of the spreadsheet asset
|
408
|
+
|
409
|
+
end_column : int
|
410
|
+
1-based ending column index
|
411
|
+
|
412
|
+
end_row : int
|
413
|
+
1-based ending row index
|
414
|
+
|
415
|
+
start_column : int
|
416
|
+
1-based starting column index
|
417
|
+
|
418
|
+
start_row : int
|
419
|
+
1-based starting row index
|
420
|
+
|
421
|
+
type : str
|
422
|
+
Formatting type (e.g. backgroundColor, textFormat, borders, etc.)
|
423
|
+
|
424
|
+
value_json : str
|
425
|
+
JSON string for value param (e.g. '"#FF0000"' or '{"fontSize":12}')
|
426
|
+
|
427
|
+
sheet_id : typing.Optional[int]
|
428
|
+
Sheet ID (defaults to 1)
|
429
|
+
|
430
|
+
request_options : typing.Optional[RequestOptions]
|
431
|
+
Request-specific configuration.
|
432
|
+
|
433
|
+
Returns
|
434
|
+
-------
|
435
|
+
SheetOperationResponse
|
436
|
+
Successful Response
|
437
|
+
|
438
|
+
Examples
|
439
|
+
--------
|
440
|
+
from athena import Athena
|
441
|
+
|
442
|
+
client = Athena(
|
443
|
+
api_key="YOUR_API_KEY",
|
444
|
+
)
|
445
|
+
client.tools.sheets.format_range(
|
446
|
+
asset_id="asset_id",
|
447
|
+
end_column=1,
|
448
|
+
end_row=1,
|
449
|
+
start_column=1,
|
450
|
+
start_row=1,
|
451
|
+
type="type",
|
452
|
+
value_json="value_json",
|
453
|
+
)
|
454
|
+
"""
|
455
|
+
_response = self._raw_client.format_range(
|
456
|
+
asset_id=asset_id,
|
457
|
+
end_column=end_column,
|
458
|
+
end_row=end_row,
|
459
|
+
start_column=start_column,
|
460
|
+
start_row=start_row,
|
461
|
+
type=type,
|
462
|
+
value_json=value_json,
|
463
|
+
sheet_id=sheet_id,
|
464
|
+
request_options=request_options,
|
465
|
+
)
|
466
|
+
return _response.data
|
467
|
+
|
468
|
+
def update_range(
|
469
|
+
self,
|
470
|
+
*,
|
471
|
+
asset_id: str,
|
472
|
+
start_column: int,
|
473
|
+
start_row: int,
|
474
|
+
values: typing.Sequence[str],
|
475
|
+
sheet_id: typing.Optional[int] = OMIT,
|
476
|
+
request_options: typing.Optional[RequestOptions] = None,
|
477
|
+
) -> SheetOperationResponse:
|
478
|
+
"""
|
479
|
+
Update a range of cells in an Athena spreadsheet.
|
480
|
+
|
481
|
+
Parameters
|
482
|
+
----------
|
483
|
+
asset_id : str
|
484
|
+
The ID of the spreadsheet asset
|
485
|
+
|
486
|
+
start_column : int
|
487
|
+
1-based starting column index
|
488
|
+
|
489
|
+
start_row : int
|
490
|
+
1-based starting row index
|
491
|
+
|
492
|
+
values : typing.Sequence[str]
|
493
|
+
List of pipe-separated strings representing rows (e.g. ['A1|B1|C1', 'A2|B2|C2'])
|
494
|
+
|
495
|
+
sheet_id : typing.Optional[int]
|
496
|
+
Sheet ID (defaults to 1)
|
497
|
+
|
498
|
+
request_options : typing.Optional[RequestOptions]
|
499
|
+
Request-specific configuration.
|
500
|
+
|
501
|
+
Returns
|
502
|
+
-------
|
503
|
+
SheetOperationResponse
|
504
|
+
Successful Response
|
505
|
+
|
506
|
+
Examples
|
507
|
+
--------
|
508
|
+
from athena import Athena
|
509
|
+
|
510
|
+
client = Athena(
|
511
|
+
api_key="YOUR_API_KEY",
|
512
|
+
)
|
513
|
+
client.tools.sheets.update_range(
|
514
|
+
asset_id="asset_id",
|
515
|
+
start_column=1,
|
516
|
+
start_row=1,
|
517
|
+
values=["values"],
|
518
|
+
)
|
519
|
+
"""
|
520
|
+
_response = self._raw_client.update_range(
|
521
|
+
asset_id=asset_id,
|
522
|
+
start_column=start_column,
|
523
|
+
start_row=start_row,
|
524
|
+
values=values,
|
525
|
+
sheet_id=sheet_id,
|
526
|
+
request_options=request_options,
|
527
|
+
)
|
528
|
+
return _response.data
|
529
|
+
|
530
|
+
def duplicate_sheet(
|
531
|
+
self,
|
532
|
+
*,
|
533
|
+
asset_id: str,
|
534
|
+
sheet_id: typing.Optional[int] = OMIT,
|
535
|
+
request_options: typing.Optional[RequestOptions] = None,
|
536
|
+
) -> SheetOperationResponse:
|
537
|
+
"""
|
538
|
+
Duplicate an existing sheet in an Athena spreadsheet.
|
539
|
+
|
540
|
+
Parameters
|
541
|
+
----------
|
542
|
+
asset_id : str
|
543
|
+
The ID of the spreadsheet asset
|
544
|
+
|
545
|
+
sheet_id : typing.Optional[int]
|
546
|
+
Sheet ID to duplicate
|
547
|
+
|
548
|
+
request_options : typing.Optional[RequestOptions]
|
549
|
+
Request-specific configuration.
|
550
|
+
|
551
|
+
Returns
|
552
|
+
-------
|
553
|
+
SheetOperationResponse
|
554
|
+
Successful Response
|
555
|
+
|
556
|
+
Examples
|
557
|
+
--------
|
558
|
+
from athena import Athena
|
559
|
+
|
560
|
+
client = Athena(
|
561
|
+
api_key="YOUR_API_KEY",
|
562
|
+
)
|
563
|
+
client.tools.sheets.duplicate_sheet(
|
564
|
+
asset_id="asset_id",
|
565
|
+
)
|
566
|
+
"""
|
567
|
+
_response = self._raw_client.duplicate_sheet(
|
568
|
+
asset_id=asset_id, sheet_id=sheet_id, request_options=request_options
|
569
|
+
)
|
570
|
+
return _response.data
|
571
|
+
|
572
|
+
def create_tab(
|
573
|
+
self,
|
574
|
+
*,
|
575
|
+
asset_id: str,
|
576
|
+
sheet_id: int,
|
577
|
+
title: str,
|
578
|
+
active_sheet_id: typing.Optional[int] = OMIT,
|
579
|
+
tab_color: typing.Optional[str] = OMIT,
|
580
|
+
request_options: typing.Optional[RequestOptions] = None,
|
581
|
+
) -> CreateNewSheetTabResponse:
|
582
|
+
"""
|
583
|
+
Create a new tab in an Athena spreadsheet.
|
584
|
+
|
585
|
+
Parameters
|
586
|
+
----------
|
587
|
+
asset_id : str
|
588
|
+
The ID of the spreadsheet asset
|
589
|
+
|
590
|
+
sheet_id : int
|
591
|
+
Sheet ID of the new tab
|
592
|
+
|
593
|
+
title : str
|
594
|
+
Title of the new tab
|
595
|
+
|
596
|
+
active_sheet_id : typing.Optional[int]
|
597
|
+
Currently active sheet ID
|
598
|
+
|
599
|
+
tab_color : typing.Optional[str]
|
600
|
+
Optional color of the new tab
|
601
|
+
|
602
|
+
request_options : typing.Optional[RequestOptions]
|
603
|
+
Request-specific configuration.
|
604
|
+
|
605
|
+
Returns
|
606
|
+
-------
|
607
|
+
CreateNewSheetTabResponse
|
608
|
+
Successful Response
|
609
|
+
|
610
|
+
Examples
|
611
|
+
--------
|
612
|
+
from athena import Athena
|
613
|
+
|
614
|
+
client = Athena(
|
615
|
+
api_key="YOUR_API_KEY",
|
616
|
+
)
|
617
|
+
client.tools.sheets.create_tab(
|
618
|
+
asset_id="asset_id",
|
619
|
+
sheet_id=1,
|
620
|
+
title="title",
|
621
|
+
)
|
622
|
+
"""
|
623
|
+
_response = self._raw_client.create_tab(
|
624
|
+
asset_id=asset_id,
|
625
|
+
sheet_id=sheet_id,
|
626
|
+
title=title,
|
627
|
+
active_sheet_id=active_sheet_id,
|
628
|
+
tab_color=tab_color,
|
629
|
+
request_options=request_options,
|
630
|
+
)
|
631
|
+
return _response.data
|
632
|
+
|
633
|
+
def delete_table_column(
|
634
|
+
self,
|
635
|
+
*,
|
636
|
+
asset_id: str,
|
637
|
+
dimension_index: int,
|
638
|
+
table_id: str,
|
639
|
+
sheet_id: typing.Optional[int] = OMIT,
|
640
|
+
request_options: typing.Optional[RequestOptions] = None,
|
641
|
+
) -> SheetOperationResponse:
|
642
|
+
"""
|
643
|
+
Delete a column from a table within an Athena spreadsheet.
|
644
|
+
|
645
|
+
Parameters
|
646
|
+
----------
|
647
|
+
asset_id : str
|
648
|
+
The ID of the spreadsheet asset
|
649
|
+
|
650
|
+
dimension_index : int
|
651
|
+
0-based dimension index within the table
|
652
|
+
|
653
|
+
table_id : str
|
654
|
+
Table ID where to delete column
|
655
|
+
|
656
|
+
sheet_id : typing.Optional[int]
|
657
|
+
Sheet ID (defaults to 1)
|
658
|
+
|
659
|
+
request_options : typing.Optional[RequestOptions]
|
660
|
+
Request-specific configuration.
|
661
|
+
|
662
|
+
Returns
|
663
|
+
-------
|
664
|
+
SheetOperationResponse
|
665
|
+
Successful Response
|
666
|
+
|
667
|
+
Examples
|
668
|
+
--------
|
669
|
+
from athena import Athena
|
670
|
+
|
671
|
+
client = Athena(
|
672
|
+
api_key="YOUR_API_KEY",
|
673
|
+
)
|
674
|
+
client.tools.sheets.delete_table_column(
|
675
|
+
asset_id="asset_id",
|
676
|
+
dimension_index=1,
|
677
|
+
table_id="table_id",
|
678
|
+
)
|
679
|
+
"""
|
680
|
+
_response = self._raw_client.delete_table_column(
|
681
|
+
asset_id=asset_id,
|
682
|
+
dimension_index=dimension_index,
|
683
|
+
table_id=table_id,
|
684
|
+
sheet_id=sheet_id,
|
685
|
+
request_options=request_options,
|
686
|
+
)
|
687
|
+
return _response.data
|
688
|
+
|
689
|
+
def insert_table_column(
|
690
|
+
self,
|
691
|
+
*,
|
692
|
+
asset_id: str,
|
693
|
+
dimension_index: int,
|
694
|
+
direction: str,
|
695
|
+
table_id: str,
|
696
|
+
sheet_id: typing.Optional[int] = OMIT,
|
697
|
+
request_options: typing.Optional[RequestOptions] = None,
|
698
|
+
) -> SheetOperationResponse:
|
699
|
+
"""
|
700
|
+
Insert a column in a table within an Athena spreadsheet.
|
701
|
+
|
702
|
+
Parameters
|
703
|
+
----------
|
704
|
+
asset_id : str
|
705
|
+
The ID of the spreadsheet asset
|
706
|
+
|
707
|
+
dimension_index : int
|
708
|
+
0-based dimension index within the table
|
709
|
+
|
710
|
+
direction : str
|
711
|
+
Direction of insertion (left or right)
|
712
|
+
|
713
|
+
table_id : str
|
714
|
+
Table ID where to insert column
|
715
|
+
|
716
|
+
sheet_id : typing.Optional[int]
|
717
|
+
Sheet ID (defaults to 1)
|
718
|
+
|
719
|
+
request_options : typing.Optional[RequestOptions]
|
720
|
+
Request-specific configuration.
|
721
|
+
|
722
|
+
Returns
|
723
|
+
-------
|
724
|
+
SheetOperationResponse
|
725
|
+
Successful Response
|
726
|
+
|
727
|
+
Examples
|
728
|
+
--------
|
729
|
+
from athena import Athena
|
730
|
+
|
731
|
+
client = Athena(
|
732
|
+
api_key="YOUR_API_KEY",
|
733
|
+
)
|
734
|
+
client.tools.sheets.insert_table_column(
|
735
|
+
asset_id="asset_id",
|
736
|
+
dimension_index=1,
|
737
|
+
direction="direction",
|
738
|
+
table_id="table_id",
|
739
|
+
)
|
740
|
+
"""
|
741
|
+
_response = self._raw_client.insert_table_column(
|
742
|
+
asset_id=asset_id,
|
743
|
+
dimension_index=dimension_index,
|
744
|
+
direction=direction,
|
745
|
+
table_id=table_id,
|
746
|
+
sheet_id=sheet_id,
|
747
|
+
request_options=request_options,
|
748
|
+
)
|
749
|
+
return _response.data
|
750
|
+
|
751
|
+
def create_table(
|
752
|
+
self,
|
753
|
+
*,
|
754
|
+
asset_id: str,
|
755
|
+
end_column_index: int,
|
756
|
+
end_row_index: int,
|
757
|
+
start_column_index: int,
|
758
|
+
start_row_index: int,
|
759
|
+
table_id: str,
|
760
|
+
table_name: str,
|
761
|
+
sheet_id: typing.Optional[int] = OMIT,
|
762
|
+
request_options: typing.Optional[RequestOptions] = None,
|
763
|
+
) -> SheetOperationResponse:
|
764
|
+
"""
|
765
|
+
Create a table in an Athena spreadsheet.
|
766
|
+
|
767
|
+
Parameters
|
768
|
+
----------
|
769
|
+
asset_id : str
|
770
|
+
The ID of the spreadsheet asset
|
771
|
+
|
772
|
+
end_column_index : int
|
773
|
+
1-based ending column index
|
774
|
+
|
775
|
+
end_row_index : int
|
776
|
+
1-based ending row index
|
777
|
+
|
778
|
+
start_column_index : int
|
779
|
+
1-based starting column index
|
780
|
+
|
781
|
+
start_row_index : int
|
782
|
+
1-based starting row index
|
783
|
+
|
784
|
+
table_id : str
|
785
|
+
Unique table ID
|
786
|
+
|
787
|
+
table_name : str
|
788
|
+
Name of the table
|
789
|
+
|
790
|
+
sheet_id : typing.Optional[int]
|
791
|
+
Sheet ID (defaults to 1)
|
792
|
+
|
793
|
+
request_options : typing.Optional[RequestOptions]
|
794
|
+
Request-specific configuration.
|
795
|
+
|
796
|
+
Returns
|
797
|
+
-------
|
798
|
+
SheetOperationResponse
|
799
|
+
Successful Response
|
800
|
+
|
801
|
+
Examples
|
802
|
+
--------
|
803
|
+
from athena import Athena
|
804
|
+
|
805
|
+
client = Athena(
|
806
|
+
api_key="YOUR_API_KEY",
|
807
|
+
)
|
808
|
+
client.tools.sheets.create_table(
|
809
|
+
asset_id="asset_id",
|
810
|
+
end_column_index=1,
|
811
|
+
end_row_index=1,
|
812
|
+
start_column_index=1,
|
813
|
+
start_row_index=1,
|
814
|
+
table_id="table_id",
|
815
|
+
table_name="table_name",
|
816
|
+
)
|
817
|
+
"""
|
818
|
+
_response = self._raw_client.create_table(
|
819
|
+
asset_id=asset_id,
|
820
|
+
end_column_index=end_column_index,
|
821
|
+
end_row_index=end_row_index,
|
822
|
+
start_column_index=start_column_index,
|
823
|
+
start_row_index=start_row_index,
|
824
|
+
table_id=table_id,
|
825
|
+
table_name=table_name,
|
826
|
+
sheet_id=sheet_id,
|
827
|
+
request_options=request_options,
|
828
|
+
)
|
829
|
+
return _response.data
|
830
|
+
|
831
|
+
def update_table(
|
832
|
+
self,
|
833
|
+
*,
|
834
|
+
asset_id: str,
|
835
|
+
end_column_index: int,
|
836
|
+
end_row_index: int,
|
837
|
+
start_column_index: int,
|
838
|
+
start_row_index: int,
|
839
|
+
table_id: str,
|
840
|
+
table_name: str,
|
841
|
+
sheet_id: typing.Optional[int] = OMIT,
|
842
|
+
request_options: typing.Optional[RequestOptions] = None,
|
843
|
+
) -> SheetOperationResponse:
|
844
|
+
"""
|
845
|
+
Update an existing table in an Athena spreadsheet.
|
846
|
+
|
847
|
+
Parameters
|
848
|
+
----------
|
849
|
+
asset_id : str
|
850
|
+
The ID of the spreadsheet asset
|
851
|
+
|
852
|
+
end_column_index : int
|
853
|
+
1-based ending column index
|
854
|
+
|
855
|
+
end_row_index : int
|
856
|
+
1-based ending row index
|
857
|
+
|
858
|
+
start_column_index : int
|
859
|
+
1-based starting column index
|
860
|
+
|
861
|
+
start_row_index : int
|
862
|
+
1-based starting row index
|
863
|
+
|
864
|
+
table_id : str
|
865
|
+
Table ID to update
|
866
|
+
|
867
|
+
table_name : str
|
868
|
+
Name of the table
|
869
|
+
|
870
|
+
sheet_id : typing.Optional[int]
|
871
|
+
Sheet ID (defaults to 1)
|
872
|
+
|
873
|
+
request_options : typing.Optional[RequestOptions]
|
874
|
+
Request-specific configuration.
|
875
|
+
|
876
|
+
Returns
|
877
|
+
-------
|
878
|
+
SheetOperationResponse
|
879
|
+
Successful Response
|
880
|
+
|
881
|
+
Examples
|
882
|
+
--------
|
883
|
+
from athena import Athena
|
884
|
+
|
885
|
+
client = Athena(
|
886
|
+
api_key="YOUR_API_KEY",
|
887
|
+
)
|
888
|
+
client.tools.sheets.update_table(
|
889
|
+
asset_id="asset_id",
|
890
|
+
end_column_index=1,
|
891
|
+
end_row_index=1,
|
892
|
+
start_column_index=1,
|
893
|
+
start_row_index=1,
|
894
|
+
table_id="table_id",
|
895
|
+
table_name="table_name",
|
896
|
+
)
|
897
|
+
"""
|
898
|
+
_response = self._raw_client.update_table(
|
899
|
+
asset_id=asset_id,
|
900
|
+
end_column_index=end_column_index,
|
901
|
+
end_row_index=end_row_index,
|
902
|
+
start_column_index=start_column_index,
|
903
|
+
start_row_index=start_row_index,
|
904
|
+
table_id=table_id,
|
905
|
+
table_name=table_name,
|
906
|
+
sheet_id=sheet_id,
|
907
|
+
request_options=request_options,
|
908
|
+
)
|
909
|
+
return _response.data
|
910
|
+
|
911
|
+
|
912
|
+
class AsyncSheetsClient:
|
913
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
914
|
+
self._raw_client = AsyncRawSheetsClient(client_wrapper=client_wrapper)
|
915
|
+
|
916
|
+
@property
|
917
|
+
def with_raw_response(self) -> AsyncRawSheetsClient:
|
918
|
+
"""
|
919
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
920
|
+
|
921
|
+
Returns
|
922
|
+
-------
|
923
|
+
AsyncRawSheetsClient
|
924
|
+
"""
|
925
|
+
return self._raw_client
|
926
|
+
|
927
|
+
async def update_cell(
|
928
|
+
self,
|
929
|
+
*,
|
930
|
+
asset_id: str,
|
931
|
+
column: int,
|
932
|
+
row: int,
|
933
|
+
value: str,
|
934
|
+
sheet_id: typing.Optional[int] = OMIT,
|
935
|
+
request_options: typing.Optional[RequestOptions] = None,
|
936
|
+
) -> SheetOperationResponse:
|
937
|
+
"""
|
938
|
+
Update a single cell in an Athena spreadsheet.
|
939
|
+
|
940
|
+
Parameters
|
941
|
+
----------
|
942
|
+
asset_id : str
|
943
|
+
The ID of the spreadsheet asset
|
944
|
+
|
945
|
+
column : int
|
946
|
+
1-based column index (e.g., 1 = column A)
|
947
|
+
|
948
|
+
row : int
|
949
|
+
1-based row index (e.g., 1 = first row)
|
950
|
+
|
951
|
+
value : str
|
952
|
+
Value to set in the cell
|
953
|
+
|
954
|
+
sheet_id : typing.Optional[int]
|
955
|
+
Sheet ID (defaults to 1)
|
956
|
+
|
957
|
+
request_options : typing.Optional[RequestOptions]
|
958
|
+
Request-specific configuration.
|
959
|
+
|
960
|
+
Returns
|
961
|
+
-------
|
962
|
+
SheetOperationResponse
|
963
|
+
Successful Response
|
964
|
+
|
965
|
+
Examples
|
966
|
+
--------
|
967
|
+
import asyncio
|
968
|
+
|
969
|
+
from athena import AsyncAthena
|
970
|
+
|
971
|
+
client = AsyncAthena(
|
972
|
+
api_key="YOUR_API_KEY",
|
973
|
+
)
|
974
|
+
|
975
|
+
|
976
|
+
async def main() -> None:
|
977
|
+
await client.tools.sheets.update_cell(
|
978
|
+
asset_id="asset_id",
|
979
|
+
column=1,
|
980
|
+
row=1,
|
981
|
+
value="value",
|
982
|
+
)
|
983
|
+
|
984
|
+
|
985
|
+
asyncio.run(main())
|
986
|
+
"""
|
987
|
+
_response = await self._raw_client.update_cell(
|
988
|
+
asset_id=asset_id, column=column, row=row, value=value, sheet_id=sheet_id, request_options=request_options
|
989
|
+
)
|
990
|
+
return _response.data
|
991
|
+
|
992
|
+
async def delete_cells(
|
993
|
+
self,
|
994
|
+
*,
|
995
|
+
asset_id: str,
|
996
|
+
end_column_index: int,
|
997
|
+
end_row_index: int,
|
998
|
+
start_column_index: int,
|
999
|
+
start_row_index: int,
|
1000
|
+
sheet_id: typing.Optional[int] = OMIT,
|
1001
|
+
request_options: typing.Optional[RequestOptions] = None,
|
1002
|
+
) -> SheetOperationResponse:
|
1003
|
+
"""
|
1004
|
+
Delete cells from an Athena spreadsheet.
|
1005
|
+
|
1006
|
+
Parameters
|
1007
|
+
----------
|
1008
|
+
asset_id : str
|
1009
|
+
The ID of the spreadsheet asset
|
1010
|
+
|
1011
|
+
end_column_index : int
|
1012
|
+
1-based ending column index
|
1013
|
+
|
1014
|
+
end_row_index : int
|
1015
|
+
1-based ending row index
|
1016
|
+
|
1017
|
+
start_column_index : int
|
1018
|
+
1-based starting column index
|
1019
|
+
|
1020
|
+
start_row_index : int
|
1021
|
+
1-based starting row index
|
1022
|
+
|
1023
|
+
sheet_id : typing.Optional[int]
|
1024
|
+
Sheet ID (defaults to 1)
|
1025
|
+
|
1026
|
+
request_options : typing.Optional[RequestOptions]
|
1027
|
+
Request-specific configuration.
|
1028
|
+
|
1029
|
+
Returns
|
1030
|
+
-------
|
1031
|
+
SheetOperationResponse
|
1032
|
+
Successful Response
|
1033
|
+
|
1034
|
+
Examples
|
1035
|
+
--------
|
1036
|
+
import asyncio
|
1037
|
+
|
1038
|
+
from athena import AsyncAthena
|
1039
|
+
|
1040
|
+
client = AsyncAthena(
|
1041
|
+
api_key="YOUR_API_KEY",
|
1042
|
+
)
|
1043
|
+
|
1044
|
+
|
1045
|
+
async def main() -> None:
|
1046
|
+
await client.tools.sheets.delete_cells(
|
1047
|
+
asset_id="asset_id",
|
1048
|
+
end_column_index=1,
|
1049
|
+
end_row_index=1,
|
1050
|
+
start_column_index=1,
|
1051
|
+
start_row_index=1,
|
1052
|
+
)
|
1053
|
+
|
1054
|
+
|
1055
|
+
asyncio.run(main())
|
1056
|
+
"""
|
1057
|
+
_response = await self._raw_client.delete_cells(
|
1058
|
+
asset_id=asset_id,
|
1059
|
+
end_column_index=end_column_index,
|
1060
|
+
end_row_index=end_row_index,
|
1061
|
+
start_column_index=start_column_index,
|
1062
|
+
start_row_index=start_row_index,
|
1063
|
+
sheet_id=sheet_id,
|
1064
|
+
request_options=request_options,
|
1065
|
+
)
|
1066
|
+
return _response.data
|
1067
|
+
|
1068
|
+
async def delete_column(
|
1069
|
+
self,
|
1070
|
+
*,
|
1071
|
+
asset_id: str,
|
1072
|
+
column_indexes: typing.Sequence[int],
|
1073
|
+
sheet_id: typing.Optional[int] = OMIT,
|
1074
|
+
request_options: typing.Optional[RequestOptions] = None,
|
1075
|
+
) -> SheetOperationResponse:
|
1076
|
+
"""
|
1077
|
+
Delete columns from an Athena spreadsheet.
|
1078
|
+
|
1079
|
+
Parameters
|
1080
|
+
----------
|
1081
|
+
asset_id : str
|
1082
|
+
The ID of the spreadsheet asset
|
1083
|
+
|
1084
|
+
column_indexes : typing.Sequence[int]
|
1085
|
+
List of 1-based column indexes to delete
|
1086
|
+
|
1087
|
+
sheet_id : typing.Optional[int]
|
1088
|
+
Sheet ID (defaults to 1)
|
1089
|
+
|
1090
|
+
request_options : typing.Optional[RequestOptions]
|
1091
|
+
Request-specific configuration.
|
1092
|
+
|
1093
|
+
Returns
|
1094
|
+
-------
|
1095
|
+
SheetOperationResponse
|
1096
|
+
Successful Response
|
1097
|
+
|
1098
|
+
Examples
|
1099
|
+
--------
|
1100
|
+
import asyncio
|
1101
|
+
|
1102
|
+
from athena import AsyncAthena
|
1103
|
+
|
1104
|
+
client = AsyncAthena(
|
1105
|
+
api_key="YOUR_API_KEY",
|
1106
|
+
)
|
1107
|
+
|
1108
|
+
|
1109
|
+
async def main() -> None:
|
1110
|
+
await client.tools.sheets.delete_column(
|
1111
|
+
asset_id="asset_id",
|
1112
|
+
column_indexes=[1],
|
1113
|
+
)
|
1114
|
+
|
1115
|
+
|
1116
|
+
asyncio.run(main())
|
1117
|
+
"""
|
1118
|
+
_response = await self._raw_client.delete_column(
|
1119
|
+
asset_id=asset_id, column_indexes=column_indexes, sheet_id=sheet_id, request_options=request_options
|
1120
|
+
)
|
1121
|
+
return _response.data
|
1122
|
+
|
1123
|
+
async def insert_column(
|
1124
|
+
self,
|
1125
|
+
*,
|
1126
|
+
asset_id: str,
|
1127
|
+
reference_column_index: int,
|
1128
|
+
sheet_id: typing.Optional[int] = OMIT,
|
1129
|
+
request_options: typing.Optional[RequestOptions] = None,
|
1130
|
+
) -> SheetOperationResponse:
|
1131
|
+
"""
|
1132
|
+
Insert a column in an Athena spreadsheet.
|
1133
|
+
|
1134
|
+
Parameters
|
1135
|
+
----------
|
1136
|
+
asset_id : str
|
1137
|
+
The ID of the spreadsheet asset
|
1138
|
+
|
1139
|
+
reference_column_index : int
|
1140
|
+
1-based reference column index where to insert
|
1141
|
+
|
1142
|
+
sheet_id : typing.Optional[int]
|
1143
|
+
Sheet ID (defaults to 1)
|
1144
|
+
|
1145
|
+
request_options : typing.Optional[RequestOptions]
|
1146
|
+
Request-specific configuration.
|
1147
|
+
|
1148
|
+
Returns
|
1149
|
+
-------
|
1150
|
+
SheetOperationResponse
|
1151
|
+
Successful Response
|
1152
|
+
|
1153
|
+
Examples
|
1154
|
+
--------
|
1155
|
+
import asyncio
|
1156
|
+
|
1157
|
+
from athena import AsyncAthena
|
1158
|
+
|
1159
|
+
client = AsyncAthena(
|
1160
|
+
api_key="YOUR_API_KEY",
|
1161
|
+
)
|
1162
|
+
|
1163
|
+
|
1164
|
+
async def main() -> None:
|
1165
|
+
await client.tools.sheets.insert_column(
|
1166
|
+
asset_id="asset_id",
|
1167
|
+
reference_column_index=1,
|
1168
|
+
)
|
1169
|
+
|
1170
|
+
|
1171
|
+
asyncio.run(main())
|
1172
|
+
"""
|
1173
|
+
_response = await self._raw_client.insert_column(
|
1174
|
+
asset_id=asset_id,
|
1175
|
+
reference_column_index=reference_column_index,
|
1176
|
+
sheet_id=sheet_id,
|
1177
|
+
request_options=request_options,
|
1178
|
+
)
|
1179
|
+
return _response.data
|
1180
|
+
|
1181
|
+
async def clear_formatting(
|
1182
|
+
self,
|
1183
|
+
*,
|
1184
|
+
asset_id: str,
|
1185
|
+
end_column_index: int,
|
1186
|
+
end_row_index: int,
|
1187
|
+
start_column_index: int,
|
1188
|
+
start_row_index: int,
|
1189
|
+
sheet_id: typing.Optional[int] = OMIT,
|
1190
|
+
request_options: typing.Optional[RequestOptions] = None,
|
1191
|
+
) -> SheetOperationResponse:
|
1192
|
+
"""
|
1193
|
+
Clear formatting from cells in an Athena spreadsheet.
|
1194
|
+
|
1195
|
+
Parameters
|
1196
|
+
----------
|
1197
|
+
asset_id : str
|
1198
|
+
The ID of the spreadsheet asset
|
1199
|
+
|
1200
|
+
end_column_index : int
|
1201
|
+
1-based ending column index
|
1202
|
+
|
1203
|
+
end_row_index : int
|
1204
|
+
1-based ending row index
|
1205
|
+
|
1206
|
+
start_column_index : int
|
1207
|
+
1-based starting column index
|
1208
|
+
|
1209
|
+
start_row_index : int
|
1210
|
+
1-based starting row index
|
1211
|
+
|
1212
|
+
sheet_id : typing.Optional[int]
|
1213
|
+
Sheet ID (defaults to 1)
|
1214
|
+
|
1215
|
+
request_options : typing.Optional[RequestOptions]
|
1216
|
+
Request-specific configuration.
|
1217
|
+
|
1218
|
+
Returns
|
1219
|
+
-------
|
1220
|
+
SheetOperationResponse
|
1221
|
+
Successful Response
|
1222
|
+
|
1223
|
+
Examples
|
1224
|
+
--------
|
1225
|
+
import asyncio
|
1226
|
+
|
1227
|
+
from athena import AsyncAthena
|
1228
|
+
|
1229
|
+
client = AsyncAthena(
|
1230
|
+
api_key="YOUR_API_KEY",
|
1231
|
+
)
|
1232
|
+
|
1233
|
+
|
1234
|
+
async def main() -> None:
|
1235
|
+
await client.tools.sheets.clear_formatting(
|
1236
|
+
asset_id="asset_id",
|
1237
|
+
end_column_index=1,
|
1238
|
+
end_row_index=1,
|
1239
|
+
start_column_index=1,
|
1240
|
+
start_row_index=1,
|
1241
|
+
)
|
1242
|
+
|
1243
|
+
|
1244
|
+
asyncio.run(main())
|
1245
|
+
"""
|
1246
|
+
_response = await self._raw_client.clear_formatting(
|
1247
|
+
asset_id=asset_id,
|
1248
|
+
end_column_index=end_column_index,
|
1249
|
+
end_row_index=end_row_index,
|
1250
|
+
start_column_index=start_column_index,
|
1251
|
+
start_row_index=start_row_index,
|
1252
|
+
sheet_id=sheet_id,
|
1253
|
+
request_options=request_options,
|
1254
|
+
)
|
1255
|
+
return _response.data
|
1256
|
+
|
1257
|
+
async def clear_range(
|
1258
|
+
self,
|
1259
|
+
*,
|
1260
|
+
asset_id: str,
|
1261
|
+
num_columns: int,
|
1262
|
+
num_rows: int,
|
1263
|
+
start_column: int,
|
1264
|
+
start_row: int,
|
1265
|
+
sheet_id: typing.Optional[int] = OMIT,
|
1266
|
+
request_options: typing.Optional[RequestOptions] = None,
|
1267
|
+
) -> SheetOperationResponse:
|
1268
|
+
"""
|
1269
|
+
Clear a range of cells in an Athena spreadsheet.
|
1270
|
+
|
1271
|
+
Parameters
|
1272
|
+
----------
|
1273
|
+
asset_id : str
|
1274
|
+
The ID of the spreadsheet asset
|
1275
|
+
|
1276
|
+
num_columns : int
|
1277
|
+
Number of columns to clear
|
1278
|
+
|
1279
|
+
num_rows : int
|
1280
|
+
Number of rows to clear
|
1281
|
+
|
1282
|
+
start_column : int
|
1283
|
+
1-based starting column index
|
1284
|
+
|
1285
|
+
start_row : int
|
1286
|
+
1-based starting row index
|
1287
|
+
|
1288
|
+
sheet_id : typing.Optional[int]
|
1289
|
+
Sheet ID (defaults to 1)
|
1290
|
+
|
1291
|
+
request_options : typing.Optional[RequestOptions]
|
1292
|
+
Request-specific configuration.
|
1293
|
+
|
1294
|
+
Returns
|
1295
|
+
-------
|
1296
|
+
SheetOperationResponse
|
1297
|
+
Successful Response
|
1298
|
+
|
1299
|
+
Examples
|
1300
|
+
--------
|
1301
|
+
import asyncio
|
1302
|
+
|
1303
|
+
from athena import AsyncAthena
|
1304
|
+
|
1305
|
+
client = AsyncAthena(
|
1306
|
+
api_key="YOUR_API_KEY",
|
1307
|
+
)
|
1308
|
+
|
1309
|
+
|
1310
|
+
async def main() -> None:
|
1311
|
+
await client.tools.sheets.clear_range(
|
1312
|
+
asset_id="asset_id",
|
1313
|
+
num_columns=1,
|
1314
|
+
num_rows=1,
|
1315
|
+
start_column=1,
|
1316
|
+
start_row=1,
|
1317
|
+
)
|
1318
|
+
|
1319
|
+
|
1320
|
+
asyncio.run(main())
|
1321
|
+
"""
|
1322
|
+
_response = await self._raw_client.clear_range(
|
1323
|
+
asset_id=asset_id,
|
1324
|
+
num_columns=num_columns,
|
1325
|
+
num_rows=num_rows,
|
1326
|
+
start_column=start_column,
|
1327
|
+
start_row=start_row,
|
1328
|
+
sheet_id=sheet_id,
|
1329
|
+
request_options=request_options,
|
1330
|
+
)
|
1331
|
+
return _response.data
|
1332
|
+
|
1333
|
+
async def format_range(
|
1334
|
+
self,
|
1335
|
+
*,
|
1336
|
+
asset_id: str,
|
1337
|
+
end_column: int,
|
1338
|
+
end_row: int,
|
1339
|
+
start_column: int,
|
1340
|
+
start_row: int,
|
1341
|
+
type: str,
|
1342
|
+
value_json: str,
|
1343
|
+
sheet_id: typing.Optional[int] = OMIT,
|
1344
|
+
request_options: typing.Optional[RequestOptions] = None,
|
1345
|
+
) -> SheetOperationResponse:
|
1346
|
+
"""
|
1347
|
+
Apply formatting to a range of cells in an Athena spreadsheet.
|
1348
|
+
|
1349
|
+
Parameters
|
1350
|
+
----------
|
1351
|
+
asset_id : str
|
1352
|
+
The ID of the spreadsheet asset
|
1353
|
+
|
1354
|
+
end_column : int
|
1355
|
+
1-based ending column index
|
1356
|
+
|
1357
|
+
end_row : int
|
1358
|
+
1-based ending row index
|
1359
|
+
|
1360
|
+
start_column : int
|
1361
|
+
1-based starting column index
|
1362
|
+
|
1363
|
+
start_row : int
|
1364
|
+
1-based starting row index
|
1365
|
+
|
1366
|
+
type : str
|
1367
|
+
Formatting type (e.g. backgroundColor, textFormat, borders, etc.)
|
1368
|
+
|
1369
|
+
value_json : str
|
1370
|
+
JSON string for value param (e.g. '"#FF0000"' or '{"fontSize":12}')
|
1371
|
+
|
1372
|
+
sheet_id : typing.Optional[int]
|
1373
|
+
Sheet ID (defaults to 1)
|
1374
|
+
|
1375
|
+
request_options : typing.Optional[RequestOptions]
|
1376
|
+
Request-specific configuration.
|
1377
|
+
|
1378
|
+
Returns
|
1379
|
+
-------
|
1380
|
+
SheetOperationResponse
|
1381
|
+
Successful Response
|
1382
|
+
|
1383
|
+
Examples
|
1384
|
+
--------
|
1385
|
+
import asyncio
|
1386
|
+
|
1387
|
+
from athena import AsyncAthena
|
1388
|
+
|
1389
|
+
client = AsyncAthena(
|
1390
|
+
api_key="YOUR_API_KEY",
|
1391
|
+
)
|
1392
|
+
|
1393
|
+
|
1394
|
+
async def main() -> None:
|
1395
|
+
await client.tools.sheets.format_range(
|
1396
|
+
asset_id="asset_id",
|
1397
|
+
end_column=1,
|
1398
|
+
end_row=1,
|
1399
|
+
start_column=1,
|
1400
|
+
start_row=1,
|
1401
|
+
type="type",
|
1402
|
+
value_json="value_json",
|
1403
|
+
)
|
1404
|
+
|
1405
|
+
|
1406
|
+
asyncio.run(main())
|
1407
|
+
"""
|
1408
|
+
_response = await self._raw_client.format_range(
|
1409
|
+
asset_id=asset_id,
|
1410
|
+
end_column=end_column,
|
1411
|
+
end_row=end_row,
|
1412
|
+
start_column=start_column,
|
1413
|
+
start_row=start_row,
|
1414
|
+
type=type,
|
1415
|
+
value_json=value_json,
|
1416
|
+
sheet_id=sheet_id,
|
1417
|
+
request_options=request_options,
|
1418
|
+
)
|
1419
|
+
return _response.data
|
1420
|
+
|
1421
|
+
async def update_range(
|
1422
|
+
self,
|
1423
|
+
*,
|
1424
|
+
asset_id: str,
|
1425
|
+
start_column: int,
|
1426
|
+
start_row: int,
|
1427
|
+
values: typing.Sequence[str],
|
1428
|
+
sheet_id: typing.Optional[int] = OMIT,
|
1429
|
+
request_options: typing.Optional[RequestOptions] = None,
|
1430
|
+
) -> SheetOperationResponse:
|
1431
|
+
"""
|
1432
|
+
Update a range of cells in an Athena spreadsheet.
|
1433
|
+
|
1434
|
+
Parameters
|
1435
|
+
----------
|
1436
|
+
asset_id : str
|
1437
|
+
The ID of the spreadsheet asset
|
1438
|
+
|
1439
|
+
start_column : int
|
1440
|
+
1-based starting column index
|
1441
|
+
|
1442
|
+
start_row : int
|
1443
|
+
1-based starting row index
|
1444
|
+
|
1445
|
+
values : typing.Sequence[str]
|
1446
|
+
List of pipe-separated strings representing rows (e.g. ['A1|B1|C1', 'A2|B2|C2'])
|
1447
|
+
|
1448
|
+
sheet_id : typing.Optional[int]
|
1449
|
+
Sheet ID (defaults to 1)
|
1450
|
+
|
1451
|
+
request_options : typing.Optional[RequestOptions]
|
1452
|
+
Request-specific configuration.
|
1453
|
+
|
1454
|
+
Returns
|
1455
|
+
-------
|
1456
|
+
SheetOperationResponse
|
1457
|
+
Successful Response
|
1458
|
+
|
1459
|
+
Examples
|
1460
|
+
--------
|
1461
|
+
import asyncio
|
1462
|
+
|
1463
|
+
from athena import AsyncAthena
|
1464
|
+
|
1465
|
+
client = AsyncAthena(
|
1466
|
+
api_key="YOUR_API_KEY",
|
1467
|
+
)
|
1468
|
+
|
1469
|
+
|
1470
|
+
async def main() -> None:
|
1471
|
+
await client.tools.sheets.update_range(
|
1472
|
+
asset_id="asset_id",
|
1473
|
+
start_column=1,
|
1474
|
+
start_row=1,
|
1475
|
+
values=["values"],
|
1476
|
+
)
|
1477
|
+
|
1478
|
+
|
1479
|
+
asyncio.run(main())
|
1480
|
+
"""
|
1481
|
+
_response = await self._raw_client.update_range(
|
1482
|
+
asset_id=asset_id,
|
1483
|
+
start_column=start_column,
|
1484
|
+
start_row=start_row,
|
1485
|
+
values=values,
|
1486
|
+
sheet_id=sheet_id,
|
1487
|
+
request_options=request_options,
|
1488
|
+
)
|
1489
|
+
return _response.data
|
1490
|
+
|
1491
|
+
async def duplicate_sheet(
|
1492
|
+
self,
|
1493
|
+
*,
|
1494
|
+
asset_id: str,
|
1495
|
+
sheet_id: typing.Optional[int] = OMIT,
|
1496
|
+
request_options: typing.Optional[RequestOptions] = None,
|
1497
|
+
) -> SheetOperationResponse:
|
1498
|
+
"""
|
1499
|
+
Duplicate an existing sheet in an Athena spreadsheet.
|
1500
|
+
|
1501
|
+
Parameters
|
1502
|
+
----------
|
1503
|
+
asset_id : str
|
1504
|
+
The ID of the spreadsheet asset
|
1505
|
+
|
1506
|
+
sheet_id : typing.Optional[int]
|
1507
|
+
Sheet ID to duplicate
|
1508
|
+
|
1509
|
+
request_options : typing.Optional[RequestOptions]
|
1510
|
+
Request-specific configuration.
|
1511
|
+
|
1512
|
+
Returns
|
1513
|
+
-------
|
1514
|
+
SheetOperationResponse
|
1515
|
+
Successful Response
|
1516
|
+
|
1517
|
+
Examples
|
1518
|
+
--------
|
1519
|
+
import asyncio
|
1520
|
+
|
1521
|
+
from athena import AsyncAthena
|
1522
|
+
|
1523
|
+
client = AsyncAthena(
|
1524
|
+
api_key="YOUR_API_KEY",
|
1525
|
+
)
|
1526
|
+
|
1527
|
+
|
1528
|
+
async def main() -> None:
|
1529
|
+
await client.tools.sheets.duplicate_sheet(
|
1530
|
+
asset_id="asset_id",
|
1531
|
+
)
|
1532
|
+
|
1533
|
+
|
1534
|
+
asyncio.run(main())
|
1535
|
+
"""
|
1536
|
+
_response = await self._raw_client.duplicate_sheet(
|
1537
|
+
asset_id=asset_id, sheet_id=sheet_id, request_options=request_options
|
1538
|
+
)
|
1539
|
+
return _response.data
|
1540
|
+
|
1541
|
+
async def create_tab(
|
1542
|
+
self,
|
1543
|
+
*,
|
1544
|
+
asset_id: str,
|
1545
|
+
sheet_id: int,
|
1546
|
+
title: str,
|
1547
|
+
active_sheet_id: typing.Optional[int] = OMIT,
|
1548
|
+
tab_color: typing.Optional[str] = OMIT,
|
1549
|
+
request_options: typing.Optional[RequestOptions] = None,
|
1550
|
+
) -> CreateNewSheetTabResponse:
|
1551
|
+
"""
|
1552
|
+
Create a new tab in an Athena spreadsheet.
|
1553
|
+
|
1554
|
+
Parameters
|
1555
|
+
----------
|
1556
|
+
asset_id : str
|
1557
|
+
The ID of the spreadsheet asset
|
1558
|
+
|
1559
|
+
sheet_id : int
|
1560
|
+
Sheet ID of the new tab
|
1561
|
+
|
1562
|
+
title : str
|
1563
|
+
Title of the new tab
|
1564
|
+
|
1565
|
+
active_sheet_id : typing.Optional[int]
|
1566
|
+
Currently active sheet ID
|
1567
|
+
|
1568
|
+
tab_color : typing.Optional[str]
|
1569
|
+
Optional color of the new tab
|
1570
|
+
|
1571
|
+
request_options : typing.Optional[RequestOptions]
|
1572
|
+
Request-specific configuration.
|
1573
|
+
|
1574
|
+
Returns
|
1575
|
+
-------
|
1576
|
+
CreateNewSheetTabResponse
|
1577
|
+
Successful Response
|
1578
|
+
|
1579
|
+
Examples
|
1580
|
+
--------
|
1581
|
+
import asyncio
|
1582
|
+
|
1583
|
+
from athena import AsyncAthena
|
1584
|
+
|
1585
|
+
client = AsyncAthena(
|
1586
|
+
api_key="YOUR_API_KEY",
|
1587
|
+
)
|
1588
|
+
|
1589
|
+
|
1590
|
+
async def main() -> None:
|
1591
|
+
await client.tools.sheets.create_tab(
|
1592
|
+
asset_id="asset_id",
|
1593
|
+
sheet_id=1,
|
1594
|
+
title="title",
|
1595
|
+
)
|
1596
|
+
|
1597
|
+
|
1598
|
+
asyncio.run(main())
|
1599
|
+
"""
|
1600
|
+
_response = await self._raw_client.create_tab(
|
1601
|
+
asset_id=asset_id,
|
1602
|
+
sheet_id=sheet_id,
|
1603
|
+
title=title,
|
1604
|
+
active_sheet_id=active_sheet_id,
|
1605
|
+
tab_color=tab_color,
|
1606
|
+
request_options=request_options,
|
1607
|
+
)
|
1608
|
+
return _response.data
|
1609
|
+
|
1610
|
+
async def delete_table_column(
|
1611
|
+
self,
|
1612
|
+
*,
|
1613
|
+
asset_id: str,
|
1614
|
+
dimension_index: int,
|
1615
|
+
table_id: str,
|
1616
|
+
sheet_id: typing.Optional[int] = OMIT,
|
1617
|
+
request_options: typing.Optional[RequestOptions] = None,
|
1618
|
+
) -> SheetOperationResponse:
|
1619
|
+
"""
|
1620
|
+
Delete a column from a table within an Athena spreadsheet.
|
1621
|
+
|
1622
|
+
Parameters
|
1623
|
+
----------
|
1624
|
+
asset_id : str
|
1625
|
+
The ID of the spreadsheet asset
|
1626
|
+
|
1627
|
+
dimension_index : int
|
1628
|
+
0-based dimension index within the table
|
1629
|
+
|
1630
|
+
table_id : str
|
1631
|
+
Table ID where to delete column
|
1632
|
+
|
1633
|
+
sheet_id : typing.Optional[int]
|
1634
|
+
Sheet ID (defaults to 1)
|
1635
|
+
|
1636
|
+
request_options : typing.Optional[RequestOptions]
|
1637
|
+
Request-specific configuration.
|
1638
|
+
|
1639
|
+
Returns
|
1640
|
+
-------
|
1641
|
+
SheetOperationResponse
|
1642
|
+
Successful Response
|
1643
|
+
|
1644
|
+
Examples
|
1645
|
+
--------
|
1646
|
+
import asyncio
|
1647
|
+
|
1648
|
+
from athena import AsyncAthena
|
1649
|
+
|
1650
|
+
client = AsyncAthena(
|
1651
|
+
api_key="YOUR_API_KEY",
|
1652
|
+
)
|
1653
|
+
|
1654
|
+
|
1655
|
+
async def main() -> None:
|
1656
|
+
await client.tools.sheets.delete_table_column(
|
1657
|
+
asset_id="asset_id",
|
1658
|
+
dimension_index=1,
|
1659
|
+
table_id="table_id",
|
1660
|
+
)
|
1661
|
+
|
1662
|
+
|
1663
|
+
asyncio.run(main())
|
1664
|
+
"""
|
1665
|
+
_response = await self._raw_client.delete_table_column(
|
1666
|
+
asset_id=asset_id,
|
1667
|
+
dimension_index=dimension_index,
|
1668
|
+
table_id=table_id,
|
1669
|
+
sheet_id=sheet_id,
|
1670
|
+
request_options=request_options,
|
1671
|
+
)
|
1672
|
+
return _response.data
|
1673
|
+
|
1674
|
+
async def insert_table_column(
|
1675
|
+
self,
|
1676
|
+
*,
|
1677
|
+
asset_id: str,
|
1678
|
+
dimension_index: int,
|
1679
|
+
direction: str,
|
1680
|
+
table_id: str,
|
1681
|
+
sheet_id: typing.Optional[int] = OMIT,
|
1682
|
+
request_options: typing.Optional[RequestOptions] = None,
|
1683
|
+
) -> SheetOperationResponse:
|
1684
|
+
"""
|
1685
|
+
Insert a column in a table within an Athena spreadsheet.
|
1686
|
+
|
1687
|
+
Parameters
|
1688
|
+
----------
|
1689
|
+
asset_id : str
|
1690
|
+
The ID of the spreadsheet asset
|
1691
|
+
|
1692
|
+
dimension_index : int
|
1693
|
+
0-based dimension index within the table
|
1694
|
+
|
1695
|
+
direction : str
|
1696
|
+
Direction of insertion (left or right)
|
1697
|
+
|
1698
|
+
table_id : str
|
1699
|
+
Table ID where to insert column
|
1700
|
+
|
1701
|
+
sheet_id : typing.Optional[int]
|
1702
|
+
Sheet ID (defaults to 1)
|
1703
|
+
|
1704
|
+
request_options : typing.Optional[RequestOptions]
|
1705
|
+
Request-specific configuration.
|
1706
|
+
|
1707
|
+
Returns
|
1708
|
+
-------
|
1709
|
+
SheetOperationResponse
|
1710
|
+
Successful Response
|
1711
|
+
|
1712
|
+
Examples
|
1713
|
+
--------
|
1714
|
+
import asyncio
|
1715
|
+
|
1716
|
+
from athena import AsyncAthena
|
1717
|
+
|
1718
|
+
client = AsyncAthena(
|
1719
|
+
api_key="YOUR_API_KEY",
|
1720
|
+
)
|
1721
|
+
|
1722
|
+
|
1723
|
+
async def main() -> None:
|
1724
|
+
await client.tools.sheets.insert_table_column(
|
1725
|
+
asset_id="asset_id",
|
1726
|
+
dimension_index=1,
|
1727
|
+
direction="direction",
|
1728
|
+
table_id="table_id",
|
1729
|
+
)
|
1730
|
+
|
1731
|
+
|
1732
|
+
asyncio.run(main())
|
1733
|
+
"""
|
1734
|
+
_response = await self._raw_client.insert_table_column(
|
1735
|
+
asset_id=asset_id,
|
1736
|
+
dimension_index=dimension_index,
|
1737
|
+
direction=direction,
|
1738
|
+
table_id=table_id,
|
1739
|
+
sheet_id=sheet_id,
|
1740
|
+
request_options=request_options,
|
1741
|
+
)
|
1742
|
+
return _response.data
|
1743
|
+
|
1744
|
+
async def create_table(
|
1745
|
+
self,
|
1746
|
+
*,
|
1747
|
+
asset_id: str,
|
1748
|
+
end_column_index: int,
|
1749
|
+
end_row_index: int,
|
1750
|
+
start_column_index: int,
|
1751
|
+
start_row_index: int,
|
1752
|
+
table_id: str,
|
1753
|
+
table_name: str,
|
1754
|
+
sheet_id: typing.Optional[int] = OMIT,
|
1755
|
+
request_options: typing.Optional[RequestOptions] = None,
|
1756
|
+
) -> SheetOperationResponse:
|
1757
|
+
"""
|
1758
|
+
Create a table in an Athena spreadsheet.
|
1759
|
+
|
1760
|
+
Parameters
|
1761
|
+
----------
|
1762
|
+
asset_id : str
|
1763
|
+
The ID of the spreadsheet asset
|
1764
|
+
|
1765
|
+
end_column_index : int
|
1766
|
+
1-based ending column index
|
1767
|
+
|
1768
|
+
end_row_index : int
|
1769
|
+
1-based ending row index
|
1770
|
+
|
1771
|
+
start_column_index : int
|
1772
|
+
1-based starting column index
|
1773
|
+
|
1774
|
+
start_row_index : int
|
1775
|
+
1-based starting row index
|
1776
|
+
|
1777
|
+
table_id : str
|
1778
|
+
Unique table ID
|
1779
|
+
|
1780
|
+
table_name : str
|
1781
|
+
Name of the table
|
1782
|
+
|
1783
|
+
sheet_id : typing.Optional[int]
|
1784
|
+
Sheet ID (defaults to 1)
|
1785
|
+
|
1786
|
+
request_options : typing.Optional[RequestOptions]
|
1787
|
+
Request-specific configuration.
|
1788
|
+
|
1789
|
+
Returns
|
1790
|
+
-------
|
1791
|
+
SheetOperationResponse
|
1792
|
+
Successful Response
|
1793
|
+
|
1794
|
+
Examples
|
1795
|
+
--------
|
1796
|
+
import asyncio
|
1797
|
+
|
1798
|
+
from athena import AsyncAthena
|
1799
|
+
|
1800
|
+
client = AsyncAthena(
|
1801
|
+
api_key="YOUR_API_KEY",
|
1802
|
+
)
|
1803
|
+
|
1804
|
+
|
1805
|
+
async def main() -> None:
|
1806
|
+
await client.tools.sheets.create_table(
|
1807
|
+
asset_id="asset_id",
|
1808
|
+
end_column_index=1,
|
1809
|
+
end_row_index=1,
|
1810
|
+
start_column_index=1,
|
1811
|
+
start_row_index=1,
|
1812
|
+
table_id="table_id",
|
1813
|
+
table_name="table_name",
|
1814
|
+
)
|
1815
|
+
|
1816
|
+
|
1817
|
+
asyncio.run(main())
|
1818
|
+
"""
|
1819
|
+
_response = await self._raw_client.create_table(
|
1820
|
+
asset_id=asset_id,
|
1821
|
+
end_column_index=end_column_index,
|
1822
|
+
end_row_index=end_row_index,
|
1823
|
+
start_column_index=start_column_index,
|
1824
|
+
start_row_index=start_row_index,
|
1825
|
+
table_id=table_id,
|
1826
|
+
table_name=table_name,
|
1827
|
+
sheet_id=sheet_id,
|
1828
|
+
request_options=request_options,
|
1829
|
+
)
|
1830
|
+
return _response.data
|
1831
|
+
|
1832
|
+
async def update_table(
|
1833
|
+
self,
|
1834
|
+
*,
|
1835
|
+
asset_id: str,
|
1836
|
+
end_column_index: int,
|
1837
|
+
end_row_index: int,
|
1838
|
+
start_column_index: int,
|
1839
|
+
start_row_index: int,
|
1840
|
+
table_id: str,
|
1841
|
+
table_name: str,
|
1842
|
+
sheet_id: typing.Optional[int] = OMIT,
|
1843
|
+
request_options: typing.Optional[RequestOptions] = None,
|
1844
|
+
) -> SheetOperationResponse:
|
1845
|
+
"""
|
1846
|
+
Update an existing table in an Athena spreadsheet.
|
1847
|
+
|
1848
|
+
Parameters
|
1849
|
+
----------
|
1850
|
+
asset_id : str
|
1851
|
+
The ID of the spreadsheet asset
|
1852
|
+
|
1853
|
+
end_column_index : int
|
1854
|
+
1-based ending column index
|
1855
|
+
|
1856
|
+
end_row_index : int
|
1857
|
+
1-based ending row index
|
1858
|
+
|
1859
|
+
start_column_index : int
|
1860
|
+
1-based starting column index
|
1861
|
+
|
1862
|
+
start_row_index : int
|
1863
|
+
1-based starting row index
|
1864
|
+
|
1865
|
+
table_id : str
|
1866
|
+
Table ID to update
|
1867
|
+
|
1868
|
+
table_name : str
|
1869
|
+
Name of the table
|
1870
|
+
|
1871
|
+
sheet_id : typing.Optional[int]
|
1872
|
+
Sheet ID (defaults to 1)
|
1873
|
+
|
1874
|
+
request_options : typing.Optional[RequestOptions]
|
1875
|
+
Request-specific configuration.
|
1876
|
+
|
1877
|
+
Returns
|
1878
|
+
-------
|
1879
|
+
SheetOperationResponse
|
1880
|
+
Successful Response
|
1881
|
+
|
1882
|
+
Examples
|
1883
|
+
--------
|
1884
|
+
import asyncio
|
1885
|
+
|
1886
|
+
from athena import AsyncAthena
|
1887
|
+
|
1888
|
+
client = AsyncAthena(
|
1889
|
+
api_key="YOUR_API_KEY",
|
1890
|
+
)
|
1891
|
+
|
1892
|
+
|
1893
|
+
async def main() -> None:
|
1894
|
+
await client.tools.sheets.update_table(
|
1895
|
+
asset_id="asset_id",
|
1896
|
+
end_column_index=1,
|
1897
|
+
end_row_index=1,
|
1898
|
+
start_column_index=1,
|
1899
|
+
start_row_index=1,
|
1900
|
+
table_id="table_id",
|
1901
|
+
table_name="table_name",
|
1902
|
+
)
|
1903
|
+
|
1904
|
+
|
1905
|
+
asyncio.run(main())
|
1906
|
+
"""
|
1907
|
+
_response = await self._raw_client.update_table(
|
1908
|
+
asset_id=asset_id,
|
1909
|
+
end_column_index=end_column_index,
|
1910
|
+
end_row_index=end_row_index,
|
1911
|
+
start_column_index=start_column_index,
|
1912
|
+
start_row_index=start_row_index,
|
1913
|
+
table_id=table_id,
|
1914
|
+
table_name=table_name,
|
1915
|
+
sheet_id=sheet_id,
|
1916
|
+
request_options=request_options,
|
1917
|
+
)
|
1918
|
+
return _response.data
|