athena-intelligence 0.1.54__tar.gz → 0.1.56__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 (63) hide show
  1. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/PKG-INFO +1 -1
  2. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/pyproject.toml +1 -1
  3. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/__init__.py +2 -0
  4. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/core/client_wrapper.py +1 -1
  5. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/snippet/client.py +112 -0
  6. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/types/__init__.py +2 -0
  7. athena_intelligence-0.1.56/src/athena/types/get_snippet_out.py +25 -0
  8. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/README.md +0 -0
  9. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/base_client.py +0 -0
  10. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/chain/__init__.py +0 -0
  11. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/chain/client.py +0 -0
  12. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/client.py +0 -0
  13. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/core/__init__.py +0 -0
  14. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/core/api_error.py +0 -0
  15. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/core/datetime_utils.py +0 -0
  16. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/core/file.py +0 -0
  17. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/core/http_client.py +0 -0
  18. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/core/jsonable_encoder.py +0 -0
  19. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/core/pydantic_utilities.py +0 -0
  20. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/core/remove_none_from_dict.py +0 -0
  21. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/core/request_options.py +0 -0
  22. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/dataset/__init__.py +0 -0
  23. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/dataset/client.py +0 -0
  24. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/environment.py +0 -0
  25. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/errors/__init__.py +0 -0
  26. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/errors/unprocessable_entity_error.py +0 -0
  27. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/message/__init__.py +0 -0
  28. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/message/client.py +0 -0
  29. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/polling_message_client.py +0 -0
  30. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/py.typed +0 -0
  31. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/query/__init__.py +0 -0
  32. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/query/client.py +0 -0
  33. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/report/__init__.py +0 -0
  34. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/report/client.py +0 -0
  35. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/search/__init__.py +0 -0
  36. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/search/client.py +0 -0
  37. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/snippet/__init__.py +0 -0
  38. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/tools/__init__.py +0 -0
  39. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/tools/client.py +0 -0
  40. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/types/dataset.py +0 -0
  41. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/types/document.py +0 -0
  42. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/types/excecute_tool_first_workflow_out.py +0 -0
  43. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/types/firecrawl_scrape_url_data_reponse_dto.py +0 -0
  44. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/types/firecrawl_scrape_url_metadata.py +0 -0
  45. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/types/get_datasets_response.py +0 -0
  46. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/types/get_snippets_response.py +0 -0
  47. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/types/http_validation_error.py +0 -0
  48. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/types/langchain_documents_request_out.py +0 -0
  49. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/types/llm_model.py +0 -0
  50. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/types/map_reduce_chain_out.py +0 -0
  51. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/types/message_out.py +0 -0
  52. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/types/message_out_dto.py +0 -0
  53. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/types/model.py +0 -0
  54. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/types/report.py +0 -0
  55. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/types/snippet.py +0 -0
  56. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/types/sql_results.py +0 -0
  57. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/types/status_enum.py +0 -0
  58. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/types/structured_parse_result.py +0 -0
  59. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/types/tools.py +0 -0
  60. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/types/url_result.py +0 -0
  61. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/types/validation_error.py +0 -0
  62. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/src/athena/types/validation_error_loc_item.py +0 -0
  63. {athena_intelligence-0.1.54 → athena_intelligence-0.1.56}/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.54
3
+ Version: 0.1.56
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.54"
3
+ version = "0.1.56"
4
4
  description = ""
5
5
  readme = "README.md"
6
6
  authors = []
