- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 41 for Emmons (0.2 sec)
-
docs_src/dependencies/tutorial001_02_an_py310.py
CommonsDep = Annotated[dict, Depends(common_parameters)] @app.get("/items/") async def read_items(commons: CommonsDep): return commons @app.get("/users/") async def read_users(commons: CommonsDep):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 447 bytes - Viewed (0) -
docs_src/dependencies/tutorial001.py
): return {"q": q, "skip": skip, "limit": limit} @app.get("/items/") async def read_items(commons: dict = Depends(common_parameters)): return commons @app.get("/users/") async def read_users(commons: dict = Depends(common_parameters)):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 442 bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/classes-as-dependencies.md
```Python commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)] ``` === "Python 3.8+ non-Annotated" !!! tip Prefer to use the `Annotated` version if possible. ```Python commons: CommonQueryParams = Depends(CommonQueryParams) ``` ...you write: === "Python 3.8+" ```Python commons: Annotated[CommonQueryParams, Depends()]
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 11.4K bytes - Viewed (0) -
docs_src/dependency_testing/tutorial001_an_py39.py
@app.get("/items/") async def read_items(commons: Annotated[dict, Depends(common_parameters)]): return {"message": "Hello Items!", "params": commons} @app.get("/users/") async def read_users(commons: Annotated[dict, Depends(common_parameters)]): return {"message": "Hello Users!", "params": commons} client = TestClient(app)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 1.5K bytes - Viewed (0) -
docs/zh/docs/tutorial/dependencies/classes-as-dependencies.md
```Python hl_lines="19" {!> ../../../docs_src/dependencies/tutorial002.py!} ``` **FastAPI** 调用 `CommonQueryParams` 类。这将创建该类的一个 "实例",该实例将作为参数 `commons` 被传递给你的函数。 ## 类型注解 vs `Depends` 注意,我们在上面的代码中编写了两次`CommonQueryParams`: ```Python commons: CommonQueryParams = Depends(CommonQueryParams) ``` 最后的 `CommonQueryParams`: ```Python ... = Depends(CommonQueryParams) ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 6.5K bytes - Viewed (0) -
docs/em/docs/tutorial/dependencies/classes-as-dependencies.md
{!> ../../../docs_src/dependencies/tutorial002_py310.py!} ``` **FastAPI** 🤙 `CommonQueryParams` 🎓. 👉 ✍ "👐" 👈 🎓 & 👐 🔜 🚶♀️ 🔢 `commons` 👆 🔢. ## 🆎 ✍ 🆚 `Depends` 👀 ❔ 👥 ✍ `CommonQueryParams` 🕐 🔛 📟: ```Python commons: CommonQueryParams = Depends(CommonQueryParams) ``` 🏁 `CommonQueryParams`,: ```Python ... = Depends(CommonQueryParams) ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 6K bytes - Viewed (0) -
docs_src/dependencies/tutorial003.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})
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 635 bytes - Viewed (0) -
docs_src/dependencies/tutorial001_02_an.py
CommonsDep = Annotated[dict, Depends(common_parameters)] @app.get("/items/") async def read_items(commons: CommonsDep): return commons @app.get("/users/") async def read_users(commons: CommonsDep):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 495 bytes - Viewed (0) -
docs_src/dependencies/tutorial001_an.py
): 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)]):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 502 bytes - Viewed (0) -
docs_src/dependency_testing/tutorial001_an.py
@app.get("/items/") async def read_items(commons: Annotated[dict, Depends(common_parameters)]): return {"message": "Hello Items!", "params": commons} @app.get("/users/") async def read_users(commons: Annotated[dict, Depends(common_parameters)]): return {"message": "Hello Users!", "params": commons} client = TestClient(app)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 1.5K bytes - Viewed (0)