Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 192 for helper (0.21 sec)

  1. docs/de/docs/how-to/custom-docs-ui-assets.md

        Swagger UI erledigt das hinter den Kulissen für Sie, benötigt aber diesen „Umleitungs“-Helfer.
    
    ### Eine *Pfadoperation* erstellen, um es zu testen
    
    Um nun testen zu können, ob alles funktioniert, erstellen Sie eine *Pfadoperation*:
    
    ```Python hl_lines="36-38"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:17:36 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_websockets/test_tutorial002_an_py39.py

                data = websocket.receive_text()
                assert data == f"Message text was: {message}, for item ID: foo"
    
    
    @needs_py39
    def test_websocket_with_header(app: FastAPI):
        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect):
            with client.websocket_connect("/items/bar/ws?token=some-token") as websocket:
                message = "Message one"
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/security/first-steps.md

        * But it needs authentication for that specific endpoint.
        * So, to authenticate with our API, it sends a header `Authorization` with a value of `Bearer ` plus the token.
        * If the token contains `foobar`, the content of the `Authorization` header would be: `Bearer foobar`.
    
    ## **FastAPI**'s `OAuth2PasswordBearer`
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  4. docs/de/docs/tutorial/response-model.md

    ### Typannotationen und Tooling
    
    Sehen wir uns zunächst an, wie Editor, mypy und andere Tools dies sehen würden.
    
    `BaseUser` verfügt über die Basis-Felder. Dann erbt `UserIn` von `BaseUser` und fügt das Feld `Passwort` hinzu, sodass dass es nun alle Felder beider Modelle hat.
    
    Wir annotieren den Funktionsrückgabetyp als `BaseUser`, geben aber tatsächlich eine `UserIn`-Instanz zurück.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:26:58 GMT 2024
    - 19.9K bytes
    - Viewed (0)
  5. docs/zh/docs/tutorial/bigger-applications.md

    ```Python
    from ..dependencies import get_token_header
    ```
    
    表示:
    
    * 从该模块(`app/routers/items.py` 文件)所在的同一个包(`app/routers/` 目录)开始...
    * 跳转到其父包(`app/` 目录)...
    * 在该父包中,找到 `dependencies` 模块(位于 `app/dependencies.py` 的文件)...
    * 然后从中导入函数 `get_token_header`。
    
    正常工作了!🎉
    
    ---
    
    同样,如果我们使用了三个点 `...`,例如:
    
    ```Python
    from ...dependencies import get_token_header
    ```
    
    那将意味着:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 18.5K bytes
    - Viewed (0)
  6. tests/test_starlette_exception.py

    @app.get("/items/{item_id}")
    async def read_item(item_id: str):
        if item_id not in items:
            raise HTTPException(
                status_code=404,
                detail="Item not found",
                headers={"X-Error": "Some custom header"},
            )
        return {"item": items[item_id]}
    
    
    @app.get("/http-no-body-statuscode-exception")
    async def no_body_status_code_exception():
        raise HTTPException(status_code=204)
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 7.4K bytes
    - Viewed (0)
  7. docs/ru/docs/tutorial/schema-extra-example.md

    ## Использование `example` и `examples` в OpenAPI
    
    При использовании любой из этих функций:
    
    * `Path()`
    * `Query()`
    * `Header()`
    * `Cookie()`
    * `Body()`
    * `Form()`
    * `File()`
    
    вы также можете добавить аргумент, содержащий `example` или группу `examples` с дополнительной информацией, которая будет добавлена в **OpenAPI**.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  8. docs/en/docs/fastapi-people.md

    ...But here I want to show you the community.
    
    ---
    
    **FastAPI** receives a lot of support from the community. And I want to highlight their contributions.
    
    These are the people that:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 16 23:54:24 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  9. docs/de/docs/advanced/websockets.md

    ## Verwendung von `Depends` und anderen
    
    In WebSocket-Endpunkten können Sie Folgendes aus `fastapi` importieren und verwenden:
    
    * `Depends`
    * `Security`
    * `Cookie`
    * `Header`
    * `Path`
    * `Query`
    
    Diese funktionieren auf die gleiche Weise wie für andere FastAPI-Endpunkte/*Pfadoperationen*:
    
    === "Python 3.10+"
    
        ```Python hl_lines="68-69  82"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:17:58 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  10. docs/de/docs/features.md

    * HTTP Basic Authentifizierung.
    * **OAuth2** (auch mit **JWT Tokens**). Siehe dazu das Tutorial zu [OAuth2 mit JWT](tutorial/security/oauth2-jwt.md){.internal-link target=_blank}.
    * API Schlüssel in:
        * Header-Feldern.
        * Anfrageparametern.
        * Cookies, usw.
    
    Zusätzlich alle Sicherheitsfunktionen von Starlette (inklusive **Session Cookies**).
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 19:43:43 GMT 2024
    - 10.8K bytes
    - Viewed (0)
Back to top