diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 0a59adbd6b..8979aabf8b 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -12,9 +12,5 @@ updates:
directory: "/"
schedule:
interval: "monthly"
- groups:
- python-packages:
- patterns:
- - "*"
commit-message:
prefix: ⬆
diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml
index 4ff5e26cbf..262c7fa5cb 100644
--- a/.github/workflows/build-docs.yml
+++ b/.github/workflows/build-docs.yml
@@ -108,9 +108,9 @@ jobs:
path: docs/${{ matrix.lang }}/.cache
- name: Build Docs
run: python ./scripts/docs.py build-lang ${{ matrix.lang }}
- - uses: actions/upload-artifact@v3
+ - uses: actions/upload-artifact@v4
with:
- name: docs-site
+ name: docs-site-${{ matrix.lang }}
path: ./site/**
# https://github.com/marketplace/actions/alls-green#why
diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml
index b8dbb7dc5a..dd54608d93 100644
--- a/.github/workflows/deploy-docs.yml
+++ b/.github/workflows/deploy-docs.yml
@@ -19,18 +19,16 @@ jobs:
run: |
rm -rf ./site
mkdir ./site
- - name: Download Artifact Docs
- id: download
- uses: dawidd6/action-download-artifact@v3.1.4
+ - uses: actions/download-artifact@v4
with:
- if_no_artifact_found: ignore
- github_token: ${{ secrets.FASTAPI_PREVIEW_DOCS_DOWNLOAD_ARTIFACTS }}
- workflow: build-docs.yml
- run_id: ${{ github.event.workflow_run.id }}
- name: docs-site
path: ./site/
+ pattern: docs-site-*
+ merge-multiple: true
+ github-token: ${{ secrets.FASTAPI_PREVIEW_DOCS_DOWNLOAD_ARTIFACTS }}
+ run-id: ${{ github.event.workflow_run.id }}
- name: Deploy to Cloudflare Pages
- if: steps.download.outputs.found_artifact == 'true'
+ # hashFiles returns an empty string if there are no files
+ if: hashFiles('./site/*')
id: deploy
uses: cloudflare/pages-action@v1
with:
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index a5cbf6da42..e7c69befc7 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -8,6 +8,13 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ package:
+ - fastapi
+ - fastapi-slim
+ permissions:
+ id-token: write
steps:
- name: Dump GitHub context
env:
@@ -21,19 +28,14 @@ jobs:
# Issue ref: https://github.com/actions/setup-python/issues/436
# cache: "pip"
# cache-dependency-path: pyproject.toml
- - uses: actions/cache@v4
- id: cache
- with:
- path: ${{ env.pythonLocation }}
- key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-publish
- name: Install build dependencies
run: pip install build
- name: Build distribution
+ env:
+ TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
run: python -m build
- name: Publish
uses: pypa/gh-action-pypi-publish@v1.8.14
- with:
- password: ${{ secrets.PYPI_API_TOKEN }}
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
diff --git a/.github/workflows/smokeshow.yml b/.github/workflows/smokeshow.yml
index c4043cc6ae..ffc9c5f8a3 100644
--- a/.github/workflows/smokeshow.yml
+++ b/.github/workflows/smokeshow.yml
@@ -24,13 +24,14 @@ jobs:
- run: pip install smokeshow
- - uses: dawidd6/action-download-artifact@v3.1.4
+ - uses: actions/download-artifact@v4
with:
- github_token: ${{ secrets.FASTAPI_SMOKESHOW_DOWNLOAD_ARTIFACTS }}
- workflow: test.yml
- commit: ${{ github.event.workflow_run.head_sha }}
+ name: coverage-html
+ path: htmlcov
+ github-token: ${{ secrets.FASTAPI_SMOKESHOW_DOWNLOAD_ARTIFACTS }}
+ run-id: ${{ github.event.workflow_run.id }}
- - run: smokeshow upload coverage-html
+ - run: smokeshow upload htmlcov
env:
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage}
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 100
diff --git a/.github/workflows/test-redistribute.yml b/.github/workflows/test-redistribute.yml
index c2e05013b6..0cc5f866e8 100644
--- a/.github/workflows/test-redistribute.yml
+++ b/.github/workflows/test-redistribute.yml
@@ -12,6 +12,11 @@ on:
jobs:
test-redistribute:
runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ package:
+ - fastapi
+ - fastapi-slim
steps:
- name: Dump GitHub context
env:
@@ -22,12 +27,11 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: "3.10"
- # Issue ref: https://github.com/actions/setup-python/issues/436
- # cache: "pip"
- # cache-dependency-path: pyproject.toml
- name: Install build dependencies
run: pip install build
- name: Build source distribution
+ env:
+ TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
run: python -m build --sdist
- name: Decompress source distribution
run: |
@@ -35,16 +39,18 @@ jobs:
tar xvf fastapi*.tar.gz
- name: Install test dependencies
run: |
- cd dist/fastapi-*/
+ cd dist/fastapi*/
pip install -r requirements-tests.txt
+ env:
+ TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
- name: Run source distribution tests
run: |
- cd dist/fastapi-*/
+ cd dist/fastapi*/
bash scripts/test.sh
- name: Build wheel distribution
run: |
cd dist
- pip wheel --no-deps fastapi-*.tar.gz
+ pip wheel --no-deps fastapi*.tar.gz
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 125265e538..a33b6a68a2 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -32,7 +32,7 @@ jobs:
id: cache
with:
path: ${{ env.pythonLocation }}
- key: ${{ runner.os }}-python-${{ env.pythonLocation }}-pydantic-v2-${{ hashFiles('pyproject.toml', 'requirements-tests.txt', 'requirements-docs-tests.txt') }}-test-v07
+ key: ${{ runner.os }}-python-${{ env.pythonLocation }}-pydantic-v2-${{ hashFiles('pyproject.toml', 'requirements-tests.txt', 'requirements-docs-tests.txt') }}-test-v08
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -r requirements-tests.txt
@@ -70,7 +70,7 @@ jobs:
id: cache
with:
path: ${{ env.pythonLocation }}
- key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ matrix.pydantic-version }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt', 'requirements-docs-tests.txt') }}-test-v07
+ key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ matrix.pydantic-version }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt', 'requirements-docs-tests.txt') }}-test-v08
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -r requirements-tests.txt
@@ -87,9 +87,9 @@ jobs:
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
- name: Store coverage files
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
- name: coverage
+ name: coverage-${{ matrix.python-version }}-${{ matrix.pydantic-version }}
path: coverage
coverage-combine:
@@ -108,17 +108,18 @@ jobs:
# cache: "pip"
# cache-dependency-path: pyproject.toml
- name: Get coverage files
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
- name: coverage
+ pattern: coverage-*
path: coverage
+ merge-multiple: true
- run: pip install coverage[toml]
- run: ls -la coverage
- run: coverage combine coverage
- run: coverage report
- run: coverage html --show-contexts --title "Coverage for ${{ github.sha }}"
- name: Store coverage HTML
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: coverage-html
path: htmlcov
diff --git a/README.md b/README.md
index 67275d29dc..55f3e300f4 100644
--- a/README.md
+++ b/README.md
@@ -27,7 +27,7 @@
---
-FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.8+ based on standard Python type hints.
+FastAPI is a modern, fast (high-performance), web framework for building APIs with Python based on standard Python type hints.
The key features are:
@@ -55,6 +55,7 @@ The key features are:
+
@@ -122,8 +123,6 @@ If you are building a CLI app to be
## Requirements
-Python 3.8+
-
FastAPI stands on the shoulders of giants:
* Starlette for the web parts.
@@ -141,18 +140,6 @@ $ pip install fastapi
-You will also need an ASGI server, for production such as Uvicorn or Hypercorn.
-
-
uvicorn main:app --reload...fastapi dev main.py...httpx - Required if you want to use the `TestClient`.
* jinja2 - Required if you want to use the default template configuration.
* python-multipart - Required if you want to support form "parsing", with `request.form()`.
-* itsdangerous - Required for `SessionMiddleware` support.
-* pyyaml - Required for Starlette's `SchemaGenerator` support (you probably don't need it with FastAPI).
-* ujson - Required if you want to use `UJSONResponse`.
Used by FastAPI / Starlette:
* uvicorn - for the server that loads and serves your application.
* orjson - Required if you want to use `ORJSONResponse`.
+* ujson - Required if you want to use `UJSONResponse`.
+* `fastapi-cli` - to provide the `fastapi` command.
-You can install all of these with `pip install "fastapi[all]"`.
+When you install `fastapi` it comes these standard dependencies.
+
+## `fastapi-slim`
+
+If you don't want the extra standard optional dependencies, install `fastapi-slim` instead.
+
+When you install with:
+
+```bash
+pip install fastapi
+```
+
+...it includes the same code and dependencies as:
+
+```bash
+pip install "fastapi-slim[standard]"
+```
+
+The standard extra dependencies are the ones mentioned above.
## License
diff --git a/docs/az/docs/fastapi-people.md b/docs/az/docs/fastapi-people.md
index 2ca8e109ee..60494f1915 100644
--- a/docs/az/docs/fastapi-people.md
+++ b/docs/az/docs/fastapi-people.md
@@ -119,7 +119,7 @@ Başqalarının Pull Request-lərinə **Ən çox rəy verənlər** 🕵️ kodun
Bunlar **Sponsorlar**dır. 😎
-Onlar mənim **FastAPI** (və digər) işlərimi əsasən GitHub Sponsorlar vasitəsilə dəstəkləyirlər.
+Onlar mənim **FastAPI** (və digər) işlərimi əsasən GitHub Sponsorlar vasitəsilə dəstəkləyirlər.
{% if sponsors %}
diff --git a/docs/az/docs/index.md b/docs/az/docs/index.md
index 33bcc15568..430295d912 100644
--- a/docs/az/docs/index.md
+++ b/docs/az/docs/index.md
@@ -27,7 +27,7 @@
---
-FastAPI Python 3.8+ ilə API yaratmaq üçün standart Python tip məsləhətlərinə əsaslanan, müasir, sürətli (yüksək performanslı) framework-dür.
+FastAPI Python ilə API yaratmaq üçün standart Python tip məsləhətlərinə əsaslanan, müasir, sürətli (yüksək performanslı) framework-dür.
Əsas xüsusiyyətləri bunlardır:
@@ -115,8 +115,6 @@ FastAPI Python 3.8+ ilə API yaratmaq üçün standart Python Starlette.
@@ -330,7 +328,7 @@ Bunu standart müasir Python tipləri ilə edirsiniz.
Yeni sintaksis, müəyyən bir kitabxananın metodlarını və ya siniflərini və s. öyrənmək məcburiyyətində deyilsiniz.
-Sadəcə standart **Python 3.8+**.
+Sadəcə standart **Python**.
Məsələn, `int` üçün:
diff --git a/docs/bn/docs/index.md b/docs/bn/docs/index.md
index 688f3f95ac..bbc3e9a3a1 100644
--- a/docs/bn/docs/index.md
+++ b/docs/bn/docs/index.md
@@ -439,7 +439,6 @@ item: Item
Pydantic দ্বারা ব্যবহৃত:
-- ujson - দ্রুত JSON এর জন্য "parsing".
- email_validator - ইমেল যাচাইকরণের জন্য।
স্টারলেট দ্বারা ব্যবহৃত:
@@ -450,12 +449,12 @@ Pydantic দ্বারা ব্যবহৃত:
- itsdangerous - `SessionMiddleware` সহায়তার জন্য প্রয়োজন।
- pyyaml - স্টারলেটের SchemaGenerator সাপোর্ট এর জন্য প্রয়োজন (আপনার সম্ভাবত FastAPI প্রয়োজন নেই)।
- graphene - `GraphQLApp` সহায়তার জন্য প্রয়োজন।
-- ujson - আপনি `UJSONResponse` ব্যবহার করতে চাইলে প্রয়োজন।
FastAPI / Starlette দ্বারা ব্যবহৃত:
- uvicorn - সার্ভারের জন্য যা আপনার অ্যাপ্লিকেশন লোড করে এবং পরিবেশন করে।
- orjson - আপনি `ORJSONResponse` ব্যবহার করতে চাইলে প্রয়োজন।
+- ujson - আপনি `UJSONResponse` ব্যবহার করতে চাইলে প্রয়োজন।
আপনি এই সব ইনস্টল করতে পারেন `pip install fastapi[all]` দিয়ে.
diff --git a/docs/de/docs/how-to/custom-docs-ui-assets.md b/docs/de/docs/how-to/custom-docs-ui-assets.md
index 991eaf2692..a9271b3f3f 100644
--- a/docs/de/docs/how-to/custom-docs-ui-assets.md
+++ b/docs/de/docs/how-to/custom-docs-ui-assets.md
@@ -96,8 +96,8 @@ Sie können wahrscheinlich mit der rechten Maustaste auf jeden Link klicken und
**Swagger UI** verwendet folgende Dateien:
-* `swagger-ui-bundle.js`
-* `swagger-ui.css`
+* `swagger-ui-bundle.js`
+* `swagger-ui.css`
Und **ReDoc** verwendet diese Datei:
diff --git a/docs/de/docs/index.md b/docs/de/docs/index.md
index cf5a2b2d69..9b8a73003c 100644
--- a/docs/de/docs/index.md
+++ b/docs/de/docs/index.md
@@ -36,7 +36,7 @@ hide:
---
-FastAPI ist ein modernes, schnelles (hoch performantes) Webframework zur Erstellung von APIs mit Python 3.8+ auf Basis von Standard-Python-Typhinweisen.
+FastAPI ist ein modernes, schnelles (hoch performantes) Webframework zur Erstellung von APIs mit Python auf Basis von Standard-Python-Typhinweisen.
Seine Schlüssel-Merkmale sind:
@@ -125,8 +125,6 @@ Wenn Sie eine Starlette für die Webanteile.
@@ -340,7 +338,7 @@ Das machen Sie mit modernen Standard-Python-Typen.
Sie müssen keine neue Syntax, Methoden oder Klassen einer bestimmten Bibliothek usw. lernen.
-Nur Standard-**Python 3.8+**.
+Nur Standard-**Python+**.
Zum Beispiel für ein `int`:
diff --git a/docs/em/docs/advanced/behind-a-proxy.md b/docs/em/docs/advanced/behind-a-proxy.md
index 12afe638c6..e3fd267354 100644
--- a/docs/em/docs/advanced/behind-a-proxy.md
+++ b/docs/em/docs/advanced/behind-a-proxy.md
@@ -341,6 +341,6 @@ $ uvicorn main:app --root-path /api/v1
## 🗜 🎧-🈸
-🚥 👆 💪 🗻 🎧-🈸 (🔬 [🎧 🈸 - 🗻](./sub-applications.md){.internal-link target=_blank}) ⏪ ⚙️ 🗳 ⏮️ `root_path`, 👆 💪 ⚫️ 🛎, 👆 🔜 ⌛.
+🚥 👆 💪 🗻 🎧-🈸 (🔬 [🎧 🈸 - 🗻](sub-applications.md){.internal-link target=_blank}) ⏪ ⚙️ 🗳 ⏮️ `root_path`, 👆 💪 ⚫️ 🛎, 👆 🔜 ⌛.
FastAPI 🔜 🔘 ⚙️ `root_path` 🎆, ⚫️ 🔜 👷. 👶
diff --git a/docs/em/docs/advanced/events.md b/docs/em/docs/advanced/events.md
index 671e81b186..19421ff58a 100644
--- a/docs/em/docs/advanced/events.md
+++ b/docs/em/docs/advanced/events.md
@@ -157,4 +157,4 @@ async with lifespan(app):
## 🎧 🈸
-👶 ✔️ 🤯 👈 👫 🔆 🎉 (🕴 & 🤫) 🔜 🕴 🛠️ 👑 🈸, 🚫 [🎧 🈸 - 🗻](./sub-applications.md){.internal-link target=_blank}.
+👶 ✔️ 🤯 👈 👫 🔆 🎉 (🕴 & 🤫) 🔜 🕴 🛠️ 👑 🈸, 🚫 [🎧 🈸 - 🗻](sub-applications.md){.internal-link target=_blank}.
diff --git a/docs/em/docs/advanced/path-operation-advanced-configuration.md b/docs/em/docs/advanced/path-operation-advanced-configuration.md
index ec72318706..3dc5ac536a 100644
--- a/docs/em/docs/advanced/path-operation-advanced-configuration.md
+++ b/docs/em/docs/advanced/path-operation-advanced-configuration.md
@@ -59,7 +59,7 @@
👆 💪 📣 🌖 📨 ⏮️ 👫 🏷, 👔 📟, ♒️.
-📤 🎂 📃 📥 🧾 🔃 ⚫️, 👆 💪 ✍ ⚫️ [🌖 📨 🗄](./additional-responses.md){.internal-link target=_blank}.
+📤 🎂 📃 📥 🧾 🔃 ⚫️, 👆 💪 ✍ ⚫️ [🌖 📨 🗄](additional-responses.md){.internal-link target=_blank}.
## 🗄 ➕
@@ -77,7 +77,7 @@
!!! tip
👉 🔅 🎚 ↔ ☝.
- 🚥 👆 🕴 💪 📣 🌖 📨, 🌅 🏪 🌌 ⚫️ ⏮️ [🌖 📨 🗄](./additional-responses.md){.internal-link target=_blank}.
+ 🚥 👆 🕴 💪 📣 🌖 📨, 🌅 🏪 🌌 ⚫️ ⏮️ [🌖 📨 🗄](additional-responses.md){.internal-link target=_blank}.
👆 💪 ↔ 🗄 🔗 *➡ 🛠️* ⚙️ 🔢 `openapi_extra`.
diff --git a/docs/em/docs/advanced/sub-applications.md b/docs/em/docs/advanced/sub-applications.md
index e0391453be..1e0931f95f 100644
--- a/docs/em/docs/advanced/sub-applications.md
+++ b/docs/em/docs/advanced/sub-applications.md
@@ -70,4 +70,4 @@ $ uvicorn main:app --reload
& 🎧-🈸 💪 ✔️ 🚮 👍 📌 🎧-🈸 & 🌐 🔜 👷 ☑, ↩️ FastAPI 🍵 🌐 👉 `root_path`Ⓜ 🔁.
-👆 🔜 💡 🌅 🔃 `root_path` & ❔ ⚙️ ⚫️ 🎯 📄 🔃 [⛅ 🗳](./behind-a-proxy.md){.internal-link target=_blank}.
+👆 🔜 💡 🌅 🔃 `root_path` & ❔ ⚙️ ⚫️ 🎯 📄 🔃 [⛅ 🗳](behind-a-proxy.md){.internal-link target=_blank}.
diff --git a/docs/em/docs/advanced/wsgi.md b/docs/em/docs/advanced/wsgi.md
index 4d051807fb..6a4ed073c2 100644
--- a/docs/em/docs/advanced/wsgi.md
+++ b/docs/em/docs/advanced/wsgi.md
@@ -1,6 +1,6 @@
# ✅ 🇨🇻 - 🏺, ✳, 🎏
-👆 💪 🗻 🇨🇻 🈸 👆 👀 ⏮️ [🎧 🈸 - 🗻](./sub-applications.md){.internal-link target=_blank}, [⛅ 🗳](./behind-a-proxy.md){.internal-link target=_blank}.
+👆 💪 🗻 🇨🇻 🈸 👆 👀 ⏮️ [🎧 🈸 - 🗻](sub-applications.md){.internal-link target=_blank}, [⛅ 🗳](behind-a-proxy.md){.internal-link target=_blank}.
👈, 👆 💪 ⚙️ `WSGIMiddleware` & ⚙️ ⚫️ 🎁 👆 🇨🇻 🈸, 🖼, 🏺, ✳, ♒️.
diff --git a/docs/em/docs/async.md b/docs/em/docs/async.md
index bed31c3e7d..0db497f403 100644
--- a/docs/em/docs/async.md
+++ b/docs/em/docs/async.md
@@ -405,15 +405,15 @@ async def read_burgers():
🚥 👆 👟 ⚪️➡️ ➕1️⃣ 🔁 🛠️ 👈 🔨 🚫 👷 🌌 🔬 🔛 & 👆 ⚙️ ⚖ 🙃 📊-🕴 *➡ 🛠️ 🔢* ⏮️ ✅ `def` 🤪 🎭 📈 (🔃 1️⃣0️⃣0️⃣ 💓), 🙏 🗒 👈 **FastAPI** ⭐ 🔜 🔄. 👫 💼, ⚫️ 👻 ⚙️ `async def` 🚥 👆 *➡ 🛠️ 🔢* ⚙️ 📟 👈 🎭 🚧 👤/🅾.
-, 👯♂️ ⚠, 🤞 👈 **FastAPI** 🔜 [⏩](index.md#performance){.internal-link target=_blank} 🌘 (⚖️ 🌘 ⭐) 👆 ⏮️ 🛠️.
+, 👯♂️ ⚠, 🤞 👈 **FastAPI** 🔜 [⏩](index.md#_15){.internal-link target=_blank} 🌘 (⚖️ 🌘 ⭐) 👆 ⏮️ 🛠️.
### 🔗
-🎏 ✔ [🔗](./tutorial/dependencies/index.md){.internal-link target=_blank}. 🚥 🔗 🐩 `def` 🔢 ↩️ `async def`, ⚫️ 🏃 🔢 🧵.
+🎏 ✔ [🔗](tutorial/dependencies/index.md){.internal-link target=_blank}. 🚥 🔗 🐩 `def` 🔢 ↩️ `async def`, ⚫️ 🏃 🔢 🧵.
### 🎧-🔗
-👆 💪 ✔️ 💗 🔗 & [🎧-🔗](./tutorial/dependencies/sub-dependencies.md){.internal-link target=_blank} 🚫 🔠 🎏 (🔢 🔢 🔑), 👫 💪 ✍ ⏮️ `async def` & ⏮️ 😐 `def`. ⚫️ 🔜 👷, & 🕐 ✍ ⏮️ 😐 `def` 🔜 🤙 🔛 🔢 🧵 (⚪️➡️ 🧵) ↩️ ➖ "⌛".
+👆 💪 ✔️ 💗 🔗 & [🎧-🔗](tutorial/dependencies/sub-dependencies.md){.internal-link target=_blank} 🚫 🔠 🎏 (🔢 🔢 🔑), 👫 💪 ✍ ⏮️ `async def` & ⏮️ 😐 `def`. ⚫️ 🔜 👷, & 🕐 ✍ ⏮️ 😐 `def` 🔜 🤙 🔛 🔢 🧵 (⚪️➡️ 🧵) ↩️ ➖ "⌛".
### 🎏 🚙 🔢
@@ -427,4 +427,4 @@ async def read_burgers():
🔄, 👉 📶 📡 ℹ 👈 🔜 🎲 ⚠ 🚥 👆 👟 🔎 👫.
-⏪, 👆 🔜 👍 ⏮️ 📄 ⚪️➡️ 📄 🔛: 🏃 ❓.
+⏪, 👆 🔜 👍 ⏮️ 📄 ⚪️➡️ 📄 🔛: 🏃 ❓.
diff --git a/docs/em/docs/deployment/concepts.md b/docs/em/docs/deployment/concepts.md
index 162b68615a..b0f86cb5ee 100644
--- a/docs/em/docs/deployment/concepts.md
+++ b/docs/em/docs/deployment/concepts.md
@@ -25,7 +25,7 @@
## 💂♂ - 🇺🇸🔍
-[⏮️ 📃 🔃 🇺🇸🔍](./https.md){.internal-link target=_blank} 👥 🇭🇲 🔃 ❔ 🇺🇸🔍 🚚 🔐 👆 🛠️.
+[⏮️ 📃 🔃 🇺🇸🔍](https.md){.internal-link target=_blank} 👥 🇭🇲 🔃 ❔ 🇺🇸🔍 🚚 🔐 👆 🛠️.
👥 👀 👈 🇺🇸🔍 🛎 🚚 🦲 **🔢** 👆 🈸 💽, **🤝 ❎ 🗳**.
@@ -187,7 +187,7 @@
### 👨🏭 🛠️ & ⛴
-💭 ⚪️➡️ 🩺 [🔃 🇺🇸🔍](./https.md){.internal-link target=_blank} 👈 🕴 1️⃣ 🛠️ 💪 👂 🔛 1️⃣ 🌀 ⛴ & 📢 📢 💽 ❓
+💭 ⚪️➡️ 🩺 [🔃 🇺🇸🔍](https.md){.internal-link target=_blank} 👈 🕴 1️⃣ 🛠️ 💪 👂 🔛 1️⃣ 🌀 ⛴ & 📢 📢 💽 ❓
👉 ☑.
@@ -241,7 +241,7 @@
!!! tip
🚫 😟 🚥 👫 🏬 🔃 **📦**, ☁, ⚖️ Kubernetes 🚫 ⚒ 📚 🔑.
- 👤 🔜 💬 👆 🌅 🔃 📦 🖼, ☁, Kubernetes, ♒️. 🔮 📃: [FastAPI 📦 - ☁](./docker.md){.internal-link target=_blank}.
+ 👤 🔜 💬 👆 🌅 🔃 📦 🖼, ☁, Kubernetes, ♒️. 🔮 📃: [FastAPI 📦 - ☁](docker.md){.internal-link target=_blank}.
## ⏮️ 🔁 ⏭ ▶️
@@ -273,7 +273,7 @@
* 👆 🔜 💪 🌌 ▶️/⏏ *👈* 🎉 ✍, 🔍 ❌, ♒️.
!!! tip
- 👤 🔜 🤝 👆 🌅 🧱 🖼 🔨 👉 ⏮️ 📦 🔮 📃: [FastAPI 📦 - ☁](./docker.md){.internal-link target=_blank}.
+ 👤 🔜 🤝 👆 🌅 🧱 🖼 🔨 👉 ⏮️ 📦 🔮 📃: [FastAPI 📦 - ☁](docker.md){.internal-link target=_blank}.
## ℹ 🛠️
diff --git a/docs/em/docs/deployment/docker.md b/docs/em/docs/deployment/docker.md
index f28735ed71..091eb3babd 100644
--- a/docs/em/docs/deployment/docker.md
+++ b/docs/em/docs/deployment/docker.md
@@ -5,7 +5,7 @@
⚙️ 💾 📦 ✔️ 📚 📈 ✅ **💂♂**, **🔬**, **🦁**, & 🎏.
!!! tip
- 🏃 & ⏪ 💭 👉 💩 ❓ 🦘 [`Dockerfile` 🔛 👶](#build-a-docker-image-for-fastapi).
+ 🏃 & ⏪ 💭 👉 💩 ❓ 🦘 [`Dockerfile` 🔛 👶](#fastapi).
ujson - ⏩ 🎻 "🎻".
* email_validator - 📧 🔬.
⚙️ 💃:
@@ -455,12 +463,12 @@ item: Item
* python-multipart - ✔ 🚥 👆 💚 🐕🦺 📨 "✍", ⏮️ `request.form()`.
* itsdangerous - ✔ `SessionMiddleware` 🐕🦺.
* pyyaml - ✔ 💃 `SchemaGenerator` 🐕🦺 (👆 🎲 🚫 💪 ⚫️ ⏮️ FastAPI).
-* ujson - ✔ 🚥 👆 💚 ⚙️ `UJSONResponse`.
⚙️ FastAPI / 💃:
* uvicorn - 💽 👈 📐 & 🍦 👆 🈸.
* orjson - ✔ 🚥 👆 💚 ⚙️ `ORJSONResponse`.
+* ujson - ✔ 🚥 👆 💚 ⚙️ `UJSONResponse`.
👆 💪 ❎ 🌐 👫 ⏮️ `pip install "fastapi[all]"`.
diff --git a/docs/em/docs/python-types.md b/docs/em/docs/python-types.md
index b8f61a113f..b3026917a3 100644
--- a/docs/em/docs/python-types.md
+++ b/docs/em/docs/python-types.md
@@ -168,7 +168,7 @@ John Doe
⚪️➡️ `typing`, 🗄 `List` (⏮️ 🔠 `L`):
- ``` Python hl_lines="1"
+ ```Python hl_lines="1"
{!> ../../../docs_src/python_types/tutorial006.py!}
```
diff --git a/docs/em/docs/tutorial/bigger-applications.md b/docs/em/docs/tutorial/bigger-applications.md
index c30bba106a..fc9076aa8d 100644
--- a/docs/em/docs/tutorial/bigger-applications.md
+++ b/docs/em/docs/tutorial/bigger-applications.md
@@ -119,7 +119,7 @@
!!! tip
👥 ⚙️ 💭 🎚 📉 👉 🖼.
- ✋️ 🎰 💼 👆 🔜 🤚 👍 🏁 ⚙️ 🛠️ [💂♂ 🚙](./security/index.md){.internal-link target=_blank}.
+ ✋️ 🎰 💼 👆 🔜 🤚 👍 🏁 ⚙️ 🛠️ [💂♂ 🚙](security/index.md){.internal-link target=_blank}.
## ➕1️⃣ 🕹 ⏮️ `APIRouter`
diff --git a/docs/em/docs/tutorial/body-updates.md b/docs/em/docs/tutorial/body-updates.md
index 98058ab526..89bb615f60 100644
--- a/docs/em/docs/tutorial/body-updates.md
+++ b/docs/em/docs/tutorial/body-updates.md
@@ -48,7 +48,7 @@
👉 ⛓ 👈 👆 💪 📨 🕴 💽 👈 👆 💚 ℹ, 🍂 🎂 🐣.
-!!! Note
+!!! note
`PATCH` 🌘 🛎 ⚙️ & 💭 🌘 `PUT`.
& 📚 🏉 ⚙️ 🕴 `PUT`, 🍕 ℹ.
diff --git a/docs/em/docs/tutorial/body.md b/docs/em/docs/tutorial/body.md
index db850162a2..12f5a63153 100644
--- a/docs/em/docs/tutorial/body.md
+++ b/docs/em/docs/tutorial/body.md
@@ -210,4 +210,4 @@
## 🍵 Pydantic
-🚥 👆 🚫 💚 ⚙️ Pydantic 🏷, 👆 💪 ⚙️ **💪** 🔢. 👀 🩺 [💪 - 💗 🔢: ⭐ 💲 💪](body-multiple-params.md#singular-values-in-body){.internal-link target=_blank}.
+🚥 👆 🚫 💚 ⚙️ Pydantic 🏷, 👆 💪 ⚙️ **💪** 🔢. 👀 🩺 [💪 - 💗 🔢: ⭐ 💲 💪](body-multiple-params.md#_2){.internal-link target=_blank}.
diff --git a/docs/em/docs/tutorial/dependencies/dependencies-with-yield.md b/docs/em/docs/tutorial/dependencies/dependencies-with-yield.md
index 9617667f43..3ed5aeba5a 100644
--- a/docs/em/docs/tutorial/dependencies/dependencies-with-yield.md
+++ b/docs/em/docs/tutorial/dependencies/dependencies-with-yield.md
@@ -99,7 +99,7 @@ FastAPI 🐕🦺 🔗 👈
```console
-$ uvicorn main:app --root-path /api/v1
+$ fastapi run main.py --root-path /api/v1
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
```
@@ -101,7 +101,7 @@ Then, if you start Uvicorn with:
diff --git a/docs/en/docs/advanced/openapi-webhooks.md b/docs/en/docs/advanced/openapi-webhooks.md
index 63cbdc6103..f7f43b3572 100644
--- a/docs/en/docs/advanced/openapi-webhooks.md
+++ b/docs/en/docs/advanced/openapi-webhooks.md
@@ -44,7 +44,7 @@ This is because it is expected that **your users** would define the actual **URL
### Check the docs
-Now you can start your app with Uvicorn and go to http://127.0.0.1:8000/docs.
+Now you can start your app and go to http://127.0.0.1:8000/docs.
You will see your docs have the normal *path operations* and now also some **webhooks**:
diff --git a/docs/en/docs/advanced/path-operation-advanced-configuration.md b/docs/en/docs/advanced/path-operation-advanced-configuration.md
index 8b79bfe22a..35f7d1b8d9 100644
--- a/docs/en/docs/advanced/path-operation-advanced-configuration.md
+++ b/docs/en/docs/advanced/path-operation-advanced-configuration.md
@@ -59,7 +59,7 @@ That defines the metadata about the main response of a *path operation*.
You can also declare additional responses with their models, status codes, etc.
-There's a whole chapter here in the documentation about it, you can read it at [Additional Responses in OpenAPI](./additional-responses.md){.internal-link target=_blank}.
+There's a whole chapter here in the documentation about it, you can read it at [Additional Responses in OpenAPI](additional-responses.md){.internal-link target=_blank}.
## OpenAPI Extra
@@ -77,7 +77,7 @@ This *path operation*-specific OpenAPI schema is normally generated automaticall
!!! tip
This is a low level extension point.
- If you only need to declare additional responses, a more convenient way to do it is with [Additional Responses in OpenAPI](./additional-responses.md){.internal-link target=_blank}.
+ If you only need to declare additional responses, a more convenient way to do it is with [Additional Responses in OpenAPI](additional-responses.md){.internal-link target=_blank}.
You can extend the OpenAPI schema for a *path operation* using the parameter `openapi_extra`.
@@ -187,6 +187,6 @@ And then in our code, we parse that YAML content directly, and then we are again
In Pydantic version 1 the method to parse and validate an object was `Item.parse_obj()`, in Pydantic version 2, the method is called `Item.model_validate()`.
!!! tip
- Here we re-use the same Pydantic model.
+ Here we reuse the same Pydantic model.
But the same way, we could have validated it in some other way.
diff --git a/docs/en/docs/advanced/security/oauth2-scopes.md b/docs/en/docs/advanced/security/oauth2-scopes.md
index b93d2991c4..9a9c0dff92 100644
--- a/docs/en/docs/advanced/security/oauth2-scopes.md
+++ b/docs/en/docs/advanced/security/oauth2-scopes.md
@@ -58,19 +58,19 @@ First, let's quickly see the parts that change from the examples in the main **T
=== "Python 3.10+"
- ```Python hl_lines="4 8 12 46 64 105 107-115 121-124 128-134 139 155"
+ ```Python hl_lines="5 9 13 47 65 106 108-116 122-125 129-135 140 156"
{!> ../../../docs_src/security/tutorial005_an_py310.py!}
```
=== "Python 3.9+"
- ```Python hl_lines="2 4 8 12 46 64 105 107-115 121-124 128-134 139 155"
+ ```Python hl_lines="2 5 9 13 47 65 106 108-116 122-125 129-135 140 156"
{!> ../../../docs_src/security/tutorial005_an_py39.py!}
```
=== "Python 3.8+"
- ```Python hl_lines="2 4 8 12 47 65 106 108-116 122-125 129-135 140 156"
+ ```Python hl_lines="2 5 9 13 48 66 107 109-117 123-126 130-136 141 157"
{!> ../../../docs_src/security/tutorial005_an.py!}
```
@@ -79,7 +79,7 @@ First, let's quickly see the parts that change from the examples in the main **T
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="3 7 11 45 63 104 106-114 120-123 127-133 138 154"
+ ```Python hl_lines="4 8 12 46 64 105 107-115 121-124 128-134 139 155"
{!> ../../../docs_src/security/tutorial005_py310.py!}
```
@@ -88,7 +88,7 @@ First, let's quickly see the parts that change from the examples in the main **T
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="2 4 8 12 46 64 105 107-115 121-124 128-134 139 155"
+ ```Python hl_lines="2 5 9 13 47 65 106 108-116 122-125 129-135 140 156"
{!> ../../../docs_src/security/tutorial005_py39.py!}
```
@@ -97,7 +97,7 @@ First, let's quickly see the parts that change from the examples in the main **T
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="2 4 8 12 46 64 105 107-115 121-124 128-134 139 155"
+ ```Python hl_lines="2 5 9 13 47 65 106 108-116 122-125 129-135 140 156"
{!> ../../../docs_src/security/tutorial005.py!}
```
@@ -111,19 +111,19 @@ The `scopes` parameter receives a `dict` with each scope as a key and the descri
=== "Python 3.10+"
- ```Python hl_lines="62-65"
+ ```Python hl_lines="63-66"
{!> ../../../docs_src/security/tutorial005_an_py310.py!}
```
=== "Python 3.9+"
- ```Python hl_lines="62-65"
+ ```Python hl_lines="63-66"
{!> ../../../docs_src/security/tutorial005_an_py39.py!}
```
=== "Python 3.8+"
- ```Python hl_lines="63-66"
+ ```Python hl_lines="64-67"
{!> ../../../docs_src/security/tutorial005_an.py!}
```
@@ -132,7 +132,7 @@ The `scopes` parameter receives a `dict` with each scope as a key and the descri
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="61-64"
+ ```Python hl_lines="62-65"
{!> ../../../docs_src/security/tutorial005_py310.py!}
```
@@ -142,7 +142,7 @@ The `scopes` parameter receives a `dict` with each scope as a key and the descri
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="62-65"
+ ```Python hl_lines="63-66"
{!> ../../../docs_src/security/tutorial005_py39.py!}
```
@@ -151,7 +151,7 @@ The `scopes` parameter receives a `dict` with each scope as a key and the descri
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="62-65"
+ ```Python hl_lines="63-66"
{!> ../../../docs_src/security/tutorial005.py!}
```
@@ -178,19 +178,19 @@ And we return the scopes as part of the JWT token.
=== "Python 3.10+"
- ```Python hl_lines="155"
+ ```Python hl_lines="156"
{!> ../../../docs_src/security/tutorial005_an_py310.py!}
```
=== "Python 3.9+"
- ```Python hl_lines="155"
+ ```Python hl_lines="156"
{!> ../../../docs_src/security/tutorial005_an_py39.py!}
```
=== "Python 3.8+"
- ```Python hl_lines="156"
+ ```Python hl_lines="157"
{!> ../../../docs_src/security/tutorial005_an.py!}
```
@@ -199,7 +199,7 @@ And we return the scopes as part of the JWT token.
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="154"
+ ```Python hl_lines="155"
{!> ../../../docs_src/security/tutorial005_py310.py!}
```
@@ -208,7 +208,7 @@ And we return the scopes as part of the JWT token.
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="155"
+ ```Python hl_lines="156"
{!> ../../../docs_src/security/tutorial005_py39.py!}
```
@@ -217,7 +217,7 @@ And we return the scopes as part of the JWT token.
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="155"
+ ```Python hl_lines="156"
{!> ../../../docs_src/security/tutorial005.py!}
```
@@ -244,19 +244,19 @@ In this case, it requires the scope `me` (it could require more than one scope).
=== "Python 3.10+"
- ```Python hl_lines="4 139 170"
+ ```Python hl_lines="5 140 171"
{!> ../../../docs_src/security/tutorial005_an_py310.py!}
```
=== "Python 3.9+"
- ```Python hl_lines="4 139 170"
+ ```Python hl_lines="5 140 171"
{!> ../../../docs_src/security/tutorial005_an_py39.py!}
```
=== "Python 3.8+"
- ```Python hl_lines="4 140 171"
+ ```Python hl_lines="5 141 172"
{!> ../../../docs_src/security/tutorial005_an.py!}
```
@@ -265,7 +265,7 @@ In this case, it requires the scope `me` (it could require more than one scope).
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="3 138 167"
+ ```Python hl_lines="4 139 168"
{!> ../../../docs_src/security/tutorial005_py310.py!}
```
@@ -274,7 +274,7 @@ In this case, it requires the scope `me` (it could require more than one scope).
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="4 139 168"
+ ```Python hl_lines="5 140 169"
{!> ../../../docs_src/security/tutorial005_py39.py!}
```
@@ -283,7 +283,7 @@ In this case, it requires the scope `me` (it could require more than one scope).
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="4 139 168"
+ ```Python hl_lines="5 140 169"
{!> ../../../docs_src/security/tutorial005.py!}
```
@@ -310,19 +310,19 @@ This `SecurityScopes` class is similar to `Request` (`Request` was used to get t
=== "Python 3.10+"
- ```Python hl_lines="8 105"
+ ```Python hl_lines="9 106"
{!> ../../../docs_src/security/tutorial005_an_py310.py!}
```
=== "Python 3.9+"
- ```Python hl_lines="8 105"
+ ```Python hl_lines="9 106"
{!> ../../../docs_src/security/tutorial005_an_py39.py!}
```
=== "Python 3.8+"
- ```Python hl_lines="8 106"
+ ```Python hl_lines="9 107"
{!> ../../../docs_src/security/tutorial005_an.py!}
```
@@ -331,7 +331,7 @@ This `SecurityScopes` class is similar to `Request` (`Request` was used to get t
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="7 104"
+ ```Python hl_lines="8 105"
{!> ../../../docs_src/security/tutorial005_py310.py!}
```
@@ -340,7 +340,7 @@ This `SecurityScopes` class is similar to `Request` (`Request` was used to get t
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="8 105"
+ ```Python hl_lines="9 106"
{!> ../../../docs_src/security/tutorial005_py39.py!}
```
@@ -349,7 +349,7 @@ This `SecurityScopes` class is similar to `Request` (`Request` was used to get t
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="8 105"
+ ```Python hl_lines="9 106"
{!> ../../../docs_src/security/tutorial005.py!}
```
@@ -361,25 +361,25 @@ It will have a property `scopes` with a list containing all the scopes required
The `security_scopes` object (of class `SecurityScopes`) also provides a `scope_str` attribute with a single string, containing those scopes separated by spaces (we are going to use it).
-We create an `HTTPException` that we can re-use (`raise`) later at several points.
+We create an `HTTPException` that we can reuse (`raise`) later at several points.
In this exception, we include the scopes required (if any) as a string separated by spaces (using `scope_str`). We put that string containing the scopes in the `WWW-Authenticate` header (this is part of the spec).
=== "Python 3.10+"
- ```Python hl_lines="105 107-115"
+ ```Python hl_lines="106 108-116"
{!> ../../../docs_src/security/tutorial005_an_py310.py!}
```
=== "Python 3.9+"
- ```Python hl_lines="105 107-115"
+ ```Python hl_lines="106 108-116"
{!> ../../../docs_src/security/tutorial005_an_py39.py!}
```
=== "Python 3.8+"
- ```Python hl_lines="106 108-116"
+ ```Python hl_lines="107 109-117"
{!> ../../../docs_src/security/tutorial005_an.py!}
```
@@ -388,7 +388,7 @@ In this exception, we include the scopes required (if any) as a string separated
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="104 106-114"
+ ```Python hl_lines="105 107-115"
{!> ../../../docs_src/security/tutorial005_py310.py!}
```
@@ -397,7 +397,7 @@ In this exception, we include the scopes required (if any) as a string separated
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="105 107-115"
+ ```Python hl_lines="106 108-116"
{!> ../../../docs_src/security/tutorial005_py39.py!}
```
@@ -406,7 +406,7 @@ In this exception, we include the scopes required (if any) as a string separated
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="105 107-115"
+ ```Python hl_lines="106 108-116"
{!> ../../../docs_src/security/tutorial005.py!}
```
@@ -426,19 +426,19 @@ We also verify that we have a user with that username, and if not, we raise that
=== "Python 3.10+"
- ```Python hl_lines="46 116-127"
+ ```Python hl_lines="47 117-128"
{!> ../../../docs_src/security/tutorial005_an_py310.py!}
```
=== "Python 3.9+"
- ```Python hl_lines="46 116-127"
+ ```Python hl_lines="47 117-128"
{!> ../../../docs_src/security/tutorial005_an_py39.py!}
```
=== "Python 3.8+"
- ```Python hl_lines="47 117-128"
+ ```Python hl_lines="48 118-129"
{!> ../../../docs_src/security/tutorial005_an.py!}
```
@@ -447,7 +447,7 @@ We also verify that we have a user with that username, and if not, we raise that
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="45 115-126"
+ ```Python hl_lines="46 116-127"
{!> ../../../docs_src/security/tutorial005_py310.py!}
```
@@ -456,7 +456,7 @@ We also verify that we have a user with that username, and if not, we raise that
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="46 116-127"
+ ```Python hl_lines="47 117-128"
{!> ../../../docs_src/security/tutorial005_py39.py!}
```
@@ -465,7 +465,7 @@ We also verify that we have a user with that username, and if not, we raise that
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="46 116-127"
+ ```Python hl_lines="47 117-128"
{!> ../../../docs_src/security/tutorial005.py!}
```
@@ -477,19 +477,19 @@ For this, we use `security_scopes.scopes`, that contains a `list` with all these
=== "Python 3.10+"
- ```Python hl_lines="128-134"
+ ```Python hl_lines="129-135"
{!> ../../../docs_src/security/tutorial005_an_py310.py!}
```
=== "Python 3.9+"
- ```Python hl_lines="128-134"
+ ```Python hl_lines="129-135"
{!> ../../../docs_src/security/tutorial005_an_py39.py!}
```
=== "Python 3.8+"
- ```Python hl_lines="129-135"
+ ```Python hl_lines="130-136"
{!> ../../../docs_src/security/tutorial005_an.py!}
```
@@ -498,7 +498,7 @@ For this, we use `security_scopes.scopes`, that contains a `list` with all these
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="127-133"
+ ```Python hl_lines="128-134"
{!> ../../../docs_src/security/tutorial005_py310.py!}
```
@@ -507,7 +507,7 @@ For this, we use `security_scopes.scopes`, that contains a `list` with all these
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="128-134"
+ ```Python hl_lines="129-135"
{!> ../../../docs_src/security/tutorial005_py39.py!}
```
@@ -516,7 +516,7 @@ For this, we use `security_scopes.scopes`, that contains a `list` with all these
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="128-134"
+ ```Python hl_lines="129-135"
{!> ../../../docs_src/security/tutorial005.py!}
```
diff --git a/docs/en/docs/advanced/settings.md b/docs/en/docs/advanced/settings.md
index f6db8d2b15..56af4f441a 100644
--- a/docs/en/docs/advanced/settings.md
+++ b/docs/en/docs/advanced/settings.md
@@ -199,7 +199,7 @@ Next, you would run the server passing the configurations as environment variabl
uvicorn main:app --reload...fastapi dev main.py...httpx - Required if you want to use the `TestClient`.
* jinja2 - Required if you want to use the default template configuration.
* python-multipart - Required if you want to support form "parsing", with `request.form()`.
-* itsdangerous - Required for `SessionMiddleware` support.
-* pyyaml - Required for Starlette's `SchemaGenerator` support (you probably don't need it with FastAPI).
-* ujson - Required if you want to use `UJSONResponse`.
Used by FastAPI / Starlette:
* uvicorn - for the server that loads and serves your application.
* orjson - Required if you want to use `ORJSONResponse`.
+* ujson - Required if you want to use `UJSONResponse`.
+* `fastapi-cli` - to provide the `fastapi` command.
-You can install all of these with `pip install "fastapi[all]"`.
+When you install `fastapi` it comes these standard dependencies.
+
+## `fastapi-slim`
+
+If you don't want the extra standard optional dependencies, install `fastapi-slim` instead.
+
+When you install with:
+
+```bash
+pip install fastapi
+```
+
+...it includes the same code and dependencies as:
+
+```bash
+pip install "fastapi-slim[standard]"
+```
+
+The standard extra dependencies are the ones mentioned above.
## License
diff --git a/docs/en/docs/python-types.md b/docs/en/docs/python-types.md
index 51db744ff5..20ffcdccc7 100644
--- a/docs/en/docs/python-types.md
+++ b/docs/en/docs/python-types.md
@@ -186,7 +186,7 @@ For example, let's define a variable to be a `list` of `str`.
From `typing`, import `List` (with a capital `L`):
- ``` Python hl_lines="1"
+ ```Python hl_lines="1"
{!> ../../../docs_src/python_types/tutorial006.py!}
```
@@ -476,7 +476,7 @@ You will see a lot more of all this in practice in the [Tutorial - User Guide](t
## Type Hints with Metadata Annotations
-Python also has a feature that allows putting **additional metadata** in these type hints using `Annotated`.
+Python also has a feature that allows putting **additional metadata** in these type hints using `Annotated`.
=== "Python 3.9+"
diff --git a/docs/en/docs/reference/apirouter.md b/docs/en/docs/reference/apirouter.md
index b779ad2914..d77364e45e 100644
--- a/docs/en/docs/reference/apirouter.md
+++ b/docs/en/docs/reference/apirouter.md
@@ -1,7 +1,6 @@
# `APIRouter` class
-Here's the reference information for the `APIRouter` class, with all its parameters,
-attributes and methods.
+Here's the reference information for the `APIRouter` class, with all its parameters, attributes and methods.
You can import the `APIRouter` class directly from `fastapi`:
diff --git a/docs/en/docs/reference/background.md b/docs/en/docs/reference/background.md
index e0c0be899f..f65619590e 100644
--- a/docs/en/docs/reference/background.md
+++ b/docs/en/docs/reference/background.md
@@ -1,8 +1,6 @@
# Background Tasks - `BackgroundTasks`
-You can declare a parameter in a *path operation function* or dependency function
-with the type `BackgroundTasks`, and then you can use it to schedule the execution
-of background tasks after the response is sent.
+You can declare a parameter in a *path operation function* or dependency function with the type `BackgroundTasks`, and then you can use it to schedule the execution of background tasks after the response is sent.
You can import it directly from `fastapi`:
diff --git a/docs/en/docs/reference/dependencies.md b/docs/en/docs/reference/dependencies.md
index 0999682679..2959a21dae 100644
--- a/docs/en/docs/reference/dependencies.md
+++ b/docs/en/docs/reference/dependencies.md
@@ -2,8 +2,7 @@
## `Depends()`
-Dependencies are handled mainly with the special function `Depends()` that takes a
-callable.
+Dependencies are handled mainly with the special function `Depends()` that takes a callable.
Here is the reference for it and its parameters.
@@ -17,11 +16,9 @@ from fastapi import Depends
## `Security()`
-For many scenarios, you can handle security (authorization, authentication, etc.) with
-dependencies, using `Depends()`.
+For many scenarios, you can handle security (authorization, authentication, etc.) with dependencies, using `Depends()`.
-But when you want to also declare OAuth2 scopes, you can use `Security()` instead of
-`Depends()`.
+But when you want to also declare OAuth2 scopes, you can use `Security()` instead of `Depends()`.
You can import `Security()` directly from `fastapi`:
diff --git a/docs/en/docs/reference/exceptions.md b/docs/en/docs/reference/exceptions.md
index 7c48083492..1392d2a80e 100644
--- a/docs/en/docs/reference/exceptions.md
+++ b/docs/en/docs/reference/exceptions.md
@@ -2,9 +2,7 @@
These are the exceptions that you can raise to show errors to the client.
-When you raise an exception, as would happen with normal Python, the rest of the
-execution is aborted. This way you can raise these exceptions from anywhere in the
-code to abort a request and show the error to the client.
+When you raise an exception, as would happen with normal Python, the rest of the execution is aborted. This way you can raise these exceptions from anywhere in the code to abort a request and show the error to the client.
You can use:
diff --git a/docs/en/docs/reference/fastapi.md b/docs/en/docs/reference/fastapi.md
index 8b87664cb3..d5367ff347 100644
--- a/docs/en/docs/reference/fastapi.md
+++ b/docs/en/docs/reference/fastapi.md
@@ -1,7 +1,6 @@
# `FastAPI` class
-Here's the reference information for the `FastAPI` class, with all its parameters,
-attributes and methods.
+Here's the reference information for the `FastAPI` class, with all its parameters, attributes and methods.
You can import the `FastAPI` class directly from `fastapi`:
diff --git a/docs/en/docs/reference/httpconnection.md b/docs/en/docs/reference/httpconnection.md
index 43dfc46f94..b7b87871a8 100644
--- a/docs/en/docs/reference/httpconnection.md
+++ b/docs/en/docs/reference/httpconnection.md
@@ -1,8 +1,6 @@
# `HTTPConnection` class
-When you want to define dependencies that should be compatible with both HTTP and
-WebSockets, you can define a parameter that takes an `HTTPConnection` instead of a
-`Request` or a `WebSocket`.
+When you want to define dependencies that should be compatible with both HTTP and WebSockets, you can define a parameter that takes an `HTTPConnection` instead of a `Request` or a `WebSocket`.
You can import it from `fastapi.requests`:
diff --git a/docs/en/docs/reference/middleware.md b/docs/en/docs/reference/middleware.md
index 89704d3c8b..3c666ccdaa 100644
--- a/docs/en/docs/reference/middleware.md
+++ b/docs/en/docs/reference/middleware.md
@@ -2,8 +2,7 @@
There are several middlewares available provided by Starlette directly.
-Read more about them in the
-[FastAPI docs for Middleware](https://fastapi.tiangolo.com/advanced/middleware/).
+Read more about them in the [FastAPI docs for Middleware](https://fastapi.tiangolo.com/advanced/middleware/).
::: fastapi.middleware.cors.CORSMiddleware
diff --git a/docs/en/docs/reference/parameters.md b/docs/en/docs/reference/parameters.md
index 8f77f0161b..d304c013c7 100644
--- a/docs/en/docs/reference/parameters.md
+++ b/docs/en/docs/reference/parameters.md
@@ -2,8 +2,7 @@
Here's the reference information for the request parameters.
-These are the special functions that you can put in *path operation function*
-parameters or dependency functions with `Annotated` to get data from the request.
+These are the special functions that you can put in *path operation function* parameters or dependency functions with `Annotated` to get data from the request.
It includes:
diff --git a/docs/en/docs/reference/request.md b/docs/en/docs/reference/request.md
index 91ec7d37b6..0326f3fc73 100644
--- a/docs/en/docs/reference/request.md
+++ b/docs/en/docs/reference/request.md
@@ -1,8 +1,6 @@
# `Request` class
-You can declare a parameter in a *path operation function* or dependency to be of type
-`Request` and then you can access the raw request object directly, without any
-validation, etc.
+You can declare a parameter in a *path operation function* or dependency to be of type `Request` and then you can access the raw request object directly, without any validation, etc.
You can import it directly from `fastapi`:
@@ -11,8 +9,6 @@ from fastapi import Request
```
!!! tip
- When you want to define dependencies that should be compatible with both HTTP and
- WebSockets, you can define a parameter that takes an `HTTPConnection` instead of a
- `Request` or a `WebSocket`.
+ When you want to define dependencies that should be compatible with both HTTP and WebSockets, you can define a parameter that takes an `HTTPConnection` instead of a `Request` or a `WebSocket`.
::: fastapi.Request
diff --git a/docs/en/docs/reference/response.md b/docs/en/docs/reference/response.md
index 9162545831..00cf2c499c 100644
--- a/docs/en/docs/reference/response.md
+++ b/docs/en/docs/reference/response.md
@@ -1,10 +1,8 @@
# `Response` class
-You can declare a parameter in a *path operation function* or dependency to be of type
-`Response` and then you can set data for the response like headers or cookies.
+You can declare a parameter in a *path operation function* or dependency to be of type `Response` and then you can set data for the response like headers or cookies.
-You can also use it directly to create an instance of it and return it from your *path
-operations*.
+You can also use it directly to create an instance of it and return it from your *path operations*.
You can import it directly from `fastapi`:
diff --git a/docs/en/docs/reference/responses.md b/docs/en/docs/reference/responses.md
index 2cbbd89632..46f014fcc8 100644
--- a/docs/en/docs/reference/responses.md
+++ b/docs/en/docs/reference/responses.md
@@ -1,10 +1,8 @@
# Custom Response Classes - File, HTML, Redirect, Streaming, etc.
-There are several custom response classes you can use to create an instance and return
-them directly from your *path operations*.
+There are several custom response classes you can use to create an instance and return them directly from your *path operations*.
-Read more about it in the
-[FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/).
+Read more about it in the [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/).
You can import them directly from `fastapi.responses`:
diff --git a/docs/en/docs/reference/security/index.md b/docs/en/docs/reference/security/index.md
index ff86e9e30c..9a5c5e15fb 100644
--- a/docs/en/docs/reference/security/index.md
+++ b/docs/en/docs/reference/security/index.md
@@ -2,12 +2,9 @@
When you need to declare dependencies with OAuth2 scopes you use `Security()`.
-But you still need to define what is the dependable, the callable that you pass as
-a parameter to `Depends()` or `Security()`.
+But you still need to define what is the dependable, the callable that you pass as a parameter to `Depends()` or `Security()`.
-There are multiple tools that you can use to create those dependables, and they get
-integrated into OpenAPI so they are shown in the automatic docs UI, they can be used
-by automatically generated clients and SDKs, etc.
+There are multiple tools that you can use to create those dependables, and they get integrated into OpenAPI so they are shown in the automatic docs UI, they can be used by automatically generated clients and SDKs, etc.
You can import them from `fastapi.security`:
diff --git a/docs/en/docs/reference/staticfiles.md b/docs/en/docs/reference/staticfiles.md
index ce66f17b3d..2712310783 100644
--- a/docs/en/docs/reference/staticfiles.md
+++ b/docs/en/docs/reference/staticfiles.md
@@ -2,8 +2,7 @@
You can use the `StaticFiles` class to serve static files, like JavaScript, CSS, images, etc.
-Read more about it in the
-[FastAPI docs for Static Files](https://fastapi.tiangolo.com/tutorial/static-files/).
+Read more about it in the [FastAPI docs for Static Files](https://fastapi.tiangolo.com/tutorial/static-files/).
You can import it directly from `fastapi.staticfiles`:
diff --git a/docs/en/docs/reference/status.md b/docs/en/docs/reference/status.md
index a238007923..6e0e816d33 100644
--- a/docs/en/docs/reference/status.md
+++ b/docs/en/docs/reference/status.md
@@ -16,12 +16,9 @@ For example:
* 403: `status.HTTP_403_FORBIDDEN`
* etc.
-It can be convenient to quickly access HTTP (and WebSocket) status codes in your app,
-using autocompletion for the name without having to remember the integer status codes
-by memory.
+It can be convenient to quickly access HTTP (and WebSocket) status codes in your app, using autocompletion for the name without having to remember the integer status codes by memory.
-Read more about it in the
-[FastAPI docs about Response Status Code](https://fastapi.tiangolo.com/tutorial/response-status-code/).
+Read more about it in the [FastAPI docs about Response Status Code](https://fastapi.tiangolo.com/tutorial/response-status-code/).
## Example
diff --git a/docs/en/docs/reference/templating.md b/docs/en/docs/reference/templating.md
index c865badfcb..eedfe44d54 100644
--- a/docs/en/docs/reference/templating.md
+++ b/docs/en/docs/reference/templating.md
@@ -2,8 +2,7 @@
You can use the `Jinja2Templates` class to render Jinja templates.
-Read more about it in the
-[FastAPI docs for Templates](https://fastapi.tiangolo.com/advanced/templates/).
+Read more about it in the [FastAPI docs for Templates](https://fastapi.tiangolo.com/advanced/templates/).
You can import it directly from `fastapi.templating`:
diff --git a/docs/en/docs/reference/testclient.md b/docs/en/docs/reference/testclient.md
index e391d964a2..2966ed792c 100644
--- a/docs/en/docs/reference/testclient.md
+++ b/docs/en/docs/reference/testclient.md
@@ -2,8 +2,7 @@
You can use the `TestClient` class to test FastAPI applications without creating an actual HTTP and socket connection, just communicating directly with the FastAPI code.
-Read more about it in the
-[FastAPI docs for Testing](https://fastapi.tiangolo.com/tutorial/testing/).
+Read more about it in the [FastAPI docs for Testing](https://fastapi.tiangolo.com/tutorial/testing/).
You can import it directly from `fastapi.testclient`:
diff --git a/docs/en/docs/reference/uploadfile.md b/docs/en/docs/reference/uploadfile.md
index 45c644b18d..43a7537303 100644
--- a/docs/en/docs/reference/uploadfile.md
+++ b/docs/en/docs/reference/uploadfile.md
@@ -1,7 +1,6 @@
# `UploadFile` class
-You can define *path operation function* parameters to be of the type `UploadFile`
-to receive files from the request.
+You can define *path operation function* parameters to be of the type `UploadFile` to receive files from the request.
You can import it directly from `fastapi`:
diff --git a/docs/en/docs/reference/websockets.md b/docs/en/docs/reference/websockets.md
index 2a04694678..d21e81a07d 100644
--- a/docs/en/docs/reference/websockets.md
+++ b/docs/en/docs/reference/websockets.md
@@ -1,7 +1,6 @@
# WebSockets
-When defining WebSockets, you normally declare a parameter of type `WebSocket` and
-with it you can read data from the client and send data to it.
+When defining WebSockets, you normally declare a parameter of type `WebSocket` and with it you can read data from the client and send data to it.
It is provided directly by Starlette, but you can import it from `fastapi`:
@@ -10,9 +9,7 @@ from fastapi import WebSocket
```
!!! tip
- When you want to define dependencies that should be compatible with both HTTP and
- WebSockets, you can define a parameter that takes an `HTTPConnection` instead of a
- `Request` or a `WebSocket`.
+ When you want to define dependencies that should be compatible with both HTTP and WebSockets, you can define a parameter that takes an `HTTPConnection` instead of a `Request` or a `WebSocket`.
::: fastapi.WebSocket
options:
@@ -44,8 +41,7 @@ from fastapi import WebSocket
- send_json
- close
-When a client disconnects, a `WebSocketDisconnect` exception is raised, you can catch
-it.
+When a client disconnects, a `WebSocketDisconnect` exception is raised, you can catch it.
You can import it directly form `fastapi`:
diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md
index 5ae22dde3f..0540f654ac 100644
--- a/docs/en/docs/release-notes.md
+++ b/docs/en/docs/release-notes.md
@@ -7,13 +7,138 @@ hide:
## Latest Changes
+* 🌐 Add Turkish translation for `docs/tr/docs/tutorial/request-forms.md`. PR [#11553](https://github.com/tiangolo/fastapi/pull/11553) by [@hasansezertasan](https://github.com/hasansezertasan).
+
+### Upgrades
+
+* 📝 Restored Swagger-UI links to use the latest version possible.. PR [#11459](https://github.com/tiangolo/fastapi/pull/11459) by [@UltimateLobster](https://github.com/UltimateLobster).
+
### Docs
+* 📝 Update `security/first-steps.md`. PR [#11674](https://github.com/tiangolo/fastapi/pull/11674) by [@alejsdev](https://github.com/alejsdev).
+* 📝 Update `security/first-steps.md`. PR [#11673](https://github.com/tiangolo/fastapi/pull/11673) by [@alejsdev](https://github.com/alejsdev).
+* 📝 Update note in `path-params-numeric-validations.md`. PR [#11672](https://github.com/tiangolo/fastapi/pull/11672) by [@alejsdev](https://github.com/alejsdev).
+* 📝 Tweak intro docs about `Annotated` and `Query()` params. PR [#11664](https://github.com/tiangolo/fastapi/pull/11664) by [@tiangolo](https://github.com/tiangolo).
+* 📝 Update JWT auth documentation to use PyJWT instead of pyhon-jose. PR [#11589](https://github.com/tiangolo/fastapi/pull/11589) by [@estebanx64](https://github.com/estebanx64).
+* 📝 Update docs. PR [#11603](https://github.com/tiangolo/fastapi/pull/11603) by [@alejsdev](https://github.com/alejsdev).
+* ✏️ Fix typo: convert every 're-use' to 'reuse'.. PR [#11598](https://github.com/tiangolo/fastapi/pull/11598) by [@hasansezertasan](https://github.com/hasansezertasan).
+* ✏️ Fix typo in `fastapi/applications.py`. PR [#11593](https://github.com/tiangolo/fastapi/pull/11593) by [@petarmaric](https://github.com/petarmaric).
+* ✏️ Fix link in `fastapi-cli.md`. PR [#11524](https://github.com/tiangolo/fastapi/pull/11524) by [@svlandeg](https://github.com/svlandeg).
+
+### Translations
+
+* 🌐 Add Traditional Chinese translation for `docs/zh-hant/docs/fastapi-people.md`. PR [#11639](https://github.com/tiangolo/fastapi/pull/11639) by [@hsuanchi](https://github.com/hsuanchi).
+* 🌐 Add Turkish translation for `docs/tr/docs/advanced/index.md`. PR [#11606](https://github.com/tiangolo/fastapi/pull/11606) by [@hasansezertasan](https://github.com/hasansezertasan).
+* 🌐 Add Turkish translation for `docs/tr/docs/deployment/cloud.md`. PR [#11610](https://github.com/tiangolo/fastapi/pull/11610) by [@hasansezertasan](https://github.com/hasansezertasan).
+* 🌐 Add Turkish translation for `docs/tr/docs/advanced/security/index.md`. PR [#11609](https://github.com/tiangolo/fastapi/pull/11609) by [@hasansezertasan](https://github.com/hasansezertasan).
+* 🌐 Add Turkish translation for `docs/tr/docs/advanced/testing-websockets.md`. PR [#11608](https://github.com/tiangolo/fastapi/pull/11608) by [@hasansezertasan](https://github.com/hasansezertasan).
+* 🌐 Add Turkish translation for `docs/tr/docs/how-to/general.md`. PR [#11607](https://github.com/tiangolo/fastapi/pull/11607) by [@hasansezertasan](https://github.com/hasansezertasan).
+* 🌐 Update Chinese translation for `docs/zh/docs/advanced/templates.md`. PR [#11620](https://github.com/tiangolo/fastapi/pull/11620) by [@chaoless](https://github.com/chaoless).
+* 🌐 Add Turkish translation for `docs/tr/docs/deployment/index.md`. PR [#11605](https://github.com/tiangolo/fastapi/pull/11605) by [@hasansezertasan](https://github.com/hasansezertasan).
+* 🌐 Add Turkish translation for `docs/tr/docs/tutorial/static-files.md`. PR [#11599](https://github.com/tiangolo/fastapi/pull/11599) by [@hasansezertasan](https://github.com/hasansezertasan).
+* 🌐 Polish translation for `docs/pl/docs/fastapi-people.md`. PR [#10196](https://github.com/tiangolo/fastapi/pull/10196) by [@isulim](https://github.com/isulim).
+* 🌐 Add Turkish translation for `docs/tr/docs/advanced/wsgi.md`. PR [#11575](https://github.com/tiangolo/fastapi/pull/11575) by [@hasansezertasan](https://github.com/hasansezertasan).
+* 🌐 Add Turkish translation for `docs/tr/docs/tutorial/cookie-params.md`. PR [#11561](https://github.com/tiangolo/fastapi/pull/11561) by [@hasansezertasan](https://github.com/hasansezertasan).
+* 🌐 Add Russian translation for `docs/ru/docs/about/index.md`. PR [#10961](https://github.com/tiangolo/fastapi/pull/10961) by [@s111d](https://github.com/s111d).
+* 🌐 Update Chinese translation for `docs/zh/docs/tutorial/sql-databases.md`. PR [#11539](https://github.com/tiangolo/fastapi/pull/11539) by [@chaoless](https://github.com/chaoless).
+* 🌐 Add Chinese translation for `docs/zh/docs/how-to/configure-swagger-ui.md`. PR [#11501](https://github.com/tiangolo/fastapi/pull/11501) by [@Lucas-lyh](https://github.com/Lucas-lyh).
+* 🌐 Update Chinese translation for `/docs/advanced/security/http-basic-auth.md`. PR [#11512](https://github.com/tiangolo/fastapi/pull/11512) by [@nick-cjyx9](https://github.com/nick-cjyx9).
+
+### Internal
+
+* 👥 Update FastAPI People. PR [#11669](https://github.com/tiangolo/fastapi/pull/11669) by [@tiangolo](https://github.com/tiangolo).
+* 🔧 Add sponsor Kong. PR [#11662](https://github.com/tiangolo/fastapi/pull/11662) by [@tiangolo](https://github.com/tiangolo).
+* 👷 Update Smokeshow, fix sync download artifact and smokeshow configs. PR [#11563](https://github.com/tiangolo/fastapi/pull/11563) by [@tiangolo](https://github.com/tiangolo).
+* 👷 Update Smokeshow download artifact GitHub Action. PR [#11562](https://github.com/tiangolo/fastapi/pull/11562) by [@tiangolo](https://github.com/tiangolo).
+* 👷 Update GitHub actions to download and upload artifacts to v4, for docs and coverage. PR [#11550](https://github.com/tiangolo/fastapi/pull/11550) by [@tamird](https://github.com/tamird).
+* 👷 Tweak CI for test-redistribute, add needed env vars for slim. PR [#11549](https://github.com/tiangolo/fastapi/pull/11549) by [@tiangolo](https://github.com/tiangolo).
+* 👥 Update FastAPI People. PR [#11511](https://github.com/tiangolo/fastapi/pull/11511) by [@tiangolo](https://github.com/tiangolo).
+
+## 0.111.0
+
+### Features
+
+* ✨ Add FastAPI CLI, the new `fastapi` command. PR [#11522](https://github.com/tiangolo/fastapi/pull/11522) by [@tiangolo](https://github.com/tiangolo).
+ * New docs: [FastAPI CLI](https://fastapi.tiangolo.com/fastapi-cli/).
+
+Try it out with:
+
+```console
+$ pip install --upgrade fastapi
+
+$ fastapi dev main.py
+
+
+ ╭────────── FastAPI CLI - Development mode ───────────╮
+ │ │
+ │ Serving at: http://127.0.0.1:8000 │
+ │ │
+ │ API docs: http://127.0.0.1:8000/docs │
+ │ │
+ │ Running in development mode, for production use: │
+ │ │
+ │ fastapi run │
+ │ │
+ ╰─────────────────────────────────────────────────────╯
+
+INFO: Will watch for changes in these directories: ['/home/user/code/awesomeapp']
+INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
+INFO: Started reloader process [2248755] using WatchFiles
+INFO: Started server process [2248757]
+INFO: Waiting for application startup.
+INFO: Application startup complete.
+```
+
+### Refactors
+
+* 🔧 Add configs and setup for `fastapi-slim` including optional extras `fastapi-slim[standard]`, and `fastapi` including by default the same `standard` extras. PR [#11503](https://github.com/tiangolo/fastapi/pull/11503) by [@tiangolo](https://github.com/tiangolo).
+
+## 0.110.3
+
+### Docs
+
+* 📝 Update references to Python version, FastAPI supports all the current versions, no need to make the version explicit. PR [#11496](https://github.com/tiangolo/fastapi/pull/11496) by [@tiangolo](https://github.com/tiangolo).
+* ✏️ Fix typo in `fastapi/security/api_key.py`. PR [#11481](https://github.com/tiangolo/fastapi/pull/11481) by [@ch33zer](https://github.com/ch33zer).
+* ✏️ Fix typo in `security/http.py`. PR [#11455](https://github.com/tiangolo/fastapi/pull/11455) by [@omarmoo5](https://github.com/omarmoo5).
+
+### Translations
+
+* 🌐 Add Traditional Chinese translation for `docs/zh-hant/benchmarks.md`. PR [#11484](https://github.com/tiangolo/fastapi/pull/11484) by [@KNChiu](https://github.com/KNChiu).
+* 🌐 Update Chinese translation for `docs/zh/docs/fastapi-people.md`. PR [#11476](https://github.com/tiangolo/fastapi/pull/11476) by [@billzhong](https://github.com/billzhong).
+* 🌐 Add Chinese translation for `docs/zh/docs/how-to/index.md` and `docs/zh/docs/how-to/general.md`. PR [#11443](https://github.com/tiangolo/fastapi/pull/11443) by [@billzhong](https://github.com/billzhong).
+* 🌐 Add Spanish translation for cookie-params `docs/es/docs/tutorial/cookie-params.md`. PR [#11410](https://github.com/tiangolo/fastapi/pull/11410) by [@fabianfalon](https://github.com/fabianfalon).
+
+### Internal
+
+* ⬆ Bump mkdocstrings[python] from 0.23.0 to 0.24.3. PR [#11469](https://github.com/tiangolo/fastapi/pull/11469) by [@dependabot[bot]](https://github.com/apps/dependabot).
+* 🔨 Update internal scripts and remove unused ones. PR [#11499](https://github.com/tiangolo/fastapi/pull/11499) by [@tiangolo](https://github.com/tiangolo).
+* 🔧 Migrate from Hatch to PDM for the internal build. PR [#11498](https://github.com/tiangolo/fastapi/pull/11498) by [@tiangolo](https://github.com/tiangolo).
+* ⬆️ Upgrade MkDocs Material and re-enable cards. PR [#11466](https://github.com/tiangolo/fastapi/pull/11466) by [@tiangolo](https://github.com/tiangolo).
+* ⬆ Bump pillow from 10.2.0 to 10.3.0. PR [#11403](https://github.com/tiangolo/fastapi/pull/11403) by [@dependabot[bot]](https://github.com/apps/dependabot).
+* 🔧 Ungroup dependabot updates. PR [#11465](https://github.com/tiangolo/fastapi/pull/11465) by [@tiangolo](https://github.com/tiangolo).
+
+## 0.110.2
+
+### Fixes
+
+* 🐛 Fix support for query parameters with list types, handle JSON encoding Pydantic `UndefinedType`. PR [#9929](https://github.com/tiangolo/fastapi/pull/9929) by [@arjwilliams](https://github.com/arjwilliams).
+
+### Refactors
+
+* ♻️ Simplify Pydantic configs in OpenAPI models in `fastapi/openapi/models.py`. PR [#10886](https://github.com/tiangolo/fastapi/pull/10886) by [@JoeTanto2](https://github.com/JoeTanto2).
+* ✨ Add support for Pydantic's 2.7 new deprecated Field parameter, remove URL from validation errors response. PR [#11461](https://github.com/tiangolo/fastapi/pull/11461) by [@tiangolo](https://github.com/tiangolo).
+
+### Docs
+
+* 📝 Fix types in examples under `docs_src/extra_data_types`. PR [#10535](https://github.com/tiangolo/fastapi/pull/10535) by [@nilslindemann](https://github.com/nilslindemann).
+* 📝 Update references to UJSON. PR [#11464](https://github.com/tiangolo/fastapi/pull/11464) by [@tiangolo](https://github.com/tiangolo).
+* 📝 Tweak docs and translations links, typos, format. PR [#11389](https://github.com/tiangolo/fastapi/pull/11389) by [@nilslindemann](https://github.com/nilslindemann).
* 📝 Fix typo in `docs/es/docs/async.md`. PR [#11400](https://github.com/tiangolo/fastapi/pull/11400) by [@fabianfalon](https://github.com/fabianfalon).
* 📝 Update OpenAPI client generation docs to use `@hey-api/openapi-ts`. PR [#11339](https://github.com/tiangolo/fastapi/pull/11339) by [@jordanshatford](https://github.com/jordanshatford).
### Translations
+* 🌐 Update Chinese translation for `docs/zh/docs/index.html`. PR [#11430](https://github.com/tiangolo/fastapi/pull/11430) by [@waketzheng](https://github.com/waketzheng).
* 🌐 Add Russian translation for `docs/ru/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md`. PR [#11411](https://github.com/tiangolo/fastapi/pull/11411) by [@anton2yakovlev](https://github.com/anton2yakovlev).
* 🌐 Add Portuguese translations for `learn/index.md` `resources/index.md` `help/index.md` `about/index.md`. PR [#10807](https://github.com/tiangolo/fastapi/pull/10807) by [@nazarepiedady](https://github.com/nazarepiedady).
* 🌐 Update Russian translations for deployments docs. PR [#11271](https://github.com/tiangolo/fastapi/pull/11271) by [@Lufa1u](https://github.com/Lufa1u).
@@ -3769,7 +3894,7 @@ Note: all the previous parameters are still there, so it's still possible to dec
* New documentation about exceptions handlers:
* [Install custom exception handlers](https://fastapi.tiangolo.com/tutorial/handling-errors/#install-custom-exception-handlers).
* [Override the default exception handlers](https://fastapi.tiangolo.com/tutorial/handling-errors/#override-the-default-exception-handlers).
- * [Re-use **FastAPI's** exception handlers](https://fastapi.tiangolo.com/tutorial/handling-errors/#re-use-fastapis-exception-handlers).
+ * [Reuse **FastAPI's** exception handlers](https://fastapi.tiangolo.com/tutorial/handling-errors/#reuse-fastapis-exception-handlers).
* PR [#273](https://github.com/tiangolo/fastapi/pull/273).
* Fix support for *paths* in *path parameters* without needing explicit `Path(...)`.
diff --git a/docs/en/docs/tutorial/background-tasks.md b/docs/en/docs/tutorial/background-tasks.md
index bc8e2af6a0..bcfadc8b86 100644
--- a/docs/en/docs/tutorial/background-tasks.md
+++ b/docs/en/docs/tutorial/background-tasks.md
@@ -55,7 +55,7 @@ Inside of your *path operation function*, pass your task function to the *backgr
Using `BackgroundTasks` also works with the dependency injection system, you can declare a parameter of type `BackgroundTasks` at multiple levels: in a *path operation function*, in a dependency (dependable), in a sub-dependency, etc.
-**FastAPI** knows what to do in each case and how to re-use the same object, so that all the background tasks are merged together and are run in the background afterwards:
+**FastAPI** knows what to do in each case and how to reuse the same object, so that all the background tasks are merged together and are run in the background afterwards:
=== "Python 3.10+"
diff --git a/docs/en/docs/tutorial/bigger-applications.md b/docs/en/docs/tutorial/bigger-applications.md
index b2d9284052..eccdd8aebe 100644
--- a/docs/en/docs/tutorial/bigger-applications.md
+++ b/docs/en/docs/tutorial/bigger-applications.md
@@ -136,7 +136,7 @@ We will now use a simple dependency to read a custom `X-Token` header:
!!! tip
We are using an invented header to simplify this example.
- But in real cases you will get better results using the integrated [Security utilities](./security/index.md){.internal-link target=_blank}.
+ But in real cases you will get better results using the integrated [Security utilities](security/index.md){.internal-link target=_blank}.
## Another module with `APIRouter`
@@ -329,7 +329,7 @@ The section:
from .routers import items, users
```
-Means:
+means:
* Starting in the same package that this module (the file `app/main.py`) lives in (the directory `app/`)...
* look for the subpackage `routers` (the directory at `app/routers/`)...
@@ -373,7 +373,7 @@ from .routers.items import router
from .routers.users import router
```
-The `router` from `users` would overwrite the one from `items` and we wouldn't be able to use them at the same time.
+the `router` from `users` would overwrite the one from `items` and we wouldn't be able to use them at the same time.
So, to be able to use both of them in the same file, we import the submodules directly:
diff --git a/docs/en/docs/tutorial/body-updates.md b/docs/en/docs/tutorial/body-updates.md
index 39d133c55f..3ba2632d8f 100644
--- a/docs/en/docs/tutorial/body-updates.md
+++ b/docs/en/docs/tutorial/body-updates.md
@@ -48,7 +48,7 @@ You can also use the query_or_cookie_extractor --> read_query
If one of your dependencies is declared multiple times for the same *path operation*, for example, multiple dependencies have a common sub-dependency, **FastAPI** will know to call that sub-dependency only once per request.
-And it will save the returned value in a "cache" and pass it to all the "dependants" that need it in that specific request, instead of calling the dependency multiple times for the same request.
+And it will save the returned value in a "cache" and pass it to all the "dependants" that need it in that specific request, instead of calling the dependency multiple times for the same request.
In an advanced scenario where you know you need the dependency to be called at every step (possibly multiple times) in the same request instead of using the "cached" value, you can set the parameter `use_cache=False` when using `Depends`:
diff --git a/docs/en/docs/tutorial/extra-models.md b/docs/en/docs/tutorial/extra-models.md
index 49b00c7305..cc0680cfd8 100644
--- a/docs/en/docs/tutorial/extra-models.md
+++ b/docs/en/docs/tutorial/extra-models.md
@@ -83,7 +83,7 @@ So, continuing with the `user_dict` from above, writing:
UserInDB(**user_dict)
```
-Would result in something equivalent to:
+would result in something equivalent to:
```Python
UserInDB(
diff --git a/docs/en/docs/tutorial/first-steps.md b/docs/en/docs/tutorial/first-steps.md
index cfa1593294..d18b25d971 100644
--- a/docs/en/docs/tutorial/first-steps.md
+++ b/docs/en/docs/tutorial/first-steps.md
@@ -13,24 +13,51 @@ Run the live server:
+
+ itsdangerous - Requerido para dar soporte a `SessionMiddleware`.
* pyyaml - Requerido para dar soporte al `SchemaGenerator` de Starlette (probablemente no lo necesites con FastAPI).
* graphene - Requerido para dar soporte a `GraphQLApp`.
-* ujson - Requerido si quieres usar `UJSONResponse`.
Usado por FastAPI / Starlette:
* uvicorn - para el servidor que carga y sirve tu aplicación.
* orjson - Requerido si quieres usar `ORJSONResponse`.
+* ujson - Requerido si quieres usar `UJSONResponse`.
Puedes instalarlos con `pip install fastapi[all]`.
diff --git a/docs/es/docs/tutorial/cookie-params.md b/docs/es/docs/tutorial/cookie-params.md
new file mode 100644
index 0000000000..9f736575da
--- /dev/null
+++ b/docs/es/docs/tutorial/cookie-params.md
@@ -0,0 +1,97 @@
+# Parámetros de Cookie
+
+Puedes definir parámetros de Cookie de la misma manera que defines parámetros de `Query` y `Path`.
+
+## Importar `Cookie`
+
+Primero importa `Cookie`:
+
+=== "Python 3.10+"
+
+ ```Python hl_lines="3"
+ {!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!}
+ ```
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="3"
+ {!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!}
+ ```
+
+=== "Python 3.8+"
+
+ ```Python hl_lines="3"
+ {!> ../../../docs_src/cookie_params/tutorial001_an.py!}
+ ```
+
+=== "Python 3.10+ non-Annotated"
+
+ !!! tip
+ Prefer to use the `Annotated` version if possible.
+
+ ```Python hl_lines="1"
+ {!> ../../../docs_src/cookie_params/tutorial001_py310.py!}
+ ```
+
+=== "Python 3.8+ non-Annotated"
+
+ !!! tip
+ Prefer to use the `Annotated` version if possible.
+
+ ```Python hl_lines="3"
+ {!> ../../../docs_src/cookie_params/tutorial001.py!}
+ ```
+
+## Declarar parámetros de `Cookie`
+
+Luego declara los parámetros de cookie usando la misma estructura que con `Path` y `Query`.
+
+El primer valor es el valor por defecto, puedes pasar todos los parámetros adicionales de validación o anotación:
+
+=== "Python 3.10+"
+
+ ```Python hl_lines="9"
+ {!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!}
+ ```
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="9"
+ {!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!}
+ ```
+
+=== "Python 3.8+"
+
+ ```Python hl_lines="10"
+ {!> ../../../docs_src/cookie_params/tutorial001_an.py!}
+ ```
+
+=== "Python 3.10+ non-Annotated"
+
+ !!! tip
+ Prefer to use the `Annotated` version if possible.
+
+ ```Python hl_lines="7"
+ {!> ../../../docs_src/cookie_params/tutorial001_py310.py!}
+ ```
+
+=== "Python 3.8+ non-Annotated"
+
+ !!! tip
+ Prefer to use the `Annotated` version if possible.
+
+ ```Python hl_lines="9"
+ {!> ../../../docs_src/cookie_params/tutorial001.py!}
+ ```
+
+!!! note "Detalles Técnicos"
+ `Cookie` es una clase "hermana" de `Path` y `Query`. También hereda de la misma clase común `Param`.
+
+ Pero recuerda que cuando importas `Query`, `Path`, `Cookie` y otros de `fastapi`, en realidad son funciones que devuelven clases especiales.
+
+!!! info
+ Para declarar cookies, necesitas usar `Cookie`, porque de lo contrario los parámetros serían interpretados como parámetros de query.
+
+## Resumen
+
+Declara cookies con `Cookie`, usando el mismo patrón común que `Query` y `Path`.
diff --git a/docs/es/docs/tutorial/first-steps.md b/docs/es/docs/tutorial/first-steps.md
index 2cb7e63084..c37ce00fb2 100644
--- a/docs/es/docs/tutorial/first-steps.md
+++ b/docs/es/docs/tutorial/first-steps.md
@@ -310,7 +310,7 @@ También podrías definirla como una función estándar en lugar de `async def`:
```
!!! note "Nota"
- Si no sabes la diferencia, revisa el [Async: *"¿Tienes prisa?"*](../async.md#in-a-hurry){.internal-link target=_blank}.
+ Si no sabes la diferencia, revisa el [Async: *"¿Tienes prisa?"*](../async.md#tienes-prisa){.internal-link target=_blank}.
### Paso 5: devuelve el contenido
diff --git a/docs/es/docs/tutorial/index.md b/docs/es/docs/tutorial/index.md
index f0dff02b42..f11820ef2c 100644
--- a/docs/es/docs/tutorial/index.md
+++ b/docs/es/docs/tutorial/index.md
@@ -50,7 +50,7 @@ $ pip install "fastapi[all]"
...eso también incluye `uvicorn` que puedes usar como el servidor que ejecuta tu código.
-!!! nota
+!!! note "Nota"
También puedes instalarlo parte por parte.
Esto es lo que probablemente harías una vez que desees implementar tu aplicación en producción:
diff --git a/docs/es/docs/tutorial/query-params.md b/docs/es/docs/tutorial/query-params.md
index 482af8dc06..76dc331a93 100644
--- a/docs/es/docs/tutorial/query-params.md
+++ b/docs/es/docs/tutorial/query-params.md
@@ -194,4 +194,4 @@ En este caso hay 3 parámetros de query:
* `limit`, un `int` opcional.
!!! tip "Consejo"
- También podrías usar los `Enum`s de la misma manera que con los [Parámetros de path](path-params.md#predefined-values){.internal-link target=_blank}.
+ También podrías usar los `Enum`s de la misma manera que con los [Parámetros de path](path-params.md#valores-predefinidos){.internal-link target=_blank}.
diff --git a/docs/fa/docs/advanced/sub-applications.md b/docs/fa/docs/advanced/sub-applications.md
index f3a948414a..6f2359b94e 100644
--- a/docs/fa/docs/advanced/sub-applications.md
+++ b/docs/fa/docs/advanced/sub-applications.md
@@ -69,4 +69,4 @@ $ uvicorn main:app --reload
و زیر برنامه ها نیز می تواند زیر برنامه های متصل شده خود را داشته باشد و همه چیز به درستی کار کند، زیرا FastAPI تمام این مسیرهای `root_path` را به طور خودکار مدیریت می کند.
-در بخش [پشت پراکسی](./behind-a-proxy.md){.internal-link target=_blank}. درباره `root_path` و نحوه استفاده درست از آن بیشتر خواهید آموخت.
+در بخش [پشت پراکسی](behind-a-proxy.md){.internal-link target=_blank}. درباره `root_path` و نحوه استفاده درست از آن بیشتر خواهید آموخت.
diff --git a/docs/fa/docs/index.md b/docs/fa/docs/index.md
index e5231ec8d5..623bc0f754 100644
--- a/docs/fa/docs/index.md
+++ b/docs/fa/docs/index.md
@@ -1,3 +1,12 @@
+---
+hide:
+ - navigation
+---
+
+
+
@@ -30,7 +39,7 @@ FastAPI یک وب فریمورک مدرن و سریع (با کارایی با
ویژگیهای کلیدی این فریمورک عبارتند از:
-* **سرعت**: کارایی بسیار بالا و قابل مقایسه با **NodeJS** و **Go** (با تشکر از Starlette و Pydantic). [یکی از سریعترین فریمورکهای پایتونی موجود](#performance).
+* **سرعت**: کارایی بسیار بالا و قابل مقایسه با **NodeJS** و **Go** (با تشکر از Starlette و Pydantic). [یکی از سریعترین فریمورکهای پایتونی موجود](#_10).
* **کدنویسی سریع**: افزایش ۲۰۰ تا ۳۰۰ درصدی سرعت توسعه قابلیتهای جدید. *
* **باگ کمتر**: کاهش ۴۰ درصدی خطاهای انسانی (برنامهنویسی). *
@@ -447,12 +456,12 @@ item: Item
* itsdangerous - در صورتی که بخواید از `SessionMiddleware` پشتیبانی کنید.
* pyyaml - برای پشتیبانی `SchemaGenerator` در Starlet (به احتمال زیاد برای کار کردن با FastAPI به آن نیازی پیدا نمیکنید).
* graphene - در صورتی که از `GraphQLApp` پشتیبانی میکنید.
-* ujson - در صورتی که بخواهید از `UJSONResponse` استفاده کنید.
استفاده شده توسط FastAPI / Starlette:
* uvicorn - برای سرور اجرا کننده برنامه وب.
* orjson - در صورتی که بخواهید از `ORJSONResponse` استفاده کنید.
+* ujson - در صورتی که بخواهید از `UJSONResponse` استفاده کنید.
میتوان همه این موارد را با استفاده از دستور `pip install fastapi[all]`. به صورت یکجا نصب کرد.
diff --git a/docs/fr/docs/advanced/additional-responses.md b/docs/fr/docs/advanced/additional-responses.md
index 35b57594d5..685a054ad6 100644
--- a/docs/fr/docs/advanced/additional-responses.md
+++ b/docs/fr/docs/advanced/additional-responses.md
@@ -1,6 +1,6 @@
# Réponses supplémentaires dans OpenAPI
-!!! Attention
+!!! warning "Attention"
Ceci concerne un sujet plutôt avancé.
Si vous débutez avec **FastAPI**, vous n'en aurez peut-être pas besoin.
@@ -27,10 +27,10 @@ Par exemple, pour déclarer une autre réponse avec un code HTTP `404` et un mod
{!../../../docs_src/additional_responses/tutorial001.py!}
```
-!!! Remarque
+!!! note "Remarque"
Gardez à l'esprit que vous devez renvoyer directement `JSONResponse`.
-!!! Info
+!!! info
La clé `model` ne fait pas partie d'OpenAPI.
**FastAPI** prendra le modèle Pydantic à partir de là, générera le `JSON Schema` et le placera au bon endroit.
@@ -172,10 +172,10 @@ Par exemple, vous pouvez ajouter un type de média supplémentaire `image/png`,
{!../../../docs_src/additional_responses/tutorial002.py!}
```
-!!! Remarque
+!!! note "Remarque"
Notez que vous devez retourner l'image en utilisant directement un `FileResponse`.
-!!! Info
+!!! info
À moins que vous ne spécifiiez explicitement un type de média différent dans votre paramètre `responses`, FastAPI supposera que la réponse a le même type de média que la classe de réponse principale (par défaut `application/json`).
Mais si vous avez spécifié une classe de réponse personnalisée avec `None` comme type de média, FastAPI utilisera `application/json` pour toute réponse supplémentaire associée à un modèle.
@@ -206,7 +206,7 @@ Vous voulez peut-être avoir des réponses prédéfinies qui s'appliquent à de
Dans ces cas, vous pouvez utiliser la technique Python "d'affection par décomposition" (appelé _unpacking_ en anglais) d'un `dict` avec `**dict_to_unpack` :
-``` Python
+```Python
old_dict = {
"old key": "old value",
"second old key": "second old value",
@@ -216,7 +216,7 @@ new_dict = {**old_dict, "new key": "new value"}
Ici, `new_dict` contiendra toutes les paires clé-valeur de `old_dict` plus la nouvelle paire clé-valeur :
-``` Python
+```Python
{
"old key": "old value",
"second old key": "second old value",
diff --git a/docs/fr/docs/advanced/additional-status-codes.md b/docs/fr/docs/advanced/additional-status-codes.md
index e7b003707b..51f0db7371 100644
--- a/docs/fr/docs/advanced/additional-status-codes.md
+++ b/docs/fr/docs/advanced/additional-status-codes.md
@@ -18,7 +18,7 @@ Pour y parvenir, importez `JSONResponse` et renvoyez-y directement votre contenu
{!../../../docs_src/additional_status_codes/tutorial001.py!}
```
-!!! Attention
+!!! warning "Attention"
Lorsque vous renvoyez une `Response` directement, comme dans l'exemple ci-dessus, elle sera renvoyée directement.
Elle ne sera pas sérialisée avec un modèle.
diff --git a/docs/fr/docs/advanced/index.md b/docs/fr/docs/advanced/index.md
index aa37f18063..4599bcb6ff 100644
--- a/docs/fr/docs/advanced/index.md
+++ b/docs/fr/docs/advanced/index.md
@@ -6,7 +6,7 @@ Le [Tutoriel - Guide de l'utilisateur](../tutorial/index.md){.internal-link targ
Dans les sections suivantes, vous verrez des options, configurations et fonctionnalités supplémentaires.
-!!! Note
+!!! note "Remarque"
Les sections de ce chapitre ne sont **pas nécessairement "avancées"**.
Et il est possible que pour votre cas d'utilisation, la solution se trouve dans l'un d'entre eux.
diff --git a/docs/fr/docs/advanced/path-operation-advanced-configuration.md b/docs/fr/docs/advanced/path-operation-advanced-configuration.md
index 7ded97ce17..77f551aea9 100644
--- a/docs/fr/docs/advanced/path-operation-advanced-configuration.md
+++ b/docs/fr/docs/advanced/path-operation-advanced-configuration.md
@@ -2,7 +2,7 @@
## ID d'opération OpenAPI
-!!! Attention
+!!! warning "Attention"
Si vous n'êtes pas un "expert" en OpenAPI, vous n'en avez probablement pas besoin.
Dans OpenAPI, les chemins sont des ressources, tels que /users/ ou /items/, exposées par votre API, et les opérations sont les méthodes HTTP utilisées pour manipuler ces chemins, telles que GET, POST ou DELETE. Les operationId sont des chaînes uniques facultatives utilisées pour identifier une opération d'un chemin. Vous pouvez définir l'OpenAPI `operationId` à utiliser dans votre *opération de chemin* avec le paramètre `operation_id`.
@@ -23,10 +23,10 @@ Vous devriez le faire après avoir ajouté toutes vos *paramètres de chemin*.
{!../../../docs_src/path_operation_advanced_configuration/tutorial002.py!}
```
-!!! Astuce
+!!! tip "Astuce"
Si vous appelez manuellement `app.openapi()`, vous devez mettre à jour les `operationId` avant.
-!!! Attention
+!!! warning "Attention"
Pour faire cela, vous devez vous assurer que chacun de vos *chemin* ait un nom unique.
Même s'ils se trouvent dans des modules différents (fichiers Python).
@@ -59,7 +59,7 @@ Cela définit les métadonnées sur la réponse principale d'une *opération de
Vous pouvez également déclarer des réponses supplémentaires avec leurs modèles, codes de statut, etc.
-Il y a un chapitre entier ici dans la documentation à ce sujet, vous pouvez le lire sur [Réponses supplémentaires dans OpenAPI](./additional-responses.md){.internal-link target=_blank}.
+Il y a un chapitre entier ici dans la documentation à ce sujet, vous pouvez le lire sur [Réponses supplémentaires dans OpenAPI](additional-responses.md){.internal-link target=_blank}.
## OpenAPI supplémentaire
@@ -74,8 +74,8 @@ Il inclut les `tags`, `parameters`, `requestBody`, `responses`, etc.
Ce schéma OpenAPI spécifique aux *operations* est normalement généré automatiquement par **FastAPI**, mais vous pouvez également l'étendre.
-!!! Astuce
- Si vous avez seulement besoin de déclarer des réponses supplémentaires, un moyen plus pratique de le faire est d'utiliser les [réponses supplémentaires dans OpenAPI](./additional-responses.md){.internal-link target=_blank}.
+!!! tip "Astuce"
+ Si vous avez seulement besoin de déclarer des réponses supplémentaires, un moyen plus pratique de le faire est d'utiliser les [réponses supplémentaires dans OpenAPI](additional-responses.md){.internal-link target=_blank}.
Vous pouvez étendre le schéma OpenAPI pour une *opération de chemin* en utilisant le paramètre `openapi_extra`.
@@ -162,7 +162,7 @@ Et nous analysons directement ce contenu YAML, puis nous utilisons à nouveau le
{!../../../docs_src/path_operation_advanced_configuration/tutorial007.py!}
```
-!!! Astuce
+!!! tip "Astuce"
Ici, nous réutilisons le même modèle Pydantic.
Mais nous aurions pu tout aussi bien pu le valider d'une autre manière.
diff --git a/docs/fr/docs/advanced/response-directly.md b/docs/fr/docs/advanced/response-directly.md
index 1c923fb82c..ed29446d4c 100644
--- a/docs/fr/docs/advanced/response-directly.md
+++ b/docs/fr/docs/advanced/response-directly.md
@@ -14,7 +14,7 @@ Cela peut être utile, par exemple, pour retourner des en-têtes personnalisés
En fait, vous pouvez retourner n'importe quelle `Response` ou n'importe quelle sous-classe de celle-ci.
-!!! Note
+!!! note "Remarque"
`JSONResponse` est elle-même une sous-classe de `Response`.
Et quand vous retournez une `Response`, **FastAPI** la transmet directement.
diff --git a/docs/fr/docs/fastapi-people.md b/docs/fr/docs/fastapi-people.md
index 275a9bd37c..d99dcd9c2b 100644
--- a/docs/fr/docs/fastapi-people.md
+++ b/docs/fr/docs/fastapi-people.md
@@ -1,3 +1,8 @@
+---
+hide:
+ - navigation
+---
+
# La communauté FastAPI
FastAPI a une communauté extraordinaire qui accueille des personnes de tous horizons.
@@ -18,7 +23,7 @@ C'est moi :
{% endif %}
-Je suis le créateur et le responsable de **FastAPI**. Vous pouvez en lire plus à ce sujet dans [Aide FastAPI - Obtenir de l'aide - Se rapprocher de l'auteur](help-fastapi.md#connect-with-the-author){.internal-link target=_blank}.
+Je suis le créateur et le responsable de **FastAPI**. Vous pouvez en lire plus à ce sujet dans [Aide FastAPI - Obtenir de l'aide - Se rapprocher de l'auteur](help-fastapi.md#se-rapprocher-de-lauteur){.internal-link target=_blank}.
...Mais ici, je veux vous montrer la communauté.
@@ -28,15 +33,15 @@ Je suis le créateur et le responsable de **FastAPI**. Vous pouvez en lire plus
Ce sont ces personnes qui :
-* [Aident les autres à résoudre des problèmes (questions) dans GitHub](help-fastapi.md#help-others-with-issues-in-github){.internal-link target=_blank}.
-* [Créent des Pull Requests](help-fastapi.md#create-a-pull-request){.internal-link target=_blank}.
-* Review les Pull Requests, [particulièrement important pour les traductions](contributing.md#translations){.internal-link target=_blank}.
+* [Aident les autres à résoudre des problèmes (questions) dans GitHub](help-fastapi.md#aider-les-autres-a-resoudre-les-problemes-dans-github){.internal-link target=_blank}.
+* [Créent des Pull Requests](help-fastapi.md#creer-une-pull-request){.internal-link target=_blank}.
+* Review les Pull Requests, [particulièrement important pour les traductions](contributing.md#traductions){.internal-link target=_blank}.
Une salve d'applaudissements pour eux. 👏 🙇
## Utilisateurs les plus actifs le mois dernier
-Ce sont les utilisateurs qui ont [aidé le plus les autres avec des problèmes (questions) dans GitHub](help-fastapi.md#help-others-with-issues-in-github){.internal-link target=_blank} au cours du dernier mois. ☕
+Ce sont les utilisateurs qui ont [aidé le plus les autres avec des problèmes (questions) dans GitHub](help-fastapi.md#aider-les-autres-a-resoudre-les-problemes-dans-github){.internal-link target=_blank} au cours du dernier mois. ☕
{% if people %}
python-multipart - Obligatoire si vous souhaitez supporter le "décodage" de formulaire avec `request.form()`.
* itsdangerous - Obligatoire pour la prise en charge de `SessionMiddleware`.
* pyyaml - Obligatoire pour le support `SchemaGenerator` de Starlette (vous n'en avez probablement pas besoin avec FastAPI).
-* ujson - Obligatoire si vous souhaitez utiliser `UJSONResponse`.
Utilisées par FastAPI / Starlette :
* uvicorn - Pour le serveur qui charge et sert votre application.
* orjson - Obligatoire si vous voulez utiliser `ORJSONResponse`.
+* ujson - Obligatoire si vous souhaitez utiliser `UJSONResponse`.
Vous pouvez tout installer avec `pip install fastapi[all]`.
diff --git a/docs/fr/docs/tutorial/path-params.md b/docs/fr/docs/tutorial/path-params.md
index 817545c1c6..523e2c8c26 100644
--- a/docs/fr/docs/tutorial/path-params.md
+++ b/docs/fr/docs/tutorial/path-params.md
@@ -28,7 +28,7 @@ Vous pouvez déclarer le type d'un paramètre de chemin dans la fonction, en uti
Ici, `item_id` est déclaré comme `int`.
-!!! hint "Astuce"
+!!! check "vérifier"
Ceci vous permettra d'obtenir des fonctionnalités de l'éditeur dans votre fonction, telles
que des vérifications d'erreur, de l'auto-complétion, etc.
@@ -40,7 +40,7 @@ Si vous exécutez cet exemple et allez sur http://127.0.0.1:8000/items/4.2.
-!!! hint "Astuce"
+!!! check "vérifier"
Donc, avec ces mêmes déclarations de type Python, **FastAPI** vous fournit de la validation de données.
Notez que l'erreur mentionne le point exact où la validation n'a pas réussi.
diff --git a/docs/he/docs/index.md b/docs/he/docs/index.md
index 335a227436..6211261289 100644
--- a/docs/he/docs/index.md
+++ b/docs/he/docs/index.md
@@ -1,3 +1,12 @@
+---
+hide:
+ - navigation
+---
+
+
+
@@ -31,7 +40,7 @@ FastAPI היא תשתית רשת מודרנית ומהירה (ביצועים ג
תכונות המפתח הן:
-- **מהירה**: ביצועים גבוהים מאוד, בקנה אחד עם NodeJS ו - Go (תודות ל - Starlette ו - Pydantic). [אחת מתשתיות הפייתון המהירות ביותר](#performance).
+- **מהירה**: ביצועים גבוהים מאוד, בקנה אחד עם NodeJS ו - Go (תודות ל - Starlette ו - Pydantic). [אחת מתשתיות הפייתון המהירות ביותר](#_14).
- **מהירה לתכנות**: הגבירו את מהירות פיתוח התכונות החדשות בכ - %200 עד %300. \*
- **פחות שגיאות**: מנעו כ - %40 משגיאות אנוש (מפתחים). \*
@@ -449,12 +458,12 @@ item: Item
- python-multipart - דרוש אם ברצונכם לתמוך ב "פרסור" טפסים, באצמעות request.form().
- itsdangerous - דרוש אם ברצונכם להשתמש ב - `SessionMiddleware`.
- pyyaml - דרוש אם ברצונכם להשתמש ב - `SchemaGenerator` של Starlette (כנראה שאתם לא צריכים את זה עם FastAPI).
-- ujson - דרוש אם ברצונכם להשתמש ב - `UJSONResponse`.
בשימוש FastAPI / Starlette:
- uvicorn - לשרת שטוען ומגיש את האפליקציה שלכם.
- orjson - דרוש אם ברצונכם להשתמש ב - `ORJSONResponse`.
+- ujson - דרוש אם ברצונכם להשתמש ב - `UJSONResponse`.
תוכלו להתקין את כל אלו באמצעות pip install "fastapi[all]".
diff --git a/docs/hu/docs/index.md b/docs/hu/docs/index.md
index 75ea88c4d8..671b0477f6 100644
--- a/docs/hu/docs/index.md
+++ b/docs/hu/docs/index.md
@@ -26,7 +26,7 @@
**Forrás kód**: https://github.com/tiangolo/fastapi
---
-A FastAPI egy modern, gyors (nagy teljesítményű), webes keretrendszer API-ok építéséhez Python 3.8+-al, a Python szabványos típusjelöléseire építve.
+A FastAPI egy modern, gyors (nagy teljesítményű), webes keretrendszer API-ok építéséhez Python -al, a Python szabványos típusjelöléseire építve.
Kulcs funkciók:
@@ -115,8 +115,6 @@ Ha egy olyan CLI alkalmazást fejlesztesz amit a parancssorban kell használni w
## Követelmények
-Python 3.8+
-
A FastAPI óriások vállán áll:
* Starlette a webes részekhez.
@@ -331,7 +329,7 @@ Ezt standard modern Python típusokkal csinálod.
Nem kell új szintaxist, vagy specifikus könyvtár mert metódósait, stb. megtanulnod.
-Csak standard **Python 3.8+**.
+Csak standard **Python**.
Például egy `int`-nek:
@@ -456,12 +454,12 @@ Starlette által használt:
* python-multipart - Követelmény ha "parsing"-ot akarsz támogatni, `request.form()`-al.
* itsdangerous - Követelmény `SessionMiddleware` támogatáshoz.
* pyyaml - Követelmény a Starlette `SchemaGenerator`-ának támogatásához (valószínűleg erre nincs szükség FastAPI használása esetén).
-* ujson - Követelmény ha `UJSONResponse`-t akarsz használni.
FastAPI / Starlette által használt
* uvicorn - Szerverekhez amíg betöltik és szolgáltatják az applikációdat.
* orjson - Követelmény ha `ORJSONResponse`-t akarsz használni.
+* ujson - Követelmény ha `UJSONResponse`-t akarsz használni.
Ezeket mind telepítheted a `pip install "fastapi[all]"` paranccsal.
diff --git a/docs/id/docs/tutorial/index.md b/docs/id/docs/tutorial/index.md
index b8ed96ae1f..6b6de24f09 100644
--- a/docs/id/docs/tutorial/index.md
+++ b/docs/id/docs/tutorial/index.md
@@ -52,7 +52,7 @@ $ pip install "fastapi[all]"
...yang juga termasuk `uvicorn`, yang dapat kamu gunakan sebagai server yang menjalankan kodemu.
-!!! catatan
+!!! note "Catatan"
Kamu juga dapat meng-installnya bagian demi bagian.
Hal ini mungkin yang akan kamu lakukan ketika kamu hendak menyebarkan (men-deploy) aplikasimu ke tahap produksi:
diff --git a/docs/it/docs/index.md b/docs/it/docs/index.md
index a69008d2b4..c06d3a1743 100644
--- a/docs/it/docs/index.md
+++ b/docs/it/docs/index.md
@@ -438,7 +438,6 @@ Per approfondire, consulta la sezione ujson - per un "parsing" di JSON più veloce.
* email_validator - per la validazione di email.
Usate da Starlette:
@@ -450,12 +449,12 @@ Usate da Starlette:
* itsdangerous - Richiesto per usare `SessionMiddleware`.
* pyyaml - Richiesto per il supporto dello `SchemaGenerator` di Starlette (probabilmente non ti serve con FastAPI).
* graphene - Richiesto per il supporto di `GraphQLApp`.
-* ujson - Richiesto se vuoi usare `UJSONResponse`.
Usate da FastAPI / Starlette:
* uvicorn - per il server che carica e serve la tua applicazione.
* orjson - ichiesto se vuoi usare `ORJSONResponse`.
+* ujson - Richiesto se vuoi usare `UJSONResponse`.
Puoi installarle tutte con `pip install fastapi[all]`.
diff --git a/docs/ja/docs/async.md b/docs/ja/docs/async.md
index 934cea0ef0..5e38d1cec1 100644
--- a/docs/ja/docs/async.md
+++ b/docs/ja/docs/async.md
@@ -368,7 +368,7 @@ async def read_burgers():
上記の方法と違った方法の別の非同期フレームワークから来ており、小さなパフォーマンス向上 (約100ナノ秒) のために通常の `def` を使用して些細な演算のみ行う *path operation 関数* を定義するのに慣れている場合は、**FastAPI**ではまったく逆の効果になることに注意してください。このような場合、*path operation 関数* がブロッキングI/Oを実行しないのであれば、`async def` の使用をお勧めします。
-それでも、どちらの状況でも、**FastAPI**が過去のフレームワークよりも (またはそれに匹敵するほど) [高速になる](index.md#performance){.internal-link target=_blank}可能性があります。
+それでも、どちらの状況でも、**FastAPI**が過去のフレームワークよりも (またはそれに匹敵するほど) [高速になる](index.md#_10){.internal-link target=_blank}可能性があります。
### 依存関係
@@ -390,4 +390,4 @@ async def read_burgers():
繰り返しになりますが、これらは非常に技術的な詳細であり、検索して辿り着いた場合は役立つでしょう。
-それ以外の場合は、上記のセクションのガイドラインで問題ないはずです: 急いでいますか?。
+それ以外の場合は、上記のセクションのガイドラインで問題ないはずです: 急いでいますか?。
diff --git a/docs/ja/docs/deployment/concepts.md b/docs/ja/docs/deployment/concepts.md
index 38cbca2192..abe4f2c662 100644
--- a/docs/ja/docs/deployment/concepts.md
+++ b/docs/ja/docs/deployment/concepts.md
@@ -30,7 +30,7 @@
## セキュリティ - HTTPS
-[前チャプターのHTTPSについて](./https.md){.internal-link target=_blank}では、HTTPSがどのようにAPIを暗号化するのかについて学びました。
+[前チャプターのHTTPSについて](https.md){.internal-link target=_blank}では、HTTPSがどのようにAPIを暗号化するのかについて学びました。
通常、アプリケーションサーバにとって**外部の**コンポーネントである**TLS Termination Proxy**によって提供されることが一般的です。このプロキシは通信の暗号化を担当します。
@@ -188,7 +188,7 @@ FastAPI アプリケーションでは、Uvicorn のようなサーバープロ
### ワーカー・プロセス と ポート
-[HTTPSについて](./https.md){.internal-link target=_blank}のドキュメントで、1つのサーバーで1つのポートとIPアドレスの組み合わせでリッスンできるのは1つのプロセスだけであることを覚えていますでしょうか?
+[HTTPSについて](https.md){.internal-link target=_blank}のドキュメントで、1つのサーバーで1つのポートとIPアドレスの組み合わせでリッスンできるのは1つのプロセスだけであることを覚えていますでしょうか?
これはいまだに同じです。
@@ -247,7 +247,7 @@ FastAPI アプリケーションでは、Uvicorn のようなサーバープロ
これらの**コンテナ**やDockerそしてKubernetesに関する項目が、まだあまり意味をなしていなくても心配しないでください。
- コンテナ・イメージ、Docker、Kubernetesなどについては、次の章で詳しく説明します: [コンテナ内のFastAPI - Docker](./docker.md){.internal-link target=_blank}.
+ コンテナ・イメージ、Docker、Kubernetesなどについては、次の章で詳しく説明します: [コンテナ内のFastAPI - Docker](docker.md){.internal-link target=_blank}.
## 開始前の事前のステップ
@@ -282,7 +282,7 @@ FastAPI アプリケーションでは、Uvicorn のようなサーバープロ
!!! tip
- コンテナを使った具体的な例については、次の章で紹介します: [コンテナ内のFastAPI - Docker](./docker.md){.internal-link target=_blank}.
+ コンテナを使った具体的な例については、次の章で紹介します: [コンテナ内のFastAPI - Docker](docker.md){.internal-link target=_blank}.
## リソースの利用
diff --git a/docs/ja/docs/deployment/docker.md b/docs/ja/docs/deployment/docker.md
index ca9dedc3c1..0c9df648d1 100644
--- a/docs/ja/docs/deployment/docker.md
+++ b/docs/ja/docs/deployment/docker.md
@@ -117,7 +117,7 @@ FastAPI用の**Dockerイメージ**を、**公式Python**イメージに基づ
最も一般的な方法は、`requirements.txt` ファイルにパッケージ名とそのバージョンを 1 行ずつ書くことです。
-もちろん、[FastAPI バージョンについて](./versions.md){.internal-link target=_blank}で読んだのと同じアイデアを使用して、バージョンの範囲を設定します。
+もちろん、[FastAPI バージョンについて](versions.md){.internal-link target=_blank}で読んだのと同じアイデアを使用して、バージョンの範囲を設定します。
例えば、`requirements.txt` は次のようになります:
@@ -384,7 +384,7 @@ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
## デプロイメントのコンセプト
-コンテナという観点から、[デプロイのコンセプト](./concepts.md){.internal-link target=_blank}に共通するいくつかについて、もう一度説明しましょう。
+コンテナという観点から、[デプロイのコンセプト](concepts.md){.internal-link target=_blank}に共通するいくつかについて、もう一度説明しましょう。
コンテナは主に、アプリケーションの**ビルドとデプロイ**のプロセスを簡素化するためのツールですが、これらの**デプロイのコンセプト**を扱うための特定のアプローチを強制するものではないです。
@@ -461,7 +461,7 @@ Kubernetesのような分散コンテナ管理システムの1つは通常、入
もちろん、**特殊なケース**として、**Gunicornプロセスマネージャ**を持つ**コンテナ**内で複数の**Uvicornワーカープロセス**を起動させたい場合があります。
-このような場合、**公式のDockerイメージ**を使用することができます。このイメージには、複数の**Uvicornワーカープロセス**を実行するプロセスマネージャとして**Gunicorn**が含まれており、現在のCPUコアに基づいてワーカーの数を自動的に調整するためのデフォルト設定がいくつか含まれています。詳しくは後述の[Gunicornによる公式Dockerイメージ - Uvicorn](#gunicornによる公式dockerイメージ---Uvicorn)で説明します。
+このような場合、**公式のDockerイメージ**を使用することができます。このイメージには、複数の**Uvicornワーカープロセス**を実行するプロセスマネージャとして**Gunicorn**が含まれており、現在のCPUコアに基づいてワーカーの数を自動的に調整するためのデフォルト設定がいくつか含まれています。詳しくは後述の[Gunicornによる公式Dockerイメージ - Uvicorn](#gunicorndocker-uvicorn)で説明します。
以下は、それが理にかなっている場合の例です:
@@ -531,7 +531,7 @@ Docker Composeで**シングルサーバ**(クラスタではない)にデ
## Gunicornによる公式Dockerイメージ - Uvicorn
-前の章で詳しく説明したように、Uvicornワーカーで動作するGunicornを含む公式のDockerイメージがあります: [Server Workers - Gunicorn と Uvicorn](./server-workers.md){.internal-link target=_blank}で詳しく説明しています。
+前の章で詳しく説明したように、Uvicornワーカーで動作するGunicornを含む公式のDockerイメージがあります: [Server Workers - Gunicorn と Uvicorn](server-workers.md){.internal-link target=_blank}で詳しく説明しています。
このイメージは、主に上記で説明した状況で役に立つでしょう: [複数のプロセスと特殊なケースを持つコンテナ(Containers with Multiple Processes and Special Cases)](#containers-with-multiple-processes-and-special-cases)
diff --git a/docs/ja/docs/deployment/server-workers.md b/docs/ja/docs/deployment/server-workers.md
index e1ea165a2c..51d0bc2d48 100644
--- a/docs/ja/docs/deployment/server-workers.md
+++ b/docs/ja/docs/deployment/server-workers.md
@@ -13,13 +13,13 @@
アプリケーションをデプロイする際には、**複数のコア**を利用し、そしてより多くのリクエストを処理できるようにするために、プロセスの**レプリケーション**を持つことを望むでしょう。
-前のチャプターである[デプロイメントのコンセプト](./concepts.md){.internal-link target=_blank}にて見てきたように、有効な戦略がいくつかあります。
+前のチャプターである[デプロイメントのコンセプト](concepts.md){.internal-link target=_blank}にて見てきたように、有効な戦略がいくつかあります。
ここでは**Gunicorn**が**Uvicornのワーカー・プロセス**を管理する場合の使い方について紹介していきます。
!!! info
- DockerやKubernetesなどのコンテナを使用している場合は、次の章で詳しく説明します: [コンテナ内のFastAPI - Docker](./docker.md){.internal-link target=_blank}
+ DockerやKubernetesなどのコンテナを使用している場合は、次の章で詳しく説明します: [コンテナ内のFastAPI - Docker](docker.md){.internal-link target=_blank}
特に**Kubernetes**上で実行する場合は、おそらく**Gunicornを使用せず**、**コンテナごとに単一のUvicornプロセス**を実行することになりますが、それについてはこの章の後半で説明します。
@@ -167,7 +167,7 @@ $ uvicorn main:app --host 0.0.0.0 --port 8080 --workers 4
## コンテナとDocker
-次章の[コンテナ内のFastAPI - Docker](./docker.md){.internal-link target=_blank}では、その他の**デプロイのコンセプト**を扱うために実施するであろう戦略をいくつか紹介します。
+次章の[コンテナ内のFastAPI - Docker](docker.md){.internal-link target=_blank}では、その他の**デプロイのコンセプト**を扱うために実施するであろう戦略をいくつか紹介します。
また、**GunicornとUvicornワーカー**を含む**公式Dockerイメージ**と、簡単なケースに役立ついくつかのデフォルト設定も紹介します。
diff --git a/docs/ja/docs/fastapi-people.md b/docs/ja/docs/fastapi-people.md
index ff75dcbce6..d92a7bf462 100644
--- a/docs/ja/docs/fastapi-people.md
+++ b/docs/ja/docs/fastapi-people.md
@@ -1,3 +1,8 @@
+---
+hide:
+ - navigation
+---
+
# FastAPI People
FastAPIには、様々なバックグラウンドの人々を歓迎する素晴らしいコミュニティがあります。
@@ -19,7 +24,7 @@ FastAPIには、様々なバックグラウンドの人々を歓迎する素晴
{% endif %}
-私は **FastAPI** の作成者および Maintainer です。詳しくは [FastAPIを応援 - ヘルプの入手 - 開発者とつながる](help-fastapi.md#開発者とつながる){.internal-link target=_blank} に記載しています。
+私は **FastAPI** の作成者および Maintainer です。詳しくは [FastAPIを応援 - ヘルプの入手 - 開発者とつながる](help-fastapi.md#_1){.internal-link target=_blank} に記載しています。
...ところで、ここではコミュニティを紹介したいと思います。
@@ -29,15 +34,15 @@ FastAPIには、様々なバックグラウンドの人々を歓迎する素晴
紹介するのは次のような人々です:
-* [GitHub issuesで他の人を助ける](help-fastapi.md#help-others-with-issues-in-github){.internal-link target=_blank}。
+* [GitHub issuesで他の人を助ける](help-fastapi.md#github-issues){.internal-link target=_blank}。
* [プルリクエストをする](help-fastapi.md#create-a-pull-request){.internal-link target=_blank}。
-* プルリクエストのレビューをする ([特に翻訳に重要](contributing.md#translations){.internal-link target=_blank})。
+* プルリクエストのレビューをする ([特に翻訳に重要](contributing.md#_8){.internal-link target=_blank})。
彼らに大きな拍手を。👏 🙇
## 先月最もアクティブだったユーザー
-彼らは、先月の[GitHub issuesで最も多くの人を助けた](help-fastapi.md#help-others-with-issues-in-github){.internal-link target=_blank}ユーザーです。☕
+彼らは、先月の[GitHub issuesで最も多くの人を助けた](help-fastapi.md#github-issues){.internal-link target=_blank}ユーザーです。☕
{% if people %}
itsdangerous - `SessionMiddleware` サポートのためには必要です。
- pyyaml - Starlette の `SchemaGenerator` サポートのために必要です。 (FastAPI では必要ないでしょう。)
- graphene - `GraphQLApp` サポートのためには必要です。
-- ujson - `UJSONResponse`を使用する場合は必須です。
FastAPI / Starlette に使用されるもの:
- uvicorn - アプリケーションをロードしてサーブするサーバーのため。
- orjson - `ORJSONResponse`を使用したい場合は必要です。
+- ujson - `UJSONResponse`を使用する場合は必須です。
これらは全て `pip install fastapi[all]`でインストールできます。
diff --git a/docs/ja/docs/tutorial/body-updates.md b/docs/ja/docs/tutorial/body-updates.md
index 7a56ef2b9b..95d328ec50 100644
--- a/docs/ja/docs/tutorial/body-updates.md
+++ b/docs/ja/docs/tutorial/body-updates.md
@@ -34,7 +34,7 @@
つまり、更新したいデータだけを送信して、残りはそのままにしておくことができます。
-!!! Note "備考"
+!!! note "備考"
`PATCH`は`PUT`よりもあまり使われておらず、知られていません。
また、多くのチームは部分的な更新であっても`PUT`だけを使用しています。
diff --git a/docs/ja/docs/tutorial/body.md b/docs/ja/docs/tutorial/body.md
index 12332991d0..ccce9484d8 100644
--- a/docs/ja/docs/tutorial/body.md
+++ b/docs/ja/docs/tutorial/body.md
@@ -162,4 +162,4 @@ APIはほとんどの場合 **レスポンス** ボディを送らなければ
## Pydanticを使わない方法
-もしPydanticモデルを使用したくない場合は、**Body**パラメータが利用できます。[Body - Multiple Parameters: Singular values in body](body-multiple-params.md#singular-values-in-body){.internal-link target=_blank}を確認してください。
+もしPydanticモデルを使用したくない場合は、**Body**パラメータが利用できます。[Body - Multiple Parameters: Singular values in body](body-multiple-params.md#_2){.internal-link target=_blank}を確認してください。
diff --git a/docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md b/docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md
index 2a89e51d2b..c0642efd47 100644
--- a/docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md
+++ b/docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md
@@ -108,7 +108,7 @@ FastAPIは、いくつかの바쁘신 경우
+## 바쁘신 경우
요약
@@ -263,7 +263,7 @@ CPU에 묶인 연산에 관한 흔한 예시는 복잡한 수학 처리를 필
파이썬이 **데이터 사이언스**, 머신러닝과 특히 딥러닝에 의 주된 언어라는 간단한 사실에 더해서, 이것은 FastAPI를 데이터 사이언스 / 머신러닝 웹 API와 응용프로그램에 (다른 것들보다) 좋은 선택지가 되게 합니다.
-배포시 병렬을 어떻게 가능하게 하는지 알고싶다면, [배포](/ko/deployment){.internal-link target=_blank}문서를 참고하십시오.
+배포시 병렬을 어떻게 가능하게 하는지 알고싶다면, [배포](deployment/index.md){.internal-link target=_blank}문서를 참고하십시오.
## `async`와 `await`
@@ -379,7 +379,7 @@ FastAPI를 사용하지 않더라도, 높은 호환성 및 I/O를 수행하는 코드를 사용하지 않는 한 `async def`를 사용하는 편이 더 낫습니다.
-하지만 두 경우 모두, FastAPI가 당신이 전에 사용하던 프레임워크보다 [더 빠를](index.md#performance){.internal-link target=_blank} (최소한 비견될) 확률이 높습니다.
+하지만 두 경우 모두, FastAPI가 당신이 전에 사용하던 프레임워크보다 [더 빠를](index.md#_11){.internal-link target=_blank} (최소한 비견될) 확률이 높습니다.
### 의존성
@@ -401,4 +401,4 @@ FastAPI를 사용하지 않더라도, 높은 호환성 및 **구니콘**을 **유비콘 워커 프로세스**와 함께 사용하는 방법을 알려드리겠습니다.
-!!! 정보
- 만약 도커와 쿠버네티스 같은 컨테이너를 사용하고 있다면 다음 챕터 [FastAPI와 컨테이너 - 도커](./docker.md){.internal-link target=_blank}에서 더 많은 정보를 얻을 수 있습니다.
+!!! info "정보"
+ 만약 도커와 쿠버네티스 같은 컨테이너를 사용하고 있다면 다음 챕터 [FastAPI와 컨테이너 - 도커](docker.md){.internal-link target=_blank}에서 더 많은 정보를 얻을 수 있습니다.
특히, 쿠버네티스에서 실행할 때는 구니콘을 사용하지 않고 대신 컨테이너당 하나의 유비콘 프로세스를 실행하는 것이 좋습니다. 이 장의 뒷부분에서 설명하겠습니다.
@@ -165,7 +165,7 @@ $ uvicorn main:app --host 0.0.0.0 --port 8080 --workers 4
## 컨테이너와 도커
-다음 장인 [FastAPI와 컨테이너 - 도커](./docker.md){.internal-link target=_blank}에서 다른 **배포 개념들**을 다루는 전략들을 알려드리겠습니다.
+다음 장인 [FastAPI와 컨테이너 - 도커](docker.md){.internal-link target=_blank}에서 다른 **배포 개념들**을 다루는 전략들을 알려드리겠습니다.
또한 간단한 케이스에서 사용할 수 있는, **구니콘과 유비콘 워커**가 포함돼 있는 **공식 도커 이미지**와 함께 몇 가지 기본 구성을 보여드리겠습니다.
diff --git a/docs/ko/docs/features.md b/docs/ko/docs/features.md
index 54479165e8..f7b35557ca 100644
--- a/docs/ko/docs/features.md
+++ b/docs/ko/docs/features.md
@@ -68,7 +68,7 @@ second_user_data = {
my_second_user: User = User(**second_user_data)
```
-!!! 정보
+!!! info "정보"
`**second_user_data`가 뜻하는 것:
`second_user_data` 딕셔너리의 키와 값을 키-값 인자로서 바로 넘겨줍니다. 다음과 동일합니다: `User(id=4, name="Mary", joined="2018-11-30")`
diff --git a/docs/ko/docs/index.md b/docs/ko/docs/index.md
index eeadc0363c..4bc92c36c4 100644
--- a/docs/ko/docs/index.md
+++ b/docs/ko/docs/index.md
@@ -1,3 +1,12 @@
+---
+hide:
+ - navigation
+---
+
+
+
@@ -24,11 +33,11 @@
---
-FastAPI는 현대적이고, 빠르며(고성능), 파이썬 표준 타입 힌트에 기초한 Python3.8+의 API를 빌드하기 위한 웹 프레임워크입니다.
+FastAPI는 현대적이고, 빠르며(고성능), 파이썬 표준 타입 힌트에 기초한 Python의 API를 빌드하기 위한 웹 프레임워크입니다.
주요 특징으로:
-* **빠름**: (Starlette과 Pydantic 덕분에) **NodeJS** 및 **Go**와 대등할 정도로 매우 높은 성능. [사용 가능한 가장 빠른 파이썬 프레임워크 중 하나](#performance).
+* **빠름**: (Starlette과 Pydantic 덕분에) **NodeJS** 및 **Go**와 대등할 정도로 매우 높은 성능. [사용 가능한 가장 빠른 파이썬 프레임워크 중 하나](#_11).
* **빠른 코드 작성**: 약 200%에서 300%까지 기능 개발 속도 증가. *
* **적은 버그**: 사람(개발자)에 의한 에러 약 40% 감소. *
@@ -107,8 +116,6 @@ FastAPI는 현대적이고, 빠르며(고성능), 파이썬 표준 타입 힌트
## 요구사항
-Python 3.8+
-
FastAPI는 거인들의 어깨 위에 서 있습니다:
* 웹 부분을 위한 Starlette.
@@ -323,7 +330,7 @@ def update_item(item_id: int, item: Item):
새로운 문법, 특정 라이브러리의 메소드나 클래스 등을 배울 필요가 없습니다.
-그저 표준 **Python 3.8+** 입니다.
+그저 표준 **Python** 입니다.
예를 들어, `int`에 대해선:
@@ -447,12 +454,12 @@ Starlette이 사용하는:
* itsdangerous - `SessionMiddleware` 지원을 위해 필요.
* pyyaml - Starlette의 `SchemaGenerator` 지원을 위해 필요 (FastAPI와 쓸때는 필요 없을 것입니다).
* graphene - `GraphQLApp` 지원을 위해 필요.
-* ujson - `UJSONResponse`를 사용하려면 필요.
FastAPI / Starlette이 사용하는:
* uvicorn - 애플리케이션을 로드하고 제공하는 서버.
* orjson - `ORJSONResponse`을 사용하려면 필요.
+* ujson - `UJSONResponse`를 사용하려면 필요.
`pip install fastapi[all]`를 통해 이 모두를 설치 할 수 있습니다.
diff --git a/docs/ko/docs/tutorial/body-fields.md b/docs/ko/docs/tutorial/body-fields.md
index fc7209726c..c91d6130b9 100644
--- a/docs/ko/docs/tutorial/body-fields.md
+++ b/docs/ko/docs/tutorial/body-fields.md
@@ -26,7 +26,7 @@
=== "Python 3.10+ Annotated가 없는 경우"
- !!! 팁
+ !!! tip "팁"
가능하다면 `Annotated`가 달린 버전을 권장합니다.
```Python hl_lines="2"
diff --git a/docs/ko/docs/tutorial/body.md b/docs/ko/docs/tutorial/body.md
index 8b98284bb2..0ab8b71626 100644
--- a/docs/ko/docs/tutorial/body.md
+++ b/docs/ko/docs/tutorial/body.md
@@ -8,7 +8,7 @@
**요청** 본문을 선언하기 위해서 모든 강력함과 이점을 갖춘 Pydantic 모델을 사용합니다.
-!!! 정보
+!!! info "정보"
데이터를 보내기 위해, (좀 더 보편적인) `POST`, `PUT`, `DELETE` 혹은 `PATCH` 중에 하나를 사용하는 것이 좋습니다.
`GET` 요청에 본문을 담아 보내는 것은 명세서에 정의되지 않은 행동입니다. 그럼에도 불구하고, 이 방식은 아주 복잡한/극한의 사용 상황에서만 FastAPI에 의해 지원됩니다.
@@ -134,7 +134,7 @@
-!!! 팁
+!!! tip "팁"
만약 PyCharm를 편집기로 사용한다면, Pydantic PyCharm Plugin을 사용할 수 있습니다.
다음 사항을 포함해 Pydantic 모델에 대한 편집기 지원을 향상시킵니다:
@@ -203,11 +203,11 @@
* 만약 매개변수가 (`int`, `float`, `str`, `bool` 등과 같은) **유일한 타입**으로 되어있으면, **쿼리** 매개변수로 해석될 것입니다.
* 만약 매개변수가 **Pydantic 모델** 타입으로 선언되어 있으면, 요청 **본문**으로 해석될 것입니다.
-!!! 참고
+!!! note "참고"
FastAPI는 `q`의 값이 필요없음을 알게 될 것입니다. 기본 값이 `= None`이기 때문입니다.
`Union[str, None]`에 있는 `Union`은 FastAPI에 의해 사용된 것이 아니지만, 편집기로 하여금 더 나은 지원과 에러 탐지를 지원할 것입니다.
## Pydantic없이
-만약 Pydantic 모델을 사용하고 싶지 않다면, **Body** 매개변수를 사용할 수도 있습니다. [Body - 다중 매개변수: 본문에 있는 유일한 값](body-multiple-params.md#singular-values-in-body){.internal-link target=_blank} 문서를 확인하세요.
+만약 Pydantic 모델을 사용하고 싶지 않다면, **Body** 매개변수를 사용할 수도 있습니다. [Body - 다중 매개변수: 본문에 있는 유일한 값](body-multiple-params.md#_2){.internal-link target=_blank} 문서를 확인하세요.
diff --git a/docs/ko/docs/tutorial/dependencies/index.md b/docs/ko/docs/tutorial/dependencies/index.md
index c56dddae3a..d06864ab81 100644
--- a/docs/ko/docs/tutorial/dependencies/index.md
+++ b/docs/ko/docs/tutorial/dependencies/index.md
@@ -85,12 +85,12 @@
그 후 위의 값을 포함한 `dict` 자료형으로 반환할 뿐입니다.
-!!! 정보
+!!! info "정보"
FastAPI는 0.95.0 버전부터 `Annotated`에 대한 지원을 (그리고 이를 사용하기 권장합니다) 추가했습니다.
옛날 버전을 가지고 있는 경우, `Annotated`를 사용하려 하면 에러를 맞이하게 될 것입니다.
- `Annotated`를 사용하기 전에 최소 0.95.1로 [FastAPI 버전 업그레이드](../../deployment/versions.md#upgrading-the-fastapi-versions){.internal-link target=_blank}를 확실하게 하세요.
+ `Annotated`를 사용하기 전에 최소 0.95.1로 [FastAPI 버전 업그레이드](../../deployment/versions.md#fastapi_2){.internal-link target=_blank}를 확실하게 하세요.
### `Depends` 불러오기
diff --git a/docs/ko/docs/tutorial/first-steps.md b/docs/ko/docs/tutorial/first-steps.md
index e3b42bce73..bdec3a3776 100644
--- a/docs/ko/docs/tutorial/first-steps.md
+++ b/docs/ko/docs/tutorial/first-steps.md
@@ -310,7 +310,7 @@ URL "`/`"에 대한 `GET` 작동을 사용하는 요청을 받을 때마다 **Fa
```
!!! note "참고"
- 차이점을 모르겠다면 [Async: *"In a hurry?"*](../async.md#in-a-hurry){.internal-link target=_blank}을 확인하세요.
+ 차이점을 모르겠다면 [Async: *"바쁘신 경우"*](../async.md#_1){.internal-link target=_blank}을 확인하세요.
### 5 단계: 콘텐츠 반환
diff --git a/docs/ko/docs/tutorial/query-params.md b/docs/ko/docs/tutorial/query-params.md
index 8c7f9167b0..43a6c1a36f 100644
--- a/docs/ko/docs/tutorial/query-params.md
+++ b/docs/ko/docs/tutorial/query-params.md
@@ -195,4 +195,4 @@ http://127.0.0.1:8000/items/foo-item?needy=sooooneedy
* `limit`, 선택적인 `int`.
!!! tip "팁"
- [경로 매개변수](path-params.md#predefined-values){.internal-link target=_blank}와 마찬가지로 `Enum`을 사용할 수 있습니다.
+ [경로 매개변수](path-params.md#_8){.internal-link target=_blank}와 마찬가지로 `Enum`을 사용할 수 있습니다.
diff --git a/docs/ko/docs/tutorial/security/get-current-user.md b/docs/ko/docs/tutorial/security/get-current-user.md
index 5bc2cee7a0..f4b6f94717 100644
--- a/docs/ko/docs/tutorial/security/get-current-user.md
+++ b/docs/ko/docs/tutorial/security/get-current-user.md
@@ -86,12 +86,12 @@ Pydantic 모델인 `User`로 `current_user`의 타입을 선언하는 것을 알
이것은 모든 완료 및 타입 검사를 통해 함수 내부에서 우리를 도울 것입니다.
-!!! 팁
+!!! tip "팁"
요청 본문도 Pydantic 모델로 선언된다는 것을 기억할 것입니다.
여기서 **FastAPI**는 `Depends`를 사용하고 있기 때문에 혼동되지 않습니다.
-!!! 확인
+!!! check "확인"
이 의존성 시스템이 설계된 방식은 모두 `User` 모델을 반환하는 다양한 의존성(다른 "의존적인")을 가질 수 있도록 합니다.
해당 타입의 데이터를 반환할 수 있는 의존성이 하나만 있는 것으로 제한되지 않습니다.
diff --git a/docs/pl/docs/fastapi-people.md b/docs/pl/docs/fastapi-people.md
new file mode 100644
index 0000000000..b244ab4899
--- /dev/null
+++ b/docs/pl/docs/fastapi-people.md
@@ -0,0 +1,178 @@
+# Ludzie FastAPI
+
+FastAPI posiada wspaniałą społeczność, która jest otwarta dla ludzi z każdego środowiska.
+
+## Twórca - Opienik
+
+Cześć! 👋
+
+To ja:
+
+{% if people %}
+itsdangerous - Wymagany dla wsparcia `SessionMiddleware`.
* pyyaml - Wymagane dla wsparcia `SchemaGenerator` z Starlette (z FastAPI prawdopodobnie tego nie potrzebujesz).
* graphene - Wymagane dla wsparcia `GraphQLApp`.
-* ujson - Wymagane jeżeli chcesz korzystać z `UJSONResponse`.
Używane przez FastAPI / Starlette:
* uvicorn - jako serwer, który ładuje i obsługuje Twoją aplikację.
* orjson - Wymagane jeżeli chcesz używać `ORJSONResponse`.
+* ujson - Wymagane jeżeli chcesz korzystać z `UJSONResponse`.
Możesz zainstalować wszystkie te aplikacje przy pomocy `pip install fastapi[all]`.
diff --git a/docs/pl/docs/tutorial/first-steps.md b/docs/pl/docs/tutorial/first-steps.md
index 9406d703d5..ce71f8b83d 100644
--- a/docs/pl/docs/tutorial/first-steps.md
+++ b/docs/pl/docs/tutorial/first-steps.md
@@ -311,7 +311,7 @@ Możesz również zdefiniować to jako normalną funkcję zamiast `async def`:
```
!!! note
- Jeśli nie znasz różnicy, sprawdź [Async: *"In a hurry?"*](/async/#in-a-hurry){.internal-link target=_blank}.
+ Jeśli nie znasz różnicy, sprawdź [Async: *"In a hurry?"*](../async.md#in-a-hurry){.internal-link target=_blank}.
### Krok 5: zwróć zawartość
diff --git a/docs/pt/docs/advanced/events.md b/docs/pt/docs/advanced/events.md
index 7f6cb6f5d4..12aa93f298 100644
--- a/docs/pt/docs/advanced/events.md
+++ b/docs/pt/docs/advanced/events.md
@@ -160,4 +160,4 @@ Por baixo, na especificação técnica ASGI, essa é a parte do
@@ -109,7 +109,7 @@ Isso pode depender principalmente da ferramenta que você usa para **instalar**
O caminho mais comum de fazer isso é ter um arquivo `requirements.txt` com os nomes dos pacotes e suas versões, um por linha.
-Você, naturalmente, usaria as mesmas ideias que você leu em [Sobre Versões do FastAPI](./versions.md){.internal-link target=_blank} para definir os intervalos de versões.
+Você, naturalmente, usaria as mesmas ideias que você leu em [Sobre Versões do FastAPI](versions.md){.internal-link target=_blank} para definir os intervalos de versões.
Por exemplo, seu `requirements.txt` poderia parecer com:
@@ -374,7 +374,7 @@ Então ajuste o comando Uvicorn para usar o novo módulo `main` em vez de `app.m
## Conceitos de Implantação
-Vamos falar novamente sobre alguns dos mesmos [Conceitos de Implantação](./concepts.md){.internal-link target=_blank} em termos de contêineres.
+Vamos falar novamente sobre alguns dos mesmos [Conceitos de Implantação](concepts.md){.internal-link target=_blank} em termos de contêineres.
Contêineres são principalmente uma ferramenta para simplificar o processo de **construção e implantação** de um aplicativo, mas eles não impõem uma abordagem particular para lidar com esses **conceitos de implantação** e existem várias estratégias possíveis.
@@ -515,14 +515,14 @@ Se você tiver uma configuração simples, com um **único contêiner** que ent
## Imagem Oficial do Docker com Gunicorn - Uvicorn
-Há uma imagem oficial do Docker que inclui o Gunicorn executando com trabalhadores Uvicorn, conforme detalhado em um capítulo anterior: [Server Workers - Gunicorn com Uvicorn](./server-workers.md){.internal-link target=_blank}.
+Há uma imagem oficial do Docker que inclui o Gunicorn executando com trabalhadores Uvicorn, conforme detalhado em um capítulo anterior: [Server Workers - Gunicorn com Uvicorn](server-workers.md){.internal-link target=_blank}.
-Essa imagem seria útil principalmente nas situações descritas acima em: [Contêineres com Múltiplos Processos e Casos Especiais](#contêineres-com-múltiplos-processos-e-casos-Especiais).
+Essa imagem seria útil principalmente nas situações descritas acima em: [Contêineres com Múltiplos Processos e Casos Especiais](#conteineres-com-multiplos-processos-e-casos-especiais).
* tiangolo/uvicorn-gunicorn-fastapi.
!!! warning
- Existe uma grande chance de que você **não** precise dessa imagem base ou de qualquer outra semelhante, e seria melhor construir a imagem do zero, como [descrito acima em: Construa uma Imagem Docker para o FastAPI](#construa-uma-imagem-docker-para-o-fastapi).
+ Existe uma grande chance de que você **não** precise dessa imagem base ou de qualquer outra semelhante, e seria melhor construir a imagem do zero, como [descrito acima em: Construa uma Imagem Docker para o FastAPI](#construindo-uma-imagem-docker-para-fastapi).
Essa imagem tem um mecanismo de **auto-ajuste** incluído para definir o **número de processos trabalhadores** com base nos núcleos de CPU disponíveis.
@@ -579,7 +579,7 @@ COPY ./app /app/app
Você provavelmente **não** deve usar essa imagem base oficial (ou qualquer outra semelhante) se estiver usando **Kubernetes** (ou outros) e já estiver definindo **replicação** no nível do cluster, com vários **contêineres**. Nesses casos, é melhor **construir uma imagem do zero** conforme descrito acima: [Construindo uma Imagem Docker para FastAPI](#construindo-uma-imagem-docker-para-fastapi).
-Essa imagem seria útil principalmente nos casos especiais descritos acima em [Contêineres com Múltiplos Processos e Casos Especiais](#contêineres-com-múltiplos-processos-e-casos-Especiais). Por exemplo, se sua aplicação for **simples o suficiente** para que a configuração padrão de número de processos com base na CPU funcione bem, você não quer se preocupar com a configuração manual da replicação no nível do cluster e não está executando mais de um contêiner com seu aplicativo. Ou se você estiver implantando com **Docker Compose**, executando em um único servidor, etc.
+Essa imagem seria útil principalmente nos casos especiais descritos acima em [Contêineres com Múltiplos Processos e Casos Especiais](#conteineres-com-multiplos-processos-e-casos-especiais). Por exemplo, se sua aplicação for **simples o suficiente** para que a configuração padrão de número de processos com base na CPU funcione bem, você não quer se preocupar com a configuração manual da replicação no nível do cluster e não está executando mais de um contêiner com seu aplicativo. Ou se você estiver implantando com **Docker Compose**, executando em um único servidor, etc.
## Deploy da Imagem do Contêiner
diff --git a/docs/pt/docs/fastapi-people.md b/docs/pt/docs/fastapi-people.md
index 20061bfd93..93c3479f25 100644
--- a/docs/pt/docs/fastapi-people.md
+++ b/docs/pt/docs/fastapi-people.md
@@ -1,3 +1,8 @@
+---
+hide:
+ - navigation
+---
+
# Pessoas do FastAPI
FastAPI possue uma comunidade incrível que recebe pessoas de todos os níveis.
@@ -18,7 +23,7 @@ Este sou eu:
itsdangerous - Necessário para suporte a `SessionMiddleware`.
* pyyaml - Necessário para suporte a `SchemaGenerator` da Starlette (você provavelmente não precisará disso com o FastAPI).
* graphene - Necessário para suporte a `GraphQLApp`.
-* ujson - Necessário se você quer utilizar `UJSONResponse`.
Usados por FastAPI / Starlette:
* uvicorn - para o servidor que carrega e serve sua aplicação.
* orjson - Necessário se você quer utilizar `ORJSONResponse`.
+* ujson - Necessário se você quer utilizar `UJSONResponse`.
Você pode instalar todas essas dependências com `pip install fastapi[all]`.
diff --git a/docs/pt/docs/tutorial/body-multiple-params.md b/docs/pt/docs/tutorial/body-multiple-params.md
index 0eaa9664c0..7d0435a6ba 100644
--- a/docs/pt/docs/tutorial/body-multiple-params.md
+++ b/docs/pt/docs/tutorial/body-multiple-params.md
@@ -20,7 +20,7 @@ E você também pode declarar parâmetros de corpo como opcionais, definindo o v
{!> ../../../docs_src/body_multiple_params/tutorial001.py!}
```
-!!! nota
+!!! note "Nota"
Repare que, neste caso, o `item` que seria capturado a partir do corpo é opcional. Visto que ele possui `None` como valor padrão.
## Múltiplos parâmetros de corpo
@@ -69,7 +69,7 @@ Então, ele usará o nome dos parâmetros como chaves (nome dos campos) no corpo
}
```
-!!! nota
+!!! note "Nota"
Repare que mesmo que o `item` esteja declarado da mesma maneira que antes, agora é esperado que ele esteja dentro do corpo com uma chave `item`.
diff --git a/docs/pt/docs/tutorial/body-nested-models.md b/docs/pt/docs/tutorial/body-nested-models.md
index e039b09b2d..c9d0b8bb61 100644
--- a/docs/pt/docs/tutorial/body-nested-models.md
+++ b/docs/pt/docs/tutorial/body-nested-models.md
@@ -165,7 +165,7 @@ Isso vai esperar(converter, validar, documentar, etc) um corpo JSON tal qual:
}
```
-!!! Informação
+!!! info "informação"
Note como o campo `images` agora tem uma lista de objetos de image.
## Modelos profundamente aninhados
@@ -176,7 +176,7 @@ Você pode definir modelos profundamente aninhados de forma arbitrária:
{!../../../docs_src/body_nested_models/tutorial007.py!}
```
-!!! Informação
+!!! info "informação"
Note como `Offer` tem uma lista de `Item`s, que por sua vez possui opcionalmente uma lista `Image`s
## Corpos de listas puras
@@ -226,7 +226,7 @@ Neste caso, você aceitaria qualquer `dict`, desde que tenha chaves` int` com va
{!../../../docs_src/body_nested_models/tutorial009.py!}
```
-!!! Dica
+!!! tip "Dica"
Leve em condideração que o JSON só suporta `str` como chaves.
Mas o Pydantic tem conversão automática de dados.
diff --git a/docs/pt/docs/tutorial/body.md b/docs/pt/docs/tutorial/body.md
index 5901b84148..713bea2d19 100644
--- a/docs/pt/docs/tutorial/body.md
+++ b/docs/pt/docs/tutorial/body.md
@@ -162,4 +162,4 @@ Os parâmetros da função serão reconhecidos conforme abaixo:
## Sem o Pydantic
-Se você não quer utilizar os modelos Pydantic, você também pode utilizar o parâmetro **Body**. Veja a documentação para [Body - Parâmetros múltiplos: Valores singulares no body](body-multiple-params.md#singular-values-in-body){.internal-link target=_blank}.
+Se você não quer utilizar os modelos Pydantic, você também pode utilizar o parâmetro **Body**. Veja a documentação para [Body - Parâmetros múltiplos: Valores singulares no body](body-multiple-params.md#valores-singulares-no-corpo){.internal-link target=_blank}.
diff --git a/docs/pt/docs/tutorial/encoder.md b/docs/pt/docs/tutorial/encoder.md
index b9bfbf63bf..7a8d205155 100644
--- a/docs/pt/docs/tutorial/encoder.md
+++ b/docs/pt/docs/tutorial/encoder.md
@@ -38,5 +38,5 @@ O resultado de chamar a função é algo que pode ser codificado com o padrão d
A função não retorna um grande `str` contendo os dados no formato JSON (como uma string). Mas sim, retorna uma estrutura de dados padrão do Python (por exemplo, um `dict`) com valores e subvalores compatíveis com JSON.
-!!! nota
+!!! note "Nota"
`jsonable_encoder` é realmente usado pelo **FastAPI** internamente para converter dados. Mas também é útil em muitos outros cenários.
diff --git a/docs/pt/docs/tutorial/first-steps.md b/docs/pt/docs/tutorial/first-steps.md
index 9fcdaf91f2..619a686010 100644
--- a/docs/pt/docs/tutorial/first-steps.md
+++ b/docs/pt/docs/tutorial/first-steps.md
@@ -24,7 +24,7 @@ $ uvicorn main:app --reload
-!!! marque o "botão de Autorizar!"
+!!! check "Botão de Autorizar!"
Você já tem um novo "botão de autorizar!".
E seu *path operation* tem um pequeno cadeado no canto superior direito que você pode clicar.
@@ -61,7 +61,7 @@ E se você clicar, você terá um pequeno formulário de autorização para digi
-!!! nota
+!!! note "Nota"
Não importa o que você digita no formulário, não vai funcionar ainda. Mas nós vamos chegar lá.
Claro que este não é o frontend para os usuários finais, mas é uma ótima ferramenta automática para documentar interativamente toda sua API.
@@ -104,7 +104,7 @@ Então, vamos rever de um ponto de vista simplificado:
Neste exemplo, nós vamos usar o **OAuth2** com o fluxo de **Senha**, usando um token **Bearer**. Fazemos isso usando a classe `OAuth2PasswordBearer`.
-!!! informação
+!!! info "informação"
Um token "bearer" não é a única opção.
Mas é a melhor no nosso caso.
@@ -119,7 +119,7 @@ Quando nós criamos uma instância da classe `OAuth2PasswordBearer`, nós passam
{!../../../docs_src/security/tutorial001.py!}
```
-!!! dica
+!!! tip "Dica"
Esse `tokenUrl="token"` se refere a uma URL relativa que nós não criamos ainda. Como é uma URL relativa, é equivalente a `./token`.
Porque estamos usando uma URL relativa, se sua API estava localizada em `https://example.com/`, então irá referir-se à `https://example.com/token`. Mas se sua API estava localizada em `https://example.com/api/v1/`, então irá referir-se à `https://example.com/api/v1/token`.
@@ -130,7 +130,7 @@ Esse parâmetro não cria um endpoint / *path operation*, mas declara que a URL
Em breve também criaremos o atual path operation.
-!!! informação
+!!! info "informação"
Se você é um "Pythonista" muito rigoroso, você pode não gostar do estilo do nome do parâmetro `tokenUrl` em vez de `token_url`.
Isso ocorre porque está utilizando o mesmo nome que está nas especificações do OpenAPI. Então, se você precisa investigar mais sobre qualquer um desses esquemas de segurança, você pode simplesmente copiar e colar para encontrar mais informações sobre isso.
@@ -157,7 +157,7 @@ Esse dependência vai fornecer uma `str` que é atribuído ao parâmetro `token
A **FastAPI** saberá que pode usar essa dependência para definir um "esquema de segurança" no esquema da OpenAPI (e na documentação da API automática).
-!!! informação "Detalhes técnicos"
+!!! info "Detalhes técnicos"
**FastAPI** saberá que pode usar a classe `OAuth2PasswordBearer` (declarada na dependência) para definir o esquema de segurança na OpenAPI porque herda de `fastapi.security.oauth2.OAuth2`, que por sua vez herda de `fastapi.security.base.Securitybase`.
Todos os utilitários de segurança que se integram com OpenAPI (e na documentação da API automática) herdam de `SecurityBase`, é assim que **FastAPI** pode saber como integrá-los no OpenAPI.
diff --git a/docs/ru/docs/about/index.md b/docs/ru/docs/about/index.md
new file mode 100644
index 0000000000..1015b667a8
--- /dev/null
+++ b/docs/ru/docs/about/index.md
@@ -0,0 +1,3 @@
+# О проекте
+
+FastAPI: внутреннее устройство, повлиявшие технологии и всё такое прочее. 🤓
diff --git a/docs/ru/docs/async.md b/docs/ru/docs/async.md
index 4d3ce2adfe..20dbb108b4 100644
--- a/docs/ru/docs/async.md
+++ b/docs/ru/docs/async.md
@@ -468,7 +468,7 @@ Starlette (и **FastAPI**) основаны на
Ещё раз повторим, что все эти технические подробности полезны, только если вы специально их искали.
-В противном случае просто ознакомьтесь с основными принципами в разделе выше: Нет времени?.
+В противном случае просто ознакомьтесь с основными принципами в разделе выше: Нет времени?.
diff --git a/docs/ru/docs/deployment/concepts.md b/docs/ru/docs/deployment/concepts.md
index 771f4bf686..26db356c10 100644
--- a/docs/ru/docs/deployment/concepts.md
+++ b/docs/ru/docs/deployment/concepts.md
@@ -25,7 +25,7 @@
## Использование более безопасного протокола HTTPS
-В [предыдущей главе об HTTPS](./https.md){.internal-link target=_blank} мы рассмотрели, как HTTPS обеспечивает шифрование для вашего API.
+В [предыдущей главе об HTTPS](https.md){.internal-link target=_blank} мы рассмотрели, как HTTPS обеспечивает шифрование для вашего API.
Также мы заметили, что обычно для работы с HTTPS вашему приложению нужен **дополнительный** компонент - **прокси-сервер завершения работы TLS**.
@@ -187,7 +187,7 @@
### Процессы и порты́
-Помните ли Вы, как на странице [Об HTTPS](./https.md){.internal-link target=_blank} мы обсуждали, что на сервере только один процесс может слушать одну комбинацию IP-адреса и порта?
+Помните ли Вы, как на странице [Об HTTPS](https.md){.internal-link target=_blank} мы обсуждали, что на сервере только один процесс может слушать одну комбинацию IP-адреса и порта?
С тех пор ничего не изменилось.
@@ -241,7 +241,7 @@
!!! tip "Заметка"
Если вы не знаете, что такое **контейнеры**, Docker или Kubernetes, не переживайте.
- Я поведаю Вам о контейнерах, образах, Docker, Kubernetes и т.п. в главе: [FastAPI внутри контейнеров - Docker](./docker.md){.internal-link target=_blank}.
+ Я поведаю Вам о контейнерах, образах, Docker, Kubernetes и т.п. в главе: [FastAPI внутри контейнеров - Docker](docker.md){.internal-link target=_blank}.
## Шаги, предшествующие запуску
@@ -273,7 +273,7 @@
* При этом Вам всё ещё нужно найти способ - как запускать/перезапускать *такой* bash-скрипт, обнаруживать ошибки и т.п.
!!! tip "Заметка"
- Я приведу Вам больше конкретных примеров работы с контейнерами в главе: [FastAPI внутри контейнеров - Docker](./docker.md){.internal-link target=_blank}.
+ Я приведу Вам больше конкретных примеров работы с контейнерами в главе: [FastAPI внутри контейнеров - Docker](docker.md){.internal-link target=_blank}.
## Утилизация ресурсов
diff --git a/docs/ru/docs/deployment/docker.md b/docs/ru/docs/deployment/docker.md
index 78d3ec1b4d..ce4972c4f3 100644
--- a/docs/ru/docs/deployment/docker.md
+++ b/docs/ru/docs/deployment/docker.md
@@ -110,7 +110,7 @@ Docker является одним оз основных инструменто
Чаще всего это простой файл `requirements.txt` с построчным перечислением библиотек и их версий.
-При этом Вы, для выбора версий, будете использовать те же идеи, что упомянуты на странице [О версиях FastAPI](./versions.md){.internal-link target=_blank}.
+При этом Вы, для выбора версий, будете использовать те же идеи, что упомянуты на странице [О версиях FastAPI](versions.md){.internal-link target=_blank}.
Ваш файл `requirements.txt` может выглядеть как-то так:
@@ -374,7 +374,7 @@ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
## Концепции развёртывания
-Давайте вспомним о [Концепциях развёртывания](./concepts.md){.internal-link target=_blank} и применим их к контейнерам.
+Давайте вспомним о [Концепциях развёртывания](concepts.md){.internal-link target=_blank} и применим их к контейнерам.
Контейнеры - это, в основном, инструмент упрощающий **сборку и развёртывание** приложения и они не обязывают к применению какой-то определённой **концепции развёртывания**, а значит мы можем выбирать нужную стратегию.
@@ -447,7 +447,7 @@ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
Использование менеджера процессов (Gunicorn или Uvicorn) внутри контейнера только добавляет **излишнее усложнение**, так как управление следует осуществлять системой оркестрации.
-### Множество процессов внутри контейнера для особых случаев
+### Множество процессов внутри контейнера для особых случаев
Безусловно, бывают **особые случаи**, когда может понадобиться внутри контейнера запускать **менеджер процессов Gunicorn**, управляющий несколькими **процессами Uvicorn**.
@@ -515,9 +515,9 @@ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
## Официальный Docker-образ с Gunicorn и Uvicorn
-Я подготовил для вас Docker-образ, в который включён Gunicorn управляющий процессами (воркерами) Uvicorn, в соответствии с концепциями рассмотренными в предыдущей главе: [Рабочие процессы сервера (воркеры) - Gunicorn совместно с Uvicorn](./server-workers.md){.internal-link target=_blank}.
+Я подготовил для вас Docker-образ, в который включён Gunicorn управляющий процессами (воркерами) Uvicorn, в соответствии с концепциями рассмотренными в предыдущей главе: [Рабочие процессы сервера (воркеры) - Gunicorn совместно с Uvicorn](server-workers.md){.internal-link target=_blank}.
-Этот образ может быть полезен для ситуаций описанных тут: [Множество процессов внутри контейнера для особых случаев](#special-cases).
+Этот образ может быть полезен для ситуаций описанных тут: [Множество процессов внутри контейнера для особых случаев](#_11).
* tiangolo/uvicorn-gunicorn-fastapi.
@@ -578,7 +578,7 @@ COPY ./app /app/app
Если вы используете **Kubernetes** (или что-то вроде того), скорее всего вам **не нужно** использовать официальный Docker-образ (или другой похожий) в качестве основы, так как управление **количеством запущенных контейнеров** должно быть настроено на уровне кластера. В таком случае лучше **создать образ с нуля**, как описано в разделе Создать [Docker-образ для FastAPI](#docker-fastapi).
-Официальный образ может быть полезен в отдельных случаях, описанных выше в разделе [Множество процессов внутри контейнера для особых случаев](#special-cases). Например, если ваше приложение **достаточно простое**, не требует запуска в кластере и способно уместиться в один контейнер, то его настройки по умолчанию будут работать довольно хорошо. Или же вы развертываете его с помощью **Docker Compose**, работаете на одном сервере и т. д
+Официальный образ может быть полезен в отдельных случаях, описанных выше в разделе [Множество процессов внутри контейнера для особых случаев](#_11). Например, если ваше приложение **достаточно простое**, не требует запуска в кластере и способно уместиться в один контейнер, то его настройки по умолчанию будут работать довольно хорошо. Или же вы развертываете его с помощью **Docker Compose**, работаете на одном сервере и т. д
## Развёртывание образа контейнера
diff --git a/docs/ru/docs/deployment/versions.md b/docs/ru/docs/deployment/versions.md
index 91b9038e9f..f410e39368 100644
--- a/docs/ru/docs/deployment/versions.md
+++ b/docs/ru/docs/deployment/versions.md
@@ -42,7 +42,7 @@ fastapi>=0.45.0,<0.46.0
FastAPI следует соглашению в том, что любые изменения "ПАТЧ"-версии предназначены для исправления багов и внесения обратно совместимых изменений.
-!!! Подсказка
+!!! tip "Подсказка"
"ПАТЧ" - это последнее число. Например, в `0.2.3`, ПАТЧ-версия - это `3`.
Итак, вы можете закрепить версию следующим образом:
@@ -53,7 +53,7 @@ fastapi>=0.45.0,<0.46.0
Обратно несовместимые изменения и новые функции добавляются в "МИНОРНЫЕ" версии.
-!!! Подсказка
+!!! tip "Подсказка"
"МИНОРНАЯ" версия - это число в середине. Например, в `0.2.3` МИНОРНАЯ версия - это `2`.
## Обновление версий FastAPI
diff --git a/docs/ru/docs/fastapi-people.md b/docs/ru/docs/fastapi-people.md
index 0e42aab690..fa70d168e3 100644
--- a/docs/ru/docs/fastapi-people.md
+++ b/docs/ru/docs/fastapi-people.md
@@ -1,3 +1,7 @@
+---
+hide:
+ - navigation
+---
# Люди, поддерживающие FastAPI
@@ -19,7 +23,7 @@
python-multipart - Обязательно, если вы хотите поддерживать форму "парсинга" с помощью `request.form()`.
* itsdangerous - Обязательно, для поддержки `SessionMiddleware`.
* pyyaml - Обязательно, для поддержки `SchemaGenerator` Starlette (возможно, вам это не нужно с FastAPI).
-* ujson - Обязательно, если вы хотите использовать `UJSONResponse`.
Используется FastAPI / Starlette:
* uvicorn - сервер, который загружает и обслуживает ваше приложение.
* orjson - Обязательно, если вы хотите использовать `ORJSONResponse`.
+* ujson - Обязательно, если вы хотите использовать `UJSONResponse`.
Вы можете установить все это с помощью `pip install "fastapi[all]"`.
diff --git a/docs/ru/docs/tutorial/body-multiple-params.md b/docs/ru/docs/tutorial/body-multiple-params.md
index e52ef6f6f0..ffba1d0f4e 100644
--- a/docs/ru/docs/tutorial/body-multiple-params.md
+++ b/docs/ru/docs/tutorial/body-multiple-params.md
@@ -28,7 +28,7 @@
=== "Python 3.10+ non-Annotated"
- !!! Заметка
+ !!! tip "Заметка"
Рекомендуется использовать `Annotated` версию, если это возможно.
```Python hl_lines="17-19"
@@ -37,14 +37,14 @@
=== "Python 3.8+ non-Annotated"
- !!! Заметка
+ !!! tip "Заметка"
Рекомендуется использовать версию с `Annotated`, если это возможно.
```Python hl_lines="19-21"
{!> ../../../docs_src/body_multiple_params/tutorial001.py!}
```
-!!! Заметка
+!!! note "Заметка"
Заметьте, что в данном случае параметр `item`, который будет взят из тела запроса, необязателен. Так как было установлено значение `None` по умолчанию.
## Несколько параметров тела запроса
@@ -93,7 +93,7 @@
}
```
-!!! Внимание
+!!! note "Внимание"
Обратите внимание, что хотя параметр `item` был объявлен таким же способом, как и раньше, теперь предпологается, что он находится внутри тела с ключом `item`.
@@ -131,7 +131,7 @@
=== "Python 3.10+ non-Annotated"
- !!! Заметка
+ !!! tip "Заметка"
Рекомендуется использовать `Annotated` версию, если это возможно.
```Python hl_lines="20"
@@ -140,7 +140,7 @@
=== "Python 3.8+ non-Annotated"
- !!! Заметка
+ !!! tip "Заметка"
Рекомендуется использовать `Annotated` версию, если это возможно.
```Python hl_lines="22"
@@ -205,7 +205,7 @@ q: str | None = None
=== "Python 3.10+ non-Annotated"
- !!! Заметка
+ !!! tip "Заметка"
Рекомендуется использовать `Annotated` версию, если это возможно.
```Python hl_lines="25"
@@ -214,14 +214,14 @@ q: str | None = None
=== "Python 3.8+ non-Annotated"
- !!! Заметка
+ !!! tip "Заметка"
Рекомендуется использовать `Annotated` версию, если это возможно.
```Python hl_lines="27"
{!> ../../../docs_src/body_multiple_params/tutorial004.py!}
```
-!!! Информация
+!!! info "Информация"
`Body` также имеет все те же дополнительные параметры валидации и метаданных, как у `Query`,`Path` и других, которые вы увидите позже.
## Добавление одного body-параметра
@@ -258,7 +258,7 @@ item: Item = Body(embed=True)
=== "Python 3.10+ non-Annotated"
- !!! Заметка
+ !!! tip "Заметка"
Рекомендуется использовать `Annotated` версию, если это возможно.
```Python hl_lines="15"
@@ -267,7 +267,7 @@ item: Item = Body(embed=True)
=== "Python 3.8+ non-Annotated"
- !!! Заметка
+ !!! tip "Заметка"
Рекомендуется использовать `Annotated` версию, если это возможно.
```Python hl_lines="17"
diff --git a/docs/ru/docs/tutorial/body.md b/docs/ru/docs/tutorial/body.md
index 96f80af060..5d0e033fd0 100644
--- a/docs/ru/docs/tutorial/body.md
+++ b/docs/ru/docs/tutorial/body.md
@@ -162,4 +162,4 @@
## Без Pydantic
-Если вы не хотите использовать модели Pydantic, вы все еще можете использовать параметры **тела запроса**. Читайте в документации раздел [Тело - Несколько параметров: Единичные значения в теле](body-multiple-params.md#singular-values-in-body){.internal-link target=_blank}.
+Если вы не хотите использовать модели Pydantic, вы все еще можете использовать параметры **тела запроса**. Читайте в документации раздел [Тело - Несколько параметров: Единичные значения в теле](body-multiple-params.md#_2){.internal-link target=_blank}.
diff --git a/docs/ru/docs/tutorial/debugging.md b/docs/ru/docs/tutorial/debugging.md
index 38709e56df..5fc6a2c1f9 100644
--- a/docs/ru/docs/tutorial/debugging.md
+++ b/docs/ru/docs/tutorial/debugging.md
@@ -74,7 +74,7 @@ from myapp import app
не будет выполнена.
-!!! Информация
+!!! info "Информация"
Для получения дополнительной информации, ознакомьтесь с официальной документацией Python.
## Запуск вашего кода с помощью отладчика
diff --git a/docs/ru/docs/tutorial/dependencies/index.md b/docs/ru/docs/tutorial/dependencies/index.md
index ad6e835e5b..9fce46b973 100644
--- a/docs/ru/docs/tutorial/dependencies/index.md
+++ b/docs/ru/docs/tutorial/dependencies/index.md
@@ -84,13 +84,13 @@
И в конце она возвращает `dict`, содержащий эти значения.
-!!! Информация
+!!! info "Информация"
**FastAPI** добавил поддержку для `Annotated` (и начал её рекомендовать) в версии 0.95.0.
Если у вас более старая версия, будут ошибки при попытке использовать `Annotated`.
- Убедитесь, что вы [Обновили FastAPI версию](../../deployment/versions.md#upgrading-the-fastapi-versions){.internal-link target=_blank} до, как минимум 0.95.1, перед тем как использовать `Annotated`.
+ Убедитесь, что вы [Обновили FastAPI версию](../../deployment/versions.md#fastapi_2){.internal-link target=_blank} до, как минимум 0.95.1, перед тем как использовать `Annotated`.
### Import `Depends`
diff --git a/docs/ru/docs/tutorial/first-steps.md b/docs/ru/docs/tutorial/first-steps.md
index b46f235bc7..8a0876bb46 100644
--- a/docs/ru/docs/tutorial/first-steps.md
+++ b/docs/ru/docs/tutorial/first-steps.md
@@ -310,7 +310,7 @@ https://example.com/items/foo
```
!!! note "Технические детали"
- Если не знаете в чём разница, посмотрите [Конкурентность: *"Нет времени?"*](../async.md#in-a-hurry){.internal-link target=_blank}.
+ Если не знаете в чём разница, посмотрите [Конкурентность: *"Нет времени?"*](../async.md#_1){.internal-link target=_blank}.
### Шаг 5: верните результат
diff --git a/docs/ru/docs/tutorial/metadata.md b/docs/ru/docs/tutorial/metadata.md
index 468e089176..0c6940d0e5 100644
--- a/docs/ru/docs/tutorial/metadata.md
+++ b/docs/ru/docs/tutorial/metadata.md
@@ -65,7 +65,7 @@
```
!!! info "Дополнительная информация"
- Узнайте больше о тегах в [Конфигурации операции пути](path-operation-configuration.md#tags){.internal-link target=_blank}.
+ Узнайте больше о тегах в [Конфигурации операции пути](path-operation-configuration.md#_3){.internal-link target=_blank}.
### Проверьте документацию
diff --git a/docs/ru/docs/tutorial/path-params-numeric-validations.md b/docs/ru/docs/tutorial/path-params-numeric-validations.md
index bd2c29d0a0..0baf51fa90 100644
--- a/docs/ru/docs/tutorial/path-params-numeric-validations.md
+++ b/docs/ru/docs/tutorial/path-params-numeric-validations.md
@@ -47,7 +47,7 @@
Если вы используете более старую версию, вы столкнётесь с ошибками при попытке использовать `Annotated`.
- Убедитесь, что вы [обновили версию FastAPI](../deployment/versions.md#upgrading-the-fastapi-versions){.internal-link target=_blank} как минимум до 0.95.1 перед тем, как использовать `Annotated`.
+ Убедитесь, что вы [обновили версию FastAPI](../deployment/versions.md#fastapi_2){.internal-link target=_blank} как минимум до 0.95.1 перед тем, как использовать `Annotated`.
## Определите метаданные
diff --git a/docs/ru/docs/tutorial/query-params.md b/docs/ru/docs/tutorial/query-params.md
index 6e885cb656..f6e18f9712 100644
--- a/docs/ru/docs/tutorial/query-params.md
+++ b/docs/ru/docs/tutorial/query-params.md
@@ -77,7 +77,7 @@ http://127.0.0.1:8000/items/?skip=20
В этом случае, параметр `q` будет не обязательным и будет иметь значение `None` по умолчанию.
-!!! Важно
+!!! check "Важно"
Также обратите внимание, что **FastAPI** достаточно умён чтобы заметить, что параметр `item_id` является path-параметром, а `q` нет, поэтому, это параметр запроса.
## Преобразование типа параметра запроса
@@ -221,5 +221,5 @@ http://127.0.0.1:8000/items/foo-item?needy=sooooneedy
* `skip`, типа `int` и со значением по умолчанию `0`.
* `limit`, необязательный `int`.
-!!! подсказка
- Вы можете использовать класс `Enum` также, как ранее применяли его с [Path-параметрами](path-params.md#predefined-values){.internal-link target=_blank}.
+!!! tip "Подсказка"
+ Вы можете использовать класс `Enum` также, как ранее применяли его с [Path-параметрами](path-params.md#_7){.internal-link target=_blank}.
diff --git a/docs/ru/docs/tutorial/static-files.md b/docs/ru/docs/tutorial/static-files.md
index ec09eb5a3a..afe2075d94 100644
--- a/docs/ru/docs/tutorial/static-files.md
+++ b/docs/ru/docs/tutorial/static-files.md
@@ -11,7 +11,7 @@
{!../../../docs_src/static_files/tutorial001.py!}
```
-!!! заметка "Технические детали"
+!!! note "Технические детали"
Вы также можете использовать `from starlette.staticfiles import StaticFiles`.
**FastAPI** предоставляет `starlette.staticfiles` под псевдонимом `fastapi.staticfiles`, просто для вашего удобства, как разработчика. Но на самом деле это берётся напрямую из библиотеки Starlette.
diff --git a/docs/ru/docs/tutorial/testing.md b/docs/ru/docs/tutorial/testing.md
index ca47a6f51e..4772660dff 100644
--- a/docs/ru/docs/tutorial/testing.md
+++ b/docs/ru/docs/tutorial/testing.md
@@ -50,7 +50,7 @@
### Файл приложения **FastAPI**
-Допустим, структура файлов Вашего приложения похожа на ту, что описана на странице [Более крупные приложения](./bigger-applications.md){.internal-link target=_blank}:
+Допустим, структура файлов Вашего приложения похожа на ту, что описана на странице [Более крупные приложения](bigger-applications.md){.internal-link target=_blank}:
```
.
diff --git a/docs/tr/docs/advanced/index.md b/docs/tr/docs/advanced/index.md
new file mode 100644
index 0000000000..c0a566d126
--- /dev/null
+++ b/docs/tr/docs/advanced/index.md
@@ -0,0 +1,33 @@
+# Gelişmiş Kullanıcı Rehberi
+
+## Ek Özellikler
+
+[Tutorial - User Guide](../tutorial/index.md){.internal-link target=_blank} sayfası **FastAPI**'ın tüm ana özelliklerini tanıtmaya yetecektir.
+
+İlerleyen bölümlerde diğer seçenekler, konfigürasyonlar ve ek özellikleri göreceğiz.
+
+!!! tip "İpucu"
+ Sonraki bölümler **mutlaka "gelişmiş" olmak zorunda değildir**.
+
+ Kullanım şeklinize bağlı olarak, çözümünüz bu bölümlerden birinde olabilir.
+
+## Önce Öğreticiyi Okuyun
+
+[Tutorial - User Guide](../tutorial/index.md){.internal-link target=_blank} sayfasındaki bilgilerle **FastAPI**'nın çoğu özelliğini kullanabilirsiniz.
+
+Sonraki bölümler bu sayfayı okuduğunuzu ve bu ana fikirleri bildiğinizi varsayarak hazırlanmıştır.
+
+## Diğer Kurslar
+
+[Tutorial - User Guide](../tutorial/index.md){.internal-link target=_blank} sayfası ve bu **Gelişmiş Kullanıcı Rehberi**, öğretici bir kılavuz (bir kitap gibi) şeklinde yazılmıştır ve **FastAPI'ı öğrenmek** için yeterli olsa da, ek kurslarla desteklemek isteyebilirsiniz.
+
+Belki de öğrenme tarzınıza daha iyi uyduğu için başka kursları tercih edebilirsiniz.
+
+Bazı kurs sağlayıcıları ✨ [**FastAPI destekçileridir**](../help-fastapi.md#sponsor-the-author){.internal-link target=_blank} ✨, bu FastAPI ve **ekosisteminin** sürekli ve sağlıklı bir şekilde **gelişmesini** sağlar.
+
+Ayrıca, size **iyi bir öğrenme deneyimi** sağlamakla kalmayıp, **iyi ve sağlıklı bir framework** olan FastAPI'a ve ve **topluluğuna** (yani size) olan gerçek bağlılıklarını gösterir.
+
+Onların kurslarını denemek isteyebilirsiniz:
+
+* Talk Python Training
+* Test-Driven Development
diff --git a/docs/tr/docs/advanced/security/index.md b/docs/tr/docs/advanced/security/index.md
new file mode 100644
index 0000000000..89a4316871
--- /dev/null
+++ b/docs/tr/docs/advanced/security/index.md
@@ -0,0 +1,16 @@
+# Gelişmiş Güvenlik
+
+## Ek Özellikler
+
+[Tutorial - User Guide: Security](../../tutorial/security/index.md){.internal-link target=_blank} sayfasında ele alınanların dışında güvenlikle ilgili bazı ek özellikler vardır.
+
+!!! tip "İpucu"
+ Sonraki bölümler **mutlaka "gelişmiş" olmak zorunda değildir**.
+
+ Kullanım şeklinize bağlı olarak, çözümünüz bu bölümlerden birinde olabilir.
+
+## Önce Öğreticiyi Okuyun
+
+Sonraki bölümler [Tutorial - User Guide: Security](../../tutorial/security/index.md){.internal-link target=_blank} sayfasını okuduğunuzu varsayarak hazırlanmıştır.
+
+Bu bölümler aynı kavramlara dayanır, ancak bazı ek işlevsellikler sağlar.
diff --git a/docs/tr/docs/advanced/testing-websockets.md b/docs/tr/docs/advanced/testing-websockets.md
new file mode 100644
index 0000000000..cdd5b7ae50
--- /dev/null
+++ b/docs/tr/docs/advanced/testing-websockets.md
@@ -0,0 +1,12 @@
+# WebSockets'i Test Etmek
+
+WebSockets testi yapmak için `TestClient`'ı kullanabilirsiniz.
+
+Bu işlem için, `TestClient`'ı bir `with` ifadesinde kullanarak WebSocket'e bağlanabilirsiniz:
+
+```Python hl_lines="27-31"
+{!../../../docs_src/app_testing/tutorial002.py!}
+```
+
+!!! note "Not"
+ Daha fazla detay için Starlette'in Websockets'i Test Etmek dokümantasyonunu inceleyin.
diff --git a/docs/tr/docs/advanced/wsgi.md b/docs/tr/docs/advanced/wsgi.md
new file mode 100644
index 0000000000..54a6f20e29
--- /dev/null
+++ b/docs/tr/docs/advanced/wsgi.md
@@ -0,0 +1,37 @@
+# WSGI - Flask, Django ve Daha Fazlasını FastAPI ile Kullanma
+
+WSGI uygulamalarını [Sub Applications - Mounts](sub-applications.md){.internal-link target=_blank}, [Behind a Proxy](behind-a-proxy.md){.internal-link target=_blank} bölümlerinde gördüğünüz gibi bağlayabilirsiniz.
+
+Bunun için `WSGIMiddleware` ile Flask, Django vb. WSGI uygulamanızı sarmalayabilir ve FastAPI'ya bağlayabilirsiniz.
+
+## `WSGIMiddleware` Kullanımı
+
+`WSGIMiddleware`'ı projenize dahil edin.
+
+Ardından WSGI (örneğin Flask) uygulamanızı middleware ile sarmalayın.
+
+Son olarak da bir yol altında bağlama işlemini gerçekleştirin.
+
+```Python hl_lines="2-3 23"
+{!../../../docs_src/wsgi/tutorial001.py!}
+```
+
+## Kontrol Edelim
+
+Artık `/v1/` yolunun altındaki her istek Flask uygulaması tarafından işlenecektir.
+
+Geri kalanı ise **FastAPI** tarafından işlenecektir.
+
+Eğer uygulamanızı çalıştırıp http://localhost:8000/v1/ adresine giderseniz, Flask'tan gelen yanıtı göreceksiniz:
+
+```txt
+Hello, World from Flask!
+```
+
+Eğer http://localhost:8000/v2/ adresine giderseniz, FastAPI'dan gelen yanıtı göreceksiniz:
+
+```JSON
+{
+ "message": "Hello World"
+}
+```
diff --git a/docs/tr/docs/async.md b/docs/tr/docs/async.md
index aab939189e..c7bedffd15 100644
--- a/docs/tr/docs/async.md
+++ b/docs/tr/docs/async.md
@@ -21,7 +21,7 @@ async def read_results():
return results
```
-!!! not
+!!! note "Not"
Sadece `async def` ile tanımlanan fonksiyonlar içinde `await` kullanabilirsiniz.
---
@@ -376,7 +376,7 @@ FastAPI'ye (Starlette aracılığıyla) güç veren ve bu kadar etkileyici bir p
Yukarıda açıklanan şekilde çalışmayan başka bir asenkron framework'den geliyorsanız ve küçük bir performans kazancı (yaklaşık 100 nanosaniye) için "def" ile *path fonksiyonu* tanımlamaya alışkınsanız, **FastAPI**'de tam tersi olacağını unutmayın. Bu durumlarda, *path fonksiyonu* G/Ç engelleyen durum oluşturmadıkça "async def" kullanmak daha iyidir.
-Yine de, her iki durumda da, **FastAPI**'nin önceki frameworkden [hala daha hızlı](index.md#performance){.internal-link target=_blank} (veya en azından karşılaştırılabilir) olma olasılığı vardır.
+Yine de, her iki durumda da, **FastAPI**'nin önceki frameworkden [hala daha hızlı](index.md#performans){.internal-link target=_blank} (veya en azından karşılaştırılabilir) olma olasılığı vardır.
### Bagımlılıklar
diff --git a/docs/tr/docs/deployment/cloud.md b/docs/tr/docs/deployment/cloud.md
new file mode 100644
index 0000000000..5639567d4c
--- /dev/null
+++ b/docs/tr/docs/deployment/cloud.md
@@ -0,0 +1,17 @@
+# FastAPI Uygulamasını Bulut Sağlayıcılar Üzerinde Yayınlama
+
+FastAPI uygulamasını yayınlamak için hemen hemen **herhangi bir bulut sağlayıcıyı** kullanabilirsiniz.
+
+Büyük bulut sağlayıcıların çoğu FastAPI uygulamasını yayınlamak için kılavuzlara sahiptir.
+
+## Bulut Sağlayıcılar - Sponsorlar
+
+Bazı bulut sağlayıcılar ✨ [**FastAPI destekçileridir**](../help-fastapi.md#sponsor-the-author){.internal-link target=_blank} ✨, bu FastAPI ve **ekosisteminin** sürekli ve sağlıklı bir şekilde **gelişmesini** sağlar.
+
+Ayrıca, size **iyi servisler** sağlamakla kalmayıp, **iyi ve sağlıklı bir framework** olan FastAPI'a bağlılıklarını gösterir.
+
+Bu hizmetleri denemek ve kılavuzlarını incelemek isteyebilirsiniz:
+
+* Platform.sh
+* Porter
+* Coherence
diff --git a/docs/tr/docs/deployment/index.md b/docs/tr/docs/deployment/index.md
new file mode 100644
index 0000000000..e03bb4ee0e
--- /dev/null
+++ b/docs/tr/docs/deployment/index.md
@@ -0,0 +1,21 @@
+# Deployment (Yayınlama)
+
+**FastAPI** uygulamasını deploy etmek oldukça kolaydır.
+
+## Deployment Ne Anlama Gelir?
+
+Bir uygulamayı **deploy** etmek (yayınlamak), uygulamayı **kullanıcılara erişilebilir hale getirmek** için gerekli adımları gerçekleştirmek anlamına gelir.
+
+Bir **Web API** için bu süreç normalde uygulamayı **uzak bir makineye** yerleştirmeyi, iyi performans, kararlılık vb. özellikler sağlayan bir **sunucu programı** ile **kullanıcılarınızın** uygulamaya etkili ve kesintisiz bir şekilde **erişebilmesini** kapsar.
+
+Bu, kodu sürekli olarak değiştirdiğiniz, hata alıp hata giderdiğiniz, geliştirme sunucusunu durdurup yeniden başlattığınız vb. **geliştirme** aşamalarının tam tersidir.
+
+## Deployment Stratejileri
+
+Kullanım durumunuza ve kullandığınız araçlara bağlı olarak bir kaç farklı yol izleyebilirsiniz.
+
+Bir dizi araç kombinasyonunu kullanarak kendiniz **bir sunucu yayınlayabilirsiniz**, yayınlama sürecinin bir kısmını sizin için gerçekleştiren bir **bulut hizmeti** veya diğer olası seçenekleri kullanabilirsiniz.
+
+**FastAPI** uygulamasını yayınlarken aklınızda bulundurmanız gereken ana kavramlardan bazılarını size göstereceğim (ancak bunların çoğu diğer web uygulamaları için de geçerlidir).
+
+Sonraki bölümlerde akılda tutulması gereken diğer ayrıntıları ve yayınlama tekniklerinden bazılarını göreceksiniz. ✨
diff --git a/docs/tr/docs/features.md b/docs/tr/docs/features.md
index 1cda8c7fbc..b964aba4d1 100644
--- a/docs/tr/docs/features.md
+++ b/docs/tr/docs/features.md
@@ -1,3 +1,8 @@
+---
+hide:
+ - navigation
+---
+
# Özelikler
## FastAPI özellikleri
diff --git a/docs/tr/docs/how-to/general.md b/docs/tr/docs/how-to/general.md
new file mode 100644
index 0000000000..cbfa7beb27
--- /dev/null
+++ b/docs/tr/docs/how-to/general.md
@@ -0,0 +1,39 @@
+# Genel - Nasıl Yapılır - Tarifler
+
+Bu sayfada genel ve sıkça sorulan sorular için dokümantasyonun diğer sayfalarına yönlendirmeler bulunmaktadır.
+
+## Veri Filtreleme - Güvenlik
+
+Döndürmeniz gereken veriden fazlasını döndürmediğinizden emin olmak için, [Tutorial - Response Model - Return Type](../tutorial/response-model.md){.internal-link target=_blank} sayfasını okuyun.
+
+## Dokümantasyon Etiketleri - OpenAPI
+
+*Yol operasyonlarınıza* etiketler ekleyerek dokümantasyon arayüzünde gruplar halinde görünmesini sağlamak için, [Tutorial - Path Operation Configurations - Tags](../tutorial/path-operation-configuration.md#tags){.internal-link target=_blank} sayfasını okuyun.
+
+## Dokümantasyon Özeti ve Açıklaması - OpenAPI
+
+*Yol operasyonlarınıza* özet ve açıklama ekleyip dokümantasyon arayüzünde görünmesini sağlamak için, [Tutorial - Path Operation Configurations - Summary and Description](../tutorial/path-operation-configuration.md#summary-and-description){.internal-link target=_blank} sayfasını okuyun.
+
+## Yanıt Açıklaması Dokümantasyonu - OpenAPI
+
+Dokümantasyon arayüzünde yer alan yanıt açıklamasını tanımlamak için, [Tutorial - Path Operation Configurations - Response description](../tutorial/path-operation-configuration.md#response-description){.internal-link target=_blank} sayfasını okuyun.
+
+## *Yol Operasyonunu* Kullanımdan Kaldırma - OpenAPI
+
+Bir *yol işlemi*ni kullanımdan kaldırmak ve bunu dokümantasyon arayüzünde göstermek için, [Tutorial - Path Operation Configurations - Deprecation](../tutorial/path-operation-configuration.md#deprecate-a-path-operation){.internal-link target=_blank} sayfasını okuyun.
+
+## Herhangi Bir Veriyi JSON Uyumlu Hale Getirme
+
+Herhangi bir veriyi JSON uyumlu hale getirmek için, [Tutorial - JSON Compatible Encoder](../tutorial/encoder.md){.internal-link target=_blank} sayfasını okuyun.
+
+## OpenAPI Meta Verileri - Dokümantasyon
+
+OpenAPI şemanıza lisans, sürüm, iletişim vb. meta veriler eklemek için, [Tutorial - Metadata and Docs URLs](../tutorial/metadata.md){.internal-link target=_blank} sayfasını okuyun.
+
+## OpenAPI Bağlantı Özelleştirme
+
+OpenAPI bağlantısını özelleştirmek (veya kaldırmak) için, [Tutorial - Metadata and Docs URLs](../tutorial/metadata.md#openapi-url){.internal-link target=_blank} sayfasını okuyun.
+
+## OpenAPI Dokümantasyon Bağlantıları
+
+Dokümantasyonu arayüzünde kullanılan bağlantıları güncellemek için, [Tutorial - Metadata and Docs URLs](../tutorial/metadata.md#docs-urls){.internal-link target=_blank} sayfasını okuyun.
diff --git a/docs/tr/docs/index.md b/docs/tr/docs/index.md
index afbb27f7df..4b9c0705d3 100644
--- a/docs/tr/docs/index.md
+++ b/docs/tr/docs/index.md
@@ -1,3 +1,12 @@
+---
+hide:
+ - navigation
+---
+
+
+
@@ -27,7 +36,7 @@
---
-FastAPI, Python 3.8+'nin standart tip belirteçlerine dayalı, modern ve hızlı (yüksek performanslı) API'lar oluşturmak için kullanılabilecek web framework'tür.
+FastAPI, Python 'nin standart tip belirteçlerine dayalı, modern ve hızlı (yüksek performanslı) API'lar oluşturmak için kullanılabilecek web framework'tür.
Temel özellikleri şunlardır:
@@ -115,8 +124,6 @@ Eğer API yerine, terminalde kullanılmak üzere bir Starlette.
@@ -331,7 +338,7 @@ Bu işlemi standart modern Python tipleriyle yapıyoruz.
Yeni bir sözdizimi yapısını, bir kütüphane özel metod veya sınıfları öğrenmeye gerek yoktur.
-Hepsi sadece **Python 3.8+** standartlarına dayalıdır.
+Hepsi sadece **Python** standartlarına dayalıdır.
Örnek olarak, `int` tanımlamak için:
@@ -456,12 +463,12 @@ Starlette tarafında kullanılan:
* python-multipart - Eğer `request.form()` ile form dönüşümü desteğini kullanacaksanız gereklidir.
* itsdangerous - `SessionMiddleware` desteği için gerekli.
* pyyaml - `SchemaGenerator` desteği için gerekli (Muhtemelen FastAPI kullanırken ihtiyacınız olmaz).
-* ujson - `UJSONResponse` kullanacaksanız gerekli.
Hem FastAPI hem de Starlette tarafından kullanılan:
* uvicorn - oluşturduğumuz uygulamayı servis edecek web sunucusu görevini üstlenir.
* orjson - `ORJSONResponse` kullanacaksanız gereklidir.
+* ujson - `UJSONResponse` kullanacaksanız gerekli.
Bunların hepsini `pip install fastapi[all]` ile yükleyebilirsin.
diff --git a/docs/tr/docs/python-types.md b/docs/tr/docs/python-types.md
index a0d32c86e5..ac31111367 100644
--- a/docs/tr/docs/python-types.md
+++ b/docs/tr/docs/python-types.md
@@ -12,7 +12,7 @@ Bu pythonda tip belirteçleri için **hızlı bir başlangıç / bilgi tazeleme
**FastAPI** kullanmayacak olsanız bile tür belirteçleri hakkında bilgi edinmenizde fayda var.
-!!! not
+!!! note "Not"
Python uzmanıysanız ve tip belirteçleri ilgili her şeyi zaten biliyorsanız, sonraki bölüme geçin.
## Motivasyon
@@ -172,7 +172,7 @@ Liste, bazı dahili tipleri içeren bir tür olduğundan, bunları köşeli para
{!../../../docs_src/python_types/tutorial006.py!}
```
-!!! ipucu
+!!! tip "Ipucu"
Köşeli parantez içindeki bu dahili tiplere "tip parametreleri" denir.
Bu durumda `str`, `List`e iletilen tür parametresidir.
diff --git a/docs/tr/docs/tutorial/cookie-params.md b/docs/tr/docs/tutorial/cookie-params.md
new file mode 100644
index 0000000000..4a66f26ebd
--- /dev/null
+++ b/docs/tr/docs/tutorial/cookie-params.md
@@ -0,0 +1,97 @@
+# Çerez (Cookie) Parametreleri
+
+`Query` (Sorgu) ve `Path` (Yol) parametrelerini tanımladığınız şekilde çerez parametreleri tanımlayabilirsiniz.
+
+## Import `Cookie`
+
+Öncelikle, `Cookie`'yi projenize dahil edin:
+
+=== "Python 3.10+"
+
+ ```Python hl_lines="3"
+ {!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!}
+ ```
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="3"
+ {!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!}
+ ```
+
+=== "Python 3.8+"
+
+ ```Python hl_lines="3"
+ {!> ../../../docs_src/cookie_params/tutorial001_an.py!}
+ ```
+
+=== "Python 3.10+ non-Annotated"
+
+ !!! tip "İpucu"
+ Mümkün mertebe 'Annotated' sınıfını kullanmaya çalışın.
+
+ ```Python hl_lines="1"
+ {!> ../../../docs_src/cookie_params/tutorial001_py310.py!}
+ ```
+
+=== "Python 3.8+ non-Annotated"
+
+ !!! tip "İpucu"
+ Mümkün mertebe 'Annotated' sınıfını kullanmaya çalışın.
+
+ ```Python hl_lines="3"
+ {!> ../../../docs_src/cookie_params/tutorial001.py!}
+ ```
+
+## `Cookie` Parametrelerini Tanımlayın
+
+Çerez parametrelerini `Path` veya `Query` tanımlaması yapar gibi tanımlayın.
+
+İlk değer varsayılan değerdir; tüm ekstra doğrulama veya belirteç parametrelerini kullanabilirsiniz:
+
+=== "Python 3.10+"
+
+ ```Python hl_lines="9"
+ {!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!}
+ ```
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="9"
+ {!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!}
+ ```
+
+=== "Python 3.8+"
+
+ ```Python hl_lines="10"
+ {!> ../../../docs_src/cookie_params/tutorial001_an.py!}
+ ```
+
+=== "Python 3.10+ non-Annotated"
+
+ !!! tip "İpucu"
+ Mümkün mertebe 'Annotated' sınıfını kullanmaya çalışın.
+
+ ```Python hl_lines="7"
+ {!> ../../../docs_src/cookie_params/tutorial001_py310.py!}
+ ```
+
+=== "Python 3.8+ non-Annotated"
+
+ !!! tip "İpucu"
+ Mümkün mertebe 'Annotated' sınıfını kullanmaya çalışın.
+
+ ```Python hl_lines="9"
+ {!> ../../../docs_src/cookie_params/tutorial001.py!}
+ ```
+
+!!! note "Teknik Detaylar"
+ `Cookie` sınıfı `Path` ve `Query` sınıflarının kardeşidir. Diğerleri gibi `Param` sınıfını miras alan bir sınıftır.
+
+ Ancak `fastapi`'dan projenize dahil ettiğiniz `Query`, `Path`, `Cookie` ve diğerleri aslında özel sınıflar döndüren birer fonksiyondur.
+
+!!! info "Bilgi"
+ Çerez tanımlamak için `Cookie` sınıfını kullanmanız gerekmektedir, aksi taktirde parametreler sorgu parametreleri olarak yorumlanır.
+
+## Özet
+
+Çerez tanımlamalarını `Cookie` sınıfını kullanarak `Query` ve `Path` tanımlar gibi tanımlayın.
diff --git a/docs/tr/docs/tutorial/query-params.md b/docs/tr/docs/tutorial/query-params.md
index aa3915557c..682f8332c8 100644
--- a/docs/tr/docs/tutorial/query-params.md
+++ b/docs/tr/docs/tutorial/query-params.md
@@ -224,4 +224,4 @@ Bu durumda, 3 tane sorgu parametresi var olacaktır:
* `limit`, isteğe bağlı bir `int`.
!!! tip "İpucu"
- Ayrıca, [Yol Parametrelerinde](path-params.md#predefined-values){.internal-link target=_blank} de kullanıldığı şekilde `Enum` sınıfından faydalanabilirsiniz.
+ Ayrıca, [Yol Parametrelerinde](path-params.md#on-tanml-degerler){.internal-link target=_blank} de kullanıldığı şekilde `Enum` sınıfından faydalanabilirsiniz.
diff --git a/docs/tr/docs/tutorial/request-forms.md b/docs/tr/docs/tutorial/request-forms.md
new file mode 100644
index 0000000000..2728b6164c
--- /dev/null
+++ b/docs/tr/docs/tutorial/request-forms.md
@@ -0,0 +1,92 @@
+# Form Verisi
+
+İstek gövdesinde JSON verisi yerine form alanlarını karşılamanız gerketiğinde `Form` sınıfını kullanabilirsiniz.
+
+!!! info "Bilgi"
+ Formları kullanmak için öncelikle `python-multipart` paketini indirmeniz gerekmektedir.
+
+ Örneğin `pip install python-multipart`.
+
+## `Form` Sınıfını Projenize Dahil Edin
+
+`Form` sınıfını `fastapi`'den projenize dahil edin:
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="3"
+ {!> ../../../docs_src/request_forms/tutorial001_an_py39.py!}
+ ```
+
+=== "Python 3.8+"
+
+ ```Python hl_lines="1"
+ {!> ../../../docs_src/request_forms/tutorial001_an.py!}
+ ```
+
+=== "Python 3.8+ non-Annotated"
+
+ !!! tip
+ Prefer to use the `Annotated` version if possible.
+
+ ```Python hl_lines="1"
+ {!> ../../../docs_src/request_forms/tutorial001.py!}
+ ```
+
+## `Form` Parametrelerini Tanımlayın
+
+Form parametrelerini `Body` veya `Query` için yaptığınız gibi oluşturun:
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="9"
+ {!> ../../../docs_src/request_forms/tutorial001_an_py39.py!}
+ ```
+
+=== "Python 3.8+"
+
+ ```Python hl_lines="8"
+ {!> ../../../docs_src/request_forms/tutorial001_an.py!}
+ ```
+
+=== "Python 3.8+ non-Annotated"
+
+ !!! tip
+ Prefer to use the `Annotated` version if possible.
+
+ ```Python hl_lines="7"
+ {!> ../../../docs_src/request_forms/tutorial001.py!}
+ ```
+
+Örneğin, OAuth2 spesifikasyonunun kullanılabileceği ("şifre akışı" olarak adlandırılan) yollardan birinde, form alanları olarak "username" ve "password" gönderilmesi gerekir.
+
+Bu spesifikasyon form alanlarını adlandırırken isimlerinin birebir `username` ve `password` olmasını ve JSON verisi yerine form verisi olarak gönderilmesini gerektirir.
+
+`Form` sınıfıyla tanımlama yaparken `Body`, `Query`, `Path` ve `Cookie` sınıflarında kullandığınız aynı validasyon, örnekler, isimlendirme (örneğin `username` yerine `user-name` kullanımı) ve daha fazla konfigurasyonu kullanabilirsiniz.
+
+!!! info "Bilgi"
+ `Form` doğrudan `Body` sınıfını miras alan bir sınıftır.
+
+!!! tip "İpucu"
+ Form gövdelerini tanımlamak için `Form` sınıfını kullanmanız gerekir; çünkü bu olmadan parametreler sorgu parametreleri veya gövde (JSON) parametreleri olarak yorumlanır.
+
+## "Form Alanları" Hakkında
+
+HTML formlarının (``) verileri sunucuya gönderirken JSON'dan farklı özel bir kodlama kullanır.
+
+**FastAPI** bu verilerin JSON yerine doğru şekilde okunmasını sağlayacaktır.
+
+!!! note "Teknik Detaylar"
+ Form verileri normalde `application/x-www-form-urlencoded` medya tipiyle kodlanır.
+
+ Ancak form içerisinde dosyalar yer aldığında `multipart/form-data` olarak kodlanır. Bir sonraki bölümde dosyaların işlenmesi hakkında bilgi edineceksiniz.
+
+ Form kodlama türleri ve form alanları hakkında daha fazla bilgi edinmek istiyorsanız MDN web docs for POST sayfasını ziyaret edebilirsiniz.
+
+!!! warning "Uyarı"
+ *Yol operasyonları* içerisinde birden fazla `Form` parametresi tanımlayabilirsiniz ancak bunlarla birlikte JSON verisi kabul eden `Body` alanları tanımlayamazsınız çünkü bu durumda istek gövdesi `application/json` yerine `application/x-www-form-urlencoded` ile kodlanmış olur.
+
+ Bu **FastAPI**'ın getirdiği bir kısıtlama değildir, HTTP protokolünün bir parçasıdır.
+
+## Özet
+
+Form verisi girdi parametreleri tanımlamak için `Form` sınıfını kullanın.
diff --git a/docs/tr/docs/tutorial/static-files.md b/docs/tr/docs/tutorial/static-files.md
new file mode 100644
index 0000000000..00c833686c
--- /dev/null
+++ b/docs/tr/docs/tutorial/static-files.md
@@ -0,0 +1,39 @@
+# Statik Dosyalar
+
+`StaticFiles`'ı kullanarak statik dosyaları bir yol altında sunabilirsiniz.
+
+## `StaticFiles` Kullanımı
+
+* `StaticFiles` sınıfını projenize dahil edin.
+* Bir `StaticFiles()` örneğini belirli bir yola bağlayın.
+
+```Python hl_lines="2 6"
+{!../../../docs_src/static_files/tutorial001.py!}
+```
+
+!!! note "Teknik Detaylar"
+ Projenize dahil etmek için `from starlette.staticfiles import StaticFiles` kullanabilirsiniz.
+
+ **FastAPI**, geliştiricilere kolaylık sağlamak amacıyla `starlette.staticfiles`'ı `fastapi.staticfiles` olarak sağlar. Ancak `StaticFiles` sınıfı aslında doğrudan Starlette'den gelir.
+
+### Bağlama (Mounting) Nedir?
+
+"Bağlamak", belirli bir yola tamamen "bağımsız" bir uygulama eklemek anlamına gelir ve ardından tüm alt yollara gelen istekler bu uygulama tarafından işlenir.
+
+Bu, bir `APIRouter` kullanmaktan farklıdır çünkü bağlanmış bir uygulama tamamen bağımsızdır. Ana uygulamanızın OpenAPI ve dokümanlar, bağlanmış uygulamadan hiçbir şey içermez, vb.
+
+[Advanced User Guide](../advanced/index.md){.internal-link target=_blank} bölümünde daha fazla bilgi edinebilirsiniz.
+
+## Detaylar
+
+`"/static"` ifadesi, bu "alt uygulamanın" "bağlanacağı" alt yolu belirtir. Bu nedenle, `"/static"` ile başlayan her yol, bu uygulama tarafından işlenir.
+
+`directory="static"` ifadesi, statik dosyalarınızı içeren dizinin adını belirtir.
+
+`name="static"` ifadesi, alt uygulamanın **FastAPI** tarafından kullanılacak ismini belirtir.
+
+Bu parametrelerin hepsi "`static`"den farklı olabilir, bunları kendi uygulamanızın ihtiyaçlarına göre belirleyebilirsiniz.
+
+## Daha Fazla Bilgi
+
+Daha fazla detay ve seçenek için Starlette'in Statik Dosyalar hakkındaki dokümantasyonunu incelleyin.
diff --git a/docs/uk/docs/alternatives.md b/docs/uk/docs/alternatives.md
index bdb62513e0..16cc0d875e 100644
--- a/docs/uk/docs/alternatives.md
+++ b/docs/uk/docs/alternatives.md
@@ -30,11 +30,11 @@
Це був один із перших прикладів **автоматичної документації API**, і саме це була одна з перших ідей, яка надихнула на «пошук» **FastAPI**.
-!!! Примітка
+!!! note "Примітка"
Django REST Framework створив Том Крісті. Той самий творець Starlette і Uvicorn, на яких базується **FastAPI**.
-!!! Перегляньте "Надихнуло **FastAPI** на"
+!!! check "Надихнуло **FastAPI** на"
Мати автоматичний веб-інтерфейс документації API.
### Flask
@@ -51,7 +51,7 @@ Flask — це «мікрофреймворк», він не включає ін
Враховуючи простоту Flask, він здавався хорошим підходом для створення API. Наступним, що знайшов, був «Django REST Framework» для Flask.
-!!! Переглянте "Надихнуло **FastAPI** на"
+!!! check "Надихнуло **FastAPI** на"
Бути мікрофреймоворком. Зробити легким комбінування та поєднання необхідних інструментів та частин.
Мати просту та легку у використанні систему маршрутизації.
@@ -91,7 +91,7 @@ def read_url():
Зверніть увагу на схожість у `requests.get(...)` і `@app.get(...)`.
-!!! Перегляньте "Надихнуло **FastAPI** на"
+!!! check "Надихнуло **FastAPI** на"
* Майте простий та інтуїтивно зрозумілий API.
* Використовуйте імена (операції) методів HTTP безпосередньо, простим та інтуїтивно зрозумілим способом.
* Розумні параметри за замовчуванням, але потужні налаштування.
@@ -109,7 +109,7 @@ def read_url():
Тому, коли говорять про версію 2.0, прийнято говорити «Swagger», а про версію 3+ «OpenAPI».
-!!! Перегляньте "Надихнуло **FastAPI** на"
+!!! check "Надихнуло **FastAPI** на"
Прийняти і використовувати відкритий стандарт для специфікацій API замість спеціальної схеми.
Інтегрувати інструменти інтерфейсу на основі стандартів:
@@ -135,7 +135,7 @@ Marshmallow створено для забезпечення цих функці
Але він був створений до того, як існували підказки типу Python. Отже, щоб визначити кожну схему, вам потрібно використовувати спеціальні утиліти та класи, надані Marshmallow.
-!!! Перегляньте "Надихнуло **FastAPI** на"
+!!! check "Надихнуло **FastAPI** на"
Використовувати код для автоматичного визначення "схем", які надають типи даних і перевірку.
### Webargs
@@ -148,10 +148,10 @@ Webargs — це інструмент, створений, щоб забезпе
Це чудовий інструмент, і я також часто використовував його, перш ніж створити **FastAPI**.
-!!! Інформація
+!!! info "Інформація"
Webargs був створений тими ж розробниками Marshmallow.
-!!! Перегляньте "Надихнуло **FastAPI** на"
+!!! check "Надихнуло **FastAPI** на"
Мати автоматичну перевірку даних вхідного запиту.
### APISpec
@@ -172,11 +172,11 @@ Marshmallow і Webargs забезпечують перевірку, аналіз
Редактор тут нічим не може допомогти. І якщо ми змінимо параметри чи схеми Marshmallow і забудемо також змінити цю строку документа YAML, згенерована схема буде застарілою.
-!!! Інформація
+!!! info "Інформація"
APISpec був створений тими ж розробниками Marshmallow.
-!!! Перегляньте "Надихнуло **FastAPI** на"
+!!! check "Надихнуло **FastAPI** на"
Підтримувати відкритий стандарт API, OpenAPI.
### Flask-apispec
@@ -199,10 +199,10 @@ Marshmallow і Webargs забезпечують перевірку, аналіз
І ці самі генератори повного стеку були основою [**FastAPI** генераторів проектів](project-generation.md){.internal-link target=_blank}.
-!!! Інформація
+!!! info "Інформація"
Flask-apispec був створений тими ж розробниками Marshmallow.
-!!! Перегляньте "Надихнуло **FastAPI** на"
+!!! check "Надихнуло **FastAPI** на"
Створення схеми OpenAPI автоматично з того самого коду, який визначає серіалізацію та перевірку.
### NestJS (та Angular)
@@ -219,7 +219,7 @@ Marshmallow і Webargs забезпечують перевірку, аналіз
Він не дуже добре обробляє вкладені моделі. Отже, якщо тіло JSON у запиті є об’єктом JSON із внутрішніми полями, які, у свою чергу, є вкладеними об’єктами JSON, його неможливо належним чином задокументувати та перевірити.
-!!! Перегляньте "Надихнуло **FastAPI** на"
+!!! check "Надихнуло **FastAPI** на"
Використовувати типи Python, щоб мати чудову підтримку редактора.
Мати потужну систему впровадження залежностей. Знайдіть спосіб звести до мінімуму повторення коду.
@@ -228,12 +228,12 @@ Marshmallow і Webargs забезпечують перевірку, аналіз
Це був один із перших надзвичайно швидких фреймворків Python на основі `asyncio`. Він був дуже схожий на Flask.
-!!! Примітка "Технічні деталі"
+!!! note "Технічні деталі"
Він використовував `uvloop` замість стандартного циклу Python `asyncio`. Ось що зробило його таким швидким.
Це явно надихнуло Uvicorn і Starlette, які зараз швидші за Sanic у відкритих тестах.
-!!! Перегляньте "Надихнуло **FastAPI** на"
+!!! check "Надихнуло **FastAPI** на"
Знайти спосіб отримати божевільну продуктивність.
Ось чому **FastAPI** базується на Starlette, оскільки це найшвидша доступна структура (перевірена тестами сторонніх розробників).
@@ -246,7 +246,7 @@ Falcon — ще один високопродуктивний фреймворк
Таким чином, перевірка даних, серіалізація та документація повинні виконуватися в коді, а не автоматично. Або вони повинні бути реалізовані як фреймворк поверх Falcon, як Hug. Така сама відмінність спостерігається в інших фреймворках, натхненних дизайном Falcon, що мають один об’єкт запиту та один об’єкт відповіді як параметри.
-!!! Перегляньте "Надихнуло **FastAPI** на"
+!!! check "Надихнуло **FastAPI** на"
Знайти способи отримати чудову продуктивність.
Разом із Hug (оскільки Hug базується на Falcon) надихнув **FastAPI** оголосити параметр `response` у функціях.
@@ -269,7 +269,7 @@ Falcon — ще один високопродуктивний фреймворк
Маршрути оголошуються в одному місці з використанням функцій, оголошених в інших місцях (замість використання декораторів, які можна розмістити безпосередньо поверх функції, яка обробляє кінцеву точку). Це ближче до того, як це робить Django, ніж до Flask (і Starlette). Він розділяє в коді речі, які відносно тісно пов’язані.
-!!! Перегляньте "Надихнуло **FastAPI** на"
+!!! check "Надихнуло **FastAPI** на"
Визначити додаткові перевірки для типів даних, використовуючи значення "за замовчуванням" атрибутів моделі. Це покращує підтримку редактора, а раніше вона була недоступна в Pydantic.
Це фактично надихнуло оновити частини Pydantic, щоб підтримувати той самий стиль оголошення перевірки (всі ці функції вже доступні в Pydantic).
@@ -288,10 +288,10 @@ Hug був одним із перших фреймворків, який реа
Оскільки він заснований на попередньому стандарті для синхронних веб-фреймворків Python (WSGI), він не може працювати з Websockets та іншими речами, хоча він також має високу продуктивність.
-!!! Інформація
+!!! info "Інформація"
Hug створив Тімоті Крослі, той самий творець `isort`, чудовий інструмент для автоматичного сортування імпорту у файлах Python.
-!!! Перегляньте "Надихнуло **FastAPI** на"
+!!! check "Надихнуло **FastAPI** на"
Hug надихнув частину APIStar і був одним із найбільш перспективних інструментів, поряд із APIStar.
Hug надихнув **FastAPI** на використання підказок типу Python для оголошення параметрів і автоматичного створення схеми, що визначає API.
@@ -322,14 +322,14 @@ Hug був одним із перших фреймворків, який реа
Тепер APIStar — це набір інструментів для перевірки специфікацій OpenAPI, а не веб-фреймворк.
-!!! Інформація
+!!! info "Інформація"
APIStar створив Том Крісті. Той самий хлопець, який створив:
* Django REST Framework
* Starlette (на якому базується **FastAPI**)
* Uvicorn (використовується Starlette і **FastAPI**)
-!!! Перегляньте "Надихнуло **FastAPI** на"
+!!! check "Надихнуло **FastAPI** на"
Існувати.
Ідею оголошення кількох речей (перевірки даних, серіалізації та документації) за допомогою тих самих типів Python, які в той же час забезпечували чудову підтримку редактора, я вважав геніальною ідеєю.
@@ -348,7 +348,7 @@ Pydantic — це бібліотека для визначення переві
Його можна порівняти з Marshmallow. Хоча він швидший за Marshmallow у тестах. Оскільки він базується на тих самих підказках типу Python, підтримка редактора чудова.
-!!! Перегляньте "**FastAPI** використовує його для"
+!!! check "**FastAPI** використовує його для"
Виконання перевірки всіх даних, серіалізації даних і автоматичної документацію моделі (на основі схеми JSON).
Потім **FastAPI** бере ці дані схеми JSON і розміщує їх у OpenAPI, окремо від усіх інших речей, які він робить.
@@ -380,12 +380,12 @@ Starlette надає всі основні функції веб-мікрофр
Це одна з головних речей, які **FastAPI** додає зверху, все на основі підказок типу Python (з використанням Pydantic). Це, а також система впровадження залежностей, утиліти безпеки, створення схеми OpenAPI тощо.
-!!! Примітка "Технічні деталі"
+!!! note "Технічні деталі"
ASGI — це новий «стандарт», який розробляється членами основної команди Django. Це ще не «стандарт Python» (PEP), хоча вони в процесі цього.
Тим не менш, він уже використовується як «стандарт» кількома інструментами. Це значно покращує сумісність, оскільки ви можете переключити Uvicorn на будь-який інший сервер ASGI (наприклад, Daphne або Hypercorn), або ви можете додати інструменти, сумісні з ASGI, як-от `python-socketio`.
-!!! Перегляньте "**FastAPI** використовує його для"
+!!! check "**FastAPI** використовує його для"
Керування всіма основними веб-частинами. Додавання функцій зверху.
Сам клас `FastAPI` безпосередньо успадковує клас `Starlette`.
@@ -400,7 +400,7 @@ Uvicorn — це блискавичний сервер ASGI, побудован
Це рекомендований сервер для Starlette і **FastAPI**.
-!!! Перегляньте "**FastAPI** рекомендує це як"
+!!! check "**FastAPI** рекомендує це як"
Основний веб-сервер для запуску програм **FastAPI**.
Ви можете поєднати його з Gunicorn, щоб мати асинхронний багатопроцесний сервер.
diff --git a/docs/uk/docs/fastapi-people.md b/docs/uk/docs/fastapi-people.md
index f7d0220b59..152a7b0980 100644
--- a/docs/uk/docs/fastapi-people.md
+++ b/docs/uk/docs/fastapi-people.md
@@ -1,3 +1,8 @@
+---
+hide:
+ - navigation
+---
+
# Люди FastAPI
FastAPI має дивовижну спільноту, яка вітає людей різного походження.
@@ -28,7 +33,7 @@ FastAPI має дивовижну спільноту, яка вітає люде
Це люди, які:
-* [Допомагають іншим із проблемами (запитаннями) у GitHub](help-fastapi.md#help-others-with-issues-in-github){.internal-link target=_blank}.
+* [Допомагають іншим із проблемами (запитаннями) у GitHub](help-fastapi.md#help-others-with-questions-in-github){.internal-link target=_blank}.
* [Створюють пул реквести](help-fastapi.md#create-a-pull-request){.internal-link target=_blank}.
* Переглядають пул реквести, [особливо важливо для перекладів](contributing.md#translations){.internal-link target=_blank}.
@@ -36,7 +41,7 @@ FastAPI має дивовижну спільноту, яка вітає люде
## Найбільш активні користувачі минулого місяця
-Це користувачі, які [найбільше допомагали іншим із проблемами (запитаннями) у GitHub](help-fastapi.md#help-others-with-issues-in-github){.internal-link target=_blank} протягом минулого місяця. ☕
+Це користувачі, які [найбільше допомагали іншим із проблемами (запитаннями) у GitHub](help-fastapi.md#help-others-with-questions-in-github){.internal-link target=_blank} протягом минулого місяця. ☕
{% if people %}
python-multipart - Необхідно, якщо Ви хочете підтримувати "розбір" форми за допомогою `request.form()`.
* itsdangerous - Необхідно для підтримки `SessionMiddleware`.
* pyyaml - Необхідно для підтримки Starlette `SchemaGenerator` (ймовірно, вам це не потрібно з FastAPI).
-* ujson - Необхідно, якщо Ви хочете використовувати `UJSONResponse`.
FastAPI / Starlette використовують:
* uvicorn - для сервера, який завантажує та обслуговує вашу програму.
* orjson - Необхідно, якщо Ви хочете використовувати `ORJSONResponse`.
+* ujson - Необхідно, якщо Ви хочете використовувати `UJSONResponse`.
Ви можете встановити все це за допомогою `pip install fastapi[all]`.
diff --git a/docs/uk/docs/python-types.md b/docs/uk/docs/python-types.md
index e767db2fbc..d0adadff37 100644
--- a/docs/uk/docs/python-types.md
+++ b/docs/uk/docs/python-types.md
@@ -168,7 +168,7 @@ John Doe
З модуля `typing`, імпортуємо `List` (з великої літери `L`):
- ``` Python hl_lines="1"
+ ```Python hl_lines="1"
{!> ../../../docs_src/python_types/tutorial006.py!}
```
diff --git a/docs/uk/docs/tutorial/encoder.md b/docs/uk/docs/tutorial/encoder.md
index b6583341f3..49321ff117 100644
--- a/docs/uk/docs/tutorial/encoder.md
+++ b/docs/uk/docs/tutorial/encoder.md
@@ -38,5 +38,5 @@
Вона не повертає велику строку `str`, яка містить дані у форматі JSON (як строка). Вона повертає стандартну структуру даних Python (наприклад `dict`) із значеннями та підзначеннями, які є сумісними з JSON.
-!!! Примітка
+!!! note "Примітка"
`jsonable_encoder` фактично використовується **FastAPI** внутрішньо для перетворення даних. Проте вона корисна в багатьох інших сценаріях.
diff --git a/docs/vi/docs/features.md b/docs/vi/docs/features.md
index 9edb1c8fa2..fe75591dc2 100644
--- a/docs/vi/docs/features.md
+++ b/docs/vi/docs/features.md
@@ -1,3 +1,8 @@
+---
+hide:
+ - navigation
+---
+
# Tính năng
## Tính năng của FastAPI
diff --git a/docs/vi/docs/index.md b/docs/vi/docs/index.md
index 3ade853e28..b13f91fb7f 100644
--- a/docs/vi/docs/index.md
+++ b/docs/vi/docs/index.md
@@ -1,3 +1,12 @@
+---
+hide:
+ - navigation
+---
+
+
+
@@ -27,11 +36,11 @@
---
-FastAPI là một web framework hiện đại, hiệu năng cao để xây dựng web APIs với Python 3.8+ dựa trên tiêu chuẩn Python type hints.
+FastAPI là một web framework hiện đại, hiệu năng cao để xây dựng web APIs với Python dựa trên tiêu chuẩn Python type hints.
Những tính năng như:
-* **Nhanh**: Hiệu năng rất cao khi so sánh với **NodeJS** và **Go** (cảm ơn Starlette và Pydantic). [Một trong những Python framework nhanh nhất](#performance).
+* **Nhanh**: Hiệu năng rất cao khi so sánh với **NodeJS** và **Go** (cảm ơn Starlette và Pydantic). [Một trong những Python framework nhanh nhất](#hieu-nang).
* **Code nhanh**: Tăng tốc độ phát triển tính năng từ 200% tới 300%. *
* **Ít lỗi hơn**: Giảm khoảng 40% những lỗi phát sinh bởi con người (nhà phát triển). *
* **Trực giác tốt hơn**: Được các trình soạn thảo hỗ tuyệt vời. Completion mọi nơi. Ít thời gian gỡ lỗi.
@@ -116,8 +125,6 @@ Nếu bạn đang xây dựng một CLI
## Yêu cầu
-Python 3.8+
-
FastAPI đứng trên vai những người khổng lồ:
* Starlette cho phần web.
@@ -332,7 +339,7 @@ Bạn định nghĩa bằng cách sử dụng các kiểu dữ liệu chuẩn c
Bạn không phải học một cú pháp mới, các phương thức và class của một thư viện cụ thể nào.
-Chỉ cần sử dụng các chuẩn của **Python 3.8+**.
+Chỉ cần sử dụng các chuẩn của **Python**.
Ví dụ, với một tham số kiểu `int`:
@@ -448,7 +455,6 @@ Independent TechEmpower benchmarks cho thấy các ứng dụng **FastAPI** ch
Sử dụng bởi Pydantic:
-* ujson - "Parse" JSON nhanh hơn.
* email_validator - cho email validation.
Sử dụng Starlette:
@@ -458,12 +464,12 @@ Sử dụng Starlette:
* python-multipart - Bắt buộc nếu bạn muốn hỗ trợ "parsing", form với `request.form()`.
* itsdangerous - Bắt buộc để hỗ trợ `SessionMiddleware`.
* pyyaml - Bắt buộc để hỗ trợ `SchemaGenerator` cho Starlette (bạn có thể không cần nó trong FastAPI).
-* ujson - Bắt buộc nếu bạn muốn sử dụng `UJSONResponse`.
Sử dụng bởi FastAPI / Starlette:
* uvicorn - Server để chạy ứng dụng của bạn.
* orjson - Bắt buộc nếu bạn muốn sử dụng `ORJSONResponse`.
+* ujson - Bắt buộc nếu bạn muốn sử dụng `UJSONResponse`.
Bạn có thể cài đặt tất cả những dependency trên với `pip install "fastapi[all]"`.
diff --git a/docs/vi/docs/python-types.md b/docs/vi/docs/python-types.md
index b2a399aa5e..84d14de557 100644
--- a/docs/vi/docs/python-types.md
+++ b/docs/vi/docs/python-types.md
@@ -186,7 +186,7 @@ Ví dụ, hãy định nghĩa một biến là `list` các `str`.
Từ `typing`, import `List` (với chữ cái `L` viết hoa):
- ``` Python hl_lines="1"
+ ```Python hl_lines="1"
{!> ../../../docs_src/python_types/tutorial006.py!}
```
diff --git a/docs/yo/docs/index.md b/docs/yo/docs/index.md
index 5684f0a6a2..9bd21c4b95 100644
--- a/docs/yo/docs/index.md
+++ b/docs/yo/docs/index.md
@@ -1,3 +1,12 @@
+---
+hide:
+ - navigation
+---
+
+
+
@@ -27,11 +36,11 @@
---
-FastAPI jẹ́ ìgbàlódé, tí ó yára (iṣẹ-giga), ìlànà wẹ́ẹ́bù fún kikọ àwọn API pẹ̀lú Python 3.8+ èyí tí ó da lori àwọn ìtọ́kasí àmì irúfẹ́ Python.
+FastAPI jẹ́ ìgbàlódé, tí ó yára (iṣẹ-giga), ìlànà wẹ́ẹ́bù fún kikọ àwọn API pẹ̀lú Python èyí tí ó da lori àwọn ìtọ́kasí àmì irúfẹ́ Python.
Àwọn ẹya pàtàkì ni:
-* **Ó yára**: Iṣẹ tí ó ga púpọ̀, tí ó wa ni ibamu pẹ̀lú **NodeJS** àti **Go** (ọpẹ si Starlette àti Pydantic). [Ọkan nínú àwọn ìlànà Python ti o yára jùlọ ti o wa](#performance).
+* **Ó yára**: Iṣẹ tí ó ga púpọ̀, tí ó wa ni ibamu pẹ̀lú **NodeJS** àti **Go** (ọpẹ si Starlette àti Pydantic). [Ọkan nínú àwọn ìlànà Python ti o yára jùlọ ti o wa](#isesi).
* **Ó yára láti kóòdù**: O mu iyara pọ si láti kọ àwọn ẹya tuntun kóòdù nipasẹ "Igba ìdá ọgọ́rùn-ún" (i.e. 200%) si "ọ̀ọ́dúrún ìdá ọgọ́rùn-ún" (i.e. 300%).
* **Àìtọ́ kékeré**: O n din aṣiṣe ku bi ọgbon ìdá ọgọ́rùn-ún (i.e. 40%) ti eda eniyan (oṣiṣẹ kóòdù) fa. *
* **Ọgbọ́n àti ìmọ̀**: Atilẹyin olootu nla. Ìparí nibi gbogbo. Àkókò díẹ̀ nipa wíwá ibi tí ìṣòro kóòdù wà.
@@ -115,8 +124,6 @@ Ti o ba n kọ ohun èlò CLI láti
## Èròjà
-Python 3.8+
-
FastAPI dúró lórí àwọn èjìká tí àwọn òmíràn:
* Starlette fún àwọn ẹ̀yà ayélujára.
@@ -331,7 +338,7 @@ O ṣe ìyẹn pẹ̀lú irúfẹ́ àmì ìtọ́kasí ìgbàlódé Python.
O ò nílò láti kọ́ síńtáàsì tuntun, ìlànà tàbí ọ̀wọ́ kíláàsì kan pàtó, abbl (i.e. àti bẹbẹ lọ).
-Ìtọ́kasí **Python 3.8+**
+Ìtọ́kasí **Python**
Fún àpẹẹrẹ, fún `int`:
@@ -456,12 +463,12 @@ Láti ní òye síi nípa rẹ̀, wo abala àwọn python-multipart - Nílò tí ó bá fẹ́ láti ṣe àtìlẹ́yìn fún "àyẹ̀wò" fọọmu, pẹ̀lú `request.form()`.
* itsdangerous - Nílò fún àtìlẹ́yìn `SessionMiddleware`.
* pyyaml - Nílò fún àtìlẹ́yìn Starlette's `SchemaGenerator` (ó ṣe ṣe kí ó má nílò rẹ̀ fún FastAPI).
-* ujson - Nílò tí ó bá fẹ́ láti lọ `UJSONResponse`.
Èyí tí FastAPI / Starlette ń lò:
* uvicorn - Fún olupin tí yóò sẹ́ àmúyẹ àti tí yóò ṣe ìpèsè fún iṣẹ́ rẹ tàbí ohun èlò rẹ.
* orjson - Nílò tí ó bá fẹ́ láti lọ `ORJSONResponse`.
+* ujson - Nílò tí ó bá fẹ́ láti lọ `UJSONResponse`.
Ó lè fi gbogbo àwọn wọ̀nyí sórí ẹrọ pẹ̀lú `pip install "fastapi[all]"`.
diff --git a/docs/zh-hant/docs/benchmarks.md b/docs/zh-hant/docs/benchmarks.md
new file mode 100644
index 0000000000..cbd5a6cdee
--- /dev/null
+++ b/docs/zh-hant/docs/benchmarks.md
@@ -0,0 +1,34 @@
+# 基準測試
+
+由第三方機構 TechEmpower 的基準測試表明在 Uvicorn 下運行的 **FastAPI** 應用程式是 最快的 Python 可用框架之一,僅次於 Starlette 和 Uvicorn 本身(於 FastAPI 內部使用)。
+
+但是在查看基準得分和對比時,請注意以下幾點。
+
+## 基準測試和速度
+
+當你查看基準測試時,時常會見到幾個不同類型的工具被同時進行測試。
+
+具體來說,是將 Uvicorn、Starlette 和 FastAPI 同時進行比較(以及許多其他工具)。
+
+該工具解決的問題越簡單,其效能就越好。而且大多數基準測試不會測試該工具提供的附加功能。
+
+層次結構如下:
+
+* **Uvicorn**:ASGI 伺服器
+ * **Starlette**:(使用 Uvicorn)一個網頁微框架
+ * **FastAPI**:(使用 Starlette)一個 API 微框架,具有用於建立 API 的多個附加功能、資料驗證等。
+
+* **Uvicorn**:
+ * 具有最佳效能,因為除了伺服器本身之外,它沒有太多額外的程式碼。
+ * 你不會直接在 Uvicorn 中編寫應用程式。這意味著你的程式碼必須或多或少地包含 Starlette(或 **FastAPI**)提供的所有程式碼。如果你這樣做,你的最終應用程式將具有與使用框架相同的開銷並最大限度地減少應用程式程式碼和錯誤。
+ * 如果你要比較 Uvicorn,請將其與 Daphne、Hypercorn、uWSGI 等應用程式伺服器進行比較。
+* **Starlette**:
+ * 繼 Uvicorn 之後的次佳表現。事實上,Starlette 使用 Uvicorn 來運行。因此它將可能只透過執行更多程式碼而變得比 Uvicorn「慢」。
+ * 但它為你提供了建立簡單網頁應用程式的工具,以及基於路徑的路由等。
+ * 如果你要比較 Starlette,請將其與 Sanic、Flask、Django 等網頁框架(或微框架)進行比較。
+* **FastAPI**:
+ * 就像 Starlette 使用 Uvicorn 並不能比它更快一樣, **FastAPI** 使用 Starlette,所以它不能比它更快。
+ * FastAPI 在 Starlette 基礎之上提供了更多功能。包含建構 API 時所需要的功能,例如資料驗證和序列化。FastAPI 可以幫助你自動產生 API 文件,(應用程式啟動時將會自動生成文件,所以不會增加應用程式運行時的開銷)。
+ * 如果你沒有使用 FastAPI 而是直接使用 Starlette(或其他工具,如 Sanic、Flask、Responder 等),你將必須自行實現所有資料驗證和序列化。因此,你的最終應用程式仍然具有與使用 FastAPI 建置相同的開銷。在許多情況下,這種資料驗證和序列化是應用程式中編寫最大量的程式碼。
+ * 因此透過使用 FastAPI,你可以節省開發時間、錯誤與程式碼數量,並且相比不使用 FastAPI 你很大可能會獲得相同或更好的效能(因為那樣你必須在程式碼中實現所有相同的功能)。
+ * 如果你要與 FastAPI 比較,請將其與能夠提供資料驗證、序列化和文件的網頁應用程式框架(或工具集)進行比較,例如 Flask-apispec、NestJS、Molten 等框架。
diff --git a/docs/zh-hant/docs/fastapi-people.md b/docs/zh-hant/docs/fastapi-people.md
new file mode 100644
index 0000000000..0bc00f9c66
--- /dev/null
+++ b/docs/zh-hant/docs/fastapi-people.md
@@ -0,0 +1,236 @@
+---
+hide:
+ - navigation
+---
+
+# FastAPI 社群
+
+FastAPI 有一個非常棒的社群,歡迎來自不同背景的朋友參與。
+
+## 作者
+
+嘿! 👋
+
+關於我:
+
+{% if people %}
+python-multipart - 需要使用 `request.form()` 對表單進行 "解析" 時安裝。
- itsdangerous - 需要使用 `SessionMiddleware` 支援時安裝。
- pyyaml - 用於支援 Starlette 的 `SchemaGenerator` (如果你使用 FastAPI,可能不需要它)。
-- ujson - 使用 `UJSONResponse` 時必須安裝。
用於 FastAPI / Starlette:
- uvicorn - 用於加載和運行應用程式的服務器。
- orjson - 使用 `ORJSONResponse`時必須安裝。
+- ujson - 使用 `UJSONResponse` 時必須安裝。
你可以使用 `pip install "fastapi[all]"` 來安裝這些所有依賴套件。
diff --git a/docs/zh/docs/advanced/behind-a-proxy.md b/docs/zh/docs/advanced/behind-a-proxy.md
index 738bd7119b..17fc2830a8 100644
--- a/docs/zh/docs/advanced/behind-a-proxy.md
+++ b/docs/zh/docs/advanced/behind-a-proxy.md
@@ -346,6 +346,6 @@ $ uvicorn main:app --root-path /api/v1
## 挂载子应用
-如需挂载子应用(详见 [子应用 - 挂载](./sub-applications.md){.internal-link target=_blank}),也要通过 `root_path` 使用代理,这与正常应用一样,别无二致。
+如需挂载子应用(详见 [子应用 - 挂载](sub-applications.md){.internal-link target=_blank}),也要通过 `root_path` 使用代理,这与正常应用一样,别无二致。
FastAPI 在内部使用 `root_path`,因此子应用也可以正常运行。✨
diff --git a/docs/zh/docs/advanced/events.md b/docs/zh/docs/advanced/events.md
index 6017b8ef02..8e5fa7d124 100644
--- a/docs/zh/docs/advanced/events.md
+++ b/docs/zh/docs/advanced/events.md
@@ -6,7 +6,7 @@
!!! warning "警告"
- **FastAPI** 只执行主应用中的事件处理器,不执行[子应用 - 挂载](./sub-applications.md){.internal-link target=_blank}中的事件处理器。
+ **FastAPI** 只执行主应用中的事件处理器,不执行[子应用 - 挂载](sub-applications.md){.internal-link target=_blank}中的事件处理器。
## `startup` 事件
diff --git a/docs/zh/docs/advanced/response-headers.md b/docs/zh/docs/advanced/response-headers.md
index 85dab15ac0..229efffcb1 100644
--- a/docs/zh/docs/advanced/response-headers.md
+++ b/docs/zh/docs/advanced/response-headers.md
@@ -25,7 +25,7 @@
```
-!!! 注意 "技术细节"
+!!! note "技术细节"
你也可以使用`from starlette.responses import Response`或`from starlette.responses import JSONResponse`。
**FastAPI**提供了与`fastapi.responses`相同的`starlette.responses`,只是为了方便开发者。但是,大多数可用的响应都直接来自Starlette。
diff --git a/docs/zh/docs/advanced/security/http-basic-auth.md b/docs/zh/docs/advanced/security/http-basic-auth.md
index 1f251ca452..ab8961e7cf 100644
--- a/docs/zh/docs/advanced/security/http-basic-auth.md
+++ b/docs/zh/docs/advanced/security/http-basic-auth.md
@@ -14,15 +14,32 @@ HTTP 基础授权让浏览器显示内置的用户名与密码提示。
## 简单的 HTTP 基础授权
-* 导入 `HTTPBsic` 与 `HTTPBasicCredentials`
-* 使用 `HTTPBsic` 创建**安全概图**
+* 导入 `HTTPBasic` 与 `HTTPBasicCredentials`
+* 使用 `HTTPBasic` 创建**安全概图**
* 在*路径操作*的依赖项中使用 `security`
* 返回类型为 `HTTPBasicCredentials` 的对象:
* 包含发送的 `username` 与 `password`
-```Python hl_lines="2 6 10"
-{!../../../docs_src/security/tutorial006.py!}
-```
+=== "Python 3.9+"
+
+ ```Python hl_lines="4 8 12"
+ {!> ../../../docs_src/security/tutorial006_an_py39.py!}
+ ```
+
+=== "Python 3.8+"
+
+ ```Python hl_lines="2 7 11"
+ {!> ../../../docs_src/security/tutorial006_an.py!}
+ ```
+
+=== "Python 3.8+ non-Annotated"
+
+ !!! tip
+ 尽可能选择使用 `Annotated` 的版本。
+
+ ```Python hl_lines="2 6 10"
+ {!> ../../../docs_src/security/tutorial006.py!}
+ ```
第一次打开 URL(或在 API 文档中点击 **Execute** 按钮)时,浏览器要求输入用户名与密码:
@@ -34,13 +51,35 @@ HTTP 基础授权让浏览器显示内置的用户名与密码提示。
使用依赖项检查用户名与密码是否正确。
-为此要使用 Python 标准模块 `secrets` 检查用户名与密码:
+为此要使用 Python 标准模块 `secrets` 检查用户名与密码。
-```Python hl_lines="1 11-13"
-{!../../../docs_src/security/tutorial007.py!}
-```
+`secrets.compare_digest()` 需要仅包含 ASCII 字符(英语字符)的 `bytes` 或 `str`,这意味着它不适用于像`á`一样的字符,如 `Sebastián`。
-这段代码确保 `credentials.username` 是 `"stanleyjobson"`,且 `credentials.password` 是`"swordfish"`。与以下代码类似:
+为了解决这个问题,我们首先将 `username` 和 `password` 转换为使用 UTF-8 编码的 `bytes` 。
+
+然后我们可以使用 `secrets.compare_digest()` 来确保 `credentials.username` 是 `"stanleyjobson"`,且 `credentials.password` 是`"swordfish"`。
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="1 12-24"
+ {!> ../../../docs_src/security/tutorial007_an_py39.py!}
+ ```
+
+=== "Python 3.8+"
+
+ ```Python hl_lines="1 12-24"
+ {!> ../../../docs_src/security/tutorial007_an.py!}
+ ```
+
+=== "Python 3.8+ non-Annotated"
+
+ !!! tip
+ 尽可能选择使用 `Annotated` 的版本。
+
+ ```Python hl_lines="1 11-21"
+ {!> ../../../docs_src/security/tutorial007.py!}
+ ```
+这类似于:
```Python
if not (credentials.username == "stanleyjobson") or not (credentials.password == "swordfish"):
@@ -102,6 +141,23 @@ if "stanleyjobsox" == "stanleyjobson" and "love123" == "swordfish":
检测到凭证不正确后,返回 `HTTPException` 及状态码 401(与无凭证时返回的内容一样),并添加请求头 `WWW-Authenticate`,让浏览器再次显示登录提示:
-```Python hl_lines="15-19"
-{!../../../docs_src/security/tutorial007.py!}
-```
+=== "Python 3.9+"
+
+ ```Python hl_lines="26-30"
+ {!> ../../../docs_src/security/tutorial007_an_py39.py!}
+ ```
+
+=== "Python 3.8+"
+
+ ```Python hl_lines="26-30"
+ {!> ../../../docs_src/security/tutorial007_an.py!}
+ ```
+
+=== "Python 3.8+ non-Annotated"
+
+ !!! tip
+ 尽可能选择使用 `Annotated` 的版本。
+
+ ```Python hl_lines="23-27"
+ {!> ../../../docs_src/security/tutorial007.py!}
+ ```
diff --git a/docs/zh/docs/advanced/sub-applications.md b/docs/zh/docs/advanced/sub-applications.md
index 55651def53..a26301b50a 100644
--- a/docs/zh/docs/advanced/sub-applications.md
+++ b/docs/zh/docs/advanced/sub-applications.md
@@ -70,4 +70,4 @@ $ uvicorn main:app --reload
并且子应用还可以再挂载子应用,一切都会正常运行,FastAPI 可以自动处理所有 `root_path`。
-关于 `root_path` 及如何显式使用 `root_path` 的内容,详见[使用代理](./behind-a-proxy.md){.internal-link target=_blank}一章。
+关于 `root_path` 及如何显式使用 `root_path` 的内容,详见[使用代理](behind-a-proxy.md){.internal-link target=_blank}一章。
diff --git a/docs/zh/docs/advanced/templates.md b/docs/zh/docs/advanced/templates.md
index d735f16976..612b691760 100644
--- a/docs/zh/docs/advanced/templates.md
+++ b/docs/zh/docs/advanced/templates.md
@@ -20,24 +20,12 @@ $ pip install jinja2
+
+但是你可以通过设置 `syntaxHighlight` 为 `False` 来禁用 Swagger UI 中的语法高亮:
+
+```Python hl_lines="3"
+{!../../../docs_src/configure_swagger_ui/tutorial001.py!}
+```
+
+...在此之后,Swagger UI 将不会高亮代码:
+
+
+
+## 改变主题
+
+同样地,你也可以通过设置键 `"syntaxHighlight.theme"` 来设置语法高亮主题(注意中间有一个点):
+
+```Python hl_lines="3"
+{!../../../docs_src/configure_swagger_ui/tutorial002.py!}
+```
+
+这个配置会改变语法高亮主题:
+
+
+
+## 改变默认 Swagger UI 参数
+
+FastAPI 包含了一些默认配置参数,适用于大多数用例。
+
+其包括这些默认配置参数:
+
+```Python
+{!../../../fastapi/openapi/docs.py[ln:7-23]!}
+```
+
+你可以通过在 `swagger_ui_parameters` 中设置不同的值来覆盖它们。
+
+比如,如果要禁用 `deepLinking`,你可以像这样传递设置到 `swagger_ui_parameters` 中:
+
+```Python hl_lines="3"
+{!../../../docs_src/configure_swagger_ui/tutorial003.py!}
+```
+
+## 其他 Swagger UI 参数
+
+查看其他 Swagger UI 参数,请阅读 docs for Swagger UI parameters。
+
+## JavaScript-only 配置
+
+Swagger UI 同样允许使用 **JavaScript-only** 配置对象(例如,JavaScript 函数)。
+
+FastAPI 包含这些 JavaScript-only 的 `presets` 设置:
+
+```JavaScript
+presets: [
+ SwaggerUIBundle.presets.apis,
+ SwaggerUIBundle.SwaggerUIStandalonePreset
+]
+```
+
+这些是 **JavaScript** 对象,而不是字符串,所以你不能直接从 Python 代码中传递它们。
+
+如果你需要像这样使用 JavaScript-only 配置,你可以使用上述方法之一。覆盖所有 Swagger UI *path operation* 并手动编写任何你需要的 JavaScript。
diff --git a/docs/zh/docs/how-to/general.md b/docs/zh/docs/how-to/general.md
new file mode 100644
index 0000000000..e8b6dd3b23
--- /dev/null
+++ b/docs/zh/docs/how-to/general.md
@@ -0,0 +1,39 @@
+# 通用 - 如何操作 - 诀窍
+
+这里是一些指向文档中其他部分的链接,用于解答一般性或常见问题。
+
+## 数据过滤 - 安全性
+
+为确保不返回超过需要的数据,请阅读 [教程 - 响应模型 - 返回类型](../tutorial/response-model.md){.internal-link target=_blank} 文档。
+
+## 文档的标签 - OpenAPI
+
+在文档界面中添加**路径操作**的标签和进行分组,请阅读 [教程 - 路径操作配置 - Tags 参数](../tutorial/path-operation-configuration.md#tags){.internal-link target=_blank} 文档。
+
+## 文档的概要和描述 - OpenAPI
+
+在文档界面中添加**路径操作**的概要和描述,请阅读 [教程 - 路径操作配置 - Summary 和 Description 参数](../tutorial/path-operation-configuration.md#summary-description){.internal-link target=_blank} 文档。
+
+## 文档的响应描述 - OpenAPI
+
+在文档界面中定义并显示响应描述,请阅读 [教程 - 路径操作配置 - 响应描述](../tutorial/path-operation-configuration.md#response-description){.internal-link target=_blank} 文档。
+
+## 文档弃用**路径操作** - OpenAPI
+
+在文档界面中显示弃用的**路径操作**,请阅读 [教程 - 路径操作配置 - 弃用](../tutorial/path-operation-configuration.md#deprecate-a-path-operation){.internal-link target=_blank} 文档。
+
+## 将任何数据转换为 JSON 兼容格式
+
+要将任何数据转换为 JSON 兼容格式,请阅读 [教程 - JSON 兼容编码器](../tutorial/encoder.md){.internal-link target=_blank} 文档。
+
+## OpenAPI 元数据 - 文档
+
+要添加 OpenAPI 的元数据,包括许可证、版本、联系方式等,请阅读 [教程 - 元数据和文档 URL](../tutorial/metadata.md){.internal-link target=_blank} 文档。
+
+## OpenAPI 自定义 URL
+
+要自定义 OpenAPI 的 URL(或删除它),请阅读 [教程 - 元数据和文档 URL](../tutorial/metadata.md#openapi-url){.internal-link target=_blank} 文档。
+
+## OpenAPI 文档 URL
+
+要更改用于自动生成文档的 URL,请阅读 [教程 - 元数据和文档 URL](../tutorial/metadata.md#docs-urls){.internal-link target=_blank}.
diff --git a/docs/zh/docs/how-to/index.md b/docs/zh/docs/how-to/index.md
new file mode 100644
index 0000000000..c0688c72af
--- /dev/null
+++ b/docs/zh/docs/how-to/index.md
@@ -0,0 +1,11 @@
+# 如何操作 - 诀窍
+
+在这里,你将看到关于**多个主题**的不同诀窍或“如何操作”指南。
+
+这些方法多数是**相互独立**的,在大多数情况下,你只需在这些内容适用于**你的项目**时才需要学习它们。
+
+如果某些内容看起来对你的项目有用,请继续查阅,否则请直接跳过它们。
+
+!!! 小技巧
+
+ 如果你想以系统的方式**学习 FastAPI**(推荐),请阅读 [教程 - 用户指南](../tutorial/index.md){.internal-link target=_blank} 的每一章节。
diff --git a/docs/zh/docs/index.md b/docs/zh/docs/index.md
index a480d66407..aef3b3a50e 100644
--- a/docs/zh/docs/index.md
+++ b/docs/zh/docs/index.md
@@ -1,3 +1,12 @@
+---
+hide:
+ - navigation
+---
+
+
+
@@ -14,6 +23,9 @@
itsdangerous - 需要 `SessionMiddleware` 支持时安装。
* pyyaml - 使用 Starlette 提供的 `SchemaGenerator` 时安装(有 FastAPI 你可能并不需要它)。
* graphene - 需要 `GraphQLApp` 支持时安装。
-* ujson - 使用 `UJSONResponse` 时安装。
用于 FastAPI / Starlette:
* uvicorn - 用于加载和运行你的应用程序的服务器。
* orjson - 使用 `ORJSONResponse` 时安装。
+* ujson - 使用 `UJSONResponse` 时安装。
-你可以通过 `pip install fastapi[all]` 命令来安装以上所有依赖。
+你可以通过 `pip install "fastapi[all]"` 命令来安装以上所有依赖。
## 许可协议
diff --git a/docs/zh/docs/tutorial/bigger-applications.md b/docs/zh/docs/tutorial/bigger-applications.md
index 1389595669..422cd7c168 100644
--- a/docs/zh/docs/tutorial/bigger-applications.md
+++ b/docs/zh/docs/tutorial/bigger-applications.md
@@ -119,7 +119,7 @@
!!! tip
我们正在使用虚构的请求首部来简化此示例。
- 但在实际情况下,使用集成的[安全性实用工具](./security/index.md){.internal-link target=_blank}会得到更好的效果。
+ 但在实际情况下,使用集成的[安全性实用工具](security/index.md){.internal-link target=_blank}会得到更好的效果。
## 其他使用 `APIRouter` 的模块
diff --git a/docs/zh/docs/tutorial/body-updates.md b/docs/zh/docs/tutorial/body-updates.md
index 43f20f8fcb..e529fc914f 100644
--- a/docs/zh/docs/tutorial/body-updates.md
+++ b/docs/zh/docs/tutorial/body-updates.md
@@ -34,7 +34,7 @@
即,只发送要更新的数据,其余数据保持不变。
-!!! Note "笔记"
+!!! note "笔记"
`PATCH` 没有 `PUT` 知名,也怎么不常用。
diff --git a/docs/zh/docs/tutorial/body.md b/docs/zh/docs/tutorial/body.md
index fa8b54d024..65d459cd17 100644
--- a/docs/zh/docs/tutorial/body.md
+++ b/docs/zh/docs/tutorial/body.md
@@ -213,4 +213,4 @@ Pydantic 模型的 JSON 概图是 OpenAPI 生成的概图部件,可在 API 文
## 不使用 Pydantic
-即便不使用 Pydantic 模型也能使用 **Body** 参数。详见[请求体 - 多参数:请求体中的单值](body-multiple-params.md#singular-values-in-body){.internal-link target=\_blank}。
+即便不使用 Pydantic 模型也能使用 **Body** 参数。详见[请求体 - 多参数:请求体中的单值](body-multiple-params.md#_2){.internal-link target=\_blank}。
diff --git a/docs/zh/docs/tutorial/dependencies/dependencies-with-yield.md b/docs/zh/docs/tutorial/dependencies/dependencies-with-yield.md
index e24b9409f6..4159d626ec 100644
--- a/docs/zh/docs/tutorial/dependencies/dependencies-with-yield.md
+++ b/docs/zh/docs/tutorial/dependencies/dependencies-with-yield.md
@@ -4,10 +4,10 @@ FastAPI支持在完成后执行一些SQLModel(也是基于SQLAlchemy),一旦SQLModel更新为为使用Pydantic v2。
+
**FastAPI**不需要你使用SQL(关系型)数据库。
但是您可以使用任何您想要的关系型数据库。
在这里,让我们看一个使用着[SQLAlchemy](https://www.sqlalchemy.org/)的示例。
-您可以很容易地将SQLAlchemy支持任何数据库,像:
+您可以很容易地将其调整为任何SQLAlchemy支持的数据库,如:
* PostgreSQL
* MySQL
@@ -74,13 +81,13 @@ ORM 具有在代码和数据库表(“*关系型”)中的**对象**之间
└── schemas.py
```
-该文件`__init__.py`只是一个空文件,但它告诉 Python 其中`sql_app`的所有模块(Python 文件)都是一个包。
+该文件`__init__.py`只是一个空文件,但它告诉 Python `sql_app` 是一个包。
现在让我们看看每个文件/模块的作用。
## 安装 SQLAlchemy
-先下载`SQLAlchemy`所需要的依赖:
+首先你需要安装`SQLAlchemy`: