athena-intelligence 0.1.37__py3-none-any.whl → 0.1.39__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 +2 -0
- athena/core/client_wrapper.py +1 -1
- athena/search/client.py +9 -4
- athena/types/__init__.py +2 -0
- athena/types/scrape_markdown_result.py +28 -0
- {athena_intelligence-0.1.37.dist-info → athena_intelligence-0.1.39.dist-info}/METADATA +1 -1
- {athena_intelligence-0.1.37.dist-info → athena_intelligence-0.1.39.dist-info}/RECORD +8 -7
- {athena_intelligence-0.1.37.dist-info → athena_intelligence-0.1.39.dist-info}/WHEEL +0 -0
athena/__init__.py
CHANGED
@@ -9,6 +9,7 @@ from .types import (
|
|
9
9
|
MessageOutDto,
|
10
10
|
Model,
|
11
11
|
Report,
|
12
|
+
ScrapeMarkdownResult,
|
12
13
|
Snippet,
|
13
14
|
SqlResults,
|
14
15
|
StatusEnum,
|
@@ -31,6 +32,7 @@ __all__ = [
|
|
31
32
|
"MessageOutDto",
|
32
33
|
"Model",
|
33
34
|
"Report",
|
35
|
+
"ScrapeMarkdownResult",
|
34
36
|
"Snippet",
|
35
37
|
"SqlResults",
|
36
38
|
"StatusEnum",
|
athena/core/client_wrapper.py
CHANGED
@@ -16,7 +16,7 @@ class BaseClientWrapper:
|
|
16
16
|
headers: typing.Dict[str, str] = {
|
17
17
|
"X-Fern-Language": "Python",
|
18
18
|
"X-Fern-SDK-Name": "athena-intelligence",
|
19
|
-
"X-Fern-SDK-Version": "0.1.
|
19
|
+
"X-Fern-SDK-Version": "0.1.39",
|
20
20
|
}
|
21
21
|
headers["X-API-KEY"] = self.api_key
|
22
22
|
return headers
|
athena/search/client.py
CHANGED
@@ -11,6 +11,7 @@ from ..core.remove_none_from_dict import remove_none_from_dict
|
|
11
11
|
from ..core.request_options import RequestOptions
|
12
12
|
from ..errors.unprocessable_entity_error import UnprocessableEntityError
|
13
13
|
from ..types.http_validation_error import HttpValidationError
|
14
|
+
from ..types.scrape_markdown_result import ScrapeMarkdownResult
|
14
15
|
from ..types.url_result import UrlResult
|
15
16
|
|
16
17
|
try:
|
@@ -107,7 +108,9 @@ class SearchClient:
|
|
107
108
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
108
109
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
109
110
|
|
110
|
-
def get_markdown(
|
111
|
+
def get_markdown(
|
112
|
+
self, *, url: str, request_options: typing.Optional[RequestOptions] = None
|
113
|
+
) -> ScrapeMarkdownResult:
|
111
114
|
"""
|
112
115
|
Parameters:
|
113
116
|
- url: str.
|
@@ -150,7 +153,7 @@ class SearchClient:
|
|
150
153
|
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
151
154
|
)
|
152
155
|
if 200 <= _response.status_code < 300:
|
153
|
-
return pydantic.parse_obj_as(
|
156
|
+
return pydantic.parse_obj_as(ScrapeMarkdownResult, _response.json()) # type: ignore
|
154
157
|
if _response.status_code == 422:
|
155
158
|
raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
|
156
159
|
try:
|
@@ -245,7 +248,9 @@ class AsyncSearchClient:
|
|
245
248
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
246
249
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
247
250
|
|
248
|
-
async def get_markdown(
|
251
|
+
async def get_markdown(
|
252
|
+
self, *, url: str, request_options: typing.Optional[RequestOptions] = None
|
253
|
+
) -> ScrapeMarkdownResult:
|
249
254
|
"""
|
250
255
|
Parameters:
|
251
256
|
- url: str.
|
@@ -288,7 +293,7 @@ class AsyncSearchClient:
|
|
288
293
|
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
289
294
|
)
|
290
295
|
if 200 <= _response.status_code < 300:
|
291
|
-
return pydantic.parse_obj_as(
|
296
|
+
return pydantic.parse_obj_as(ScrapeMarkdownResult, _response.json()) # type: ignore
|
292
297
|
if _response.status_code == 422:
|
293
298
|
raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
|
294
299
|
try:
|
athena/types/__init__.py
CHANGED
@@ -8,6 +8,7 @@ from .message_out import MessageOut
|
|
8
8
|
from .message_out_dto import MessageOutDto
|
9
9
|
from .model import Model
|
10
10
|
from .report import Report
|
11
|
+
from .scrape_markdown_result import ScrapeMarkdownResult
|
11
12
|
from .snippet import Snippet
|
12
13
|
from .sql_results import SqlResults
|
13
14
|
from .status_enum import StatusEnum
|
@@ -25,6 +26,7 @@ __all__ = [
|
|
25
26
|
"MessageOutDto",
|
26
27
|
"Model",
|
27
28
|
"Report",
|
29
|
+
"ScrapeMarkdownResult",
|
28
30
|
"Snippet",
|
29
31
|
"SqlResults",
|
30
32
|
"StatusEnum",
|
@@ -0,0 +1,28 @@
|
|
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
|
+
|
8
|
+
try:
|
9
|
+
import pydantic.v1 as pydantic # type: ignore
|
10
|
+
except ImportError:
|
11
|
+
import pydantic # type: ignore
|
12
|
+
|
13
|
+
|
14
|
+
class ScrapeMarkdownResult(pydantic.BaseModel):
|
15
|
+
markdown: str
|
16
|
+
|
17
|
+
def json(self, **kwargs: typing.Any) -> str:
|
18
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
19
|
+
return super().json(**kwargs_with_defaults)
|
20
|
+
|
21
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
22
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
23
|
+
return super().dict(**kwargs_with_defaults)
|
24
|
+
|
25
|
+
class Config:
|
26
|
+
frozen = True
|
27
|
+
smart_union = True
|
28
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
athena/__init__.py,sha256=
|
1
|
+
athena/__init__.py,sha256=4F_he5MdULBjh5FEtmnAlXK61f8Y5fhP4-bLVzj1K3s,1013
|
2
2
|
athena/base_client.py,sha256=9CD18sBT5meilMnX4WfnNBagwlyNWnc8NH0bSL9D0Ao,5014
|
3
3
|
athena/client.py,sha256=8QypiDlbZ0C1YsJh6GzhylLVCZXDQc1MCJTURo2_vvI,3576
|
4
4
|
athena/core/__init__.py,sha256=RWfyDqkzWsf8e3VGc3NV60MovfJbg5XWzNFGB2DZ0hA,790
|
5
5
|
athena/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
6
|
-
athena/core/client_wrapper.py,sha256=
|
6
|
+
athena/core/client_wrapper.py,sha256=IZ6Zo7IR39BxLeVgeprl1_Sh_0ewYHA8uloBT_m_axc,1198
|
7
7
|
athena/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
8
8
|
athena/core/file.py,sha256=sy1RUGZ3aJYuw998bZytxxo6QdgKmlnlgBaMvwEKCGg,1480
|
9
9
|
athena/core/http_client.py,sha256=LI0yP3jUyE0Ue7oyBcI9nyo1pljOwh9Y5ycTeIpKwOg,4882
|
@@ -24,10 +24,10 @@ athena/query/client.py,sha256=UOx-Bq-xFFm-sTMTmJjWGrC6q_7vhVno3nYzmi81xwI,6243
|
|
24
24
|
athena/report/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
25
25
|
athena/report/client.py,sha256=sGJDrgk_E1SPleRYNhvspmsz-G3FQwMW-3alFzZPquE,6528
|
26
26
|
athena/search/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
27
|
-
athena/search/client.py,sha256=
|
27
|
+
athena/search/client.py,sha256=DLfHjgflIXAff20yswQK1h4BNxvY4SjZzhsywpQOM-g,12391
|
28
28
|
athena/snippet/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
29
29
|
athena/snippet/client.py,sha256=D0rSpm6ql9cnUj-mMe3z8OHRgRQQuk3bBW2CZSRnyp4,6087
|
30
|
-
athena/types/__init__.py,sha256=
|
30
|
+
athena/types/__init__.py,sha256=WkQQXOAvm87RuRDk2_W9uJs9y7LWGejK1ZC666NTHXA,1054
|
31
31
|
athena/types/dataset.py,sha256=70OJPxKBAYu7xthGEgrUolSdyLqiyh6X49INw1oN0sA,1014
|
32
32
|
athena/types/get_datasets_response.py,sha256=BCdT8yTLfOsXeyFadlyoas4zzseFWGPAdGpkgkOuaD8,989
|
33
33
|
athena/types/get_snippets_response.py,sha256=Lpn7bHJLpPQozN93unCV-8eByAAfz1MhQWR3G3Z1vl4,989
|
@@ -36,6 +36,7 @@ athena/types/message_out.py,sha256=uvZY_Podv2XccEk8CICug9I_S2hFJTSzCBwcHiauW7A,8
|
|
36
36
|
athena/types/message_out_dto.py,sha256=qgRibRbDNOWVnVGP7Rribh9WdoCT2CSiPUXeIWECqq4,1051
|
37
37
|
athena/types/model.py,sha256=XbXkKXbmnfZ8bPTAn1xnWGjqKK1SVOLdxf1RGk5ON5k,2545
|
38
38
|
athena/types/report.py,sha256=QVaqVfHMAV3s9_V2CqjIEMcRrbJhD8zmi82vrk2A8x0,946
|
39
|
+
athena/types/scrape_markdown_result.py,sha256=uRpIxoLV9oyLdbJeehm3zmZk_qXZeYqYYcS2SeQmwbA,881
|
39
40
|
athena/types/snippet.py,sha256=POIVJNV9iQxiVegB_qwQx-PZPPSyoIPhyxTsueNVUGA,1126
|
40
41
|
athena/types/sql_results.py,sha256=pNH32nyf1bzoYJs3FgHctLdLO02oOjyGgLkHACACB6k,900
|
41
42
|
athena/types/status_enum.py,sha256=0UZbhdAx215GHC-U53RS98mYHtn1N3On4VBe4j02Qtc,672
|
@@ -43,6 +44,6 @@ athena/types/tools.py,sha256=mhRkKAwlsDud-fFOhsx2T3hBD-FAtuCnGHyU9cLPcGU,1422
|
|
43
44
|
athena/types/url_result.py,sha256=zajsW46qJnD6GPimb5kHkUncjqBfzHUlGOcKuUGMX-E,893
|
44
45
|
athena/types/validation_error.py,sha256=2JhGNJouo8QpfrMBoT_JCwYSn1nFN2Nnq0p9uPLDH-U,992
|
45
46
|
athena/types/validation_error_loc_item.py,sha256=LAtjCHIllWRBFXvAZ5QZpp7CPXjdtN9EB7HrLVo6EP0,128
|
46
|
-
athena_intelligence-0.1.
|
47
|
-
athena_intelligence-0.1.
|
48
|
-
athena_intelligence-0.1.
|
47
|
+
athena_intelligence-0.1.39.dist-info/METADATA,sha256=d8EmTn45t-7O63xpZzW5vbZbpxhagqY9Frj1559JYWw,4738
|
48
|
+
athena_intelligence-0.1.39.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
49
|
+
athena_intelligence-0.1.39.dist-info/RECORD,,
|
File without changes
|