studyfetch-sdk 0.1.0a11__py3-none-any.whl → 0.1.0a12__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.
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "studyfetch_sdk"
4
- __version__ = "0.1.0-alpha.11" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.12" # x-release-please-version
@@ -104,6 +104,14 @@ from .audio_recaps import (
104
104
  AudioRecapsResourceWithStreamingResponse,
105
105
  AsyncAudioRecapsResourceWithStreamingResponse,
106
106
  )
107
+ from .assignment_grader import (
108
+ AssignmentGraderResource,
109
+ AsyncAssignmentGraderResource,
110
+ AssignmentGraderResourceWithRawResponse,
111
+ AsyncAssignmentGraderResourceWithRawResponse,
112
+ AssignmentGraderResourceWithStreamingResponse,
113
+ AsyncAssignmentGraderResourceWithStreamingResponse,
114
+ )
107
115
 
108
116
  __all__ = [
109
117
  "MaterialsResource",
@@ -178,6 +186,12 @@ __all__ = [
178
186
  "AsyncUploadResourceWithRawResponse",
179
187
  "UploadResourceWithStreamingResponse",
180
188
  "AsyncUploadResourceWithStreamingResponse",
189
+ "AssignmentGraderResource",
190
+ "AsyncAssignmentGraderResource",
191
+ "AssignmentGraderResourceWithRawResponse",
192
+ "AsyncAssignmentGraderResourceWithRawResponse",
193
+ "AssignmentGraderResourceWithStreamingResponse",
194
+ "AsyncAssignmentGraderResourceWithStreamingResponse",
181
195
  "V1Resource",
182
196
  "AsyncV1Resource",
183
197
  "V1ResourceWithRawResponse",
@@ -0,0 +1,347 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ import httpx
6
+
7
+ from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
8
+ from ..._utils import maybe_transform, async_maybe_transform
9
+ from ..._compat import cached_property
10
+ from ...types.v1 import assignment_grader_create_params
11
+ from ..._resource import SyncAPIResource, AsyncAPIResource
12
+ from ..._response import (
13
+ to_raw_response_wrapper,
14
+ to_streamed_response_wrapper,
15
+ async_to_raw_response_wrapper,
16
+ async_to_streamed_response_wrapper,
17
+ )
18
+ from ..._base_client import make_request_options
19
+ from ...types.v1.assignment_grader_create_response import AssignmentGraderCreateResponse
20
+ from ...types.v1.assignment_grader_get_all_response import AssignmentGraderGetAllResponse
21
+ from ...types.v1.assignment_grader_get_by_id_response import AssignmentGraderGetByIDResponse
22
+
23
+ __all__ = ["AssignmentGraderResource", "AsyncAssignmentGraderResource"]
24
+
25
+
26
+ class AssignmentGraderResource(SyncAPIResource):
27
+ @cached_property
28
+ def with_raw_response(self) -> AssignmentGraderResourceWithRawResponse:
29
+ """
30
+ This property can be used as a prefix for any HTTP method call to return
31
+ the raw response object instead of the parsed content.
32
+
33
+ For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
34
+ """
35
+ return AssignmentGraderResourceWithRawResponse(self)
36
+
37
+ @cached_property
38
+ def with_streaming_response(self) -> AssignmentGraderResourceWithStreamingResponse:
39
+ """
40
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
41
+
42
+ For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
43
+ """
44
+ return AssignmentGraderResourceWithStreamingResponse(self)
45
+
46
+ def create(
47
+ self,
48
+ *,
49
+ rubric: assignment_grader_create_params.Rubric,
50
+ title: str,
51
+ material_id: str | NotGiven = NOT_GIVEN,
52
+ model: str | NotGiven = NOT_GIVEN,
53
+ text_to_grade: str | NotGiven = NOT_GIVEN,
54
+ user_id: str | NotGiven = NOT_GIVEN,
55
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
56
+ # The extra values given here take precedence over values defined on the client or passed to this method.
57
+ extra_headers: Headers | None = None,
58
+ extra_query: Query | None = None,
59
+ extra_body: Body | None = None,
60
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
61
+ ) -> AssignmentGraderCreateResponse:
62
+ """
63
+ Grade a new assignment
64
+
65
+ Args:
66
+ rubric: Grading rubric
67
+
68
+ title: Title of the assignment
69
+
70
+ material_id: Material ID to grade
71
+
72
+ model: AI model to use
73
+
74
+ text_to_grade: Text content to grade
75
+
76
+ user_id: User ID for tracking
77
+
78
+ extra_headers: Send extra headers
79
+
80
+ extra_query: Add additional query parameters to the request
81
+
82
+ extra_body: Add additional JSON properties to the request
83
+
84
+ timeout: Override the client-level default timeout for this request, in seconds
85
+ """
86
+ return self._post(
87
+ "/api/v1/assignment-grader/create",
88
+ body=maybe_transform(
89
+ {
90
+ "rubric": rubric,
91
+ "title": title,
92
+ "material_id": material_id,
93
+ "model": model,
94
+ "text_to_grade": text_to_grade,
95
+ "user_id": user_id,
96
+ },
97
+ assignment_grader_create_params.AssignmentGraderCreateParams,
98
+ ),
99
+ options=make_request_options(
100
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
101
+ ),
102
+ cast_to=AssignmentGraderCreateResponse,
103
+ )
104
+
105
+ def get_all(
106
+ self,
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
+ ) -> AssignmentGraderGetAllResponse:
115
+ """Get all assignment graders"""
116
+ return self._get(
117
+ "/api/v1/assignment-grader/get",
118
+ options=make_request_options(
119
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
120
+ ),
121
+ cast_to=AssignmentGraderGetAllResponse,
122
+ )
123
+
124
+ def get_by_id(
125
+ self,
126
+ id: str,
127
+ *,
128
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
129
+ # The extra values given here take precedence over values defined on the client or passed to this method.
130
+ extra_headers: Headers | None = None,
131
+ extra_query: Query | None = None,
132
+ extra_body: Body | None = None,
133
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
134
+ ) -> AssignmentGraderGetByIDResponse:
135
+ """
136
+ Get an assignment grader by ID
137
+
138
+ Args:
139
+ extra_headers: Send extra headers
140
+
141
+ extra_query: Add additional query parameters to the request
142
+
143
+ extra_body: Add additional JSON properties to the request
144
+
145
+ timeout: Override the client-level default timeout for this request, in seconds
146
+ """
147
+ if not id:
148
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
149
+ return self._get(
150
+ f"/api/v1/assignment-grader/get/{id}",
151
+ options=make_request_options(
152
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
153
+ ),
154
+ cast_to=AssignmentGraderGetByIDResponse,
155
+ )
156
+
157
+
158
+ class AsyncAssignmentGraderResource(AsyncAPIResource):
159
+ @cached_property
160
+ def with_raw_response(self) -> AsyncAssignmentGraderResourceWithRawResponse:
161
+ """
162
+ This property can be used as a prefix for any HTTP method call to return
163
+ the raw response object instead of the parsed content.
164
+
165
+ For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
166
+ """
167
+ return AsyncAssignmentGraderResourceWithRawResponse(self)
168
+
169
+ @cached_property
170
+ def with_streaming_response(self) -> AsyncAssignmentGraderResourceWithStreamingResponse:
171
+ """
172
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
173
+
174
+ For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
175
+ """
176
+ return AsyncAssignmentGraderResourceWithStreamingResponse(self)
177
+
178
+ async def create(
179
+ self,
180
+ *,
181
+ rubric: assignment_grader_create_params.Rubric,
182
+ title: str,
183
+ material_id: str | NotGiven = NOT_GIVEN,
184
+ model: str | NotGiven = NOT_GIVEN,
185
+ text_to_grade: str | NotGiven = NOT_GIVEN,
186
+ user_id: str | NotGiven = NOT_GIVEN,
187
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
188
+ # The extra values given here take precedence over values defined on the client or passed to this method.
189
+ extra_headers: Headers | None = None,
190
+ extra_query: Query | None = None,
191
+ extra_body: Body | None = None,
192
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
193
+ ) -> AssignmentGraderCreateResponse:
194
+ """
195
+ Grade a new assignment
196
+
197
+ Args:
198
+ rubric: Grading rubric
199
+
200
+ title: Title of the assignment
201
+
202
+ material_id: Material ID to grade
203
+
204
+ model: AI model to use
205
+
206
+ text_to_grade: Text content to grade
207
+
208
+ user_id: User ID for tracking
209
+
210
+ extra_headers: Send extra headers
211
+
212
+ extra_query: Add additional query parameters to the request
213
+
214
+ extra_body: Add additional JSON properties to the request
215
+
216
+ timeout: Override the client-level default timeout for this request, in seconds
217
+ """
218
+ return await self._post(
219
+ "/api/v1/assignment-grader/create",
220
+ body=await async_maybe_transform(
221
+ {
222
+ "rubric": rubric,
223
+ "title": title,
224
+ "material_id": material_id,
225
+ "model": model,
226
+ "text_to_grade": text_to_grade,
227
+ "user_id": user_id,
228
+ },
229
+ assignment_grader_create_params.AssignmentGraderCreateParams,
230
+ ),
231
+ options=make_request_options(
232
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
233
+ ),
234
+ cast_to=AssignmentGraderCreateResponse,
235
+ )
236
+
237
+ async def get_all(
238
+ self,
239
+ *,
240
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
241
+ # The extra values given here take precedence over values defined on the client or passed to this method.
242
+ extra_headers: Headers | None = None,
243
+ extra_query: Query | None = None,
244
+ extra_body: Body | None = None,
245
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
246
+ ) -> AssignmentGraderGetAllResponse:
247
+ """Get all assignment graders"""
248
+ return await self._get(
249
+ "/api/v1/assignment-grader/get",
250
+ options=make_request_options(
251
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
252
+ ),
253
+ cast_to=AssignmentGraderGetAllResponse,
254
+ )
255
+
256
+ async def get_by_id(
257
+ self,
258
+ id: str,
259
+ *,
260
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
261
+ # The extra values given here take precedence over values defined on the client or passed to this method.
262
+ extra_headers: Headers | None = None,
263
+ extra_query: Query | None = None,
264
+ extra_body: Body | None = None,
265
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
266
+ ) -> AssignmentGraderGetByIDResponse:
267
+ """
268
+ Get an assignment grader by ID
269
+
270
+ Args:
271
+ extra_headers: Send extra headers
272
+
273
+ extra_query: Add additional query parameters to the request
274
+
275
+ extra_body: Add additional JSON properties to the request
276
+
277
+ timeout: Override the client-level default timeout for this request, in seconds
278
+ """
279
+ if not id:
280
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
281
+ return await self._get(
282
+ f"/api/v1/assignment-grader/get/{id}",
283
+ options=make_request_options(
284
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
285
+ ),
286
+ cast_to=AssignmentGraderGetByIDResponse,
287
+ )
288
+
289
+
290
+ class AssignmentGraderResourceWithRawResponse:
291
+ def __init__(self, assignment_grader: AssignmentGraderResource) -> None:
292
+ self._assignment_grader = assignment_grader
293
+
294
+ self.create = to_raw_response_wrapper(
295
+ assignment_grader.create,
296
+ )
297
+ self.get_all = to_raw_response_wrapper(
298
+ assignment_grader.get_all,
299
+ )
300
+ self.get_by_id = to_raw_response_wrapper(
301
+ assignment_grader.get_by_id,
302
+ )
303
+
304
+
305
+ class AsyncAssignmentGraderResourceWithRawResponse:
306
+ def __init__(self, assignment_grader: AsyncAssignmentGraderResource) -> None:
307
+ self._assignment_grader = assignment_grader
308
+
309
+ self.create = async_to_raw_response_wrapper(
310
+ assignment_grader.create,
311
+ )
312
+ self.get_all = async_to_raw_response_wrapper(
313
+ assignment_grader.get_all,
314
+ )
315
+ self.get_by_id = async_to_raw_response_wrapper(
316
+ assignment_grader.get_by_id,
317
+ )
318
+
319
+
320
+ class AssignmentGraderResourceWithStreamingResponse:
321
+ def __init__(self, assignment_grader: AssignmentGraderResource) -> None:
322
+ self._assignment_grader = assignment_grader
323
+
324
+ self.create = to_streamed_response_wrapper(
325
+ assignment_grader.create,
326
+ )
327
+ self.get_all = to_streamed_response_wrapper(
328
+ assignment_grader.get_all,
329
+ )
330
+ self.get_by_id = to_streamed_response_wrapper(
331
+ assignment_grader.get_by_id,
332
+ )
333
+
334
+
335
+ class AsyncAssignmentGraderResourceWithStreamingResponse:
336
+ def __init__(self, assignment_grader: AsyncAssignmentGraderResource) -> None:
337
+ self._assignment_grader = assignment_grader
338
+
339
+ self.create = async_to_streamed_response_wrapper(
340
+ assignment_grader.create,
341
+ )
342
+ self.get_all = async_to_streamed_response_wrapper(
343
+ assignment_grader.get_all,
344
+ )
345
+ self.get_by_id = async_to_streamed_response_wrapper(
346
+ assignment_grader.get_by_id,
347
+ )
@@ -76,6 +76,14 @@ from .upload.upload import (
76
76
  UploadResourceWithStreamingResponse,
77
77
  AsyncUploadResourceWithStreamingResponse,
78
78
  )
79
+ from .assignment_grader import (
80
+ AssignmentGraderResource,
81
+ AsyncAssignmentGraderResource,
82
+ AssignmentGraderResourceWithRawResponse,
83
+ AsyncAssignmentGraderResourceWithRawResponse,
84
+ AssignmentGraderResourceWithStreamingResponse,
85
+ AsyncAssignmentGraderResourceWithStreamingResponse,
86
+ )
79
87
  from .materials.materials import (
80
88
  MaterialsResource,
81
89
  AsyncMaterialsResource,
@@ -153,6 +161,10 @@ class V1Resource(SyncAPIResource):
153
161
  def upload(self) -> UploadResource:
154
162
  return UploadResource(self._client)
155
163
 
164
+ @cached_property
165
+ def assignment_grader(self) -> AssignmentGraderResource:
166
+ return AssignmentGraderResource(self._client)
167
+
156
168
  @cached_property
157
169
  def with_raw_response(self) -> V1ResourceWithRawResponse:
158
170
  """
@@ -222,6 +234,10 @@ class AsyncV1Resource(AsyncAPIResource):
222
234
  def upload(self) -> AsyncUploadResource:
223
235
  return AsyncUploadResource(self._client)
224
236
 
237
+ @cached_property
238
+ def assignment_grader(self) -> AsyncAssignmentGraderResource:
239
+ return AsyncAssignmentGraderResource(self._client)
240
+
225
241
  @cached_property
226
242
  def with_raw_response(self) -> AsyncV1ResourceWithRawResponse:
227
243
  """
@@ -294,6 +310,10 @@ class V1ResourceWithRawResponse:
294
310
  def upload(self) -> UploadResourceWithRawResponse:
295
311
  return UploadResourceWithRawResponse(self._v1.upload)
296
312
 
313
+ @cached_property
314
+ def assignment_grader(self) -> AssignmentGraderResourceWithRawResponse:
315
+ return AssignmentGraderResourceWithRawResponse(self._v1.assignment_grader)
316
+
297
317
 
298
318
  class AsyncV1ResourceWithRawResponse:
299
319
  def __init__(self, v1: AsyncV1Resource) -> None:
@@ -347,6 +367,10 @@ class AsyncV1ResourceWithRawResponse:
347
367
  def upload(self) -> AsyncUploadResourceWithRawResponse:
348
368
  return AsyncUploadResourceWithRawResponse(self._v1.upload)
349
369
 
370
+ @cached_property
371
+ def assignment_grader(self) -> AsyncAssignmentGraderResourceWithRawResponse:
372
+ return AsyncAssignmentGraderResourceWithRawResponse(self._v1.assignment_grader)
373
+
350
374
 
351
375
  class V1ResourceWithStreamingResponse:
352
376
  def __init__(self, v1: V1Resource) -> None:
@@ -400,6 +424,10 @@ class V1ResourceWithStreamingResponse:
400
424
  def upload(self) -> UploadResourceWithStreamingResponse:
401
425
  return UploadResourceWithStreamingResponse(self._v1.upload)
402
426
 
427
+ @cached_property
428
+ def assignment_grader(self) -> AssignmentGraderResourceWithStreamingResponse:
429
+ return AssignmentGraderResourceWithStreamingResponse(self._v1.assignment_grader)
430
+
403
431
 
404
432
  class AsyncV1ResourceWithStreamingResponse:
405
433
  def __init__(self, v1: AsyncV1Resource) -> None:
@@ -452,3 +480,7 @@ class AsyncV1ResourceWithStreamingResponse:
452
480
  @cached_property
453
481
  def upload(self) -> AsyncUploadResourceWithStreamingResponse:
454
482
  return AsyncUploadResourceWithStreamingResponse(self._v1.upload)
483
+
484
+ @cached_property
485
+ def assignment_grader(self) -> AsyncAssignmentGraderResourceWithStreamingResponse:
486
+ return AsyncAssignmentGraderResourceWithStreamingResponse(self._v1.assignment_grader)
@@ -36,9 +36,13 @@ from .flashcard_get_stats_params import FlashcardGetStatsParams as FlashcardGetS
36
36
  from .flashcard_get_types_response import FlashcardGetTypesResponse as FlashcardGetTypesResponse
37
37
  from .scenario_submit_answer_params import ScenarioSubmitAnswerParams as ScenarioSubmitAnswerParams
38
38
  from .flashcard_batch_process_params import FlashcardBatchProcessParams as FlashcardBatchProcessParams
39
+ from .assignment_grader_create_params import AssignmentGraderCreateParams as AssignmentGraderCreateParams
39
40
  from .component_generate_embed_params import ComponentGenerateEmbedParams as ComponentGenerateEmbedParams
40
41
  from .explainer_handle_webhook_params import ExplainerHandleWebhookParams as ExplainerHandleWebhookParams
41
42
  from .flashcard_batch_process_response import FlashcardBatchProcessResponse as FlashcardBatchProcessResponse
42
43
  from .flashcard_get_algorithm_response import FlashcardGetAlgorithmResponse as FlashcardGetAlgorithmResponse
43
44
  from .material_get_download_url_params import MaterialGetDownloadURLParams as MaterialGetDownloadURLParams
45
+ from .assignment_grader_create_response import AssignmentGraderCreateResponse as AssignmentGraderCreateResponse
44
46
  from .component_generate_embed_response import ComponentGenerateEmbedResponse as ComponentGenerateEmbedResponse
47
+ from .assignment_grader_get_all_response import AssignmentGraderGetAllResponse as AssignmentGraderGetAllResponse
48
+ from .assignment_grader_get_by_id_response import AssignmentGraderGetByIDResponse as AssignmentGraderGetByIDResponse
@@ -0,0 +1,46 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Iterable
6
+ from typing_extensions import Required, Annotated, TypedDict
7
+
8
+ from ..._utils import PropertyInfo
9
+
10
+ __all__ = ["AssignmentGraderCreateParams", "Rubric", "RubricCriterion"]
11
+
12
+
13
+ class AssignmentGraderCreateParams(TypedDict, total=False):
14
+ rubric: Required[Rubric]
15
+ """Grading rubric"""
16
+
17
+ title: Required[str]
18
+ """Title of the assignment"""
19
+
20
+ material_id: Annotated[str, PropertyInfo(alias="materialId")]
21
+ """Material ID to grade"""
22
+
23
+ model: str
24
+ """AI model to use"""
25
+
26
+ text_to_grade: Annotated[str, PropertyInfo(alias="textToGrade")]
27
+ """Text content to grade"""
28
+
29
+ user_id: Annotated[str, PropertyInfo(alias="userId")]
30
+ """User ID for tracking"""
31
+
32
+
33
+ class RubricCriterion(TypedDict, total=False):
34
+ points_possible: Required[Annotated[float, PropertyInfo(alias="pointsPossible")]]
35
+ """Points possible for this criterion"""
36
+
37
+ title: Required[str]
38
+ """Title of the criterion"""
39
+
40
+ description: str
41
+ """Description of the criterion"""
42
+
43
+
44
+ class Rubric(TypedDict, total=False):
45
+ criteria: Required[Iterable[RubricCriterion]]
46
+ """Grading criteria"""
@@ -0,0 +1,26 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from datetime import datetime
4
+
5
+ from pydantic import Field as FieldInfo
6
+
7
+ from ..._models import BaseModel
8
+
9
+ __all__ = ["AssignmentGraderCreateResponse"]
10
+
11
+
12
+ class AssignmentGraderCreateResponse(BaseModel):
13
+ id: str
14
+ """Assignment grader ID"""
15
+
16
+ created_at: datetime = FieldInfo(alias="createdAt")
17
+ """Creation timestamp"""
18
+
19
+ grade: float
20
+ """Overall grade percentage"""
21
+
22
+ rubric: object
23
+ """Grading results"""
24
+
25
+ title: str
26
+ """Assignment title"""
@@ -0,0 +1,31 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List
4
+ from datetime import datetime
5
+ from typing_extensions import TypeAlias
6
+
7
+ from pydantic import Field as FieldInfo
8
+
9
+ from ..._models import BaseModel
10
+
11
+ __all__ = ["AssignmentGraderGetAllResponse", "AssignmentGraderGetAllResponseItem"]
12
+
13
+
14
+ class AssignmentGraderGetAllResponseItem(BaseModel):
15
+ id: str
16
+ """Assignment grader ID"""
17
+
18
+ created_at: datetime = FieldInfo(alias="createdAt")
19
+ """Creation timestamp"""
20
+
21
+ grade: float
22
+ """Overall grade percentage"""
23
+
24
+ rubric: object
25
+ """Grading results"""
26
+
27
+ title: str
28
+ """Assignment title"""
29
+
30
+
31
+ AssignmentGraderGetAllResponse: TypeAlias = List[AssignmentGraderGetAllResponseItem]
@@ -0,0 +1,26 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from datetime import datetime
4
+
5
+ from pydantic import Field as FieldInfo
6
+
7
+ from ..._models import BaseModel
8
+
9
+ __all__ = ["AssignmentGraderGetByIDResponse"]
10
+
11
+
12
+ class AssignmentGraderGetByIDResponse(BaseModel):
13
+ id: str
14
+ """Assignment grader ID"""
15
+
16
+ created_at: datetime = FieldInfo(alias="createdAt")
17
+ """Creation timestamp"""
18
+
19
+ grade: float
20
+ """Overall grade percentage"""
21
+
22
+ rubric: object
23
+ """Grading results"""
24
+
25
+ title: str
26
+ """Assignment title"""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: studyfetch_sdk
3
- Version: 0.1.0a11
3
+ Version: 0.1.0a12
4
4
  Summary: The official Python library for the studyfetch-sdk API
5
5
  Project-URL: Homepage, https://github.com/GoStudyFetchGo/studyfetch-sdk-python
6
6
  Project-URL: Repository, https://github.com/GoStudyFetchGo/studyfetch-sdk-python
@@ -67,13 +67,11 @@ client = StudyfetchSDK(
67
67
  api_key=os.environ.get("STUDYFETCH_SDK_API_KEY"), # This is the default and can be omitted
68
68
  )
69
69
 
70
- component = client.v1.components.create(
71
- config={"model": "gpt-4o-mini-2024-07-18"},
72
- name="My Study Component",
73
- origin="api",
74
- type="flashcards",
70
+ material = client.v1.materials.create(
71
+ content={"type": "text"},
72
+ name="Chapter 1 - Introduction",
75
73
  )
76
- print(component._id)
74
+ print(material._id)
77
75
  ```
78
76
 
79
77
  While you can provide an `api_key` keyword argument,
@@ -96,13 +94,11 @@ client = AsyncStudyfetchSDK(
96
94
 
97
95
 
98
96
  async def main() -> None:
99
- component = await client.v1.components.create(
100
- config={"model": "gpt-4o-mini-2024-07-18"},
101
- name="My Study Component",
102
- origin="api",
103
- type="flashcards",
97
+ material = await client.v1.materials.create(
98
+ content={"type": "text"},
99
+ name="Chapter 1 - Introduction",
104
100
  )
105
- print(component._id)
101
+ print(material._id)
106
102
 
107
103
 
108
104
  asyncio.run(main())
@@ -134,13 +130,11 @@ async def main() -> None:
134
130
  api_key="My API Key",
135
131
  http_client=DefaultAioHttpClient(),
136
132
  ) as client:
137
- component = await client.v1.components.create(
138
- config={"model": "gpt-4o-mini-2024-07-18"},
139
- name="My Study Component",
140
- origin="api",
141
- type="flashcards",
133
+ material = await client.v1.materials.create(
134
+ content={"type": "text"},
135
+ name="Chapter 1 - Introduction",
142
136
  )
143
- print(component._id)
137
+ print(material._id)
144
138
 
145
139
 
146
140
  asyncio.run(main())
@@ -205,11 +199,9 @@ from studyfetch_sdk import StudyfetchSDK
205
199
  client = StudyfetchSDK()
206
200
 
207
201
  try:
208
- client.v1.components.create(
209
- config={"model": "gpt-4o-mini-2024-07-18"},
210
- name="My Study Component",
211
- origin="api",
212
- type="flashcards",
202
+ client.v1.materials.create(
203
+ content={"type": "text"},
204
+ name="Chapter 1 - Introduction",
213
205
  )
214
206
  except studyfetch_sdk.APIConnectionError as e:
215
207
  print("The server could not be reached")
@@ -253,11 +245,9 @@ client = StudyfetchSDK(
253
245
  )
254
246
 
255
247
  # Or, configure per-request:
256
- client.with_options(max_retries=5).v1.components.create(
257
- config={"model": "gpt-4o-mini-2024-07-18"},
258
- name="My Study Component",
259
- origin="api",
260
- type="flashcards",
248
+ client.with_options(max_retries=5).v1.materials.create(
249
+ content={"type": "text"},
250
+ name="Chapter 1 - Introduction",
261
251
  )
262
252
  ```
263
253
 
@@ -281,11 +271,9 @@ client = StudyfetchSDK(
281
271
  )
282
272
 
283
273
  # Override per-request:
284
- client.with_options(timeout=5.0).v1.components.create(
285
- config={"model": "gpt-4o-mini-2024-07-18"},
286
- name="My Study Component",
287
- origin="api",
288
- type="flashcards",
274
+ client.with_options(timeout=5.0).v1.materials.create(
275
+ content={"type": "text"},
276
+ name="Chapter 1 - Introduction",
289
277
  )
290
278
  ```
291
279
 
@@ -327,18 +315,16 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
327
315
  from studyfetch_sdk import StudyfetchSDK
328
316
 
329
317
  client = StudyfetchSDK()
330
- response = client.v1.components.with_raw_response.create(
331
- config={
332
- "model": "gpt-4o-mini-2024-07-18"
318
+ response = client.v1.materials.with_raw_response.create(
319
+ content={
320
+ "type": "text"
333
321
  },
334
- name="My Study Component",
335
- origin="api",
336
- type="flashcards",
322
+ name="Chapter 1 - Introduction",
337
323
  )
338
324
  print(response.headers.get('X-My-Header'))
339
325
 
340
- component = response.parse() # get the object that `v1.components.create()` would have returned
341
- print(component._id)
326
+ material = response.parse() # get the object that `v1.materials.create()` would have returned
327
+ print(material._id)
342
328
  ```
343
329
 
344
330
  These methods return an [`APIResponse`](https://github.com/GoStudyFetchGo/studyfetch-sdk-python/tree/main/src/studyfetch_sdk/_response.py) object.
@@ -352,11 +338,9 @@ The above interface eagerly reads the full response body when you make the reque
352
338
  To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
353
339
 
354
340
  ```python
355
- with client.v1.components.with_streaming_response.create(
356
- config={"model": "gpt-4o-mini-2024-07-18"},
357
- name="My Study Component",
358
- origin="api",
359
- type="flashcards",
341
+ with client.v1.materials.with_streaming_response.create(
342
+ content={"type": "text"},
343
+ name="Chapter 1 - Introduction",
360
344
  ) as response:
361
345
  print(response.headers.get("X-My-Header"))
362
346
 
@@ -11,7 +11,7 @@ studyfetch_sdk/_resource.py,sha256=y0aoAqMIYwTAwStuxbpO8XpTPnrSNQQ_ZcgiH5xcntg,1
11
11
  studyfetch_sdk/_response.py,sha256=6ph8tSkqF5pNbTo_2Zhizhq2O-Eb67TcksHwyg3aXdc,28864
12
12
  studyfetch_sdk/_streaming.py,sha256=HZoENuPVzWhBn24eH3lnMCvRbWN0EPwvhWYfdlJfw0A,10128
13
13
  studyfetch_sdk/_types.py,sha256=6nvqHGarRGuhs_FL8tJ8sGXXD8XWajNynT2K78GxRUI,6205
14
- studyfetch_sdk/_version.py,sha256=CIR50UEkj5rsPvtfCnuNpTsXB62LyhoaQbkV51FaFyg,175
14
+ studyfetch_sdk/_version.py,sha256=lfo3Wy1M7G0fsnpbZqRlu0Oe0VyAKmjAveWWEmiUQV0,175
15
15
  studyfetch_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  studyfetch_sdk/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
17
17
  studyfetch_sdk/_utils/_logs.py,sha256=EoZgOiIkpf2WB_0Ts0Ti7G3o_25v7IsPf_q-yEU6sbY,798
@@ -25,13 +25,14 @@ studyfetch_sdk/_utils/_typing.py,sha256=D0DbbNu8GnYQTSICnTSHDGsYXj8TcAKyhejb0Xcn
25
25
  studyfetch_sdk/_utils/_utils.py,sha256=ts4CiiuNpFiGB6YMdkQRh2SZvYvsl7mAF-JWHCcLDf4,12312
26
26
  studyfetch_sdk/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
27
27
  studyfetch_sdk/resources/__init__.py,sha256=TSJ6b8GNHShyK5w7efHV93u1bY2jYVySQRa2zKc1dKM,500
28
- studyfetch_sdk/resources/v1/__init__.py,sha256=XNPhLPJfTtp8K9whE5qPjt0s-awT15mJ9aHeGFCBr-A,6148
28
+ studyfetch_sdk/resources/v1/__init__.py,sha256=qxWo4pd2dhmbovxcvRakku86rsvbGMXDISPSEs8qc_s,6729
29
+ studyfetch_sdk/resources/v1/assignment_grader.py,sha256=I82bAbwIrfwue4bYAcwXsA81ci_I4TB40L0uuveoQoQ,13401
29
30
  studyfetch_sdk/resources/v1/components.py,sha256=iU4cy-l8k6_RBtsMvjag0E29nWJpSyktuCFhi4TZEh4,35435
30
31
  studyfetch_sdk/resources/v1/explainers.py,sha256=W5Kq3Gpwqw3kBy9v-qpV5FKxH1HAm5_yk1NgACM-Mec,16047
31
32
  studyfetch_sdk/resources/v1/flashcards.py,sha256=_-zZUd8Ja9k2895cxLJsLbN73ZTIrkJaComGCSMkbCk,29242
32
33
  studyfetch_sdk/resources/v1/folders.py,sha256=o43HhcVhqF3t7xWMFFNIiMPElhoqkXtaCTVjEE5s5so,27436
33
34
  studyfetch_sdk/resources/v1/usage.py,sha256=kdLuuMOLm9pPitXcV3JGpQaQ5pGDqtzLlGTZZrlrfiQ,18593
34
- studyfetch_sdk/resources/v1/v1.py,sha256=7A5sAf4Z7xjyXJ18BRzEa-W2Vf5kWLb_YR6ZaGosaRM,15705
35
+ studyfetch_sdk/resources/v1/v1.py,sha256=A2hsBke4UuPj7YfECi0XiW1btxPfH0pH4hlWuAFUmks,17059
35
36
  studyfetch_sdk/resources/v1/audio_recaps/__init__.py,sha256=X6oJGmyaqUBFChSn8l0r-EHjCZos36O10zfFYWuid2w,1094
36
37
  studyfetch_sdk/resources/v1/audio_recaps/audio_recaps.py,sha256=XAfSWFDbjUSp9bKjDVHqLyrEv3kNtTYSaLtWPRFIzdc,12630
37
38
  studyfetch_sdk/resources/v1/audio_recaps/sections.py,sha256=AcYtFSNemNP2T-fJn2nZkrPNNpaEtqiwPNuTpual2Lw,9451
@@ -61,7 +62,11 @@ studyfetch_sdk/resources/v1/upload/__init__.py,sha256=N5r6jpSMe43dezq-6RBAWLVlL3
61
62
  studyfetch_sdk/resources/v1/upload/component.py,sha256=BbiKtJ9hC7c7_Wv6Q_Zi_BZJmcusWFRNvBKJqaB75yA,15493
62
63
  studyfetch_sdk/resources/v1/upload/upload.py,sha256=RBkrsVi5_8qIqdYKypnSqj44ONvwW7u2XXIlpuJsKSg,3736
63
64
  studyfetch_sdk/types/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
64
- studyfetch_sdk/types/v1/__init__.py,sha256=dx6-7-97lowsTjmOKmMKYKOdbN9EVSzCre7SvR4QqiI,3463
65
+ studyfetch_sdk/types/v1/__init__.py,sha256=f8Glf6t9D0qOoS-rGctfdMzK6LHF_QnMNq9L0Q6zW18,3911
66
+ studyfetch_sdk/types/v1/assignment_grader_create_params.py,sha256=o-U_-0ZHJxwpL3pSEW41SmsHz-sOP490i5P8EA5A-Ws,1246
67
+ studyfetch_sdk/types/v1/assignment_grader_create_response.py,sha256=zcvIUEuUZNEeiZBdJk8e_Cc3l1g7jX1cP-JAnyYzZWs,560
68
+ studyfetch_sdk/types/v1/assignment_grader_get_all_response.py,sha256=YiGuA-vtghKxNz7U0NuSWamn0rXjXaErwONRhPWhF9Y,753
69
+ studyfetch_sdk/types/v1/assignment_grader_get_by_id_response.py,sha256=3Be7c-pBdjPPU-imG5WnXuJ8n0u9_H_SVjaUmjKSwnA,562
65
70
  studyfetch_sdk/types/v1/chat_get_session_params.py,sha256=Iv3O6eF4DvTYTBVQVyVR4trfZNQxFhipLPRWDF_VWq4,378
66
71
  studyfetch_sdk/types/v1/chat_send_message_params.py,sha256=BRxjNsVXsqcBbdrp4J5TQGjjNPJ_bz7uXw3pnc-x0oU,1454
67
72
  studyfetch_sdk/types/v1/chat_stream_params.py,sha256=Aqp2Vdsa35PAH-75kaO_ZYlkqGrCgDZ5EyYTTLRAJoE,695
@@ -116,7 +121,7 @@ studyfetch_sdk/types/v1/scenarios/component_update_params.py,sha256=0wsa-_gN17TK
116
121
  studyfetch_sdk/types/v1/scenarios/submissions/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
117
122
  studyfetch_sdk/types/v1/tests/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
118
123
  studyfetch_sdk/types/v1/upload/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
119
- studyfetch_sdk-0.1.0a11.dist-info/METADATA,sha256=SSecD7VD9CsTHi6z21CLXwHRhbzmTsDU6fH_s0LcdrY,15991
120
- studyfetch_sdk-0.1.0a11.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
121
- studyfetch_sdk-0.1.0a11.dist-info/licenses/LICENSE,sha256=CsdbJMegH_AAWljUmVcwW0Cj_GyIm1hjw6qPqPnmdn4,11344
122
- studyfetch_sdk-0.1.0a11.dist-info/RECORD,,
124
+ studyfetch_sdk-0.1.0a12.dist-info/METADATA,sha256=Z47IgOlqCrNKqiAv_TWy_-W8Wi-0PCKl8VnYdSh4th8,15518
125
+ studyfetch_sdk-0.1.0a12.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
126
+ studyfetch_sdk-0.1.0a12.dist-info/licenses/LICENSE,sha256=CsdbJMegH_AAWljUmVcwW0Cj_GyIm1hjw6qPqPnmdn4,11344
127
+ studyfetch_sdk-0.1.0a12.dist-info/RECORD,,