channel3-sdk 2.2.0__py3-none-any.whl → 2.2.1__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.

Potentially problematic release.


This version of channel3-sdk might be problematic. Click here for more details.

channel3_sdk/__init__.py CHANGED
@@ -3,7 +3,7 @@
3
3
  import typing as _t
4
4
 
5
5
  from . import types
6
- from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes
6
+ from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes, omit, not_given
7
7
  from ._utils import file_from_path
8
8
  from ._client import (
9
9
  Client,
@@ -48,7 +48,9 @@ __all__ = [
48
48
  "ProxiesTypes",
49
49
  "NotGiven",
50
50
  "NOT_GIVEN",
51
+ "not_given",
51
52
  "Omit",
53
+ "omit",
52
54
  "Channel3Error",
53
55
  "APIError",
54
56
  "APIStatusError",
@@ -42,7 +42,6 @@ from . import _exceptions
42
42
  from ._qs import Querystring
43
43
  from ._files import to_httpx_files, async_to_httpx_files
44
44
  from ._types import (
45
- NOT_GIVEN,
46
45
  Body,
47
46
  Omit,
48
47
  Query,
@@ -57,6 +56,7 @@ from ._types import (
57
56
  RequestOptions,
58
57
  HttpxRequestFiles,
59
58
  ModelBuilderProtocol,
59
+ not_given,
60
60
  )
61
61
  from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping
62
62
  from ._compat import PYDANTIC_V1, model_copy, model_dump
@@ -145,9 +145,9 @@ class PageInfo:
145
145
  def __init__(
146
146
  self,
147
147
  *,
148
- url: URL | NotGiven = NOT_GIVEN,
149
- json: Body | NotGiven = NOT_GIVEN,
150
- params: Query | NotGiven = NOT_GIVEN,
148
+ url: URL | NotGiven = not_given,
149
+ json: Body | NotGiven = not_given,
150
+ params: Query | NotGiven = not_given,
151
151
  ) -> None:
152
152
  self.url = url
153
153
  self.json = json
@@ -595,7 +595,7 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
595
595
  # we internally support defining a temporary header to override the
596
596
  # default `cast_to` type for use with `.with_raw_response` and `.with_streaming_response`
597
597
  # see _response.py for implementation details
598
- override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, NOT_GIVEN)
598
+ override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, not_given)
599
599
  if is_given(override_cast_to):
600
600
  options.headers = headers
601
601
  return cast(Type[ResponseT], override_cast_to)
@@ -825,7 +825,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
825
825
  version: str,
826
826
  base_url: str | URL,
827
827
  max_retries: int = DEFAULT_MAX_RETRIES,
828
- timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
828
+ timeout: float | Timeout | None | NotGiven = not_given,
829
829
  http_client: httpx.Client | None = None,
830
830
  custom_headers: Mapping[str, str] | None = None,
831
831
  custom_query: Mapping[str, object] | None = None,
@@ -1356,7 +1356,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
1356
1356
  base_url: str | URL,
1357
1357
  _strict_response_validation: bool,
1358
1358
  max_retries: int = DEFAULT_MAX_RETRIES,
1359
- timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
1359
+ timeout: float | Timeout | None | NotGiven = not_given,
1360
1360
  http_client: httpx.AsyncClient | None = None,
1361
1361
  custom_headers: Mapping[str, str] | None = None,
1362
1362
  custom_query: Mapping[str, object] | None = None,
@@ -1818,8 +1818,8 @@ def make_request_options(
1818
1818
  extra_query: Query | None = None,
1819
1819
  extra_body: Body | None = None,
1820
1820
  idempotency_key: str | None = None,
1821
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1822
- post_parser: PostParser | NotGiven = NOT_GIVEN,
1821
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1822
+ post_parser: PostParser | NotGiven = not_given,
1823
1823
  ) -> RequestOptions:
1824
1824
  """Create a dict of type RequestOptions without keys of NotGiven values."""
1825
1825
  options: RequestOptions = {}
channel3_sdk/_client.py CHANGED
@@ -3,7 +3,7 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  import os
6
- from typing import Any, Union, Mapping
6
+ from typing import Any, Mapping
7
7
  from typing_extensions import Self, override
8
8
 
9
9
  import httpx
@@ -11,7 +11,6 @@ import httpx
11
11
  from . import _exceptions
12
12
  from ._qs import Querystring
13
13
  from ._types import (
14
- NOT_GIVEN,
15
14
  Body,
16
15
  Omit,
17
16
  Query,
@@ -21,6 +20,7 @@ from ._types import (
21
20
  Transport,
22
21
  ProxiesTypes,
23
22
  RequestOptions,
23
+ not_given,
24
24
  )
25
25
  from ._utils import is_given, get_async_library
26
26
  from ._version import __version__
@@ -68,7 +68,7 @@ class Channel3(SyncAPIClient):
68
68
  *,
69
69
  api_key: str | None = None,
70
70
  base_url: str | httpx.URL | None = None,
71
- timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN,
71
+ timeout: float | Timeout | None | NotGiven = not_given,
72
72
  max_retries: int = DEFAULT_MAX_RETRIES,
73
73
  default_headers: Mapping[str, str] | None = None,
74
74
  default_query: Mapping[str, object] | None = None,
@@ -146,9 +146,9 @@ class Channel3(SyncAPIClient):
146
146
  *,
147
147
  api_key: str | None = None,
148
148
  base_url: str | httpx.URL | None = None,
149
- timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
149
+ timeout: float | Timeout | None | NotGiven = not_given,
150
150
  http_client: httpx.Client | None = None,
151
- max_retries: int | NotGiven = NOT_GIVEN,
151
+ max_retries: int | NotGiven = not_given,
152
152
  default_headers: Mapping[str, str] | None = None,
153
153
  set_default_headers: Mapping[str, str] | None = None,
154
154
  default_query: Mapping[str, object] | None = None,
@@ -200,7 +200,7 @@ class Channel3(SyncAPIClient):
200
200
  extra_headers: Headers | None = None,
201
201
  extra_query: Query | None = None,
202
202
  extra_body: Body | None = None,
203
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
203
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
204
204
  ) -> object:
205
205
  """Root"""
206
206
  return self.get(
@@ -261,7 +261,7 @@ class AsyncChannel3(AsyncAPIClient):
261
261
  *,
262
262
  api_key: str | None = None,
263
263
  base_url: str | httpx.URL | None = None,
264
- timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN,
264
+ timeout: float | Timeout | None | NotGiven = not_given,
265
265
  max_retries: int = DEFAULT_MAX_RETRIES,
266
266
  default_headers: Mapping[str, str] | None = None,
267
267
  default_query: Mapping[str, object] | None = None,
@@ -339,9 +339,9 @@ class AsyncChannel3(AsyncAPIClient):
339
339
  *,
340
340
  api_key: str | None = None,
341
341
  base_url: str | httpx.URL | None = None,
342
- timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
342
+ timeout: float | Timeout | None | NotGiven = not_given,
343
343
  http_client: httpx.AsyncClient | None = None,
344
- max_retries: int | NotGiven = NOT_GIVEN,
344
+ max_retries: int | NotGiven = not_given,
345
345
  default_headers: Mapping[str, str] | None = None,
346
346
  set_default_headers: Mapping[str, str] | None = None,
347
347
  default_query: Mapping[str, object] | None = None,
@@ -393,7 +393,7 @@ class AsyncChannel3(AsyncAPIClient):
393
393
  extra_headers: Headers | None = None,
394
394
  extra_query: Query | None = None,
395
395
  extra_body: Body | None = None,
396
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
396
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
397
397
  ) -> object:
398
398
  """Root"""
399
399
  return await self.get(
channel3_sdk/_models.py CHANGED
@@ -256,7 +256,7 @@ class BaseModel(pydantic.BaseModel):
256
256
  mode: Literal["json", "python"] | str = "python",
257
257
  include: IncEx | None = None,
258
258
  exclude: IncEx | None = None,
259
- by_alias: bool = False,
259
+ by_alias: bool | None = None,
260
260
  exclude_unset: bool = False,
261
261
  exclude_defaults: bool = False,
262
262
  exclude_none: bool = False,
@@ -264,6 +264,7 @@ class BaseModel(pydantic.BaseModel):
264
264
  warnings: bool | Literal["none", "warn", "error"] = True,
265
265
  context: dict[str, Any] | None = None,
266
266
  serialize_as_any: bool = False,
267
+ fallback: Callable[[Any], Any] | None = None,
267
268
  ) -> dict[str, Any]:
268
269
  """Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump
269
270
 
@@ -295,10 +296,12 @@ class BaseModel(pydantic.BaseModel):
295
296
  raise ValueError("context is only supported in Pydantic v2")
296
297
  if serialize_as_any != False:
297
298
  raise ValueError("serialize_as_any is only supported in Pydantic v2")
299
+ if fallback is not None:
300
+ raise ValueError("fallback is only supported in Pydantic v2")
298
301
  dumped = super().dict( # pyright: ignore[reportDeprecated]
299
302
  include=include,
300
303
  exclude=exclude,
301
- by_alias=by_alias,
304
+ by_alias=by_alias if by_alias is not None else False,
302
305
  exclude_unset=exclude_unset,
303
306
  exclude_defaults=exclude_defaults,
304
307
  exclude_none=exclude_none,
@@ -313,13 +316,14 @@ class BaseModel(pydantic.BaseModel):
313
316
  indent: int | None = None,
314
317
  include: IncEx | None = None,
315
318
  exclude: IncEx | None = None,
316
- by_alias: bool = False,
319
+ by_alias: bool | None = None,
317
320
  exclude_unset: bool = False,
318
321
  exclude_defaults: bool = False,
319
322
  exclude_none: bool = False,
320
323
  round_trip: bool = False,
321
324
  warnings: bool | Literal["none", "warn", "error"] = True,
322
325
  context: dict[str, Any] | None = None,
326
+ fallback: Callable[[Any], Any] | None = None,
323
327
  serialize_as_any: bool = False,
324
328
  ) -> str:
325
329
  """Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump_json
@@ -348,11 +352,13 @@ class BaseModel(pydantic.BaseModel):
348
352
  raise ValueError("context is only supported in Pydantic v2")
349
353
  if serialize_as_any != False:
350
354
  raise ValueError("serialize_as_any is only supported in Pydantic v2")
355
+ if fallback is not None:
356
+ raise ValueError("fallback is only supported in Pydantic v2")
351
357
  return super().json( # type: ignore[reportDeprecated]
352
358
  indent=indent,
353
359
  include=include,
354
360
  exclude=exclude,
355
- by_alias=by_alias,
361
+ by_alias=by_alias if by_alias is not None else False,
356
362
  exclude_unset=exclude_unset,
357
363
  exclude_defaults=exclude_defaults,
358
364
  exclude_none=exclude_none,
channel3_sdk/_qs.py CHANGED
@@ -4,7 +4,7 @@ from typing import Any, List, Tuple, Union, Mapping, TypeVar
4
4
  from urllib.parse import parse_qs, urlencode
5
5
  from typing_extensions import Literal, get_args
6
6
 
7
- from ._types import NOT_GIVEN, NotGiven, NotGivenOr
7
+ from ._types import NotGiven, not_given
8
8
  from ._utils import flatten
9
9
 
10
10
  _T = TypeVar("_T")
@@ -41,8 +41,8 @@ class Querystring:
41
41
  self,
42
42
  params: Params,
43
43
  *,
44
- array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN,
45
- nested_format: NotGivenOr[NestedFormat] = NOT_GIVEN,
44
+ array_format: ArrayFormat | NotGiven = not_given,
45
+ nested_format: NestedFormat | NotGiven = not_given,
46
46
  ) -> str:
47
47
  return urlencode(
48
48
  self.stringify_items(
@@ -56,8 +56,8 @@ class Querystring:
56
56
  self,
57
57
  params: Params,
58
58
  *,
59
- array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN,
60
- nested_format: NotGivenOr[NestedFormat] = NOT_GIVEN,
59
+ array_format: ArrayFormat | NotGiven = not_given,
60
+ nested_format: NestedFormat | NotGiven = not_given,
61
61
  ) -> list[tuple[str, str]]:
62
62
  opts = Options(
63
63
  qs=self,
@@ -143,8 +143,8 @@ class Options:
143
143
  self,
144
144
  qs: Querystring = _qs,
145
145
  *,
146
- array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN,
147
- nested_format: NotGivenOr[NestedFormat] = NOT_GIVEN,
146
+ array_format: ArrayFormat | NotGiven = not_given,
147
+ nested_format: NestedFormat | NotGiven = not_given,
148
148
  ) -> None:
149
149
  self.array_format = qs.array_format if isinstance(array_format, NotGiven) else array_format
150
150
  self.nested_format = qs.nested_format if isinstance(nested_format, NotGiven) else nested_format
channel3_sdk/_types.py CHANGED
@@ -117,18 +117,21 @@ class RequestOptions(TypedDict, total=False):
117
117
  # Sentinel class used until PEP 0661 is accepted
118
118
  class NotGiven:
119
119
  """
120
- A sentinel singleton class used to distinguish omitted keyword arguments
121
- from those passed in with the value None (which may have different behavior).
120
+ For parameters with a meaningful None value, we need to distinguish between
121
+ the user explicitly passing None, and the user not passing the parameter at
122
+ all.
123
+
124
+ User code shouldn't need to use not_given directly.
122
125
 
123
126
  For example:
124
127
 
125
128
  ```py
126
- def get(timeout: Union[int, NotGiven, None] = NotGiven()) -> Response: ...
129
+ def create(timeout: Timeout | None | NotGiven = not_given): ...
127
130
 
128
131
 
129
- get(timeout=1) # 1s timeout
130
- get(timeout=None) # No timeout
131
- get() # Default timeout behavior, which may not be statically known at the method definition.
132
+ create(timeout=1) # 1s timeout
133
+ create(timeout=None) # No timeout
134
+ create() # Default timeout behavior
132
135
  ```
133
136
  """
134
137
 
@@ -140,13 +143,14 @@ class NotGiven:
140
143
  return "NOT_GIVEN"
141
144
 
142
145
 
143
- NotGivenOr = Union[_T, NotGiven]
146
+ not_given = NotGiven()
147
+ # for backwards compatibility:
144
148
  NOT_GIVEN = NotGiven()
145
149
 
146
150
 
147
151
  class Omit:
148
- """In certain situations you need to be able to represent a case where a default value has
149
- to be explicitly removed and `None` is not an appropriate substitute, for example:
152
+ """
153
+ To explicitly omit something from being sent in a request, use `omit`.
150
154
 
151
155
  ```py
152
156
  # as the default `Content-Type` header is `application/json` that will be sent
@@ -156,8 +160,8 @@ class Omit:
156
160
  # to look something like: 'multipart/form-data; boundary=0d8382fcf5f8c3be01ca2e11002d2983'
157
161
  client.post(..., headers={"Content-Type": "multipart/form-data"})
158
162
 
159
- # instead you can remove the default `application/json` header by passing Omit
160
- client.post(..., headers={"Content-Type": Omit()})
163
+ # instead you can remove the default `application/json` header by passing omit
164
+ client.post(..., headers={"Content-Type": omit})
161
165
  ```
162
166
  """
163
167
 
@@ -165,6 +169,9 @@ class Omit:
165
169
  return False
166
170
 
167
171
 
172
+ omit = Omit()
173
+
174
+
168
175
  @runtime_checkable
169
176
  class ModelBuilderProtocol(Protocol):
170
177
  @classmethod
@@ -268,7 +268,7 @@ def _transform_typeddict(
268
268
  annotations = get_type_hints(expected_type, include_extras=True)
269
269
  for key, value in data.items():
270
270
  if not is_given(value):
271
- # we don't need to include `NotGiven` values here as they'll
271
+ # we don't need to include omitted values here as they'll
272
272
  # be stripped out before the request is sent anyway
273
273
  continue
274
274
 
@@ -434,7 +434,7 @@ async def _async_transform_typeddict(
434
434
  annotations = get_type_hints(expected_type, include_extras=True)
435
435
  for key, value in data.items():
436
436
  if not is_given(value):
437
- # we don't need to include `NotGiven` values here as they'll
437
+ # we don't need to include omitted values here as they'll
438
438
  # be stripped out before the request is sent anyway
439
439
  continue
440
440
 
@@ -21,7 +21,7 @@ from typing_extensions import TypeGuard
21
21
 
22
22
  import sniffio
23
23
 
24
- from .._types import NotGiven, FileTypes, NotGivenOr, HeadersLike
24
+ from .._types import Omit, NotGiven, FileTypes, HeadersLike
25
25
 
26
26
  _T = TypeVar("_T")
27
27
  _TupleT = TypeVar("_TupleT", bound=Tuple[object, ...])
@@ -63,7 +63,7 @@ def _extract_items(
63
63
  try:
64
64
  key = path[index]
65
65
  except IndexError:
66
- if isinstance(obj, NotGiven):
66
+ if not is_given(obj):
67
67
  # no value was provided - we can safely ignore
68
68
  return []
69
69
 
@@ -126,8 +126,8 @@ def _extract_items(
126
126
  return []
127
127
 
128
128
 
129
- def is_given(obj: NotGivenOr[_T]) -> TypeGuard[_T]:
130
- return not isinstance(obj, NotGiven)
129
+ def is_given(obj: _T | NotGiven | Omit) -> TypeGuard[_T]:
130
+ return not isinstance(obj, NotGiven) and not isinstance(obj, Omit)
131
131
 
132
132
 
133
133
  # Type safe methods for narrowing types with TypeVars.
channel3_sdk/_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__ = "channel3_sdk"
4
- __version__ = "2.2.0" # x-release-please-version
4
+ __version__ = "2.2.1" # x-release-please-version
@@ -7,7 +7,7 @@ from typing import Optional
7
7
  import httpx
8
8
 
9
9
  from ..types import brand_list_params
10
- from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
10
+ from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
11
11
  from .._utils import maybe_transform, async_maybe_transform
12
12
  from .._compat import cached_property
13
13
  from .._resource import SyncAPIResource, AsyncAPIResource
@@ -53,7 +53,7 @@ class BrandsResource(SyncAPIResource):
53
53
  extra_headers: Headers | None = None,
54
54
  extra_query: Query | None = None,
55
55
  extra_body: Body | None = None,
56
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
56
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
57
57
  ) -> Brand:
58
58
  """
59
59
  Get detailed information for a specific brand by its ID.
@@ -80,15 +80,15 @@ class BrandsResource(SyncAPIResource):
80
80
  def list(
81
81
  self,
82
82
  *,
83
- page: int | NotGiven = NOT_GIVEN,
84
- query: Optional[str] | NotGiven = NOT_GIVEN,
85
- size: int | NotGiven = NOT_GIVEN,
83
+ page: int | Omit = omit,
84
+ query: Optional[str] | Omit = omit,
85
+ size: int | Omit = omit,
86
86
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
87
87
  # The extra values given here take precedence over values defined on the client or passed to this method.
88
88
  extra_headers: Headers | None = None,
89
89
  extra_query: Query | None = None,
90
90
  extra_body: Body | None = None,
91
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
91
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
92
92
  ) -> BrandListResponse:
93
93
  """
94
94
  Get all brands that the vendor currently sells.
@@ -151,7 +151,7 @@ class AsyncBrandsResource(AsyncAPIResource):
151
151
  extra_headers: Headers | None = None,
152
152
  extra_query: Query | None = None,
153
153
  extra_body: Body | None = None,
154
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
154
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
155
155
  ) -> Brand:
156
156
  """
157
157
  Get detailed information for a specific brand by its ID.
@@ -178,15 +178,15 @@ class AsyncBrandsResource(AsyncAPIResource):
178
178
  async def list(
179
179
  self,
180
180
  *,
181
- page: int | NotGiven = NOT_GIVEN,
182
- query: Optional[str] | NotGiven = NOT_GIVEN,
183
- size: int | NotGiven = NOT_GIVEN,
181
+ page: int | Omit = omit,
182
+ query: Optional[str] | Omit = omit,
183
+ size: int | Omit = omit,
184
184
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
185
185
  # The extra values given here take precedence over values defined on the client or passed to this method.
186
186
  extra_headers: Headers | None = None,
187
187
  extra_query: Query | None = None,
188
188
  extra_body: Body | None = None,
189
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
189
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
190
190
  ) -> BrandListResponse:
191
191
  """
192
192
  Get all brands that the vendor currently sells.
@@ -5,7 +5,7 @@ from __future__ import annotations
5
5
  import httpx
6
6
 
7
7
  from ..types import enrich_enrich_url_params
8
- from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
8
+ from .._types import Body, Query, Headers, NotGiven, not_given
9
9
  from .._utils import maybe_transform, async_maybe_transform
10
10
  from .._compat import cached_property
11
11
  from .._resource import SyncAPIResource, AsyncAPIResource
@@ -50,7 +50,7 @@ class EnrichResource(SyncAPIResource):
50
50
  extra_headers: Headers | None = None,
51
51
  extra_query: Query | None = None,
52
52
  extra_body: Body | None = None,
53
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
53
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
54
54
  ) -> EnrichEnrichURLResponse:
55
55
  """
56
56
  Enrich a product URL with additional information.
@@ -105,7 +105,7 @@ class AsyncEnrichResource(AsyncAPIResource):
105
105
  extra_headers: Headers | None = None,
106
106
  extra_query: Query | None = None,
107
107
  extra_body: Body | None = None,
108
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
108
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
109
109
  ) -> EnrichEnrichURLResponse:
110
110
  """
111
111
  Enrich a product URL with additional information.
@@ -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 Body, Query, Headers, NotGiven, not_given
8
8
  from .._compat import cached_property
9
9
  from .._resource import SyncAPIResource, AsyncAPIResource
10
10
  from .._response import (
@@ -48,7 +48,7 @@ class ProductsResource(SyncAPIResource):
48
48
  extra_headers: Headers | None = None,
49
49
  extra_query: Query | None = None,
50
50
  extra_body: Body | None = None,
51
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
51
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
52
52
  ) -> ProductRetrieveResponse:
53
53
  """
54
54
  Get detailed information about a specific product by its ID.
@@ -102,7 +102,7 @@ class AsyncProductsResource(AsyncAPIResource):
102
102
  extra_headers: Headers | None = None,
103
103
  extra_query: Query | None = None,
104
104
  extra_body: Body | None = None,
105
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
105
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
106
106
  ) -> ProductRetrieveResponse:
