Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 71 for Chan (0.17 sec)

  1. docs/en/docs/tutorial/path-params-numeric-validations.md

        ```
    
    ## Number validations: floats, greater than and less than
    
    Number validations also work for `float` values.
    
    Here's where it becomes important to be able to declare <abbr title="greater than"><code>gt</code></abbr> and not just <abbr title="greater than or equal"><code>ge</code></abbr>. As with it you can require, for example, that a value must be greater than `0`, even if it is less than `1`.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  2. docs/ja/docs/tutorial/path-params-numeric-validations.md

    また、数値のバリデーションを宣言することもできます:
    
    * `gt`: より大きい(`g`reater `t`han)
    * `ge`: 以上(`g`reater than or `e`qual)
    * `lt`: より小さい(`l`ess `t`han)
    * `le`: 以下(`l`ess than or `e`qual)
    
    !!! info "情報"
        `Query`、`Path`などは後に共通の`Param`クラスのサブクラスを見ることになります。(使う必要はありません)
    
        そして、それらすべては、これまで見てきた追加のバリデーションとメタデータと同じパラメータを共有しています。
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Jan 15 15:46:32 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_body_fields/test_tutorial001_an_py310.py

        assert response.status_code == 422
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "greater_than",
                        "loc": ["body", "item", "price"],
                        "msg": "Input should be greater than 0",
                        "input": -3.0,
                        "ctx": {"gt": 0.0},
                    }
                ]
            }
        ) | IsDict(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  4. tests/test_multi_body_errors.py

        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "greater_than",
                        "loc": ["body", 0, "age"],
                        "msg": "Input should be greater than 0",
                        "input": -1.0,
                        "ctx": {"gt": 0},
                    }
                ]
            }
        ) | IsDict(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/testing-dependencies.md

    You send it a token and it returns an authenticated user.
    
    This provider might be charging you per request, and calling it might take some extra time than if you had a fixed mock user for tests.
    
    You probably want to test the external provider once, but not necessarily call it for every test that runs.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/header-params.md

    You can define those cases using a list in the type declaration.
    
    You will receive all the values from the duplicate header as a Python `list`.
    
    For example, to declare a header of `X-Token` that can appear more than once, you can write:
    
    === "Python 3.10+"
    
        ```Python hl_lines="9"
        {!> ../../../docs_src/header_params/tutorial003_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="9"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/events.md

    ```Python hl_lines="8"
    {!../../../docs_src/events/tutorial001.py!}
    ```
    
    In this case, the `startup` event handler function will initialize the items "database" (just a `dict`) with some values.
    
    You can add more than one event handler function.
    
    And your application won't start receiving requests until all the `startup` event handlers have completed.
    
    ### `shutdown` event
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  8. docs/en/docs/how-to/separate-openapi-schemas.md

    # Separate OpenAPI Schemas for Input and Output or Not
    
    When using **Pydantic v2**, the generated OpenAPI is a bit more exact and **correct** than before. 😎
    
    In fact, in some cases, it will even have **two JSON Schemas** in OpenAPI for the same Pydantic model, for input and output, depending on if they have **default values**.
    
    Let's see how that works and how to change it if you need to do that.
    
    ## Pydantic Models for Input and Output
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 6.7K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/dependencies/classes-as-dependencies.md

        ```Python hl_lines="19"
        {!> ../../../docs_src/dependencies/tutorial004.py!}
        ```
    
    ...and **FastAPI** will know what to do.
    
    !!! tip
        If that seems more confusing than helpful, disregard it, you don't *need* it.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/sql-databases.md

    # SQL (Relational) Databases
    
    !!! info
        These docs are about to be updated. 🎉
    
        The current version assumes Pydantic v1, and SQLAlchemy versions less than 2.0.
    
        The new docs will include Pydantic v2 and will use <a href="https://sqlmodel.tiangolo.com/" class="external-link" target="_blank">SQLModel</a> (which is also based on SQLAlchemy) once it is updated to use Pydantic v2 as well.
    
    **FastAPI** doesn't require you to use a SQL (relational) database.
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 29.6K bytes
    - Viewed (0)
Back to top