studyfetch-sdk 0.1.0a11__py3-none-any.whl → 0.1.0a13__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.13" # 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,346 @@
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_response import AssignmentGraderResponse
20
+ from ...types.v1.assignment_grader_get_all_response import AssignmentGraderGetAllResponse
21
+
22
+ __all__ = ["AssignmentGraderResource", "AsyncAssignmentGraderResource"]
23
+
24
+
25
+ class AssignmentGraderResource(SyncAPIResource):
26
+ @cached_property
27
+ def with_raw_response(self) -> AssignmentGraderResourceWithRawResponse:
28
+ """
29
+ This property can be used as a prefix for any HTTP method call to return
30
+ the raw response object instead of the parsed content.
31
+
32
+ For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
33
+ """
34
+ return AssignmentGraderResourceWithRawResponse(self)
35
+
36
+ @cached_property
37
+ def with_streaming_response(self) -> AssignmentGraderResourceWithStreamingResponse:
38
+ """
39
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
40
+
41
+ For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
42
+ """
43
+ return AssignmentGraderResourceWithStreamingResponse(self)
44
+
45
+ def create(
46
+ self,
47
+ *,
48
+ rubric: assignment_grader_create_params.Rubric,
49
+ title: str,
50
+ material_id: str | NotGiven = NOT_GIVEN,
51
+ model: str | NotGiven = NOT_GIVEN,
52
+ text_to_grade: str | NotGiven = NOT_GIVEN,
53
+ user_id: str | NotGiven = NOT_GIVEN,
54
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
55
+ # The extra values given here take precedence over values defined on the client or passed to this method.
56
+ extra_headers: Headers | None = None,
57
+ extra_query: Query | None = None,
58
+ extra_body: Body | None = None,
59
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
60
+ ) -> AssignmentGraderResponse:
61
+ """
62
+ Grade a new assignment
63
+
64
+ Args:
65
+ rubric: Grading rubric
66
+
67
+ title: Title of the assignment
68
+
69
+ material_id: Material ID to grade
70
+
71
+ model: AI model to use
72
+
73
+ text_to_grade: Text content to grade
74
+
75
+ user_id: User ID for tracking
76
+
77
+ extra_headers: Send extra headers
78
+
79
+ extra_query: Add additional query parameters to the request
80
+
81
+ extra_body: Add additional JSON properties to the request
82
+
83
+ timeout: Override the client-level default timeout for this request, in seconds
84
+ """
85
+ return self._post(
86
+ "/api/v1/assignment-grader/create",
87
+ body=maybe_transform(
88
+ {
89
+ "rubric": rubric,
90
+ "title": title,
91
+ "material_id": material_id,
92
+ "model": model,
93
+ "text_to_grade": text_to_grade,
94
+ "user_id": user_id,
95
+ },
96
+ assignment_grader_create_params.AssignmentGraderCreateParams,
97
+ ),
98
+ options=make_request_options(
99
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
100
+ ),
101
+ cast_to=AssignmentGraderResponse,
102
+ )
103
+
104
+ def get_all(
105
+ self,
106
+ *,
107
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
108
+ # The extra values given here take precedence over values defined on the client or passed to this method.
109
+ extra_headers: Headers | None = None,
110
+ extra_query: Query | None = None,
111
+ extra_body: Body | None = None,
112
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
113
+ ) -> AssignmentGraderGetAllResponse:
114
+ """Get all assignment graders"""
115
+ return self._get(
116
+ "/api/v1/assignment-grader/get",
117
+ options=make_request_options(
118
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
119
+ ),
120
+ cast_to=AssignmentGraderGetAllResponse,
121
+ )
122
+
123
+ def get_by_id(
124
+ self,
125
+ id: str,
126
+ *,
127
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
128
+ # The extra values given here take precedence over values defined on the client or passed to this method.
129
+ extra_headers: Headers | None = None,
130
+ extra_query: Query | None = None,
131
+ extra_body: Body | None = None,
132
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
133
+ ) -> AssignmentGraderResponse:
134
+ """
135
+ Get an assignment grader by ID
136
+
137
+ Args:
138
+ extra_headers: Send extra headers
139
+
140
+ extra_query: Add additional query parameters to the request
141
+
142
+ extra_body: Add additional JSON properties to the request
143
+
144
+ timeout: Override the client-level default timeout for this request, in seconds
145
+ """
146
+ if not id:
147
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
148
+ return self._get(
149
+ f"/api/v1/assignment-grader/get/{id}",
150
+ options=make_request_options(
151
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
152
+ ),
153
+ cast_to=AssignmentGraderResponse,
154
+ )
155
+
156
+
157
+ class AsyncAssignmentGraderResource(AsyncAPIResource):
158
+ @cached_property
159
+ def with_raw_response(self) -> AsyncAssignmentGraderResourceWithRawResponse:
160
+ """
161
+ This property can be used as a prefix for any HTTP method call to return
162
+ the raw response object instead of the parsed content.
163
+
164
+ For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
165
+ """
166
+ return AsyncAssignmentGraderResourceWithRawResponse(self)
167
+
168
+ @cached_property
169
+ def with_streaming_response(self) -> AsyncAssignmentGraderResourceWithStreamingResponse:
170
+ """
171
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
172
+
173
+ For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
174
+ """
175
+ return AsyncAssignmentGraderResourceWithStreamingResponse(self)
176
+
177
+ async def create(
178
+ self,
179
+ *,
180
+ rubric: assignment_grader_create_params.Rubric,
181
+ title: str,
182
+ material_id: str | NotGiven = NOT_GIVEN,
183
+ model: str | NotGiven = NOT_GIVEN,
184
+ text_to_grade: str | NotGiven = NOT_GIVEN,
185
+ user_id: str | NotGiven = NOT_GIVEN,
186
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
187
+ # The extra values given here take precedence over values defined on the client or passed to this method.
188
+ extra_headers: Headers | None = None,
189
+ extra_query: Query | None = None,
190
+ extra_body: Body | None = None,
191
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
192
+ ) -> AssignmentGraderResponse:
193
+ """
194
+ Grade a new assignment
195
+
196
+ Args:
197
+ rubric: Grading rubric
198
+
199
+ title: Title of the assignment
200
+
201
+ material_id: Material ID to grade
202
+
203
+ model: AI model to use
204
+
205
+ text_to_grade: Text content to grade
206
+
207
+ user_id: User ID for tracking
208
+
209
+ extra_headers: Send extra headers
210
+
211
+ extra_query: Add additional query parameters to the request
212
+
213
+ extra_body: Add additional JSON properties to the request
214
+
215
+ timeout: Override the client-level default timeout for this request, in seconds
216
+ """
217
+ return await self._post(
218
+ "/api/v1/assignment-grader/create",
219
+ body=await async_maybe_transform(
220
+ {
221
+ "rubric": rubric,
222
+ "title": title,
223
+ "material_id": material_id,
224
+ "model": model,
225
+ "text_to_grade": text_to_grade,
226
+ "user_id": user_id,
227
+ },
228
+ assignment_grader_create_params.AssignmentGraderCreateParams,
229
+ ),
230
+ options=make_request_options(
231
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
232
+ ),
233
+ cast_to=AssignmentGraderResponse,
234
+ )
235
+
236
+ async def get_all(
237
+ self,
238
+ *,
239
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
240
+ # The extra values given here take precedence over values defined on the client or passed to this method.
241
+ extra_headers: Headers | None = None,
242
+ extra_query: Query | None = None,
243
+ extra_body: Body | None = None,
244
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
245
+ ) -> AssignmentGraderGetAllResponse:
246
+ """Get all assignment graders"""
247
+ return await self._get(
248
+ "/api/v1/assignment-grader/get",
249
+ options=make_request_options(
250
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
251
+ ),
252
+ cast_to=AssignmentGraderGetAllResponse,
253
+ )
254
+
255
+ async def get_by_id(
256
+ self,
257
+ id: str,
258
+ *,
259
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
260
+ # The extra values given here take precedence over values defined on the client or passed to this method.
261
+ extra_headers: Headers | None = None,
262
+ extra_query: Query | None = None,
263
+ extra_body: Body | None = None,
264
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
265
+ ) -> AssignmentGraderResponse:
266
+ """
267
+ Get an assignment grader by ID
268
+
269
+ Args:
270
+ extra_headers: Send extra headers
271
+
272
+ extra_query: Add additional query parameters to the request
273
+
274
+ extra_body: Add additional JSON properties to the request
275
+
276
+ timeout: Override the client-level default timeout for this request, in seconds
277
+ """
278
+ if not id:
279
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
280
+ return await self._get(
281
+ f"/api/v1/assignment-grader/get/{id}",
282
+ options=make_request_options(
283
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
284
+ ),
285
+ cast_to=AssignmentGraderResponse,
286
+ )
287
+
288
+
289
+ class AssignmentGraderResourceWithRawResponse:
290
+ def __init__(self, assignment_grader: AssignmentGraderResource) -> None:
291
+ self._assignment_grader = assignment_grader
292
+
293
+ self.create = to_raw_response_wrapper(
294
+ assignment_grader.create,
295
+ )
296
+ self.get_all = to_raw_response_wrapper(
297
+ assignment_grader.get_all,
298
+ )
299
+ self.get_by_id = to_raw_response_wrapper(
300
+ assignment_grader.get_by_id,
301
+ )
302
+
303
+
304
+ class AsyncAssignmentGraderResourceWithRawResponse:
305
+ def __init__(self, assignment_grader: AsyncAssignmentGraderResource) -> None:
306
+ self._assignment_grader = assignment_grader
307
+
308
+ self.create = async_to_raw_response_wrapper(
309
+ assignment_grader.create,
310
+ )
311
+ self.get_all = async_to_raw_response_wrapper(
312
+ assignment_grader.get_all,
313
+ )
314
+ self.get_by_id = async_to_raw_response_wrapper(
315
+ assignment_grader.get_by_id,
316
+ )
317
+
318
+
319
+ class AssignmentGraderResourceWithStreamingResponse:
320
+ def __init__(self, assignment_grader: AssignmentGraderResource) -> None:
321
+ self._assignment_grader = assignment_grader
322
+
323
+ self.create = to_streamed_response_wrapper(
324
+ assignment_grader.create,
325
+ )
326
+ self.get_all = to_streamed_response_wrapper(
327
+ assignment_grader.get_all,
328
+ )
329
+ self.get_by_id = to_streamed_response_wrapper(
330
+ assignment_grader.get_by_id,
331
+ )
332
+
333
+
334
+ class AsyncAssignmentGraderResourceWithStreamingResponse:
335
+ def __init__(self, assignment_grader: AsyncAssignmentGraderResource) -> None:
336
+ self._assignment_grader = assignment_grader
337
+
338
+ self.create = async_to_streamed_response_wrapper(
339
+ assignment_grader.create,
340
+ )
341
+ self.get_all = async_to_streamed_response_wrapper(
342
+ assignment_grader.get_all,
343
+ )
344
+ self.get_by_id = async_to_streamed_response_wrapper(
345
+ assignment_grader.get_by_id,
346
+ )
@@ -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)
@@ -32,13 +32,16 @@ from .flashcard_get_due_params import FlashcardGetDueParams as FlashcardGetDuePa
32
32
  from .usage_get_summary_params import UsageGetSummaryParams as UsageGetSummaryParams
