deeporigin-data-sdk 0.1.0a47__py3-none-any.whl → 0.1.0a48__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.
@@ -9,7 +9,6 @@ import asyncio
9
9
  import inspect
10
10
  import logging
11
11
  import platform
12
- import warnings
13
12
  import email.utils
14
13
  from types import TracebackType
15
14
  from random import random
@@ -36,7 +35,7 @@ import anyio
36
35
  import httpx
37
36
  import distro
38
37
  import pydantic
39
- from httpx import URL, Limits
38
+ from httpx import URL
40
39
  from pydantic import PrivateAttr
41
40
 
42
41
  from . import _exceptions
@@ -51,19 +50,16 @@ from ._types import (
51
50
  Timeout,
52
51
  NotGiven,
53
52
  ResponseT,
54
- Transport,
55
53
  AnyMapping,
56
54
  PostParser,
57
- ProxiesTypes,
58
55
  RequestFiles,
59
56
  HttpxSendArgs,
60
- AsyncTransport,
61
57
  RequestOptions,
62
58
  HttpxRequestFiles,
63
59
  ModelBuilderProtocol,
64
60
  )
65
61
  from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping
66
- from ._compat import model_copy, model_dump
62
+ from ._compat import PYDANTIC_V2, model_copy, model_dump
67
63
  from ._models import GenericModel, FinalRequestOptions, validate_type, construct_type
68
64
  from ._response import (
69
65
  APIResponse,
@@ -207,6 +203,9 @@ class BaseSyncPage(BasePage[_T], Generic[_T]):
207
203
  model: Type[_T],
208
204
  options: FinalRequestOptions,
209
205
  ) -> None:
206
+ if PYDANTIC_V2 and getattr(self, "__pydantic_private__", None) is None:
207
+ self.__pydantic_private__ = {}
208
+
210
209
  self._model = model
211
210
  self._client = client
212
211
  self._options = options
@@ -292,6 +291,9 @@ class BaseAsyncPage(BasePage[_T], Generic[_T]):
292
291
  client: AsyncAPIClient,
293
292
  options: FinalRequestOptions,
294
293
  ) -> None:
294
+ if PYDANTIC_V2 and getattr(self, "__pydantic_private__", None) is None:
295
+ self.__pydantic_private__ = {}
296
+
295
297
  self._model = model
296
298
  self._client = client
297
299
  self._options = options
@@ -331,9 +333,6 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
331
333
  _base_url: URL
332
334
  max_retries: int
333
335
  timeout: Union[float, Timeout, None]
334
- _limits: httpx.Limits
335
- _proxies: ProxiesTypes | None
336
- _transport: Transport | AsyncTransport | None
337
336
  _strict_response_validation: bool
338
337
  _idempotency_header: str | None
339
338
  _default_stream_cls: type[_DefaultStreamT] | None = None
@@ -346,9 +345,6 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
346
345
  _strict_response_validation: bool,
347
346
  max_retries: int = DEFAULT_MAX_RETRIES,
348
347
  timeout: float | Timeout | None = DEFAULT_TIMEOUT,
349
- limits: httpx.Limits,
350
- transport: Transport | AsyncTransport | None,
351
- proxies: ProxiesTypes | None,
352
348
  custom_headers: Mapping[str, str] | None = None,
353
349
  custom_query: Mapping[str, object] | None = None,
354
350
  ) -> None:
@@ -356,9 +352,6 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
356
352
  self._base_url = self._enforce_trailing_slash(URL(base_url))
357
353
  self.max_retries = max_retries
358
354
  self.timeout = timeout
359
- self._limits = limits
360
- self._proxies = proxies
361
- self._transport = transport
362
355
  self._custom_headers = custom_headers or {}
363
356
  self._custom_query = custom_query or {}
364
357
  self._strict_response_validation = _strict_response_validation
@@ -418,10 +411,17 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
418
411
  if idempotency_header and options.method.lower() != "get" and idempotency_header not in headers:
419
412
  headers[idempotency_header] = options.idempotency_key or self._idempotency_key()
420
413
 
421
- # Don't set the retry count header if it was already set or removed by the caller. We check
414
+ # Don't set these headers if they were already set or removed by the caller. We check
422
415
  # `custom_headers`, which can contain `Omit()`, instead of `headers` to account for the removal case.
423
- if "x-stainless-retry-count" not in (header.lower() for header in custom_headers):
416
+ lower_custom_headers = [header.lower() for header in custom_headers]
417
+ if "x-stainless-retry-count" not in lower_custom_headers:
424
418
  headers["x-stainless-retry-count"] = str(retries_taken)
