athena-intelligence 0.1.99__tar.gz → 0.1.100__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 (42) hide show
  1. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/PKG-INFO +1 -1
  2. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/pyproject.toml +1 -1
  3. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/__init__.py +12 -10
  4. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/base_client.py +3 -0
  5. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/core/client_wrapper.py +1 -1
  6. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/errors/__init__.py +8 -1
  7. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/errors/internal_server_error.py +3 -2
  8. athena_intelligence-0.1.100/src/athena/errors/unauthorized_error.py +9 -0
  9. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/errors/unprocessable_entity_error.py +3 -2
  10. athena_intelligence-0.1.99/src/athena/types/validation_error_loc_item.py → athena_intelligence-0.1.100/src/athena/query/__init__.py +0 -3
  11. athena_intelligence-0.1.100/src/athena/query/client.py +122 -0
  12. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/tools/client.py +6 -16
  13. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/types/__init__.py +2 -8
  14. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/types/data_frame_request_out.py +1 -1
  15. athena_intelligence-0.1.99/src/athena/types/data_frame_parsing_error.py → athena_intelligence-0.1.100/src/athena/types/sql_unauthorized_error.py +1 -4
  16. athena_intelligence-0.1.99/src/athena/types/http_validation_error.py +0 -30
  17. athena_intelligence-0.1.99/src/athena/types/validation_error.py +0 -32
  18. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/README.md +0 -0
  19. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/client.py +0 -0
  20. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/core/__init__.py +0 -0
  21. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/core/api_error.py +0 -0
  22. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/core/datetime_utils.py +0 -0
  23. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/core/file.py +0 -0
  24. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/core/http_client.py +0 -0
  25. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/core/jsonable_encoder.py +0 -0
  26. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/core/pydantic_utilities.py +0 -0
  27. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/core/query_encoder.py +0 -0
  28. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/core/remove_none_from_dict.py +0 -0
  29. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/core/request_options.py +0 -0
  30. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/environment.py +0 -0
  31. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/errors/not_found_error.py +0 -0
  32. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/errors/unsupported_media_type_error.py +0 -0
  33. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/py.typed +0 -0
  34. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/tools/__init__.py +0 -0
  35. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/tools/types/__init__.py +0 -0
  36. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/tools/types/tools_data_frame_request_columns_item.py +0 -0
  37. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/types/data_frame_request_out_columns_item.py +0 -0
  38. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/types/data_frame_request_out_data_item_item.py +0 -0
  39. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/types/data_frame_request_out_index_item.py +0 -0
  40. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/types/data_frame_unknown_format_error.py +0 -0
  41. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/src/athena/types/file_fetch_error.py +0 -0
  42. {athena_intelligence-0.1.99 → athena_intelligence-0.1.100}/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.99
3
+ Version: 0.1.100
4
4
  Summary: Athena Intelligence Python Library
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "athena-intelligence"
3
- version = "0.1.99"
3
+ version = "0.1.100"
4
4
  description = "Athena Intelligence Python Library"
5
5
  readme = "README.md"
6
6
  authors = []
@@ -1,40 +1,42 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from .types import (
4
- DataFrameParsingError,
5
4
  DataFrameRequestOut,
6
5
  DataFrameRequestOutColumnsItem,
7
6
  DataFrameRequestOutDataItemItem,
8
7
  DataFrameRequestOutIndexItem,
9
8
  DataFrameUnknownFormatError,
10
9
  FileFetchError,
11
- HttpValidationError,
12
- ValidationError,
13
- ValidationErrorLocItem,
10
+ SqlUnauthorizedError,
14
11
  )
15
- from .errors import InternalServerError, NotFoundError, UnprocessableEntityError, UnsupportedMediaTypeError
16
- from . import tools
12
+ from .errors import (
13
+ InternalServerError,
14
+ NotFoundError,
15
+ UnauthorizedError,
16
+ UnprocessableEntityError,
17
+ UnsupportedMediaTypeError,
18
+ )
19
+ from . import query, tools
17
20
  from .environment import AthenaEnvironment
18
21
  from .tools import ToolsDataFrameRequestColumnsItem
19
22
  from .version import __version__
20
23
 
