- Sort Score
- Num 10 results
- Language All
Results 611 - 620 of 1,091 for Fstr (0.02 seconds)
-
tests/test_modules_same_name_body/app/b.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 161 bytes - Click Count (0) -
docs_src/python_types/tutorial011_py310.py
from datetime import datetime from pydantic import BaseModel class User(BaseModel): id: int name: str = "John Doe" signup_ts: datetime | None = None friends: list[int] = [] external_data = { "id": "123", "signup_ts": "2017-06-01 12:22", "friends": [1, "2", b"3"], } user = User(**external_data) print(user)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Sep 02 15:56:35 GMT 2023 - 461 bytes - Click Count (0) -
docs_src/dependencies/tutorial001_an_py310.py
from typing import Annotated from fastapi import Depends, FastAPI app = FastAPI() async def common_parameters(q: str | None = None, skip: int = 0, limit: int = 100): return {"q": q, "skip": skip, "limit": limit} @app.get("/items/") async def read_items(commons: Annotated[dict, Depends(common_parameters)]): return commons @app.get("/users/") async def read_users(commons: Annotated[dict, Depends(common_parameters)]):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 454 bytes - Click Count (0) -
tests/test_stringified_annotations_simple.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 545 bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial012_an_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 227 bytes - Click Count (0) -
docs_src/handling_errors/tutorial005_py310.py
return JSONResponse( status_code=422, content=jsonable_encoder({"detail": exc.errors(), "body": exc.body}), ) class Item(BaseModel): title: str size: int @app.post("/items/") async def create_item(item: Item):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 626 bytes - Click Count (0) -
docs/de/docs/tutorial/query-params.md
Aber wenn Sie wollen, dass ein Query-Parameter erforderlich ist, vergeben Sie einfach keinen Defaultwert: {* ../../docs_src/query_params/tutorial005_py310.py hl[6:7] *} Hier ist `needy` ein erforderlicher Query-Parameter vom Typ `str`. Wenn Sie in Ihrem Browser eine URL wie: ``` http://127.0.0.1:8000/items/foo-item ``` ... öffnen, ohne den benötigten Parameter `needy`, dann erhalten Sie einen Fehler wie den folgenden:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:58:09 GMT 2026 - 4.9K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/path-operation-configuration.md
你也可以使用 `from starlette import status`。 **FastAPI** 提供與 `starlette.status` 相同的 `fastapi.status`,僅為了方便你這位開發者,但它其實直接來自 Starlette。 /// ## 標籤 { #tags } 你可以為「路徑操作」加入標籤,傳入參數 `tags`,其值為由 `str` 組成的 `list`(通常只是一個 `str`): {* ../../docs_src/path_operation_configuration/tutorial002_py310.py hl[15,20,25] *} 這些標籤會被加入到 OpenAPI 結構描述,並由自動化文件介面使用: <img src="/img/tutorial/path-operation-configuration/image01.png">Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 3.8K bytes - Click Count (0) -
docs/es/docs/features.md
```Python from datetime import date from pydantic import BaseModel # Declara una variable como un str # y obtiene soporte del editor dentro de la función def main(user_id: str): return user_id # Un modelo de Pydantic class User(BaseModel): id: int name: str joined: date ``` Que luego puede ser usado como: ```Python
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:15:55 GMT 2026 - 10.1K bytes - Click Count (0) -
docs/es/docs/tutorial/path-params.md
### Crear una clase `Enum` { #create-an-enum-class } Importa `Enum` y crea una subclase que herede de `str` y de `Enum`. Al heredar de `str`, la documentación de la API podrá saber que los valores deben ser de tipo `string` y podrá representarlos correctamente. Luego crea atributos de clase con valores fijos, que serán los valores válidos disponibles:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:15:55 GMT 2026 - 9.4K bytes - Click Count (0)