deeporigin-data-sdk 0.1.0a48__py3-none-any.whl → 0.1.0a50__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.
@@ -65,7 +65,7 @@ from ._compat import (
65
65
  from ._constants import RAW_RESPONSE_HEADER
66
66
 
67
67
  if TYPE_CHECKING:
68
- from pydantic_core.core_schema import ModelField, LiteralSchema, ModelFieldsSchema
68
+ from pydantic_core.core_schema import ModelField, ModelSchema, LiteralSchema, ModelFieldsSchema
69
69
 
70
70
  __all__ = ["BaseModel", "GenericModel"]
71
71
 
@@ -646,15 +646,18 @@ def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any,
646
646
 
647
647
  def _extract_field_schema_pv2(model: type[BaseModel], field_name: str) -> ModelField | None:
648
648
  schema = model.__pydantic_core_schema__
649
+ if schema["type"] == "definitions":
650
+ schema = schema["schema"]
651
+
649
652
  if schema["type"] != "model":
650
653
  return None
651
654
 
655
+ schema = cast("ModelSchema", schema)
652
656
  fields_schema = schema["schema"]
653
657
  if fields_schema["type"] != "model-fields":
654
658
  return None
655
659
 
656
660
  fields_schema = cast("ModelFieldsSchema", fields_schema)
657
-
658
661
  field = fields_schema["fields"].get(field_name)
659
662
  if not field:
660
663
  return None
@@ -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.48" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.50" # x-release-please-version
@@ -1,12 +1,11 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.3
2
2
  Name: deeporigin_data_sdk
3
- Version: 0.1.0a48
3
+ Version: 0.1.0a50
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
7
7
  Author-email: Deeporigin Data <support@deeporigin.com>
8
- License-Expression: Apache-2.0
9
- License-File: LICENSE
8
+ License: Apache-2.0
10
9
  Classifier: Intended Audience :: Developers
11
10
  Classifier: License :: OSI Approved :: Apache Software License
12
11
  Classifier: Operating System :: MacOS
@@ -111,6 +110,46 @@ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typ
111
110
 
112
111
  Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.
113
112
 
113
+ ## Nested params
114
+
115
+ Nested parameters are dictionaries, typed using `TypedDict`, for example:
116
+
117
+ ```python
118
+ from deeporigin_data import DeeporiginData
119
+
120
+ client = DeeporiginData(
121
+ org_id="My Org ID",
122
+ )
123
+
124
+ client.chat_send_message(
125
+ messages=[
126
+ {
127
+ "content": "x",
128
+ "role": "user",
129
+ }
130
+ ],
131
+ thread_id="threadId",
132
+ context={
133
+ "databases": [
134
+ {
135
+ "database": {
136
+ "hid": "hid",
137
+ "hid_prefix": "hidPrefix",
138
+ "name": "name",
139
+ },
140
+ "columns": [{"name": "name"}],
141
+ "rows": [
142
+ {
143
+ "hid": "hid",
144
+ "name": "name",
145
+ }
146
+ ],
147
+ }
148
+ ]
149
+ },
150
+ )
151
+ ```
152
+
114
153
  ## Handling errors
115
154
 
116
155
  When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `deeporigin_data.APIConnectionError` is raised.
@@ -5,13 +5,13 @@ deeporigin_data/_compat.py,sha256=VWemUKbj6DDkQ-O4baSpHVLJafotzeXmCQGJugfVTIw,65
5
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=PDLSNsn3Umxm3UMZPgyBiyN308rRzzPX6F9NO9FU2vs,28943
8
+ deeporigin_data/_models.py,sha256=CTC-fpbbGneROztxHX-PkLntPt1ZMmwDqoKY9VAIOVg,29071
9
9
  deeporigin_data/_qs.py,sha256=AOkSz4rHtK4YI3ZU_kzea-zpwBUgEY8WniGmTPyEimc,4846
10
10
  deeporigin_data/_resource.py,sha256=tkm4gF9YRotE93j48jTDBSGs8wyVa0E5NS9fj19e38c,1148
11
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=vFAl01a1LDue9WfgSYxBB5l1o6uTm2Rlj-_t-AwW7Kc,176
14
+ deeporigin_data/_version.py,sha256=JzsfCl6wpb_vBObBUyVOrdU9aN95a202bkKAXvAp4Mc,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
@@ -120,7 +120,7 @@ deeporigin_data/types/shared_params/add_column_base.py,sha256=s8cbOjluJmf4Pzmg_v
120
120
  deeporigin_data/types/shared_params/add_column_union.py,sha256=uEJwB-xtbKY19Hq7a2vIrGdDfPcHIBwp9_R63Qf9KO0,1036
121
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.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,,
123
+ deeporigin_data_sdk-0.1.0a50.dist-info/METADATA,sha256=KEC80freYAgWnDef8qId2FuGv74YgU0iZp3oKpaZ_QY,14184
124
+ deeporigin_data_sdk-0.1.0a50.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
125
+ deeporigin_data_sdk-0.1.0a50.dist-info/licenses/LICENSE,sha256=jT1To9IZ3XdRqtpv8wDrIwpatTUvf5yP0sFYhEtJVZY,11345
126
+ deeporigin_data_sdk-0.1.0a50.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.27.0
2
+ Generator: hatchling 1.26.3
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any