419
+ if "x-stainless-read-timeout" not in lower_custom_headers:
420
+ timeout = self.timeout if isinstance(options.timeout, NotGiven) else options.timeout
421
+ if isinstance(timeout, Timeout):
422
+ timeout = timeout.read
423
+ if timeout is not None:
424
+ headers["x-stainless-read-timeout"] = str(timeout)
425
425
 
426
426
  return headers
427
427
 
@@ -511,7 +511,7 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
511
511
  # so that passing a `TypedDict` doesn't cause an error.
512
512
  # https://github.com/microsoft/pyright/issues/3526#event-6715453066
513
513
  params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None,
514
- json=json_data,
514
+ json=json_data if is_given(json_data) else None,
515
515
  files=files,
516
516
  **kwargs,
517
517
  )
@@ -787,46 +787,11 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
787
787
  base_url: str | URL,
788
788
  max_retries: int = DEFAULT_MAX_RETRIES,
789
789
  timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
790
- transport: Transport | None = None,
791
- proxies: ProxiesTypes | None = None,
792
- limits: Limits | None = None,
793
790
  http_client: httpx.Client | None = None,
794
791
  custom_headers: Mapping[str, str] | None = None,
795
792
  custom_query: Mapping[str, object] | None = None,
796
793
  _strict_response_validation: bool,
797
794
  ) -> None:
798
- kwargs: dict[str, Any] = {}
799
- if limits is not None:
800
- warnings.warn(
801
- "The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead",
802
- category=DeprecationWarning,
803
- stacklevel=3,
804
- )
805
- if http_client is not None:
806
- raise ValueError("The `http_client` argument is mutually exclusive with `connection_pool_limits`")
807
- else:
808
- limits = DEFAULT_CONNECTION_LIMITS
809
-
810
- if transport is not None:
811
- kwargs["transport"] = transport
812
- warnings.warn(
813
- "The `transport` argument is deprecated. The `http_client` argument should be passed instead",
814
- category=DeprecationWarning,
815
- stacklevel=3,
816
- )
817
- if http_client is not None:
818
- raise ValueError("The `http_client` argument is mutually exclusive with `transport`")
819
-
820
- if proxies is not None:
821
- kwargs["proxies"] = proxies
822
- warnings.warn(
823
- "The `proxies` argument is deprecated. The `http_client` argument should be passed instead",
824
- category=DeprecationWarning,
825
- stacklevel=3,
826
- )
827
- if http_client is not None:
828
- raise ValueError("The `http_client` argument is mutually exclusive with `proxies`")
829
-
830
795
  if not is_given(timeout):
831
796
  # if the user passed in a custom http client with a non-default
832
797
  # timeout set then we use that timeout.
@@ -847,12 +812,9 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
847
812
 
848
813
  super().__init__(
849
814
  version=version,
850
- limits=limits,
851
815
  # cast to a valid type because mypy doesn't understand our type narrowing
852
816
  timeout=cast(Timeout, timeout),
853
- proxies=proxies,
854
817
  base_url=base_url,
855
- transport=transport,
856
818
  max_retries=max_retries,
857
819
  custom_query=custom_query,
858
820
  custom_headers=custom_headers,
@@ -862,9 +824,6 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
862
824
  base_url=base_url,
863
825
  # cast to a valid type because mypy doesn't understand our type narrowing
864
826
  timeout=cast(Timeout, timeout),
865
- limits=limits,
866
- follow_redirects=True,
867
- **kwargs, # type: ignore
868
827
  )
869
828
 
870
829
  def is_closed(self) -> bool:
@@ -1359,45 +1318,10 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
1359
1318
  _strict_response_validation: bool,
1360
1319
  max_retries: int = DEFAULT_MAX_RETRIES,
1361
1320
  timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
1362
- transport: AsyncTransport | None = None,
1363
- proxies: ProxiesTypes | None = None,
1364
- limits: Limits | None = None,
1365
1321
  http_client: httpx.AsyncClient | None = None,
1366
1322
  custom_headers: Mapping[str, str] | None = None,
1367
1323
  custom_query: Mapping[str, object] | None = None,
1368
1324
  ) -> None:
1369
- kwargs: dict[str, Any] = {}
1370
- if limits is not None:
1371
- warnings.warn(
1372
- "The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead",
1373
- category=DeprecationWarning,
1374
- stacklevel=3,
1375
- )
1376
- if http_client is not None:
1377
- raise ValueError("The `http_client` argument is mutually exclusive with `connection_pool_limits`")
1378
- else:
1379
- limits = DEFAULT_CONNECTION_LIMITS
1380
-
1381
- if transport is not None:
1382
- kwargs["transport"] = transport
1383
- warnings.warn(
1384
- "The `transport` argument is deprecated. The `http_client` argument should be passed instead",
1385
- category=DeprecationWarning,
1386
- stacklevel=3,
1387
- )
1388
- if http_client is not None:
1389
- raise ValueError("The `http_client` argument is mutually exclusive with `transport`")
1390
-
1391
- if proxies is not None:
1392
- kwargs["proxies"] = proxies
1393
- warnings.warn(
1394
- "The `proxies` argument is deprecated. The `http_client` argument should be passed instead",
1395
- category=DeprecationWarning,
1396
- stacklevel=3,
1397
- )
1398
- if http_client is not None:
1399
- raise ValueError("The `http_client` argument is mutually exclusive with `proxies`")
1400
-
1401
1325
  if not is_given(timeout):
