Search Options

Results per page
Sort
Preferred Languages
Advance

Results 911 - 920 of 1,080 for Str (0.02 sec)

  1. tests/test_tutorial/test_query_params_str_validations/test_tutorial010.py

                        "ctx": {"pattern": "^fixedquery$"},
                        "loc": ["query", "item-query"],
                        "msg": 'string does not match regex "^fixedquery$"',
                        "type": "value_error.str.regex",
                    }
                ]
            }
        )
    
    
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_query_params_str_validations/test_tutorial010_an_py310.py

                        "ctx": {"pattern": "^fixedquery$"},
                        "loc": ["query", "item-query"],
                        "msg": 'string does not match regex "^fixedquery$"',
                        "type": "value_error.str.regex",
                    }
                ]
            }
        )
    
    
    @needs_py310
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  3. docs/de/docs/advanced/security/oauth2-scopes.md

    Dazu aktualisieren wir das Pydantic-Modell `TokenData` mit einem neuen Attribut `scopes`.
    
    Durch die Validierung der Daten mit Pydantic können wir sicherstellen, dass wir beispielsweise präzise eine `list`e von `str`s mit den Scopes und einen `str` mit dem `username` haben.
    
    Anstelle beispielsweise eines `dict`s oder etwas anderem, was später in der Anwendung zu Fehlern führen könnte und darum ein Sicherheitsrisiko darstellt.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 22.5K bytes
    - Viewed (0)
  4. docs/ko/docs/tutorial/request-files.md

    ### `UploadFile`
    
    `UploadFile` 은 다음과 같은 어트리뷰트가 있습니다:
    
    * `filename` : 문자열(`str`)로 된 업로드된 파일의 파일명입니다 (예: `myimage.jpg`).
    * `content_type` : 문자열(`str`)로 된 파일 형식(MIME type / media type)입니다 (예: `image/jpeg`).
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  5. docs/vi/docs/features.md

    ```Python
    from datetime import date
    
    from pydantic import BaseModel
    
    # Declare a variable as a str
    # and get editor support inside the function
    def main(user_id: str):
        return user_id
    
    
    # A Pydantic model
    class User(BaseModel):
        id: int
        name: str
        joined: date
    ```
    
    Sau đó có thể được sử dụng:
    
    ```Python
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  6. docs/zh/docs/features.md

    编写带有类型标注的标准 Python:
    
    ```Python
    from datetime import date
    
    from pydantic import BaseModel
    
    # Declare a variable as a str
    # and get editor support inside the function
    def main(user_id: str):
        return user_id
    
    
    # A Pydantic model
    class User(BaseModel):
        id: int
        name: str
        joined: date
    ```
    
    可以像这样来使用:
    
    ```Python
    my_user: User = User(id=3, name="John Doe", joined="2018-07-19")
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  7. docs/zh/docs/tutorial/request-files.md

    ### `UploadFile`
    
    `UploadFile` 的属性如下:
    
    * `filename`:上传文件名字符串(`str`),例如, `myimage.jpg`;
    * `content_type`:内容类型(MIME 类型 / 媒体类型)字符串(`str`),例如,`image/jpeg`;
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  8. docs/ru/docs/tutorial/dependencies/sub-dependencies.md

    async def needy_dependency(fresh_value: Annotated[str, Depends(get_value, use_cache=False)]):
        return {"fresh_value": fresh_value}
    ```
    
    ////
    
    //// tab | Python 3.6+ без Annotated
    
    /// tip | "Подсказка"
    
    Предпочтительнее использовать версию с аннотацией, если это возможно.
    
    ///
    
    ```Python hl_lines="1"
    async def needy_dependency(fresh_value: str = Depends(get_value, use_cache=False)):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  9. docs/de/docs/tutorial/response-model.md

    ```Python hl_lines="11  13-14"
    {!> ../../docs_src/response_model/tutorial004.py!}
    ```
    
    ////
    
    * `description: Union[str, None] = None` (oder `str | None = None` in Python 3.10) hat einen Defaultwert `None`.
    * `tax: float = 10.5` hat einen Defaultwert `10.5`.
    * `tags: List[str] = []` hat eine leere Liste als Defaultwert: `[]`.
    
    Aber Sie möchten diese vielleicht vom Resultat ausschließen, wenn Sie gar nicht gesetzt wurden.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 19.8K bytes
    - Viewed (0)
  10. docs/ko/docs/tutorial/path-params-numeric-validations.md

    ```
    
    /// note | "참고"
    
    경로 매개변수는 경로의 일부여야 하므로 언제나 필수적입니다.
    
    즉, `...`로 선언해서 필수임을 나타내는게 좋습니다.
    
    그럼에도 `None`으로 선언하거나 기본값을 지정할지라도 아무 영향을 끼치지 않으며 언제나 필수입니다.
    
    ///
    
    ## 필요한 경우 매개변수 정렬하기
    
    `str` 형인 쿼리 매개변수 `q`를 필수로 선언하고 싶다고 해봅시다.
    
    해당 매개변수에 대해 아무런 선언을 할 필요가 없으므로 `Query`를 정말로 써야할 필요는 없습니다.
    
    하지만 `item_id` 경로 매개변수는 여전히 `Path`를 사용해야 합니다.
    
    파이썬은 "기본값"이 없는 값 앞에 "기본값"이 있는 값을 입력하면 불평합니다.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 5.5K bytes
    - Viewed (0)
Back to top