athena-intelligence 0.1.18__tar.gz → 0.1.20__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 (40) hide show
  1. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/PKG-INFO +1 -1
  2. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/pyproject.toml +1 -1
  3. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/__init__.py +14 -1
  4. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/core/client_wrapper.py +1 -1
  5. athena_intelligence-0.1.20/src/athena/dataset/client.py +103 -0
  6. athena_intelligence-0.1.20/src/athena/message/__init__.py +2 -0
  7. athena_intelligence-0.1.20/src/athena/report/__init__.py +2 -0
  8. athena_intelligence-0.1.20/src/athena/report/client.py +155 -0
  9. athena_intelligence-0.1.20/src/athena/snippet/__init__.py +2 -0
  10. athena_intelligence-0.1.20/src/athena/snippet/client.py +103 -0
  11. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/types/__init__.py +10 -0
  12. athena_intelligence-0.1.20/src/athena/types/dataset.py +31 -0
  13. athena_intelligence-0.1.20/src/athena/types/get_datasets_response.py +29 -0
  14. athena_intelligence-0.1.20/src/athena/types/get_snippets_response.py +29 -0
  15. athena_intelligence-0.1.20/src/athena/types/report.py +31 -0
  16. athena_intelligence-0.1.20/src/athena/types/snippet.py +34 -0
  17. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/README.md +0 -0
  18. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/client.py +0 -0
  19. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/core/__init__.py +0 -0
  20. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/core/api_error.py +0 -0
  21. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/core/datetime_utils.py +0 -0
  22. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/core/file.py +0 -0
  23. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/core/jsonable_encoder.py +0 -0
  24. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/core/remove_none_from_dict.py +0 -0
  25. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/core/request_options.py +0 -0
  26. {athena_intelligence-0.1.18/src/athena/message → athena_intelligence-0.1.20/src/athena/dataset}/__init__.py +0 -0
  27. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/environment.py +0 -0
  28. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/errors/__init__.py +0 -0
  29. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/errors/unprocessable_entity_error.py +0 -0
  30. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/message/client.py +0 -0
  31. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/polling_message_client.py +0 -0
  32. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/py.typed +0 -0
  33. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/types/http_validation_error.py +0 -0
  34. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/types/message_out.py +0 -0
  35. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/types/message_out_dto.py +0 -0
  36. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/types/model.py +0 -0
  37. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/types/status_enum.py +0 -0
  38. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/types/tools.py +0 -0
  39. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/types/validation_error.py +0 -0
  40. {athena_intelligence-0.1.18 → athena_intelligence-0.1.20}/src/athena/types/validation_error_loc_item.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: athena-intelligence
3
- Version: 0.1.18
3
+ Version: 0.1.20
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.18"
3
+ version = "0.1.20"
4
4
  description = ""
5
5
  readme = "README.md"
6
6
  authors = []
@@ -1,29 +1,42 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from .types import (
4
+ Dataset,
5
+ GetDatasetsResponse,
6
+ GetSnippetsResponse,
4
7
  HttpValidationError,
5
8
  MessageOut,
6
9
  MessageOutDto,
7
10
  Model,
11
+ Report,
12
+ Snippet,
8
13
  StatusEnum,
9
14
  Tools,
10
15
  ValidationError,
11
16
  ValidationErrorLocItem,
12
17
  )
13
18
  from .errors import UnprocessableEntityError
14
- from . import message
19
+ from . import dataset, message, report, snippet
15
20
  from .environment import AthenaEnvironment
16
21
 
17
22
  __all__ = [
18
23
  "AthenaEnvironment",
24
+ "Dataset",
25
+ "GetDatasetsResponse",
26
+ "GetSnippetsResponse",
19
27
  "HttpValidationError",
20
28
  "MessageOut",
21
29
  "MessageOutDto",
22
30
  "Model",
31
+ "Report",
32
+ "Snippet",
23
33
  "StatusEnum",
24
34
  "Tools",
25
35
  "UnprocessableEntityError",
26
36
  "ValidationError",
27
37
  "ValidationErrorLocItem",
38
+ "dataset",
28
39
  "message",
40
+ "report",
41
+ "snippet",
29
42
  ]
