- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 33 for asdict (0.04 sec)
-
fastapi/_compat/v2.py
) # TODO: remove after dropping support for Python 3.8 and # setting the min Pydantic to v2.12.3 that adds asdict() field_dict = asdict(self.field_info) annotated_args = ( field_dict["annotation"], *field_dict["metadata"],Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 19.1K bytes - Viewed (0) -
fastapi/encoders.py
SecretStr: str, set: list, UUID: str, Url: str, AnyUrl: str, } def generate_encoders_by_class_tuples( type_encoder_map: dict[Any, Callable[[Any], Any]], ) -> dict[Callable[[Any], Any], tuple[Any, ...]]: encoders_by_class_tuples: dict[Callable[[Any], Any], tuple[Any, ...]] = defaultdict( tuple ) for type_, encoder in type_encoder_map.items():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/benchmarks/test_general_performance.py
items: list[dict[str, Any]] metadata: dict[str, Any] class LargeOut(BaseModel): items: list[dict[str, Any]] metadata: dict[str, Any] app = FastAPI() @app.post("/sync/validated", response_model=ItemOut) def sync_validated(item: ItemIn, dep: Annotated[int, Depends(dep_b)]): return ItemOut(name=item.name, value=item.value, dep=dep) @app.get("/sync/dict-no-response-model")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 20:40:26 UTC 2025 - 11.1K bytes - Viewed (0) -
tests/test_jsonable_encoder.py
"bar": "bar", "bla": "bla", } def test_custom_encoders(): class safe_datetime(datetime): pass class MyDict(TypedDict): dt_field: safe_datetime instance = MyDict(dt_field=safe_datetime.now()) encoded_instance = jsonable_encoder( instance, custom_encoder={safe_datetime: lambda o: o.strftime("%H:%M:%S")} )
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/openapi/models.py
schemas: Optional[dict[str, Union[Schema, Reference]]] = None responses: Optional[dict[str, Union[Response, Reference]]] = None parameters: Optional[dict[str, Union[Parameter, Reference]]] = None examples: Optional[dict[str, Union[Example, Reference]]] = None requestBodies: Optional[dict[str, Union[RequestBody, Reference]]] = None headers: Optional[dict[str, Union[Header, Reference]]] = None
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 15.1K bytes - Viewed (0) -
fastapi/openapi/utils.py
operation_ids: set[str], model_name_map: ModelNameMap, field_mapping: dict[ tuple[ModelField, Literal["validation", "serialization"]], dict[str, Any] ], separate_input_output_schemas: bool = True, ) -> tuple[dict[str, Any], dict[str, Any], dict[str, Any]]: path = {} security_schemes: dict[str, Any] = {} definitions: dict[str, Any] = {} assert route.methods is not None, "Methods must be a list"
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 23.2K bytes - Viewed (0) -
fastapi/utils.py
return operation_id def deep_dict_update(main_dict: dict[Any, Any], update_dict: dict[Any, Any]) -> None: for key, value in update_dict.items(): if ( key in main_dict and isinstance(main_dict[key], dict) and isinstance(value, dict) ): deep_dict_update(main_dict[key], value) elif (
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 5.1K bytes - Viewed (0) -
docs/de/docs/tutorial/extra-models.md
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 24 10:28:19 UTC 2025 - 8K bytes - Viewed (0) -
fastapi/params.py
"although still supported. Use examples instead." ), ] = _Unset, openapi_examples: Optional[dict[str, Example]] = None, deprecated: Union[deprecated, str, bool, None] = None, include_in_schema: bool = True, json_schema_extra: Union[dict[str, Any], None] = None, **extra: Any, ): if example is not _Unset: warnings.warn(Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 26.3K bytes - Viewed (0) -
fastapi/dependencies/utils.py
return values async def request_body_to_args( body_fields: list[ModelField], received_body: Optional[Union[dict[str, Any], FormData]], embed_body_fields: bool, ) -> tuple[dict[str, Any], list[dict[str, Any]]]: values: dict[str, Any] = {} errors: list[dict[str, Any]] = [] assert body_fields, "request_body_to_args() should be called with fields"
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 37.6K bytes - Viewed (3)