- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 473 for blivit (0.11 sec)
-
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)]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 454 bytes - Viewed (0) -
docs_src/dependencies/tutorial001_an.py
from fastapi import Depends, FastAPI from typing_extensions import Annotated app = FastAPI() async def common_parameters( q: Union[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/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 502 bytes - Viewed (0) -
internal/store/queuestore.go
func NewQueueStore[I any](directory string, limit uint64, ext string) *QueueStore[I] { if limit == 0 { limit = defaultLimit } if ext == "" { ext = defaultExt } return &QueueStore[I]{ directory: directory, entryLimit: limit, fileExt: ext, entries: make(map[string]int64, limit), } } // Open - Creates the directory if not present.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 8.6K bytes - Viewed (0) -
tests/test_tutorial/test_testing_dependencies/test_tutorial001_py310.py
assert response.json() == { "message": "Hello Users!", "params": {"q": "foo", "skip": 5, "limit": 10}, } @needs_py310 def test_override_in_users_with_params(): from docs_src.dependency_testing.tutorial001_py310 import client response = client.get("/users/?q=foo&skip=100&limit=200") assert response.status_code == 200, response.text assert response.json() == {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 2K bytes - Viewed (1) -
tests/test_tutorial/test_dependencies/test_tutorial004.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 5.4K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial004_an.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 5.4K bytes - Viewed (0) -
docs_src/sql_databases/tutorial002_an_py39.py
return db_hero @app.get("/heroes/", response_model=list[HeroPublic]) def read_heroes( session: SessionDep, offset: int = 0, limit: Annotated[int, Query(le=100)] = 100, ): heroes = session.exec(select(Hero).offset(offset).limit(limit)).all() return heroes @app.get("/heroes/{hero_id}", response_model=HeroPublic) def read_hero(hero_id: int, session: SessionDep):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 2.5K bytes - Viewed (0) -
tests/connpool_test.go
"INSERT INTO `users` (`created_at`,`updated_at`,`deleted_at`,`name`,`age`,`birthday`,`company_id`,`manager_id`,`active`) VALUES (?,?,?,?,?,?,?,?,?)", "SELECT * FROM `users` WHERE name = ? AND `users`.`deleted_at` IS NULL ORDER BY `users`.`id` LIMIT ?", "SELECT * FROM `users` WHERE name = ? AND `users`.`deleted_at` IS NULL ORDER BY `users`.`id` LIMIT ?",
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Feb 06 02:54:40 UTC 2024 - 5.5K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial004_an_py39.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 5.6K bytes - Viewed (0) -
docs/zh/docs/tutorial/query-params.md
* API 文档 ## 默认值 查询参数不是路径的固定内容,它是可选的,还支持默认值。 上例用 `skip=0` 和 `limit=10` 设定默认值。 访问 URL: ``` http://127.0.0.1:8000/items/ ``` 与访问以下地址相同: ``` http://127.0.0.1:8000/items/?skip=0&limit=10 ``` 但如果访问: ``` http://127.0.0.1:8000/items/?skip=20 ``` 查询参数的值就是: * `skip=20`:在 URL 中设定的值 * `limit=10`:使用默认值 ## 可选参数 同理,把默认值设为 `None` 即可声明**可选的**查询参数:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5K bytes - Viewed (0)