21
24
  __all__ = [
22
25
  "AthenaEnvironment",
23
- "DataFrameParsingError",
24
26
  "DataFrameRequestOut",
25
27
  "DataFrameRequestOutColumnsItem",
26
28
  "DataFrameRequestOutDataItemItem",
27
29
  "DataFrameRequestOutIndexItem",
28
30
  "DataFrameUnknownFormatError",
29
31
  "FileFetchError",
30
- "HttpValidationError",
31
32
  "InternalServerError",
32
33
  "NotFoundError",
34
+ "SqlUnauthorizedError",
33
35
  "ToolsDataFrameRequestColumnsItem",
36
+ "UnauthorizedError",
34
37
  "UnprocessableEntityError",
35
38
  "UnsupportedMediaTypeError",
36
- "ValidationError",
37
- "ValidationErrorLocItem",
38
39
  "__version__",
40
+ "query",
39
41
  "tools",
40
42
  ]
@@ -6,6 +6,7 @@ import httpx
6
6
 
7
7
  from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
8
8
  from .environment import AthenaEnvironment
9
+ from .query.client import AsyncQueryClient, QueryClient
9
10
  from .tools.client import AsyncToolsClient, ToolsClient
10
11
 
11
12
 
@@ -67,6 +68,7 @@ class BaseAthena:
67
68
  else httpx.Client(timeout=_defaulted_timeout),
68
69
  timeout=_defaulted_timeout,
69
70
  )
71
+ self.query = QueryClient(client_wrapper=self._client_wrapper)
70
72
  self.tools = ToolsClient(client_wrapper=self._client_wrapper)
71
73
 
72
74
 
@@ -128,6 +130,7 @@ class AsyncBaseAthena:
128
130
  else httpx.AsyncClient(timeout=_defaulted_timeout),
129
131
  timeout=_defaulted_timeout,
130
132
  )
133
+ self.query = AsyncQueryClient(client_wrapper=self._client_wrapper)
131
134
  self.tools = AsyncToolsClient(client_wrapper=self._client_wrapper)
132
135
 
133
136
 
@@ -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.99",
20
+ "X-Fern-SDK-Version": "0.1.100",
21
21
  }
22
22
  headers["X-API-KEY"] = self.api_key
23
23
  return headers
@@ -2,7 +2,14 @@
2
2
 
3
3
  from .internal_server_error import InternalServerError
4
4
  from .not_found_error import NotFoundError
5
+ from .unauthorized_error import UnauthorizedError
5
6
  from .unprocessable_entity_error import UnprocessableEntityError
6
7
  from .unsupported_media_type_error import UnsupportedMediaTypeError
7
8
 
8
- __all__ = ["InternalServerError", "NotFoundError", "UnprocessableEntityError", "UnsupportedMediaTypeError"]
9
+ __all__ = [
10
+ "InternalServerError",
11
+ "NotFoundError",
12
+ "UnauthorizedError",
13
+ "UnprocessableEntityError",
14
+ "UnsupportedMediaTypeError",
15
+ ]
@@ -1,9 +1,10 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ import typing
4
+
3
5
  from ..core.api_error import ApiError
4
- from ..types.data_frame_parsing_error import DataFrameParsingError
5
6
 
6
7
 
7
8
  class InternalServerError(ApiError):
8
- def __init__(self, body: DataFrameParsingError):
9
+ def __init__(self, body: typing.Any):
9
10
  super().__init__(status_code=500, body=body)
@@ -0,0 +1,9 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.api_error import ApiError
4
+ from ..types.sql_unauthorized_error import SqlUnauthorizedError
5
+
6
+
7
+ class UnauthorizedError(ApiError):
8
+ def __init__(self, body: SqlUnauthorizedError):
9
+ super().__init__(status_code=401, body=body)
@@ -1,9 +1,10 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ import typing
4
+
3
5
  from ..core.api_error import ApiError
4
- from ..types.http_validation_error import HttpValidationError
5
6
 
6
7
 
7
8
  class UnprocessableEntityError(ApiError):
8
- def __init__(self, body: HttpValidationError):
9
+ def __init__(self, body: typing.Any):
9
10
  super().__init__(status_code=422, body=body)
