mirror of
https://github.com/fastapi/fastapi.git
synced 2026-03-11 11:29:12 -04:00
🌐 🔠 📄 🐢 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:
138
docs/em/docs/tutorial/path-params-numeric-validations.md
Normal file
138
docs/em/docs/tutorial/path-params-numeric-validations.md
Normal file
@@ -0,0 +1,138 @@
|
||||
# ➡ 🔢 & 🔢 🔬
|
||||
|
||||
🎏 🌌 👈 👆 💪 📣 🌅 🔬 & 🗃 🔢 🔢 ⏮️ `Query`, 👆 💪 📣 🎏 🆎 🔬 & 🗃 ➡ 🔢 ⏮️ `Path`.
|
||||
|
||||
## 🗄 ➡
|
||||
|
||||
🥇, 🗄 `Path` ⚪️➡️ `fastapi`:
|
||||
|
||||
=== "🐍 3️⃣.6️⃣ & 🔛"
|
||||
|
||||
```Python hl_lines="3"
|
||||
{!> ../../../docs_src/path_params_numeric_validations/tutorial001.py!}
|
||||
```
|
||||
|
||||
=== "🐍 3️⃣.1️⃣0️⃣ & 🔛"
|
||||
|
||||
```Python hl_lines="1"
|
||||
{!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!}
|
||||
```
|
||||
|
||||
## 📣 🗃
|
||||
|
||||
👆 💪 📣 🌐 🎏 🔢 `Query`.
|
||||
|
||||
🖼, 📣 `title` 🗃 💲 ➡ 🔢 `item_id` 👆 💪 🆎:
|
||||
|
||||
=== "🐍 3️⃣.6️⃣ & 🔛"
|
||||
|
||||
```Python hl_lines="10"
|
||||
{!> ../../../docs_src/path_params_numeric_validations/tutorial001.py!}
|
||||
```
|
||||
|
||||
=== "🐍 3️⃣.1️⃣0️⃣ & 🔛"
|
||||
|
||||
```Python hl_lines="8"
|
||||
{!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!}
|
||||
```
|
||||
|
||||
!!! note
|
||||
➡ 🔢 🕧 ✔ ⚫️ ✔️ 🍕 ➡.
|
||||
|
||||
, 👆 🔜 📣 ⚫️ ⏮️ `...` ™ ⚫️ ✔.
|
||||
|
||||
👐, 🚥 👆 📣 ⚫️ ⏮️ `None` ⚖️ ⚒ 🔢 💲, ⚫️ 🔜 🚫 📉 🕳, ⚫️ 🔜 🕧 🚚.
|
||||
|
||||
## ✔ 🔢 👆 💪
|
||||
|
||||
➡️ 💬 👈 👆 💚 📣 🔢 🔢 `q` ✔ `str`.
|
||||
|
||||
& 👆 🚫 💪 📣 🕳 🙆 👈 🔢, 👆 🚫 🤙 💪 ⚙️ `Query`.
|
||||
|
||||
✋️ 👆 💪 ⚙️ `Path` `item_id` ➡ 🔢.
|
||||
|
||||
🐍 🔜 😭 🚥 👆 🚮 💲 ⏮️ "🔢" ⏭ 💲 👈 🚫 ✔️ "🔢".
|
||||
|
||||
✋️ 👆 💪 🏤-✔ 👫, & ✔️ 💲 🍵 🔢 (🔢 🔢 `q`) 🥇.
|
||||
|
||||
⚫️ 🚫 🤔 **FastAPI**. ⚫️ 🔜 🔍 🔢 👫 📛, 🆎 & 🔢 📄 (`Query`, `Path`, ♒️), ⚫️ 🚫 💅 🔃 ✔.
|
||||
|
||||
, 👆 💪 📣 👆 🔢:
|
||||
|
||||
```Python hl_lines="7"
|
||||
{!../../../docs_src/path_params_numeric_validations/tutorial002.py!}
|
||||
```
|
||||
|
||||
## ✔ 🔢 👆 💪, 🎱
|
||||
|
||||
🚥 👆 💚 📣 `q` 🔢 🔢 🍵 `Query` 🚫 🙆 🔢 💲, & ➡ 🔢 `item_id` ⚙️ `Path`, & ✔️ 👫 🎏 ✔, 🐍 ✔️ 🐥 🎁 ❕ 👈.
|
||||
|
||||
🚶♀️ `*`, 🥇 🔢 🔢.
|
||||
|
||||
🐍 🏆 🚫 🕳 ⏮️ 👈 `*`, ✋️ ⚫️ 🔜 💭 👈 🌐 📄 🔢 🔜 🤙 🇨🇻 ❌ (🔑-💲 👫), 💭 <abbr title="From: K-ey W-ord Arg-uments"><code>kwargs</code></abbr>. 🚥 👫 🚫 ✔️ 🔢 💲.
|
||||
|
||||
```Python hl_lines="7"
|
||||
{!../../../docs_src/path_params_numeric_validations/tutorial003.py!}
|
||||
```
|
||||
|
||||
## 🔢 🔬: 👑 🌘 ⚖️ 🌓
|
||||
|
||||
⏮️ `Query` & `Path` (& 🎏 👆 🔜 👀 ⏪) 👆 💪 📣 🔢 ⚛.
|
||||
|
||||
📥, ⏮️ `ge=1`, `item_id` 🔜 💪 🔢 🔢 "`g`🅾 🌘 ⚖️ `e`🅾" `1`.
|
||||
|
||||
```Python hl_lines="8"
|
||||
{!../../../docs_src/path_params_numeric_validations/tutorial004.py!}
|
||||
```
|
||||
|
||||
## 🔢 🔬: 🌘 🌘 & 🌘 🌘 ⚖️ 🌓
|
||||
|
||||
🎏 ✔:
|
||||
|
||||
* `gt`: `g`🅾 `t`👲
|
||||
* `le`: `l`👭 🌘 ⚖️ `e`🅾
|
||||
|
||||
```Python hl_lines="9"
|
||||
{!../../../docs_src/path_params_numeric_validations/tutorial005.py!}
|
||||
```
|
||||
|
||||
## 🔢 🔬: 🎈, 🌘 🌘 & 🌘 🌘
|
||||
|
||||
🔢 🔬 👷 `float` 💲.
|
||||
|
||||
📥 🌐❔ ⚫️ ▶️️ ⚠ 💪 📣 <abbr title="greater than"><code>gt</code></abbr> & 🚫 <abbr title="greater than or equal"><code>ge</code></abbr>. ⏮️ ⚫️ 👆 💪 🚚, 🖼, 👈 💲 🔜 👑 🌘 `0`, 🚥 ⚫️ 🌘 🌘 `1`.
|
||||
|
||||
, `0.5` 🔜 ☑ 💲. ✋️ `0.0` ⚖️ `0` 🔜 🚫.
|
||||
|
||||
& 🎏 <abbr title="less than"><code>lt</code></abbr>.
|
||||
|
||||
```Python hl_lines="11"
|
||||
{!../../../docs_src/path_params_numeric_validations/tutorial006.py!}
|
||||
```
|
||||
|
||||
## 🌃
|
||||
|
||||
⏮️ `Query`, `Path` (& 🎏 👆 🚫 👀) 👆 💪 📣 🗃 & 🎻 🔬 🎏 🌌 ⏮️ [🔢 🔢 & 🎻 🔬](query-params-str-validations.md){.internal-link target=_blank}.
|
||||
|
||||
& 👆 💪 📣 🔢 🔬:
|
||||
|
||||
* `gt`: `g`🅾 `t`👲
|
||||
* `ge`: `g`🅾 🌘 ⚖️ `e`🅾
|
||||
* `lt`: `l`👭 `t`👲
|
||||
* `le`: `l`👭 🌘 ⚖️ `e`🅾
|
||||
|
||||
!!! info
|
||||
`Query`, `Path`, & 🎏 🎓 👆 🔜 👀 ⏪ 🏿 ⚠ `Param` 🎓.
|
||||
|
||||
🌐 👫 💰 🎏 🔢 🌖 🔬 & 🗃 👆 ✔️ 👀.
|
||||
|
||||
!!! note "📡 ℹ"
|
||||
🕐❔ 👆 🗄 `Query`, `Path` & 🎏 ⚪️➡️ `fastapi`, 👫 🤙 🔢.
|
||||
|
||||
👈 🕐❔ 🤙, 📨 👐 🎓 🎏 📛.
|
||||
|
||||
, 👆 🗄 `Query`, ❔ 🔢. & 🕐❔ 👆 🤙 ⚫️, ⚫️ 📨 👐 🎓 🌟 `Query`.
|
||||
|
||||
👫 🔢 📤 (↩️ ⚙️ 🎓 🔗) 👈 👆 👨🎨 🚫 ™ ❌ 🔃 👫 🆎.
|
||||
|
||||
👈 🌌 👆 💪 ⚙️ 👆 😐 👨🎨 & 🛠️ 🧰 🍵 ✔️ 🚮 🛃 📳 🤷♂ 📚 ❌.
|
||||
Reference in New Issue
Block a user