Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 202 for idct (0.01 sec)

  1. 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)
  2. 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)
  3. tests/test_response_by_alias.py

    
    @app.get("/by-alias/dict", response_model=Model)
    def by_alias_dict():
        return {"alias": "Foo"}
    
    
    @app.get("/by-alias/model", response_model=Model)
    def by_alias_model():
        return Model(alias="Foo")
    
    
    @app.get("/by-alias/list", response_model=list[Model])
    def by_alias_list():
        return [{"alias": "Foo"}, {"alias": "Bar"}]
    
    
    @app.get("/no-alias/dict", response_model=ModelNoAlias)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 10.7K bytes
    - Viewed (0)
  4. fastapi/_compat/v2.py

    def _remap_definitions_and_field_mappings(
        *,
        model_name_map: ModelNameMap,
        definitions: dict[str, Any],
        field_mapping: dict[
            tuple[ModelField, Literal["validation", "serialization"]], JsonSchemaValue
        ],
    ) -> tuple[
        dict[tuple[ModelField, Literal["validation", "serialization"]], JsonSchemaValue],
        dict[str, Any],
    ]:
        old_name_to_new_name_map = {}
        for field_key, schema in field_mapping.items():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 19.1K bytes
    - Viewed (0)
  5. 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)
  6. tests/test_dependency_contextmanager.py

        pass
    
    
    class OtherDependencyError(Exception):
        pass
    
    
    async def asyncgen_state(state: dict[str, str] = Depends(get_state)):
        state["/async"] = "asyncgen started"
        yield state["/async"]
        state["/async"] = "asyncgen completed"
    
    
    def generator_state(state: dict[str, str] = Depends(get_state)):
        state["/sync"] = "generator started"
        yield state["/sync"]
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  7. docs/es/docs/tutorial/extra-models.md

    En Pydantic v1 el método se llamaba `.dict()`, fue deprecado (pero aún soportado) en Pydantic v2, y renombrado a `.model_dump()`.
    
    Los ejemplos aquí usan `.dict()` para compatibilidad con Pydantic v1, pero deberías usar `.model_dump()` en su lugar si puedes usar Pydantic v2.
    
    ///
    
    ### Acerca de `**user_in.dict()` { #about-user-in-dict }
    
    #### `.dict()` de Pydantic { #pydantics-dict }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 16 16:33:45 UTC 2025
    - 7.6K bytes
    - Viewed (0)
  8. docs/de/docs/tutorial/extra-models.md

    Und wenn wir aufrufen:
    
    ```Python
    print(user_dict)
    ```
    
    würden wir ein Python-`dict` erhalten mit:
    
    ```Python
    {
        'username': 'john',
        'password': 'secret',
        'email': '******@****.***',
        'full_name': None,
    }
    ```
    
    #### Ein `dict` entpacken { #unpacking-a-dict }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 24 10:28:19 UTC 2025
    - 8K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/extra-models.md

    ## Response with arbitrary `dict` { #response-with-arbitrary-dict }
    
    You can also declare a response using a plain arbitrary `dict`, declaring just the type of the keys and values, without using a Pydantic model.
    
    This is useful if you don't know the valid field/attribute names (that would be needed for a Pydantic model) beforehand.
    
    In this case, you can use `typing.Dict` (or just `dict` in Python 3.9 and above):
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 6.9K bytes
    - Viewed (0)
  10. tests/test_router_events.py

        @asynccontextmanager
        async def lifespan(app: FastAPI) -> AsyncGenerator[dict[str, bool], None]:
            state.app_startup = True
            yield {"app": True}
            state.app_shutdown = True
    
        @asynccontextmanager
        async def router_lifespan(app: FastAPI) -> AsyncGenerator[dict[str, bool], None]:
            state.router_startup = True
            yield {"router": True}
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 7.3K bytes
    - Viewed (0)
Back to top