1402
1326
  # if the user passed in a custom http client with a non-default
1403
1327
  # timeout set then we use that timeout.
@@ -1419,11 +1343,8 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
1419
1343
  super().__init__(
1420
1344
  version=version,
1421
1345
  base_url=base_url,
1422
- limits=limits,
1423
1346
  # cast to a valid type because mypy doesn't understand our type narrowing
1424
1347
  timeout=cast(Timeout, timeout),
1425
- proxies=proxies,
1426
- transport=transport,
1427
1348
  max_retries=max_retries,
1428
1349
  custom_query=custom_query,
1429
1350
  custom_headers=custom_headers,
@@ -1433,9 +1354,6 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
1433
1354
  base_url=base_url,
1434
1355
  # cast to a valid type because mypy doesn't understand our type narrowing
1435
1356
  timeout=cast(Timeout, timeout),
1436
- limits=limits,
1437
- follow_redirects=True,
1438
- **kwargs, # type: ignore
1439
1357
  )
1440
1358
 
1441
1359
  def is_closed(self) -> bool:
@@ -180,7 +180,7 @@ class DeeporiginData(SyncAPIClient):
180
180
  # part of our public interface in the future.
181
181
  _strict_response_validation: bool = False,
182
182
  ) -> None:
183
- """Construct a new synchronous deeporigin_data client instance.
183
+ """Construct a new synchronous DeeporiginData client instance.
184
184
 
185
185
  This automatically infers the following arguments from their corresponding environment variables if they are not provided:
186
186
  - `token` from `ORG_BEARER_TOKEN`
@@ -369,7 +369,7 @@ class DeeporiginData(SyncAPIClient):
369
369
  def chat_create_thread(
370
370
  self,
371
371
  *,
372
- body: object,
372
+ body: object | NotGiven = NOT_GIVEN,
373
373
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
374
374
  # The extra values given here take precedence over values defined on the client or passed to this method.
375
375
  extra_headers: Headers | None = None,
@@ -2000,7 +2000,7 @@ class AsyncDeeporiginData(AsyncAPIClient):
2000
2000
  # part of our public interface in the future.
2001
2001
  _strict_response_validation: bool = False,
2002
2002
  ) -> None:
2003
- """Construct a new async deeporigin_data client instance.
2003
+ """Construct a new async AsyncDeeporiginData client instance.
2004
2004
 
2005
2005
  This automatically infers the following arguments from their corresponding environment variables if they are not provided:
2006
2006
  - `token` from `ORG_BEARER_TOKEN`
