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.

2.1 KiB

📨 💽

🕐 👆 💪 📨 📨 🏑 ↩️ 🎻, 👆 💪 ⚙️ Form.

/// info

⚙️ 📨, 🥇 python-multipart.

🤶 Ⓜ. pip install python-multipart.

///

🗄 Form

🗄 Form ➡️ fastapi:

{* ../../docs_src/request_forms/tutorial001.py hl[1] *}

🔬 Form 🔢

📨 🔢 🎏 🌌 👆 🔜 Body ⚖️ Query:

{* ../../docs_src/request_forms/tutorial001.py hl[7] *}

🖼, 1️⃣ 🌌 Oauth2️⃣ 🔧 💪 ⚙️ (🤙 "🔐 💧") ️ ✔ 📨 username & password 📨 🏑.

🔌 🚚 🏑 📛 username & password, & 📨 📨 🏑, 🚫 🎻.

⏮️ Form 👆 💪 📣 🎏 📳 ⏮️ Body (& Query, Path, Cookie), 🔌 🔬, 🖼, 📛 ( user-name ↩️ username), ️.

/// info

Form 🎓 👈 😖 🔗 ➡️ Body.

///

/// tip

📣 📨 💪, 👆 💪 ⚙️ Form 🎯, ↩️ 🍵 🔢 🔜 🔬 🔢 🔢 ⚖️ 💪 (🎻) 🔢.

///

🔃 "📨 🏑"

🌌 🕸 📨 (<form></form>) 📨 💽 💽 🛎 ⚙️ "🎁" 🔢 👈 📊, 🎏 ➡️ 🎻.

FastAPI 🔜💭👈 📊 ➡️ ▶️🥉 ↩️ 🎻.

/// note | 📡

📊 ➡️ 📨 🛎 🗜 ⚙️ "📻 🆎" application/x-www-form-urlencoded.

🕐 📨 🔌 📁, ️ 🗜 multipart/form-data. 👆 🔜🔃 🚚 📁📃.

🚥 👆 💚🌖 🔃 👉 🔢 & 📨 🏑, 👳 🏇 🕸 🩺 POST.

///

/// warning

👆 💪 📣 💗 Form 🔢 🛠️, 👆 💪 🚫 📣 Body 🏑 👈 👆 📨 🎻, 📨 🔜 ✔️ 💪 🗜 ⚙️ application/x-www-form-urlencoded ↩️ application/json.

👉 🚫 🚫 FastAPI, 🍕 🇺🇸🔍 🛠️.

///

🌃

⚙️ Form 📣 📨 💽 🔢 🔢.