You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.9 KiB

🏧 🔗

🔗 🔗

🌐 🔗 👥 ✔️ 👀 🔧 🔢 ⚖️ 🎓.

📤 💪 💼 🌐 👆 💚 💪🔢 🔛 🔗, 🍵 ✔️ 📣 📚 🎏 🔢 ⚖️ 🎓.

➡️ 🌈 👈 👥 💚 ✔️ 🔗 👈 🚥 🔢 🔢 q 🔌 🔧 🎚.

👥 💚 💪 🔗 👈 🔧 🎚.

"🇧🇲" 👐

🐍 📤 🌌👐 🎓 "🇧🇲".

🚫 🎓 ️ ( 🇧🇲), 👐 👈 🎓.

👈, 👥 📣 👩‍🔬 __call__:

{* ../../docs_src/dependencies/tutorial011.py hl[10] *}

👉 💼, 👉 __call__ FastAPI 🔜 ⚙️ 🌖 🔢 & 🎧-🔗, & 👉 🔜 🤙 🚶‍♀️ 💲 🔢 👆 🛠️ 🔢 .

🔗 👐

& 🔜, 👥 💪 ⚙️ __init__ 📣 🔢 👐 👈 👥 💪 ⚙️ "🔗" 🔗:

{* ../../docs_src/dependencies/tutorial011.py hl[7] *}

👉 💼, FastAPI 🏆 🚫👆 ⚖️ 💅 🔃 __init__, 👥 🔜 ⚙️ 🔗 👆 📟.

👐

👥 💪👐 👉 🎓 ⏮️:

{* ../../docs_src/dependencies/tutorial011.py hl[16] *}

& 👈 🌌 👥 💪 "🔗" 👆 🔗, 👈 🔜 ✔️ "bar" 🔘 ️, 🔢 checker.fixed_content.

⚙️ 👐 🔗

⤴️, 👥 💪 ⚙️ 👉 checker Depends(checker), ↩️ Depends(FixedContentQueryChecker), ↩️ 🔗 👐, checker, 🚫 🎓 ️.

& 🕐 🔗, FastAPI 🔜 🤙 👉 checker 💖:

checker(q="somequery")

...& 🚶‍♀️ 👈 📨 💲 🔗 👆 🛠️ 🔢 🔢 fixed_content_included:

{* ../../docs_src/dependencies/tutorial011.py hl[20] *}

/// tip

🌐 👉 💪 😑 🎭. & 💪 🚫 📶 🆑 ️ ⚠.

👫 🖼 😫 🙅, 🎦 🌐 👷.

📃 🔃 💂‍♂, 📤 🚙 🔢 👈 🛠️ 👉 🎏 🌌.

🚥 👆 🤔 🌐 👉, 👆 💭 👈 🚙 🧰 💂‍♂ 👷 🔘.

///