athena-intelligence 0.1.210__py3-none-any.whl → 0.1.303__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- athena/__init__.py +232 -71
- athena/agents/__init__.py +33 -1
- athena/agents/client.py +81 -18
- athena/aop/client.py +2 -2
- athena/aop/raw_client.py +10 -11
- athena/assets/client.py +359 -2
- athena/assets/raw_client.py +562 -0
- athena/base_client.py +122 -22
- 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 +1 -2
- athena/errors/__init__.py +42 -7
- athena/errors/not_found_error.py +1 -2
- athena/query/__init__.py +28 -1
- athena/query/types/__init__.py +30 -1
- athena/threads/raw_client.py +4 -5
- athena/tools/__init__.py +47 -3
- athena/tools/client.py +161 -31
- athena/tools/raw_client.py +36 -34
- athena/tools/sheets/__init__.py +30 -0
- athena/tools/sheets/client.py +100 -122
- athena/tools/sheets/raw_client.py +91 -94
- athena/tools/sheets/types/__init__.py +36 -0
- athena/tools/sheets/types/update_sheet_range_request_values_item_item.py +5 -0
- athena/tools/types/__init__.py +28 -1
- athena/types/__init__.py +196 -54
- athena/types/aop_async_execute_response_out.py +0 -5
- athena/types/aop_execute_response_out.py +7 -6
- athena/types/backgroundcolor.py +7 -0
- athena/types/{document_chunk.py → border_model.py} +7 -4
- athena/types/border_style.py +7 -0
- athena/types/borders_model.py +58 -0
- athena/types/cell_format.py +49 -0
- athena/types/cell_format_horizontal_alignment.py +5 -0
- athena/types/cell_format_vertical_alignment.py +5 -0
- athena/types/color.py +7 -0
- athena/types/conversation_asset_info.py +13 -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/get_table_response.py +7 -2
- 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 +76 -0
- athena/types/tabcolor.py +7 -0
- athena/types/table_row_data.py +5 -0
- athena/types/text_format_model.py +28 -0
- athena/types/textrotation.py +5 -0
- athena/types/{asset_not_found_error.py → theme_color.py} +3 -2
- athena/types/thread_status_response_out.py +5 -0
- athena/types/wrap_strategy.py +5 -0
- {athena_intelligence-0.1.210.dist-info → athena_intelligence-0.1.303.dist-info}/METADATA +1 -1
- {athena_intelligence-0.1.210.dist-info → athena_intelligence-0.1.303.dist-info}/RECORD +62 -39
- {athena_intelligence-0.1.210.dist-info → athena_intelligence-0.1.303.dist-info}/WHEEL +0 -0
athena/assets/client.py
CHANGED
|
@@ -4,9 +4,16 @@ import typing
|
|
|
4
4
|
|
|
5
5
|
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
6
|
from ..core.request_options import RequestOptions
|
|
7
|
+
from ..types.creatable_asset_type import CreatableAssetType
|
|
8
|
+
from ..types.create_asset_response_out import CreateAssetResponseOut
|
|
9
|
+
from ..types.create_project_response_out import CreateProjectResponseOut
|
|
7
10
|
from ..types.paginated_assets_out import PaginatedAssetsOut
|
|
11
|
+
from ..types.public_asset_out import PublicAssetOut
|
|
8
12
|
from .raw_client import AsyncRawAssetsClient, RawAssetsClient
|
|
9
13
|
|
|
14
|
+
# this is used as the default value for optional parameters
|
|
15
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
16
|
+
|
|
10
17
|
|
|
11
18
|
class AssetsClient:
|
|
12
19
|
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
@@ -64,13 +71,176 @@ class AssetsClient:
|
|
|
64
71
|
client = Athena(
|
|
65
72
|
api_key="YOUR_API_KEY",
|
|
66
73
|
)
|
|
67
|
-
client.assets.list(
|
|
74
|
+
client.assets.list(
|
|
75
|
+
limit=1,
|
|
76
|
+
offset=1,
|
|
77
|
+
filters="filters",
|
|
78
|
+
sort="sort",
|
|
79
|
+
)
|
|
68
80
|
"""
|
|
69
81
|
_response = self._raw_client.list(
|
|
70
82
|
limit=limit, offset=offset, filters=filters, sort=sort, request_options=request_options
|
|
71
83
|
)
|
|
72
84
|
return _response.data
|
|
73
85
|
|
|
86
|
+
def create(
|
|
87
|
+
self,
|
|
88
|
+
*,
|
|
89
|
+
asset_type: CreatableAssetType,
|
|
90
|
+
parent_folder_id: typing.Optional[str] = OMIT,
|
|
91
|
+
title: typing.Optional[str] = OMIT,
|
|
92
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
93
|
+
) -> CreateAssetResponseOut:
|
|
94
|
+
"""
|
|
95
|
+
Create a new asset such as a spreadsheet, document, or folder in your workspace. This endpoint uses internal GraphQL mutations to create assets with proper permissions and workspace integration.
|
|
96
|
+
|
|
97
|
+
Parameters
|
|
98
|
+
----------
|
|
99
|
+
asset_type : CreatableAssetType
|
|
100
|
+
Type of asset to create. Supported types: 'spreadsheet' (or 'sheet'), 'document' (or 'doc'), 'folder'
|
|
101
|
+
|
|
102
|
+
parent_folder_id : typing.Optional[str]
|
|
103
|
+
ID of the parent folder to create the asset in
|
|
104
|
+
|
|
105
|
+
title : typing.Optional[str]
|
|
106
|
+
Title for the new asset
|
|
107
|
+
|
|
108
|
+
request_options : typing.Optional[RequestOptions]
|
|
109
|
+
Request-specific configuration.
|
|
110
|
+
|
|
111
|
+
Returns
|
|
112
|
+
-------
|
|
113
|
+
CreateAssetResponseOut
|
|
114
|
+
Asset created successfully
|
|
115
|
+
|
|
116
|
+
Examples
|
|
117
|
+
--------
|
|
118
|
+
from athena import Athena
|
|
119
|
+
|
|
120
|
+
client = Athena(
|
|
121
|
+
api_key="YOUR_API_KEY",
|
|
122
|
+
)
|
|
123
|
+
client.assets.create(
|
|
124
|
+
asset_type="spreadsheet",
|
|
125
|
+
parent_folder_id="asset_folder_12345",
|
|
126
|
+
title="My New Spreadsheet",
|
|
127
|
+
)
|
|
128
|
+
"""
|
|
129
|
+
_response = self._raw_client.create(
|
|
130
|
+
asset_type=asset_type, parent_folder_id=parent_folder_id, title=title, request_options=request_options
|
|
131
|
+
)
|
|
132
|
+
return _response.data
|
|
133
|
+
|
|
134
|
+
def create_project(
|
|
135
|
+
self,
|
|
136
|
+
*,
|
|
137
|
+
title: str,
|
|
138
|
+
custom_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
139
|
+
description: typing.Optional[str] = OMIT,
|
|
140
|
+
parent_folder_id: typing.Optional[str] = OMIT,
|
|
141
|
+
project_type: typing.Optional[str] = OMIT,
|
|
142
|
+
share_with_emails: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
143
|
+
tags: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
144
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
145
|
+
) -> CreateProjectResponseOut:
|
|
146
|
+
"""
|
|
147
|
+
Create a new project with custom metadata. Projects can be typed (e.g., 'candidate', 'user', 'company') and include flexible custom metadata for storing additional information.
|
|
148
|
+
|
|
149
|
+
Parameters
|
|
150
|
+
----------
|
|
151
|
+
title : str
|
|
152
|
+
The project title
|
|
153
|
+
|
|
154
|
+
custom_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
155
|
+
A flexible dictionary for storing custom metadata
|
|
156
|
+
|
|
157
|
+
description : typing.Optional[str]
|
|
158
|
+
Optional project description
|
|
159
|
+
|
|
160
|
+
parent_folder_id : typing.Optional[str]
|
|
161
|
+
Optional parent folder ID
|
|
162
|
+
|
|
163
|
+
project_type : typing.Optional[str]
|
|
164
|
+
User-defined project type (e.g., 'candidate', 'user', 'company')
|
|
165
|
+
|
|
166
|
+
share_with_emails : typing.Optional[typing.Sequence[str]]
|
|
167
|
+
Optional list of email addresses to share the project with (VIEW permission)
|
|
168
|
+
|
|
169
|
+
tags : typing.Optional[typing.Sequence[str]]
|
|
170
|
+
Optional list of tags for categorizing the project
|
|
171
|
+
|
|
172
|
+
request_options : typing.Optional[RequestOptions]
|
|
173
|
+
Request-specific configuration.
|
|
174
|
+
|
|
175
|
+
Returns
|
|
176
|
+
-------
|
|
177
|
+
CreateProjectResponseOut
|
|
178
|
+
Project created successfully
|
|
179
|
+
|
|
180
|
+
Examples
|
|
181
|
+
--------
|
|
182
|
+
from athena import Athena
|
|
183
|
+
|
|
184
|
+
client = Athena(
|
|
185
|
+
api_key="YOUR_API_KEY",
|
|
186
|
+
)
|
|
187
|
+
client.assets.create_project(
|
|
188
|
+
custom_metadata={
|
|
189
|
+
"email": "john.doe@example.com",
|
|
190
|
+
"phone": "+1-555-0123",
|
|
191
|
+
"source": "linkedin",
|
|
192
|
+
"status": "active",
|
|
193
|
+
},
|
|
194
|
+
description="Candidate profile for senior software engineer position",
|
|
195
|
+
parent_folder_id="asset_folder_123",
|
|
196
|
+
project_type="candidate",
|
|
197
|
+
share_with_emails=["colleague@example.com", "manager@example.com"],
|
|
198
|
+
tags=["engineering", "senior", "active"],
|
|
199
|
+
title="John Doe - Software Engineer",
|
|
200
|
+
)
|
|
201
|
+
"""
|
|
202
|
+
_response = self._raw_client.create_project(
|
|
203
|
+
title=title,
|
|
204
|
+
custom_metadata=custom_metadata,
|
|
205
|
+
description=description,
|
|
206
|
+
parent_folder_id=parent_folder_id,
|
|
207
|
+
project_type=project_type,
|
|
208
|
+
share_with_emails=share_with_emails,
|
|
209
|
+
tags=tags,
|
|
210
|
+
request_options=request_options,
|
|
211
|
+
)
|
|
212
|
+
return _response.data
|
|
213
|
+
|
|
214
|
+
def get(self, asset_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> PublicAssetOut:
|
|
215
|
+
"""
|
|
216
|
+
Retrieve a single asset by its ID. Returns comprehensive metadata including creation info, tags, timestamps, media type, and AI-generated summary.
|
|
217
|
+
|
|
218
|
+
Parameters
|
|
219
|
+
----------
|
|
220
|
+
asset_id : str
|
|
221
|
+
|
|
222
|
+
request_options : typing.Optional[RequestOptions]
|
|
223
|
+
Request-specific configuration.
|
|
224
|
+
|
|
225
|
+
Returns
|
|
226
|
+
-------
|
|
227
|
+
PublicAssetOut
|
|
228
|
+
Successfully retrieved asset
|
|
229
|
+
|
|
230
|
+
Examples
|
|
231
|
+
--------
|
|
232
|
+
from athena import Athena
|
|
233
|
+
|
|
234
|
+
client = Athena(
|
|
235
|
+
api_key="YOUR_API_KEY",
|
|
236
|
+
)
|
|
237
|
+
client.assets.get(
|
|
238
|
+
asset_id="asset_id",
|
|
239
|
+
)
|
|
240
|
+
"""
|
|
241
|
+
_response = self._raw_client.get(asset_id, request_options=request_options)
|
|
242
|
+
return _response.data
|
|
243
|
+
|
|
74
244
|
|
|
75
245
|
class AsyncAssetsClient:
|
|
76
246
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
@@ -133,7 +303,12 @@ class AsyncAssetsClient:
|
|
|
133
303
|
|
|
134
304
|
|
|
135
305
|
async def main() -> None:
|
|
136
|
-
await client.assets.list(
|
|
306
|
+
await client.assets.list(
|
|
307
|
+
limit=1,
|
|
308
|
+
offset=1,
|
|
309
|
+
filters="filters",
|
|
310
|
+
sort="sort",
|
|
311
|
+
)
|
|
137
312
|
|
|
138
313
|
|
|
139
314
|
asyncio.run(main())
|
|
@@ -142,3 +317,185 @@ class AsyncAssetsClient:
|
|
|
142
317
|
limit=limit, offset=offset, filters=filters, sort=sort, request_options=request_options
|
|
143
318
|
)
|
|
144
319
|
return _response.data
|
|
320
|
+
|
|
321
|
+
async def create(
|
|
322
|
+
self,
|
|
323
|
+
*,
|
|
324
|
+
asset_type: CreatableAssetType,
|
|
325
|
+
parent_folder_id: typing.Optional[str] = OMIT,
|
|
326
|
+
title: typing.Optional[str] = OMIT,
|
|
327
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
328
|
+
) -> CreateAssetResponseOut:
|
|
329
|
+
"""
|
|
330
|
+
Create a new asset such as a spreadsheet, document, or folder in your workspace. This endpoint uses internal GraphQL mutations to create assets with proper permissions and workspace integration.
|
|
331
|
+
|
|
332
|
+
Parameters
|
|
333
|
+
----------
|
|
334
|
+
asset_type : CreatableAssetType
|
|
335
|
+
Type of asset to create. Supported types: 'spreadsheet' (or 'sheet'), 'document' (or 'doc'), 'folder'
|
|
336
|
+
|
|
337
|
+
parent_folder_id : typing.Optional[str]
|
|
338
|
+
ID of the parent folder to create the asset in
|
|
339
|
+
|
|
340
|
+
title : typing.Optional[str]
|
|
341
|
+
Title for the new asset
|
|
342
|
+
|
|
343
|
+
request_options : typing.Optional[RequestOptions]
|
|
344
|
+
Request-specific configuration.
|
|
345
|
+
|
|
346
|
+
Returns
|
|
347
|
+
-------
|
|
348
|
+
CreateAssetResponseOut
|
|
349
|
+
Asset created successfully
|
|
350
|
+
|
|
351
|
+
Examples
|
|
352
|
+
--------
|
|
353
|
+
import asyncio
|
|
354
|
+
|
|
355
|
+
from athena import AsyncAthena
|
|
356
|
+
|
|
357
|
+
client = AsyncAthena(
|
|
358
|
+
api_key="YOUR_API_KEY",
|
|
359
|
+
)
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
async def main() -> None:
|
|
363
|
+
await client.assets.create(
|
|
364
|
+
asset_type="spreadsheet",
|
|
365
|
+
parent_folder_id="asset_folder_12345",
|
|
366
|
+
title="My New Spreadsheet",
|
|
367
|
+
)
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
asyncio.run(main())
|
|
371
|
+
"""
|
|
372
|
+
_response = await self._raw_client.create(
|
|
373
|
+
asset_type=asset_type, parent_folder_id=parent_folder_id, title=title, request_options=request_options
|
|
374
|
+
)
|
|
375
|
+
return _response.data
|
|
376
|
+
|
|
377
|
+
async def create_project(
|
|
378
|
+
self,
|
|
379
|
+
*,
|
|
380
|
+
title: str,
|
|
381
|
+
custom_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
382
|
+
description: typing.Optional[str] = OMIT,
|
|
383
|
+
parent_folder_id: typing.Optional[str] = OMIT,
|
|
384
|
+
project_type: typing.Optional[str] = OMIT,
|
|
385
|
+
share_with_emails: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
386
|
+
tags: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
387
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
388
|
+
) -> CreateProjectResponseOut:
|
|
389
|
+
"""
|
|
390
|
+
Create a new project with custom metadata. Projects can be typed (e.g., 'candidate', 'user', 'company') and include flexible custom metadata for storing additional information.
|
|
391
|
+
|
|
392
|
+
Parameters
|
|
393
|
+
----------
|
|
394
|
+
title : str
|
|
395
|
+
The project title
|
|
396
|
+
|
|
397
|
+
custom_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
398
|
+
A flexible dictionary for storing custom metadata
|
|
399
|
+
|
|
400
|
+
description : typing.Optional[str]
|
|
401
|
+
Optional project description
|
|
402
|
+
|
|
403
|
+
parent_folder_id : typing.Optional[str]
|
|
404
|
+
Optional parent folder ID
|
|
405
|
+
|
|
406
|
+
project_type : typing.Optional[str]
|
|
407
|
+
User-defined project type (e.g., 'candidate', 'user', 'company')
|
|
408
|
+
|
|
409
|
+
share_with_emails : typing.Optional[typing.Sequence[str]]
|
|
410
|
+
Optional list of email addresses to share the project with (VIEW permission)
|
|
411
|
+
|
|
412
|
+
tags : typing.Optional[typing.Sequence[str]]
|
|
413
|
+
Optional list of tags for categorizing the project
|
|
414
|
+
|
|
415
|
+
request_options : typing.Optional[RequestOptions]
|
|
416
|
+
Request-specific configuration.
|
|
417
|
+
|
|
418
|
+
Returns
|
|
419
|
+
-------
|
|
420
|
+
CreateProjectResponseOut
|
|
421
|
+
Project created successfully
|
|
422
|
+
|
|
423
|
+
Examples
|
|
424
|
+
--------
|
|
425
|
+
import asyncio
|
|
426
|
+
|
|
427
|
+
from athena import AsyncAthena
|
|
428
|
+
|
|
429
|
+
client = AsyncAthena(
|
|
430
|
+
api_key="YOUR_API_KEY",
|
|
431
|
+
)
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
async def main() -> None:
|
|
435
|
+
await client.assets.create_project(
|
|
436
|
+
custom_metadata={
|
|
437
|
+
"email": "john.doe@example.com",
|
|
438
|
+
"phone": "+1-555-0123",
|
|
439
|
+
"source": "linkedin",
|
|
440
|
+
"status": "active",
|
|
441
|
+
},
|
|
442
|
+
description="Candidate profile for senior software engineer position",
|
|
443
|
+
parent_folder_id="asset_folder_123",
|
|
444
|
+
project_type="candidate",
|
|
445
|
+
share_with_emails=["colleague@example.com", "manager@example.com"],
|
|
446
|
+
tags=["engineering", "senior", "active"],
|
|
447
|
+
title="John Doe - Software Engineer",
|
|
448
|
+
)
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
asyncio.run(main())
|
|
452
|
+
"""
|
|
453
|
+
_response = await self._raw_client.create_project(
|
|
454
|
+
title=title,
|
|
455
|
+
custom_metadata=custom_metadata,
|
|
456
|
+
description=description,
|
|
457
|
+
parent_folder_id=parent_folder_id,
|
|
458
|
+
project_type=project_type,
|
|
459
|
+
share_with_emails=share_with_emails,
|
|
460
|
+
tags=tags,
|
|
461
|
+
request_options=request_options,
|
|
462
|
+
)
|
|
463
|
+
return _response.data
|
|
464
|
+
|
|
465
|
+
async def get(self, asset_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> PublicAssetOut:
|
|
466
|
+
"""
|
|
467
|
+
Retrieve a single asset by its ID. Returns comprehensive metadata including creation info, tags, timestamps, media type, and AI-generated summary.
|
|
468
|
+
|
|
469
|
+
Parameters
|
|
470
|
+
----------
|
|
471
|
+
asset_id : str
|
|
472
|
+
|
|
473
|
+
request_options : typing.Optional[RequestOptions]
|
|
474
|
+
Request-specific configuration.
|
|
475
|
+
|
|
476
|
+
Returns
|
|
477
|
+
-------
|
|
478
|
+
PublicAssetOut
|
|
479
|
+
Successfully retrieved asset
|
|
480
|
+
|
|
481
|
+
Examples
|
|
482
|
+
--------
|
|
483
|
+
import asyncio
|
|
484
|
+
|
|
485
|
+
from athena import AsyncAthena
|
|
486
|
+
|
|
487
|
+
client = AsyncAthena(
|
|
488
|
+
api_key="YOUR_API_KEY",
|
|
489
|
+
)
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
async def main() -> None:
|
|
493
|
+
await client.assets.get(
|
|
494
|
+
asset_id="asset_id",
|
|
495
|
+
)
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
asyncio.run(main())
|
|
499
|
+
"""
|
|
500
|
+
_response = await self._raw_client.get(asset_id, request_options=request_options)
|
|
501
|
+
return _response.data
|