athena-intelligence 0.1.63__tar.gz → 0.1.64__tar.gz

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.
Files changed (72) hide show
  1. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/PKG-INFO +1 -1
  2. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/pyproject.toml +1 -1
  3. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/__init__.py +4 -1
  4. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/base_client.py +3 -0
  5. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/core/client_wrapper.py +1 -1
  6. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/__init__.py +2 -0
  7. athena_intelligence-0.1.64/src/athena/types/workflow_status_out.py +26 -0
  8. athena_intelligence-0.1.64/src/athena/workflow/__init__.py +2 -0
  9. athena_intelligence-0.1.64/src/athena/workflow/client.py +140 -0
  10. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/README.md +0 -0
  11. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/chain/__init__.py +0 -0
  12. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/chain/client.py +0 -0
  13. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/client.py +0 -0
  14. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/core/__init__.py +0 -0
  15. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/core/api_error.py +0 -0
  16. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/core/datetime_utils.py +0 -0
  17. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/core/file.py +0 -0
  18. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/core/http_client.py +0 -0
  19. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/core/jsonable_encoder.py +0 -0
  20. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/core/pydantic_utilities.py +0 -0
  21. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/core/remove_none_from_dict.py +0 -0
  22. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/core/request_options.py +0 -0
  23. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/dataset/__init__.py +0 -0
  24. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/dataset/client.py +0 -0
  25. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/environment.py +0 -0
  26. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/errors/__init__.py +0 -0
  27. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/errors/unprocessable_entity_error.py +0 -0
  28. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/message/__init__.py +0 -0
  29. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/message/client.py +0 -0
  30. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/polling_message_client.py +0 -0
  31. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/py.typed +0 -0
  32. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/query/__init__.py +0 -0
  33. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/query/client.py +0 -0
  34. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/report/__init__.py +0 -0
  35. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/report/client.py +0 -0
  36. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/search/__init__.py +0 -0
  37. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/search/client.py +0 -0
  38. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/snippet/__init__.py +0 -0
  39. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/snippet/client.py +0 -0
  40. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/tools/__init__.py +0 -0
  41. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/tools/client.py +0 -0
  42. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/dataset.py +0 -0
  43. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/document.py +0 -0
  44. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/excecute_tool_first_workflow_out.py +0 -0
  45. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/file_data_response.py +0 -0
  46. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/firecrawl_scrape_url_data_reponse_dto.py +0 -0
  47. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/firecrawl_scrape_url_metadata.py +0 -0
  48. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/get_datasets_response.py +0 -0
  49. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/get_snippet_out.py +0 -0
  50. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/get_snippets_response.py +0 -0
  51. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/http_validation_error.py +0 -0
  52. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/langchain_documents_request_out.py +0 -0
  53. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/llm_model.py +0 -0
  54. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/map_reduce_chain_out.py +0 -0
  55. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/message_out.py +0 -0
  56. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/message_out_dto.py +0 -0
  57. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/model.py +0 -0
  58. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/publish_formats.py +0 -0
  59. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/report.py +0 -0
  60. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/researcher_out.py +0 -0
  61. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/snippet.py +0 -0
  62. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/sql_results.py +0 -0
  63. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/status_enum.py +0 -0
  64. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/structured_parse_result.py +0 -0
  65. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/tools.py +0 -0
  66. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/upload_documents_out.py +0 -0
  67. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/url_result.py +0 -0
  68. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/validation_error.py +0 -0
  69. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/types/validation_error_loc_item.py +0 -0
  70. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/upload/__init__.py +0 -0
  71. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/upload/client.py +0 -0
  72. {athena_intelligence-0.1.63 → athena_intelligence-0.1.64}/src/athena/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: athena-intelligence
3
- Version: 0.1.63
3
+ Version: 0.1.64
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Programming Language :: Python :: 3
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "athena-intelligence"
3
- version = "0.1.63"
3
+ version = "0.1.64"
4
4
  description = ""
5
5
  readme = "README.md"
6
6
  authors = []
@@ -29,9 +29,10 @@ from .types import (
29
29
  UrlResult,
30
30
  ValidationError,
31
31
  ValidationErrorLocItem,
32
+ WorkflowStatusOut,
32
33
  )
33
34
  from .errors import UnprocessableEntityError
34
- from . import chain, dataset, message, query, report, search, snippet, tools, upload
35
+ from . import chain, dataset, message, query, report, search, snippet, tools, upload, workflow
35
36
  from .environment import AthenaEnvironment
36
37
  from .version import __version__
37
38
 
