🌐 🔠 📄 🐢 Translate docs to Emoji 🥳 🎉 💥 🤯 🤯 (#5385)

* 🌐 💬  🩺  🦲

* 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks

* 🛠️😊

* ♻️ Rename emoji lang from emj to em, and main docs name as 😉

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Axd1x8a <26704473+FeeeeK@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
This commit is contained in:
LeeeeT
2023-04-01 12:26:04 +03:00
committed by GitHub
parent d666ccb622
commit d4e85da18b
125 changed files with 18865 additions and 2 deletions

View File

@@ -0,0 +1,89 @@
# 📨 👔 📟
🎏 🌌 👆 💪 ✔ 📨 🏷, 👆 💪 📣 🇺🇸🔍 👔 📟 ⚙️ 📨 ⏮️ 🔢 `status_code` 🙆 *➡ 🛠️*:
* `@app.get()`
* `@app.post()`
* `@app.put()`
* `@app.delete()`
* ♒️.
```Python hl_lines="6"
{!../../../docs_src/response_status_code/tutorial001.py!}
```
!!! note
👀 👈 `status_code` 🔢 "👨‍🎨" 👩‍🔬 (`get`, `post`, ♒️). 🚫 👆 *➡ 🛠️ 🔢*, 💖 🌐 🔢 &amp; 💪.
`status_code` 🔢 📨 🔢 ⏮️ 🇺🇸🔍 👔 📟.
!!! info
`status_code` 💪 👐 📨 `IntEnum`, ✅ 🐍 <a href="https://docs.python.org/3/library/http.html#http.HTTPStatus" class="external-link" target="_blank">`http.HTTPStatus`</a>.
⚫️ 🔜:
* 📨 👈 👔 📟 📨.
* 📄 ⚫️ ✅ 🗄 🔗 ( &amp; , 👩‍💻 🔢):
<img src="/img/tutorial/response-status-code/image01.png">
!!! note
📨 📟 (👀 ⏭ 📄) 🎦 👈 📨 🔨 🚫 ✔️ 💪.
FastAPI 💭 👉, &amp; 🔜 🏭 🗄 🩺 👈 🇵🇸 📤 🙅‍♂ 📨 💪.
## 🔃 🇺🇸🔍 👔 📟
!!! note
🚥 👆 ⏪ 💭 ⚫️❔ 🇺🇸🔍 👔 📟, 🚶 ⏭ 📄.
🇺🇸🔍, 👆 📨 🔢 👔 📟 3⃣ 9⃣ 🍕 📨.
👫 👔 📟 ✔️ 📛 🔗 🤔 👫, ✋️ ⚠ 🍕 🔢.
📏:
* `100` &amp; 🔛 "". 👆 🛎 ⚙️ 👫 🔗. 📨 ⏮️ 👫 👔 📟 🚫🔜 ✔️ 💪.
* **`200`** &amp; 🔛 "🏆" 📨. 👫 🕐 👆 🔜 ⚙️ 🏆.
* `200` 🔢 👔 📟, ❔ ⛓ 🌐 "👌".
* 1⃣ 🖼 🔜 `201`, "✍". ⚫️ 🛎 ⚙️ ⏮️ 🏗 🆕 ⏺ 💽.
* 🎁 💼 `204`, "🙅‍♂ 🎚". 👉 📨 ⚙️ 🕐❔ 📤 🙅‍♂ 🎚 📨 👩‍💻, &amp; 📨 🔜 🚫 ✔️ 💪.
* **`300`** &amp; 🔛 "❎". 📨 ⏮️ 👫 👔 📟 5⃣📆 ⚖️ 5⃣📆 🚫 ✔️ 💪, 🌖 `304`, "🚫 🔀", ❔ 🔜 🚫 ✔️ 1⃣.
* **`400`** &amp; 🔛 "👩‍💻 ❌" 📨. 👫 🥈 🆎 👆 🔜 🎲 ⚙️ 🏆.
* 🖼 `404`, "🚫 🔎" 📨.
* 💊 ❌ ⚪️➡️ 👩‍💻, 👆 💪 ⚙️ `400`.
* `500` &amp; 🔛 💽 ❌. 👆 🌖 🙅 ⚙️ 👫 🔗. 🕐❔ 🕳 🚶 ❌ 🍕 👆 🈸 📟, ⚖️ 💽, ⚫️ 🔜 🔁 📨 1⃣ 👫 👔 📟.
!!! tip
💭 🌅 🔃 🔠 👔 📟 &amp; ❔ 📟 ⚫️❔, ✅ <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status" class="external-link" target="_blank"><abbr title="Mozilla Developer Network">🏇</abbr> 🧾 🔃 🇺🇸🔍 👔 📟</a>.
## ⌨ 💭 📛
➡️ 👀 ⏮️ 🖼 🔄:
```Python hl_lines="6"
{!../../../docs_src/response_status_code/tutorial001.py!}
```
`201` 👔 📟 "✍".
✋️ 👆 🚫 ✔️ ✍ ⚫️❔ 🔠 👉 📟 ⛓.
👆 💪 ⚙️ 🏪 🔢 ⚪️➡️ `fastapi.status`.
```Python hl_lines="1 6"
{!../../../docs_src/response_status_code/tutorial002.py!}
```
👫 🏪, 👫 🧑‍🤝‍🧑 🎏 🔢, ✋️ 👈 🌌 👆 💪 ⚙️ 👨‍🎨 📋 🔎 👫:
<img src="/img/tutorial/response-status-code/image02.png">
!!! note "📡 "
👆 💪 ⚙️ `from starlette import status`.
**FastAPI** 🚚 🎏 `starlette.status` `fastapi.status` 🏪 👆, 👩‍💻. ✋️ ⚫️ 👟 🔗 ⚪️➡️ 💃.
## 🔀 🔢
⏪, [🏧 👩‍💻 🦮](../advanced/response-change-status-code.md){.internal-link target=_blank}, 👆 🔜 👀 ❔ 📨 🎏 👔 📟 🌘 🔢 👆 📣 📥.