@@ -14,7 +14,7 @@ class BaseClientWrapper:
14
14
  headers: typing.Dict[str, str] = {
15
15
  "X-Fern-Language": "Python",
16
16
  "X-Fern-SDK-Name": "athena-intelligence",
17
- "X-Fern-SDK-Version": "0.1.18",
17
+ "X-Fern-SDK-Version": "0.1.20",
18
18
  }
19
19
  headers["X-API-KEY"] = self.api_key
20
20
  return headers
@@ -0,0 +1,103 @@
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.remove_none_from_dict import remove_none_from_dict
11
+ from ..core.request_options import RequestOptions
12
+ from ..types.get_datasets_response import GetDatasetsResponse
13
+
14
+ try:
15
+ import pydantic.v1 as pydantic # type: ignore
16
+ except ImportError:
17
+ import pydantic # type: ignore
18
+
19
+
20
+ class DatasetClient:
21
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
22
+ self._client_wrapper = client_wrapper
23
+
24
+ def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> GetDatasetsResponse:
25
+ """
26
+ Parameters:
27
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
28
+ ---
29
+ from athena.client import Athena
30
+
31
+ client = Athena(
32
+ api_key="YOUR_API_KEY",
33
+ )
34
+ client.dataset.get()
35
+ """
36
+ _response = self._client_wrapper.httpx_client.request(
37
+ "GET",
38
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/datasets"),
39
+ params=jsonable_encoder(
40
+ request_options.get("additional_query_parameters") if request_options is not None else None
41
+ ),
42
+ headers=jsonable_encoder(
43
+ remove_none_from_dict(
44
+ {
45
+ **self._client_wrapper.get_headers(),
46
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
47
+ }
48
+ )
49
+ ),
50
+ timeout=request_options.get("timeout_in_seconds")
51
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
52
+ else 60,
53
+ )
54
+ if 200 <= _response.status_code < 300:
55
+ return pydantic.parse_obj_as(GetDatasetsResponse, _response.json()) # type: ignore
56
+ try:
57
+ _response_json = _response.json()
58
+ except JSONDecodeError:
59
+ raise ApiError(status_code=_response.status_code, body=_response.text)
60
+ raise ApiError(status_code=_response.status_code, body=_response_json)
61
+
62
+
63
+ class AsyncDatasetClient:
64
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
65
+ self._client_wrapper = client_wrapper
66
+
67
+ async def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> GetDatasetsResponse:
68
+ """
69
+ Parameters:
70
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
71
+ ---
72
+ from athena.client import AsyncAthena
73
+
74
+ client = AsyncAthena(
75
+ api_key="YOUR_API_KEY",
76
+ )
77
+ await client.dataset.get()
78
+ """
79
+ _response = await self._client_wrapper.httpx_client.request(
80
+ "GET",
81
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/datasets"),
82
+ params=jsonable_encoder(
83
+ request_options.get("additional_query_parameters") if request_options is not None else None
84
+ ),
85
+ headers=jsonable_encoder(
86
+ remove_none_from_dict(
87
+ {
88
+ **self._client_wrapper.get_headers(),
89
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
90
+ }
91
+ )
92
+ ),
93
+ timeout=request_options.get("timeout_in_seconds")
94
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
95
+ else 60,
96
+ )
97
+ if 200 <= _response.status_code < 300:
98
+ return pydantic.parse_obj_as(GetDatasetsResponse, _response.json()) # type: ignore
99
+ try:
100
+ _response_json = _response.json()
101
+ except JSONDecodeError:
102
+ raise ApiError(status_code=_response.status_code, body=_response.text)
103
+ raise ApiError(status_code=_response.status_code, body=_response_json)
@@ -0,0 +1,2 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
@@ -0,0 +1,2 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
@@ -0,0 +1,155 @@
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.remove_none_from_dict import remove_none_from_dict
11
+ from ..core.request_options import RequestOptions
12
+ from ..errors.unprocessable_entity_error import UnprocessableEntityError
13
+ from ..types.http_validation_error import HttpValidationError
14
+ from ..types.report import Report
15
+
16
+ try:
17
+ import pydantic.v1 as pydantic # type: ignore
18
+ except ImportError:
19
+ import pydantic # type: ignore
20
+
21
+
22
+ class ReportClient:
23
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
24
+ self._client_wrapper = client_wrapper
25
+
26
+ def create(
27
+ self,
28
+ *,
29
+ name: typing.Optional[str] = None,
30
+ workspace_access: typing.Optional[bool] = None,
31
+ request_options: typing.Optional[RequestOptions] = None,
32
+ ) -> Report:
33
+ """
34
+ Parameters:
35
+ - name: typing.Optional[str].
36
+
37
+ - workspace_access: typing.Optional[bool].
38
+
39
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
40
+ ---
41
+ from athena.client import Athena
42
+
43
+ client = Athena(
44
+ api_key="YOUR_API_KEY",
45
+ )
46
+ client.report.create()
47
+ """
48
+ _response = self._client_wrapper.httpx_client.request(
49
+ "POST",
50
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/report"),
51
+ params=jsonable_encoder(
52
+ remove_none_from_dict(
53
+ {
54
+ "name": name,
55
+ "workspace_access": workspace_access,
56
+ **(
57
+ request_options.get("additional_query_parameters", {})
58
+ if request_options is not None
59
+ else {}
60
+ ),
61
+ }
62
+ )
63
+ ),
64
+ json=jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))
65
+ if request_options is not None
66
+ else None,
67
+ headers=jsonable_encoder(
68
+ remove_none_from_dict(
69
+ {
70
+ **self._client_wrapper.get_headers(),
71
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
72
+ }
73
+ )
74
+ ),
75
+ timeout=request_options.get("timeout_in_seconds")
76
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
77
+ else 60,
78
+ )
79
+ if 200 <= _response.status_code < 300:
80
+ return pydantic.parse_obj_as(Report, _response.json()) # type: ignore
81
+ if _response.status_code == 422:
82
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
83
+ try:
84
+ _response_json = _response.json()
85
+ except JSONDecodeError:
86
+ raise ApiError(status_code=_response.status_code, body=_response.text)
87
+ raise ApiError(status_code=_response.status_code, body=_response_json)
88
+
89
+
90
+ class AsyncReportClient:
91
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
92
+ self._client_wrapper = client_wrapper
93
+
94
+ async def create(
95
+ self,
96
+ *,
97
+ name: typing.Optional[str] = None,
98
+ workspace_access: typing.Optional[bool] = None,
99
+ request_options: typing.Optional[RequestOptions] = None,
100
+ ) -> Report:
101
+ """
102
+ Parameters:
103
+ - name: typing.Optional[str].
104
+
105
+ - workspace_access: typing.Optional[bool].
106
+
107
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
108
+ ---
109
+ from athena.client import AsyncAthena
110
+
111
+ client = AsyncAthena(
112
+ api_key="YOUR_API_KEY",
113
+ )
114
+ await client.report.create()
115
+ """
116
+ _response = await self._client_wrapper.httpx_client.request(
117
+ "POST",
118
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/report"),
119
+ params=jsonable_encoder(
120
+ remove_none_from_dict(
121
+ {
122
+ "name": name,
123
+ "workspace_access": workspace_access,
124
+ **(
125
+ request_options.get("additional_query_parameters", {})
126
+ if request_options is not None
127
+ else {}
128
+ ),
129
+ }
130
+ )
131
+ ),
132
+ json=jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))
133
+ if request_options is not None
134
+ else None,
135
+ headers=jsonable_encoder(
136
+ remove_none_from_dict(
137
+ {
138
+ **self._client_wrapper.get_headers(),
139
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
140
+ }
141
+ )
142
+ ),
143
+ timeout=request_options.get("timeout_in_seconds")
144
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
145
+ else 60,
146
+ )
147
+ if 200 <= _response.status_code < 300:
148
+ return pydantic.parse_obj_as(Report, _response.json()) # type: ignore
149
+ if _response.status_code == 422:
150
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
151
+ try:
152
+ _response_json = _response.json()
153
+ except JSONDecodeError:
154
+ raise ApiError(status_code=_response.status_code, body=_response.text)
155
+ raise ApiError(status_code=_response.status_code, body=_response_json)
@@ -0,0 +1,2 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
@@ -0,0 +1,103 @@
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.remove_none_from_dict import remove_none_from_dict
11
+ from ..core.request_options import RequestOptions
12
+ from ..types.get_snippets_response import GetSnippetsResponse
13
+
14
+ try:
15
+ import pydantic.v1 as pydantic # type: ignore
16
+ except ImportError:
17
+ import pydantic # type: ignore
18
+
19
+
20
+ class SnippetClient:
21
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
22
+ self._client_wrapper = client_wrapper
23
+
24
+ def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> GetSnippetsResponse:
25
+ """
26
+ Parameters:
27
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
28
+ ---
29
+ from athena.client import Athena
30
+
31
+ client = Athena(
32
+ api_key="YOUR_API_KEY",
33
+ )
34
+ client.snippet.get()
35
+ """
36
+ _response = self._client_wrapper.httpx_client.request(
37
+ "GET",
38
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/snippets"),
39
+ params=jsonable_encoder(
40
+ request_options.get("additional_query_parameters") if request_options is not None else None
41
+ ),
42
+ headers=jsonable_encoder(
43
+ remove_none_from_dict(
44
+ {
45
+ **self._client_wrapper.get_headers(),
46
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
47
+ }
48
+ )
49
+ ),
50
+ timeout=request_options.get("timeout_in_seconds")
51
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
52
+ else 60,
53
+ )
54
+ if 200 <= _response.status_code < 300:
55
+ return pydantic.parse_obj_as(GetSnippetsResponse, _response.json()) # type: ignore
56
+ try:
57
+ _response_json = _response.json()
58
+ except JSONDecodeError:
59
+ raise ApiError(status_code=_response.status_code, body=_response.text)
60
+ raise ApiError(status_code=_response.status_code, body=_response_json)
61
+
62
+
63
+ class AsyncSnippetClient:
64
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
65
+ self._client_wrapper = client_wrapper
66
+
67
+ async def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> GetSnippetsResponse:
68
+ """
69
+ Parameters:
70
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
71
+ ---
72
+ from athena.client import AsyncAthena
73
+
74
+ client = AsyncAthena(
75
+ api_key="YOUR_API_KEY",
76
+ )
77
+ await client.snippet.get()
78
+ """
79
+ _response = await self._client_wrapper.httpx_client.request(
80
+ "GET",
81
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/snippets"),
82
+ params=jsonable_encoder(
83
+ request_options.get("additional_query_parameters") if request_options is not None else None
84
+ ),
85
+ headers=jsonable_encoder(
86
+ remove_none_from_dict(
87
+ {
88
+ **self._client_wrapper.get_headers(),
89
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
90
+ }
91
+ )
92
+ ),
93
+ timeout=request_options.get("timeout_in_seconds")
94
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
95
+ else 60,
96
+ )
97
+ if 200 <= _response.status_code < 300:
98
+ return pydantic.parse_obj_as(GetSnippetsResponse, _response.json()) # type: ignore
99
+ try:
100
+ _response_json = _response.json()
101
+ except JSONDecodeError:
102
+ raise ApiError(status_code=_response.status_code, body=_response.text)
103
+ raise ApiError(status_code=_response.status_code, body=_response_json)
@@ -1,19 +1,29 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ from .dataset import Dataset
4
+ from .get_datasets_response import GetDatasetsResponse
5
+ from .get_snippets_response import GetSnippetsResponse
3
6
  from .http_validation_error import HttpValidationError