@@ -1,5 +1,2 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- import typing
4
-
5
- ValidationErrorLocItem = typing.Union[str, int]
@@ -0,0 +1,122 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from json.decoder import JSONDecodeError
5
+
6
+ from ..core.api_error import ApiError
7
+ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
8
+ from ..core.pydantic_utilities import pydantic_v1
9
+ from ..core.request_options import RequestOptions
10
+ from ..errors.internal_server_error import InternalServerError
11
+ from ..errors.unauthorized_error import UnauthorizedError
12
+ from ..errors.unprocessable_entity_error import UnprocessableEntityError
13
+ from ..types.data_frame_request_out import DataFrameRequestOut
14
+ from ..types.sql_unauthorized_error import SqlUnauthorizedError
15
+
16
+
17
+ class QueryClient:
18
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
19
+ self._client_wrapper = client_wrapper
20
+
21
+ def execute(
22
+ self, *, snippet_asset_id: str, request_options: typing.Optional[RequestOptions] = None
23
+ ) -> DataFrameRequestOut:
24
+ """
25
+ Get the result of an SQL query over given assets.
26
+
27
+ Parameters
28
+ ----------
29
+ snippet_asset_id : str
30
+
31
+ request_options : typing.Optional[RequestOptions]
32
+ Request-specific configuration.
33
+
34
+ Returns
35
+ -------
36
+ DataFrameRequestOut
37
+ Successful Response
38
+
39
+ Examples
40
+ --------
41
+ from athena.client import Athena
42
+
43
+ client = Athena(
44
+ api_key="YOUR_API_KEY",
45
+ )
46
+ client.query.execute(
47
+ snippet_asset_id="snippet_asset_id",
48
+ )
49
+ """
50
+ _response = self._client_wrapper.httpx_client.request(
51
+ "api/v0/query/sql/snippet/execute",
52
+ method="GET",
53
+ params={"snippet_asset_id": snippet_asset_id},
54
+ request_options=request_options,
55
+ )
56
+ if 200 <= _response.status_code < 300:
57
+ return pydantic_v1.parse_obj_as(DataFrameRequestOut, _response.json()) # type: ignore
58
+ if _response.status_code == 401:
59
+ raise UnauthorizedError(pydantic_v1.parse_obj_as(SqlUnauthorizedError, _response.json())) # type: ignore
60
+ if _response.status_code == 422:
61
+ raise UnprocessableEntityError(pydantic_v1.parse_obj_as(typing.Any, _response.json())) # type: ignore
62
+ if _response.status_code == 500:
63
+ raise InternalServerError(pydantic_v1.parse_obj_as(typing.Any, _response.json())) # type: ignore
64
+ try:
65
+ _response_json = _response.json()
66
+ except JSONDecodeError:
67
+ raise ApiError(status_code=_response.status_code, body=_response.text)
68
+ raise ApiError(status_code=_response.status_code, body=_response_json)
69
+
70
+
71
+ class AsyncQueryClient:
72
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
73
+ self._client_wrapper = client_wrapper
74
+
75
+ async def execute(
76
+ self, *, snippet_asset_id: str, request_options: typing.Optional[RequestOptions] = None
77
+ ) -> DataFrameRequestOut:
78
+ """
79
+ Get the result of an SQL query over given assets.
80
+
81
+ Parameters
82
+ ----------
83
+ snippet_asset_id : str
84
+
85
+ request_options : typing.Optional[RequestOptions]
86
+ Request-specific configuration.
87
+
88
+ Returns
89
+ -------
90
+ DataFrameRequestOut
91
+ Successful Response
92
+
93
+ Examples
94
+ --------
95
+ from athena.client import AsyncAthena
96
+
97
+ client = AsyncAthena(
98
+ api_key="YOUR_API_KEY",
99
+ )
100
+ await client.query.execute(
101
+ snippet_asset_id="snippet_asset_id",
102
+ )
103
+ """
104
+ _response = await self._client_wrapper.httpx_client.request(
105
+ "api/v0/query/sql/snippet/execute",
106
+ method="GET",
107
+ params={"snippet_asset_id": snippet_asset_id},
108
+ request_options=request_options,
109
+ )
110
+ if 200 <= _response.status_code < 300:
111
+ return pydantic_v1.parse_obj_as(DataFrameRequestOut, _response.json()) # type: ignore
112
+ if _response.status_code == 401:
113
+ raise UnauthorizedError(pydantic_v1.parse_obj_as(SqlUnauthorizedError, _response.json())) # type: ignore
114
+ if _response.status_code == 422:
115
+ raise UnprocessableEntityError(pydantic_v1.parse_obj_as(typing.Any, _response.json())) # type: ignore
116
+ if _response.status_code == 500:
117
+ raise InternalServerError(pydantic_v1.parse_obj_as(typing.Any, _response.json())) # type: ignore
118
+ try:
119
+ _response_json = _response.json()
120
+ except JSONDecodeError:
121
+ raise ApiError(status_code=_response.status_code, body=_response.text)
122
+ raise ApiError(status_code=_response.status_code, body=_response_json)
@@ -11,11 +11,9 @@ from ..errors.internal_server_error import InternalServerError
11
11
  from ..errors.not_found_error import NotFoundError
