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.7 KiB

🌖 👔 📟

🔢, FastAPI 🔜 📨 📨 ⚙️ JSONResponse, 🚮 🎚 👆 📨 ➡️ 👆 🛠️ 🔘 👈 JSONResponse.

🔜 ⚙️ 🔢 👔 📟 ⚖️ 1️⃣ 👆👆 🛠️.

🌖 👔 📟

🚥 👆 💚 📨 🌖 👔 📟 ↖️ ➡️ 👑 1️⃣, 👆 💪 👈 🛬 Response 🔗, 💖 JSONResponse, & ⚒ 🌖 👔 📟 🔗.

🖼, ➡️ 💬 👈 👆 💚 ✔️ 🛠️ 👈 ✔ ℹ 🏬, & 📨 🇺🇸🔍 👔 📟 2️⃣0️⃣0️⃣ "👌" 🕐 🏆.

👆 💚 🚫 🆕 🏬. & 🕐 🏬 🚫 🔀 ⏭, ️ ✍ 👫, & 📨 🇺🇸🔍 👔 📟 2️⃣0️⃣1️⃣ "✍".

🏆 👈, 🗄 JSONResponse, & 📨 👆 🎚 📤 🔗, ⚒ status_code 👈 👆 💚:

{!../../../docs_src/additional_status_codes/tutorial001.py!}

!!! warning 🕐 👆 📨 Response 🔗, 💖 🖼 🔛, 🔜 📨 🔗.

⚫️ 🏆 🚫 🎻 ⏮️ 🏷, ♒️.

⚒ 💭 ⚫️ ✔️ 📊 👆 💚 ⚫️ ✔️, & 👈 💲 ☑ 🎻 (🚥 👆 ⚙️ `JSONResponse`).

!!! note "📡 ℹ" 👆 💪 ⚙️ from starlette.responses import JSONResponse.

**FastAPI** 🚚 🎏 `starlette.responses` `fastapi.responses` 🏪 👆, 👩‍💻. ✋️ 🌅 💪 📨 👟 🔗 ⚪️➡️ 💃. 🎏 ⏮️ `status`.

🗄 & 🛠️ 🩺

🚥 👆 📨 🌖 👔 📟 & 📨 🔗, 👫 🏆 🚫 🔌 🗄 🔗 (🛠️ 🩺), ↩️ FastAPI 🚫 ✔️ 🌌 💭 👆 🚶 📨.

👆 💪 📄 👈 👆 📟, ⚙️: 🌖 📨{.internal-link target=_blank}.