Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 64 for Tretter (0.21 sec)

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

    Validações numéricas também funcionam para valores do tipo `float`.
    
    Aqui é onde se torna importante a possibilidade de declarar <abbr title="greater than"><code>gt</code></abbr> e não apenas <abbr title="greater than or equal"><code>ge</code></abbr>. Com isso você pode especificar, por exemplo, que um valor deve ser maior que `0`, ainda que seja menor que `1`.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  2. docs/ru/docs/tutorial/path-params-numeric-validations.md

    Валидация также применима к значениям типа `float`.
    
    В этом случае становится важной возможность добавить ограничение <abbr title="greater than"><code>gt</code></abbr>, вместо <abbr title="greater than or equal"><code>ge</code></abbr>, поскольку в таком случае вы можете, например, создать ограничение, чтобы значение было больше `0`, даже если оно меньше `1`.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 14.2K bytes
    - Viewed (0)
  3. tests/test_path.py

        assert response.status_code == 422
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "greater_than",
                        "loc": ["path", "item_id"],
                        "msg": "Input should be greater than 3",
                        "input": "2",
                        "ctx": {"gt": 3.0},
                    }
                ]
            }
        ) | IsDict(
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 34.4K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_body_fields/test_tutorial001.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 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_body_fields/test_tutorial001_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 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  6. docs_src/sql_databases_peewee/sql_app/schemas.py

        class Config:
            orm_mode = True
            getter_dict = PeeweeGetterDict
    
    
    class UserBase(BaseModel):
        email: str
    
    
    class UserCreate(UserBase):
        password: str
    
    
    class User(UserBase):
        id: int
        is_active: bool
        items: List[Item] = []
    
        class Config:
            orm_mode = True
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 868 bytes
    - Viewed (0)
  7. tests/test_tutorial/test_body_fields/test_tutorial001_an.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 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_body_fields/test_tutorial001_an_py39.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 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  9. tests/test_response_change_status_code.py

    from fastapi import Depends, FastAPI, Response
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    async def response_status_setter(response: Response):
        response.status_code = 201
    
    
    async def parent_dep(result=Depends(response_status_setter)):
        return result
    
    
    @app.get("/", dependencies=[Depends(parent_dep)])
    async def get_main():
        return {"msg": "Hello World"}
    
    
    client = TestClient(app)
    
    
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Wed Apr 08 04:37:38 GMT 2020
    - 589 bytes
    - Viewed (0)
  10. docs/zh/docs/tutorial/path-params-numeric-validations.md

    ## 数值校验:大于等于
    
    使用 `Query` 和 `Path`(以及你将在后面看到的其他类)可以声明字符串约束,但也可以声明数值约束。
    
    像下面这样,添加 `ge=1` 后,`item_id` 将必须是一个大于(`g`reater than)或等于(`e`qual)`1` 的整数。
    
    ```Python hl_lines="8"
    {!../../../docs_src/path_params_numeric_validations/tutorial004.py!}
    ```
    
    ## 数值校验:大于和小于等于
    
    同样的规则适用于:
    
    * `gt`:大于(`g`reater `t`han)
    * `le`:小于等于(`l`ess than or `e`qual)
    
    ```Python hl_lines="9"
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 6.3K bytes
    - Viewed (0)
Back to top