107
107
  """
108
108
  Get detailed information about a specific product by its ID.
@@ -7,7 +7,7 @@ from typing import Optional
7
7
  import httpx
8
8
 
9
9
  from ..types import search_perform_params
10
- from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
10
+ from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
11
11
  from .._utils import maybe_transform, async_maybe_transform
12
12
  from .._compat import cached_property
13
13
  from .._resource import SyncAPIResource, AsyncAPIResource
@@ -46,19 +46,19 @@ class SearchResource(SyncAPIResource):
46
46
  def perform(
47
47
  self,
48
48
  *,
49
- base64_image: Optional[str] | NotGiven = NOT_GIVEN,
50
- config: search_perform_params.Config | NotGiven = NOT_GIVEN,
51
- context: Optional[str] | NotGiven = NOT_GIVEN,
52
- filters: search_perform_params.Filters | NotGiven = NOT_GIVEN,
53
- image_url: Optional[str] | NotGiven = NOT_GIVEN,
54
- limit: Optional[int] | NotGiven = NOT_GIVEN,
55
- query: Optional[str] | NotGiven = NOT_GIVEN,
49
+ base64_image: Optional[str] | Omit = omit,
50
+ config: search_perform_params.Config | Omit = omit,
51
+ context: Optional[str] | Omit = omit,
52
+ filters: search_perform_params.Filters | Omit = omit,
53
+ image_url: Optional[str] | Omit = omit,
54
+ limit: Optional[int] | Omit = omit,
55
+ query: Optional[str] | Omit = omit,
56
56
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
57
57
  # The extra values given here take precedence over values defined on the client or passed to this method.
58
58
  extra_headers: Headers | None = None,
59
59
  extra_query: Query | None = None,
60
60
  extra_body: Body | None = None,
61
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
61
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
62
62
  ) -> SearchPerformResponse:
63
63
  """
