- Sort Score
- Num 10 results
- Language All
Results 391 - 400 of 1,543 for item (0.02 seconds)
-
tests/test_stream_bare_type.py
from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel class Item(BaseModel): name: str app = FastAPI() @app.get("/items/stream-bare-async") async def stream_bare_async() -> AsyncIterable: yield {"name": "foo"} @app.get("/items/stream-bare-sync") def stream_bare_sync() -> Iterable: yield {"name": "bar"} client = TestClient(app)Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 27 18:56:47 GMT 2026 - 1.1K bytes - Click Count (0) -
tests/test_dependency_after_yield_streaming.py
class Session: def __init__(self) -> None: self.data = ["foo", "bar", "baz"] self.open = True def __iter__(self) -> Generator[str, None, None]: for item in self.data: if self.open: yield item else: raise ValueError("Session closed") @contextmanager def acquire_session() -> Generator[Session, None, None]: session = Session() try:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 3.2K bytes - Click Count (0) -
docs_src/path_params_numeric_validations/tutorial002_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 265 bytes - Click Count (0) -
src/main/java/org/codelibs/fess/job/JsonIndexExportFormatter.java
Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Sat Feb 07 10:31:36 GMT 2026 - 4.3K bytes - Click Count (0) -
src/main/webapp/WEB-INF/view/admin/badword/admin_badword_upload.jsp
<ol class="breadcrumb float-sm-right"> <li class="breadcrumb-item active"><la:link href="/admin/badword"> <la:message key="labels.bad_word_link_list"/> </la:link></li> <li class="breadcrumb-item active"><la:message key="labels.bad_word_link_upload"/></li>Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Mon Feb 23 08:03:44 GMT 2026 - 5.5K bytes - Click Count (0) -
README.md
Just standard **Python**. For example, for an `int`: ```Python item_id: int ``` or for a more complex `Item` model: ```Python item: Item ``` ...and with that single declaration you get: * Editor support, including: * Completion. * Type checks. * Validation of data:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Mar 07 09:29:03 GMT 2026 - 24.3K bytes - Click Count (0) -
docs/zh/docs/tutorial/body.md
使用与声明路径和查询参数相同的方式,把它添加至*路径操作*: {* ../../docs_src/body/tutorial001_py310.py hl[16] *} ...并把其类型声明为你创建的模型 `Item`。 ## 结果 { #results } 仅使用这些 Python 类型声明,**FastAPI** 就可以: * 以 JSON 形式读取请求体。 * (在必要时)把请求体转换为对应的类型。 * 校验数据。 * 数据无效时返回清晰的错误信息,并指出错误数据的确切位置和内容。 * 把接收的数据赋值给参数 `item`。 * 因为你把函数中的参数类型声明为 `Item`,所以还能获得所有属性及其类型的编辑器支持(补全等)。 * 为你的模型生成 [JSON Schema](https://json-schema.org) 定义,如果对你的项目有意义,还可以在其他地方使用它们。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 5.9K bytes - Click Count (0) -
docs_src/path_params_numeric_validations/tutorial004_an_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 317 bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial010_py310.py
from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( q: str | None = Query( default=None, alias="item-query", title="Query string", description="Query string for the items to search in the database that have a good match", min_length=3, max_length=50, pattern="^fixedquery$", deprecated=True, ), ):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 542 bytes - Click Count (0) -
src/main/java/org/codelibs/fess/app/web/admin/storage/AdminStorageAction.java
final List<StorageItem> items = client.listObjects(prefix, fessConfig.getStorageMaxItemsInPageAsInteger()); for (final StorageItem item : items) { final Map<String, Object> map = new HashMap<>(); map.put("id", item.getEncodedId()); map.put("path", item.getPath()); map.put("name", item.getName());Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Sat Dec 13 02:21:17 GMT 2025 - 22.1K bytes - Click Count (0)