athena-intelligence 0.1.262__py3-none-any.whl → 0.1.263__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of athena-intelligence might be problematic. Click here for more details.

athena/__init__.py CHANGED
@@ -32,6 +32,7 @@ if typing.TYPE_CHECKING:
32
32
  ConversationMessage,
33
33
  ConversationResult,
34
34
  CreateNewSheetTabResponse,
35
+ CreateProjectResponseOut,
35
36
  CustomAgentResponse,
36
37
  DataFrameRequestOut,
37
38
  DataFrameRequestOutColumnsItem,
@@ -41,6 +42,7 @@ if typing.TYPE_CHECKING:
41
42
  DimensionProperties,
42
43
  DocumentChunk,
43
44
  DriveAgentResponse,
45
+ EditProjectResponseOut,
44
46
  FileChunkRequestOut,
45
47
  FileTooLargeError,
46
48
  FolderResponse,
@@ -125,6 +127,7 @@ _dynamic_imports: typing.Dict[str, str] = {
125
127
  "ConversationMessage": ".types",
126
128
  "ConversationResult": ".types",
127
129
  "CreateNewSheetTabResponse": ".types",
130
+ "CreateProjectResponseOut": ".types",
128
131
  "CustomAgentResponse": ".types",
129
132
  "DataFrameRequestOut": ".types",
130
133
  "DataFrameRequestOutColumnsItem": ".types",
@@ -134,6 +137,7 @@ _dynamic_imports: typing.Dict[str, str] = {
134
137
  "DimensionProperties": ".types",
135
138
  "DocumentChunk": ".types",
136
139
  "DriveAgentResponse": ".types",
140
+ "EditProjectResponseOut": ".types",
137
141
  "FileChunkRequestOut": ".types",
138
142
  "FileTooLargeError": ".types",
139
143
  "FolderResponse": ".types",
@@ -240,6 +244,7 @@ __all__ = [
240
244
  "ConversationMessage",
241
245
  "ConversationResult",
242
246
  "CreateNewSheetTabResponse",
247
+ "CreateProjectResponseOut",
243
248
  "CustomAgentResponse",
244
249
  "DataFrameRequestOut",
245
250
  "DataFrameRequestOutColumnsItem",
@@ -249,6 +254,7 @@ __all__ = [
249
254
  "DimensionProperties",
250
255
  "DocumentChunk",
251
256
  "DriveAgentResponse",
257
+ "EditProjectResponseOut",
252
258
  "FileChunkRequestOut",
253
259
  "FileTooLargeError",
254
260
  "FolderResponse",
athena/assets/client.py CHANGED
@@ -4,10 +4,15 @@ import typing
4
4
 
5
5
  from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
6
6
  from ..core.request_options import RequestOptions
7
+ from ..types.create_project_response_out import CreateProjectResponseOut
8
+ from ..types.edit_project_response_out import EditProjectResponseOut
7
9
  from ..types.paginated_assets_out import PaginatedAssetsOut
8
10
  from ..types.public_asset_out import PublicAssetOut
9
11
  from .raw_client import AsyncRawAssetsClient, RawAssetsClient
10
12
 
13
+ # this is used as the default value for optional parameters
14
+ OMIT = typing.cast(typing.Any, ...)
15
+
11
16
 
12
17
  class AssetsClient:
13
18
  def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -77,6 +82,142 @@ class AssetsClient:
77
82
  )
78
83
  return _response.data
79
84
 
85
+ def create_project(
86
+ self,
87
+ *,
88
+ title: str,
89
+ custom_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
90
+ description: typing.Optional[str] = OMIT,
91
+ parent_folder_id: typing.Optional[str] = OMIT,
92
+ project_type: typing.Optional[str] = OMIT,
93
+ request_options: typing.Optional[RequestOptions] = None,
94
+ ) -> CreateProjectResponseOut:
95
+ """
96
+ 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.
97
+
98
+ Parameters
99
+ ----------
100
+ title : str
101
+ The project title
102
+
103
+ custom_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
104
+ A flexible dictionary for storing custom metadata
105
+
106
+ description : typing.Optional[str]
107
+ Optional project description
108
+
109
+ parent_folder_id : typing.Optional[str]
110
+ Optional parent folder ID
111
+
112
+ project_type : typing.Optional[str]
113
+ User-defined project type (e.g., 'candidate', 'user', 'company')
114
+
115
+ request_options : typing.Optional[RequestOptions]
116
+ Request-specific configuration.
117
+
118
+ Returns
119
+ -------
120
+ CreateProjectResponseOut
121
+ Project created successfully
122
+
123
+ Examples
124
+ --------
125
+ from athena import Athena
126
+
127
+ client = Athena(
128
+ api_key="YOUR_API_KEY",
129
+ )
130
+ client.assets.create_project(
131
+ custom_metadata={
132
+ "email": "john.doe@example.com",
133
+ "phone": "+1-555-0123",
134
+ "source": "linkedin",
135
+ "status": "active",
136
+ },
137
+ description="Candidate profile for senior software engineer position",
138
+ parent_folder_id="asset_folder_123",
139
+ project_type="candidate",
140
+ title="John Doe - Software Engineer",
141
+ )
142
+ """
143
+ _response = self._raw_client.create_project(
144
+ title=title,
145
+ custom_metadata=custom_metadata,
146
+ description=description,
147
+ parent_folder_id=parent_folder_id,
148
+ project_type=project_type,
149
+ request_options=request_options,
150
+ )
151
+ return _response.data
152
+
153
+ def edit_project(
154
+ self,
155
+ *,
156
+ asset_id: str,
157
+ custom_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
158
+ description: typing.Optional[str] = OMIT,
159
+ parent_folder_id: typing.Optional[str] = OMIT,
160
+ project_type: typing.Optional[str] = OMIT,
161
+ title: typing.Optional[str] = OMIT,
162
+ request_options: typing.Optional[RequestOptions] = None,
163
+ ) -> EditProjectResponseOut:
164
+ """
165
+ Edit an existing project's metadata. All fields are optional - only provided fields will be updated. Custom metadata is merged with existing metadata (new keys added, existing keys updated).
166
+
167
+ Parameters
168
+ ----------
169
+ asset_id : str
170
+ The ID of the project to edit
171
+
172
+ custom_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
173
+ Custom metadata to merge with existing metadata (optional). New keys are added, existing keys are updated.
174
+
175
+ description : typing.Optional[str]
176
+ New project description (optional)
177
+
178
+ parent_folder_id : typing.Optional[str]
179
+ New parent folder ID (optional)
180
+
181
+ project_type : typing.Optional[str]
182
+ New project type (optional, e.g., 'candidate', 'user', 'company')
183
+
184
+ title : typing.Optional[str]
185
+ New project title (optional)
186
+
187
+ request_options : typing.Optional[RequestOptions]
188
+ Request-specific configuration.
189
+
190
+ Returns
191
+ -------
192
+ EditProjectResponseOut
193
+ Project edited successfully
194
+
195
+ Examples
196
+ --------
197
+ from athena import Athena
198
+
199
+ client = Athena(
200
+ api_key="YOUR_API_KEY",
201
+ )
202
+ client.assets.edit_project(
203
+ asset_id="asset_project_abc123",
204
+ custom_metadata={"interview_date": "2024-03-15", "status": "interviewed"},
205
+ description="Updated candidate profile",
206
+ project_type="candidate",
207
+ title="Jane Smith - Senior Engineer",
208
+ )
209
+ """
210
+ _response = self._raw_client.edit_project(
211
+ asset_id=asset_id,
212
+ custom_metadata=custom_metadata,
213
+ description=description,
214
+ parent_folder_id=parent_folder_id,
215
+ project_type=project_type,
216
+ title=title,
217
+ request_options=request_options,
218
+ )
219
+ return _response.data
220
+
80
221
  def get(self, asset_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> PublicAssetOut:
81
222
  """
82
223
  Retrieve a single asset by its ID. Returns comprehensive metadata including creation info, tags, timestamps, media type, and AI-generated summary.
@@ -184,6 +325,161 @@ class AsyncAssetsClient:
184
325
  )
185
326
  return _response.data
186
327
 
328
+ async def create_project(
329
+ self,
330
+ *,
331
+ title: str,
332
+ custom_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
333
+ description: typing.Optional[str] = OMIT,
334
+ parent_folder_id: typing.Optional[str] = OMIT,
335
+ project_type: typing.Optional[str] = OMIT,
336
+ request_options: typing.Optional[RequestOptions] = None,
337
+ ) -> CreateProjectResponseOut:
338
+ """
339
+ 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.
340
+
341
+ Parameters
342
+ ----------
343
+ title : str
344
+ The project title
345
+
346
+ custom_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
347
+ A flexible dictionary for storing custom metadata
348
+
349
+ description : typing.Optional[str]
350
+ Optional project description
351
+
352
+ parent_folder_id : typing.Optional[str]
353
+ Optional parent folder ID
354
+
355
+ project_type : typing.Optional[str]
356
+ User-defined project type (e.g., 'candidate', 'user', 'company')
357
+
358
+ request_options : typing.Optional[RequestOptions]
359
+ Request-specific configuration.
360
+
361
+ Returns
362
+ -------
363
+ CreateProjectResponseOut
364
+ Project created successfully
365
+
366
+ Examples
367
+ --------
368
+ import asyncio
369
+
370
+ from athena import AsyncAthena
371
+
372
+ client = AsyncAthena(
373
+ api_key="YOUR_API_KEY",
374
+ )
375
+
376
+
377
+ async def main() -> None:
378
+ await client.assets.create_project(
379
+ custom_metadata={
380
+ "email": "john.doe@example.com",
381
+ "phone": "+1-555-0123",
382
+ "source": "linkedin",
383
+ "status": "active",
384
+ },
385
+ description="Candidate profile for senior software engineer position",
386
+ parent_folder_id="asset_folder_123",
387
+ project_type="candidate",
388
+ title="John Doe - Software Engineer",
389
+ )
390
+
391
+
392
+ asyncio.run(main())
393
+ """
394
+ _response = await self._raw_client.create_project(
395
+ title=title,
396
+ custom_metadata=custom_metadata,
397
+ description=description,
398
+ parent_folder_id=parent_folder_id,
399
+ project_type=project_type,
400
+ request_options=request_options,
401
+ )
402
+ return _response.data
403
+
404
+ async def edit_project(
405
+ self,
406
+ *,
407
+ asset_id: str,
408
+ custom_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
409
+ description: typing.Optional[str] = OMIT,
410
+ parent_folder_id: typing.Optional[str] = OMIT,
411
+ project_type: typing.Optional[str] = OMIT,
412
+ title: typing.Optional[str] = OMIT,
413
+ request_options: typing.Optional[RequestOptions] = None,
414
+ ) -> EditProjectResponseOut:
415
+ """
416
+ Edit an existing project's metadata. All fields are optional - only provided fields will be updated. Custom metadata is merged with existing metadata (new keys added, existing keys updated).
417
+
418
+ Parameters
419
+ ----------
420
+ asset_id : str
421
+ The ID of the project to edit
422
+
423
+ custom_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
424
+ Custom metadata to merge with existing metadata (optional). New keys are added, existing keys are updated.
425
+
426
+ description : typing.Optional[str]
427
+ New project description (optional)
428
+
429
+ parent_folder_id : typing.Optional[str]
430
+ New parent folder ID (optional)
431
+
432
+ project_type : typing.Optional[str]
433
+ New project type (optional, e.g., 'candidate', 'user', 'company')
434
+
435
+ title : typing.Optional[str]
436
+ New project title (optional)
437
+
438
+ request_options : typing.Optional[RequestOptions]
439
+ Request-specific configuration.
440
+
441
+ Returns
442
+ -------
443
+ EditProjectResponseOut
444
+ Project edited successfully
445
+
446
+ Examples
447
+ --------
448
+ import asyncio
449
+
450
+ from athena import AsyncAthena
451
+
452
+ client = AsyncAthena(
453
+ api_key="YOUR_API_KEY",
454
+ )
455
+
456
+
457
+ async def main() -> None:
458
+ await client.assets.edit_project(
459
+ asset_id="asset_project_abc123",
460
+ custom_metadata={
461
+ "interview_date": "2024-03-15",
462
+ "status": "interviewed",
463
+ },
464
+ description="Updated candidate profile",
465
+ project_type="candidate",
466
+ title="Jane Smith - Senior Engineer",
467
+ )
468
+
469
+
470
+ asyncio.run(main())
471
+ """
472
+ _response = await self._raw_client.edit_project(
473
+ asset_id=asset_id,
474
+ custom_metadata=custom_metadata,
475
+ description=description,
476
+ parent_folder_id=parent_folder_id,
477
+ project_type=project_type,
478
+ title=title,
479
+ request_options=request_options,
480
+ )
481
+ return _response.data
482
+
187
483
  async def get(self, asset_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> PublicAssetOut:
188
484
  """
189
485
  Retrieve a single asset by its ID. Returns comprehensive metadata including creation info, tags, timestamps, media type, and AI-generated summary.
@@ -9,12 +9,19 @@ from ..core.http_response import AsyncHttpResponse, HttpResponse
9
9
  from ..core.jsonable_encoder import jsonable_encoder
10
10
  from ..core.pydantic_utilities import parse_obj_as
11
11
  from ..core.request_options import RequestOptions
12
+ from ..errors.bad_request_error import BadRequestError
13
+ from ..errors.internal_server_error import InternalServerError
12
14
  from ..errors.not_found_error import NotFoundError
13
15
  from ..errors.unauthorized_error import UnauthorizedError
14
16
  from ..errors.unprocessable_entity_error import UnprocessableEntityError
17
+ from ..types.create_project_response_out import CreateProjectResponseOut
18
+ from ..types.edit_project_response_out import EditProjectResponseOut
15
19
  from ..types.paginated_assets_out import PaginatedAssetsOut
16
20
  from ..types.public_asset_out import PublicAssetOut
17
21
 
22
+ # this is used as the default value for optional parameters
23
+ OMIT = typing.cast(typing.Any, ...)
24
+
18
25
 
19
26
  class RawAssetsClient:
20
27
  def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -91,6 +98,226 @@ class RawAssetsClient:
91
98
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
92
99
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
93
100
 
101
+ def create_project(
102
+ self,
103
+ *,
104
+ title: str,
105
+ custom_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
106
+ description: typing.Optional[str] = OMIT,
107
+ parent_folder_id: typing.Optional[str] = OMIT,
108
+ project_type: typing.Optional[str] = OMIT,
109
+ request_options: typing.Optional[RequestOptions] = None,
110
+ ) -> HttpResponse[CreateProjectResponseOut]:
111
+ """
112
+ 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.
113
+
114
+ Parameters
115
+ ----------
116
+ title : str
117
+ The project title
118
+
119
+ custom_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
120
+ A flexible dictionary for storing custom metadata
121
+
122
+ description : typing.Optional[str]
123
+ Optional project description
124
+
125
+ parent_folder_id : typing.Optional[str]
126
+ Optional parent folder ID
127
+
128
+ project_type : typing.Optional[str]
129
+ User-defined project type (e.g., 'candidate', 'user', 'company')
130
+
131
+ request_options : typing.Optional[RequestOptions]
132
+ Request-specific configuration.
133
+
134
+ Returns
135
+ -------
136
+ HttpResponse[CreateProjectResponseOut]
137
+ Project created successfully
138
+ """
139
+ _response = self._client_wrapper.httpx_client.request(
140
+ "api/v0/assets/create_project",
141
+ method="POST",
142
+ json={
143
+ "custom_metadata": custom_metadata,
144
+ "description": description,
145
+ "parent_folder_id": parent_folder_id,
146
+ "project_type": project_type,
147
+ "title": title,
148
+ },
149
+ headers={
150
+ "content-type": "application/json",
151
+ },
152
+ request_options=request_options,
153
+ omit=OMIT,
154
+ )
155
+ try:
156
+ if 200 <= _response.status_code < 300:
157
+ _data = typing.cast(
158
+ CreateProjectResponseOut,
159
+ parse_obj_as(
160
+ type_=CreateProjectResponseOut, # type: ignore
161
+ object_=_response.json(),
162
+ ),
163
+ )
164
+ return HttpResponse(response=_response, data=_data)
165
+ if _response.status_code == 400:
166
+ raise BadRequestError(
167
+ headers=dict(_response.headers),
168
+ body=typing.cast(
169
+ typing.Optional[typing.Any],
170
+ parse_obj_as(
171
+ type_=typing.Optional[typing.Any], # type: ignore
172
+ object_=_response.json(),
173
+ ),
174
+ ),
175
+ )
176
+ if _response.status_code == 422:
177
+ raise UnprocessableEntityError(
178
+ headers=dict(_response.headers),
179
+ body=typing.cast(
180
+ typing.Optional[typing.Any],
181
+ parse_obj_as(
182
+ type_=typing.Optional[typing.Any], # type: ignore
183
+ object_=_response.json(),
184
+ ),
185
+ ),
186
+ )
187
+ if _response.status_code == 500:
188
+ raise InternalServerError(
189
+ headers=dict(_response.headers),
190
+ body=typing.cast(
191
+ typing.Optional[typing.Any],
192
+ parse_obj_as(
193
+ type_=typing.Optional[typing.Any], # type: ignore
194
+ object_=_response.json(),
195
+ ),
196
+ ),
197
+ )
198
+ _response_json = _response.json()
199
+ except JSONDecodeError:
200
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
201
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
202
+
203
+ def edit_project(
204
+ self,
205
+ *,
206
+ asset_id: str,
207
+ custom_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
208
+ description: typing.Optional[str] = OMIT,
209
+ parent_folder_id: typing.Optional[str] = OMIT,
210
+ project_type: typing.Optional[str] = OMIT,
211
+ title: typing.Optional[str] = OMIT,
212
+ request_options: typing.Optional[RequestOptions] = None,
213
+ ) -> HttpResponse[EditProjectResponseOut]:
214
+ """
215
+ Edit an existing project's metadata. All fields are optional - only provided fields will be updated. Custom metadata is merged with existing metadata (new keys added, existing keys updated).
216
+
217
+ Parameters
218
+ ----------
219
+ asset_id : str
220
+ The ID of the project to edit
221
+
222
+ custom_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
223
+ Custom metadata to merge with existing metadata (optional). New keys are added, existing keys are updated.
224
+
225
+ description : typing.Optional[str]
226
+ New project description (optional)
227
+
228
+ parent_folder_id : typing.Optional[str]
229
+ New parent folder ID (optional)
230
+
231
+ project_type : typing.Optional[str]
232
+ New project type (optional, e.g., 'candidate', 'user', 'company')
233
+
234
+ title : typing.Optional[str]
235
+ New project title (optional)
236
+
237
+ request_options : typing.Optional[RequestOptions]
238
+ Request-specific configuration.
239
+
240
+ Returns
241
+ -------
242
+ HttpResponse[EditProjectResponseOut]
243
+ Project edited successfully
244
+ """
245
+ _response = self._client_wrapper.httpx_client.request(
246
+ "api/v0/assets/edit_project",
247
+ method="POST",
248
+ json={
249
+ "asset_id": asset_id,
250
+ "custom_metadata": custom_metadata,
251
+ "description": description,
252
+ "parent_folder_id": parent_folder_id,
253
+ "project_type": project_type,
254
+ "title": title,
255
+ },
256
+ headers={
257
+ "content-type": "application/json",
258
+ },
259
+ request_options=request_options,
260
+ omit=OMIT,
261
+ )
262
+ try:
263
+ if 200 <= _response.status_code < 300:
264
+ _data = typing.cast(
265
+ EditProjectResponseOut,
266
+ parse_obj_as(
267
+ type_=EditProjectResponseOut, # type: ignore
268
+ object_=_response.json(),
269
+ ),
270
+ )
271
+ return HttpResponse(response=_response, data=_data)
272
+ if _response.status_code == 400:
273
+ raise BadRequestError(
274
+ headers=dict(_response.headers),
275
+ body=typing.cast(
276
+ typing.Optional[typing.Any],
277
+ parse_obj_as(
278
+ type_=typing.Optional[typing.Any], # type: ignore
279
+ object_=_response.json(),
280
+ ),
281
+ ),
282
+ )
283
+ if _response.status_code == 404:
284
+ raise NotFoundError(
285
+ headers=dict(_response.headers),
286
+ body=typing.cast(
287
+ typing.Optional[typing.Any],
288
+ parse_obj_as(
289
+ type_=typing.Optional[typing.Any], # type: ignore
290
+ object_=_response.json(),
291
+ ),
292
+ ),
293
+ )
294
+ if _response.status_code == 422:
295
+ raise UnprocessableEntityError(
296
+ headers=dict(_response.headers),
297
+ body=typing.cast(
298
+ typing.Optional[typing.Any],
299
+ parse_obj_as(
300
+ type_=typing.Optional[typing.Any], # type: ignore
301
+ object_=_response.json(),
302
+ ),
303
+ ),
304
+ )
305
+ if _response.status_code == 500:
306
+ raise InternalServerError(
307
+ headers=dict(_response.headers),
308
+ body=typing.cast(
309
+ typing.Optional[typing.Any],
310
+ parse_obj_as(
311
+ type_=typing.Optional[typing.Any], # type: ignore
312
+ object_=_response.json(),
313
+ ),
314
+ ),
315
+ )
316
+ _response_json = _response.json()
317
+ except JSONDecodeError:
318
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
319
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
320
+
94
321
  def get(
95
322
  self, asset_id: str, *, request_options: typing.Optional[RequestOptions] = None
96
323
  ) -> HttpResponse[PublicAssetOut]:
@@ -238,6 +465,226 @@ class AsyncRawAssetsClient:
238
465
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
239
466
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
240
467
 
468
+ async def create_project(
469
+ self,
470
+ *,
471
+ title: str,
472
+ custom_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
473
+ description: typing.Optional[str] = OMIT,
474
+ parent_folder_id: typing.Optional[str] = OMIT,
475
+ project_type: typing.Optional[str] = OMIT,
476
+ request_options: typing.Optional[RequestOptions] = None,
477
+ ) -> AsyncHttpResponse[CreateProjectResponseOut]:
478
+ """
479
+ 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.
480
+
481
+ Parameters
482
+ ----------
483
+ title : str
484
+ The project title
485
+
486
+ custom_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
487
+ A flexible dictionary for storing custom metadata
488
+
489
+ description : typing.Optional[str]
490
+ Optional project description
491
+
492
+ parent_folder_id : typing.Optional[str]
493
+ Optional parent folder ID
494
+
495
+ project_type : typing.Optional[str]
496
+ User-defined project type (e.g., 'candidate', 'user', 'company')
497
+
498
+ request_options : typing.Optional[RequestOptions]
499
+ Request-specific configuration.
500
+
501
+ Returns
502
+ -------
503
+ AsyncHttpResponse[CreateProjectResponseOut]
504
+ Project created successfully
505
+ """
506
+ _response = await self._client_wrapper.httpx_client.request(
507
+ "api/v0/assets/create_project",
508
+ method="POST",
509
+ json={
510
+ "custom_metadata": custom_metadata,
511
+ "description": description,
512
+ "parent_folder_id": parent_folder_id,
513
+ "project_type": project_type,
514
+ "title": title,
515
+ },
516
+ headers={
517
+ "content-type": "application/json",
518
+ },
519
+ request_options=request_options,
520
+ omit=OMIT,
521
+ )
522
+ try:
523
+ if 200 <= _response.status_code < 300:
524
+ _data = typing.cast(
525
+ CreateProjectResponseOut,
526
+ parse_obj_as(
527
+ type_=CreateProjectResponseOut, # type: ignore
528
+ object_=_response.json(),
529
+ ),
530
+ )
531
+ return AsyncHttpResponse(response=_response, data=_data)
532
+ if _response.status_code == 400:
533
+ raise BadRequestError(
534
+ headers=dict(_response.headers),
535
+ body=typing.cast(
536
+ typing.Optional[typing.Any],
537
+ parse_obj_as(
538
+ type_=typing.Optional[typing.Any], # type: ignore
539
+ object_=_response.json(),
540
+ ),
541
+ ),
542
+ )
543
+ if _response.status_code == 422:
544
+ raise UnprocessableEntityError(
545
+ headers=dict(_response.headers),
546
+ body=typing.cast(
547
+ typing.Optional[typing.Any],
548
+ parse_obj_as(
549
+ type_=typing.Optional[typing.Any], # type: ignore
550
+ object_=_response.json(),
551
+ ),
552
+ ),
553
+ )
554
+ if _response.status_code == 500:
555
+ raise InternalServerError(
556
+ headers=dict(_response.headers),
557
+ body=typing.cast(
558
+ typing.Optional[typing.Any],
559
+ parse_obj_as(
560
+ type_=typing.Optional[typing.Any], # type: ignore
561
+ object_=_response.json(),
562
+ ),
563
+ ),
564
+ )
565
+ _response_json = _response.json()
566
+ except JSONDecodeError:
567
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
568
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
569
+
570
+ async def edit_project(
571
+ self,
572
+ *,
573
+ asset_id: str,
574
+ custom_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
575
+ description: typing.Optional[str] = OMIT,
576
+ parent_folder_id: typing.Optional[str] = OMIT,
577
+ project_type: typing.Optional[str] = OMIT,
578
+ title: typing.Optional[str] = OMIT,
579
+ request_options: typing.Optional[RequestOptions] = None,
580
+ ) -> AsyncHttpResponse[EditProjectResponseOut]:
581
+ """
582
+ Edit an existing project's metadata. All fields are optional - only provided fields will be updated. Custom metadata is merged with existing metadata (new keys added, existing keys updated).
583
+
584
+ Parameters
585
+ ----------
586
+ asset_id : str
587
+ The ID of the project to edit
588
+
589
+ custom_metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
590
+ Custom metadata to merge with existing metadata (optional). New keys are added, existing keys are updated.
591
+
592
+ description : typing.Optional[str]
593
+ New project description (optional)
594
+
595
+ parent_folder_id : typing.Optional[str]
596
+ New parent folder ID (optional)
597
+
598
+ project_type : typing.Optional[str]
599
+ New project type (optional, e.g., 'candidate', 'user', 'company')
600
+
601
+ title : typing.Optional[str]
602
+ New project title (optional)
603
+
604
+ request_options : typing.Optional[RequestOptions]
605
+ Request-specific configuration.
606
+
607
+ Returns
608
+ -------
609
+ AsyncHttpResponse[EditProjectResponseOut]
610
+ Project edited successfully
611
+ """
612
+ _response = await self._client_wrapper.httpx_client.request(
613
+ "api/v0/assets/edit_project",
614
+ method="POST",
615
+ json={
616
+ "asset_id": asset_id,
617
+ "custom_metadata": custom_metadata,
618
+ "description": description,
619
+ "parent_folder_id": parent_folder_id,
620
+ "project_type": project_type,
621
+ "title": title,
622
+ },
623
+ headers={
624
+ "content-type": "application/json",
625
+ },
626
+ request_options=request_options,
627
+ omit=OMIT,
628
+ )
629
+ try:
630
+ if 200 <= _response.status_code < 300:
631
+ _data = typing.cast(
632
+ EditProjectResponseOut,
633
+ parse_obj_as(
634
+ type_=EditProjectResponseOut, # type: ignore
635
+ object_=_response.json(),
636
+ ),
637
+ )
638
+ return AsyncHttpResponse(response=_response, data=_data)
639
+ if _response.status_code == 400:
640
+ raise BadRequestError(
641
+ headers=dict(_response.headers),
642
+ body=typing.cast(
643
+ typing.Optional[typing.Any],
644
+ parse_obj_as(
645
+ type_=typing.Optional[typing.Any], # type: ignore
646
+ object_=_response.json(),
647
+ ),
648
+ ),
649
+ )
650
+ if _response.status_code == 404:
651
+ raise NotFoundError(
652
+ headers=dict(_response.headers),
653
+ body=typing.cast(
654
+ typing.Optional[typing.Any],
655
+ parse_obj_as(
656
+ type_=typing.Optional[typing.Any], # type: ignore
657
+ object_=_response.json(),
658
+ ),
659
+ ),
660
+ )
661
+ if _response.status_code == 422:
662
+ raise UnprocessableEntityError(
663
+ headers=dict(_response.headers),
664
+ body=typing.cast(
665
+ typing.Optional[typing.Any],
666
+ parse_obj_as(
667
+ type_=typing.Optional[typing.Any], # type: ignore
668
+ object_=_response.json(),
669
+ ),
670
+ ),
671
+ )
672
+ if _response.status_code == 500:
673
+ raise InternalServerError(
674
+ headers=dict(_response.headers),
675
+ body=typing.cast(
676
+ typing.Optional[typing.Any],
677
+ parse_obj_as(
678
+ type_=typing.Optional[typing.Any], # type: ignore
679
+ object_=_response.json(),
680
+ ),
681
+ ),
682
+ )
683
+ _response_json = _response.json()
684
+ except JSONDecodeError:
685
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
686
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
687
+
241
688
  async def get(
242
689
  self, asset_id: str, *, request_options: typing.Optional[RequestOptions] = None
243
690
  ) -> AsyncHttpResponse[PublicAssetOut]:
@@ -22,10 +22,10 @@ class BaseClientWrapper:
22
22
 
23
23
  def get_headers(self) -> typing.Dict[str, str]:
24
24
  headers: typing.Dict[str, str] = {
25
- "User-Agent": "athena-intelligence/0.1.262",
25
+ "User-Agent": "athena-intelligence/0.1.263",
26
26
  "X-Fern-Language": "Python",
27
27
  "X-Fern-SDK-Name": "athena-intelligence",
28
- "X-Fern-SDK-Version": "0.1.262",
28
+ "X-Fern-SDK-Version": "0.1.263",
29
29
  **(self.get_custom_headers() or {}),
30
30
  }
31
31
  headers["X-API-KEY"] = self.api_key
athena/types/__init__.py CHANGED
@@ -29,6 +29,7 @@ if typing.TYPE_CHECKING:
29
29
  from .conversation_message import ConversationMessage
30
30
  from .conversation_result import ConversationResult
31
31
  from .create_new_sheet_tab_response import CreateNewSheetTabResponse
32
+ from .create_project_response_out import CreateProjectResponseOut
32
33
  from .custom_agent_response import CustomAgentResponse
33
34
  from .data_frame_request_out import DataFrameRequestOut
34
35
  from .data_frame_request_out_columns_item import DataFrameRequestOutColumnsItem
@@ -38,6 +39,7 @@ if typing.TYPE_CHECKING:
38
39
  from .dimension_properties import DimensionProperties
39
40
  from .document_chunk import DocumentChunk
40
41
  from .drive_agent_response import DriveAgentResponse
42
+ from .edit_project_response_out import EditProjectResponseOut
41
43
  from .file_chunk_request_out import FileChunkRequestOut
42
44
  from .file_too_large_error import FileTooLargeError
43
45
  from .folder_response import FolderResponse
@@ -103,6 +105,7 @@ _dynamic_imports: typing.Dict[str, str] = {
103
105
  "ConversationMessage": ".conversation_message",
104
106
  "ConversationResult": ".conversation_result",
105
107
  "CreateNewSheetTabResponse": ".create_new_sheet_tab_response",
108
+ "CreateProjectResponseOut": ".create_project_response_out",
106
109
  "CustomAgentResponse": ".custom_agent_response",
107
110
  "DataFrameRequestOut": ".data_frame_request_out",
108
111
  "DataFrameRequestOutColumnsItem": ".data_frame_request_out_columns_item",
@@ -112,6 +115,7 @@ _dynamic_imports: typing.Dict[str, str] = {
112
115
  "DimensionProperties": ".dimension_properties",
113
116
  "DocumentChunk": ".document_chunk",
114
117
  "DriveAgentResponse": ".drive_agent_response",
118
+ "EditProjectResponseOut": ".edit_project_response_out",
115
119
  "FileChunkRequestOut": ".file_chunk_request_out",
116
120
  "FileTooLargeError": ".file_too_large_error",
117
121
  "FolderResponse": ".folder_response",
@@ -199,6 +203,7 @@ __all__ = [
199
203
  "ConversationMessage",
200
204
  "ConversationResult",
201
205
  "CreateNewSheetTabResponse",
206
+ "CreateProjectResponseOut",
202
207
  "CustomAgentResponse",
203
208
  "DataFrameRequestOut",
204
209
  "DataFrameRequestOutColumnsItem",
@@ -208,6 +213,7 @@ __all__ = [
208
213
  "DimensionProperties",
209
214
  "DocumentChunk",
210
215
  "DriveAgentResponse",
216
+ "EditProjectResponseOut",
211
217
  "FileChunkRequestOut",
212
218
  "FileTooLargeError",
213
219
  "FolderResponse",
@@ -0,0 +1,46 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+
8
+
9
+ class CreateProjectResponseOut(UniversalBaseModel):
10
+ """
11
+ Response model for project creation.
12
+ """
13
+
14
+ asset_id: str = pydantic.Field()
15
+ """
16
+ ID of the created project asset
17
+ """
18
+
19
+ custom_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
20
+ """
21
+ Custom metadata associated with the project
22
+ """
23
+
24
+ description: typing.Optional[str] = pydantic.Field(default=None)
25
+ """
26
+ Description of the project
27
+ """
28
+
29
+ project_type: typing.Optional[str] = pydantic.Field(default=None)
30
+ """
31
+ Type of the project
32
+ """
33
+
34
+ title: str = pydantic.Field()
35
+ """
36
+ Title of the created project
37
+ """
38
+
39
+ if IS_PYDANTIC_V2:
40
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
41
+ else:
42
+
43
+ class Config:
44
+ frozen = True
45
+ smart_union = True
46
+ extra = pydantic.Extra.allow
@@ -0,0 +1,46 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+
8
+
9
+ class EditProjectResponseOut(UniversalBaseModel):
10
+ """
11
+ Response model for editing a project.
12
+ """
13
+
14
+ asset_id: str = pydantic.Field()
15
+ """
16
+ The ID of the edited project
17
+ """
18
+
19
+ custom_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
20
+ """
21
+ The updated custom metadata
22
+ """
23
+
24
+ description: typing.Optional[str] = pydantic.Field(default=None)
25
+ """
26
+ The updated project description
27
+ """
28
+
29
+ project_type: typing.Optional[str] = pydantic.Field(default=None)
30
+ """
31
+ The updated project type
32
+ """
33
+
34
+ title: str = pydantic.Field()
35
+ """
36
+ The updated project title
37
+ """
38
+
39
+ if IS_PYDANTIC_V2:
40
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
41
+ else:
42
+
43
+ class Config:
44
+ frozen = True
45
+ smart_union = True
46
+ extra = pydantic.Extra.allow
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: athena-intelligence
3
- Version: 0.1.262
3
+ Version: 0.1.263
4
4
  Summary: Athena Intelligence Python Library
5
5
  Requires-Python: >=3.9,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -1,4 +1,4 @@
1
- athena/__init__.py,sha256=STNRCCbbckdPq_mE-66Rdr4r24pajTxp5adeICpoQUU,8987
1
+ athena/__init__.py,sha256=ozQ_fUo-mbCgv2VArpZNgBfIdOm7sP18XSEKfPYMGN8,9197
2
2
  athena/agents/__init__.py,sha256=LqM1Kj7aFzYoFsB7xrYKPDJAnOWmcig1LNE4jAiWpJQ,1166
3
3
  athena/agents/client.py,sha256=b3QvSCRsiHD6UREN7llGY946V-oZdKkhouQ6p_nH1j8,8044
4
4
  athena/agents/drive/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
@@ -18,13 +18,13 @@ athena/aop/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
18
18
  athena/aop/client.py,sha256=Fg7rNF1k78MIKDELy8GE-DfAaJvHFUUBG5haMR_Vefo,6758
19
19
  athena/aop/raw_client.py,sha256=ZQRtNNirk1xfbkKHADxSCPB0UQjf4HO5l-6z7W936X8,18509
20
20
  athena/assets/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
21
- athena/assets/client.py,sha256=yRU6wHLqQpqppqhOKIC-drEp0WJyUjewvqIG3g6qQkU,7335
22
- athena/assets/raw_client.py,sha256=lXFjKzqHvge7_DBIjoPLYT5URYcBxOZcpD3i3O_ePOE,13132
21
+ athena/assets/client.py,sha256=jKDXqX5TPPckKKAw7lIPmpOFEGFcMGLiIpWaoZ2AlkU,17421
22
+ athena/assets/raw_client.py,sha256=LjmNe1uULGoiH1yQBYxUwqrK8bBCUwjJ786K1b6PqyU,31369
23
23
  athena/base_client.py,sha256=IlYf1TLV3w-JZPATzyT-b5wSrjKm-fsT_3bC172GpVI,9576
24
24
  athena/client.py,sha256=I-aFsGhcViOdOeaWayhMkaMkV5545Yz2Gb-BoVQvhE4,22317
25
25
  athena/core/__init__.py,sha256=GkNNgA0CeqvpCzo2vVtAafE8YcnGV-VGtbU5op93lbc,3624
26
26
  athena/core/api_error.py,sha256=44vPoTyWN59gonCIZMdzw7M1uspygiLnr3GNFOoVL2Q,614
27
- athena/core/client_wrapper.py,sha256=Ofw3-Dc5zhoXMLUx4lqzAxqlCWLiJdTFnAgDVOZLXSs,2392
27
+ athena/core/client_wrapper.py,sha256=FsapSsjpdAg6UqflA9Dsh_pkEifRPjUZDGC7rsggxrM,2392
28
28
  athena/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
29
29
  athena/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
30
30
  athena/core/force_multipart.py,sha256=cH981xLy0kZVKiZZkFoeUjgJ2Zuq7KXB2aRAnmHzRDc,477
@@ -76,7 +76,7 @@ athena/tools/tasks/client.py,sha256=c_YZ7OjQNJmPKbeeXJznXj3zo5CRFSv02dLupAdHAyo,
76
76
  athena/tools/tasks/raw_client.py,sha256=Mexzuf_HcRXWNlESDGQkHHv5tC2tAo-AX3PBSuSRO3U,3812
77
77
  athena/tools/types/__init__.py,sha256=EBAoLXAl5YZCDYkI-YPJA0035ZRyGktyW4tspFXOQso,1180
78
78
  athena/tools/types/tools_data_frame_request_columns_item.py,sha256=GA1FUlTV_CfSc-KToTAwFf4Exl0rr4fsweVZupztjw0,138
79
- athena/types/__init__.py,sha256=j3rz_viMKkWBpTqWzHo-rMWDBO0V2aqdZfqa0ApcDcs,10285
79
+ athena/types/__init__.py,sha256=lGgid5KUDJ_WOPYq-ty9esQfM9v47blav7RjFIc-9nw,10607
80
80
  athena/types/aop_async_execute_response_out.py,sha256=Ggs9j5JvLCMaVwaHNyY3whA5gcUffLqc4PwuxYWI-38,1642
81
81
  athena/types/aop_execute_request_in.py,sha256=mEsMKyNN6e90gZra733lJDC6z0bZWdc72af3B-Z5aqE,889
82
82
  athena/types/aop_execute_response_out.py,sha256=_w6_WERRgGEVI0O_4qRfVZPLpcaa8yihWgwB4ZV0Zs8,1847
@@ -100,6 +100,7 @@ athena/types/conversation_asset_info.py,sha256=SbsWJuGwic6nliEu9ykW-q2A7SfnRt4U3
100
100
  athena/types/conversation_message.py,sha256=bJsO0T9ktciCAys28ESQJQNfY-29pI3lKxPhRb7D4ic,1084
101
101
  athena/types/conversation_result.py,sha256=EwC27cGZWzRyrJxlyKrevndnOSDBM0DkaOUu7foeYeI,1851
102
102
  athena/types/create_new_sheet_tab_response.py,sha256=RF8iOL3mkSc3pY0pqQhvw9IdnncxDC_-XdSUhqPODsM,892
103
+ athena/types/create_project_response_out.py,sha256=iMxs8dnwoNraOYmsVYm93TyXyAeSomUdWN5j720orxc,1156
103
104
  athena/types/custom_agent_response.py,sha256=hzw1s7mcCI9V58l5OqK4Q59AGF_NctSx5scjJeVWckk,684
104
105
  athena/types/data_frame_request_out.py,sha256=wyVIEEI6mqSoH6SyXTQpzLCJOWwsAlUvG9iAVlNuNOU,1076
105
106
  athena/types/data_frame_request_out_columns_item.py,sha256=9cjzciFv6C8n8Griytt_q_8ovkzHViS5tvUcMDfkfKE,143
@@ -109,6 +110,7 @@ athena/types/data_frame_unknown_format_error.py,sha256=yEykbkXCfsxDKYHXps8jOtv6R
109
110
  athena/types/dimension_properties.py,sha256=y221yMcIHjx9XMorHHaQyd9-h2h_qmCuRHyAqmYmn24,1709
110
111
  athena/types/document_chunk.py,sha256=Ma7nl0SnTZsshYtpjh37OJhwrNPmSkzw_QUaFChPCD0,651
111
112
  athena/types/drive_agent_response.py,sha256=sxxt3DVibsYrF8bnil9ZKD3GFkD0m2hp9qDfQSaNqcs,639
113
+ athena/types/edit_project_response_out.py,sha256=NQqknEbD7Y74bi1tkXhZOTjB2o347wiPFgsmyRZEtx0,1143
112
114
  athena/types/file_chunk_request_out.py,sha256=5utKRptaqyizg0D9ogPEM1IPJIUW2NMHNLewYZLNe8Q,665
113
115
  athena/types/file_too_large_error.py,sha256=xXAMDgmJ9w0AGu-dKF1m1nCKtoqDetUf2DRqQ64npHY,527
114
116
  athena/types/folder_response.py,sha256=pKIzL_4PpNweVrfvMdJPsToaaxZqMuW8071zJ40-Xow,811
@@ -145,6 +147,6 @@ athena/types/thread_status_response_out.py,sha256=UuSAvs9woL1i8RwvVRKsFUufN4A9jO
145
147
  athena/types/type.py,sha256=Gvs56nvBMPcQpOZkfPocGNNb7S05PuINianbT309QAQ,146
146
148
  athena/types/wrap_strategy.py,sha256=ykPFCr91HGvzIk9BRppW_UBWoUamFxDhLO_ETzQgVKI,164
147
149
  athena/version.py,sha256=tnXYUugs9zF_pkVdem-QBorKSuhEOOuetkR57dADDxE,86
148
- athena_intelligence-0.1.262.dist-info/METADATA,sha256=2oni0oBqKQYgMb7AnZ3dVlbL9EWXd3ftgVPyiUJeLtg,5440
149
- athena_intelligence-0.1.262.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
150
- athena_intelligence-0.1.262.dist-info/RECORD,,
150
+ athena_intelligence-0.1.263.dist-info/METADATA,sha256=Sz6YxOhYB_9Ow9hgfb0YgE5wrEHmbollItdTsi-i9DI,5440
151
+ athena_intelligence-0.1.263.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
152
+ athena_intelligence-0.1.263.dist-info/RECORD,,