64
64
  Search for products.
@@ -130,19 +130,19 @@ class AsyncSearchResource(AsyncAPIResource):
130
130
  async def perform(
131
131
  self,
132
132
  *,
133
- base64_image: Optional[str] | NotGiven = NOT_GIVEN,
134
- config: search_perform_params.Config | NotGiven = NOT_GIVEN,
135
- context: Optional[str] | NotGiven = NOT_GIVEN,
136
- filters: search_perform_params.Filters | NotGiven = NOT_GIVEN,
137
- image_url: Optional[str] | NotGiven = NOT_GIVEN,
138
- limit: Optional[int] | NotGiven = NOT_GIVEN,
139
- query: Optional[str] | NotGiven = NOT_GIVEN,
133
+ base64_image: Optional[str] | Omit = omit,
134
+ config: search_perform_params.Config | Omit = omit,
135
+ context: Optional[str] | Omit = omit,
136
+ filters: search_perform_params.Filters | Omit = omit,
137
+ image_url: Optional[str] | Omit = omit,
138
+ limit: Optional[int] | Omit = omit,
139
+ query: Optional[str] | Omit = omit,
140
140
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
141
141
  # The extra values given here take precedence over values defined on the client or passed to this method.
142
142
  extra_headers: Headers | None = None,
143
143
  extra_query: Query | None = None,
144
144
  extra_body: Body | None = None,
145
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
145
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
146
146
  ) -> SearchPerformResponse:
147
147
  """
148
148
  Search for products.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: channel3_sdk
3
- Version: 2.2.0
3
+ Version: 2.2.1
4
4
  Summary: The official Python library for the channel3 API
5
5
  Project-URL: Homepage, https://github.com/channel3-ai/sdk-python
6
6
  Project-URL: Repository, https://github.com/channel3-ai/sdk-python
@@ -30,7 +30,7 @@ Requires-Dist: sniffio
30
30
  Requires-Dist: typing-extensions<5,>=4.10
31
31
  Provides-Extra: aiohttp
32
32
  Requires-Dist: aiohttp; extra == 'aiohttp'
33
- Requires-Dist: httpx-aiohttp>=0.1.8; extra == 'aiohttp'
33
+ Requires-Dist: httpx-aiohttp>=0.1.9; extra == 'aiohttp'
34
34
  Description-Content-Type: text/markdown
35
35
 
36
36
  # Channel3 Python API library
@@ -1,17 +1,17 @@
1
- channel3_sdk/__init__.py,sha256=nOTgOOKTvfpQQucIrY96K6qCUy_eWxaKomxguT8S1cU,2649
2
- channel3_sdk/_base_client.py,sha256=jAazpJA7xqOW0adz0t6NQqnCdA2car1Ltt-hHRWkJO4,67053
3
- channel3_sdk/_client.py,sha256=gxCXsZYFLhwm1fLnQI9kFdiRXJqnTKFbk7sVxZqUoaI,18693
1
+ channel3_sdk/__init__.py,sha256=xMt6zqI0MaCwW1vOvuxhpynXr3s4rJhgFx0HD_WlINM,2695
2
+ channel3_sdk/_base_client.py,sha256=nof4xhXvrewcHa-fzhdxoeynZlMcUqe_MwVhs3mdnu8,67053
3
+ channel3_sdk/_client.py,sha256=HPel5F_mRvQBBigdQO1aRPuxXhS1J4L682xLFQpN-SM,18678
4
4
  channel3_sdk/_compat.py,sha256=DQBVORjFb33zch24jzkhM14msvnzY7mmSmgDLaVFUM8,6562
5
5
  channel3_sdk/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
6
6
  channel3_sdk/_exceptions.py,sha256=84j5sMEvg1Y-Zm8O67uKc4VKDZyMyT7UNYql5WGxCQU,3224
7
7
  channel3_sdk/_files.py,sha256=KnEzGi_O756MvKyJ4fOCW_u3JhOeWPQ4RsmDvqihDQU,3545
8
- channel3_sdk/_models.py,sha256=c29x_mRccdxlGwdUPfSR5eJxGXe74Ea5Dje5igZTrKQ,30024
9
- channel3_sdk/_qs.py,sha256=AOkSz4rHtK4YI3ZU_kzea-zpwBUgEY8WniGmTPyEimc,4846
8
+ channel3_sdk/_models.py,sha256=lKnskYPONAWDvWo8tmbbVk7HmG7UOsI0Nve0vSMmkRc,30452
9
+ channel3_sdk/_qs.py,sha256=craIKyvPktJ94cvf9zn8j8ekG9dWJzhWv0ob34lIOv4,4828
10
10
  channel3_sdk/_resource.py,sha256=GoE4cbZQQeB-svaapj3Xu4BObqkjwbzcd4HbXcti-oc,1112
11
11
  channel3_sdk/_response.py,sha256=fQfICgXh4GiLeIvsMrIRiUo9WIML1AWVhk3D-qkJiVw,28846
12
12
  channel3_sdk/_streaming.py,sha256=q4zuYRWOVScdu0XFwgZle68N1jzSwFd8SbBE4js9hYg,10108
13
- channel3_sdk/_types.py,sha256=vyVmsT14j89c0NFuWlM9KCoRdE1QHrmAGPYZg0fNF3A,7302
14
- channel3_sdk/_version.py,sha256=OPYrAQJTJx2HOj_uFwaM-FVmDsSOGrIiHhguCFF6PaY,164
13
+ channel3_sdk/_types.py,sha256=KHmOPyD0PEi0zdZbUwJwBwPxiFttwJH4uaqh5isWqpU,7242
14
+ channel3_sdk/_version.py,sha256=USrlyrefncO6n8BIO7hpmkSU8nyvyNR2mSnkh5q75H0,164
15
15
  channel3_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  channel3_sdk/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
17
17
  channel3_sdk/_utils/_compat.py,sha256=D8gtAvjJQrDWt9upS0XaG9Rr5l1QhiAx_I_1utT_tt0,1195
@@ -22,15 +22,15 @@ channel3_sdk/_utils/_reflection.py,sha256=ZmGkIgT_PuwedyNBrrKGbxoWtkpytJNU1uU4QH
22
22
  channel3_sdk/_utils/_resources_proxy.py,sha256=hde_OK_LaNEKEt9ICZ_6kULagtvOt2xb_ma_9_BlxHM,619
23
23
  channel3_sdk/_utils/_streams.py,sha256=SMC90diFFecpEg_zgDRVbdR3hSEIgVVij4taD-noMLM,289
24
24
  channel3_sdk/_utils/_sync.py,sha256=TpGLrrhRNWTJtODNE6Fup3_k7zrWm1j2RlirzBwre-0,2862
25
- channel3_sdk/_utils/_transform.py,sha256=i_U4R82RtQJtKKCriwFqmfcWjtwmmsiiF1AEXKQ_OPo,15957
25
+ channel3_sdk/_utils/_transform.py,sha256=NjCzmnfqYrsAikUHQig6N9QfuTVbKipuP3ur9mcNF-E,15951
26
26
  channel3_sdk/_utils/_typing.py,sha256=N_5PPuFNsaygbtA_npZd98SVN1LQQvFTKL6bkWPBZGU,4786
27
- channel3_sdk/_utils/_utils.py,sha256=D2QE7mVPNEJzaB50u8rvDQAUDS5jx7JoeFD7zdj-TeI,12231
27
+ channel3_sdk/_utils/_utils.py,sha256=0dDqauUbVZEXV0NVl7Bwu904Wwo5eyFCZpQThhFNhyA,12253
28
28
  channel3_sdk/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
29
29
  channel3_sdk/resources/__init__.py,sha256=ihYygd79ZVtP7-YyK8aHKXSl-30t2TSDmjMydrK3kug,1928
30
- channel3_sdk/resources/brands.py,sha256=-V8NXfTZdiBlfTfrkr2PzjunaTZCA8fRgvDYUqshyw4,9572
31
- channel3_sdk/resources/enrich.py,sha256=NDdwjECxd2IFTxn3gby6bL3XjK25j900Jw3I4CBEHac,6057
32
- channel3_sdk/resources/products.py,sha256=zsvCo50reb5xi8bwJBmgNGYYXcphfyyayFS_IhQm4_0,6031
33
- channel3_sdk/resources/search.py,sha256=o4BK5qAdosEZqJSAeoJAY7nwwC_pfHTadwfghrIVZRo,8002
30
+ channel3_sdk/resources/brands.py,sha256=kiwvKrJMKHO7oLZ-060L9nNm5OxtvsAh_proQx7amoc,9530
31
+ channel3_sdk/resources/enrich.py,sha256=h1MactdD5DUP0UvEBK7cUF7MUW4jE3W-zLOAzrsyTY8,6057
32
+ channel3_sdk/resources/products.py,sha256=mGFml_kHZ-X_VVfNZHDO9QyZ2ElS1Jk98L6ERokEZqM,6031
33
+ channel3_sdk/resources/search.py,sha256=W74yHSu4TVirEEUx1d-sCL3OK1cUidtoM2MUyERu1qw,7888
34
34
  channel3_sdk/types/__init__.py,sha256=8htzye-XSKQuJAF2zBIPx6nnreh7XbHMcerLnn2Junc,871
35
35
  channel3_sdk/types/availability_status.py,sha256=ZeikDshnsbvDpeqk9zR-DodD0gL_lLKBsjkrSEGmv2A,328
36
36
  channel3_sdk/types/brand.py,sha256=bo0dQfqd8pwzucwAZaW6S1RfRhMipabpQJQTXxJ4q_I,297
@@ -43,7 +43,7 @@ channel3_sdk/types/product_retrieve_response.py,sha256=BJn6JCHfKDnVSbq02ddToT5gT
43
43
  channel3_sdk/types/search_perform_params.py,sha256=WdAOyOCweXMs2hH-q3ts6fw9VNq7cTSq1q-wrWAPuyE,1594
44
44
  channel3_sdk/types/search_perform_response.py,sha256=Px4_wJB9YUUxLoXZzWPpMOjh62No7lWzcenll1K-NnE,721
45
45
  channel3_sdk/types/variant.py,sha256=QcmXSluhHFVXT0QMhITG4iZvS-hl1ngoIev1nswUINc,226
46
- channel3_sdk-2.2.0.dist-info/METADATA,sha256=hcbRXPApPOCjh_oJ5cKb2BoWpG1pWcYh6FWgEXhTKJo,13637
47
- channel3_sdk-2.2.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
48
- channel3_sdk-2.2.0.dist-info/licenses/LICENSE,sha256=pSFglIc4-SNY4qmMqUbuM9ZbSEb8pp67mDMyRI2dN2I,11338
49
- channel3_sdk-2.2.0.dist-info/RECORD,,
46
+ channel3_sdk-2.2.1.dist-info/METADATA,sha256=qurwM_YEIoi6eYkyrP7zmtTjLCW1F9g_tWd5kNM8984,13637
47
+ channel3_sdk-2.2.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
48
+ channel3_sdk-2.2.1.dist-info/licenses/LICENSE,sha256=pSFglIc4-SNY4qmMqUbuM9ZbSEb8pp67mDMyRI2dN2I,11338
49
+ channel3_sdk-2.2.1.dist-info/RECORD,,