12
12
  from ..errors.unprocessable_entity_error import UnprocessableEntityError
13
13
  from ..errors.unsupported_media_type_error import UnsupportedMediaTypeError
14
- from ..types.data_frame_parsing_error import DataFrameParsingError
15
14
  from ..types.data_frame_request_out import DataFrameRequestOut
16
15
  from ..types.data_frame_unknown_format_error import DataFrameUnknownFormatError
17
16
  from ..types.file_fetch_error import FileFetchError
18
- from ..types.http_validation_error import HttpValidationError
19
17
  from .types.tools_data_frame_request_columns_item import ToolsDataFrameRequestColumnsItem
20
18
 
21
19
 
@@ -95,11 +93,9 @@ class ToolsClient:
95
93
  pydantic_v1.parse_obj_as(DataFrameUnknownFormatError, _response.json()) # type: ignore
96
94
  )
97
95
  if _response.status_code == 422:
98
- raise UnprocessableEntityError(
99
- pydantic_v1.parse_obj_as(HttpValidationError, _response.json()) # type: ignore
100
- )
96
+ raise UnprocessableEntityError(pydantic_v1.parse_obj_as(typing.Any, _response.json())) # type: ignore
101
97
  if _response.status_code == 500:
102
- raise InternalServerError(pydantic_v1.parse_obj_as(DataFrameParsingError, _response.json())) # type: ignore
98
+ raise InternalServerError(pydantic_v1.parse_obj_as(typing.Any, _response.json())) # type: ignore
103
99
  try:
104
100
  _response_json = _response.json()
105
101
  except JSONDecodeError:
@@ -146,9 +142,7 @@ class ToolsClient:
146
142
  if _response.status_code == 404:
147
143
  raise NotFoundError(pydantic_v1.parse_obj_as(FileFetchError, _response.json())) # type: ignore
148
144
  if _response.status_code == 422:
149
- raise UnprocessableEntityError(
150
- pydantic_v1.parse_obj_as(HttpValidationError, _response.json()) # type: ignore
151
- )
145
+ raise UnprocessableEntityError(pydantic_v1.parse_obj_as(typing.Any, _response.json())) # type: ignore
152
146
  try:
153
147
  _response_json = _response.json()
154
148
  except JSONDecodeError:
@@ -232,11 +226,9 @@ class AsyncToolsClient:
232
226
  pydantic_v1.parse_obj_as(DataFrameUnknownFormatError, _response.json()) # type: ignore
233
227
  )
234
228
  if _response.status_code == 422:
235
- raise UnprocessableEntityError(
236
- pydantic_v1.parse_obj_as(HttpValidationError, _response.json()) # type: ignore
237
- )
229
+ raise UnprocessableEntityError(pydantic_v1.parse_obj_as(typing.Any, _response.json())) # type: ignore
238
230
  if _response.status_code == 500:
239
- raise InternalServerError(pydantic_v1.parse_obj_as(DataFrameParsingError, _response.json())) # type: ignore
231
+ raise InternalServerError(pydantic_v1.parse_obj_as(typing.Any, _response.json())) # type: ignore
240
232
  try:
241
233
  _response_json = _response.json()
242
234
  except JSONDecodeError:
@@ -283,9 +275,7 @@ class AsyncToolsClient:
283
275
  if _response.status_code == 404:
284
276
  raise NotFoundError(pydantic_v1.parse_obj_as(FileFetchError, _response.json())) # type: ignore
285
277
  if _response.status_code == 422:
