- Sort Score
- Result 10 results
- Languages All
Results 711 - 720 of 1,080 for Str (0.04 sec)
-
docs_src/bigger_applications/app_an/routers/users.py
@router.get("/users/me", tags=["users"]) async def read_user_me(): return {"username": "fakecurrentuser"} @router.get("/users/{username}", tags=["users"]) async def read_user(username: str):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 407 bytes - Viewed (0) -
tests/test_response_model_as_return_annotation.py
from fastapi.testclient import TestClient from pydantic import BaseModel class BaseUser(BaseModel): name: str class User(BaseUser): surname: str class DBUser(User): password_hash: str class Item(BaseModel): name: str price: float app = FastAPI() @app.get("/no_response_model-no_annotation-return_model")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Aug 14 09:49:57 UTC 2023 - 47.7K bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial005_an_py39.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 331 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial004_an.py
from typing import Union from fastapi import FastAPI, Query from typing_extensions import Annotated app = FastAPI() @app.get("/items/") async def read_items( q: Annotated[ Union[str, None], Query(min_length=3, max_length=50, pattern="^fixedquery$") ] = None, ): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 410 bytes - Viewed (0) -
schema/utils.go
"reflect" "regexp" "strings" "gorm.io/gorm/clause" "gorm.io/gorm/utils" ) var embeddedCacheKey = "embedded_cache_store" func ParseTagSetting(str string, sep string) map[string]string { settings := map[string]string{} names := strings.Split(str, sep) for i := 0; i < len(names); i++ { j := i if len(names[j]) > 0 { for { if names[j][len(names[j])-1] == '\\' { i++
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Aug 19 13:35:14 UTC 2023 - 5.5K bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial001.py
from typing import Union from fastapi import FastAPI, Path, Query app = FastAPI() @app.get("/items/{item_id}") async def read_items( item_id: int = Path(title="The ID of the item to get"), q: Union[str, None] = Query(default=None, alias="item-query"), ): results = {"item_id": item_id} if q: results.update({"q": q})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 364 bytes - Viewed (0) -
src/main/java/jcifs/smb/SID.java
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Sun Jul 01 13:12:10 UTC 2018 - 14.9K bytes - Viewed (0) -
docs/zh/docs/tutorial/body-nested-models.md
* 数据转换 * 数据校验 * 自动生成文档 ## 特殊的类型和校验 除了普通的单一值类型(如 `str`、`int`、`float` 等)外,你还可以使用从 `str` 继承的更复杂的单一值类型。 要了解所有的可用选项,请查看关于 <a href="https://docs.pydantic.dev/latest/concepts/types/" class="external-link" target="_blank">来自 Pydantic 的外部类型</a> 的文档。你将在下一章节中看到一些示例。 例如,在 `Image` 模型中我们有一个 `url` 字段,我们可以把它声明为 Pydantic 的 `HttpUrl`,而不是 `str`: //// tab | Python 3.10+ ```Python hl_lines="2 8"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.2K bytes - Viewed (0) -
docs/en/docs/tutorial/request-files.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10.2K bytes - Viewed (0) -
docs/ko/docs/tutorial/response-model.md
## 응답 모델 인코딩 매개변수 응답 모델은 아래와 같이 기본값을 가질 수 있습니다: ```Python hl_lines="11 13-14" {!../../docs_src/response_model/tutorial004.py!} ``` * `description: Optional[str] = None`은 기본값으로 `None`을 갖습니다. * `tax: float = 10.5`는 기본값으로 `10.5`를 갖습니다. * `tags: List[str] = []` 빈 리스트의 기본값으로: `[]`. 그러나 실제로 저장되지 않았을 경우 결과에서 값을 생략하고 싶을 수 있습니다. 예를 들어, NoSQL 데이터베이스에 많은 선택적 속성이 있는 모델이 있지만, 기본값으로 가득 찬 매우 긴 JSON 응답을 보내고 싶지 않습니다.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.1K bytes - Viewed (0)