Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 101 - 110 of 914 for Tip (0.02 seconds)

  1. docs/en/docs/advanced/index.md

    The main [Tutorial - User Guide](../tutorial/index.md) should be enough to give you a tour through all the main features of **FastAPI**.
    
    In the next sections you will see other options, configurations, and additional features.
    
    /// tip
    
    The next sections are **not necessarily "advanced"**.
    
    And it's possible that for your use case, the solution is in one of them.
    
    ///
    
    ## Read the Tutorial first { #read-the-tutorial-first }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 757 bytes
    - Click Count (0)
  2. docs/zh/docs/how-to/authentication-error-status-code.md

    例如,你可以创建一个 `HTTPBearer` 的子类,使其返回 `403 Forbidden` 错误,而不是默认的 `401 Unauthorized` 错误:
    
    {* ../../docs_src/authentication_error_status_code/tutorial001_an_py310.py hl[9:13] *}
    
    /// tip | 提示
    
    注意该函数返回的是异常实例,而不是直接抛出它。抛出操作由其余的内部代码完成。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 1.1K bytes
    - Click Count (0)
  3. docs/ja/docs/how-to/custom-request-and-route.md

    gzip のリクエストを解凍するために、カスタムの `Request` サブクラスを使う方法を見ていきます。
    
    そして、そのカスタムリクエストクラスを使うための `APIRoute` サブクラスを用意します。
    
    ### カスタム `GzipRequest` クラスの作成 { #create-a-custom-gziprequest-class }
    
    /// tip | 豆知識
    
    これは仕組みを示すためのサンプルです。Gzip 対応が必要な場合は、用意されている [`GzipMiddleware`](../advanced/middleware.md#gzipmiddleware) を使用できます。
    
    ///
    
    まず、`GzipRequest` クラスを作成します。これは適切なヘッダーがある場合に本体を解凍するよう、`Request.body()` メソッドを上書きします。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 5.4K bytes
    - Click Count (0)
  4. docs/ja/docs/how-to/graphql.md

    # GraphQL { #graphql }
    
    **FastAPI** は **ASGI** 標準に基づいているため、ASGI に対応した任意の **GraphQL** ライブラリを簡単に統合できます。
    
    同じアプリケーション内で通常の FastAPI の *path operation* と GraphQL を組み合わせて使えます。
    
    /// tip | 豆知識
    
    **GraphQL** は非常に特定のユースケースを解決します。
    
    一般的な **Web API** と比べると、**長所** と **短所** があります。
    
    ご自身のユースケースで得られる **利点** が **欠点** を補うかどうかを評価してください。 🤓
    
    ///
    
    ## GraphQL ライブラリ { #graphql-libraries }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 3.2K bytes
    - Click Count (0)
  5. docs/en/docs/tutorial/sql-databases.md

    **SQLModel** is built on top of [SQLAlchemy](https://www.sqlalchemy.org/) and Pydantic. It was made by the same author of **FastAPI** to be the perfect match for FastAPI applications that need to use **SQL databases**.
    
    /// tip
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Mar 07 09:29:03 GMT 2026
    - 15.3K bytes
    - Click Count (0)
  6. docs/en/docs/tutorial/response-model.md

    FastAPI will use this `response_model` to do all the data documentation, validation, etc. and also to **convert and filter the output data** to its type declaration.
    
    /// tip
    
    If you have strict type checks in your editor, mypy, etc, you can declare the function return type as `Any`.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 15.5K bytes
    - Click Count (0)
  7. docs/zh-hant/docs/tutorial/server-sent-events.md

    看起來像這樣:
    
    ```
    data: {"name": "Portal Gun", "price": 999.99}
    
    data: {"name": "Plumbus", "price": 32.99}
    
    ```
    
    SSE 常用於 AI 聊天串流、即時通知、日誌與可觀察性,以及其他由伺服器主動推送更新給用戶端的情境。
    
    /// tip
    
    如果你要串流二進位資料,例如影片或音訊,請參考進階指南:[串流資料](../advanced/stream-data.md)。
    
    ///
    
    ## 使用 FastAPI 串流 SSE { #stream-sse-with-fastapi }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:33:04 GMT 2026
    - 4.6K bytes
    - Click Count (0)
  8. docs/en/docs/tutorial/path-params-numeric-validations.md

    ///
    
    ## Order the parameters as you need { #order-the-parameters-as-you-need }
    
    /// tip
    
    This is probably not as important or necessary if you use `Annotated`.
    
    ///
    
    Let's say that you want to declare the query parameter `q` as a required `str`.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 6.1K bytes
    - Click Count (0)
  9. docs/en/docs/advanced/advanced-python-types.md

    ```python
    from typing import Union
    
    
    def say_hi(name: Union[str, None]):
            print(f"Hi {name}!")
    ```
    
    `typing` also has a shortcut to declare that something could be `None`, with `Optional`.
    
    Here's a tip from my very **subjective** point of view:
    
    * 🚨 Avoid using `Optional[SomeType]`
    * Instead ✨ **use `Union[SomeType, None]`** ✨.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Feb 11 18:32:12 GMT 2026
    - 2K bytes
    - Click Count (0)
  10. docs/ja/docs/advanced/openapi-callbacks.md

    `Invoice` ボディを受け取り、クエリパラメータ `callback_url` にコールバック用の URL を含める *path operation* を持ちます。
    
    この部分はとても普通で、ほとんどのコードはすでに見覚えがあるはずです:
    
    {* ../../docs_src/openapi_callbacks/tutorial001_py310.py hl[7:11,34:51] *}
    
    /// tip | 豆知識
    
    `callback_url` クエリパラメータは、Pydantic の [Url](https://docs.pydantic.dev/latest/api/networks/) 型を使用します。
    
    ///
    
    唯一の新しい点は、*path operation デコレータ*の引数として `callbacks=invoices_callback_router.routes` を渡すことです。これが何かは次で見ます。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 9.3K bytes
    - Click Count (0)
Back to Top