- Sort Score
- Num 10 results
- Language All
Results 911 - 920 of 1,543 for item (0.02 seconds)
-
docs/zh-hant/docs/advanced/security/oauth2-scopes.md
現在我們宣告 `/users/me/items/` 這個路徑操作需要 `items` 這個 scope。 為此,我們從 `fastapi` 匯入並使用 `Security`。 你可以使用 `Security` 來宣告相依性(就像 `Depends`),但 `Security` 也能接收參數 `scopes`,其為 scopes(字串)的列表。 在這裡,我們將相依函式 `get_current_active_user` 傳給 `Security`(就像使用 `Depends` 一樣)。 但同時也傳入一個 `list` 的 scopes,這裡只有一個 scope:`items`(當然也可以有更多)。
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 12.7K bytes - Click Count (0) -
docs_src/dependencies/tutorial003_py310.py
self.q = q self.skip = skip self.limit = limit @app.get("/items/") async def read_items(commons=Depends(CommonQueryParams)): response = {} if commons.q: response.update({"q": commons.q}) items = fake_items_db[commons.skip : commons.skip + commons.limit] response.update({"items": items})Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 603 bytes - Click Count (0) -
src/test/java/org/codelibs/fess/suggest/request/suggest/SuggestRequestBuilderTest.java
assertNotNull(response); } @Test public void test_addLang() throws Exception { SuggestItem[] items = new SuggestItem[1]; String[][] readings = new String[1][]; readings[0] = new String[] { "test" }; items[0] = new SuggestItem(new String[] { "test" }, readings, new String[] { "content" }, 1, 0, -1, new String[] { "tag1" },Created: Fri Apr 17 09:08:13 GMT 2026 - Last Modified: Mon Nov 24 03:40:05 GMT 2025 - 6.1K bytes - Click Count (0) -
compat/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultResolutionErrorHandler.java
request.getArtifact(), request.getRemoteRepositories()); } } private static <T> List<T> toList(Collection<T> items) { return (items != null) ? new ArrayList<>(items) : null; }
Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Fri Jun 06 14:28:57 GMT 2025 - 2.7K bytes - Click Count (0) -
docs_src/path_operation_configuration/tutorial006_py310.py
from fastapi import FastAPI app = FastAPI() @app.get("/items/", tags=["items"]) async def read_items(): return [{"name": "Foo", "price": 42}] @app.get("/users/", tags=["users"]) async def read_users(): return [{"username": "johndoe"}] @app.get("/elements/", tags=["items"], deprecated=True) async def read_elements():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 365 bytes - Click Count (0) -
tests/test_route_scope.py
response = client.post("/usersx/rick") assert response.status_code == 404, response.text def test_websocket(): with client.websocket_connect("/items/portal-gun") as websocket: data = websocket.receive_json() assert data == {"item_id": "portal-gun", "path": "/items/{item_id}"} def test_websocket_invalid_path_doesnt_match(): with pytest.raises(WebSocketDisconnect):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Sep 29 03:29:38 GMT 2025 - 1.5K bytes - Click Count (0) -
docs/ko/docs/tutorial/path-params.md
이 예제를 실행하고 [http://127.0.0.1:8000/items/3](http://127.0.0.1:8000/items/3)을 열면, 다음 응답을 볼 수 있습니다: ```JSON {"item_id":3} ``` /// check | 확인 함수가 받은(반환도 하는) 값은 문자열 `"3"`이 아니라 파이썬 `int` 형인 `3`입니다. 즉, 타입 선언을 하면 **FastAPI**는 자동으로 요청을 <dfn title="HTTP 요청에서 전달되는 문자열을 파이썬 데이터로 변환">"파싱"</dfn>합니다. /// ## 데이터 검증 { #data-validation }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 9.9K bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial008_an_py310.py
from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( q: Annotated[ str | None, Query( title="Query string", description="Query string for the items to search in the database that have a good match", min_length=3, ), ] = None, ): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 498 bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial006c_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 15 16:23:59 GMT 2025 - 261 bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial005_py310.py
from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items(q: str = Query(default="fixedquery", min_length=3)): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 276 bytes - Click Count (0)