Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 79 for actually (0.09 sec)

  1. tests/test_openapi_servers.py

    app = FastAPI(
        servers=[
            {"url": "/", "description": "Default, relative server"},
            {
                "url": "http://staging.localhost.tiangolo.com:8000",
                "description": "Staging but actually localhost still",
            },
            {"url": "https://prod.example.com"},
        ]
    )
    
    
    @app.get("/foo")
    def foo():
        return {"message": "Hello World"}
    
    
    client = TestClient(app)
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/dependencies/classes-as-dependencies.md

    ```
    
    ////
    
    The last `CommonQueryParams`, in:
    
    ```Python
    ... Depends(CommonQueryParams)
    ```
    
    ...is what **FastAPI** will actually use to know what is the dependency.
    
    It is from this one that FastAPI will extract the declared parameters and that is what FastAPI will actually call.
    
    ---
    
    In this case, the first `CommonQueryParams`, in:
    
    //// tab | Python 3.9+
    
    ```Python
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 6.7K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/openapi-webhooks.md

    The webhooks that you define will end up in the **OpenAPI** schema and the automatic **docs UI**.
    
    /// info
    
    The `app.webhooks` object is actually just an `APIRouter`, the same type you would use when structuring your app with multiple files.
    
    ///
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 2.9K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/response-model.md

    ## Return Type and Data Filtering { #return-type-and-data-filtering }
    
    Let's continue from the previous example. We wanted to **annotate the function with one type**, but we wanted to be able to return from the function something that actually includes **more data**.
    
    We want FastAPI to keep **filtering** the data using the response model. So that even though the function returns more data, the response will only include the fields declared in the response model.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 15.5K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial006.py

    from fastapi.testclient import TestClient
    
    from docs_src.path_operation_advanced_configuration.tutorial006_py39 import app
    
    client = TestClient(app)
    
    
    def test_post():
        response = client.post("/items/", content=b"this is actually not validated")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "size": 30,
            "content": {
                "name": "Maaaagic",
                "price": 42,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 1.9K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/body-updates.md

    * Retrieve the stored data.
    * Put that data in a Pydantic model.
    * Generate a `dict` without default values from the input model (using `exclude_unset`).
        * This way you can update only the values actually set by the user, instead of overriding values already stored with default values in your model.
    * Create a copy of the stored model, updating its attributes with the received partial updates (using the `update` parameter).
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 4.1K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/sql-databases.md

    Import `SQLModel` and create a database model:
    
    {* ../../docs_src/sql_databases/tutorial001_an_py310.py ln[1:11] hl[7:11] *}
    
    The `Hero` class is very similar to a Pydantic model (in fact, underneath, it actually *is a Pydantic model*).
    
    There are a few differences:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 02 05:06:56 UTC 2025
    - 15.8K bytes
    - Viewed (0)
  8. docs/en/docs/python-types.md

    ```
    
    Using `Optional[str]` instead of just `str` will let the editor help you detect errors where you could be assuming that a value is always a `str`, when it could actually be `None` too.
    
    `Optional[Something]` is actually a shortcut for `Union[Something, None]`, they are equivalent.
    
    This also means that in Python 3.10, you can use `Something | None`:
    
    //// tab | Python 3.10+
    
    ```Python hl_lines="1"
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 15.6K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/static-files.md

    /// note | Technical Details
    
    You could also use `from starlette.staticfiles import StaticFiles`.
    
    **FastAPI** provides the same `starlette.staticfiles` as `fastapi.staticfiles` just as a convenience for you, the developer. But it actually comes directly from Starlette.
    
    ///
    
    ### What is "Mounting" { #what-is-mounting }
    
    "Mounting" means adding a complete "independent" application in a specific path, that then takes care of handling all the sub-paths.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  10. docs/en/docs/advanced/using-request-directly.md

    But there are situations where you might need to access the `Request` object directly.
    
    ## Details about the `Request` object { #details-about-the-request-object }
    
    As **FastAPI** is actually **Starlette** underneath, with a layer of several tools on top, you can use Starlette's <a href="https://www.starlette.dev/requests/" class="external-link" target="_blank">`Request`</a> object directly when you need to.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 2.4K bytes
    - Viewed (0)
Back to top