- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for lobj (0.02 sec)
-
fastapi/encoders.py
) if isinstance(obj, Enum): return obj.value if isinstance(obj, PurePath): return str(obj) if isinstance(obj, (str, int, float, type(None))): return obj if isinstance(obj, PydanticUndefinedType): return None if isinstance(obj, dict): encoded_dict = {} allowed_keys = set(obj.keys()) if include is not None:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 10.7K bytes - Viewed (0) -
tests/test_jsonable_encoder.py
test_path = PurePath("/foo", "bar") obj = ModelWithPath(path=test_path) assert jsonable_encoder(obj) == {"path": str(test_path)} def test_encode_model_with_pure_posix_path(): class ModelWithPath(BaseModel): path: PurePosixPath model_config = {"arbitrary_types_allowed": True} obj = ModelWithPath(path=PurePosixPath("/foo", "bar"))Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 9.2K bytes - Viewed (0) -
fastapi/_compat/shared.py
for sub_annotation in get_args(annotation) ) def is_pydantic_v1_model_instance(obj: Any) -> bool: with warnings.catch_warnings(): warnings.simplefilter("ignore", UserWarning) from pydantic import v1 return isinstance(obj, v1.BaseModel) def is_pydantic_v1_model_class(cls: Any) -> bool: with warnings.catch_warnings():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 6.7K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_tutorial001.py
mod.engine.dispose() def test_crud_app(client: TestClient): # TODO: this warns that SQLModel.from_orm is deprecated in Pydantic v1, refactor # this if using obj.model_validate becomes independent of Pydantic v2 with warnings.catch_warnings(record=True): warnings.simplefilter("always") # No heroes before creating response = client.get("heroes/")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 14K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_tutorial002.py
mod.engine.dispose() def test_crud_app(client: TestClient): # TODO: this warns that SQLModel.from_orm is deprecated in Pydantic v1, refactor # this if using obj.model_validate becomes independent of Pydantic v2 with warnings.catch_warnings(record=True): warnings.simplefilter("always") # No heroes before creating response = client.get("heroes/")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 17.9K bytes - Viewed (0)