- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for read_user (0.08 sec)
-
docs/em/docs/tutorial/sql-databases.md
```Python user = db.query(User).first() ``` ⤴️ 👥 🔜 📣 *➡ 🛠️ 🔢* & 🔗 🍵 `async def`, ⏮️ 😐 `def`,: ```Python hl_lines="2" @app.get("/users/{user_id}", response_model=schemas.User) def read_user(user_id: int, db: Session = Depends(get_db)): db_user = crud.get_user(db, user_id=user_id) ... ``` /// info
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 25K bytes - Viewed (0) -
docs/zh/docs/tutorial/sql-databases.md
...相反,我们可以使用: ```Python user = db.query(User).first() ``` 然后我们应该声明*路径操作函数*和不带 的依赖关系`async def`,只需使用普通的`def`,如下: ```Python hl_lines="2" @app.get("/users/{user_id}", response_model=schemas.User) def read_user(user_id: int, db: Session = Depends(get_db)): db_user = crud.get_user(db, user_id=user_id) ... ``` /// info
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 27.1K bytes - Viewed (0) -
docs/zh/docs/tutorial/dependencies/index.md
* 用正确的参数调用依赖项函数(「可依赖项」) * 获取函数返回的结果 * 把函数返回的结果赋值给*路径操作函数*的参数 ```mermaid graph TB common_parameters(["common_parameters"]) read_items["/items/"] read_users["/users/"] common_parameters --> read_items common_parameters --> read_users ``` 这样,只编写一次代码,**FastAPI** 就可以为多个*路径操作*共享这段代码 。 /// check | "检查" 注意,无需创建专门的类,并将之传递给 **FastAPI** 以进行「注册」或执行类似的操作。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7K bytes - Viewed (0) -
.github/workflows/maven.yml
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Mon Jun 03 17:58:28 UTC 2024 - 5K bytes - Viewed (0) -
docs/em/docs/tutorial/dependencies/index.md
* 🤚 🏁 ⚪️➡️ 👆 🔢. * 🛠️ 👈 🏁 🔢 👆 *➡ 🛠️ 🔢*. ```mermaid graph TB common_parameters(["common_parameters"]) read_items["/items/"] read_users["/users/"] common_parameters --> read_items common_parameters --> read_users ``` 👉 🌌 👆 ✍ 🔗 📟 🕐 & **FastAPI** ✊ 💅 🤙 ⚫️ 👆 *➡ 🛠️*. /// check 👀 👈 👆 🚫 ✔️ ✍ 🎁 🎓 & 🚶♀️ ⚫️ 👱 **FastAPI** "®" ⚫️ ⚖️ 🕳 🎏.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6.7K bytes - Viewed (0) -
docs/ru/docs/tutorial/dependencies/index.md
* Назначении результата в параметр в вашей *функции обработки пути*. ```mermaid graph TB common_parameters(["common_parameters"]) read_items["/items/"] read_users["/users/"] common_parameters --> read_items common_parameters --> read_users ``` Таким образом, вы пишете общий код один раз, и **FastAPI** позаботится о его вызове для ваших *операций с путями*. /// check | "Проверка"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 17.6K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/index.md
* Assign that result to the parameter in your *path operation function*. ```mermaid graph TB common_parameters(["common_parameters"]) read_items["/items/"] read_users["/users/"] common_parameters --> read_items common_parameters --> read_users ``` This way you write shared code once and **FastAPI** takes care of calling it for your *path operations*. /// check
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Oct 28 11:18:17 UTC 2024 - 9.2K bytes - Viewed (0) -
docs/ja/docs/tutorial/dependencies/index.md
* 関数の結果を取得します。 * *path operation関数*のパラメータにその結果を代入してください。 ```mermaid graph TB common_parameters(["common_parameters"]) read_items["/items/"] read_users["/users/"] common_parameters --> read_items common_parameters --> read_users ``` この方法では、共有されるコードを一度書き、**FastAPI** が*path operations*のための呼び出しを行います。 /// check | "確認" 特別なクラスを作成してどこかで **FastAPI** に渡して「登録」する必要はないことに注意してください。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.7K bytes - Viewed (0) -
docs/de/docs/tutorial/dependencies/index.md
* Dieses Ergebnis dem Parameter Ihrer *Pfadoperation-Funktion* zuzuweisen. ```mermaid graph TB common_parameters(["common_parameters"]) read_items["/items/"] read_users["/users/"] common_parameters --> read_items common_parameters --> read_users ``` Auf diese Weise schreiben Sie gemeinsam genutzten Code nur einmal, und **FastAPI** kümmert sich darum, ihn für Ihre *Pfadoperationen* aufzurufen. /// check
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 13K bytes - Viewed (0) -
docs/pt/docs/tutorial/dependencies/index.md
```mermaid graph TB common_parameters(["common_parameters"]) read_items["/items/"] read_users["/users/"] common_parameters --> read_items common_parameters --> read_users ``` Assim, você escreve um código compartilhado apenas uma vez e o **FastAPI** se encarrega de chamá-lo em suas *operações de rota*. /// check | "Checando"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 12.6K bytes - Viewed (0)