Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 215 for NOTE (0.2 sec)

  1. docs/zh/docs/index.md

    @app.get("/")
    async def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    async def read_item(item_id: int, q: Union[str, None] = None):
        return {"item_id": item_id, "q": q}
    ```
    
    **Note**:
    
    如果你不知道是否会用到,可以查看文档的 _"In a hurry?"_ 章节中 <a href="https://fastapi.tiangolo.com/zh/async/#in-a-hurry" target="_blank">关于 `async` 和 `await` 的部分</a>。
    
    </details>
    
    ### 运行
    
    通过以下命令运行服务器:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 29 05:18:04 GMT 2024
    - 18.2K bytes
    - Viewed (0)
  2. docs/de/docs/tutorial/path-operation-configuration.md

        ```Python hl_lines="3  17"
        {!> ../../../docs_src/path_operation_configuration/tutorial001.py!}
        ```
    
    Dieser Statuscode wird in der Response verwendet und zum OpenAPI-Schema hinzugefügt.
    
    !!! note "Technische Details"
        Sie können auch `from starlette import status` verwenden.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:07:48 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  3. docs/ru/docs/deployment/docker.md

        Опция `--no-cache-dir` указывает `pip` не сохранять загружаемые библиотеки на локальной машине для использования их в случае повторной загрузки. В контейнере, в случае пересборки этого шага, они всё равно будут удалены.
    
        !!! note "Заметка"
            Опция `--no-cache-dir` нужна только для `pip`, она никак не влияет на Docker или контейнеры.
    
        Опция `--upgrade` указывает `pip` обновить библиотеки, емли они уже установлены.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 57.5K bytes
    - Viewed (0)
  4. docs/de/docs/advanced/websockets.md

    ```
    
    ## Einen `websocket` erstellen
    
    Erstellen Sie in Ihrer **FastAPI**-Anwendung einen `websocket`:
    
    ```Python hl_lines="1  46-47"
    {!../../../docs_src/websockets/tutorial001.py!}
    ```
    
    !!! note "Technische Details"
        Sie können auch `from starlette.websockets import WebSocket` verwenden.
    
    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)
  5. docs/zh/docs/tutorial/header-params.md

        ```
    
    === "Python 3.8+ non-Annotated"
    
        !!! tip
            尽可能选择使用 `Annotated` 的版本。
    
        ```Python hl_lines="9"
        {!> ../../../docs_src/header_params/tutorial001.py!}
        ```
    
    !!! note "技术细节"
    
        `Header` 是 `Path`、`Query`、`Cookie` 的**兄弟类**,都继承自共用的 `Param` 类。
    
        注意,从 `fastapi` 导入的 `Query`、`Path`、`Header` 等对象,实际上是返回特殊类的函数。
    
    !!! info "说明"
    
        必须使用 `Header` 声明 header 参数,否则该参数会被解释为查询参数。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 22:42:51 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  6. docs/pt/docs/async.md

    ```
    
    Então, declare sua *função de operação de rota* com `async def` como:
    
    ```Python hl_lines="2"
    @app.get('/')
    async def read_results():
        results = await some_library()
        return results
    ```
    
    !!! note
        Você só pode usar `await` dentro de funções criadas com `async def`.
    
    ---
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 22.2K bytes
    - Viewed (0)
  7. docs/fr/docs/async.md

    ```
    Alors, déclarez vos *fonctions de chemins* avec `async def` comme ceci :
    
    ```Python hl_lines="2"
    @app.get('/')
    async def read_results():
        results = await some_library()
        return results
    ```
    
    !!! note
        Vous pouvez uniquement utiliser `await` dans les fonctions créées avec `async def`.
    
    ---
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Mar 31 23:52:53 GMT 2024
    - 24K bytes
    - Viewed (0)
  8. docs/de/docs/tutorial/response-status-code.md

    <img src="/img/tutorial/response-status-code/image01.png">
    
    !!! note "Hinweis"
        Einige Responsecodes (siehe nächster Abschnitt) kennzeichnen, dass die Response keinen Body hat.
    
        FastAPI versteht das und wird in der OpenAPI-Dokumentation anzeigen, dass es keinen Responsebody gibt.
    
    ## Über HTTP-Statuscodes
    
    !!! note "Hinweis"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:32:57 GMT 2024
    - 4.7K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/security/first-steps.md

    And if you click it, you have a little authorization form to type a `username` and `password` (and other optional fields):
    
    <img src="/img/tutorial/security/image02.png">
    
    !!! note
        It doesn't matter what you type in the form, it won't work yet. But we'll get there.
    
    This is of course not the frontend for the final users, but it's a great automatic tool to document interactively all your API.
    
    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)
  10. docs/zh/docs/tutorial/response-status-code.md

    它可以:
    
    * 在响应中返回状态码
    * 在 OpenAPI 概图(及用户界面)中存档:
    
    <img src="/img/tutorial/response-status-code/image01.png">
    
    !!! note "笔记"
    
        某些响应状态码表示响应没有响应体(参阅下一章)。
    
        FastAPI 可以进行识别,并生成表明无响应体的 OpenAPI 文档。
    
    ## 关于 HTTP 状态码
    
    !!! note "笔记"
    
        如果已经了解 HTTP 状态码,请跳到下一章。
    
    在 HTTP 协议中,发送 3 位数的数字状态码是响应的一部分。
    
    这些状态码都具有便于识别的关联名称,但是重要的还是数字。
    
    简言之:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 22:40:18 GMT 2024
    - 3.7K bytes
    - Viewed (0)
Back to top