- Sort Score
- Result 10 results
- Languages All
Results 641 - 650 of 1,046 for fo2o (0.03 sec)
-
docs_src/dependencies/tutorial004_py310.py
from fastapi import Depends, FastAPI app = FastAPI() fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}] class CommonQueryParams: def __init__(self, q: str | None = None, skip: int = 0, limit: int = 100): self.q = q self.skip = skip self.limit = limit @app.get("/items/") async def read_items(commons: CommonQueryParams = Depends()): response = {}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 607 bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial001b.py
client = TestClient(app) def test_get_custom_response(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [{"item_id": "Foo"}] def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1K bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial009_an_py39.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 327 bytes - Viewed (0) -
docs_src/additional_responses/tutorial002.py
} }, ) async def read_item(item_id: str, img: Union[bool, None] = None): if img: return FileResponse("image.png", media_type="image/png") else:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 628 bytes - Viewed (0) -
docs_src/dependencies/tutorial006_an.py
raise HTTPException(status_code=400, detail="X-Key header invalid") return x_key @app.get("/items/", dependencies=[Depends(verify_token), Depends(verify_key)]) async def read_items():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 643 bytes - Viewed (0) -
docs_src/dependencies/tutorial006_an_py39.py
raise HTTPException(status_code=400, detail="X-Key header invalid") return x_key @app.get("/items/", dependencies=[Depends(verify_token), Depends(verify_key)]) async def read_items():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 633 bytes - Viewed (0) -
docs/zh/docs/tutorial/query-params-str-validations.md
{!../../docs_src/query_params_str_validations/tutorial011.py!} ``` 然后,输入如下网址: ``` http://localhost:8000/items/?q=foo&q=bar ``` 你会在*路径操作函数*的*函数参数* `q` 中以一个 Python `list` 的形式接收到*查询参数* `q` 的多个值(`foo` 和 `bar`)。 因此,该 URL 的响应将会是: ```JSON { "q": [ "foo", "bar" ] } ``` /// tip 要声明类型为 `list` 的查询参数,如上例所示,你需要显式地使用 `Query`,否则该参数将被解释为请求体。 ///
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.2K bytes - Viewed (0) -
compat/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/reflection/MethodMap.java
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 14.2K bytes - Viewed (0) -
src/bytes/example_test.go
} func ExampleEqualFold() { fmt.Println(bytes.EqualFold([]byte("Go"), []byte("go"))) // Output: true } func ExampleFields() { fmt.Printf("Fields are: %q", bytes.Fields([]byte(" foo bar baz "))) // Output: Fields are: ["foo" "bar" "baz"] } func ExampleFieldsFunc() { f := func(c rune) bool { return !unicode.IsLetter(c) && !unicode.IsNumber(c) }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 07 17:22:36 UTC 2024 - 14.9K bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial003_an.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 372 bytes - Viewed (0)