stratyfy-cli 0.1.0__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.
- pre_api_client/__init__.py +8 -0
- pre_api_client/api/__init__.py +1 -0
- pre_api_client/api/default/__init__.py +1 -0
- pre_api_client/api/default/create_dataset.py +184 -0
- pre_api_client/api/default/create_model_version.py +197 -0
- pre_api_client/api/default/get_dataset.py +166 -0
- pre_api_client/api/default/get_device_token.py +178 -0
- pre_api_client/api/default/get_model.py +166 -0
- pre_api_client/api/default/get_workspace.py +134 -0
- pre_api_client/api/default/list_datasets.py +134 -0
- pre_api_client/api/default/list_models.py +166 -0
- pre_api_client/api/default/list_rules.py +171 -0
- pre_api_client/api/default/predict.py +197 -0
- pre_api_client/api/default/start_device_login.py +128 -0
- pre_api_client/api/default/train_model.py +176 -0
- pre_api_client/client.py +280 -0
- pre_api_client/errors.py +16 -0
- pre_api_client/models/__init__.py +69 -0
- pre_api_client/models/clause.py +128 -0
- pre_api_client/models/clause_operator.py +18 -0
- pre_api_client/models/column.py +87 -0
- pre_api_client/models/column_domain.py +10 -0
- pre_api_client/models/create_dataset_body.py +85 -0
- pre_api_client/models/create_model_version_body.py +75 -0
- pre_api_client/models/dataset.py +116 -0
- pre_api_client/models/device_code.py +101 -0
- pre_api_client/models/device_token.py +93 -0
- pre_api_client/models/device_token_token_type.py +8 -0
- pre_api_client/models/error.py +81 -0
- pre_api_client/models/error_code.py +25 -0
- pre_api_client/models/get_device_token_body.py +61 -0
- pre_api_client/models/list_datasets_response_200.py +75 -0
- pre_api_client/models/list_models_response_200.py +75 -0
- pre_api_client/models/list_rules_response_200.py +75 -0
- pre_api_client/models/metrics.py +129 -0
- pre_api_client/models/metrics_calibration_item.py +77 -0
- pre_api_client/models/metrics_lift_item.py +77 -0
- pre_api_client/models/model.py +234 -0
- pre_api_client/models/model_status.py +11 -0
- pre_api_client/models/predict_body.py +79 -0
- pre_api_client/models/predict_body_rows_item.py +45 -0
- pre_api_client/models/predict_response_200.py +75 -0
- pre_api_client/models/prediction.py +112 -0
- pre_api_client/models/prediction_fired_rules_item.py +99 -0
- pre_api_client/models/rule.py +138 -0
- pre_api_client/models/rule_change.py +95 -0
- pre_api_client/models/rule_change_action.py +10 -0
- pre_api_client/models/rule_input.py +96 -0
- pre_api_client/models/train_request.py +94 -0
- pre_api_client/models/workspace.py +69 -0
- pre_api_client/types.py +54 -0
- pre_cli/__init__.py +0 -0
- pre_cli/config.py +31 -0
- pre_cli/data.py +92 -0
- pre_cli/main.py +749 -0
- pre_cli/sandbox.py +94 -0
- pre_cli/schema.py +72 -0
- pre_report/__init__.py +4 -0
- pre_report/render.py +124 -0
- pre_report/template.html +49 -0
- pre_report/types.py +30 -0
- pre_words/__init__.py +105 -0
- stratyfy_cli-0.1.0.dist-info/METADATA +119 -0
- stratyfy_cli-0.1.0.dist-info/RECORD +66 -0
- stratyfy_cli-0.1.0.dist-info/WHEEL +4 -0
- stratyfy_cli-0.1.0.dist-info/entry_points.txt +2 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains methods for accessing the API"""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains endpoint functions for accessing the API"""
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.create_dataset_body import CreateDatasetBody
|
|
9
|
+
from ...models.dataset import Dataset
|
|
10
|
+
from ...models.error import Error
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
*,
|
|
16
|
+
body: CreateDatasetBody,
|
|
17
|
+
) -> dict[str, Any]:
|
|
18
|
+
headers: dict[str, Any] = {}
|
|
19
|
+
|
|
20
|
+
_kwargs: dict[str, Any] = {
|
|
21
|
+
"method": "post",
|
|
22
|
+
"url": "/datasets",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
_kwargs["files"] = body.to_multipart()
|
|
26
|
+
|
|
27
|
+
headers["Content-Type"] = "multipart/form-data; boundary=+++"
|
|
28
|
+
|
|
29
|
+
_kwargs["headers"] = headers
|
|
30
|
+
return _kwargs
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _parse_response(
|
|
34
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
35
|
+
) -> Dataset | Error | None:
|
|
36
|
+
if response.status_code == 201:
|
|
37
|
+
response_201 = Dataset.from_dict(response.json())
|
|
38
|
+
|
|
39
|
+
return response_201
|
|
40
|
+
|
|
41
|
+
if response.status_code == 400:
|
|
42
|
+
response_400 = Error.from_dict(response.json())
|
|
43
|
+
|
|
44
|
+
return response_400
|
|
45
|
+
|
|
46
|
+
if response.status_code == 401:
|
|
47
|
+
response_401 = Error.from_dict(response.json())
|
|
48
|
+
|
|
49
|
+
return response_401
|
|
50
|
+
|
|
51
|
+
if response.status_code == 413:
|
|
52
|
+
response_413 = Error.from_dict(response.json())
|
|
53
|
+
|
|
54
|
+
return response_413
|
|
55
|
+
|
|
56
|
+
if client.raise_on_unexpected_status:
|
|
57
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
58
|
+
else:
|
|
59
|
+
return None
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def _build_response(
|
|
63
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
64
|
+
) -> Response[Dataset | Error]:
|
|
65
|
+
return Response(
|
|
66
|
+
status_code=HTTPStatus(response.status_code),
|
|
67
|
+
content=response.content,
|
|
68
|
+
headers=response.headers,
|
|
69
|
+
parsed=_parse_response(client=client, response=response),
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def sync_detailed(
|
|
74
|
+
*,
|
|
75
|
+
client: AuthenticatedClient,
|
|
76
|
+
body: CreateDatasetBody,
|
|
77
|
+
) -> Response[Dataset | Error]:
|
|
78
|
+
"""Upload labelled training data as a CSV or parquet file. The response holds the profile.
|
|
79
|
+
|
|
80
|
+
The API takes a file only. It does not take rows as JSON.
|
|
81
|
+
|
|
82
|
+
Args:
|
|
83
|
+
body (CreateDatasetBody):
|
|
84
|
+
|
|
85
|
+
Raises:
|
|
86
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
87
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
88
|
+
|
|
89
|
+
Returns:
|
|
90
|
+
Response[Dataset | Error]
|
|
91
|
+
"""
|
|
92
|
+
|
|
93
|
+
kwargs = _get_kwargs(
|
|
94
|
+
body=body,
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
response = client.get_httpx_client().request(
|
|
98
|
+
**kwargs,
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
return _build_response(client=client, response=response)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def sync(
|
|
105
|
+
*,
|
|
106
|
+
client: AuthenticatedClient,
|
|
107
|
+
body: CreateDatasetBody,
|
|
108
|
+
) -> Dataset | Error | None:
|
|
109
|
+
"""Upload labelled training data as a CSV or parquet file. The response holds the profile.
|
|
110
|
+
|
|
111
|
+
The API takes a file only. It does not take rows as JSON.
|
|
112
|
+
|
|
113
|
+
Args:
|
|
114
|
+
body (CreateDatasetBody):
|
|
115
|
+
|
|
116
|
+
Raises:
|
|
117
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
118
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
119
|
+
|
|
120
|
+
Returns:
|
|
121
|
+
Dataset | Error
|
|
122
|
+
"""
|
|
123
|
+
|
|
124
|
+
return sync_detailed(
|
|
125
|
+
client=client,
|
|
126
|
+
body=body,
|
|
127
|
+
).parsed
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
async def asyncio_detailed(
|
|
131
|
+
*,
|
|
132
|
+
client: AuthenticatedClient,
|
|
133
|
+
body: CreateDatasetBody,
|
|
134
|
+
) -> Response[Dataset | Error]:
|
|
135
|
+
"""Upload labelled training data as a CSV or parquet file. The response holds the profile.
|
|
136
|
+
|
|
137
|
+
The API takes a file only. It does not take rows as JSON.
|
|
138
|
+
|
|
139
|
+
Args:
|
|
140
|
+
body (CreateDatasetBody):
|
|
141
|
+
|
|
142
|
+
Raises:
|
|
143
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
144
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
145
|
+
|
|
146
|
+
Returns:
|
|
147
|
+
Response[Dataset | Error]
|
|
148
|
+
"""
|
|
149
|
+
|
|
150
|
+
kwargs = _get_kwargs(
|
|
151
|
+
body=body,
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
155
|
+
|
|
156
|
+
return _build_response(client=client, response=response)
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
async def asyncio(
|
|
160
|
+
*,
|
|
161
|
+
client: AuthenticatedClient,
|
|
162
|
+
body: CreateDatasetBody,
|
|
163
|
+
) -> Dataset | Error | None:
|
|
164
|
+
"""Upload labelled training data as a CSV or parquet file. The response holds the profile.
|
|
165
|
+
|
|
166
|
+
The API takes a file only. It does not take rows as JSON.
|
|
167
|
+
|
|
168
|
+
Args:
|
|
169
|
+
body (CreateDatasetBody):
|
|
170
|
+
|
|
171
|
+
Raises:
|
|
172
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
173
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
174
|
+
|
|
175
|
+
Returns:
|
|
176
|
+
Dataset | Error
|
|
177
|
+
"""
|
|
178
|
+
|
|
179
|
+
return (
|
|
180
|
+
await asyncio_detailed(
|
|
181
|
+
client=client,
|
|
182
|
+
body=body,
|
|
183
|
+
)
|
|
184
|
+
).parsed
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
from urllib.parse import quote
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ... import errors
|
|
8
|
+
from ...client import AuthenticatedClient, Client
|
|
9
|
+
from ...models.create_model_version_body import CreateModelVersionBody
|
|
10
|
+
from ...models.error import Error
|
|
11
|
+
from ...models.model import Model
|
|
12
|
+
from ...types import Response
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _get_kwargs(
|
|
16
|
+
model_id: str,
|
|
17
|
+
*,
|
|
18
|
+
body: CreateModelVersionBody,
|
|
19
|
+
) -> dict[str, Any]:
|
|
20
|
+
headers: dict[str, Any] = {}
|
|
21
|
+
|
|
22
|
+
_kwargs: dict[str, Any] = {
|
|
23
|
+
"method": "post",
|
|
24
|
+
"url": "/models/{model_id}/versions".format(
|
|
25
|
+
model_id=quote(str(model_id), safe=""),
|
|
26
|
+
),
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
_kwargs["json"] = body.to_dict()
|
|
30
|
+
|
|
31
|
+
headers["Content-Type"] = "application/json"
|
|
32
|
+
|
|
33
|
+
_kwargs["headers"] = headers
|
|
34
|
+
return _kwargs
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _parse_response(
|
|
38
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
39
|
+
) -> Error | Model | None:
|
|
40
|
+
if response.status_code == 202:
|
|
41
|
+
response_202 = Model.from_dict(response.json())
|
|
42
|
+
|
|
43
|
+
return response_202
|
|
44
|
+
|
|
45
|
+
if response.status_code == 400:
|
|
46
|
+
response_400 = Error.from_dict(response.json())
|
|
47
|
+
|
|
48
|
+
return response_400
|
|
49
|
+
|
|
50
|
+
if response.status_code == 401:
|
|
51
|
+
response_401 = Error.from_dict(response.json())
|
|
52
|
+
|
|
53
|
+
return response_401
|
|
54
|
+
|
|
55
|
+
if response.status_code == 404:
|
|
56
|
+
response_404 = Error.from_dict(response.json())
|
|
57
|
+
|
|
58
|
+
return response_404
|
|
59
|
+
|
|
60
|
+
if response.status_code == 409:
|
|
61
|
+
response_409 = Error.from_dict(response.json())
|
|
62
|
+
|
|
63
|
+
return response_409
|
|
64
|
+
|
|
65
|
+
if client.raise_on_unexpected_status:
|
|
66
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
67
|
+
else:
|
|
68
|
+
return None
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def _build_response(
|
|
72
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
73
|
+
) -> Response[Error | Model]:
|
|
74
|
+
return Response(
|
|
75
|
+
status_code=HTTPStatus(response.status_code),
|
|
76
|
+
content=response.content,
|
|
77
|
+
headers=response.headers,
|
|
78
|
+
parsed=_parse_response(client=client, response=response),
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def sync_detailed(
|
|
83
|
+
model_id: str,
|
|
84
|
+
*,
|
|
85
|
+
client: AuthenticatedClient,
|
|
86
|
+
body: CreateModelVersionBody,
|
|
87
|
+
) -> Response[Error | Model]:
|
|
88
|
+
"""Add, edit or remove rules. This makes a new version and refits it. The old version does not change.
|
|
89
|
+
|
|
90
|
+
Args:
|
|
91
|
+
model_id (str):
|
|
92
|
+
body (CreateModelVersionBody):
|
|
93
|
+
|
|
94
|
+
Raises:
|
|
95
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
96
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
97
|
+
|
|
98
|
+
Returns:
|
|
99
|
+
Response[Error | Model]
|
|
100
|
+
"""
|
|
101
|
+
|
|
102
|
+
kwargs = _get_kwargs(
|
|
103
|
+
model_id=model_id,
|
|
104
|
+
body=body,
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
response = client.get_httpx_client().request(
|
|
108
|
+
**kwargs,
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
return _build_response(client=client, response=response)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def sync(
|
|
115
|
+
model_id: str,
|
|
116
|
+
*,
|
|
117
|
+
client: AuthenticatedClient,
|
|
118
|
+
body: CreateModelVersionBody,
|
|
119
|
+
) -> Error | Model | None:
|
|
120
|
+
"""Add, edit or remove rules. This makes a new version and refits it. The old version does not change.
|
|
121
|
+
|
|
122
|
+
Args:
|
|
123
|
+
model_id (str):
|
|
124
|
+
body (CreateModelVersionBody):
|
|
125
|
+
|
|
126
|
+
Raises:
|
|
127
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
128
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
129
|
+
|
|
130
|
+
Returns:
|
|
131
|
+
Error | Model
|
|
132
|
+
"""
|
|
133
|
+
|
|
134
|
+
return sync_detailed(
|
|
135
|
+
model_id=model_id,
|
|
136
|
+
client=client,
|
|
137
|
+
body=body,
|
|
138
|
+
).parsed
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
async def asyncio_detailed(
|
|
142
|
+
model_id: str,
|
|
143
|
+
*,
|
|
144
|
+
client: AuthenticatedClient,
|
|
145
|
+
body: CreateModelVersionBody,
|
|
146
|
+
) -> Response[Error | Model]:
|
|
147
|
+
"""Add, edit or remove rules. This makes a new version and refits it. The old version does not change.
|
|
148
|
+
|
|
149
|
+
Args:
|
|
150
|
+
model_id (str):
|
|
151
|
+
body (CreateModelVersionBody):
|
|
152
|
+
|
|
153
|
+
Raises:
|
|
154
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
155
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
156
|
+
|
|
157
|
+
Returns:
|
|
158
|
+
Response[Error | Model]
|
|
159
|
+
"""
|
|
160
|
+
|
|
161
|
+
kwargs = _get_kwargs(
|
|
162
|
+
model_id=model_id,
|
|
163
|
+
body=body,
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
167
|
+
|
|
168
|
+
return _build_response(client=client, response=response)
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
async def asyncio(
|
|
172
|
+
model_id: str,
|
|
173
|
+
*,
|
|
174
|
+
client: AuthenticatedClient,
|
|
175
|
+
body: CreateModelVersionBody,
|
|
176
|
+
) -> Error | Model | None:
|
|
177
|
+
"""Add, edit or remove rules. This makes a new version and refits it. The old version does not change.
|
|
178
|
+
|
|
179
|
+
Args:
|
|
180
|
+
model_id (str):
|
|
181
|
+
body (CreateModelVersionBody):
|
|
182
|
+
|
|
183
|
+
Raises:
|
|
184
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
185
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
186
|
+
|
|
187
|
+
Returns:
|
|
188
|
+
Error | Model
|
|
189
|
+
"""
|
|
190
|
+
|
|
191
|
+
return (
|
|
192
|
+
await asyncio_detailed(
|
|
193
|
+
model_id=model_id,
|
|
194
|
+
client=client,
|
|
195
|
+
body=body,
|
|
196
|
+
)
|
|
197
|
+
).parsed
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
from urllib.parse import quote
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ... import errors
|
|
8
|
+
from ...client import AuthenticatedClient, Client
|
|
9
|
+
from ...models.dataset import Dataset
|
|
10
|
+
from ...models.error import Error
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
dataset_id: str,
|
|
16
|
+
) -> dict[str, Any]:
|
|
17
|
+
|
|
18
|
+
_kwargs: dict[str, Any] = {
|
|
19
|
+
"method": "get",
|
|
20
|
+
"url": "/datasets/{dataset_id}".format(
|
|
21
|
+
dataset_id=quote(str(dataset_id), safe=""),
|
|
22
|
+
),
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return _kwargs
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _parse_response(
|
|
29
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
30
|
+
) -> Dataset | Error | None:
|
|
31
|
+
if response.status_code == 200:
|
|
32
|
+
response_200 = Dataset.from_dict(response.json())
|
|
33
|
+
|
|
34
|
+
return response_200
|
|
35
|
+
|
|
36
|
+
if response.status_code == 401:
|
|
37
|
+
response_401 = Error.from_dict(response.json())
|
|
38
|
+
|
|
39
|
+
return response_401
|
|
40
|
+
|
|
41
|
+
if response.status_code == 404:
|
|
42
|
+
response_404 = Error.from_dict(response.json())
|
|
43
|
+
|
|
44
|
+
return response_404
|
|
45
|
+
|
|
46
|
+
if client.raise_on_unexpected_status:
|
|
47
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
48
|
+
else:
|
|
49
|
+
return None
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _build_response(
|
|
53
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
54
|
+
) -> Response[Dataset | Error]:
|
|
55
|
+
return Response(
|
|
56
|
+
status_code=HTTPStatus(response.status_code),
|
|
57
|
+
content=response.content,
|
|
58
|
+
headers=response.headers,
|
|
59
|
+
parsed=_parse_response(client=client, response=response),
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def sync_detailed(
|
|
64
|
+
dataset_id: str,
|
|
65
|
+
*,
|
|
66
|
+
client: AuthenticatedClient,
|
|
67
|
+
) -> Response[Dataset | Error]:
|
|
68
|
+
"""Read a dataset and its profile.
|
|
69
|
+
|
|
70
|
+
Args:
|
|
71
|
+
dataset_id (str):
|
|
72
|
+
|
|
73
|
+
Raises:
|
|
74
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
75
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
76
|
+
|
|
77
|
+
Returns:
|
|
78
|
+
Response[Dataset | Error]
|
|
79
|
+
"""
|
|
80
|
+
|
|
81
|
+
kwargs = _get_kwargs(
|
|
82
|
+
dataset_id=dataset_id,
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
response = client.get_httpx_client().request(
|
|
86
|
+
**kwargs,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
return _build_response(client=client, response=response)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def sync(
|
|
93
|
+
dataset_id: str,
|
|
94
|
+
*,
|
|
95
|
+
client: AuthenticatedClient,
|
|
96
|
+
) -> Dataset | Error | None:
|
|
97
|
+
"""Read a dataset and its profile.
|
|
98
|
+
|
|
99
|
+
Args:
|
|
100
|
+
dataset_id (str):
|
|
101
|
+
|
|
102
|
+
Raises:
|
|
103
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
104
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
105
|
+
|
|
106
|
+
Returns:
|
|
107
|
+
Dataset | Error
|
|
108
|
+
"""
|
|
109
|
+
|
|
110
|
+
return sync_detailed(
|
|
111
|
+
dataset_id=dataset_id,
|
|
112
|
+
client=client,
|
|
113
|
+
).parsed
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
async def asyncio_detailed(
|
|
117
|
+
dataset_id: str,
|
|
118
|
+
*,
|
|
119
|
+
client: AuthenticatedClient,
|
|
120
|
+
) -> Response[Dataset | Error]:
|
|
121
|
+
"""Read a dataset and its profile.
|
|
122
|
+
|
|
123
|
+
Args:
|
|
124
|
+
dataset_id (str):
|
|
125
|
+
|
|
126
|
+
Raises:
|
|
127
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
128
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
129
|
+
|
|
130
|
+
Returns:
|
|
131
|
+
Response[Dataset | Error]
|
|
132
|
+
"""
|
|
133
|
+
|
|
134
|
+
kwargs = _get_kwargs(
|
|
135
|
+
dataset_id=dataset_id,
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
139
|
+
|
|
140
|
+
return _build_response(client=client, response=response)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
async def asyncio(
|
|
144
|
+
dataset_id: str,
|
|
145
|
+
*,
|
|
146
|
+
client: AuthenticatedClient,
|
|
147
|
+
) -> Dataset | Error | None:
|
|
148
|
+
"""Read a dataset and its profile.
|
|
149
|
+
|
|
150
|
+
Args:
|
|
151
|
+
dataset_id (str):
|
|
152
|
+
|
|
153
|
+
Raises:
|
|
154
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
155
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
156
|
+
|
|
157
|
+
Returns:
|
|
158
|
+
Dataset | Error
|
|
159
|
+
"""
|
|
160
|
+
|
|
161
|
+
return (
|
|
162
|
+
await asyncio_detailed(
|
|
163
|
+
dataset_id=dataset_id,
|
|
164
|
+
client=client,
|
|
165
|
+
)
|
|
166
|
+
).parsed
|