scale-gp-beta 0.1.0a15__py3-none-any.whl → 0.1.0a17__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.
@@ -960,6 +960,9 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
960
960
  if self.custom_auth is not None:
961
961
  kwargs["auth"] = self.custom_auth
962
962
 
963
+ if options.follow_redirects is not None:
964
+ kwargs["follow_redirects"] = options.follow_redirects
965
+
963
966
  log.debug("Sending HTTP Request: %s %s", request.method, request.url)
964
967
 
965
968
  response = None
@@ -1460,6 +1463,9 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
1460
1463
  if self.custom_auth is not None:
1461
1464
  kwargs["auth"] = self.custom_auth
1462
1465
 
1466
+ if options.follow_redirects is not None:
1467
+ kwargs["follow_redirects"] = options.follow_redirects
1468
+
1463
1469
  log.debug("Sending HTTP Request: %s %s", request.method, request.url)
1464
1470
 
1465
1471
  response = None
scale_gp_beta/_models.py CHANGED
@@ -737,6 +737,7 @@ class FinalRequestOptionsInput(TypedDict, total=False):
737
737
  idempotency_key: str
738
738
  json_data: Body
739
739
  extra_json: AnyMapping
740
+ follow_redirects: bool
740
741
 
741
742
 
742
743
  @final
@@ -750,6 +751,7 @@ class FinalRequestOptions(pydantic.BaseModel):
750
751
  files: Union[HttpxRequestFiles, None] = None
751
752
  idempotency_key: Union[str, None] = None
752
753
  post_parser: Union[Callable[[Any], Any], NotGiven] = NotGiven()
754
+ follow_redirects: Union[bool, None] = None
753
755
 
754
756
  # It should be noted that we cannot use `json` here as that would override
755
757
  # a BaseModel method in an incompatible fashion.
scale_gp_beta/_types.py CHANGED
@@ -100,6 +100,7 @@ class RequestOptions(TypedDict, total=False):
100
100
  params: Query
101
101
  extra_json: AnyMapping
102
102
  idempotency_key: str
103
+ follow_redirects: bool
103
104
 
104
105
 
105
106
  # Sentinel class used until PEP 0661 is accepted
@@ -215,3 +216,4 @@ class _GenericAlias(Protocol):
215
216
 
216
217
  class HttpxSendArgs(TypedDict, total=False):
217
218
  auth: httpx.Auth
219
+ follow_redirects: bool
scale_gp_beta/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "scale_gp_beta"
4
- __version__ = "0.1.0-alpha.15" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.17" # x-release-please-version
@@ -23,10 +23,11 @@ from .._response import (
23
23
  async_to_raw_response_wrapper,
24
24
  async_to_streamed_response_wrapper,
25
25
  )
26
- from ..pagination import SyncCursorPage, AsyncCursorPage, SyncAPIListPage, AsyncAPIListPage
26
+ from ..pagination import SyncCursorPage, AsyncCursorPage
27
27
  from .._base_client import AsyncPaginator, make_request_options
28
28
  from ..types.dataset_item import DatasetItem
29
29
  from ..types.dataset_item_delete_response import DatasetItemDeleteResponse
30
+ from ..types.dataset_item_batch_create_response import DatasetItemBatchCreateResponse
30
31
 
31
32
  __all__ = ["DatasetItemsResource", "AsyncDatasetItemsResource"]
32
33
 
@@ -233,7 +234,7 @@ class DatasetItemsResource(SyncAPIResource):
233
234
  extra_query: Query | None = None,
234
235
  extra_body: Body | None = None,
235
236
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
236
- ) -> SyncAPIListPage[DatasetItem]:
237
+ ) -> DatasetItemBatchCreateResponse:
237
238
  """
238
239
  Batch Create Dataset Items
239
240
 
@@ -250,9 +251,8 @@ class DatasetItemsResource(SyncAPIResource):
250
251
 
251
252
  timeout: Override the client-level default timeout for this request, in seconds
252
253
  """
253
- return self._get_api_list(
254
+ return self._post(
254
255
  "/v5/dataset-items/batch",
255
- page=SyncAPIListPage[DatasetItem],
256
256
  body=maybe_transform(
257
257
  {
258
258
  "data": data,
@@ -263,8 +263,7 @@ class DatasetItemsResource(SyncAPIResource):
263
263
  options=make_request_options(
264
264
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
265
265
  ),
266
- model=DatasetItem,
267
- method="post",
266
+ cast_to=DatasetItemBatchCreateResponse,
268
267
  )
269
268
 
270
269
 
@@ -461,7 +460,7 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
461
460
  cast_to=DatasetItemDeleteResponse,
462
461
  )
463
462
 
464
- def batch_create(
463
+ async def batch_create(
465
464
  self,
466
465
  *,
467
466
  data: Iterable[Dict[str, object]],
@@ -472,7 +471,7 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
472
471
  extra_query: Query | None = None,
473
472
  extra_body: Body | None = None,
474
473
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
475
- ) -> AsyncPaginator[DatasetItem, AsyncAPIListPage[DatasetItem]]:
474
+ ) -> DatasetItemBatchCreateResponse:
476
475
  """
477
476
  Batch Create Dataset Items
478
477
 
@@ -489,10 +488,9 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
489
488
 
490
489
  timeout: Override the client-level default timeout for this request, in seconds
491
490
  """
492
- return self._get_api_list(
491
+ return await self._post(
493
492
  "/v5/dataset-items/batch",
494
- page=AsyncAPIListPage[DatasetItem],
495
- body=maybe_transform(
493
+ body=await async_maybe_transform(
496
494
  {
497
495
  "data": data,
498
496
  "dataset_id": dataset_id,
@@ -502,8 +500,7 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
502
500
  options=make_request_options(
503
501
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
504
502
  ),
505
- model=DatasetItem,
506
- method="post",
503
+ cast_to=DatasetItemBatchCreateResponse,
507
504
  )
508
505
 
509
506