@@ -66,6 +67,7 @@ __all__ = [
66
67
  "UrlResult",
67
68
  "ValidationError",
68
69
  "ValidationErrorLocItem",
70
+ "WorkflowStatusOut",
69
71
  "__version__",
70
72
  "chain",
71
73
  "dataset",
@@ -76,4 +78,5 @@ __all__ = [
76
78
  "snippet",
77
79
  "tools",
78
80
  "upload",
81
+ "workflow",
79
82
  ]
@@ -15,6 +15,7 @@ from .search.client import AsyncSearchClient, SearchClient
15
15
  from .snippet.client import AsyncSnippetClient, SnippetClient
16
16
  from .tools.client import AsyncToolsClient, ToolsClient
17
17
  from .upload.client import AsyncUploadClient, UploadClient
18
+ from .workflow.client import AsyncWorkflowClient, WorkflowClient
18
19
 
19
20
 
20
21
  class BaseAthena:
@@ -73,6 +74,7 @@ class BaseAthena:
73
74
  self.chain = ChainClient(client_wrapper=self._client_wrapper)
74
75
  self.tools = ToolsClient(client_wrapper=self._client_wrapper)
75
76
  self.upload = UploadClient(client_wrapper=self._client_wrapper)
77
+ self.workflow = WorkflowClient(client_wrapper=self._client_wrapper)
76
78
 
77
79
 
78
80
  class AsyncBaseAthena:
@@ -131,6 +133,7 @@ class AsyncBaseAthena:
131
133
  self.chain = AsyncChainClient(client_wrapper=self._client_wrapper)
132
134
  self.tools = AsyncToolsClient(client_wrapper=self._client_wrapper)
133
135
  self.upload = AsyncUploadClient(client_wrapper=self._client_wrapper)
136
+ self.workflow = AsyncWorkflowClient(client_wrapper=self._client_wrapper)
134
137
 
135
138
 
136
139
  def _get_base_url(*, base_url: typing.Optional[str] = None, environment: AthenaEnvironment) -> str:
@@ -17,7 +17,7 @@ class BaseClientWrapper:
17
17
  headers: typing.Dict[str, str] = {
18
18
  "X-Fern-Language": "Python",
19
19
  "X-Fern-SDK-Name": "athena-intelligence",
20
- "X-Fern-SDK-Version": "0.1.63",
20
+ "X-Fern-SDK-Version": "0.1.64",
21
21
  }
22
22
  headers["X-API-KEY"] = self.api_key
23
23
  return headers
@@ -28,6 +28,7 @@ from .upload_documents_out import UploadDocumentsOut
28
28
  from .url_result import UrlResult
29
29
  from .validation_error import ValidationError
30
30
  from .validation_error_loc_item import ValidationErrorLocItem
31
+ from .workflow_status_out import WorkflowStatusOut
31
32
 
32
33
  __all__ = [
33
34
  "Dataset",
@@ -58,4 +59,5 @@ __all__ = [
58
59
  "UrlResult",
59
60
  "ValidationError",
60
61
  "ValidationErrorLocItem",
62
+ "WorkflowStatusOut",
61
63
  ]
@@ -0,0 +1,26 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+ from ..core.pydantic_utilities import pydantic_v1
8
+
9
+
10
+ class WorkflowStatusOut(pydantic_v1.BaseModel):
11
+ status: str
12
+ execution_info: typing.Dict[str, typing.Any]
13
+
14
+ def json(self, **kwargs: typing.Any) -> str:
15
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
16
+ return super().json(**kwargs_with_defaults)
17
+
18
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
19
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
20
+ return super().dict(**kwargs_with_defaults)
21
+
22
+ class Config:
23
+ frozen = True
24
+ smart_union = True
25
+ extra = pydantic_v1.Extra.allow
26
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,2 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
@@ -0,0 +1,140 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ import urllib.parse
5
+ from json.decoder import JSONDecodeError
6
+
7
+ from ..core.api_error import ApiError
8
+ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
9
+ from ..core.jsonable_encoder import jsonable_encoder
10
+ from ..core.pydantic_utilities import pydantic_v1
11
+ from ..core.remove_none_from_dict import remove_none_from_dict
12
+ from ..core.request_options import RequestOptions
13
+ from ..errors.unprocessable_entity_error import UnprocessableEntityError
14
+ from ..types.http_validation_error import HttpValidationError
15
+ from ..types.workflow_status_out import WorkflowStatusOut
16
+
17
+ # this is used as the default value for optional parameters
18
+ OMIT = typing.cast(typing.Any, ...)
19
+
20
+
21
+ class WorkflowClient:
22
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
23
+ self._client_wrapper = client_wrapper
24
+
25
+ def get_workflow_status(
26
+ self, *, workflow_id: str, request_options: typing.Optional[RequestOptions] = None
27
+ ) -> WorkflowStatusOut:
28
+ """
29
+ Parameters:
30
+ - workflow_id: str.
31
+
32
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
33
+ ---
34
+ from athena.client import Athena
35
+
36
+ client = Athena(
37
+ api_key="YOUR_API_KEY",
38
+ )
39
+ client.workflow.get_workflow_status(
40
+ workflow_id="workflow_5f6eeb00-86e5-41b2-8e1d-49415f34ccc4",
41
+ )
42
+ """
43
+ _response = self._client_wrapper.httpx_client.request(
44
+ method="POST",
45
+ url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/workflow/status"),
46
+ params=jsonable_encoder(
47
+ request_options.get("additional_query_parameters") if request_options is not None else None
48
+ ),
49
+ json=jsonable_encoder({"workflow_id": workflow_id})
50
+ if request_options is None or request_options.get("additional_body_parameters") is None
51
+ else {
52
+ **jsonable_encoder({"workflow_id": workflow_id}),
53
+ **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
54
+ },
55
+ headers=jsonable_encoder(
56
+ remove_none_from_dict(
57
+ {
58
+ **self._client_wrapper.get_headers(),
59
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
60
+ }
61
+ )
62
+ ),
63
+ timeout=request_options.get("timeout_in_seconds")
64
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
65
+ else self._client_wrapper.get_timeout(),
66
+ retries=0,
67
+ max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
68
+ )
69
+ if 200 <= _response.status_code < 300:
70
+ return pydantic_v1.parse_obj_as(WorkflowStatusOut, _response.json()) # type: ignore
71
+ if _response.status_code == 422:
72
+ raise UnprocessableEntityError(
73
+ pydantic_v1.parse_obj_as(HttpValidationError, _response.json()) # type: ignore
74
+ )
75
+ try:
76
+ _response_json = _response.json()
77
+ except JSONDecodeError:
78
+ raise ApiError(status_code=_response.status_code, body=_response.text)
79
+ raise ApiError(status_code=_response.status_code, body=_response_json)
80
+
81
+
82
+ class AsyncWorkflowClient:
83
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
84
+ self._client_wrapper = client_wrapper
85
+
86
+ async def get_workflow_status(
87
+ self, *, workflow_id: str, request_options: typing.Optional[RequestOptions] = None
88
+ ) -> WorkflowStatusOut:
89
+ """
90
+ Parameters:
91
+ - workflow_id: str.
92
+
93
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
94
+ ---
95
+ from athena.client import AsyncAthena
96
+
97
+ client = AsyncAthena(
98
+ api_key="YOUR_API_KEY",
99
+ )
100
+ await client.workflow.get_workflow_status(
101
+ workflow_id="workflow_5f6eeb00-86e5-41b2-8e1d-49415f34ccc4",
102
+ )
103
+ """
104
+ _response = await self._client_wrapper.httpx_client.request(
105
+ method="POST",
106
+ url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/workflow/status"),
107
+ params=jsonable_encoder(
108
+ request_options.get("additional_query_parameters") if request_options is not None else None
109
+ ),
110
+ json=jsonable_encoder({"workflow_id": workflow_id})
111
+ if request_options is None or request_options.get("additional_body_parameters") is None
112
+ else {
113
+ **jsonable_encoder({"workflow_id": workflow_id}),
114
+ **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
115
+ },
116
+ headers=jsonable_encoder(
117
+ remove_none_from_dict(
118
+ {
119
+ **self._client_wrapper.get_headers(),
120
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
121
+ }
122
+ )
123
+ ),
124
+ timeout=request_options.get("timeout_in_seconds")
125
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
126
+ else self._client_wrapper.get_timeout(),
127
+ retries=0,
128
+ max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
129
+ )
130
+ if 200 <= _response.status_code < 300:
131
+ return pydantic_v1.parse_obj_as(WorkflowStatusOut, _response.json()) # type: ignore
132
+ if _response.status_code == 422:
133
+ raise UnprocessableEntityError(
134
+ pydantic_v1.parse_obj_as(HttpValidationError, _response.json()) # type: ignore
135
+ )
136
+ try:
137
+ _response_json = _response.json()
138
+ except JSONDecodeError:
139
+ raise ApiError(status_code=_response.status_code, body=_response.text)
140
+ raise ApiError(status_code=_response.status_code, body=_response_json)