4
7
  from .message_out import MessageOut
5
8
  from .message_out_dto import MessageOutDto
6
9
  from .model import Model
10
+ from .report import Report
11
+ from .snippet import Snippet
7
12
  from .status_enum import StatusEnum
8
13
  from .tools import Tools
9
14
  from .validation_error import ValidationError
10
15
  from .validation_error_loc_item import ValidationErrorLocItem
11
16
 
12
17
  __all__ = [
18
+ "Dataset",
19
+ "GetDatasetsResponse",
20
+ "GetSnippetsResponse",
13
21
  "HttpValidationError",
14
22
  "MessageOut",
15
23
  "MessageOutDto",
16
24
  "Model",
25
+ "Report",
26
+ "Snippet",
17
27
  "StatusEnum",
18
28
  "Tools",
19
29
  "ValidationError",
@@ -0,0 +1,31 @@
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 Dataset(pydantic.BaseModel):
15
+ id: str
16
+ name: typing.Optional[str] = None
17
+ description: typing.Optional[str] = None
18
+ database_id: int
19
+
20
+ def json(self, **kwargs: typing.Any) -> str:
21
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
22
+ return super().json(**kwargs_with_defaults)
23
+
24
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
26
+ return super().dict(**kwargs_with_defaults)
27
+
28
+ class Config:
29
+ frozen = True
30
+ smart_union = True
31
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,29 @@
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 .dataset import Dataset
8
+
9
+ try:
10
+ import pydantic.v1 as pydantic # type: ignore
11
+ except ImportError:
12
+ import pydantic # type: ignore
13
+
14
+
15
+ class GetDatasetsResponse(pydantic.BaseModel):
16
+ datasets: typing.List[Dataset]
17
+
18
+ def json(self, **kwargs: typing.Any) -> str:
19
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
20
+ return super().json(**kwargs_with_defaults)
21
+
22
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
24
+ return super().dict(**kwargs_with_defaults)
25
+
26
+ class Config:
27
+ frozen = True
28
+ smart_union = True
29
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,29 @@
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 .snippet import Snippet
8
+
9
+ try:
10
+ import pydantic.v1 as pydantic # type: ignore
11
+ except ImportError:
12
+ import pydantic # type: ignore
13
+
14
+
15
+ class GetSnippetsResponse(pydantic.BaseModel):
16
+ snippets: typing.List[Snippet]
17
+
18
+ def json(self, **kwargs: typing.Any) -> str:
19
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
20
+ return super().json(**kwargs_with_defaults)
21
+
22
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
24
+ return super().dict(**kwargs_with_defaults)
25
+
26
+ class Config:
27
+ frozen = True
28
+ smart_union = True
29
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,31 @@
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 Report(pydantic.BaseModel):
15
+ id: str
16
+ name: typing.Optional[str] = None
17
+ workspace_access: bool
18
+ created_at: str
19
+
20
+ def json(self, **kwargs: typing.Any) -> str:
21
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
22
+ return super().json(**kwargs_with_defaults)
23
+
24
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
26
+ return super().dict(**kwargs_with_defaults)
27
+
28
+ class Config:
29
+ frozen = True
30
+ smart_union = True
31
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,34 @@
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 Snippet(pydantic.BaseModel):
15
+ id: str
16
+ title: typing.Optional[str] = None
17
+ description: typing.Optional[str] = None
18
+ content: typing.Optional[str] = None
19
+ language: typing.Optional[str] = None
20
+ created_at: str
21
+ dependencies: typing.Optional[typing.Dict[str, typing.List[str]]] = None
22
+
23
+ def json(self, **kwargs: typing.Any) -> str:
24
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
25
+ return super().json(**kwargs_with_defaults)
26
+
27
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
28
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
29
+ return super().dict(**kwargs_with_defaults)
30
+
31
+ class Config:
32
+ frozen = True
33
+ smart_union = True
34
+ json_encoders = {dt.datetime: serialize_datetime}