33
33
  from .usage_list_events_params import UsageListEventsParams as UsageListEventsParams
34
34
  from .test_submit_answer_params import TestSubmitAnswerParams as TestSubmitAnswerParams
35
+ from .assignment_grader_response import AssignmentGraderResponse as AssignmentGraderResponse
35
36
  from .flashcard_get_stats_params import FlashcardGetStatsParams as FlashcardGetStatsParams
36
37
  from .flashcard_get_types_response import FlashcardGetTypesResponse as FlashcardGetTypesResponse
37
38
  from .scenario_submit_answer_params import ScenarioSubmitAnswerParams as ScenarioSubmitAnswerParams
38
39
  from .flashcard_batch_process_params import FlashcardBatchProcessParams as FlashcardBatchProcessParams
40
+ from .assignment_grader_create_params import AssignmentGraderCreateParams as AssignmentGraderCreateParams
39
41
  from .component_generate_embed_params import ComponentGenerateEmbedParams as ComponentGenerateEmbedParams
40
42
  from .explainer_handle_webhook_params import ExplainerHandleWebhookParams as ExplainerHandleWebhookParams
41
43
  from .flashcard_batch_process_response import FlashcardBatchProcessResponse as FlashcardBatchProcessResponse
42
44
  from .flashcard_get_algorithm_response import FlashcardGetAlgorithmResponse as FlashcardGetAlgorithmResponse