286
- raise UnprocessableEntityError(
287
- pydantic_v1.parse_obj_as(HttpValidationError, _response.json()) # type: ignore
288
- )
278
+ raise UnprocessableEntityError(pydantic_v1.parse_obj_as(typing.Any, _response.json())) # type: ignore
289
279
  try:
290
280
  _response_json = _response.json()
291
281
  except JSONDecodeError:
@@ -1,25 +1,19 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from .data_frame_parsing_error import DataFrameParsingError
4
3
  from .data_frame_request_out import DataFrameRequestOut
5
4
  from .data_frame_request_out_columns_item import DataFrameRequestOutColumnsItem
6
5
  from .data_frame_request_out_data_item_item import DataFrameRequestOutDataItemItem
7
6
  from .data_frame_request_out_index_item import DataFrameRequestOutIndexItem
8
7
  from .data_frame_unknown_format_error import DataFrameUnknownFormatError
9
8
  from .file_fetch_error import FileFetchError
10
- from .http_validation_error import HttpValidationError
11
- from .validation_error import ValidationError
12
- from .validation_error_loc_item import ValidationErrorLocItem
9
+ from .sql_unauthorized_error import SqlUnauthorizedError
13
10
 
14
11
  __all__ = [
15
- "DataFrameParsingError",
16
12
  "DataFrameRequestOut",
17
13
  "DataFrameRequestOutColumnsItem",
18
14
  "DataFrameRequestOutDataItemItem",
19
15
  "DataFrameRequestOutIndexItem",
20
16
  "DataFrameUnknownFormatError",
21
17
  "FileFetchError",
22
- "HttpValidationError",
23
- "ValidationError",
24
- "ValidationErrorLocItem",
18
+ "SqlUnauthorizedError",
25
19
  ]
@@ -17,7 +17,7 @@ class DataFrameRequestOut(pydantic_v1.BaseModel):
17
17
 
18
18
  columns: typing.List[typing.Optional[DataFrameRequestOutColumnsItem]]
19
19
  data: typing.List[typing.List[typing.Optional[DataFrameRequestOutDataItemItem]]]
20
- index: typing.List[typing.Optional[DataFrameRequestOutIndexItem]]
20
+ index: typing.Optional[typing.List[typing.Optional[DataFrameRequestOutIndexItem]]] = None
21
21
 
22
22
  def json(self, **kwargs: typing.Any) -> str:
23
23
  kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
@@ -7,10 +7,7 @@ from ..core.datetime_utils import serialize_datetime
7
7
  from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
8
8
 
9
9
 
10
- class DataFrameParsingError(pydantic_v1.BaseModel):
11
- asset_id: str
12
- message: str
13
-
10
+ class SqlUnauthorizedError(pydantic_v1.BaseModel):
14
11
  def json(self, **kwargs: typing.Any) -> str:
15
12
  kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
16
13
  return super().json(**kwargs_with_defaults)
@@ -1,30 +0,0 @@
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 deep_union_pydantic_dicts, pydantic_v1
8
- from .validation_error import ValidationError
9
-
10
-
11
- class HttpValidationError(pydantic_v1.BaseModel):
12
- detail: typing.Optional[typing.List[ValidationError]] = None
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_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
20
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
21
-
22
- return deep_union_pydantic_dicts(
23
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
24
- )
25
-
26
- class Config:
27
- frozen = True
28
- smart_union = True
29
- extra = pydantic_v1.Extra.allow
30
- json_encoders = {dt.datetime: serialize_datetime}
@@ -1,32 +0,0 @@
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 deep_union_pydantic_dicts, pydantic_v1
8
- from .validation_error_loc_item import ValidationErrorLocItem
9
-
10
-
11
- class ValidationError(pydantic_v1.BaseModel):
12
- loc: typing.List[ValidationErrorLocItem]
13
- msg: str
14
- type: str
15
-
16
- def json(self, **kwargs: typing.Any) -> str:
17
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
18
- return super().json(**kwargs_with_defaults)
19
-
20
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
21
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
22
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
23
-
24
- return deep_union_pydantic_dicts(
25
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
26
- )
27
-
28
- class Config:
29
- frozen = True
30
- smart_union = True
31
- extra = pydantic_v1.Extra.allow
32
- json_encoders = {dt.datetime: serialize_datetime}