Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 81 for 27 (0.14 sec)

  1. docs/en/docs/advanced/testing-websockets.md

    # Testing WebSockets
    
    You can use the same `TestClient` to test WebSockets.
    
    For this, you use the `TestClient` in a `with` statement, connecting to the WebSocket:
    
    ```Python hl_lines="27-31"
    {!../../../docs_src/app_testing/tutorial002.py!}
    ```
    
    !!! note
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Aug 29 14:02:58 GMT 2020
    - 449 bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/security/get-current-user.md

    === "Python 3.10+"
    
        ```Python hl_lines="19-22  26-27"
        {!> ../../../docs_src/security/tutorial002_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="19-22  26-27"
        {!> ../../../docs_src/security/tutorial002_an_py39.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="20-23  27-28"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  3. docs/zh/docs/tutorial/response-model.md

    * 等等。
    
    === "Python 3.10+"
    
        ```Python hl_lines="17  22  24-27"
        {!> ../../../docs_src/response_model/tutorial001_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="17  22  24-27"
        {!> ../../../docs_src/response_model/tutorial001_py39.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="17  22  24-27"
        {!> ../../../docs_src/response_model/tutorial001.py!}
        ```
    
    !!! note
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.9K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/response-model.md

    * etc.
    
    === "Python 3.10+"
    
        ```Python hl_lines="17  22  24-27"
        {!> ../../../docs_src/response_model/tutorial001_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="17  22  24-27"
        {!> ../../../docs_src/response_model/tutorial001_py39.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="17  22  24-27"
        {!> ../../../docs_src/response_model/tutorial001.py!}
        ```
    
    !!! note
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.9K bytes
    - Viewed (0)
  5. docs/zh/docs/tutorial/security/get-current-user.md

    ```Python hl_lines="25"
    {!../../../docs_src/security/tutorial002.py!}
    ```
    
    ## 获取用户
    
    `get_current_user` 使用创建的(伪)工具函数,该函数接收 `str` 类型的令牌,并返回 Pydantic 的 `User` 模型:
    
    ```Python hl_lines="19-22  26-27"
    {!../../../docs_src/security/tutorial002.py!}
    ```
    
    ## 注入当前用户
    
    在*路径操作* 的 `Depends` 中使用 `get_current_user`:
    
    ```Python hl_lines="31"
    {!../../../docs_src/security/tutorial002.py!}
    ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 22:46:46 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  6. docs/em/docs/tutorial/security/get-current-user.md

        ```
    
    ## 🤚 👩‍💻
    
    `get_current_user` 🔜 ⚙️ (❌) 🚙 🔢 👥 ✍, 👈 ✊ 🤝 `str` & 📨 👆 Pydantic `User` 🏷:
    
    === "🐍 3️⃣.6️⃣ & 🔛"
    
        ```Python hl_lines="19-22  26-27"
        {!> ../../../docs_src/security/tutorial002.py!}
        ```
    
    === "🐍 3️⃣.1️⃣0️⃣ & 🔛"
    
        ```Python hl_lines="17-20  24-25"
        {!> ../../../docs_src/security/tutorial002_py310.py!}
        ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 4.4K bytes
    - Viewed (0)
  7. docs/en/docs/img/deployment/https/https01.drawio

                        <mxGeometry x="60" y="27" width="380" height="250" as="geometry"/>
                    </mxCell>
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 6.2K bytes
    - Viewed (0)
  8. docs/it/docs/index.md

    ## Esempio più avanzato
    
    Adesso modifica il file `main.py` per ricevere un _body_ da una richiesta `PUT`.
    
    Dichiara il _body_ usando le annotazioni di tipo standard di Python, grazie a Pydantic.
    
    ```Python hl_lines="2  7-10  23-25"
    from fastapi import FastAPI
    from pydantic import BaseModel
    from typing import Optional
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        price: float
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  9. docs/pl/docs/index.md

    ## Aktualizacja przykładu
    
    Zmodyfikuj teraz plik `main.py`, aby otrzmywał treść (body) żądania `PUT`.
    
    Zadeklaruj treść żądania, używając standardowych typów w Pythonie dzięki Pydantic.
    
    ```Python hl_lines="4  9-12  25-27"
    from typing import Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        price: float
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 19.4K bytes
    - Viewed (0)
  10. docs/ru/docs/index.md

    ## Пример обновления
    
    Теперь измените файл `main.py`, чтобы получить тело ответа из `PUT` запроса.
    
    Объявите тело, используя стандартную типизацию Python, спасибо Pydantic.
    
    ```Python hl_lines="4  9-12  25-27"
    from typing import Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        price: float
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 25.8K bytes
    - Viewed (0)
Back to top