bluehive 0.1.0a16__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.
- bluehive/_models.py +29 -12
- bluehive/_version.py +1 -1
- {bluehive-0.1.0a16.dist-info → bluehive-0.1.0a17.dist-info}/METADATA +1 -1
- {bluehive-0.1.0a16.dist-info → bluehive-0.1.0a17.dist-info}/RECORD +6 -6
- {bluehive-0.1.0a16.dist-info → bluehive-0.1.0a17.dist-info}/WHEEL +0 -0
- {bluehive-0.1.0a16.dist-info → bluehive-0.1.0a17.dist-info}/licenses/LICENSE +0 -0
bluehive/_models.py
CHANGED
|
@@ -257,15 +257,16 @@ class BaseModel(pydantic.BaseModel):
|
|
|
257
257
|
mode: Literal["json", "python"] | str = "python",
|
|
258
258
|
include: IncEx | None = None,
|
|
259
259
|
exclude: IncEx | None = None,
|
|
260
|
+
context: Any | None = None,
|
|
260
261
|
by_alias: bool | None = None,
|
|
261
262
|
exclude_unset: bool = False,
|
|
262
263
|
exclude_defaults: bool = False,
|
|
263
264
|
exclude_none: bool = False,
|
|
265
|
+
exclude_computed_fields: bool = False,
|
|
264
266
|
round_trip: bool = False,
|
|
265
267
|
warnings: bool | Literal["none", "warn", "error"] = True,
|
|
266
|
-
context: dict[str, Any] | None = None,
|
|
267
|
-
serialize_as_any: bool = False,
|
|
268
268
|
fallback: Callable[[Any], Any] | None = None,
|
|
269
|
+
serialize_as_any: bool = False,
|
|
269
270
|
) -> dict[str, Any]:
|
|
270
271
|
"""Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump
|
|
271
272
|
|
|
@@ -273,16 +274,24 @@ class BaseModel(pydantic.BaseModel):
|
|
|
273
274
|
|
|
274
275
|
Args:
|
|
275
276
|
mode: The mode in which `to_python` should run.
|
|
276
|
-
If mode is 'json', the
|
|
277
|
-
If mode is 'python', the
|
|
278
|
-
include: A
|
|
279
|
-
exclude: A
|
|
277
|
+
If mode is 'json', the output will only contain JSON serializable types.
|
|
278
|
+
If mode is 'python', the output may contain non-JSON-serializable Python objects.
|
|
279
|
+
include: A set of fields to include in the output.
|
|
280
|
+
exclude: A set of fields to exclude from the output.
|
|
281
|
+
context: Additional context to pass to the serializer.
|
|
280
282
|
by_alias: Whether to use the field's alias in the dictionary key if defined.
|
|
281
|
-
exclude_unset: Whether to exclude fields that
|
|
282
|
-
exclude_defaults: Whether to exclude fields that are set to their default value
|
|
283
|
-
exclude_none: Whether to exclude fields that have a value of `None
|
|
284
|
-
|
|
285
|
-
|
|
283
|
+
exclude_unset: Whether to exclude fields that have not been explicitly set.
|
|
284
|
+
exclude_defaults: Whether to exclude fields that are set to their default value.
|
|
285
|
+
exclude_none: Whether to exclude fields that have a value of `None`.
|
|
286
|
+
exclude_computed_fields: Whether to exclude computed fields.
|
|
287
|
+
While this can be useful for round-tripping, it is usually recommended to use the dedicated
|
|
288
|
+
`round_trip` parameter instead.
|
|
289
|
+
round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T].
|
|
290
|
+
warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
|
|
291
|
+
"error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError].
|
|
292
|
+
fallback: A function to call when an unknown value is encountered. If not provided,
|
|
293
|
+
a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError] error is raised.
|
|
294
|
+
serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.
|
|
286
295
|
|
|
287
296
|
Returns:
|
|
288
297
|
A dictionary representation of the model.
|
|
@@ -299,6 +308,8 @@ class BaseModel(pydantic.BaseModel):
|
|
|
299
308
|
raise ValueError("serialize_as_any is only supported in Pydantic v2")
|
|
300
309
|
if fallback is not None:
|
|
301
310
|
raise ValueError("fallback is only supported in Pydantic v2")
|
|
311
|
+
if exclude_computed_fields != False:
|
|
312
|
+
raise ValueError("exclude_computed_fields is only supported in Pydantic v2")
|
|
302
313
|
dumped = super().dict( # pyright: ignore[reportDeprecated]
|
|
303
314
|
include=include,
|
|
304
315
|
exclude=exclude,
|
|
@@ -315,15 +326,17 @@ class BaseModel(pydantic.BaseModel):
|
|
|
315
326
|
self,
|
|
316
327
|
*,
|
|
317
328
|
indent: int | None = None,
|
|
329
|
+
ensure_ascii: bool = False,
|
|
318
330
|
include: IncEx | None = None,
|
|
319
331
|
exclude: IncEx | None = None,
|
|
332
|
+
context: Any | None = None,
|
|
320
333
|
by_alias: bool | None = None,
|
|
321
334
|
exclude_unset: bool = False,
|
|
322
335
|
exclude_defaults: bool = False,
|
|
323
336
|
exclude_none: bool = False,
|
|
337
|
+
exclude_computed_fields: bool = False,
|
|
324
338
|
round_trip: bool = False,
|
|
325
339
|
warnings: bool | Literal["none", "warn", "error"] = True,
|
|
326
|
-
context: dict[str, Any] | None = None,
|
|
327
340
|
fallback: Callable[[Any], Any] | None = None,
|
|
328
341
|
serialize_as_any: bool = False,
|
|
329
342
|
) -> str:
|
|
@@ -355,6 +368,10 @@ class BaseModel(pydantic.BaseModel):
|
|
|
355
368
|
raise ValueError("serialize_as_any is only supported in Pydantic v2")
|
|
356
369
|
if fallback is not None:
|
|
357
370
|
raise ValueError("fallback is only supported in Pydantic v2")
|
|
371
|
+
if ensure_ascii != False:
|
|
372
|
+
raise ValueError("ensure_ascii is only supported in Pydantic v2")
|
|
373
|
+
if exclude_computed_fields != False:
|
|
374
|
+
raise ValueError("exclude_computed_fields is only supported in Pydantic v2")
|
|
358
375
|
return super().json( # type: ignore[reportDeprecated]
|
|
359
376
|
indent=indent,
|
|
360
377
|
include=include,
|
bluehive/_version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: bluehive
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.0a17
|
|
4
4
|
Summary: The official Python library for the bluehive API
|
|
5
5
|
Project-URL: Homepage, https://github.com/bluehive-health/bluehive-sdk-python
|
|
6
6
|
Project-URL: Repository, https://github.com/bluehive-health/bluehive-sdk-python
|
|
@@ -5,13 +5,13 @@ bluehive/_compat.py,sha256=DQBVORjFb33zch24jzkhM14msvnzY7mmSmgDLaVFUM8,6562
|
|
|
5
5
|
bluehive/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
|
|
6
6
|
bluehive/_exceptions.py,sha256=QOhLZv_tev7t7XO_pk0NoT7nzwA5VU6wtZdVWarToqo,3224
|
|
7
7
|
bluehive/_files.py,sha256=KnEzGi_O756MvKyJ4fOCW_u3JhOeWPQ4RsmDvqihDQU,3545
|
|
8
|
-
bluehive/_models.py,sha256=
|
|
8
|
+
bluehive/_models.py,sha256=3D65psj_C02Mw0K2zpBWrn1khmrvtEXgTTQ6P4r3tUY,31837
|
|
9
9
|
bluehive/_qs.py,sha256=craIKyvPktJ94cvf9zn8j8ekG9dWJzhWv0ob34lIOv4,4828
|
|
10
10
|
bluehive/_resource.py,sha256=MI2mGktYiePpr3PUh2uCPn1ubEsju6JkKoMupdTaqtc,1112
|
|
11
11
|
bluehive/_response.py,sha256=u3wZ9ksvCqcP549TZTsozw0LNZmHf1yPVWPo1hxMNDg,28800
|
|
12
12
|
bluehive/_streaming.py,sha256=ULiijxzSukAhT9t9G-1Mo2ks4iUt6kvD9NHYB8WlJwk,10157
|
|
13
13
|
bluehive/_types.py,sha256=9h31eihqlGo3KevS5EpSAWg-hJWTZW4wsWCrlTkVC_4,7238
|
|
14
|
-
bluehive/_version.py,sha256=
|
|
14
|
+
bluehive/_version.py,sha256=R4uo8omB6lbFbEHuSPXtXQcv5VkbadMEtGmJZ9KxmbU,169
|
|
15
15
|
bluehive/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
bluehive/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
|
|
17
17
|
bluehive/_utils/_compat.py,sha256=D8gtAvjJQrDWt9upS0XaG9Rr5l1QhiAx_I_1utT_tt0,1195
|
|
@@ -91,7 +91,7 @@ bluehive/types/employers/service_bundle_list_response.py,sha256=vnZlYv7KObJ0OSSY
|
|
|
91
91
|
bluehive/types/employers/service_bundle_retrieve_response.py,sha256=9nwdzfgErAQFzqwivKhKCLqA9k7ZsMj4YbNig09-Eho,1030
|
|
92
92
|
bluehive/types/employers/service_bundle_update_params.py,sha256=gxRnvCSsBsUqi1M91nhEXgj-2l03xlrnPeXOPAQ1ujA,812
|
|
93
93
|
bluehive/types/employers/service_bundle_update_response.py,sha256=zUR_nYflDEmLSmTcFb4EaTELCInqZZI-VIBHgcPq7G4,1026
|
|
94
|
-
bluehive-0.1.
|
|
95
|
-
bluehive-0.1.
|
|
96
|
-
bluehive-0.1.
|
|
97
|
-
bluehive-0.1.
|
|
94
|
+
bluehive-0.1.0a17.dist-info/METADATA,sha256=g1Byh0eOLg0t0ai4wirmIOhCOqCqlPkr5xHsN6eLg8o,13629
|
|
95
|
+
bluehive-0.1.0a17.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
96
|
+
bluehive-0.1.0a17.dist-info/licenses/LICENSE,sha256=Q2LP5YQQAGzyScIIkgum9Z19KCG4jZvZHMgDQ_vOOqM,11338
|
|
97
|
+
bluehive-0.1.0a17.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|