@@ -7,6 +7,7 @@ from .types import (
7
7
  FirecrawlScrapeUrlDataReponseDto,
8
8
  FirecrawlScrapeUrlMetadata,
9
9
  GetDatasetsResponse,
10
+ GetSnippetOut,
10
11
  GetSnippetsResponse,
11
12
  HttpValidationError,
12
13
  LangchainDocumentsRequestOut,
@@ -38,6 +39,7 @@ __all__ = [
38
39
  "FirecrawlScrapeUrlDataReponseDto",
39
40
  "FirecrawlScrapeUrlMetadata",
40
41
  "GetDatasetsResponse",
42
+ "GetSnippetOut",
41
43
  "GetSnippetsResponse",
42
44
  "HttpValidationError",
43
45
  "LangchainDocumentsRequestOut",
@@ -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.54",
20
+ "X-Fern-SDK-Version": "0.1.56",
21
21
  }
22
22
  headers["X-API-KEY"] = self.api_key
23
23
  return headers
@@ -11,9 +11,13 @@ from ..core.pydantic_utilities import pydantic_v1
11
11
  from ..core.remove_none_from_dict import remove_none_from_dict
12
12
  from ..core.request_options import RequestOptions
13
13
  from ..errors.unprocessable_entity_error import UnprocessableEntityError
14
+ from ..types.get_snippet_out import GetSnippetOut
14
15
  from ..types.get_snippets_response import GetSnippetsResponse
15
16
  from ..types.http_validation_error import HttpValidationError
16
17
 
18
+ # this is used as the default value for optional parameters
19
+ OMIT = typing.cast(typing.Any, ...)
20
+
17
21
 
18
22
  class SnippetClient:
19
23
  def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -83,6 +87,60 @@ class SnippetClient:
83
87
  raise ApiError(status_code=_response.status_code, body=_response.text)
84
88
  raise ApiError(status_code=_response.status_code, body=_response_json)
85
89
 
90
+ def get_by_id(self, *, id: str, request_options: typing.Optional[RequestOptions] = None) -> GetSnippetOut:
91
+ """
92
+ Parameters:
93
+ - id: str.
94
+
95
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
96
+ ---
97
+ from athena.client import Athena
98
+
99
+ client = Athena(
100
+ api_key="YOUR_API_KEY",
101
+ )
102
+ client.snippet.get_by_id(
103
+ id="snippet_02329f1b-f6ad-4e93-be84-355c33202024b",
104
+ )
105
+ """
106
+ _response = self._client_wrapper.httpx_client.request(
107
+ method="POST",
108
+ url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/snippet"),
109
+ params=jsonable_encoder(
110
+ request_options.get("additional_query_parameters") if request_options is not None else None
111
+ ),
112
+ json=jsonable_encoder({"id": id})
113
+ if request_options is None or request_options.get("additional_body_parameters") is None
114
+ else {
115
+ **jsonable_encoder({"id": id}),
116
+ **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
117
+ },
118
+ headers=jsonable_encoder(
119
+ remove_none_from_dict(
120
+ {
121
+ **self._client_wrapper.get_headers(),
122
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
123
+ }
124
+ )
125
+ ),
126
+ timeout=request_options.get("timeout_in_seconds")
127
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
128
+ else self._client_wrapper.get_timeout(),
129
+ retries=0,
130
+ max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
131
+ )
132
+ if 200 <= _response.status_code < 300:
133
+ return pydantic_v1.parse_obj_as(GetSnippetOut, _response.json()) # type: ignore
134
+ if _response.status_code == 422:
135
+ raise UnprocessableEntityError(
136
+ pydantic_v1.parse_obj_as(HttpValidationError, _response.json()) # type: ignore
137
+ )
138
+ try:
139
+ _response_json = _response.json()
140
+ except JSONDecodeError:
141
+ raise ApiError(status_code=_response.status_code, body=_response.text)
142
+ raise ApiError(status_code=_response.status_code, body=_response_json)
143
+
86
144
 
87
145
  class AsyncSnippetClient:
88
146
  def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -151,3 +209,57 @@ class AsyncSnippetClient:
151
209
  except JSONDecodeError:
152
210
  raise ApiError(status_code=_response.status_code, body=_response.text)
153
211
  raise ApiError(status_code=_response.status_code, body=_response_json)
212
+
213
+ async def get_by_id(self, *, id: str, request_options: typing.Optional[RequestOptions] = None) -> GetSnippetOut:
214
+ """
215
+ Parameters:
216
+ - id: str.
217
+
218
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
219
+ ---
220
+ from athena.client import AsyncAthena
221
+
222
+ client = AsyncAthena(
223
+ api_key="YOUR_API_KEY",
224
+ )
225
+ await client.snippet.get_by_id(
226
+ id="snippet_02329f1b-f6ad-4e93-be84-355c33202024b",
227
+ )
228
+ """
229
+ _response = await self._client_wrapper.httpx_client.request(
230
+ method="POST",
231
+ url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/snippet"),
232
+ params=jsonable_encoder(
233
+ request_options.get("additional_query_parameters") if request_options is not None else None
234
+ ),
235
+ json=jsonable_encoder({"id": id})
236
+ if request_options is None or request_options.get("additional_body_parameters") is None
237
+ else {
238
+ **jsonable_encoder({"id": id}),
239
+ **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
240
+ },
241
+ headers=jsonable_encoder(
242
+ remove_none_from_dict(
243
+ {
244
+ **self._client_wrapper.get_headers(),
245
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
246
+ }
247
+ )
248
+ ),
249
+ timeout=request_options.get("timeout_in_seconds")
250
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
251
+ else self._client_wrapper.get_timeout(),
252
+ retries=0,
253
+ max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
254
+ )
255
+ if 200 <= _response.status_code < 300:
256
+ return pydantic_v1.parse_obj_as(GetSnippetOut, _response.json()) # type: ignore
257
+ if _response.status_code == 422:
258
+ raise UnprocessableEntityError(
259
+ pydantic_v1.parse_obj_as(HttpValidationError, _response.json()) # type: ignore
260
+ )
261
+ try:
262
+ _response_json = _response.json()
263
+ except JSONDecodeError:
264
+ raise ApiError(status_code=_response.status_code, body=_response.text)
265
+ raise ApiError(status_code=_response.status_code, body=_response_json)
@@ -6,6 +6,7 @@ from .excecute_tool_first_workflow_out import ExcecuteToolFirstWorkflowOut
6
6
  from .firecrawl_scrape_url_data_reponse_dto import FirecrawlScrapeUrlDataReponseDto
7
7
  from .firecrawl_scrape_url_metadata import FirecrawlScrapeUrlMetadata
8
8
  from .get_datasets_response import GetDatasetsResponse
9
+ from .get_snippet_out import GetSnippetOut
9
10
  from .get_snippets_response import GetSnippetsResponse
10
11
  from .http_validation_error import HttpValidationError
11
12
  from .langchain_documents_request_out import LangchainDocumentsRequestOut
@@ -31,6 +32,7 @@ __all__ = [
31
32
  "FirecrawlScrapeUrlDataReponseDto",
32
33
  "FirecrawlScrapeUrlMetadata",
33
34
  "GetDatasetsResponse",
35
+ "GetSnippetOut",
34
36
  "GetSnippetsResponse",
35
37
  "HttpValidationError",
36
38
  "LangchainDocumentsRequestOut",
@@ -0,0 +1,25 @@
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 GetSnippetOut(pydantic_v1.BaseModel):
11
+ response: typing.Dict[str, typing.Any]
12
+
13
+ def json(self, **kwargs: typing.Any) -> str:
14
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
15
+ return super().json(**kwargs_with_defaults)
16
+
17
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
18
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
19
+ return super().dict(**kwargs_with_defaults)
20
+
21
+ class Config:
22
+ frozen = True
23
+ smart_union = True
24
+ extra = pydantic_v1.Extra.allow
25
+ json_encoders = {dt.datetime: serialize_datetime}