- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for deserialize (0.23 sec)
-
tests/test_serialize_response.py
Nima Mashhadi M. Reza <******@****.***> 1596457747 +0430
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Mon Aug 03 12:29:07 GMT 2020 - 1.4K bytes - Viewed (0) -
tests/test_serialize_response_dataclass.py
Luis R <******@****.***> 1661522207 +0200
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Aug 26 13:56:47 GMT 2022 - 4.9K bytes - Viewed (0) -
tests/test_datetime_custom_encoder.py
@needs_pydanticv2 def test_pydanticv2(): from pydantic import field_serializer class ModelWithDatetimeField(BaseModel): dt_field: datetime @field_serializer("dt_field") def serialize_datetime(self, dt_field: datetime): return dt_field.replace(microsecond=0, tzinfo=timezone.utc).isoformat() app = FastAPI() model = ModelWithDatetimeField(dt_field=datetime(2019, 1, 1, 8))
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 1.6K bytes - Viewed (0) -
tests/test_jsonable_encoder.py
from pydantic import field_serializer class ModelWithCustomEncoder(BaseModel): dt_field: datetime @field_serializer("dt_field") def serialize_dt_field(self, dt): return dt.replace(microsecond=0, tzinfo=timezone.utc).isoformat() class ModelWithCustomEncoderSubclass(ModelWithCustomEncoder): pass
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 21:56:59 GMT 2024 - 9K bytes - Viewed (0) -
fastapi/dependencies/utils.py
is_scalar_field, is_scalar_sequence_field, is_sequence_field, is_uploadfile_or_nonable_uploadfile_annotation, is_uploadfile_sequence_annotation, lenient_issubclass, sequence_types, serialize_sequence_value, value_is_sequence, ) from fastapi.background import BackgroundTasks from fastapi.concurrency import ( asynccontextmanager, contextmanager_in_threadpool, )
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:52:56 GMT 2024 - 29.5K bytes - Viewed (0) -
fastapi/responses.py
try: import orjson except ImportError: # pragma: nocover orjson = None # type: ignore class UJSONResponse(JSONResponse): """ JSON response using the high-performance ujson library to serialize data to JSON. Read more about it in the [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/). """
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Oct 18 12:36:40 GMT 2023 - 1.7K bytes - Viewed (0) -
tests/test_serialize_response_model.py
Sebastián RamÃrez <******@****.***> 1652485102 -0500
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 4.2K bytes - Viewed (0) -
fastapi/applications.py
show it as the response (JSON Schema). * Serialization: you could return an arbitrary object and the `response_model` would be used to serialize that object into the corresponding JSON. * Filtering: the JSON sent to the client will only contain the data
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 172.2K bytes - Viewed (0) -
tests/test_inherited_custom_class.py
return {"fast_uuid": asyncpg_uuid} class SomeCustomClass(BaseModel): model_config = {"arbitrary_types_allowed": True} a_uuid: MyUuid @field_serializer("a_uuid") def serialize_a_uuid(self, v): return str(v) @app.get("/get_custom_class") def return_some_user(): # Test that the fix also works for custom pydantic classes
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 3K bytes - Viewed (0) -
fastapi/_compat.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 22.6K bytes - Viewed (0)