studyfetch-sdk 0.1.0a18__py3-none-any.whl → 0.1.0a19__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.
- studyfetch_sdk/_models.py +1 -1
- studyfetch_sdk/_version.py +1 -1
- studyfetch_sdk/resources/v1/__init__.py +14 -0
- studyfetch_sdk/resources/v1/assignment_grader.py +81 -1
- studyfetch_sdk/resources/v1/components.py +36 -4
- studyfetch_sdk/resources/v1/data_analyst/__init__.py +47 -0
- studyfetch_sdk/resources/v1/data_analyst/data_analyst.py +582 -0
- studyfetch_sdk/resources/v1/data_analyst/sessions.py +222 -0
- studyfetch_sdk/resources/v1/data_analyst/test.py +190 -0
- studyfetch_sdk/resources/v1/materials/materials.py +130 -2
- studyfetch_sdk/resources/v1/materials/upload.py +262 -0
- studyfetch_sdk/resources/v1/usage/analyst.py +143 -15
- studyfetch_sdk/resources/v1/v1.py +98 -0
- studyfetch_sdk/types/v1/__init__.py +5 -0
- studyfetch_sdk/types/v1/assignment_grader_response.py +20 -1
- studyfetch_sdk/types/v1/component.py +9 -1
- studyfetch_sdk/types/v1/component_create_params.py +57 -1
- studyfetch_sdk/types/v1/component_list_params.py +9 -1
- studyfetch_sdk/types/v1/content_param.py +23 -0
- studyfetch_sdk/types/v1/data_analyst/__init__.py +5 -0
- studyfetch_sdk/types/v1/data_analyst/session_retrieve_params.py +11 -0
- studyfetch_sdk/types/v1/data_analyst_retrieve_session_params.py +13 -0
- studyfetch_sdk/types/v1/data_analyst_send_message_params.py +54 -0
- studyfetch_sdk/types/v1/data_analyst_stream_params.py +28 -0
- studyfetch_sdk/types/v1/material_create_and_process_params.py +27 -0
- studyfetch_sdk/types/v1/material_create_params.py +4 -17
- studyfetch_sdk/types/v1/materials/__init__.py +2 -0
- studyfetch_sdk/types/v1/materials/upload_upload_file_and_process_params.py +26 -0
- studyfetch_sdk/types/v1/materials/upload_upload_url_and_process_params.py +26 -0
- studyfetch_sdk/types/v1/usage/__init__.py +3 -0
- studyfetch_sdk/types/v1/usage/analyst_get_test_questions_params.py +18 -0
- studyfetch_sdk/types/v1/usage/analyst_list_chat_messages_params.py +18 -0
- studyfetch_sdk/types/v1/usage/analyst_list_chat_messages_response.py +35 -0
- studyfetch_sdk/types/v1/usage/analyst_list_events_params.py +7 -0
- {studyfetch_sdk-0.1.0a18.dist-info → studyfetch_sdk-0.1.0a19.dist-info}/METADATA +1 -1
- {studyfetch_sdk-0.1.0a18.dist-info → studyfetch_sdk-0.1.0a19.dist-info}/RECORD +38 -22
- {studyfetch_sdk-0.1.0a18.dist-info → studyfetch_sdk-0.1.0a19.dist-info}/WHEEL +0 -0
- {studyfetch_sdk-0.1.0a18.dist-info → studyfetch_sdk-0.1.0a19.dist-info}/licenses/LICENSE +0 -0
studyfetch_sdk/_models.py
CHANGED
@@ -439,7 +439,7 @@ def construct_type(*, value: object, type_: object, metadata: Optional[List[Any]
|
|
439
439
|
type_ = type_.__value__ # type: ignore[unreachable]
|
440
440
|
|
441
441
|
# unwrap `Annotated[T, ...]` -> `T`
|
442
|
-
if metadata is not None:
|
442
|
+
if metadata is not None and len(metadata) > 0:
|
443
443
|
meta: tuple[Any, ...] = tuple(metadata)
|
444
444
|
elif is_annotated_type(type_):
|
445
445
|
meta = get_args(type_)[1:]
|
studyfetch_sdk/_version.py
CHANGED
@@ -104,6 +104,14 @@ from .audio_recaps import (
|
|
104
104
|
AudioRecapsResourceWithStreamingResponse,
|
105
105
|
AsyncAudioRecapsResourceWithStreamingResponse,
|
106
106
|
)
|
107
|
+
from .data_analyst import (
|
108
|
+
DataAnalystResource,
|
109
|
+
AsyncDataAnalystResource,
|
110
|
+
DataAnalystResourceWithRawResponse,
|
111
|
+
AsyncDataAnalystResourceWithRawResponse,
|
112
|
+
DataAnalystResourceWithStreamingResponse,
|
113
|
+
AsyncDataAnalystResourceWithStreamingResponse,
|
114
|
+
)
|
107
115
|
from .assignment_grader import (
|
108
116
|
AssignmentGraderResource,
|
109
117
|
AsyncAssignmentGraderResource,
|
@@ -192,6 +200,12 @@ __all__ = [
|
|
192
200
|
"AsyncAssignmentGraderResourceWithRawResponse",
|
193
201
|
"AssignmentGraderResourceWithStreamingResponse",
|
194
202
|
"AsyncAssignmentGraderResourceWithStreamingResponse",
|
203
|
+
"DataAnalystResource",
|
204
|
+
"AsyncDataAnalystResource",
|
205
|
+
"DataAnalystResourceWithRawResponse",
|
206
|
+
"AsyncDataAnalystResourceWithRawResponse",
|
207
|
+
"DataAnalystResourceWithStreamingResponse",
|
208
|
+
"AsyncDataAnalystResourceWithStreamingResponse",
|
195
209
|
"V1Resource",
|
196
210
|
"AsyncV1Resource",
|
197
211
|
"V1ResourceWithRawResponse",
|
@@ -4,7 +4,7 @@ from __future__ import annotations
|
|
4
4
|
|
5
5
|
import httpx
|
6
6
|
|
7
|
-
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
7
|
+
from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
8
8
|
from ..._utils import maybe_transform, async_maybe_transform
|
9
9
|
from ..._compat import cached_property
|
10
10
|
from ...types.v1 import assignment_grader_create_params
|
@@ -101,6 +101,40 @@ class AssignmentGraderResource(SyncAPIResource):
|
|
101
101
|
cast_to=AssignmentGraderResponse,
|
102
102
|
)
|
103
103
|
|
104
|
+
def delete(
|
105
|
+
self,
|
106
|
+
id: str,
|
107
|
+
*,
|
108
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
109
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
110
|
+
extra_headers: Headers | None = None,
|
111
|
+
extra_query: Query | None = None,
|
112
|
+
extra_body: Body | None = None,
|
113
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
114
|
+
) -> None:
|
115
|
+
"""
|
116
|
+
Delete an assignment grader by ID
|
117
|
+
|
118
|
+
Args:
|
119
|
+
extra_headers: Send extra headers
|
120
|
+
|
121
|
+
extra_query: Add additional query parameters to the request
|
122
|
+
|
123
|
+
extra_body: Add additional JSON properties to the request
|
124
|
+
|
125
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
126
|
+
"""
|
127
|
+
if not id:
|
128
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
129
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
130
|
+
return self._delete(
|
131
|
+
f"/api/v1/assignment-grader/delete/{id}",
|
132
|
+
options=make_request_options(
|
133
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
134
|
+
),
|
135
|
+
cast_to=NoneType,
|
136
|
+
)
|
137
|
+
|
104
138
|
def get_all(
|
105
139
|
self,
|
106
140
|
*,
|
@@ -233,6 +267,40 @@ class AsyncAssignmentGraderResource(AsyncAPIResource):
|
|
233
267
|
cast_to=AssignmentGraderResponse,
|
234
268
|
)
|
235
269
|
|
270
|
+
async def delete(
|
271
|
+
self,
|
272
|
+
id: str,
|
273
|
+
*,
|
274
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
275
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
276
|
+
extra_headers: Headers | None = None,
|
277
|
+
extra_query: Query | None = None,
|
278
|
+
extra_body: Body | None = None,
|
279
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
280
|
+
) -> None:
|
281
|
+
"""
|
282
|
+
Delete an assignment grader by ID
|
283
|
+
|
284
|
+
Args:
|
285
|
+
extra_headers: Send extra headers
|
286
|
+
|
287
|
+
extra_query: Add additional query parameters to the request
|
288
|
+
|
289
|
+
extra_body: Add additional JSON properties to the request
|
290
|
+
|
291
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
292
|
+
"""
|
293
|
+
if not id:
|
294
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
295
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
296
|
+
return await self._delete(
|
297
|
+
f"/api/v1/assignment-grader/delete/{id}",
|
298
|
+
options=make_request_options(
|
299
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
300
|
+
),
|
301
|
+
cast_to=NoneType,
|
302
|
+
)
|
303
|
+
|
236
304
|
async def get_all(
|
237
305
|
self,
|
238
306
|
*,
|
@@ -293,6 +361,9 @@ class AssignmentGraderResourceWithRawResponse:
|
|
293
361
|
self.create = to_raw_response_wrapper(
|
294
362
|
assignment_grader.create,
|
295
363
|
)
|
364
|
+
self.delete = to_raw_response_wrapper(
|
365
|
+
assignment_grader.delete,
|
366
|
+
)
|
296
367
|
self.get_all = to_raw_response_wrapper(
|
297
368
|
assignment_grader.get_all,
|
298
369
|
)
|
@@ -308,6 +379,9 @@ class AsyncAssignmentGraderResourceWithRawResponse:
|
|
308
379
|
self.create = async_to_raw_response_wrapper(
|
309
380
|
assignment_grader.create,
|
310
381
|
)
|
382
|
+
self.delete = async_to_raw_response_wrapper(
|
383
|
+
assignment_grader.delete,
|
384
|
+
)
|
311
385
|
self.get_all = async_to_raw_response_wrapper(
|
312
386
|
assignment_grader.get_all,
|
313
387
|
)
|
@@ -323,6 +397,9 @@ class AssignmentGraderResourceWithStreamingResponse:
|
|
323
397
|
self.create = to_streamed_response_wrapper(
|
324
398
|
assignment_grader.create,
|
325
399
|
)
|
400
|
+
self.delete = to_streamed_response_wrapper(
|
401
|
+
assignment_grader.delete,
|
402
|
+
)
|
326
403
|
self.get_all = to_streamed_response_wrapper(
|
327
404
|
assignment_grader.get_all,
|
328
405
|
)
|
@@ -338,6 +415,9 @@ class AsyncAssignmentGraderResourceWithStreamingResponse:
|
|
338
415
|
self.create = async_to_streamed_response_wrapper(
|
339
416
|
assignment_grader.create,
|
340
417
|
)
|
418
|
+
self.delete = async_to_streamed_response_wrapper(
|
419
|
+
assignment_grader.delete,
|
420
|
+
)
|
341
421
|
self.get_all = async_to_streamed_response_wrapper(
|
342
422
|
assignment_grader.get_all,
|
343
423
|
)
|
@@ -57,7 +57,15 @@ class ComponentsResource(SyncAPIResource):
|
|
57
57
|
config: component_create_params.Config,
|
58
58
|
name: str,
|
59
59
|
type: Literal[
|
60
|
-
"chat",
|
60
|
+
"chat",
|
61
|
+
"data_analyst",
|
62
|
+
"flashcards",
|
63
|
+
"scenarios",
|
64
|
+
"practice_test",
|
65
|
+
"audio_recap",
|
66
|
+
"tutor_me",
|
67
|
+
"explainers",
|
68
|
+
"uploads",
|
61
69
|
],
|
62
70
|
description: str | NotGiven = NOT_GIVEN,
|
63
71
|
metadata: object | NotGiven = NOT_GIVEN,
|
@@ -182,7 +190,15 @@ class ComponentsResource(SyncAPIResource):
|
|
182
190
|
self,
|
183
191
|
*,
|
184
192
|
type: Literal[
|
185
|
-
"chat",
|
193
|
+
"chat",
|
194
|
+
"data_analyst",
|
195
|
+
"flashcards",
|
196
|
+
"scenarios",
|
197
|
+
"practice_test",
|
198
|
+
"audio_recap",
|
199
|
+
"tutor_me",
|
200
|
+
"explainers",
|
201
|
+
"uploads",
|
186
202
|
]
|
187
203
|
| NotGiven = NOT_GIVEN,
|
188
204
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
@@ -445,7 +461,15 @@ class AsyncComponentsResource(AsyncAPIResource):
|
|
445
461
|
config: component_create_params.Config,
|
446
462
|
name: str,
|
447
463
|
type: Literal[
|
448
|
-
"chat",
|
464
|
+
"chat",
|
465
|
+
"data_analyst",
|
466
|
+
"flashcards",
|
467
|
+
"scenarios",
|
468
|
+
"practice_test",
|
469
|
+
"audio_recap",
|
470
|
+
"tutor_me",
|
471
|
+
"explainers",
|
472
|
+
"uploads",
|
449
473
|
],
|
450
474
|
description: str | NotGiven = NOT_GIVEN,
|
451
475
|
metadata: object | NotGiven = NOT_GIVEN,
|
@@ -570,7 +594,15 @@ class AsyncComponentsResource(AsyncAPIResource):
|
|
570
594
|
self,
|
571
595
|
*,
|
572
596
|
type: Literal[
|
573
|
-
"chat",
|
597
|
+
"chat",
|
598
|
+
"data_analyst",
|
599
|
+
"flashcards",
|
600
|
+
"scenarios",
|
601
|
+
"practice_test",
|
602
|
+
"audio_recap",
|
603
|
+
"tutor_me",
|
604
|
+
"explainers",
|
605
|
+
"uploads",
|
574
606
|
]
|
575
607
|
| NotGiven = NOT_GIVEN,
|
576
608
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from .test import (
|
4
|
+
TestResource,
|
5
|
+
AsyncTestResource,
|
6
|
+
TestResourceWithRawResponse,
|
7
|
+
AsyncTestResourceWithRawResponse,
|
8
|
+
TestResourceWithStreamingResponse,
|
9
|
+
AsyncTestResourceWithStreamingResponse,
|
10
|
+
)
|
11
|
+
from .sessions import (
|
12
|
+
SessionsResource,
|
13
|
+
AsyncSessionsResource,
|
14
|
+
SessionsResourceWithRawResponse,
|
15
|
+
AsyncSessionsResourceWithRawResponse,
|
16
|
+
SessionsResourceWithStreamingResponse,
|
17
|
+
AsyncSessionsResourceWithStreamingResponse,
|
18
|
+
)
|
19
|
+
from .data_analyst import (
|
20
|
+
DataAnalystResource,
|
21
|
+
AsyncDataAnalystResource,
|
22
|
+
DataAnalystResourceWithRawResponse,
|
23
|
+
AsyncDataAnalystResourceWithRawResponse,
|
24
|
+
DataAnalystResourceWithStreamingResponse,
|
25
|
+
AsyncDataAnalystResourceWithStreamingResponse,
|
26
|
+
)
|
27
|
+
|
28
|
+
__all__ = [
|
29
|
+
"SessionsResource",
|
30
|
+
"AsyncSessionsResource",
|
31
|
+
"SessionsResourceWithRawResponse",
|
32
|
+
"AsyncSessionsResourceWithRawResponse",
|
33
|
+
"SessionsResourceWithStreamingResponse",
|
34
|
+
"AsyncSessionsResourceWithStreamingResponse",
|
35
|
+
"TestResource",
|
36
|
+
"AsyncTestResource",
|
37
|
+
"TestResourceWithRawResponse",
|
38
|
+
"AsyncTestResourceWithRawResponse",
|
39
|
+
"TestResourceWithStreamingResponse",
|
40
|
+
"AsyncTestResourceWithStreamingResponse",
|
41
|
+
"DataAnalystResource",
|
42
|
+
"AsyncDataAnalystResource",
|
43
|
+
"DataAnalystResourceWithRawResponse",
|
44
|
+
"AsyncDataAnalystResourceWithRawResponse",
|
45
|
+
"DataAnalystResourceWithStreamingResponse",
|
46
|
+
"AsyncDataAnalystResourceWithStreamingResponse",
|
47
|
+
]
|