athena-intelligence 0.1.260__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 +9 -6
- athena/assets/client.py +278 -0
- athena/assets/raw_client.py +416 -0
- athena/base_client.py +4 -4
- athena/client.py +9 -13
- athena/core/client_wrapper.py +2 -2
- athena/environment.py +1 -3
- athena/tools/client.py +4 -5
- athena/tools/raw_client.py +12 -9
- athena/types/__init__.py +9 -6
- athena/types/conversation_asset_info.py +5 -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/thread_status_response_out.py +5 -0
- {athena_intelligence-0.1.260.dist-info → athena_intelligence-0.1.303.dist-info}/METADATA +1 -1
- {athena_intelligence-0.1.260.dist-info → athena_intelligence-0.1.303.dist-info}/RECORD +18 -17
- athena/types/document_chunk.py +0 -24
- athena/types/file_chunk_request_out.py +0 -24
- {athena_intelligence-0.1.260.dist-info → athena_intelligence-0.1.303.dist-info}/WHEEL +0 -0
athena/__init__.py
CHANGED
|
@@ -31,7 +31,10 @@ if typing.TYPE_CHECKING:
|
|
|
31
31
|
ConversationAssetInfo,
|
|
32
32
|
ConversationMessage,
|
|
33
33
|
ConversationResult,
|
|
34
|
+
CreatableAssetType,
|
|
35
|
+
CreateAssetResponseOut,
|
|
34
36
|
CreateNewSheetTabResponse,
|
|
37
|
+
CreateProjectResponseOut,
|
|
35
38
|
CustomAgentResponse,
|
|
36
39
|
DataFrameRequestOut,
|
|
37
40
|
DataFrameRequestOutColumnsItem,
|
|
@@ -39,9 +42,7 @@ if typing.TYPE_CHECKING:
|
|
|
39
42
|
DataFrameRequestOutIndexItem,
|
|
40
43
|
DataFrameUnknownFormatError,
|
|
41
44
|
DimensionProperties,
|
|
42
|
-
DocumentChunk,
|
|
43
45
|
DriveAgentResponse,
|
|
44
|
-
FileChunkRequestOut,
|
|
45
46
|
FileTooLargeError,
|
|
46
47
|
FolderResponse,
|
|
47
48
|
GeneralAgentConfig,
|
|
@@ -124,7 +125,10 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
124
125
|
"ConversationAssetInfo": ".types",
|
|
125
126
|
"ConversationMessage": ".types",
|
|
126
127
|
"ConversationResult": ".types",
|
|
128
|
+
"CreatableAssetType": ".types",
|
|
129
|
+
"CreateAssetResponseOut": ".types",
|
|
127
130
|
"CreateNewSheetTabResponse": ".types",
|
|
131
|
+
"CreateProjectResponseOut": ".types",
|
|
128
132
|
"CustomAgentResponse": ".types",
|
|
129
133
|
"DataFrameRequestOut": ".types",
|
|
130
134
|
"DataFrameRequestOutColumnsItem": ".types",
|
|
@@ -132,9 +136,7 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
132
136
|
"DataFrameRequestOutIndexItem": ".types",
|
|
133
137
|
"DataFrameUnknownFormatError": ".types",
|
|
134
138
|
"DimensionProperties": ".types",
|
|
135
|
-
"DocumentChunk": ".types",
|
|
136
139
|
"DriveAgentResponse": ".types",
|
|
137
|
-
"FileChunkRequestOut": ".types",
|
|
138
140
|
"FileTooLargeError": ".types",
|
|
139
141
|
"FolderResponse": ".types",
|
|
140
142
|
"GeneralAgentConfig": ".types",
|
|
@@ -239,7 +241,10 @@ __all__ = [
|
|
|
239
241
|
"ConversationAssetInfo",
|
|
240
242
|
"ConversationMessage",
|
|
241
243
|
"ConversationResult",
|
|
244
|
+
"CreatableAssetType",
|
|
245
|
+
"CreateAssetResponseOut",
|
|
242
246
|
"CreateNewSheetTabResponse",
|
|
247
|
+
"CreateProjectResponseOut",
|
|
243
248
|
"CustomAgentResponse",
|
|
244
249
|
"DataFrameRequestOut",
|
|
245
250
|
"DataFrameRequestOutColumnsItem",
|
|
@@ -247,9 +252,7 @@ __all__ = [
|
|
|
247
252
|
"DataFrameRequestOutIndexItem",
|
|
248
253
|
"DataFrameUnknownFormatError",
|
|
249
254
|
"DimensionProperties",
|
|
250
|
-
"DocumentChunk",
|
|
251
255
|
"DriveAgentResponse",
|
|
252
|
-
"FileChunkRequestOut",
|
|
253
256
|
"FileTooLargeError",
|
|
254
257
|
"FolderResponse",
|
|
255
258
|
"GeneralAgentConfig",
|
athena/assets/client.py
CHANGED
|
@@ -4,10 +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
|
|
8
11
|
from ..types.public_asset_out import PublicAssetOut
|
|
9
12
|
from .raw_client import AsyncRawAssetsClient, RawAssetsClient
|
|
10
13
|
|
|
14
|
+
# this is used as the default value for optional parameters
|
|
15
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
16
|
+
|
|
11
17
|
|
|
12
18
|
class AssetsClient:
|
|
13
19
|
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
@@ -77,6 +83,134 @@ class AssetsClient:
|
|
|
77
83
|
)
|
|
78
84
|
return _response.data
|
|
79
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
|
+
|
|
80
214
|
def get(self, asset_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> PublicAssetOut:
|
|
81
215
|
"""
|
|
82
216
|
Retrieve a single asset by its ID. Returns comprehensive metadata including creation info, tags, timestamps, media type, and AI-generated summary.
|
|
@@ -184,6 +318,150 @@ class AsyncAssetsClient:
|
|
|
184
318
|
)
|
|
185
319
|
return _response.data
|
|
186
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
|
+
|
|
187
465
|
async def get(self, asset_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> PublicAssetOut:
|
|
188
466
|
"""
|
|
189
467
|
Retrieve a single asset by its ID. Returns comprehensive metadata including creation info, tags, timestamps, media type, and AI-generated summary.
|