@@ -2191,7 +2191,7 @@ class AsyncDeeporiginData(AsyncAPIClient):
2191
2191
  async def chat_create_thread(
2192
2192
  self,
2193
2193
  *,
2194
- body: object,
2194
+ body: object | NotGiven = NOT_GIVEN,
2195
2195
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
2196
2196
  # The extra values given here take precedence over values defined on the client or passed to this method.
2197
2197
  extra_headers: Headers | None = None,
@@ -6,7 +6,7 @@ RAW_RESPONSE_HEADER = "X-Stainless-Raw-Response"
6
6
  OVERRIDE_CAST_TO_HEADER = "____stainless_override_cast_to"
7
7
 
8
8
  # default timeout is 1 minute
9
- DEFAULT_TIMEOUT = httpx.Timeout(timeout=60.0, connect=5.0)
9
+ DEFAULT_TIMEOUT = httpx.Timeout(timeout=60, connect=5.0)
10
10
  DEFAULT_MAX_RETRIES = 2
11
11
  DEFAULT_CONNECTION_LIMITS = httpx.Limits(max_connections=100, max_keepalive_connections=20)
12
12
 
@@ -172,7 +172,7 @@ class BaseModel(pydantic.BaseModel):
172
172
  @override
173
173
  def __str__(self) -> str:
174
174
  # mypy complains about an invalid self arg
175
- return f'{self.__repr_name__()}({self.__repr_str__(", ")})' # type: ignore[misc]
175
+ return f"{self.__repr_name__()}({self.__repr_str__(', ')})" # type: ignore[misc]
176
176
 
177
177
  # Override the 'construct' method in a way that supports recursive parsing without validation.
178
178
  # Based on https://github.com/samuelcolvin/pydantic/issues/1168#issuecomment-817742836.
@@ -426,10 +426,16 @@ def construct_type(*, value: object, type_: object) -> object:
426
426
 
427
427
  If the given value does not match the expected type then it is returned as-is.
428
428
  """
429
+
430
+ # store a reference to the original type we were given before we extract any inner
431
+ # types so that we can properly resolve forward references in `TypeAliasType` annotations
432
+ original_type = None
433
+
429
434
  # we allow `object` as the input type because otherwise, passing things like
430
435
  # `Literal['value']` will be reported as a type error by type checkers
431
436
  type_ = cast("type[object]", type_)
432
437
  if is_type_alias_type(type_):
438
+ original_type = type_ # type: ignore[unreachable]
433
439
  type_ = type_.__value__ # type: ignore[unreachable]
434
440
 
435
441
  # unwrap `Annotated[T, ...]` -> `T`
@@ -446,7 +452,7 @@ def construct_type(*, value: object, type_: object) -> object:
446
452
 
447
453
  if is_union(origin):
448
454
  try:
449
- return validate_type(type_=cast("type[object]", type_), value=value)
455
+ return validate_type(type_=cast("type[object]", original_type or type_), value=value)
450
456
  except Exception:
451
457
  pass
452
458
 
@@ -136,6 +136,8 @@ class BaseAPIResponse(Generic[R]):
136
136
  if cast_to and is_annotated_type(cast_to):
137
137
  cast_to = extract_type_arg(cast_to, 0)
138
138
 
139
+ origin = get_origin(cast_to) or cast_to
140
+
139
141
  if self._is_sse_stream:
140
142
  if to:
141
143
  if not is_stream_class_type(to):
@@ -195,8 +197,6 @@ class BaseAPIResponse(Generic[R]):
195
197
  if cast_to == bool:
196
198
  return cast(R, response.text.lower() == "true")
197
199
 
198
- origin = get_origin(cast_to) or cast_to
199
-
200
200
  if origin == APIResponse:
201
201
  raise RuntimeError("Unexpected state - cast_to is `APIResponse`")
202
202
 
@@ -7,16 +7,20 @@ import contextvars
7
7
  from typing import Any, TypeVar, Callable, Awaitable
8
8
  from typing_extensions import ParamSpec
9
9
 
10
+ import anyio
11
+ import sniffio
12
+ import anyio.to_thread
13
+
10
14
  T_Retval = TypeVar("T_Retval")
11
15
  T_ParamSpec = ParamSpec("T_ParamSpec")
12
16
 
13
17
 
14
18
  if sys.version_info >= (3, 9):
15
- to_thread = asyncio.to_thread
19
+ _asyncio_to_thread = asyncio.to_thread
16
20
  else:
17
21
  # backport of https://docs.python.org/3/library/asyncio-task.html#asyncio.to_thread
18
22
  # for Python 3.8 support
19
- async def to_thread(
23
+ async def _asyncio_to_thread(
20
24
  func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs
21
25
  ) -> Any:
22
26
  """Asynchronously run function *func* in a separate thread.
@@ -34,6 +38,17 @@ else:
34
38
  return await loop.run_in_executor(None, func_call)
35
39
 
36
40
 
41
+ async def to_thread(
42
+ func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs
43
+ ) -> T_Retval:
44
+ if sniffio.current_async_library() == "asyncio":
45
+ return await _asyncio_to_thread(func, *args, **kwargs)
46
+
47
+ return await anyio.to_thread.run_sync(
48
+ functools.partial(func, *args, **kwargs),
49
+ )
50
+
51
+
37
52
  # inspired by `asyncer`, https://github.com/tiangolo/asyncer
38
53
  def asyncify(function: Callable[T_ParamSpec, T_Retval]) -> Callable[T_ParamSpec, Awaitable[T_Retval]]:
39
54
  """
@@ -25,7 +25,7 @@ from ._typing import (
25
25
  is_annotated_type,
26
26
  strip_annotated_type,
27
27
  )
28
- from .._compat import model_dump, is_typeddict
28
+ from .._compat import get_origin, model_dump, is_typeddict
29
29
 
30
30
  _T = TypeVar("_T")
31
31
 
@@ -164,9 +164,14 @@ def _transform_recursive(
164
164
  inner_type = annotation
165
165
 
166
166
  stripped_type = strip_annotated_type(inner_type)
167
+ origin = get_origin(stripped_type) or stripped_type
167
168
  if is_typeddict(stripped_type) and is_mapping(data):
168
169
  return _transform_typeddict(data, stripped_type)
169
170
 
171
+ if origin == dict and is_mapping(data):
172
+ items_type = get_args(stripped_type)[1]
173
+ return {key: _transform_recursive(value, annotation=items_type) for key, value in data.items()}
174
+
170
175
  if (
171
176
  # List[T]
172
177
  (is_list_type(stripped_type) and is_list(data))
@@ -307,9 +312,14 @@ async def _async_transform_recursive(
307
312
  inner_type = annotation
308
313
 
309
314
  stripped_type = strip_annotated_type(inner_type)
315
+ origin = get_origin(stripped_type) or stripped_type
310
316
  if is_typeddict(stripped_type) and is_mapping(data):
311
317
  return await _async_transform_typeddict(data, stripped_type)
312
318
 
319
+ if origin == dict and is_mapping(data):
320
+ items_type = get_args(stripped_type)[1]
321
+ return {key: _transform_recursive(value, annotation=items_type) for key, value in data.items()}
322
+
313
323
  if (
314
324
  # List[T]
315
325
  (is_list_type(stripped_type) and is_list(data))
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "deeporigin_data"
4
- __version__ = "0.1.0-alpha.47" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.48" # x-release-please-version
@@ -2,10 +2,10 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing_extensions import Required, TypedDict
5
+ from typing_extensions import TypedDict
6
6
 
7
7
  __all__ = ["ClientChatCreateThreadParams"]
8
8
 
9
9
 
10
10
  class ClientChatCreateThreadParams(TypedDict, total=False):
11
- body: Required[object]
11
+ body: object
@@ -1,6 +1,6 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- from typing import List, Optional
3
+ from typing import List, Union, Optional
4
4
  from typing_extensions import Literal
5
5
 
6
6
  from .._models import BaseModel
@@ -17,7 +17,7 @@ class DataAnnotation(BaseModel):
17
17
 
18
18
  color: Optional[str] = None
19
19
 
20
- direction: Optional[Literal[1, 0, -1]] = None
20
+ direction: Union[Literal[1, -1], float, None] = None
21
21
 
22
22
  type: Optional[str] = None
23
23
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import List, Union
6
- from typing_extensions import Literal, TypeAlias
5
+ from typing import TYPE_CHECKING, List, Union
6
+ from typing_extensions import Literal, TypeAlias, TypeAliasType
7
7
 
8
8
  from pydantic import Field as FieldInfo
9
9
 
@@ -78,15 +78,29 @@ class RowFilterSubstructure(BaseModel):
78
78
  """A SMARTS or SMILES string to match against."""
79
79
 
80
80
 
81
- Condition: TypeAlias = Union[
82
- RowFilterText,
83
- RowFilterNumber,
84
- RowFilterBoolean,
85
- RowFilterNullity,
86
- RowFilterSet,
87
- RowFilterSubstructure,
88
- "RowFilterJoin",
89
- ]
81
+ if TYPE_CHECKING or PYDANTIC_V2:
82
+ Condition = TypeAliasType(
83
+ "Condition",
84
+ Union[
85
+ RowFilterText,
86
+ RowFilterNumber,
87
+ RowFilterBoolean,
88
+ RowFilterNullity,
89
+ RowFilterSet,
90
+ RowFilterSubstructure,
91
+ "RowFilterJoin",
92
+ ],
93
+ )
94
+ else:
95
+ Condition: TypeAlias = Union[
96
+ RowFilterText,
97
+ RowFilterNumber,
98
+ RowFilterBoolean,
99
+ RowFilterNullity,
100
+ RowFilterSet,
101
+ RowFilterSubstructure,
102
+ "RowFilterJoin",
103
+ ]
90
104
 
91
105
  from .row_filter_join import RowFilterJoin
92
106
 
@@ -2,10 +2,11 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Union, Iterable
6
- from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
5
+ from typing import TYPE_CHECKING, Union, Iterable
6
+ from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict, TypeAliasType
7
7
 
8
8
  from ..._utils import PropertyInfo
9
+ from ..._compat import PYDANTIC_V2
9
10
 
10
11
  __all__ = [
11
12
  "Condition",
@@ -77,14 +78,28 @@ class RowFilterSubstructure(TypedDict, total=False):
77
78
  """A SMARTS or SMILES string to match against."""
78
79
 
79
80
 
80
- Condition: TypeAlias = Union[
81
- RowFilterText,
82
- RowFilterNumber,
83
- RowFilterBoolean,
84
- RowFilterNullity,
85
- RowFilterSet,
86
- RowFilterSubstructure,
87
- "RowFilterJoin",
88
- ]
81
+ if TYPE_CHECKING or PYDANTIC_V2:
82
+ Condition = TypeAliasType(
83
+ "Condition",
84
+ Union[
85
+ RowFilterText,
86
+ RowFilterNumber,
87
+ RowFilterBoolean,
88
+ RowFilterNullity,
89
+ RowFilterSet,
90
+ RowFilterSubstructure,
91
+ "RowFilterJoin",
92
+ ],
93
+ )
94
+ else:
95
+ Condition: TypeAlias = Union[
96
+ RowFilterText,
97
+ RowFilterNumber,
98
+ RowFilterBoolean,
99
+ RowFilterNullity,
100
+ RowFilterSet,
101
+ RowFilterSubstructure,
102
+ "RowFilterJoin",
103
+ ]
89
104
 
90
105
  from .row_filter_join import RowFilterJoin
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deeporigin_data_sdk
3
- Version: 0.1.0a47
3
+ Version: 0.1.0a48
4
4
  Summary: The official Python library for the deeporigin_data API
5
5
  Project-URL: Homepage, https://github.com/deeporiginbio/deeporigin-data-sdk
6
6
  Project-URL: Repository, https://github.com/deeporiginbio/deeporigin-data-sdk
@@ -38,7 +38,7 @@ The Deeporigin Data Python library provides convenient access to the Deeporigin
38
38
  application. The library includes type definitions for all request params and response fields,
39
39
  and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
40
40
 
41
- It is generated with [Stainless](https://www.stainlessapi.com/).
41
+ It is generated with [Stainless](https://www.stainless.com/).
42
42
 
43
43
  ## Documentation
44
44
 
@@ -1,25 +1,25 @@
1
1
  deeporigin_data/__init__.py,sha256=g5vq9kCCiWBl8XgJzXdUB9AIdRypOEj9pQH8WJJEVxo,2533
2
- deeporigin_data/_base_client.py,sha256=7yBjKRioXOZhI__7FFCD4TFC4DSW59MEeJv8HrAPWHQ,68139
3
- deeporigin_data/_client.py,sha256=X-hJo3fWpJjWLNMrGzZnwpmARwse3NwcdO0ztp1UYEw,170855
2
+ deeporigin_data/_base_client.py,sha256=9XNRZYclcos9up2MQzm3imYOa_BBhMpQORCmEdB-YZg,64966
3
+ deeporigin_data/_client.py,sha256=i5YiMEgcN5kXZ6ChXAVafaPTju7BNwaBT2DK6dvaa-k,170904
4
4
  deeporigin_data/_compat.py,sha256=VWemUKbj6DDkQ-O4baSpHVLJafotzeXmCQGJugfVTIw,6580
5
- deeporigin_data/_constants.py,sha256=JE8kyZa2Q4NK_i4fO--8siEYTzeHnT0fYbOFDgDP4uk,464
5
+ deeporigin_data/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
6
6
  deeporigin_data/_exceptions.py,sha256=_25MmrwuBf1sxAJESpY5sPn1o5E-aUymr6wDuRSWIng,3236
7
7
  deeporigin_data/_files.py,sha256=mf4dOgL4b0ryyZlbqLhggD3GVgDf6XxdGFAgce01ugE,3549
8
- deeporigin_data/_models.py,sha256=B6f-C-F-PbDp3jRKCLksaAS9osC2g1xs7DpoZV1dlUE,28659
8
+ deeporigin_data/_models.py,sha256=PDLSNsn3Umxm3UMZPgyBiyN308rRzzPX6F9NO9FU2vs,28943
9
9
  deeporigin_data/_qs.py,sha256=AOkSz4rHtK4YI3ZU_kzea-zpwBUgEY8WniGmTPyEimc,4846
10
10
  deeporigin_data/_resource.py,sha256=tkm4gF9YRotE93j48jTDBSGs8wyVa0E5NS9fj19e38c,1148
11
- deeporigin_data/_response.py,sha256=2YDTjeNt93_FXFP8934KDSu28lsXNCgtOv8sSSXQHZ4,28871
11
+ deeporigin_data/_response.py,sha256=aA9Ff3JrsFz4-PRMh4eMTY-t_IiFXI9_uWDP4CcmRps,28871
12
12
  deeporigin_data/_streaming.py,sha256=yG857cOSJD3gbc7mEc2wqfvcPVLMGmYX4hBOqqIT5RE,10132
13
13
  deeporigin_data/_types.py,sha256=HI5vtFJGLEsyOrrWJRSRtUeOSrd8EdoM020wC51GvcI,6152
14
- deeporigin_data/_version.py,sha256=Ji8MEnMJIH5z2e-HbXcKICdeI9An8mxWWr_C0nGFIcU,176
14
+ deeporigin_data/_version.py,sha256=vFAl01a1LDue9WfgSYxBB5l1o6uTm2Rlj-_t-AwW7Kc,176
15
15
  deeporigin_data/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  deeporigin_data/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
17
17
  deeporigin_data/_utils/_logs.py,sha256=R7dnUaDs2cdYbq1Ee16dHy863wdcTZRRzubw9KE0qNc,801
18
18
  deeporigin_data/_utils/_proxy.py,sha256=z3zsateHtb0EARTWKk8QZNHfPkqJbqwd1lM993LBwGE,1902
19
19
  deeporigin_data/_utils/_reflection.py,sha256=ZmGkIgT_PuwedyNBrrKGbxoWtkpytJNU1uU4QHnmEMU,1364
20
20
  deeporigin_data/_utils/_streams.py,sha256=SMC90diFFecpEg_zgDRVbdR3hSEIgVVij4taD-noMLM,289
21
- deeporigin_data/_utils/_sync.py,sha256=jJl-iCEaZZUAkq4IUtzN1-aMsKTUFaNoNbeYnnpQjIQ,2438
22
- deeporigin_data/_utils/_transform.py,sha256=Dkkyr7OveGmOolepcvXmVJWE3kqim4b0nM0h7yWbgeY,13468
21
+ deeporigin_data/_utils/_sync.py,sha256=TpGLrrhRNWTJtODNE6Fup3_k7zrWm1j2RlirzBwre-0,2862
22
+ deeporigin_data/_utils/_transform.py,sha256=tsSFOIZ7iczaUsMSGBD_iSFOOdUyT2xtkcq1xyF0L9o,13986
23
23
  deeporigin_data/_utils/_typing.py,sha256=nTJz0jcrQbEgxwy4TtAkNxuU0QHHlmc6mQtA6vIR8tg,4501
24
24
  deeporigin_data/_utils/_utils.py,sha256=8UmbPOy_AAr2uUjjFui-VZSrVBHRj6bfNEKRp5YZP2A,12004
25
25
  deeporigin_data/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
@@ -30,7 +30,7 @@ deeporigin_data/types/chat_create_thread_response.py,sha256=AZrFyvH7uj-VptxC4DLq
30
30
  deeporigin_data/types/chat_list_messages_response.py,sha256=weE0jVbPTGI-_A72HW2J4hHoG7V8t3ZVTRvpwsmyLJI,1774
31
31
  deeporigin_data/types/client_add_database_column_params.py,sha256=E_WeByZ0Ba3lERxHEiegZW8_pT2dFcsjFZu84fAFybw,12427
32
32
  deeporigin_data/types/client_archive_files_params.py,sha256=yQVFRbehaBYuSiILvVZIM0W0KQg2NMdxeboYZt8qorI,417
33
- deeporigin_data/types/client_chat_create_thread_params.py,sha256=wIbMeDq0ge6_mei-tLrcO-Y2AzhiBCu7U4UHWRBMDDw,306
33
+ deeporigin_data/types/client_chat_create_thread_params.py,sha256=xRKg_sQIk8VFrjkZkTqoaYyaS1ah98a61LopzwIfpLU,286
34
34
  deeporigin_data/types/client_chat_list_messages_params.py,sha256=cvVdz0bROwXecIiAYrQA57O98AfKRl0Q8C--yWaQO9c,397
35
35
  deeporigin_data/types/client_chat_send_message_params.py,sha256=sVo4Q_viwBYF_1ve8N8bgsB-tNFL5fAkyaLSbyE8Ex0,1732
36
36
  deeporigin_data/types/client_configure_column_select_options_params.py,sha256=q5NpD-5KPXj9dt7V2yNTWwXGPEXylbA9xIhTlLsG7uo,802
@@ -99,7 +99,7 @@ deeporigin_data/types/list_mentions_response.py,sha256=hAlMq4lpghcDGDY55w5HszSUp
99
99
  deeporigin_data/types/list_row_back_references_response.py,sha256=eHbFZrxTkX5usSs0CxWlLVapCX8TyX2Von7dvjJbBiI,112131
100
100
  deeporigin_data/types/list_rows_response.py,sha256=UZMlQTwmbOZyiQgyd3kaQIs2jIf0sK8tAH_I5akh0bQ,572
101
101
  deeporigin_data/types/lock_database_response.py,sha256=umJT88AMTj-zhpwck5KvY-pXBqNbZODi_3XNMt-xBUg,254
102
- deeporigin_data/types/parse_base_sequence_data_response.py,sha256=Zx-OBZMjkItXSppxGytGfCneTq8Ku6tP7mfSOjypHS8,720
102
+ deeporigin_data/types/parse_base_sequence_data_response.py,sha256=O1YuZREMz3mD_hPRRL55JyfUbJ2pklCdc2qdKhRuB3c,734
103
103
  deeporigin_data/types/resolve_ids_response.py,sha256=YQCy_Wuj2tZbgjGdId8DYPtUN2SP1cN81w1KTa5i1xw,955
104
104
  deeporigin_data/types/unlock_database_response.py,sha256=tL3SOkK3Q6yI0lrr9PY5sqUO3jETUd29WeVaNmKVgGc,258
105
105
  deeporigin_data/types/update_database_column_response.py,sha256=8HJAOQj_PbB7ALL1X6mfEXiN61O-XT8NeERVAy08qZM,34113
@@ -108,7 +108,7 @@ deeporigin_data/types/update_workspace_response.py,sha256=jikZhBFlm8ycxP0z4op-yg
108
108
  deeporigin_data/types/shared/__init__.py,sha256=pYKaryHlFLkuhKqOrqy-7tuC-5jYgPHZ3McDCyPfFFc,567
109
109
  deeporigin_data/types/shared/add_column_base.py,sha256=U8cpfpPt0zbNbkVEwzU2ckw_XhXdNjQ3fcM12df621c,1184
110
110
  deeporigin_data/types/shared/add_column_union.py,sha256=gVn9S3jFu670Cnr1TTpY_jedCmy3VZGfpNa1JTLTxHU,1031
111
- deeporigin_data/types/shared/condition.py,sha256=VnR-uM4UnpU_KiVyWfMW09HXg8C0SozqwzDQvMqPUIM,2843
111
+ deeporigin_data/types/shared/condition.py,sha256=unfWaTnFFiQksPXUAfV0TBgOTrT6bJSaN6pk9YTm3OM,3238
112
112
  deeporigin_data/types/shared/database.py,sha256=iwUbslESsQyB9TRK_S-592BQ8j-GAPUHderLeaJ0Uug,34258
113
113
  deeporigin_data/types/shared/database_row.py,sha256=kcvB3dqJDIKKc5dPGZ0txF2yqo6QXAziJRRhoYHhdkM,20981
114
114
  deeporigin_data/types/shared/describe_row_response.py,sha256=y41eJRkkLSQrm9A_lvwisBWVHH9_m2qUU6g9Sgp0nbA,538
@@ -118,9 +118,9 @@ deeporigin_data/types/shared/workspace.py,sha256=hrViPgKOrIn5hs9D5vf_Pyl6wcIuhqW
118
118
  deeporigin_data/types/shared_params/__init__.py,sha256=ng9sb1I2DfZ6VrWaVU0sUyR-GhVy1M33I_vWR-VUZkk,316
119
119
  deeporigin_data/types/shared_params/add_column_base.py,sha256=s8cbOjluJmf4Pzmg_v_FzhON6Cgc6T82ZjLHmeEdJhY,1235
120
120
  deeporigin_data/types/shared_params/add_column_union.py,sha256=uEJwB-xtbKY19Hq7a2vIrGdDfPcHIBwp9_R63Qf9KO0,1036
121
- deeporigin_data/types/shared_params/condition.py,sha256=ftu-hdGv05aTv4GL9bRyf4kQXl27kaPpt3P4KKdwmNM,2723
121
+ deeporigin_data/types/shared_params/condition.py,sha256=38ItZ9QZrA3rnXNgds7KZcXCZ-h1zVttiD1R6uf5IGQ,3153
122
122
  deeporigin_data/types/shared_params/row_filter_join.py,sha256=QIo2yhjJJZLcGF-hBF7YcLcYHLhf5uq5EkQG-0WJjtU,595
123
- deeporigin_data_sdk-0.1.0a47.dist-info/METADATA,sha256=aDgchygBPzIu3W9qe-XsoIlS_snS5dYxnGm0gt_rDn4,13402
124
- deeporigin_data_sdk-0.1.0a47.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
125
- deeporigin_data_sdk-0.1.0a47.dist-info/licenses/LICENSE,sha256=jT1To9IZ3XdRqtpv8wDrIwpatTUvf5yP0sFYhEtJVZY,11345
126
- deeporigin_data_sdk-0.1.0a47.dist-info/RECORD,,
123
+ deeporigin_data_sdk-0.1.0a48.dist-info/METADATA,sha256=XJyD4VFbr6nVA5AMHSN7hWzVRsSTuM4u37GvOkZZQo8,13399
124
+ deeporigin_data_sdk-0.1.0a48.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
125
+ deeporigin_data_sdk-0.1.0a48.dist-info/licenses/LICENSE,sha256=jT1To9IZ3XdRqtpv8wDrIwpatTUvf5yP0sFYhEtJVZY,11345
126
+ deeporigin_data_sdk-0.1.0a48.dist-info/RECORD,,