- Sort Score
- Num 10 results
- Language All
Results 271 - 280 of 785 for iter (0.03 seconds)
-
docs_src/extra_models/tutorial004_py39.py
from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str items = [ {"name": "Foo", "description": "There comes my hero"}, {"name": "Red", "description": "It's my aeroplane"}, ] @app.get("/items/", response_model=list[Item]) async def read_items():
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 356 bytes - Click Count (0) -
tests/test_tutorial/test_path_params_numeric_validations/test_tutorial001.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 5.6K bytes - Click Count (0) -
docs_src/path_params_numeric_validations/tutorial001_py39.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})
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 364 bytes - Click Count (0) -
docs/es/docs/how-to/separate-openapi-schemas.md
Y si revisas todos los esquemas disponibles (JSON Schemas) en OpenAPI, verás que hay dos, uno `Item-Input` y uno `Item-Output`. Para `Item-Input`, `description` **no es requerido**, no tiene un asterisco rojo. Pero para `Item-Output`, `description` **es requerido**, tiene un asterisco rojo. <div class="screenshot"> <img src="/img/tutorial/separate-openapi-schemas/image04.png">
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Dec 16 16:33:45 GMT 2025 - 4.8K bytes - Click Count (0) -
docs/pt/docs/how-to/separate-openapi-schemas.md
E se você verificar todos os Schemas disponíveis (JSON Schemas) no OpenAPI, verá que há dois, um `Item-Input` e um `Item-Output`. Para `Item-Input`, `description` **não é obrigatório**, não tem um asterisco vermelho. Mas para `Item-Output`, `description` **é obrigatório**, tem um asterisco vermelho. <div class="screenshot"> <img src="/img/tutorial/separate-openapi-schemas/image04.png">
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Nov 12 16:23:57 GMT 2025 - 4.8K bytes - Click Count (0) -
scripts/mkdocs_hooks.py
for item in items: if isinstance(item, str): resolve_file(item=item, files=files, config=config) elif isinstance(item, dict): assert len(item) == 1 values = list(item.values()) if not values: continue if isinstance(values[0], str): resolve_file(item=values[0], files=files, config=config)Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 5.6K bytes - Click Count (0) -
docs_src/handling_errors/tutorial001_py39.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 299 bytes - Click Count (0) -
docs_src/python_types/tutorial008b_py310.py
def process_item(item: int | str):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 51 bytes - Click Count (0) -
docs/zh/docs/advanced/templates.md
/// ## 编写模板 编写模板 `templates/item.html`,代码如下: ```jinja hl_lines="7" {!../../docs_src/templates/templates/item.html!} ``` ### 模板上下文 在包含如下语句的html中: {% raw %} ```jinja Item ID: {{ id }} ``` {% endraw %} ...这将显示你从"context"字典传递的 `id`: ```Python {"id": id} ``` 例如。当ID为 `42`时, 会渲染成: ```html Item ID: 42 ``` ### 模板 `url_for` 参数Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Oct 11 17:48:49 GMT 2025 - 2.7K bytes - Click Count (0) -
docs_src/handling_errors/tutorial002_py39.py
@app.get("/items-header/{item_id}") async def read_item_header(item_id: str): if item_id not in items: raise HTTPException( status_code=404, detail="Item not found", headers={"X-Error": "There goes my error"}, )
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 404 bytes - Click Count (0)