athena-intelligence 0.1.260__py3-none-any.whl → 0.1.375__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 CHANGED
@@ -13,7 +13,6 @@ if typing.TYPE_CHECKING:
13
13
  AssetContentRequestOut,
14
14
  AssetNode,
15
15
  AssetScreenshotResponseOut,
16
- Backgroundcolor,
17
16
  BorderModel,
18
17
  BorderStyle,
19
18
  BordersModel,
@@ -26,12 +25,14 @@ if typing.TYPE_CHECKING:
26
25
  ChunkContentItem_Text,
27
26
  ChunkResult,
28
27
  ChunkResultChunkId,
29
- Color,
30
28
  Content,
31
29
  ConversationAssetInfo,
32
30
  ConversationMessage,
33
31
  ConversationResult,
32
+ CreatableAssetType,
33
+ CreateAssetResponseOut,
34
34
  CreateNewSheetTabResponse,
35
+ CreateProjectResponseOut,
35
36
  CustomAgentResponse,
36
37
  DataFrameRequestOut,
37
38
  DataFrameRequestOutColumnsItem,
@@ -39,9 +40,7 @@ if typing.TYPE_CHECKING:
39
40
  DataFrameRequestOutIndexItem,
40
41
  DataFrameUnknownFormatError,
41
42
  DimensionProperties,
42
- DocumentChunk,
43
43
  DriveAgentResponse,
44
- FileChunkRequestOut,
45
44
  FileTooLargeError,
46
45
  FolderResponse,
47
46
  GeneralAgentConfig,
@@ -69,7 +68,6 @@ if typing.TYPE_CHECKING:
69
68
  SheetOperationResponse,
70
69
  SqlAgentResponse,
71
70
  StructuredDataExtractorResponse,
72
- Tabcolor,
73
71
  TableRowData,
74
72
  TextContent,
75
73
  TextFormatModel,
@@ -104,7 +102,6 @@ _dynamic_imports: typing.Dict[str, str] = {
104
102
  "AsyncAthena": ".client",
105
103
  "Athena": ".client",
106
104
  "AthenaEnvironment": ".environment",
107
- "Backgroundcolor": ".types",
108
105
  "BadRequestError": ".errors",
109
106
  "BorderModel": ".types",
110
107
  "BorderStyle": ".types",
@@ -118,13 +115,15 @@ _dynamic_imports: typing.Dict[str, str] = {
118
115
  "ChunkContentItem_Text": ".types",
119
116
  "ChunkResult": ".types",
120
117
  "ChunkResultChunkId": ".types",
121
- "Color": ".types",
122
118
  "Content": ".types",
123
119
  "ContentTooLargeError": ".errors",
124
120
  "ConversationAssetInfo": ".types",
125
121
  "ConversationMessage": ".types",
126
122
  "ConversationResult": ".types",
123
+ "CreatableAssetType": ".types",
124
+ "CreateAssetResponseOut": ".types",
127
125
  "CreateNewSheetTabResponse": ".types",
126
+ "CreateProjectResponseOut": ".types",
128
127
  "CustomAgentResponse": ".types",
129
128
  "DataFrameRequestOut": ".types",
130
129
  "DataFrameRequestOutColumnsItem": ".types",
@@ -132,9 +131,7 @@ _dynamic_imports: typing.Dict[str, str] = {
132
131
  "DataFrameRequestOutIndexItem": ".types",
133
132
  "DataFrameUnknownFormatError": ".types",
134
133
  "DimensionProperties": ".types",
135
- "DocumentChunk": ".types",
136
134
  "DriveAgentResponse": ".types",
137
- "FileChunkRequestOut": ".types",
138
135
  "FileTooLargeError": ".types",
139
136
  "FolderResponse": ".types",
140
137
  "GeneralAgentConfig": ".types",
@@ -165,7 +162,6 @@ _dynamic_imports: typing.Dict[str, str] = {
165
162
  "SheetOperationResponse": ".types",
166
163
  "SqlAgentResponse": ".types",
167
164
  "StructuredDataExtractorResponse": ".types",
168
- "Tabcolor": ".types",
169
165
  "TableRowData": ".types",
170
166
  "TextContent": ".types",
171
167
  "TextFormatModel": ".types",
@@ -219,7 +215,6 @@ __all__ = [
219
215
  "AsyncAthena",
220
216
  "Athena",
221
217
  "AthenaEnvironment",
222
- "Backgroundcolor",
223
218
  "BadRequestError",
224
219
  "BorderModel",
225
220
  "BorderStyle",
@@ -233,13 +228,15 @@ __all__ = [
233
228
  "ChunkContentItem_Text",
234
229
  "ChunkResult",
235
230
  "ChunkResultChunkId",
236
- "Color",
237
231
  "Content",
238
232
  "ContentTooLargeError",
239
233
  "ConversationAssetInfo",
240
234
  "ConversationMessage",
241
235
  "ConversationResult",
236
+ "CreatableAssetType",
237
+ "CreateAssetResponseOut",
242
238
  "CreateNewSheetTabResponse",
239
+ "CreateProjectResponseOut",
243
240
  "CustomAgentResponse",
244
241
  "DataFrameRequestOut",
245
242
  "DataFrameRequestOutColumnsItem",
@@ -247,9 +244,7 @@ __all__ = [
247
244
  "DataFrameRequestOutIndexItem",
248
245
  "DataFrameUnknownFormatError",
249
246
  "DimensionProperties",
250
- "DocumentChunk",
251
247
  "DriveAgentResponse",
252
- "FileChunkRequestOut",
253
248
  "FileTooLargeError",
254
249
  "FolderResponse",
255
250
  "GeneralAgentConfig",
@@ -280,7 +275,6 @@ __all__ = [
280
275
  "SheetOperationResponse",
281
276
  "SqlAgentResponse",
282
277
  "StructuredDataExtractorResponse",
283
- "Tabcolor",
284
278
  "TableRowData",
285
279
  "TextContent",
286
280
  "TextFormatModel",
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.