43
45
  from .material_get_download_url_params import MaterialGetDownloadURLParams as MaterialGetDownloadURLParams
44
46
  from .component_generate_embed_response import ComponentGenerateEmbedResponse as ComponentGenerateEmbedResponse
47
+ from .assignment_grader_get_all_response import AssignmentGraderGetAllResponse as AssignmentGraderGetAllResponse
@@ -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,10 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List
4
+ from typing_extensions import TypeAlias
5
+
6
+ from .assignment_grader_response import AssignmentGraderResponse
7
+
8
+ __all__ = ["AssignmentGraderGetAllResponse"]
9
+
10
+ AssignmentGraderGetAllResponse: TypeAlias = List[AssignmentGraderResponse]
@@ -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__ = ["AssignmentGraderResponse"]
10
+
11
+
12
+ class AssignmentGraderResponse(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.0a13
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=sJVBT-PlCTfDfa1WapCSYU1aMCF3bl70UxEySmS5YZs,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=6jUl0kFBR90J5rkqa6bLf07EaiFDcXN1DvbUxFjUSs8,13243
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,10 @@ 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=ZYgsBMrJnlzlGjnuZmHVl8dP3wnDvh_ZZz9yB76qxTw,3775
66
+ studyfetch_sdk/types/v1/assignment_grader_create_params.py,sha256=o-U_-0ZHJxwpL3pSEW41SmsHz-sOP490i5P8EA5A-Ws,1246
67
+ studyfetch_sdk/types/v1/assignment_grader_get_all_response.py,sha256=FidqfpFC-PX05_knGWicLerCeSqJiScW2IbzPyzBb2c,339
68
+ studyfetch_sdk/types/v1/assignment_grader_response.py,sha256=j2DKiD99EPKPcvY6k7wKXd3r9UTkEe9SMmY94rRxjgw,548
65
69
  studyfetch_sdk/types/v1/chat_get_session_params.py,sha256=Iv3O6eF4DvTYTBVQVyVR4trfZNQxFhipLPRWDF_VWq4,378
66
70
  studyfetch_sdk/types/v1/chat_send_message_params.py,sha256=BRxjNsVXsqcBbdrp4J5TQGjjNPJ_bz7uXw3pnc-x0oU,1454
67
71
  studyfetch_sdk/types/v1/chat_stream_params.py,sha256=Aqp2Vdsa35PAH-75kaO_ZYlkqGrCgDZ5EyYTTLRAJoE,695
@@ -116,7 +120,7 @@ studyfetch_sdk/types/v1/scenarios/component_update_params.py,sha256=0wsa-_gN17TK
116
120
  studyfetch_sdk/types/v1/scenarios/submissions/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
117
121
  studyfetch_sdk/types/v1/tests/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
118
122
  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,,
123
+ studyfetch_sdk-0.1.0a13.dist-info/METADATA,sha256=sqE8zIen0KP6c97okJasTzSntoyNdDaqpMHUinGaFVI,15518
124
+ studyfetch_sdk-0.1.0a13.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
125
+ studyfetch_sdk-0.1.0a13.dist-info/licenses/LICENSE,sha256=CsdbJMegH_AAWljUmVcwW0Cj_GyIm1hjw6qPqPnmdn4,11344
126
+ studyfetch_sdk-0.1.0a13.dist-info/RECORD,,