deeporigin-data-sdk 0.1.0a48__py3-none-any.whl → 0.1.0a51__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.
- deeporigin_data/_models.py +6 -3
- deeporigin_data/_utils/_transform.py +1 -1
- deeporigin_data/_version.py +1 -1
- {deeporigin_data_sdk-0.1.0a48.dist-info → deeporigin_data_sdk-0.1.0a51.dist-info}/METADATA +43 -4
- {deeporigin_data_sdk-0.1.0a48.dist-info → deeporigin_data_sdk-0.1.0a51.dist-info}/RECORD +7 -7
- {deeporigin_data_sdk-0.1.0a48.dist-info → deeporigin_data_sdk-0.1.0a51.dist-info}/WHEEL +1 -1
- {deeporigin_data_sdk-0.1.0a48.dist-info → deeporigin_data_sdk-0.1.0a51.dist-info}/licenses/LICENSE +0 -0
deeporigin_data/_models.py
CHANGED
@@ -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
|
@@ -678,7 +681,7 @@ def set_pydantic_config(typ: Any, config: pydantic.ConfigDict) -> None:
|
|
678
681
|
setattr(typ, "__pydantic_config__", config) # noqa: B010
|
679
682
|
|
680
683
|
|
681
|
-
# our use of
|
684
|
+
# our use of subclassing here causes weirdness for type checkers,
|
682
685
|
# so we just pretend that we don't subclass
|
683
686
|
if TYPE_CHECKING:
|
684
687
|
GenericModel = BaseModel
|
@@ -126,7 +126,7 @@ def _get_annotated_type(type_: type) -> type | None:
|
|
126
126
|
def _maybe_transform_key(key: str, type_: type) -> str:
|
127
127
|
"""Transform the given `data` based on the annotations provided in `type_`.
|
128
128
|
|
129
|
-
Note: this function only looks at `Annotated` types that contain `
|
129
|
+
Note: this function only looks at `Annotated` types that contain `PropertyInfo` metadata.
|
130
130
|
"""
|
131
131
|
annotated_type = _get_annotated_type(type_)
|
132
132
|
if annotated_type is None:
|
deeporigin_data/_version.py
CHANGED
@@ -1,12 +1,11 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.3
|
2
2
|
Name: deeporigin_data_sdk
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.0a51
|
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
|
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=
|
8
|
+
deeporigin_data/_models.py,sha256=Bg-k8-T1kDWURAYXrbDF5FSAyLEy7k90Jrvne-dF4Wc,29070
|
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=
|
14
|
+
deeporigin_data/_version.py,sha256=YUPCoQzT-iC412yhh-KhMgKFBBPa4EtMiaTup1Lebuk,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
|
@@ -19,7 +19,7 @@ deeporigin_data/_utils/_proxy.py,sha256=z3zsateHtb0EARTWKk8QZNHfPkqJbqwd1lM993LB
|
|
19
19
|
deeporigin_data/_utils/_reflection.py,sha256=ZmGkIgT_PuwedyNBrrKGbxoWtkpytJNU1uU4QHnmEMU,1364
|
20
20
|
deeporigin_data/_utils/_streams.py,sha256=SMC90diFFecpEg_zgDRVbdR3hSEIgVVij4taD-noMLM,289
|
21
21
|
deeporigin_data/_utils/_sync.py,sha256=TpGLrrhRNWTJtODNE6Fup3_k7zrWm1j2RlirzBwre-0,2862
|
22
|
-
deeporigin_data/_utils/_transform.py,sha256=
|
22
|
+
deeporigin_data/_utils/_transform.py,sha256=asrbdx4Pf5NupzaB8QdEjypW_DgHjjkpswHT0Jum4S0,13987
|
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
|
@@ -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.
|
124
|
-
deeporigin_data_sdk-0.1.
|
125
|
-
deeporigin_data_sdk-0.1.
|
126
|
-
deeporigin_data_sdk-0.1.
|
123
|
+
deeporigin_data_sdk-0.1.0a51.dist-info/METADATA,sha256=OhmAqRNcB-KwA8vOnrsvZnQaIhZ6ARofUT7VsqYb3wk,14184
|
124
|
+
deeporigin_data_sdk-0.1.0a51.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
125
|
+
deeporigin_data_sdk-0.1.0a51.dist-info/licenses/LICENSE,sha256=jT1To9IZ3XdRqtpv8wDrIwpatTUvf5yP0sFYhEtJVZY,11345
|
126
|
+
deeporigin_data_sdk-0.1.0a51.dist-info/RECORD,,
|
{deeporigin_data_sdk-0.1.0a48.dist-info → deeporigin_data_sdk-0.1.0a51.dist-info}/licenses/LICENSE
RENAMED
File without changes
|