diff --git a/.github/actions/comment-docs-preview-in-pr/Dockerfile b/.github/actions/comment-docs-preview-in-pr/Dockerfile
index 4f20c5f10b..42627fe190 100644
--- a/.github/actions/comment-docs-preview-in-pr/Dockerfile
+++ b/.github/actions/comment-docs-preview-in-pr/Dockerfile
@@ -1,6 +1,8 @@
-FROM python:3.7
+FROM python:3.10
-RUN pip install httpx "pydantic==1.5.1" pygithub
+COPY ./requirements.txt /app/requirements.txt
+
+RUN pip install -r /app/requirements.txt
COPY ./app /app
diff --git a/.github/actions/comment-docs-preview-in-pr/app/main.py b/.github/actions/comment-docs-preview-in-pr/app/main.py
index 68914fdb9a..8cc119fe0a 100644
--- a/.github/actions/comment-docs-preview-in-pr/app/main.py
+++ b/.github/actions/comment-docs-preview-in-pr/app/main.py
@@ -6,7 +6,8 @@ from typing import Union
import httpx
from github import Github
from github.PullRequest import PullRequest
-from pydantic import BaseModel, BaseSettings, SecretStr, ValidationError
+from pydantic import BaseModel, SecretStr, ValidationError
+from pydantic_settings import BaseSettings
github_api = "https://api.github.com"
diff --git a/.github/actions/comment-docs-preview-in-pr/requirements.txt b/.github/actions/comment-docs-preview-in-pr/requirements.txt
new file mode 100644
index 0000000000..74a3631f48
--- /dev/null
+++ b/.github/actions/comment-docs-preview-in-pr/requirements.txt
@@ -0,0 +1,4 @@
+PyGithub
+pydantic>=2.5.3,<3.0.0
+pydantic-settings>=2.1.0,<3.0.0
+httpx
diff --git a/.github/actions/notify-translations/Dockerfile b/.github/actions/notify-translations/Dockerfile
index fa4197e6a8..b68b4bb1a2 100644
--- a/.github/actions/notify-translations/Dockerfile
+++ b/.github/actions/notify-translations/Dockerfile
@@ -1,4 +1,4 @@
-FROM python:3.7
+FROM python:3.9
RUN pip install httpx PyGithub "pydantic==1.5.1" "pyyaml>=5.3.1,<6.0.0"
diff --git a/.github/actions/notify-translations/app/main.py b/.github/actions/notify-translations/app/main.py
index 494fe6ad8e..8ac1f233d6 100644
--- a/.github/actions/notify-translations/app/main.py
+++ b/.github/actions/notify-translations/app/main.py
@@ -9,7 +9,7 @@ import httpx
from github import Github
from pydantic import BaseModel, BaseSettings, SecretStr
-awaiting_label = "awaiting review"
+awaiting_label = "awaiting-review"
lang_all_label = "lang-all"
approved_label = "approved-2"
translations_path = Path(__file__).parent / "translations.yml"
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index cd972a0ba4..0a59adbd6b 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -11,6 +11,10 @@ updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
- interval: "daily"
+ interval: "monthly"
+ groups:
+ python-packages:
+ patterns:
+ - "*"
commit-message:
prefix: ⬆
diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml
index dedf23fb94..abf2b90f68 100644
--- a/.github/workflows/build-docs.yml
+++ b/.github/workflows/build-docs.yml
@@ -17,7 +17,7 @@ jobs:
outputs:
docs: ${{ steps.filter.outputs.docs }}
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
# For pull requests it's not necessary to checkout the code but for master it is
- uses: dorny/paths-filter@v2
id: filter
@@ -28,6 +28,8 @@ jobs:
- docs/**
- docs_src/**
- requirements-docs.txt
+ - .github/workflows/build-docs.yml
+ - .github/workflows/deploy-docs.yml
langs:
needs:
- changes
@@ -35,23 +37,28 @@ jobs:
outputs:
langs: ${{ steps.show-langs.outputs.langs }}
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Set up Python
- uses: actions/setup-python@v4
+ uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: actions/cache@v3
id: cache
with:
path: ${{ env.pythonLocation }}
- key: ${{ runner.os }}-python-docs-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-docs.txt') }}-v06
+ key: ${{ runner.os }}-python-docs-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-docs.txt', 'requirements-docs-tests.txt') }}-v06
- name: Install docs extras
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -r requirements-docs.txt
# Install MkDocs Material Insiders here just to put it in the cache for the rest of the steps
- name: Install Material for MkDocs Insiders
- if: ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false ) && steps.cache.outputs.cache-hit != 'true'
- run: pip install git+https://${{ secrets.FASTAPI_MKDOCS_MATERIAL_INSIDERS }}@github.com/squidfunk/mkdocs-material-insiders.git
+ if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' ) && steps.cache.outputs.cache-hit != 'true'
+ run: |
+ pip install git+https://${{ secrets.FASTAPI_MKDOCS_MATERIAL_INSIDERS }}@github.com/squidfunk/mkdocs-material-insiders.git
+ pip install git+https://${{ secrets.FASTAPI_MKDOCS_MATERIAL_INSIDERS }}@github.com/pawamoy-insiders/griffe-typing-deprecated.git
+ pip install git+https://${{ secrets.FASTAPI_MKDOCS_MATERIAL_INSIDERS }}@github.com/pawamoy-insiders/mkdocstrings-python.git
+ - name: Verify README
+ run: python ./scripts/docs.py verify-readme
- name: Export Language Codes
id: show-langs
run: |
@@ -71,22 +78,25 @@ jobs:
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Set up Python
- uses: actions/setup-python@v4
+ uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: actions/cache@v3
id: cache
with:
path: ${{ env.pythonLocation }}
- key: ${{ runner.os }}-python-docs-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-docs.txt') }}-v06
+ key: ${{ runner.os }}-python-docs-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-docs.txt', 'requirements-docs-tests.txt') }}-v06
- name: Install docs extras
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -r requirements-docs.txt
- name: Install Material for MkDocs Insiders
- if: ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false ) && steps.cache.outputs.cache-hit != 'true'
- run: pip install git+https://${{ secrets.FASTAPI_MKDOCS_MATERIAL_INSIDERS }}@github.com/squidfunk/mkdocs-material-insiders.git
+ if: ( github.event_name != 'pull_request' || github.secret_source != 'Actions' ) && steps.cache.outputs.cache-hit != 'true'
+ run: |
+ pip install git+https://${{ secrets.FASTAPI_MKDOCS_MATERIAL_INSIDERS }}@github.com/squidfunk/mkdocs-material-insiders.git
+ pip install git+https://${{ secrets.FASTAPI_MKDOCS_MATERIAL_INSIDERS }}@github.com/pawamoy-insiders/griffe-typing-deprecated.git
+ pip install git+https://${{ secrets.FASTAPI_MKDOCS_MATERIAL_INSIDERS }}@github.com/pawamoy-insiders/mkdocstrings-python.git
- name: Update Languages
run: python ./scripts/docs.py update-languages
- uses: actions/cache@v3
diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml
index dcd6d7107b..2bec6682c1 100644
--- a/.github/workflows/deploy-docs.yml
+++ b/.github/workflows/deploy-docs.yml
@@ -14,14 +14,14 @@ jobs:
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Clean site
run: |
rm -rf ./site
mkdir ./site
- name: Download Artifact Docs
id: download
- uses: dawidd6/action-download-artifact@v2.27.0
+ uses: dawidd6/action-download-artifact@v3.0.0
with:
if_no_artifact_found: ignore
github_token: ${{ secrets.FASTAPI_PREVIEW_DOCS_DOWNLOAD_ARTIFACTS }}
diff --git a/.github/workflows/issue-manager.yml b/.github/workflows/issue-manager.yml
index bb967fa118..d1aad28fd3 100644
--- a/.github/workflows/issue-manager.yml
+++ b/.github/workflows/issue-manager.yml
@@ -31,5 +31,9 @@ jobs:
"answered": {
"delay": 864000,
"message": "Assuming the original need was handled, this will be automatically closed now. But feel free to add more comments or create new issues or PRs."
+ },
+ "changes-requested": {
+ "delay": 2628000,
+ "message": "As this PR had requested changes to be applied but has been inactive for a while, it's now going to be closed. But if there's anyone interested, feel free to create a new PR."
}
}
diff --git a/.github/workflows/label-approved.yml b/.github/workflows/label-approved.yml
index 2113c468ac..62daf26080 100644
--- a/.github/workflows/label-approved.yml
+++ b/.github/workflows/label-approved.yml
@@ -3,6 +3,7 @@ name: Label Approved
on:
schedule:
- cron: "0 12 * * *"
+ workflow_dispatch:
jobs:
label-approved:
@@ -13,6 +14,6 @@ jobs:
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- - uses: docker://tiangolo/label-approved:0.0.2
+ - uses: docker://tiangolo/label-approved:0.0.4
with:
token: ${{ secrets.FASTAPI_LABEL_APPROVED }}
diff --git a/.github/workflows/latest-changes.yml b/.github/workflows/latest-changes.yml
index e38870f464..27e062d090 100644
--- a/.github/workflows/latest-changes.yml
+++ b/.github/workflows/latest-changes.yml
@@ -24,7 +24,7 @@ jobs:
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
# To allow latest-changes to commit to the main branch
token: ${{ secrets.FASTAPI_LATEST_CHANGES }}
@@ -34,9 +34,12 @@ jobs:
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
with:
limit-access-to-actor: true
- - uses: docker://tiangolo/latest-changes:0.0.3
+ - uses: docker://tiangolo/latest-changes:0.3.0
+ # - uses: tiangolo/latest-changes@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
latest_changes_file: docs/en/docs/release-notes.md
- latest_changes_header: '## Latest Changes\n\n'
+ latest_changes_header: '## Latest Changes'
+ end_regex: '^## '
debug_logs: true
+ label_header_prefix: '### '
diff --git a/.github/workflows/notify-translations.yml b/.github/workflows/notify-translations.yml
index 44ee83ec02..c0904ce486 100644
--- a/.github/workflows/notify-translations.yml
+++ b/.github/workflows/notify-translations.yml
@@ -23,7 +23,7 @@ jobs:
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
# Allow debugging with tmate
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
diff --git a/.github/workflows/people.yml b/.github/workflows/people.yml
index 4480a14274..b0868771dc 100644
--- a/.github/workflows/people.yml
+++ b/.github/workflows/people.yml
@@ -19,7 +19,7 @@ jobs:
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
# Ref: https://github.com/actions/runner/issues/2033
- name: Fix git safe.directory in container
run: mkdir -p /home/runner/work/_temp/_github_home && printf "[safe]\n\tdirectory = /github/workspace" > /home/runner/work/_temp/_github_home/.gitconfig
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index b84c5bf17a..8ebb28a80f 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -13,11 +13,11 @@ jobs:
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Set up Python
- uses: actions/setup-python@v4
+ uses: actions/setup-python@v5
with:
- python-version: "3.7"
+ python-version: "3.10"
# Issue ref: https://github.com/actions/setup-python/issues/436
# cache: "pip"
cache-dependency-path: pyproject.toml
@@ -32,7 +32,7 @@ jobs:
- name: Build distribution
run: python -m build
- name: Publish
- uses: pypa/gh-action-pypi-publish@v1.8.6
+ uses: pypa/gh-action-pypi-publish@v1.8.11
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Dump GitHub context
diff --git a/.github/workflows/smokeshow.yml b/.github/workflows/smokeshow.yml
index 4e689d95c1..10bff67aee 100644
--- a/.github/workflows/smokeshow.yml
+++ b/.github/workflows/smokeshow.yml
@@ -18,13 +18,13 @@ jobs:
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- - uses: actions/setup-python@v4
+ - uses: actions/setup-python@v5
with:
python-version: '3.9'
- run: pip install smokeshow
- - uses: dawidd6/action-download-artifact@v2.27.0
+ - uses: dawidd6/action-download-artifact@v3.0.0
with:
github_token: ${{ secrets.FASTAPI_SMOKESHOW_DOWNLOAD_ARTIFACTS }}
workflow: test.yml
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 6a512a019b..b6b1736851 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -17,9 +17,9 @@ jobs:
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Set up Python
- uses: actions/setup-python@v4
+ uses: actions/setup-python@v5
with:
python-version: "3.11"
# Issue ref: https://github.com/actions/setup-python/issues/436
@@ -29,7 +29,7 @@ jobs:
id: cache
with:
path: ${{ env.pythonLocation }}
- key: ${{ runner.os }}-python-${{ env.pythonLocation }}-pydantic-v2-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}-test-v04
+ key: ${{ runner.os }}-python-${{ env.pythonLocation }}-pydantic-v2-${{ hashFiles('pyproject.toml', 'requirements-tests.txt', 'requirements-docs-tests.txt') }}-test-v07
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -r requirements-tests.txt
@@ -42,7 +42,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
+ python-version:
+ - "3.12"
+ - "3.11"
+ - "3.10"
+ - "3.9"
+ - "3.8"
pydantic-version: ["pydantic-v1", "pydantic-v2"]
fail-fast: false
steps:
@@ -50,9 +55,9 @@ jobs:
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Set up Python
- uses: actions/setup-python@v4
+ uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# Issue ref: https://github.com/actions/setup-python/issues/436
@@ -62,7 +67,7 @@ jobs:
id: cache
with:
path: ${{ env.pythonLocation }}
- key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ matrix.pydantic-version }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}-test-v04
+ key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ matrix.pydantic-version }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt', 'requirements-docs-tests.txt') }}-test-v07
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -r requirements-tests.txt
@@ -92,8 +97,8 @@ jobs:
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- - uses: actions/checkout@v3
- - uses: actions/setup-python@v4
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v5
with:
python-version: '3.8'
# Issue ref: https://github.com/actions/setup-python/issues/436
diff --git a/.gitignore b/.gitignore
index d380d16b7d..9be494cec0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,3 +25,6 @@ archive.zip
*~
.*.sw?
.cache
+
+# macOS
+.DS_Store
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 9f7085f72f..a7f2fb3f22 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -13,23 +13,13 @@ repos:
- --unsafe
- id: end-of-file-fixer
- id: trailing-whitespace
-- repo: https://github.com/asottile/pyupgrade
- rev: v3.7.0
- hooks:
- - id: pyupgrade
- args:
- - --py3-plus
- - --keep-runtime-typing
- repo: https://github.com/charliermarsh/ruff-pre-commit
- rev: v0.0.275
+ rev: v0.1.2
hooks:
- id: ruff
args:
- --fix
-- repo: https://github.com/psf/black
- rev: 23.3.0
- hooks:
- - id: black
+ - id: ruff-format
ci:
autofix_commit_msg: 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
autoupdate_commit_msg: ⬆ [pre-commit.ci] pre-commit autoupdate
diff --git a/CITATION.cff b/CITATION.cff
new file mode 100644
index 0000000000..9028248b1d
--- /dev/null
+++ b/CITATION.cff
@@ -0,0 +1,24 @@
+# This CITATION.cff file was generated with cffinit.
+# Visit https://bit.ly/cffinit to generate yours today!
+
+cff-version: 1.2.0
+title: FastAPI
+message: >-
+ If you use this software, please cite it using the
+ metadata from this file.
+type: software
+authors:
+ - given-names: Sebastián
+ family-names: Ramírez
+ email: tiangolo@gmail.com
+identifiers:
+repository-code: 'https://github.com/tiangolo/fastapi'
+url: 'https://fastapi.tiangolo.com'
+abstract: >-
+ FastAPI framework, high performance, easy to learn, fast to code,
+ ready for production
+keywords:
+ - fastapi
+ - pydantic
+ - starlette
+license: MIT
diff --git a/README.md b/README.md
index 50f80ded67..2df5cba0bd 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.7+ based on standard Python type hints.
+FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.8+ based on standard Python type hints.
The key features are:
@@ -48,14 +48,20 @@ The key features are:
-
+
+
+
+
+
-
+
+
+
@@ -117,7 +123,7 @@ If you are building a CLI app to be
## Requirements
-Python 3.7+
+Python 3.8+
FastAPI stands on the shoulders of giants:
@@ -333,7 +339,7 @@ You do that with standard modern Python types.
You don't have to learn a new syntax, the methods or classes of a specific library, etc.
-Just standard **Python 3.7+**.
+Just standard **Python 3.8+**.
For example, for an `int`:
diff --git a/docs/bn/docs/index.md b/docs/bn/docs/index.md
new file mode 100644
index 0000000000..4f778e8735
--- /dev/null
+++ b/docs/bn/docs/index.md
@@ -0,0 +1,464 @@
+
+ FastAPI উচ্চক্ষমতা সম্পন্ন, সহজে শেখার এবং দ্রুত কোড করে প্রোডাকশনের জন্য ফ্রামওয়ার্ক। +
+ + +--- + +**নির্দেশিকা নথি**: https://fastapi.tiangolo.com + +**সোর্স কোড**: https://github.com/tiangolo/fastapi + +--- + +FastAPI একটি আধুনিক, দ্রুত ( বেশি ক্ষমতা ) সম্পন্ন, Python 3.6+ দিয়ে API তৈরির জন্য স্ট্যান্ডার্ড পাইথন টাইপ ইঙ্গিত ভিত্তিক ওয়েব ফ্রেমওয়ার্ক। + +এর মূল বৈশিষ্ট্য গুলো হলঃ + +- **গতি**: এটি **NodeJS** এবং **Go** এর মত কার্যক্ষমতা সম্পন্ন (Starlette এবং Pydantic এর সাহায্যে)। [পাইথন এর দ্রুততম ফ্রেমওয়ার্ক গুলোর মধ্যে এটি একটি](#_11)। +- **দ্রুত কোড করা**:বৈশিষ্ট্য তৈরির গতি ২০০% থেকে ৩০০% বৃদ্ধি করে৷ \* +- **স্বল্প bugs**: মানুব (ডেভেলপার) সৃষ্ট ত্রুটির প্রায় ৪০% হ্রাস করে। \* +- **স্বজ্ঞাত**: দুর্দান্ত এডিটর সাহায্য Completion নামেও পরিচিত। দ্রুত ডিবাগ করা যায়। + +- **সহজ**: এটি এমন ভাবে সজানো হয়েছে যেন নির্দেশিকা নথি পড়ে সহজে শেখা এবং ব্যবহার করা যায়। +- **সংক্ষিপ্ত**: কোড পুনরাবৃত্তি কমানোর পাশাপাশি, bug কমায় এবং প্রতিটি প্যারামিটার ঘোষণা থেকে একাধিক ফিচার পাওয়া যায় । +- **জোরালো**: স্বয়ংক্রিয় ভাবে তৈরি ক্রিয়াশীল নির্দেশনা নথি (documentation) সহ উৎপাদন উপযোগি (Production-ready) কোড পাওয়া যায়। +- **মান-ভিত্তিক**: এর ভিত্তি OpenAPI (যা পুর্বে Swagger নামে পরিচিত ছিল) এবং JSON Schema এর আদর্শের মানের ওপর + +\* উৎপাদনমুখি এপ্লিকেশন বানানোর এক দল ডেভেলপার এর মতামত ভিত্তিক ফলাফল। + +## স্পনসর গণ + + + +{% if sponsors %} +{% for sponsor in sponsors.gold -%} +async def...uvicorn main:app --reload...ujson - দ্রুত JSON এর জন্য "parsing".
+- email_validator - ইমেল যাচাইকরণের জন্য।
+
+স্টারলেট দ্বারা ব্যবহৃত:
+
+- httpx - আপনি যদি `TestClient` ব্যবহার করতে চান তাহলে আবশ্যক।
+- jinja2 - আপনি যদি প্রদত্ত টেমপ্লেট রূপরেখা ব্যবহার করতে চান তাহলে প্রয়োজন।
+- python-multipart - আপনি যদি ফর্ম সহায়তা করতে চান তাহলে প্রয়োজন "parsing", `request.form()` সহ।
+- itsdangerous - `SessionMiddleware` সহায়তার জন্য প্রয়োজন।
+- pyyaml - স্টারলেটের SchemaGenerator সাপোর্ট এর জন্য প্রয়োজন (আপনার সম্ভাবত FastAPI প্রয়োজন নেই)।
+- graphene - `GraphQLApp` সহায়তার জন্য প্রয়োজন।
+- ujson - আপনি `UJSONResponse` ব্যবহার করতে চাইলে প্রয়োজন।
+
+FastAPI / Starlette দ্বারা ব্যবহৃত:
+
+- uvicorn - সার্ভারের জন্য যা আপনার অ্যাপ্লিকেশন লোড করে এবং পরিবেশন করে।
+- orjson - আপনি `ORJSONResponse` ব্যবহার করতে চাইলে প্রয়োজন।
+
+আপনি এই সব ইনস্টল করতে পারেন `pip install fastapi[all]` দিয়ে.
+
+## লাইসেন্স
+
+এই প্রজেক্ট MIT লাইসেন্স নীতিমালার অধীনে শর্তায়িত।
diff --git a/docs/bn/mkdocs.yml b/docs/bn/mkdocs.yml
new file mode 100644
index 0000000000..de18856f44
--- /dev/null
+++ b/docs/bn/mkdocs.yml
@@ -0,0 +1 @@
+INHERIT: ../en/mkdocs.yml
diff --git a/docs/de/docs/features.md b/docs/de/docs/features.md
index f281afd1ed..64fa8092d3 100644
--- a/docs/de/docs/features.md
+++ b/docs/de/docs/features.md
@@ -25,7 +25,7 @@ Mit einer interaktiven API-Dokumentation und explorativen webbasierten Benutzers
### Nur modernes Python
-Alles basiert auf **Python 3.6 Typ**-Deklarationen (dank Pydantic). Es muss keine neue Syntax gelernt werden, nur standardisiertes modernes Python.
+Alles basiert auf **Python 3.8 Typ**-Deklarationen (dank Pydantic). Es muss keine neue Syntax gelernt werden, nur standardisiertes modernes Python.
diff --git a/docs/de/docs/tutorial/background-tasks.md b/docs/de/docs/tutorial/background-tasks.md
new file mode 100644
index 0000000000..a7bfd55a7d
--- /dev/null
+++ b/docs/de/docs/tutorial/background-tasks.md
@@ -0,0 +1,126 @@
+# Hintergrundtasks
+
+Sie können Hintergrundtasks (Hintergrund-Aufgaben) definieren, die *nach* der Rückgabe einer Response ausgeführt werden sollen.
+
+Das ist nützlich für Vorgänge, die nach einem Request ausgeführt werden müssen, bei denen der Client jedoch nicht unbedingt auf den Abschluss des Vorgangs warten muss, bevor er die Response erhält.
+
+Hierzu zählen beispielsweise:
+
+* E-Mail-Benachrichtigungen, die nach dem Ausführen einer Aktion gesendet werden:
+ * Da die Verbindung zu einem E-Mail-Server und das Senden einer E-Mail in der Regel „langsam“ ist (einige Sekunden), können Sie die Response sofort zurücksenden und die E-Mail-Benachrichtigung im Hintergrund senden.
+* Daten verarbeiten:
+ * Angenommen, Sie erhalten eine Datei, die einen langsamen Prozess durchlaufen muss. Sie können als Response „Accepted“ (HTTP 202) zurückgeben und die Datei im Hintergrund verarbeiten.
+
+## `BackgroundTasks` verwenden
+
+Importieren Sie zunächst `BackgroundTasks` und definieren Sie einen Parameter in Ihrer *Pfadoperation-Funktion* mit der Typdeklaration `BackgroundTasks`:
+
+```Python hl_lines="1 13"
+{!../../../docs_src/background_tasks/tutorial001.py!}
+```
+
+**FastAPI** erstellt für Sie das Objekt vom Typ `BackgroundTasks` und übergibt es als diesen Parameter.
+
+## Eine Taskfunktion erstellen
+
+Erstellen Sie eine Funktion, die als Hintergrundtask ausgeführt werden soll.
+
+Es handelt sich schlicht um eine Standard-Funktion, die Parameter empfangen kann.
+
+Es kann sich um eine `async def`- oder normale `def`-Funktion handeln. **FastAPI** weiß, wie damit zu verfahren ist.
+
+In diesem Fall schreibt die Taskfunktion in eine Datei (den Versand einer E-Mail simulierend).
+
+Und da der Schreibvorgang nicht `async` und `await` verwendet, definieren wir die Funktion mit normalem `def`:
+
+```Python hl_lines="6-9"
+{!../../../docs_src/background_tasks/tutorial001.py!}
+```
+
+## Den Hintergrundtask hinzufügen
+
+Übergeben Sie innerhalb Ihrer *Pfadoperation-Funktion* Ihre Taskfunktion mit der Methode `.add_task()` an das *Hintergrundtasks*-Objekt:
+
+```Python hl_lines="14"
+{!../../../docs_src/background_tasks/tutorial001.py!}
+```
+
+`.add_task()` erhält als Argumente:
+
+* Eine Taskfunktion, die im Hintergrund ausgeführt wird (`write_notification`).
+* Eine beliebige Folge von Argumenten, die der Reihe nach an die Taskfunktion übergeben werden sollen (`email`).
+* Alle Schlüsselwort-Argumente, die an die Taskfunktion übergeben werden sollen (`message="some notification"`).
+
+## Dependency Injection
+
+Die Verwendung von `BackgroundTasks` funktioniert auch mit dem Dependency Injection System. Sie können einen Parameter vom Typ `BackgroundTasks` auf mehreren Ebenen deklarieren: in einer *Pfadoperation-Funktion*, in einer Abhängigkeit (Dependable), in einer Unterabhängigkeit usw.
+
+**FastAPI** weiß, was jeweils zu tun ist und wie dasselbe Objekt wiederverwendet werden kann, sodass alle Hintergrundtasks zusammengeführt und anschließend im Hintergrund ausgeführt werden:
+
+=== "Python 3.10+"
+
+ ```Python hl_lines="13 15 22 25"
+ {!> ../../../docs_src/background_tasks/tutorial002_an_py310.py!}
+ ```
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="13 15 22 25"
+ {!> ../../../docs_src/background_tasks/tutorial002_an_py39.py!}
+ ```
+
+=== "Python 3.8+"
+
+ ```Python hl_lines="14 16 23 26"
+ {!> ../../../docs_src/background_tasks/tutorial002_an.py!}
+ ```
+
+=== "Python 3.10+ nicht annotiert"
+
+ !!! tip "Tipp"
+ Bevorzugen Sie die `Annotated`-Version, falls möglich.
+
+ ```Python hl_lines="11 13 20 23"
+ {!> ../../../docs_src/background_tasks/tutorial002_py310.py!}
+ ```
+
+=== "Python 3.8+ nicht annotiert"
+
+ !!! tip "Tipp"
+ Bevorzugen Sie die `Annotated`-Version, falls möglich.
+
+ ```Python hl_lines="13 15 22 25"
+ {!> ../../../docs_src/background_tasks/tutorial002.py!}
+ ```
+
+In obigem Beispiel werden die Nachrichten, *nachdem* die Response gesendet wurde, in die Datei `log.txt` geschrieben.
+
+Wenn im Request ein Query-Parameter enthalten war, wird dieser in einem Hintergrundtask in das Log geschrieben.
+
+Und dann schreibt ein weiterer Hintergrundtask, der in der *Pfadoperation-Funktion* erstellt wird, eine Nachricht unter Verwendung des Pfad-Parameters `email`.
+
+## Technische Details
+
+Die Klasse `BackgroundTasks` stammt direkt von `starlette.background`.
+
+Sie wird direkt in FastAPI importiert/inkludiert, sodass Sie sie von `fastapi` importieren können und vermeiden, versehentlich das alternative `BackgroundTask` (ohne das `s` am Ende) von `starlette.background` zu importieren.
+
+Indem Sie nur `BackgroundTasks` (und nicht `BackgroundTask`) verwenden, ist es dann möglich, es als *Pfadoperation-Funktion*-Parameter zu verwenden und **FastAPI** den Rest für Sie erledigen zu lassen, genau wie bei der direkten Verwendung des `Request`-Objekts.
+
+Es ist immer noch möglich, `BackgroundTask` allein in FastAPI zu verwenden, aber Sie müssen das Objekt in Ihrem Code erstellen und eine Starlette-`Response` zurückgeben, die es enthält.
+
+Weitere Details finden Sie in der offiziellen Starlette-Dokumentation für Hintergrundtasks.
+
+## Vorbehalt
+
+Wenn Sie umfangreiche Hintergrundberechnungen durchführen müssen und diese nicht unbedingt vom selben Prozess ausgeführt werden müssen (z. B. müssen Sie Speicher, Variablen, usw. nicht gemeinsam nutzen), könnte die Verwendung anderer größerer Tools wie z. B. Celery von Vorteil sein.
+
+Sie erfordern in der Regel komplexere Konfigurationen und einen Nachrichten-/Job-Queue-Manager wie RabbitMQ oder Redis, ermöglichen Ihnen jedoch die Ausführung von Hintergrundtasks in mehreren Prozessen und insbesondere auf mehreren Servern.
+
+Um ein Beispiel zu sehen, sehen Sie sich die [Projektgeneratoren](../project-generation.md){.internal-link target=_blank} an. Sie alle enthalten Celery, bereits konfiguriert.
+
+Wenn Sie jedoch über dieselbe **FastAPI**-Anwendung auf Variablen und Objekte zugreifen oder kleine Hintergrundtasks ausführen müssen (z. B. das Senden einer E-Mail-Benachrichtigung), können Sie einfach `BackgroundTasks` verwenden.
+
+## Zusammenfassung
+
+Importieren und verwenden Sie `BackgroundTasks` mit Parametern in *Pfadoperation-Funktionen* und Abhängigkeiten, um Hintergrundtasks hinzuzufügen.
diff --git a/docs/de/docs/tutorial/first-steps.md b/docs/de/docs/tutorial/first-steps.md
new file mode 100644
index 0000000000..27ba3ec167
--- /dev/null
+++ b/docs/de/docs/tutorial/first-steps.md
@@ -0,0 +1,333 @@
+# Erste Schritte
+
+Die einfachste FastAPI-Datei könnte wie folgt aussehen:
+
+```Python
+{!../../../docs_src/first_steps/tutorial001.py!}
+```
+
+Kopieren Sie dies in eine Datei `main.py`.
+
+Starten Sie den Live-Server:
+
+get-Operation gehen
+
+!!! info "`@decorator` Information"
+ Diese `@something`-Syntax wird in Python „Dekorator“ genannt.
+
+ Sie platzieren ihn über einer Funktion. Wie ein hübscher, dekorativer Hut (daher kommt wohl der Begriff).
+
+ Ein „Dekorator“ nimmt die darunter stehende Funktion und macht etwas damit.
+
+ In unserem Fall teilt dieser Dekorator **FastAPI** mit, dass die folgende Funktion mit dem **Pfad** `/` und der **Operation** `get` zusammenhängt.
+
+ Dies ist der „**Pfadoperation-Dekorator**“.
+
+Sie können auch die anderen Operationen verwenden:
+
+* `@app.post()`
+* `@app.put()`
+* `@app.delete()`
+
+Oder die exotischeren:
+
+* `@app.options()`
+* `@app.head()`
+* `@app.patch()`
+* `@app.trace()`
+
+!!! tip "Tipp"
+ Es steht Ihnen frei, jede Operation (HTTP-Methode) so zu verwenden, wie Sie es möchten.
+
+ **FastAPI** erzwingt keine bestimmte Bedeutung.
+
+ Die hier aufgeführten Informationen dienen als Leitfaden und sind nicht verbindlich.
+
+ Wenn Sie beispielsweise GraphQL verwenden, führen Sie normalerweise alle Aktionen nur mit „POST“-Operationen durch.
+
+### Schritt 4: Definieren der **Pfadoperation-Funktion**
+
+Das ist unsere „**Pfadoperation-Funktion**“:
+
+* **Pfad**: ist `/`.
+* **Operation**: ist `get`.
+* **Funktion**: ist die Funktion direkt unter dem „Dekorator“ (unter `@app.get("/")`).
+
+```Python hl_lines="7"
+{!../../../docs_src/first_steps/tutorial001.py!}
+```
+
+Dies ist eine Python-Funktion.
+
+Sie wird von **FastAPI** immer dann aufgerufen, wenn sie eine Anfrage an die URL "`/`" mittels einer `GET`-Operation erhält.
+
+In diesem Fall handelt es sich um eine `async`-Funktion.
+
+---
+
+Sie könnten sie auch als normale Funktion anstelle von `async def` definieren:
+
+```Python hl_lines="7"
+{!../../../docs_src/first_steps/tutorial003.py!}
+```
+
+!!! note "Hinweis"
+ Wenn Sie den Unterschied nicht kennen, lesen Sie [Async: *„In Eile?“*](../async.md#in-eile){.internal-link target=_blank}.
+
+### Schritt 5: den Inhalt zurückgeben
+
+```Python hl_lines="8"
+{!../../../docs_src/first_steps/tutorial001.py!}
+```
+
+Sie können ein `dict`, eine `list`, einzelne Werte wie `str`, `int`, usw. zurückgeben.
+
+Sie können auch Pydantic-Modelle zurückgeben (dazu später mehr).
+
+Es gibt viele andere Objekte und Modelle, die automatisch zu JSON konvertiert werden (einschließlich ORMs usw.). Versuchen Sie, Ihre Lieblingsobjekte zu verwenden. Es ist sehr wahrscheinlich, dass sie bereits unterstützt werden.
+
+## Zusammenfassung
+
+* Importieren Sie `FastAPI`.
+* Erstellen Sie eine `app` Instanz.
+* Schreiben Sie einen **Pfadoperation-Dekorator** (wie z. B. `@app.get("/")`).
+* Schreiben Sie eine **Pfadoperation-Funktion** (wie z. B. oben `def root(): ...`).
+* Starten Sie den Entwicklungsserver (z. B. `uvicorn main:app --reload`).
diff --git a/docs/de/docs/tutorial/index.md b/docs/de/docs/tutorial/index.md
new file mode 100644
index 0000000000..dd7ed43bda
--- /dev/null
+++ b/docs/de/docs/tutorial/index.md
@@ -0,0 +1,80 @@
+# Tutorial - Benutzerhandbuch - Intro
+
+Diese Anleitung zeigt Ihnen Schritt für Schritt, wie Sie **FastAPI** mit den meisten Funktionen nutzen können.
+
+Jeder Abschnitt baut schrittweise auf den vorhergehenden auf. Diese Abschnitte sind aber nach einzelnen Themen gegliedert, sodass Sie direkt zu einem bestimmten Thema übergehen können, um Ihre speziellen API-Anforderungen zu lösen.
+
+Außerdem dienen diese als zukünftige Referenz.
+
+Dadurch können Sie jederzeit zurückkommen und sehen genau das, was Sie benötigen.
+
+## Den Code ausführen
+
+Alle Codeblöcke können kopiert und direkt verwendet werden (da es sich um getestete Python-Dateien handelt).
+
+Um eines der Beispiele auszuführen, kopieren Sie den Code in die Datei `main.py`, und starten Sie `uvicorn` mit:
+
+
-
-## 👤-🕸 🕸 & 🎚 🩺
-
-🛠️ 🩺 ⚙️ **🦁 🎚** & **📄**, & 🔠 👈 💪 🕸 & 🎚 📁.
-
-🔢, 👈 📁 🍦 ⚪️➡️ 💲.
-
-✋️ ⚫️ 💪 🛃 ⚫️, 👆 💪 ⚒ 🎯 💲, ⚖️ 🍦 📁 👆.
-
-👈 ⚠, 🖼, 🚥 👆 💪 👆 📱 🚧 👷 ⏪ 📱, 🍵 📂 🕸 🔐, ⚖️ 🇧🇿 🕸.
-
-📥 👆 🔜 👀 ❔ 🍦 👈 📁 👆, 🎏 FastAPI 📱, & 🔗 🩺 ⚙️ 👫.
-
-### 🏗 📁 📊
-
-➡️ 💬 👆 🏗 📁 📊 👀 💖 👉:
-
-```
-.
-├── app
-│ ├── __init__.py
-│ ├── main.py
-```
-
-🔜 ✍ 📁 🏪 📚 🎻 📁.
-
-👆 🆕 📁 📊 💪 👀 💖 👉:
-
-```
-.
-├── app
-│ ├── __init__.py
-│ ├── main.py
-└── static/
-```
-
-### ⏬ 📁
-
-⏬ 🎻 📁 💪 🩺 & 🚮 👫 🔛 👈 `static/` 📁.
-
-👆 💪 🎲 ▶️️-🖊 🔠 🔗 & 🖊 🎛 🎏 `Save link as...`.
-
-**🦁 🎚** ⚙️ 📁:
-
-* `swagger-ui-bundle.js`
-* `swagger-ui.css`
-
-& **📄** ⚙️ 📁:
-
-* `redoc.standalone.js`
-
-⏮️ 👈, 👆 📁 📊 💪 👀 💖:
-
-```
-.
-├── app
-│ ├── __init__.py
-│ ├── main.py
-└── static
- ├── redoc.standalone.js
- ├── swagger-ui-bundle.js
- └── swagger-ui.css
-```
-
-### 🍦 🎻 📁
-
-* 🗄 `StaticFiles`.
-* "🗻" `StaticFiles()` 👐 🎯 ➡.
-
-```Python hl_lines="7 11"
-{!../../../docs_src/extending_openapi/tutorial002.py!}
-```
-
-### 💯 🎻 📁
-
-▶️ 👆 🈸 & 🚶 http://127.0.0.1:8000/static/redoc.standalone.js.
-
-👆 🔜 👀 📶 📏 🕸 📁 **📄**.
-
-⚫️ 💪 ▶️ ⏮️ 🕳 💖:
-
-```JavaScript
-/*!
- * ReDoc - OpenAPI/Swagger-generated API Reference Documentation
- * -------------------------------------------------------------
- * Version: "2.0.0-rc.18"
- * Repo: https://github.com/Redocly/redoc
- */
-!function(e,t){"object"==typeof exports&&"object"==typeof m
-
-...
-```
-
-👈 ✔ 👈 👆 💆♂ 💪 🍦 🎻 📁 ⚪️➡️ 👆 📱, & 👈 👆 🥉 🎻 📁 🩺 ☑ 🥉.
-
-🔜 👥 💪 🔗 📱 ⚙️ 📚 🎻 📁 🩺.
-
-### ❎ 🏧 🩺
-
-🥇 🔁 ❎ 🏧 🩺, 📚 ⚙️ 💲 🔢.
-
-❎ 👫, ⚒ 👫 📛 `None` 🕐❔ 🏗 👆 `FastAPI` 📱:
-
-```Python hl_lines="9"
-{!../../../docs_src/extending_openapi/tutorial002.py!}
-```
-
-### 🔌 🛃 🩺
-
-🔜 👆 💪 ✍ *➡ 🛠️* 🛃 🩺.
-
-👆 💪 🏤-⚙️ FastAPI 🔗 🔢 ✍ 🕸 📃 🩺, & 🚶♀️ 👫 💪 ❌:
-
-* `openapi_url`: 📛 🌐❔ 🕸 📃 🩺 💪 🤚 🗄 🔗 👆 🛠️. 👆 💪 ⚙️ 📥 🔢 `app.openapi_url`.
-* `title`: 📛 👆 🛠️.
-* `oauth2_redirect_url`: 👆 💪 ⚙️ `app.swagger_ui_oauth2_redirect_url` 📥 ⚙️ 🔢.
-* `swagger_js_url`: 📛 🌐❔ 🕸 👆 🦁 🎚 🩺 💪 🤚 **🕸** 📁. 👉 1️⃣ 👈 👆 👍 📱 🔜 🍦.
-* `swagger_css_url`: 📛 🌐❔ 🕸 👆 🦁 🎚 🩺 💪 🤚 **🎚** 📁. 👉 1️⃣ 👈 👆 👍 📱 🔜 🍦.
-
-& ➡ 📄...
-
-```Python hl_lines="2-6 14-22 25-27 30-36"
-{!../../../docs_src/extending_openapi/tutorial002.py!}
-```
-
-!!! tip
- *➡ 🛠️* `swagger_ui_redirect` 👩🎓 🕐❔ 👆 ⚙️ Oauth2️⃣.
-
- 🚥 👆 🛠️ 👆 🛠️ ⏮️ Oauth2️⃣ 🐕🦺, 👆 🔜 💪 🔓 & 👟 🔙 🛠️ 🩺 ⏮️ 📎 🎓. & 🔗 ⏮️ ⚫️ ⚙️ 🎰 Oauth2️⃣ 🤝.
-
- 🦁 🎚 🔜 🍵 ⚫️ ⛅ 🎑 👆, ✋️ ⚫️ 💪 👉 "❎" 👩🎓.
-
-### ✍ *➡ 🛠️* 💯 ⚫️
-
-🔜, 💪 💯 👈 🌐 👷, ✍ *➡ 🛠️*:
-
-```Python hl_lines="39-41"
-{!../../../docs_src/extending_openapi/tutorial002.py!}
-```
-
-### 💯 ⚫️
-
-🔜, 👆 🔜 💪 🔌 👆 📻, 🚶 👆 🩺 http://127.0.0.1:8000/docs, & 🔃 📃.
-
-& 🍵 🕸, 👆 🔜 💪 👀 🩺 👆 🛠️ & 🔗 ⏮️ ⚫️.
-
-## 🛠️ 🦁 🎚
-
-👆 💪 🔗 ➕ 🦁 🎚 🔢.
-
-🔗 👫, 🚶♀️ `swagger_ui_parameters` ❌ 🕐❔ 🏗 `FastAPI()` 📱 🎚 ⚖️ `get_swagger_ui_html()` 🔢.
-
-`swagger_ui_parameters` 📨 📖 ⏮️ 📳 🚶♀️ 🦁 🎚 🔗.
-
-FastAPI 🗜 📳 **🎻** ⚒ 👫 🔗 ⏮️ 🕸, 👈 ⚫️❔ 🦁 🎚 💪.
-
-### ❎ ❕ 🎦
-
-🖼, 👆 💪 ❎ ❕ 🎦 🦁 🎚.
-
-🍵 🔀 ⚒, ❕ 🎦 🛠️ 🔢:
-
-
-
-✋️ 👆 💪 ❎ ⚫️ ⚒ `syntaxHighlight` `False`:
-
-```Python hl_lines="3"
-{!../../../docs_src/extending_openapi/tutorial003.py!}
-```
-
-...& ⤴️ 🦁 🎚 🏆 🚫 🎦 ❕ 🎦 🚫🔜:
-
-
-
-### 🔀 🎢
-
-🎏 🌌 👆 💪 ⚒ ❕ 🎦 🎢 ⏮️ 🔑 `"syntaxHighlight.theme"` (👀 👈 ⚫️ ✔️ ❣ 🖕):
-
-```Python hl_lines="3"
-{!../../../docs_src/extending_openapi/tutorial004.py!}
-```
-
-👈 📳 🔜 🔀 ❕ 🎦 🎨 🎢:
-
-
-
-### 🔀 🔢 🦁 🎚 🔢
-
-FastAPI 🔌 🔢 📳 🔢 ☑ 🌅 ⚙️ 💼.
-
-⚫️ 🔌 👫 🔢 📳:
-
-```Python
-{!../../../fastapi/openapi/docs.py[ln:7-13]!}
-```
-
-👆 💪 🔐 🙆 👫 ⚒ 🎏 💲 ❌ `swagger_ui_parameters`.
-
-🖼, ❎ `deepLinking` 👆 💪 🚶♀️ 👉 ⚒ `swagger_ui_parameters`:
-
-```Python hl_lines="3"
-{!../../../docs_src/extending_openapi/tutorial005.py!}
-```
-
-### 🎏 🦁 🎚 🔢
-
-👀 🌐 🎏 💪 📳 👆 💪 ⚙️, ✍ 🛂 🩺 🦁 🎚 🔢.
-
-### 🕸-🕴 ⚒
-
-🦁 🎚 ✔ 🎏 📳 **🕸-🕴** 🎚 (🖼, 🕸 🔢).
-
-FastAPI 🔌 👫 🕸-🕴 `presets` ⚒:
-
-```JavaScript
-presets: [
- SwaggerUIBundle.presets.apis,
- SwaggerUIBundle.SwaggerUIStandalonePreset
-]
-```
-
-👫 **🕸** 🎚, 🚫 🎻, 👆 💪 🚫 🚶♀️ 👫 ⚪️➡️ 🐍 📟 🔗.
-
-🚥 👆 💪 ⚙️ 🕸-🕴 📳 💖 📚, 👆 💪 ⚙️ 1️⃣ 👩🔬 🔛. 🔐 🌐 🦁 🎚 *➡ 🛠️* & ❎ ✍ 🙆 🕸 👆 💪.
diff --git a/docs/em/docs/advanced/security/oauth2-scopes.md b/docs/em/docs/advanced/security/oauth2-scopes.md
index a4684352cc..d82fe152be 100644
--- a/docs/em/docs/advanced/security/oauth2-scopes.md
+++ b/docs/em/docs/advanced/security/oauth2-scopes.md
@@ -56,7 +56,7 @@ Oauth2️⃣ 🔧 🔬 "↔" 📇 🎻 🎏 🚀.
🥇, ➡️ 🔜 👀 🍕 👈 🔀 ⚪️➡️ 🖼 👑 **🔰 - 👩💻 🦮** [Oauth2️⃣ ⏮️ 🔐 (& 🔁), 📨 ⏮️ 🥙 🤝](../../tutorial/security/oauth2-jwt.md){.internal-link target=_blank}. 🔜 ⚙️ Oauth2️⃣ ↔:
-```Python hl_lines="2 4 8 12 46 64 105 107-115 121-124 128-134 139 153"
+```Python hl_lines="2 4 8 12 46 64 105 107-115 121-124 128-134 139 155"
{!../../../docs_src/security/tutorial005.py!}
```
@@ -93,7 +93,7 @@ Oauth2️⃣ 🔧 🔬 "↔" 📇 🎻 🎏 🚀.
✋️ 👆 🈸, 💂♂, 👆 🔜 ⚒ 💭 👆 🕴 🚮 ↔ 👈 👩💻 🤙 💪 ✔️, ⚖️ 🕐 👆 ✔️ 🔁.
-```Python hl_lines="153"
+```Python hl_lines="155"
{!../../../docs_src/security/tutorial005.py!}
```
@@ -118,7 +118,7 @@ Oauth2️⃣ 🔧 🔬 "↔" 📇 🎻 🎏 🚀.
👥 🔨 ⚫️ 📥 🎦 ❔ **FastAPI** 🍵 ↔ 📣 🎏 🎚.
-```Python hl_lines="4 139 166"
+```Python hl_lines="4 139 168"
{!../../../docs_src/security/tutorial005.py!}
```
diff --git a/docs/em/docs/advanced/settings.md b/docs/em/docs/advanced/settings.md
index bc50bf755a..2ebe8ffcbe 100644
--- a/docs/em/docs/advanced/settings.md
+++ b/docs/em/docs/advanced/settings.md
@@ -221,7 +221,7 @@ $ ADMIN_EMAIL="deadpool@example.com" APP_NAME="ChimichangApp" uvicorn main:app
```
!!! tip
- 👥 🔜 🔬 `@lru_cache()` 🍖.
+ 👥 🔜 🔬 `@lru_cache` 🍖.
🔜 👆 💪 🤔 `get_settings()` 😐 🔢.
@@ -254,7 +254,7 @@ $ ADMIN_EMAIL="deadpool@example.com" APP_NAME="ChimichangApp" uvicorn main:app
✋️ 🇨🇻 📁 🚫 🤙 ✔️ ✔️ 👈 ☑ 📁.
-Pydantic ✔️ 🐕🦺 👂 ⚪️➡️ 👉 🆎 📁 ⚙️ 🔢 🗃. 👆 💪 ✍ 🌖 Pydantic ⚒: 🇨🇻 (.🇨🇻) 🐕🦺.
+Pydantic ✔️ 🐕🦺 👂 ⚪️➡️ 👉 🆎 📁 ⚙️ 🔢 🗃. 👆 💪 ✍ 🌖 Pydantic ⚒: 🇨🇻 (.🇨🇻) 🐕🦺.
!!! tip
👉 👷, 👆 💪 `pip install python-dotenv`.
@@ -302,7 +302,7 @@ def get_settings():
👥 🔜 ✍ 👈 🎚 🔠 📨, & 👥 🔜 👂 `.env` 📁 🔠 📨. 👶 👶
-✋️ 👥 ⚙️ `@lru_cache()` 👨🎨 🔛 🔝, `Settings` 🎚 🔜 ✍ 🕴 🕐, 🥇 🕰 ⚫️ 🤙. 👶 👶
+✋️ 👥 ⚙️ `@lru_cache` 👨🎨 🔛 🔝, `Settings` 🎚 🔜 ✍ 🕴 🕐, 🥇 🕰 ⚫️ 🤙. 👶 👶
```Python hl_lines="1 10"
{!../../../docs_src/settings/app03/main.py!}
@@ -312,14 +312,14 @@ def get_settings():
#### `lru_cache` 📡 ℹ
-`@lru_cache()` 🔀 🔢 ⚫️ 🎀 📨 🎏 💲 👈 📨 🥇 🕰, ↩️ 💻 ⚫️ 🔄, 🛠️ 📟 🔢 🔠 🕰.
+`@lru_cache` 🔀 🔢 ⚫️ 🎀 📨 🎏 💲 👈 📨 🥇 🕰, ↩️ 💻 ⚫️ 🔄, 🛠️ 📟 🔢 🔠 🕰.
, 🔢 🔛 ⚫️ 🔜 🛠️ 🕐 🔠 🌀 ❌. & ⤴️ 💲 📨 🔠 👈 🌀 ❌ 🔜 ⚙️ 🔄 & 🔄 🕐❔ 🔢 🤙 ⏮️ ⚫️❔ 🎏 🌀 ❌.
🖼, 🚥 👆 ✔️ 🔢:
```Python
-@lru_cache()
+@lru_cache
def say_hi(name: str, salutation: str = "Ms."):
return f"Hello {salutation} {name}"
```
@@ -371,7 +371,7 @@ participant execute as Execute function
👈 🌌, ⚫️ 🎭 🌖 🚥 ⚫️ 🌐 🔢. ✋️ ⚫️ ⚙️ 🔗 🔢, ⤴️ 👥 💪 🔐 ⚫️ 💪 🔬.
-`@lru_cache()` 🍕 `functools` ❔ 🍕 🐍 🐩 🗃, 👆 💪 ✍ 🌅 🔃 ⚫️ 🐍 🩺 `@lru_cache()`.
+`@lru_cache` 🍕 `functools` ❔ 🍕 🐍 🐩 🗃, 👆 💪 ✍ 🌅 🔃 ⚫️ 🐍 🩺 `@lru_cache`.
## 🌃
@@ -379,4 +379,4 @@ participant execute as Execute function
* ⚙️ 🔗 👆 💪 📉 🔬.
* 👆 💪 ⚙️ `.env` 📁 ⏮️ ⚫️.
-* ⚙️ `@lru_cache()` ➡️ 👆 ❎ 👂 🇨🇻 📁 🔄 & 🔄 🔠 📨, ⏪ 🤝 👆 🔐 ⚫️ ⏮️ 🔬.
+* ⚙️ `@lru_cache` ➡️ 👆 ❎ 👂 🇨🇻 📁 🔄 & 🔄 🔠 📨, ⏪ 🤝 👆 🔐 ⚫️ ⏮️ 🔬.
diff --git a/docs/em/docs/advanced/templates.md b/docs/em/docs/advanced/templates.md
index 1fb57725af..0a73a4f47e 100644
--- a/docs/em/docs/advanced/templates.md
+++ b/docs/em/docs/advanced/templates.md
@@ -27,7 +27,7 @@ $ pip install jinja2
* 📣 `Request` 🔢 *➡ 🛠️* 👈 🔜 📨 📄.
* ⚙️ `templates` 👆 ✍ ✍ & 📨 `TemplateResponse`, 🚶♀️ `request` 1️⃣ 🔑-💲 👫 Jinja2️⃣ "🔑".
-```Python hl_lines="4 11 15-16"
+```Python hl_lines="4 11 15-18"
{!../../../docs_src/templates/tutorial001.py!}
```
diff --git a/docs/em/docs/async.md b/docs/em/docs/async.md
index 13b362b5de..ddcae15739 100644
--- a/docs/em/docs/async.md
+++ b/docs/em/docs/async.md
@@ -409,11 +409,11 @@ async def read_burgers():
### 🔗
-🎏 ✔ [🔗](/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` 🔜 🤙 🔛 🔢 🧵 (⚪️➡️ 🧵) ↩️ ➖ "⌛".
### 🎏 🚙 🔢
diff --git a/docs/em/docs/deployment/concepts.md b/docs/em/docs/deployment/concepts.md
index 8ce7754114..162b68615a 100644
--- a/docs/em/docs/deployment/concepts.md
+++ b/docs/em/docs/deployment/concepts.md
@@ -43,7 +43,7 @@
* ⏮️ 🔢 🦲 💖 Certbot 📄 🔕
* ✳
* ⏮️ 🔢 🦲 💖 Certbot 📄 🔕
-* Kubernete ⏮️ 🚧 🕹 💖 👌
+* Kubernetes ⏮️ 🚧 🕹 💖 👌
* ⏮️ 🔢 🦲 💖 🛂-👨💼 📄 🔕
* 🍵 🔘 ☁ 🐕🦺 🍕 👫 🐕🦺 (✍ 🔛 👶)
@@ -115,7 +115,7 @@
🖼 🧰 👈 💪 👉 👨🏭:
* ☁
-* Kubernete
+* Kubernetes
* ☁ ✍
* ☁ 🐝 📳
* ✳
@@ -165,7 +165,7 @@
🖼, 👉 💪 🍵:
* ☁
-* Kubernete
+* Kubernetes
* ☁ ✍
* ☁ 🐝 📳
* ✳
@@ -233,15 +233,15 @@
* 🐁 🔜 **🛠️ 👨💼** 👂 🔛 **📢** & **⛴**, 🧬 🔜 ✔️ **💗 Uvicorn 👨🏭 🛠️**
* **Uvicorn** 🛠️ **Uvicorn 👨🏭**
* 1️⃣ Uvicorn **🛠️ 👨💼** 🔜 👂 🔛 **📢** & **⛴**, & ⚫️ 🔜 ▶️ **💗 Uvicorn 👨🏭 🛠️**
-* **Kubernete** & 🎏 📎 **📦 ⚙️**
+* **Kubernetes** & 🎏 📎 **📦 ⚙️**
* 🕳 **☁** 🧽 🔜 👂 🔛 **📢** & **⛴**. 🧬 🔜 ✔️ **💗 📦**, 🔠 ⏮️ **1️⃣ Uvicorn 🛠️** 🏃♂
* **☁ 🐕🦺** 👈 🍵 👉 👆
* ☁ 🐕🦺 🔜 🎲 **🍵 🧬 👆**. ⚫️ 🔜 🎲 ➡️ 👆 🔬 **🛠️ 🏃**, ⚖️ **📦 🖼** ⚙️, 🙆 💼, ⚫️ 🔜 🌅 🎲 **👁 Uvicorn 🛠️**, & ☁ 🐕🦺 🔜 🈚 🔁 ⚫️.
!!! tip
- 🚫 😟 🚥 👫 🏬 🔃 **📦**, ☁, ⚖️ Kubernete 🚫 ⚒ 📚 🔑.
+ 🚫 😟 🚥 👫 🏬 🔃 **📦**, ☁, ⚖️ Kubernetes 🚫 ⚒ 📚 🔑.
- 👤 🔜 💬 👆 🌅 🔃 📦 🖼, ☁, Kubernete, ♒️. 🔮 📃: [FastAPI 📦 - ☁](./docker.md){.internal-link target=_blank}.
+ 👤 🔜 💬 👆 🌅 🔃 📦 🖼, ☁, Kubernetes, ♒️. 🔮 📃: [FastAPI 📦 - ☁](./docker.md){.internal-link target=_blank}.
## ⏮️ 🔁 ⏭ ▶️
@@ -268,7 +268,7 @@
📥 💪 💭:
-* "🕑 📦" Kubernete 👈 🏃 ⏭ 👆 📱 📦
+* "🕑 📦" Kubernetes 👈 🏃 ⏭ 👆 📱 📦
* 🎉 ✍ 👈 🏃 ⏮️ 🔁 & ⤴️ ▶️ 👆 🈸
* 👆 🔜 💪 🌌 ▶️/⏏ *👈* 🎉 ✍, 🔍 ❌, ♒️.
diff --git a/docs/em/docs/deployment/deta.md b/docs/em/docs/deployment/deta.md
deleted file mode 100644
index 89b6c4bdbe..0000000000
--- a/docs/em/docs/deployment/deta.md
+++ /dev/null
@@ -1,258 +0,0 @@
-# 🛠️ FastAPI 🔛 🪔
-
-👉 📄 👆 🔜 💡 ❔ 💪 🛠️ **FastAPI** 🈸 🔛 🪔 ⚙️ 🆓 📄. 👶
-
-⚫️ 🔜 ✊ 👆 🔃 **1️⃣0️⃣ ⏲**.
-
-!!! info
- 🪔 **FastAPI** 💰. 👶
-
-## 🔰 **FastAPI** 📱
-
-* ✍ 📁 👆 📱, 🖼, `./fastapideta/` & ⛔ 🔘 ⚫️.
-
-### FastAPI 📟
-
-* ✍ `main.py` 📁 ⏮️:
-
-```Python
-from fastapi import FastAPI
-
-app = FastAPI()
-
-
-@app.get("/")
-def read_root():
- return {"Hello": "World"}
-
-
-@app.get("/items/{item_id}")
-def read_item(item_id: int):
- return {"item_id": item_id}
-```
-
-### 📄
-
-🔜, 🎏 📁 ✍ 📁 `requirements.txt` ⏮️:
-
-```text
-fastapi
-```
-
-!!! tip
- 👆 🚫 💪 ❎ Uvicorn 🛠️ 🔛 🪔, 👐 👆 🔜 🎲 💚 ❎ ⚫️ 🌐 💯 👆 📱.
-
-### 📁 📊
-
-👆 🔜 🔜 ✔️ 1️⃣ 📁 `./fastapideta/` ⏮️ 2️⃣ 📁:
-
-```
-.
-└── main.py
-└── requirements.txt
-```
-
-## ✍ 🆓 🪔 🏧
-
-🔜 ✍ 🆓 🏧 🔛 🪔, 👆 💪 📧 & 🔐.
-
-👆 🚫 💪 💳.
-
-## ❎ ✳
-
-🕐 👆 ✔️ 👆 🏧, ❎ 🪔 ✳:
-
-=== "💾, 🇸🇻"
-
-
-
-## 🛠️ 📢 🔐
-
-🔢, 🪔 🔜 🍵 🤝 ⚙️ 🍪 👆 🏧.
-
-✋️ 🕐 👆 🔜, 👆 💪 ⚒ ⚫️ 📢 ⏮️:
-
-
-
-## 💡 🌅
-
-☝, 👆 🔜 🎲 💚 🏪 💽 👆 📱 🌌 👈 😣 🔘 🕰. 👈 👆 💪 ⚙️ 🪔 🧢, ⚫️ ✔️ 👍 **🆓 🎚**.
-
-👆 💪 ✍ 🌅 🪔 🩺.
-
-## 🛠️ 🔧
-
-👟 🔙 🔧 👥 🔬 [🛠️ 🔧](./concepts.md){.internal-link target=_blank}, 📥 ❔ 🔠 👫 🔜 🍵 ⏮️ 🪔:
-
-* **🇺🇸🔍**: 🍵 🪔, 👫 🔜 🤝 👆 📁 & 🍵 🇺🇸🔍 🔁.
-* **🏃♂ 🔛 🕴**: 🍵 🪔, 🍕 👫 🐕🦺.
-* **⏏**: 🍵 🪔, 🍕 👫 🐕🦺.
-* **🧬**: 🍵 🪔, 🍕 👫 🐕🦺.
-* **💾**: 📉 🔁 🪔, 👆 💪 📧 👫 📈 ⚫️.
-* **⏮️ 🔁 ⏭ ▶️**: 🚫 🔗 🐕🦺, 👆 💪 ⚒ ⚫️ 👷 ⏮️ 👫 💾 ⚙️ ⚖️ 🌖 ✍.
-
-!!! note
- 🪔 🔧 ⚒ ⚫️ ⏩ (& 🆓) 🛠️ 🙅 🈸 🔜.
-
- ⚫️ 💪 📉 📚 ⚙️ 💼, ✋️ 🎏 🕰, ⚫️ 🚫 🐕🦺 🎏, 💖 ⚙️ 🔢 💽 (↖️ ⚪️➡️ 🪔 👍 ☁ 💽 ⚙️), 🛃 🕹 🎰, ♒️.
-
- 👆 💪 ✍ 🌅 ℹ 🪔 🩺 👀 🚥 ⚫️ ▶️️ ⚒ 👆.
diff --git a/docs/em/docs/deployment/docker.md b/docs/em/docs/deployment/docker.md
index 51ece5599e..f28735ed71 100644
--- a/docs/em/docs/deployment/docker.md
+++ b/docs/em/docs/deployment/docker.md
@@ -74,7 +74,7 @@ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]
, 👆 🔜 🏃 **💗 📦** ⏮️ 🎏 👜, 💖 💽, 🐍 🈸, 🕸 💽 ⏮️ 😥 🕸 🈸, & 🔗 👫 👯♂️ 📨 👫 🔗 🕸.
-🌐 📦 🧾 ⚙️ (💖 ☁ ⚖️ Kubernete) ✔️ 👫 🕸 ⚒ 🛠️ 🔘 👫.
+🌐 📦 🧾 ⚙️ (💖 ☁ ⚖️ Kubernetes) ✔️ 👫 🕸 ⚒ 🛠️ 🔘 👫.
## 📦 & 🛠️
@@ -96,7 +96,7 @@ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]
👉 ⚫️❔ 👆 🔜 💚 **🏆 💼**, 🖼:
-* ⚙️ **Kubernete** ⚖️ 🎏 🧰
+* ⚙️ **Kubernetes** ⚖️ 🎏 🧰
* 🕐❔ 🏃♂ 🔛 **🍓 👲**
* ⚙️ ☁ 🐕🦺 👈 🔜 🏃 📦 🖼 👆, ♒️.
@@ -395,7 +395,7 @@ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
⚫️ 💪 ➕1️⃣ 📦, 🖼 ⏮️ Traefik, 🚚 **🇺🇸🔍** & **🏧** 🛠️ **📄**.
!!! tip
- Traefik ✔️ 🛠️ ⏮️ ☁, Kubernete, & 🎏, ⚫️ 📶 ⏩ ⚒ 🆙 & 🔗 🇺🇸🔍 👆 📦 ⏮️ ⚫️.
+ Traefik ✔️ 🛠️ ⏮️ ☁, Kubernetes, & 🎏, ⚫️ 📶 ⏩ ⚒ 🆙 & 🔗 🇺🇸🔍 👆 📦 ⏮️ ⚫️.
👐, 🇺🇸🔍 💪 🍵 ☁ 🐕🦺 1️⃣ 👫 🐕🦺 (⏪ 🏃 🈸 📦).
@@ -403,7 +403,7 @@ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
📤 🛎 ➕1️⃣ 🧰 🈚 **▶️ & 🏃♂** 👆 📦.
-⚫️ 💪 **☁** 🔗, **☁ ✍**, **Kubernete**, **☁ 🐕🦺**, ♒️.
+⚫️ 💪 **☁** 🔗, **☁ ✍**, **Kubernetes**, **☁ 🐕🦺**, ♒️.
🌅 (⚖️ 🌐) 💼, 📤 🙅 🎛 🛠️ 🏃 📦 🔛 🕴 & 🛠️ ⏏ 🔛 ❌. 🖼, ☁, ⚫️ 📋 ⏸ 🎛 `--restart`.
@@ -413,7 +413,7 @@ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
🚥 👆 ✔️ 🌑 🎰 ⏮️ **☁**, ☁ 🐝 📳, 🖖, ⚖️ ➕1️⃣ 🎏 🏗 ⚙️ 🛠️ 📎 📦 🔛 💗 🎰, ⤴️ 👆 🔜 🎲 💚 **🍵 🧬** **🌑 🎚** ↩️ ⚙️ **🛠️ 👨💼** (💖 🐁 ⏮️ 👨🏭) 🔠 📦.
-1️⃣ 📚 📎 📦 🧾 ⚙️ 💖 Kubernete 🛎 ✔️ 🛠️ 🌌 🚚 **🧬 📦** ⏪ 🔗 **📐 ⚖** 📨 📨. 🌐 **🌑 🎚**.
+1️⃣ 📚 📎 📦 🧾 ⚙️ 💖 Kubernetes 🛎 ✔️ 🛠️ 🌌 🚚 **🧬 📦** ⏪ 🔗 **📐 ⚖** 📨 📨. 🌐 **🌑 🎚**.
📚 💼, 👆 🔜 🎲 💚 🏗 **☁ 🖼 ⚪️➡️ 🖌** [🔬 🔛](#dockerfile), ❎ 👆 🔗, & 🏃♂ **👁 Uvicorn 🛠️** ↩️ 🏃♂ 🕳 💖 🐁 ⏮️ Uvicorn 👨🏭.
@@ -430,7 +430,7 @@ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
### 1️⃣ 📐 ⚙ - 💗 👨🏭 📦
-🕐❔ 👷 ⏮️ **Kubernete** ⚖️ 🎏 📎 📦 🧾 ⚙️, ⚙️ 👫 🔗 🕸 🛠️ 🔜 ✔ 👁 **📐 ⚙** 👈 👂 🔛 👑 **⛴** 📶 📻 (📨) 🎲 **💗 📦** 🏃 👆 📱.
+🕐❔ 👷 ⏮️ **Kubernetes** ⚖️ 🎏 📎 📦 🧾 ⚙️, ⚙️ 👫 🔗 🕸 🛠️ 🔜 ✔ 👁 **📐 ⚙** 👈 👂 🔛 👑 **⛴** 📶 📻 (📨) 🎲 **💗 📦** 🏃 👆 📱.
🔠 👫 📦 🏃♂ 👆 📱 🔜 🛎 ✔️ **1️⃣ 🛠️** (✅ Uvicorn 🛠️ 🏃 👆 FastAPI 🈸). 👫 🔜 🌐 **🌓 📦**, 🏃♂ 🎏 👜, ✋️ 🔠 ⏮️ 🚮 👍 🛠️, 💾, ♒️. 👈 🌌 👆 🔜 ✊ 📈 **🛠️** **🎏 🐚** 💽, ⚖️ **🎏 🎰**.
@@ -489,7 +489,7 @@ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
🚥 👆 🏃 **👁 🛠️ 📍 📦** 👆 🔜 ✔️ 🌅 ⚖️ 🌘 👍-🔬, ⚖, & 📉 💸 💾 🍴 🔠 👈 📦 (🌅 🌘 1️⃣ 🚥 👫 🔁).
-& ⤴️ 👆 💪 ⚒ 👈 🎏 💾 📉 & 📄 👆 📳 👆 📦 🧾 ⚙️ (🖼 **Kubernete**). 👈 🌌 ⚫️ 🔜 💪 **🔁 📦** **💪 🎰** ✊ 🔘 🏧 💸 💾 💪 👫, & 💸 💪 🎰 🌑.
+& ⤴️ 👆 💪 ⚒ 👈 🎏 💾 📉 & 📄 👆 📳 👆 📦 🧾 ⚙️ (🖼 **Kubernetes**). 👈 🌌 ⚫️ 🔜 💪 **🔁 📦** **💪 🎰** ✊ 🔘 🏧 💸 💾 💪 👫, & 💸 💪 🎰 🌑.
🚥 👆 🈸 **🙅**, 👉 🔜 🎲 **🚫 ⚠**, & 👆 💪 🚫 💪 ✔ 🏋️ 💾 📉. ✋️ 🚥 👆 **⚙️ 📚 💾** (🖼 ⏮️ **🎰 🏫** 🏷), 👆 🔜 ✅ ❔ 🌅 💾 👆 😩 & 🔆 **🔢 📦** 👈 🏃 **🔠 🎰** (& 🎲 🚮 🌖 🎰 👆 🌑).
@@ -497,14 +497,14 @@ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
## ⏮️ 🔁 ⏭ ▶️ & 📦
-🚥 👆 ⚙️ 📦 (✅ ☁, Kubernete), ⤴️ 📤 2️⃣ 👑 🎯 👆 💪 ⚙️.
+🚥 👆 ⚙️ 📦 (✅ ☁, Kubernetes), ⤴️ 📤 2️⃣ 👑 🎯 👆 💪 ⚙️.
### 💗 📦
-🚥 👆 ✔️ **💗 📦**, 🎲 🔠 1️⃣ 🏃 **👁 🛠️** (🖼, **Kubernete** 🌑), ⤴️ 👆 🔜 🎲 💚 ✔️ **🎏 📦** 🔨 👷 **⏮️ 📶** 👁 📦, 🏃 👁 🛠️, **⏭** 🏃 🔁 👨🏭 📦.
+🚥 👆 ✔️ **💗 📦**, 🎲 🔠 1️⃣ 🏃 **👁 🛠️** (🖼, **Kubernetes** 🌑), ⤴️ 👆 🔜 🎲 💚 ✔️ **🎏 📦** 🔨 👷 **⏮️ 📶** 👁 📦, 🏃 👁 🛠️, **⏭** 🏃 🔁 👨🏭 📦.
!!! info
- 🚥 👆 ⚙️ Kubernete, 👉 🔜 🎲 🕑 📦.
+ 🚥 👆 ⚙️ Kubernetes, 👉 🔜 🎲 🕑 📦.
🚥 👆 ⚙️ 💼 📤 🙅♂ ⚠ 🏃♂ 👈 ⏮️ 📶 **💗 🕰 🔗** (🖼 🚥 👆 🚫 🏃 💽 🛠️, ✋️ ✅ 🚥 💽 🔜), ⤴️ 👆 💪 🚮 👫 🔠 📦 ▶️️ ⏭ ▶️ 👑 🛠️.
@@ -574,7 +574,7 @@ COPY ./app /app/app
### 🕐❔ ⚙️
-👆 🔜 🎲 **🚫** ⚙️ 👉 🛂 🧢 🖼 (⚖️ 🙆 🎏 🎏 1️⃣) 🚥 👆 ⚙️ **Kubernete** (⚖️ 🎏) & 👆 ⏪ ⚒ **🧬** 🌑 🎚, ⏮️ 💗 **📦**. 📚 💼, 👆 👍 📆 **🏗 🖼 ⚪️➡️ 🖌** 🔬 🔛: [🏗 ☁ 🖼 FastAPI](#build-a-docker-image-for-fastapi).
+👆 🔜 🎲 **🚫** ⚙️ 👉 🛂 🧢 🖼 (⚖️ 🙆 🎏 🎏 1️⃣) 🚥 👆 ⚙️ **Kubernetes** (⚖️ 🎏) & 👆 ⏪ ⚒ **🧬** 🌑 🎚, ⏮️ 💗 **📦**. 📚 💼, 👆 👍 📆 **🏗 🖼 ⚪️➡️ 🖌** 🔬 🔛: [🏗 ☁ 🖼 FastAPI](#build-a-docker-image-for-fastapi).
👉 🖼 🔜 ⚠ ✴️ 🎁 💼 🔬 🔛 [📦 ⏮️ 💗 🛠️ & 🎁 💼](#containers-with-multiple-processes-and-special-cases). 🖼, 🚥 👆 🈸 **🙅 🥃** 👈 ⚒ 🔢 🔢 🛠️ ⚓️ 🔛 💽 👷 👍, 👆 🚫 💚 😥 ⏮️ ❎ 🛠️ 🧬 🌑 🎚, & 👆 🚫 🏃 🌅 🌘 1️⃣ 📦 ⏮️ 👆 📱. ⚖️ 🚥 👆 🛠️ ⏮️ **☁ ✍**, 🏃 🔛 👁 💽, ♒️.
@@ -585,7 +585,7 @@ COPY ./app /app/app
🖼:
* ⏮️ **☁ ✍** 👁 💽
-* ⏮️ **Kubernete** 🌑
+* ⏮️ **Kubernetes** 🌑
* ⏮️ ☁ 🐝 📳 🌑
* ⏮️ ➕1️⃣ 🧰 💖 🖖
* ⏮️ ☁ 🐕🦺 👈 ✊ 👆 📦 🖼 & 🛠️ ⚫️
@@ -682,7 +682,7 @@ CMD ["uvicorn", "app.main:app", "--proxy-headers", "--host", "0.0.0.0", "--port"
## 🌃
-⚙️ 📦 ⚙️ (✅ ⏮️ **☁** & **Kubernete**) ⚫️ ▶️️ 📶 🎯 🍵 🌐 **🛠️ 🔧**:
+⚙️ 📦 ⚙️ (✅ ⏮️ **☁** & **Kubernetes**) ⚫️ ▶️️ 📶 🎯 🍵 🌐 **🛠️ 🔧**:
* 🇺🇸🔍
* 🏃♂ 🔛 🕴
diff --git a/docs/em/docs/deployment/server-workers.md b/docs/em/docs/deployment/server-workers.md
index ca068d7447..b7e58c4f47 100644
--- a/docs/em/docs/deployment/server-workers.md
+++ b/docs/em/docs/deployment/server-workers.md
@@ -18,9 +18,9 @@
📥 👤 🔜 🎦 👆 ❔ ⚙️ **🐁** ⏮️ **Uvicorn 👨🏭 🛠️**.
!!! info
- 🚥 👆 ⚙️ 📦, 🖼 ⏮️ ☁ ⚖️ Kubernete, 👤 🔜 💬 👆 🌅 🔃 👈 ⏭ 📃: [FastAPI 📦 - ☁](./docker.md){.internal-link target=_blank}.
+ 🚥 👆 ⚙️ 📦, 🖼 ⏮️ ☁ ⚖️ Kubernetes, 👤 🔜 💬 👆 🌅 🔃 👈 ⏭ 📃: [FastAPI 📦 - ☁](./docker.md){.internal-link target=_blank}.
- 🎯, 🕐❔ 🏃 🔛 **Kubernete** 👆 🔜 🎲 **🚫** 💚 ⚙️ 🐁 & ↩️ 🏃 **👁 Uvicorn 🛠️ 📍 📦**, ✋️ 👤 🔜 💬 👆 🔃 ⚫️ ⏪ 👈 📃.
+ 🎯, 🕐❔ 🏃 🔛 **Kubernetes** 👆 🔜 🎲 **🚫** 💚 ⚙️ 🐁 & ↩️ 🏃 **👁 Uvicorn 🛠️ 📍 📦**, ✋️ 👤 🔜 💬 👆 🔃 ⚫️ ⏪ 👈 📃.
## 🐁 ⏮️ Uvicorn 👨🏭
@@ -167,7 +167,7 @@ $ uvicorn main:app --host 0.0.0.0 --port 8080 --workers 4
👤 🔜 🎦 👆 **🛂 ☁ 🖼** 👈 🔌 **🐁 ⏮️ Uvicorn 👨🏭** & 🔢 📳 👈 💪 ⚠ 🙅 💼.
-📤 👤 🔜 🎦 👆 ❔ **🏗 👆 👍 🖼 ⚪️➡️ 🖌** 🏃 👁 Uvicorn 🛠️ (🍵 🐁). ⚫️ 🙅 🛠️ & 🎲 ⚫️❔ 👆 🔜 💚 🕐❔ ⚙️ 📎 📦 🧾 ⚙️ 💖 **Kubernete**.
+📤 👤 🔜 🎦 👆 ❔ **🏗 👆 👍 🖼 ⚪️➡️ 🖌** 🏃 👁 Uvicorn 🛠️ (🍵 🐁). ⚫️ 🙅 🛠️ & 🎲 ⚫️❔ 👆 🔜 💚 🕐❔ ⚙️ 📎 📦 🧾 ⚙️ 💖 **Kubernetes**.
## 🌃
@@ -175,4 +175,4 @@ $ uvicorn main:app --host 0.0.0.0 --port 8080 --workers 4
👆 💪 ⚙️ 👉 🧰 & 💭 🚥 👆 ⚒ 🆙 **👆 👍 🛠️ ⚙️** ⏪ ✊ 💅 🎏 🛠️ 🔧 👆.
-✅ 👅 ⏭ 📃 💡 🔃 **FastAPI** ⏮️ 📦 (✅ ☁ & Kubernete). 👆 🔜 👀 👈 👈 🧰 ✔️ 🙅 🌌 ❎ 🎏 **🛠️ 🔧** 👍. 👶
+✅ 👅 ⏭ 📃 💡 🔃 **FastAPI** ⏮️ 📦 (✅ ☁ & Kubernetes). 👆 🔜 👀 👈 👈 🧰 ✔️ 🙅 🌌 ❎ 🎏 **🛠️ 🔧** 👍. 👶
diff --git a/docs/em/docs/external-links.md b/docs/em/docs/external-links.md
index 4440b1f122..5ba668bfac 100644
--- a/docs/em/docs/external-links.md
+++ b/docs/em/docs/external-links.md
@@ -11,77 +11,21 @@
## 📄
-### 🇪🇸
+{% for section_name, section_content in external_links.items() %}
-{% if external_links %}
-{% for article in external_links.articles.english %}
+## {{ section_name }}
+
+{% for lang_name, lang_content in section_content.items() %}
+
+### {{ lang_name }}
+
+{% for item in lang_content %}
+
+* {{ item.title }} by {{ item.author }}.
-* {{ article.title }} {{ article.author }}.
{% endfor %}
-{% endif %}
-
-### 🇯🇵
-
-{% if external_links %}
-{% for article in external_links.articles.japanese %}
-
-* {{ article.title }} {{ article.author }}.
{% endfor %}
-{% endif %}
-
-### 🇻🇳
-
-{% if external_links %}
-{% for article in external_links.articles.vietnamese %}
-
-* {{ article.title }} {{ article.author }}.
{% endfor %}
-{% endif %}
-
-### 🇷🇺
-
-{% if external_links %}
-{% for article in external_links.articles.russian %}
-
-* {{ article.title }} {{ article.author }}.
-{% endfor %}
-{% endif %}
-
-### 🇩🇪
-
-{% if external_links %}
-{% for article in external_links.articles.german %}
-
-* {{ article.title }} {{ article.author }}.
-{% endfor %}
-{% endif %}
-
-### 🇹🇼
-
-{% if external_links %}
-{% for article in external_links.articles.taiwanese %}
-
-* {{ article.title }} {{ article.author }}.
-{% endfor %}
-{% endif %}
-
-## 📻
-
-{% if external_links %}
-{% for article in external_links.podcasts.english %}
-
-* {{ article.title }} {{ article.author }}.
-{% endfor %}
-{% endif %}
-
-## 💬
-
-{% if external_links %}
-{% for article in external_links.talks.english %}
-
-* {{ article.title }} {{ article.author }}.
-{% endfor %}
-{% endif %}
## 🏗
diff --git a/docs/em/docs/help-fastapi.md b/docs/em/docs/help-fastapi.md
index d7b66185d4..b998ade42b 100644
--- a/docs/em/docs/help-fastapi.md
+++ b/docs/em/docs/help-fastapi.md
@@ -231,8 +231,6 @@
⚙️ 💬 🕴 🎏 🏢 💬.
-📤 ⏮️ 🥊 💬, ✋️ ⚫️ 🚫 ✔️ 📻 & 🏧 ⚒, 💬 🌖 ⚠, 😧 🔜 👍 ⚙️.
-
### 🚫 ⚙️ 💬 ❔
✔️ 🤯 👈 💬 ✔ 🌅 "🆓 💬", ⚫️ ⏩ 💭 ❔ 👈 💁♂️ 🏢 & 🌅 ⚠ ❔,, 👆 💪 🚫 📨 ❔.
diff --git a/docs/em/docs/advanced/conditional-openapi.md b/docs/em/docs/how-to/conditional-openapi.md
similarity index 100%
rename from docs/em/docs/advanced/conditional-openapi.md
rename to docs/em/docs/how-to/conditional-openapi.md
diff --git a/docs/em/docs/advanced/custom-request-and-route.md b/docs/em/docs/how-to/custom-request-and-route.md
similarity index 100%
rename from docs/em/docs/advanced/custom-request-and-route.md
rename to docs/em/docs/how-to/custom-request-and-route.md
diff --git a/docs/em/docs/how-to/extending-openapi.md b/docs/em/docs/how-to/extending-openapi.md
new file mode 100644
index 0000000000..6b3bc00757
--- /dev/null
+++ b/docs/em/docs/how-to/extending-openapi.md
@@ -0,0 +1,90 @@
+# ↔ 🗄
+
+!!! warning
+ 👉 👍 🏧 ⚒. 👆 🎲 💪 🚶 ⚫️.
+
+ 🚥 👆 📄 🔰 - 👩💻 🦮, 👆 💪 🎲 🚶 👉 📄.
+
+ 🚥 👆 ⏪ 💭 👈 👆 💪 🔀 🏗 🗄 🔗, 😣 👂.
+
+📤 💼 🌐❔ 👆 💪 💪 🔀 🏗 🗄 🔗.
+
+👉 📄 👆 🔜 👀 ❔.
+
+## 😐 🛠️
+
+😐 (🔢) 🛠️, ⏩.
+
+`FastAPI` 🈸 (👐) ✔️ `.openapi()` 👩🔬 👈 📈 📨 🗄 🔗.
+
+🍕 🈸 🎚 🏗, *➡ 🛠️* `/openapi.json` (⚖️ ⚫️❔ 👆 ⚒ 👆 `openapi_url`) ®.
+
+⚫️ 📨 🎻 📨 ⏮️ 🏁 🈸 `.openapi()` 👩🔬.
+
+🔢, ⚫️❔ 👩🔬 `.openapi()` 🔨 ✅ 🏠 `.openapi_schema` 👀 🚥 ⚫️ ✔️ 🎚 & 📨 👫.
+
+🚥 ⚫️ 🚫, ⚫️ 🏗 👫 ⚙️ 🚙 🔢 `fastapi.openapi.utils.get_openapi`.
+
+& 👈 🔢 `get_openapi()` 📨 🔢:
+
+* `title`: 🗄 📛, 🎦 🩺.
+* `version`: ⏬ 👆 🛠️, ✅ `2.5.0`.
+* `openapi_version`: ⏬ 🗄 🔧 ⚙️. 🔢, ⏪: `3.0.2`.
+* `description`: 📛 👆 🛠️.
+* `routes`: 📇 🛣, 👫 🔠 ® *➡ 🛠️*. 👫 ✊ ⚪️➡️ `app.routes`.
+
+## 🔑 🔢
+
+⚙️ ℹ 🔛, 👆 💪 ⚙️ 🎏 🚙 🔢 🏗 🗄 🔗 & 🔐 🔠 🍕 👈 👆 💪.
+
+🖼, ➡️ 🚮 📄 🗄 ↔ 🔌 🛃 🔱.
+
+### 😐 **FastAPI**
+
+🥇, ✍ 🌐 👆 **FastAPI** 🈸 🛎:
+
+```Python hl_lines="1 4 7-9"
+{!../../../docs_src/extending_openapi/tutorial001.py!}
+```
+
+### 🏗 🗄 🔗
+
+⤴️, ⚙️ 🎏 🚙 🔢 🏗 🗄 🔗, 🔘 `custom_openapi()` 🔢:
+
+```Python hl_lines="2 15-20"
+{!../../../docs_src/extending_openapi/tutorial001.py!}
+```
+
+### 🔀 🗄 🔗
+
+🔜 👆 💪 🚮 📄 ↔, ❎ 🛃 `x-logo` `info` "🎚" 🗄 🔗:
+
+```Python hl_lines="21-23"
+{!../../../docs_src/extending_openapi/tutorial001.py!}
+```
+
+### 💾 🗄 🔗
+
+👆 💪 ⚙️ 🏠 `.openapi_schema` "💾", 🏪 👆 🏗 🔗.
+
+👈 🌌, 👆 🈸 🏆 🚫 ✔️ 🏗 🔗 🔠 🕰 👩💻 📂 👆 🛠️ 🩺.
+
+⚫️ 🔜 🏗 🕴 🕐, & ⤴️ 🎏 💾 🔗 🔜 ⚙️ ⏭ 📨.
+
+```Python hl_lines="13-14 24-25"
+{!../../../docs_src/extending_openapi/tutorial001.py!}
+```
+
+### 🔐 👩🔬
+
+🔜 👆 💪 ❎ `.openapi()` 👩🔬 ⏮️ 👆 🆕 🔢.
+
+```Python hl_lines="28"
+{!../../../docs_src/extending_openapi/tutorial001.py!}
+```
+
+### ✅ ⚫️
+
+🕐 👆 🚶 http://127.0.0.1:8000/redoc 👆 🔜 👀 👈 👆 ⚙️ 👆 🛃 🔱 (👉 🖼, **FastAPI**'Ⓜ 🔱):
+
+
diff --git a/docs/em/docs/advanced/graphql.md b/docs/em/docs/how-to/graphql.md
similarity index 100%
rename from docs/em/docs/advanced/graphql.md
rename to docs/em/docs/how-to/graphql.md
diff --git a/docs/em/docs/advanced/sql-databases-peewee.md b/docs/em/docs/how-to/sql-databases-peewee.md
similarity index 100%
rename from docs/em/docs/advanced/sql-databases-peewee.md
rename to docs/em/docs/how-to/sql-databases-peewee.md
diff --git a/docs/em/docs/index.md b/docs/em/docs/index.md
index ea8a9d41c8..c7df281609 100644
--- a/docs/em/docs/index.md
+++ b/docs/em/docs/index.md
@@ -27,7 +27,7 @@
---
-FastAPI 🏛, ⏩ (↕-🎭), 🕸 🛠️ 🏗 🛠️ ⏮️ 🐍 3️⃣.7️⃣ ➕ ⚓️ 🔛 🐩 🐍 🆎 🔑.
+FastAPI 🏛, ⏩ (↕-🎭), 🕸 🛠️ 🏗 🛠️ ⏮️ 🐍 3️⃣.8️⃣ ➕ ⚓️ 🔛 🐩 🐍 🆎 🔑.
🔑 ⚒:
diff --git a/docs/em/docs/project-generation.md b/docs/em/docs/project-generation.md
index 5fd667ad19..ae959e1d5c 100644
--- a/docs/em/docs/project-generation.md
+++ b/docs/em/docs/project-generation.md
@@ -79,6 +79,6 @@
* **🌈** 🕜 🏷 🛠️.
* **☁ 🧠 🔎** 📨 📁 🏗.
* **🏭 🔜** 🐍 🕸 💽 ⚙️ Uvicorn & 🐁.
-* **☁ 👩💻** Kubernete (🦲) 🆑/💿 🛠️ 🏗.
+* **☁ 👩💻** Kubernetes (🦲) 🆑/💿 🛠️ 🏗.
* **🤸♂** 💪 ⚒ 1️⃣ 🌈 🏗 🇪🇸 ⏮️ 🏗 🖥.
* **💪 🏧** 🎏 🏷 🛠️ (Pytorch, 🇸🇲), 🚫 🌈.
diff --git a/docs/em/docs/tutorial/bigger-applications.md b/docs/em/docs/tutorial/bigger-applications.md
index 7b4694387d..c30bba106a 100644
--- a/docs/em/docs/tutorial/bigger-applications.md
+++ b/docs/em/docs/tutorial/bigger-applications.md
@@ -79,7 +79,7 @@
👆 🗄 ⚫️ & ✍ "👐" 🎏 🌌 👆 🔜 ⏮️ 🎓 `FastAPI`:
-```Python hl_lines="1 3"
+```Python hl_lines="1 3" title="app/routers/users.py"
{!../../../docs_src/bigger_applications/app/routers/users.py!}
```
@@ -89,7 +89,7 @@
⚙️ ⚫️ 🎏 🌌 👆 🔜 ⚙️ `FastAPI` 🎓:
-```Python hl_lines="6 11 16"
+```Python hl_lines="6 11 16" title="app/routers/users.py"
{!../../../docs_src/bigger_applications/app/routers/users.py!}
```
@@ -112,7 +112,7 @@
👥 🔜 🔜 ⚙️ 🙅 🔗 ✍ 🛃 `X-Token` 🎚:
-```Python hl_lines="1 4-6"
+```Python hl_lines="1 4-6" title="app/dependencies.py"
{!../../../docs_src/bigger_applications/app/dependencies.py!}
```
@@ -143,7 +143,7 @@
, ↩️ ❎ 🌐 👈 🔠 *➡ 🛠️*, 👥 💪 🚮 ⚫️ `APIRouter`.
-```Python hl_lines="5-10 16 21"
+```Python hl_lines="5-10 16 21" title="app/routers/items.py"
{!../../../docs_src/bigger_applications/app/routers/items.py!}
```
@@ -195,7 +195,7 @@ async def read_item(item_id: str):
👥 ⚙️ ⚖ 🗄 ⏮️ `..` 🔗:
-```Python hl_lines="3"
+```Python hl_lines="3" title="app/routers/items.py"
{!../../../docs_src/bigger_applications/app/routers/items.py!}
```
@@ -265,7 +265,7 @@ that 🔜 ⛓:
✋️ 👥 💪 🚮 _🌅_ `tags` 👈 🔜 ✔ 🎯 *➡ 🛠️*, & ➕ `responses` 🎯 👈 *➡ 🛠️*:
-```Python hl_lines="30-31"
+```Python hl_lines="30-31" title="app/routers/items.py"
{!../../../docs_src/bigger_applications/app/routers/items.py!}
```
@@ -290,7 +290,7 @@ that 🔜 ⛓:
& 👥 💪 📣 [🌐 🔗](dependencies/global-dependencies.md){.internal-link target=_blank} 👈 🔜 🌀 ⏮️ 🔗 🔠 `APIRouter`:
-```Python hl_lines="1 3 7"
+```Python hl_lines="1 3 7" title="app/main.py"
{!../../../docs_src/bigger_applications/app/main.py!}
```
@@ -298,7 +298,7 @@ that 🔜 ⛓:
🔜 👥 🗄 🎏 🔁 👈 ✔️ `APIRouter`Ⓜ:
-```Python hl_lines="5"
+```Python hl_lines="5" title="app/main.py"
{!../../../docs_src/bigger_applications/app/main.py!}
```
@@ -360,7 +360,7 @@ from .routers.users import router
, 💪 ⚙️ 👯♂️ 👫 🎏 📁, 👥 🗄 🔁 🔗:
-```Python hl_lines="4"
+```Python hl_lines="5" title="app/main.py"
{!../../../docs_src/bigger_applications/app/main.py!}
```
@@ -368,7 +368,7 @@ from .routers.users import router
🔜, ➡️ 🔌 `router`Ⓜ ⚪️➡️ 🔁 `users` & `items`:
-```Python hl_lines="10-11"
+```Python hl_lines="10-11" title="app/main.py"
{!../../../docs_src/bigger_applications/app/main.py!}
```
@@ -401,7 +401,7 @@ from .routers.users import router
👉 🖼 ⚫️ 🔜 💎 🙅. ✋️ ➡️ 💬 👈 ↩️ ⚫️ 💰 ⏮️ 🎏 🏗 🏢, 👥 🚫🔜 🔀 ⚫️ & 🚮 `prefix`, `dependencies`, `tags`, ♒️. 🔗 `APIRouter`:
-```Python hl_lines="3"
+```Python hl_lines="3" title="app/internal/admin.py"
{!../../../docs_src/bigger_applications/app/internal/admin.py!}
```
@@ -409,7 +409,7 @@ from .routers.users import router
👥 💪 📣 🌐 👈 🍵 ✔️ 🔀 ⏮️ `APIRouter` 🚶♀️ 👈 🔢 `app.include_router()`:
-```Python hl_lines="14-17"
+```Python hl_lines="14-17" title="app/main.py"
{!../../../docs_src/bigger_applications/app/main.py!}
```
@@ -432,7 +432,7 @@ from .routers.users import router
📥 👥 ⚫️... 🎦 👈 👥 💪 🤷:
-```Python hl_lines="21-23"
+```Python hl_lines="21-23" title="app/main.py"
{!../../../docs_src/bigger_applications/app/main.py!}
```
diff --git a/docs/em/docs/tutorial/query-params-str-validations.md b/docs/em/docs/tutorial/query-params-str-validations.md
index d6b67bd518..f0e455abe1 100644
--- a/docs/em/docs/tutorial/query-params-str-validations.md
+++ b/docs/em/docs/tutorial/query-params-str-validations.md
@@ -371,7 +371,7 @@ http://localhost:8000/items/
=== "🐍 3️⃣.1️⃣0️⃣ & 🔛"
- ```Python hl_lines="12"
+ ```Python hl_lines="11"
{!> ../../../docs_src/query_params_str_validations/tutorial008_py310.py!}
```
@@ -421,7 +421,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems
=== "🐍 3️⃣.1️⃣0️⃣ & 🔛"
- ```Python hl_lines="17"
+ ```Python hl_lines="16"
{!> ../../../docs_src/query_params_str_validations/tutorial010_py310.py!}
```
diff --git a/docs/em/docs/tutorial/security/oauth2-jwt.md b/docs/em/docs/tutorial/security/oauth2-jwt.md
index bc207c5666..bc3c943f86 100644
--- a/docs/em/docs/tutorial/security/oauth2-jwt.md
+++ b/docs/em/docs/tutorial/security/oauth2-jwt.md
@@ -192,13 +192,13 @@ $ openssl rand -hex 32
=== "🐍 3️⃣.6️⃣ & 🔛"
- ```Python hl_lines="115-128"
+ ```Python hl_lines="115-130"
{!> ../../../docs_src/security/tutorial004.py!}
```
=== "🐍 3️⃣.1️⃣0️⃣ & 🔛"
- ```Python hl_lines="114-127"
+ ```Python hl_lines="114-129"
{!> ../../../docs_src/security/tutorial004_py310.py!}
```
diff --git a/docs/em/docs/tutorial/sql-databases.md b/docs/em/docs/tutorial/sql-databases.md
index 9d46c24608..e3ced7ef4c 100644
--- a/docs/em/docs/tutorial/sql-databases.md
+++ b/docs/em/docs/tutorial/sql-databases.md
@@ -501,7 +501,7 @@ current_user.items
"🛠️" ⚒ 🔁 💪 🕐❔ 👆 🔀 📊 👆 🇸🇲 🏷, 🚮 🆕 🔢, ♒️. 🔁 👈 🔀 💽, 🚮 🆕 🏓, 🆕 🏓, ♒️.
-👆 💪 🔎 🖼 ⚗ FastAPI 🏗 📄 ⚪️➡️ [🏗 ⚡ - 📄](../project-generation.md){.internal-link target=_blank}. 🎯 `alembic` 📁 ℹ 📟.
+👆 💪 🔎 🖼 ⚗ FastAPI 🏗 📄 ⚪️➡️ [🏗 ⚡ - 📄](../project-generation.md){.internal-link target=_blank}. 🎯 `alembic` 📁 ℹ 📟.
### ✍ 🔗
diff --git a/docs/en/data/external_links.yml b/docs/en/data/external_links.yml
index a7f766d161..00d6f696de 100644
--- a/docs/en/data/external_links.yml
+++ b/docs/en/data/external_links.yml
@@ -1,5 +1,33 @@
-articles:
- english:
+Articles:
+ English:
+ - author: Ankit Anchlia
+ author_link: https://linkedin.com/in/aanchlia21
+ link: https://hackernoon.com/explore-how-to-effectively-use-jwt-with-fastapi
+ title: Explore How to Effectively Use JWT With FastAPI
+ - author: Nicoló Lino
+ author_link: https://www.nlino.com
+ link: https://github.com/softwarebloat/python-tracing-demo
+ title: Instrument a FastAPI service adding tracing with OpenTelemetry and send/show traces in Grafana Tempo
+ - author: Mikhail Rozhkov, Elena Samuylova
+ author_link: https://www.linkedin.com/in/mnrozhkov/
+ link: https://www.evidentlyai.com/blog/fastapi-tutorial
+ title: ML serving and monitoring with FastAPI and Evidently
+ - author: Visual Studio Code Team
+ author_link: https://code.visualstudio.com/
+ link: https://code.visualstudio.com/docs/python/tutorial-fastapi
+ title: FastAPI Tutorial in Visual Studio Code
+ - author: Apitally
+ author_link: https://apitally.io
+ link: https://blog.apitally.io/fastapi-application-monitoring-made-easy
+ title: FastAPI application monitoring made easy
+ - author: John Philip
+ author_link: https://medium.com/@amjohnphilip
+ link: https://python.plainenglish.io/building-a-restful-api-with-fastapi-secure-signup-and-login-functionality-included-45cdbcb36106
+ title: "Building a RESTful API with FastAPI: Secure Signup and Login Functionality Included"
+ - author: Keshav Malik
+ author_link: https://theinfosecguy.xyz/
+ link: https://blog.theinfosecguy.xyz/building-a-crud-api-with-fastapi-and-supabase-a-step-by-step-guide
+ title: Building a CRUD API with FastAPI and Supabase
- author: Adejumo Ridwan Suleiman
author_link: https://www.linkedin.com/in/adejumoridwan/
link: https://medium.com/python-in-plain-english/build-an-sms-spam-classifier-serverless-database-with-faunadb-and-fastapi-23dbb275bc5b
@@ -12,10 +40,6 @@ articles:
author_link: https://dev.to/
link: https://dev.to/teresafds/authorization-on-fastapi-with-casbin-41og
title: Authorization on FastAPI with Casbin
- - author: WayScript
- author_link: https://www.wayscript.com
- link: https://blog.wayscript.com/fast-api-quickstart/
- title: Quickstart Guide to Build and Host Responsive APIs with Fast API and WayScript
- author: New Relic
author_link: https://newrelic.com
link: https://newrelic.com/instant-observability/fastapi/e559ec64-f765-4470-a15f-1901fcebb468
@@ -68,10 +92,6 @@ articles:
author_link: https://dev.to/factorlive
link: https://dev.to/factorlive/python-facebook-messenger-webhook-with-fastapi-on-glitch-4n90
title: Python Facebook messenger webhook with FastAPI on Glitch
- - author: Dom Patmore
- author_link: https://twitter.com/dompatmore
- link: https://dompatmore.com/blog/authenticate-your-fastapi-app-with-auth0
- title: Authenticate Your FastAPI App with auth0
- author: Valon Januzaj
author_link: https://www.linkedin.com/in/valon-januzaj-b02692187/
link: https://valonjanuzaj.medium.com/deploy-a-dockerized-fastapi-application-to-aws-cc757830ba1b
@@ -84,10 +104,6 @@ articles:
author_link: https://twitter.com/louis_guitton
link: https://guitton.co/posts/fastapi-monitoring/
title: How to monitor your FastAPI service
- - author: Julien Harbulot
- author_link: https://julienharbulot.com/
- link: https://julienharbulot.com/notification-server.html
- title: HTTP server to display desktop notifications
- author: Precious Ndubueze
author_link: https://medium.com/@gabbyprecious2000
link: https://medium.com/@gabbyprecious2000/creating-a-crud-app-with-fastapi-part-one-7c049292ad37
@@ -136,18 +152,10 @@ articles:
author_link: https://wuilly.com/
link: https://wuilly.com/2019/10/real-time-notifications-with-python-and-postgres/
title: Real-time Notifications with Python and Postgres
- - author: Benjamin Ramser
- author_link: https://iwpnd.pw
- link: https://iwpnd.pw/articles/2020-03/apache-kafka-fastapi-geostream
- title: Apache Kafka producer and consumer with FastAPI and aiokafka
- author: Navule Pavan Kumar Rao
author_link: https://www.linkedin.com/in/navule/
link: https://www.tutlinks.com/create-and-deploy-fastapi-app-to-heroku/
title: Create and Deploy FastAPI app to Heroku without using Docker
- - author: Benjamin Ramser
- author_link: https://iwpnd.pw
- link: https://iwpnd.pw/articles/2020-01/deploy-fastapi-to-aws-lambda
- title: How to continuously deploy a FastAPI to AWS Lambda with AWS SAM
- author: Arthur Henrique
author_link: https://twitter.com/arthurheinrique
link: https://medium.com/@arthur393/another-boilerplate-to-fastapi-azure-pipeline-ci-pytest-3c8d9a4be0bb
@@ -172,10 +180,6 @@ articles:
author_link: https://dev.to/dbanty
link: https://dev.to/dbanty/why-i-m-leaving-flask-3ki6
title: Why I'm Leaving Flask
- - author: Rob Wagner
- author_link: https://robwagner.dev/
- link: https://robwagner.dev/tortoise-fastapi-setup/
- title: Setting up Tortoise ORM with FastAPI
- author: Mike Moritz
author_link: https://medium.com/@mike.p.moritz
link: https://medium.com/@mike.p.moritz/using-docker-compose-to-deploy-a-lightweight-python-rest-api-with-a-job-queue-37e6072a209b
@@ -236,7 +240,7 @@ articles:
author_link: https://medium.com/@krishnardt365
link: https://medium.com/@krishnardt365/fastapi-docker-and-postgres-91943e71be92
title: Fastapi, Docker(Docker compose) and Postgres
- german:
+ German:
- author: Marcel Sander (actidoo)
author_link: https://www.actidoo.com
link: https://www.actidoo.com/de/blog/python-fastapi-domain-driven-design
@@ -249,7 +253,7 @@ articles:
author_link: https://hellocoding.de/autor/felix-schuermeyer/
link: https://hellocoding.de/blog/coding-language/python/fastapi
title: REST-API Programmieren mittels Python und dem FastAPI Modul
- japanese:
+ Japanese:
- author: '@bee2'
author_link: https://qiita.com/bee2
link: https://qiita.com/bee2/items/75d9c0d7ba20e7a4a0e9
@@ -298,7 +302,7 @@ articles:
author_link: https://qiita.com/mtitg
link: https://qiita.com/mtitg/items/47770e9a562dd150631d
title: FastAPI|DB接続してCRUDするPython製APIサーバーを構築
- russian:
+ Russian:
- author: Troy Köhler
author_link: https://www.linkedin.com/in/trkohler/
link: https://trkohler.com/fast-api-introduction-to-framework
@@ -311,18 +315,18 @@ articles:
author_link: https://habr.com/ru/users/57uff3r/
link: https://habr.com/ru/post/454440/
title: 'Мелкая питонячая радость #2: Starlette - Солидная примочка – FastAPI'
- vietnamese:
+ Vietnamese:
- author: Nguyễn Nhân
author_link: https://fullstackstation.com/author/figonking/
link: https://fullstackstation.com/fastapi-trien-khai-bang-docker/
title: 'FASTAPI: TRIỂN KHAI BẰNG DOCKER'
- taiwanese:
+ Taiwanese:
- author: Leon
author_link: http://editor.leonh.space/
link: https://editor.leonh.space/2022/tortoise/
title: 'Tortoise ORM / FastAPI 整合快速筆記'
-podcasts:
- english:
+Podcasts:
+ English:
- author: Podcast.`__init__`
author_link: https://www.pythonpodcast.com/
link: https://www.pythonpodcast.com/fastapi-web-application-framework-episode-259/
@@ -331,8 +335,12 @@ podcasts:
author_link: https://pythonbytes.fm/
link: https://pythonbytes.fm/episodes/show/123/time-to-right-the-py-wrongs?time_in_sec=855
title: FastAPI on PythonBytes
-talks:
- english:
+Talks:
+ English:
+ - author: Jeny Sadadia
+ author_link: https://github.com/JenySadadia
+ link: https://www.youtube.com/watch?v=uZdTe8_Z6BQ
+ title: 'PyCon AU 2023: Testing asynchronous applications with FastAPI and pytest'
- author: Sebastián Ramírez (tiangolo)
author_link: https://twitter.com/tiangolo
link: https://www.youtube.com/watch?v=PnpTY1f4k2U
diff --git a/docs/en/data/github_sponsors.yml b/docs/en/data/github_sponsors.yml
index 3a68ba62ba..713f229cf4 100644
--- a/docs/en/data/github_sponsors.yml
+++ b/docs/en/data/github_sponsors.yml
@@ -1,13 +1,25 @@
sponsors:
-- - login: cryptapi
+- - login: scalar
+ avatarUrl: https://avatars.githubusercontent.com/u/301879?v=4
+ url: https://github.com/scalar
+ - login: codacy
+ avatarUrl: https://avatars.githubusercontent.com/u/1834093?v=4
+ url: https://github.com/codacy
+ - login: bump-sh
+ avatarUrl: https://avatars.githubusercontent.com/u/33217836?v=4
+ url: https://github.com/bump-sh
+ - login: Alek99
+ avatarUrl: https://avatars.githubusercontent.com/u/38776361?u=bd6c163fe787c2de1a26c881598e54b67e2482dd&v=4
+ url: https://github.com/Alek99
+ - login: cryptapi
avatarUrl: https://avatars.githubusercontent.com/u/44925437?u=61369138589bc7fee6c417f3fbd50fbd38286cc4&v=4
url: https://github.com/cryptapi
- - login: fern-api
- avatarUrl: https://avatars.githubusercontent.com/u/102944815?v=4
- url: https://github.com/fern-api
- - login: nanram22
- avatarUrl: https://avatars.githubusercontent.com/u/116367316?v=4
- url: https://github.com/nanram22
+ - login: porter-dev
+ avatarUrl: https://avatars.githubusercontent.com/u/62078005?v=4
+ url: https://github.com/porter-dev
+ - login: andrew-propelauth
+ avatarUrl: https://avatars.githubusercontent.com/u/89474256?u=1188c27cb744bbec36447a2cfd4453126b2ddb5c&v=4
+ url: https://github.com/andrew-propelauth
- - login: nihpo
avatarUrl: https://avatars.githubusercontent.com/u/1841030?u=0264956d7580f7e46687a762a7baa629f84cf97c&v=4
url: https://github.com/nihpo
@@ -15,29 +27,26 @@ sponsors:
avatarUrl: https://avatars.githubusercontent.com/u/65656077?v=4
url: https://github.com/ObliviousAI
- - login: mikeckennedy
- avatarUrl: https://avatars.githubusercontent.com/u/2035561?u=1bb18268bcd4d9249e1f783a063c27df9a84c05b&v=4
+ avatarUrl: https://avatars.githubusercontent.com/u/2035561?u=ce6165b799ea3164cb6f5ff54ea08042057442af&v=4
url: https://github.com/mikeckennedy
+ - login: ndimares
+ avatarUrl: https://avatars.githubusercontent.com/u/6267663?u=cfb27efde7a7212be8142abb6c058a1aeadb41b1&v=4
+ url: https://github.com/ndimares
- login: deta
avatarUrl: https://avatars.githubusercontent.com/u/47275976?v=4
url: https://github.com/deta
- login: deepset-ai
avatarUrl: https://avatars.githubusercontent.com/u/51827949?v=4
url: https://github.com/deepset-ai
+ - login: databento
+ avatarUrl: https://avatars.githubusercontent.com/u/64141749?v=4
+ url: https://github.com/databento
- login: svix
avatarUrl: https://avatars.githubusercontent.com/u/80175132?v=4
url: https://github.com/svix
- - login: databento-bot
- avatarUrl: https://avatars.githubusercontent.com/u/98378480?u=494f679996e39427f7ddb1a7de8441b7c96fb670&v=4
- url: https://github.com/databento-bot
- login: VincentParedes
avatarUrl: https://avatars.githubusercontent.com/u/103889729?v=4
url: https://github.com/VincentParedes
-- - login: arcticfly
- avatarUrl: https://avatars.githubusercontent.com/u/41524992?u=03c88529a86cf51f7a380e890d84d84c71468848&v=4
- url: https://github.com/arcticfly
-- - login: getsentry
- avatarUrl: https://avatars.githubusercontent.com/u/1396951?v=4
- url: https://github.com/getsentry
- - login: acsone
avatarUrl: https://avatars.githubusercontent.com/u/7601056?v=4
url: https://github.com/acsone
@@ -50,25 +59,16 @@ sponsors:
- login: marvin-robot
avatarUrl: https://avatars.githubusercontent.com/u/41086007?u=091c5cb75af363123d66f58194805a97220ee1a7&v=4
url: https://github.com/marvin-robot
- - login: Flint-company
- avatarUrl: https://avatars.githubusercontent.com/u/48908872?u=355cd3d8992d4be8173058e7000728757c55ad49&v=4
- url: https://github.com/Flint-company
- login: BoostryJP
avatarUrl: https://avatars.githubusercontent.com/u/57932412?v=4
url: https://github.com/BoostryJP
- login: jina-ai
avatarUrl: https://avatars.githubusercontent.com/u/60539444?v=4
url: https://github.com/jina-ai
-- - login: HiredScore
- avatarUrl: https://avatars.githubusercontent.com/u/3908850?v=4
- url: https://github.com/HiredScore
- - login: Trivie
+- - login: Trivie
avatarUrl: https://avatars.githubusercontent.com/u/8161763?v=4
url: https://github.com/Trivie
-- - login: moellenbeck
- avatarUrl: https://avatars.githubusercontent.com/u/169372?v=4
- url: https://github.com/moellenbeck
- - login: birkjernstrom
+- - login: birkjernstrom
avatarUrl: https://avatars.githubusercontent.com/u/281715?u=4be14b43f76b4bd497b1941309bb390250b405e6&v=4
url: https://github.com/birkjernstrom
- login: yasyf
@@ -77,45 +77,45 @@ sponsors:
- login: AccentDesign
avatarUrl: https://avatars.githubusercontent.com/u/2429332?v=4
url: https://github.com/AccentDesign
- - login: RodneyU215
- avatarUrl: https://avatars.githubusercontent.com/u/3329665?u=ec6a9adf8e7e8e306eed7d49687c398608d1604f&v=4
- url: https://github.com/RodneyU215
- login: americanair
avatarUrl: https://avatars.githubusercontent.com/u/12281813?v=4
url: https://github.com/americanair
- login: mainframeindustries
avatarUrl: https://avatars.githubusercontent.com/u/55092103?v=4
url: https://github.com/mainframeindustries
+ - login: doseiai
+ avatarUrl: https://avatars.githubusercontent.com/u/57115726?v=4
+ url: https://github.com/doseiai
+ - login: CanoaPBC
+ avatarUrl: https://avatars.githubusercontent.com/u/64223768?v=4
+ url: https://github.com/CanoaPBC
- - login: povilasb
avatarUrl: https://avatars.githubusercontent.com/u/1213442?u=b11f58ed6ceea6e8297c9b310030478ebdac894d&v=4
url: https://github.com/povilasb
- login: primer-io
avatarUrl: https://avatars.githubusercontent.com/u/62146168?v=4
url: https://github.com/primer-io
-- - login: indeedeng
- avatarUrl: https://avatars.githubusercontent.com/u/2905043?v=4
- url: https://github.com/indeedeng
- - login: iguit0
- avatarUrl: https://avatars.githubusercontent.com/u/12905770?u=63a1a96d1e6c27d85c4f946b84836599de047f65&v=4
- url: https://github.com/iguit0
- - login: JacobKochems
- avatarUrl: https://avatars.githubusercontent.com/u/41692189?u=a75f62ddc0d060ee6233a91e19c433d2687b8eb6&v=4
- url: https://github.com/JacobKochems
+- - login: upciti
+ avatarUrl: https://avatars.githubusercontent.com/u/43346262?v=4
+ url: https://github.com/upciti
- - login: Kludex
avatarUrl: https://avatars.githubusercontent.com/u/7353520?u=62adc405ef418f4b6c8caa93d3eb8ab107bc4927&v=4
url: https://github.com/Kludex
- login: samuelcolvin
avatarUrl: https://avatars.githubusercontent.com/u/4039449?u=42eb3b833047c8c4b4f647a031eaef148c16d93f&v=4
url: https://github.com/samuelcolvin
+ - login: koconder
+ avatarUrl: https://avatars.githubusercontent.com/u/25068?u=582657b23622aaa3dfe68bd028a780f272f456fa&v=4
+ url: https://github.com/koconder
- login: jefftriplett
avatarUrl: https://avatars.githubusercontent.com/u/50527?u=af1ddfd50f6afd6d99f333ba2ac8d0a5b245ea74&v=4
url: https://github.com/jefftriplett
- login: jstanden
avatarUrl: https://avatars.githubusercontent.com/u/63288?u=c3658d57d2862c607a0e19c2101c3c51876e36ad&v=4
url: https://github.com/jstanden
- - login: dekoza
- avatarUrl: https://avatars.githubusercontent.com/u/210980?u=c03c78a8ae1039b500dfe343665536ebc51979b2&v=4
- url: https://github.com/dekoza
+ - login: andreaso
+ avatarUrl: https://avatars.githubusercontent.com/u/285964?u=837265cc7562c0685f25b2d81cd9de0434fe107c&v=4
+ url: https://github.com/andreaso
- login: pamelafox
avatarUrl: https://avatars.githubusercontent.com/u/297042?v=4
url: https://github.com/pamelafox
@@ -131,21 +131,21 @@ sponsors:
- login: falkben
avatarUrl: https://avatars.githubusercontent.com/u/653031?u=ad9838e089058c9e5a0bab94c0eec7cc181e0cd0&v=4
url: https://github.com/falkben
- - login: jqueguiner
- avatarUrl: https://avatars.githubusercontent.com/u/690878?u=bd65cc1f228ce6455e56dfaca3ef47c33bc7c3b0&v=4
- url: https://github.com/jqueguiner
+ - login: mintuhouse
+ avatarUrl: https://avatars.githubusercontent.com/u/769950?u=ecfbd79a97d33177e0d093ddb088283cf7fe8444&v=4
+ url: https://github.com/mintuhouse
- login: tcsmith
avatarUrl: https://avatars.githubusercontent.com/u/989034?u=7d8d741552b3279e8f4d3878679823a705a46f8f&v=4
url: https://github.com/tcsmith
- - login: mrkmcknz
- avatarUrl: https://avatars.githubusercontent.com/u/1089376?u=2b9b8a8c25c33a4f6c220095638bd821cdfd13a3&v=4
- url: https://github.com/mrkmcknz
- login: mickaelandrieu
avatarUrl: https://avatars.githubusercontent.com/u/1247388?u=599f6e73e452a9453f2bd91e5c3100750e731ad4&v=4
url: https://github.com/mickaelandrieu
- - login: jonakoudijs
- avatarUrl: https://avatars.githubusercontent.com/u/1906344?u=5ca0c9a1a89b6a2ba31abe35c66bdc07af60a632&v=4
- url: https://github.com/jonakoudijs
+ - login: knallgelb
+ avatarUrl: https://avatars.githubusercontent.com/u/2358812?u=c48cb6362b309d74cbf144bd6ad3aed3eb443e82&v=4
+ url: https://github.com/knallgelb
+ - login: johannquerne
+ avatarUrl: https://avatars.githubusercontent.com/u/2736484?u=9b3381546a25679913a2b08110e4373c98840821&v=4
+ url: https://github.com/johannquerne
- login: Shark009
avatarUrl: https://avatars.githubusercontent.com/u/3163309?u=0c6f4091b0eda05c44c390466199826e6dc6e431&v=4
url: https://github.com/Shark009
@@ -165,7 +165,7 @@ sponsors:
avatarUrl: https://avatars.githubusercontent.com/u/3654837?v=4
url: https://github.com/anomaly
- login: jgreys
- avatarUrl: https://avatars.githubusercontent.com/u/4136890?u=c66ae617d614f6c886f1f1c1799d22100b3c848d&v=4
+ avatarUrl: https://avatars.githubusercontent.com/u/4136890?u=096820d1ef89877d57d0f68e669ead8b0fde84df&v=4
url: https://github.com/jgreys
- login: jaredtrog
avatarUrl: https://avatars.githubusercontent.com/u/4381365?v=4
@@ -189,7 +189,7 @@ sponsors:
avatarUrl: https://avatars.githubusercontent.com/u/6152183?u=c485eefca5c6329600cae63dd35e4f5682ce6924&v=4
url: https://github.com/iwpnd
- login: FernandoCelmer
- avatarUrl: https://avatars.githubusercontent.com/u/6262214?u=ab6108a843a2fb9df0934f482375d2907609f3ff&v=4
+ avatarUrl: https://avatars.githubusercontent.com/u/6262214?u=d29fff3fd862fda4ca752079f13f32e84c762ea4&v=4
url: https://github.com/FernandoCelmer
- login: simw
avatarUrl: https://avatars.githubusercontent.com/u/6322526?v=4
@@ -200,12 +200,15 @@ sponsors:
- login: hiancdtrsnm
avatarUrl: https://avatars.githubusercontent.com/u/7343177?v=4
url: https://github.com/hiancdtrsnm
- - login: Shackelford-Arden
- avatarUrl: https://avatars.githubusercontent.com/u/7362263?v=4
- url: https://github.com/Shackelford-Arden
- login: wdwinslow
avatarUrl: https://avatars.githubusercontent.com/u/11562137?u=dc01daafb354135603a263729e3d26d939c0c452&v=4
url: https://github.com/wdwinslow
+ - login: drcat101
+ avatarUrl: https://avatars.githubusercontent.com/u/11951946?u=e714b957185b8cf3d301cced7fc3ad2842122c6a&v=4
+ url: https://github.com/drcat101
+ - login: jsoques
+ avatarUrl: https://avatars.githubusercontent.com/u/12414216?u=620921d94196546cc8b9eae2cc4cbc3f95bab42f&v=4
+ url: https://github.com/jsoques
- login: joeds13
avatarUrl: https://avatars.githubusercontent.com/u/13631604?u=628eb122e08bef43767b3738752b883e8e7f6259&v=4
url: https://github.com/joeds13
@@ -227,15 +230,15 @@ sponsors:
- login: Filimoa
avatarUrl: https://avatars.githubusercontent.com/u/21352040?u=0be845711495bbd7b756e13fcaeb8efc1ebd78ba&v=4
url: https://github.com/Filimoa
- - login: LarryGF
- avatarUrl: https://avatars.githubusercontent.com/u/26148349?u=431bb34d36d41c172466252242175281ae132152&v=4
- url: https://github.com/LarryGF
+ - login: ehaca
+ avatarUrl: https://avatars.githubusercontent.com/u/25950317?u=cec1a3e0643b785288ae8260cc295a85ab344995&v=4
+ url: https://github.com/ehaca
+ - login: timlrx
+ avatarUrl: https://avatars.githubusercontent.com/u/28362229?u=9a745ca31372ee324af682715ae88ce8522f9094&v=4
+ url: https://github.com/timlrx
- login: BrettskiPy
avatarUrl: https://avatars.githubusercontent.com/u/30988215?u=d8a94a67e140d5ee5427724b292cc52d8827087a&v=4
url: https://github.com/BrettskiPy
- - login: mauroalejandrojm
- avatarUrl: https://avatars.githubusercontent.com/u/31569442?u=cdada990a1527926a36e95f62c30a8b48bbc49a1&v=4
- url: https://github.com/mauroalejandrojm
- login: Leay15
avatarUrl: https://avatars.githubusercontent.com/u/32212558?u=c4aa9c1737e515959382a5515381757b1fd86c53&v=4
url: https://github.com/Leay15
@@ -245,57 +248,57 @@ sponsors:
- login: ProteinQure
avatarUrl: https://avatars.githubusercontent.com/u/33707203?v=4
url: https://github.com/ProteinQure
- - login: askurihin
- avatarUrl: https://avatars.githubusercontent.com/u/37978981?v=4
- url: https://github.com/askurihin
+ - login: RafaelWO
+ avatarUrl: https://avatars.githubusercontent.com/u/38643099?u=56c676f024667ee416dc8b1cdf0c2611b9dc994f&v=4
+ url: https://github.com/RafaelWO
- login: arleybri18
avatarUrl: https://avatars.githubusercontent.com/u/39681546?u=5c028f81324b0e8c73b3c15bc4e7b0218d2ba0c3&v=4
url: https://github.com/arleybri18
- login: thenickben
avatarUrl: https://avatars.githubusercontent.com/u/40610922?u=1e907d904041b7c91213951a3cb344cd37c14aaf&v=4
url: https://github.com/thenickben
- - login: adtalos
- avatarUrl: https://avatars.githubusercontent.com/u/40748353?v=4
- url: https://github.com/adtalos
- - login: ybressler
- avatarUrl: https://avatars.githubusercontent.com/u/40807730?u=41e2c00f1eebe3c402635f0325e41b4e6511462c&v=4
- url: https://github.com/ybressler
- login: ddilidili
avatarUrl: https://avatars.githubusercontent.com/u/42176885?u=c0a849dde06987434653197b5f638d3deb55fc6c&v=4
url: https://github.com/ddilidili
+ - login: ramonalmeidam
+ avatarUrl: https://avatars.githubusercontent.com/u/45269580?u=3358750b3a5854d7c3ed77aaca7dd20a0f529d32&v=4
+ url: https://github.com/ramonalmeidam
- login: dudikbender
avatarUrl: https://avatars.githubusercontent.com/u/53487583?u=3a57542938ebfd57579a0111db2b297e606d9681&v=4
url: https://github.com/dudikbender
- - login: thisistheplace
- avatarUrl: https://avatars.githubusercontent.com/u/57633545?u=a3f3a7f8ace8511c6c067753f6eb6aee0db11ac6&v=4
- url: https://github.com/thisistheplace
+ - login: Amirshox
+ avatarUrl: https://avatars.githubusercontent.com/u/56707784?u=2a2f8cc243d6f5b29cd63fd2772f7a97aadc6c6b&v=4
+ url: https://github.com/Amirshox
+ - login: prodhype
+ avatarUrl: https://avatars.githubusercontent.com/u/60444672?u=3f278cff25ea37ead487d7861d4a984795de819e&v=4
+ url: https://github.com/prodhype
- login: yakkonaut
avatarUrl: https://avatars.githubusercontent.com/u/60633704?u=90a71fd631aa998ba4a96480788f017c9904e07b&v=4
url: https://github.com/yakkonaut
- login: patsatsia
avatarUrl: https://avatars.githubusercontent.com/u/61111267?u=3271b85f7a37b479c8d0ae0a235182e83c166edf&v=4
url: https://github.com/patsatsia
- - login: daverin
- avatarUrl: https://avatars.githubusercontent.com/u/70378377?u=6d1814195c0de7162820eaad95a25b423a3869c0&v=4
- url: https://github.com/daverin
- login: anthonycepeda
avatarUrl: https://avatars.githubusercontent.com/u/72019805?u=4252c6b6dc5024af502a823a3ac5e7a03a69963f&v=4
url: https://github.com/anthonycepeda
+ - login: patricioperezv
+ avatarUrl: https://avatars.githubusercontent.com/u/73832292?u=5f471f156e19ee7920e62ae0f4a47b95580e61cf&v=4
+ url: https://github.com/patricioperezv
+ - login: kaoru0310
+ avatarUrl: https://avatars.githubusercontent.com/u/80977929?u=1b61d10142b490e56af932ddf08a390fae8ee94f&v=4
+ url: https://github.com/kaoru0310
- login: DelfinaCare
avatarUrl: https://avatars.githubusercontent.com/u/83734439?v=4
url: https://github.com/DelfinaCare
- login: osawa-koki
avatarUrl: https://avatars.githubusercontent.com/u/94336223?u=59c6fe6945bcbbaff87b2a794238671b060620d2&v=4
url: https://github.com/osawa-koki
- - login: pyt3h
- avatarUrl: https://avatars.githubusercontent.com/u/99658549?v=4
- url: https://github.com/pyt3h
- - login: Dagmaara
- avatarUrl: https://avatars.githubusercontent.com/u/115501964?v=4
- url: https://github.com/Dagmaara
-- - login: SebTota
- avatarUrl: https://avatars.githubusercontent.com/u/25122511?v=4
- url: https://github.com/SebTota
+ - login: apitally
+ avatarUrl: https://avatars.githubusercontent.com/u/138365043?v=4
+ url: https://github.com/apitally
+- - login: getsentry
+ avatarUrl: https://avatars.githubusercontent.com/u/1396951?v=4
+ url: https://github.com/getsentry
- - login: pawamoy
avatarUrl: https://avatars.githubusercontent.com/u/3999221?u=b030e4c89df2f3a36bc4710b925bdeb6745c9856&v=4
url: https://github.com/pawamoy
@@ -320,15 +323,18 @@ sponsors:
- login: securancy
avatarUrl: https://avatars.githubusercontent.com/u/606673?v=4
url: https://github.com/securancy
- - login: hardbyte
- avatarUrl: https://avatars.githubusercontent.com/u/855189?u=aa29e92f34708814d6b67fcd47ca4cf2ce1c04ed&v=4
- url: https://github.com/hardbyte
+ - login: natehouk
+ avatarUrl: https://avatars.githubusercontent.com/u/805439?u=d8e4be629dc5d7efae7146157e41ee0bd129d9bc&v=4
+ url: https://github.com/natehouk
- login: browniebroke
avatarUrl: https://avatars.githubusercontent.com/u/861044?u=5abfca5588f3e906b31583d7ee62f6de4b68aa24&v=4
url: https://github.com/browniebroke
- - login: janfilips
- avatarUrl: https://avatars.githubusercontent.com/u/870699?u=80702ec63f14e675cd4cdcc6ce3821d2ed207fd7&v=4
- url: https://github.com/janfilips
+ - login: dodo5522
+ avatarUrl: https://avatars.githubusercontent.com/u/1362607?u=9bf1e0e520cccc547c046610c468ce6115bbcf9f&v=4
+ url: https://github.com/dodo5522
+ - login: miguelgr
+ avatarUrl: https://avatars.githubusercontent.com/u/1484589?u=54556072b8136efa12ae3b6902032ea2a39ace4b&v=4
+ url: https://github.com/miguelgr
- login: WillHogan
avatarUrl: https://avatars.githubusercontent.com/u/1661551?u=7036c064cf29781470573865264ec8e60b6b809f&v=4
url: https://github.com/WillHogan
@@ -344,15 +350,12 @@ sponsors:
- login: anthonycorletti
avatarUrl: https://avatars.githubusercontent.com/u/3477132?v=4
url: https://github.com/anthonycorletti
- - login: nikeee
- avatarUrl: https://avatars.githubusercontent.com/u/4068864?u=bbe73151f2b409c120160d032dc9aa6875ef0c4b&v=4
- url: https://github.com/nikeee
- login: Alisa-lisa
avatarUrl: https://avatars.githubusercontent.com/u/4137964?u=e7e393504f554f4ff15863a1e01a5746863ef9ce&v=4
url: https://github.com/Alisa-lisa
- - login: piotrgredowski
- avatarUrl: https://avatars.githubusercontent.com/u/4294480?v=4
- url: https://github.com/piotrgredowski
+ - login: gowikel
+ avatarUrl: https://avatars.githubusercontent.com/u/4339072?u=0e325ffcc539c38f89d9aa876bd87f9ec06ce0ee&v=4
+ url: https://github.com/gowikel
- login: danielunderwood
avatarUrl: https://avatars.githubusercontent.com/u/4472301?v=4
url: https://github.com/danielunderwood
@@ -368,15 +371,15 @@ sponsors:
- login: Baghdady92
avatarUrl: https://avatars.githubusercontent.com/u/5708590?v=4
url: https://github.com/Baghdady92
+ - login: jakeecolution
+ avatarUrl: https://avatars.githubusercontent.com/u/5884696?u=4a7c7883fb064b593b50cb6697b54687e6f7aafe&v=4
+ url: https://github.com/jakeecolution
- login: KentShikama
avatarUrl: https://avatars.githubusercontent.com/u/6329898?u=8b236810db9b96333230430837e1f021f9246da1&v=4
url: https://github.com/KentShikama
- login: katnoria
avatarUrl: https://avatars.githubusercontent.com/u/7674948?u=09767eb13e07e09496c5fee4e5ce21d9eac34a56&v=4
url: https://github.com/katnoria
- - login: mattwelke
- avatarUrl: https://avatars.githubusercontent.com/u/7719209?u=80f02a799323b1472b389b836d95957c93a6d856&v=4
- url: https://github.com/mattwelke
- login: harsh183
avatarUrl: https://avatars.githubusercontent.com/u/7780198?v=4
url: https://github.com/harsh183
@@ -390,7 +393,7 @@ sponsors:
avatarUrl: https://avatars.githubusercontent.com/u/8574425?u=aad2a9674273c9275fe414d99269b7418d144089&v=4
url: https://github.com/albertkun
- login: xncbf
- avatarUrl: https://avatars.githubusercontent.com/u/9462045?u=866a1311e4bd3ec5ae84185c4fcc99f397c883d7&v=4
+ avatarUrl: https://avatars.githubusercontent.com/u/9462045?u=ee91e210ae93b9cdd8f248b21cb028316cc0b747&v=4
url: https://github.com/xncbf
- login: DMantis
avatarUrl: https://avatars.githubusercontent.com/u/9536869?v=4
@@ -410,27 +413,45 @@ sponsors:
- login: pheanex
avatarUrl: https://avatars.githubusercontent.com/u/10408624?u=5b6bab6ee174aa6e991333e06eb29f628741013d&v=4
url: https://github.com/pheanex
+ - login: dzoladz
+ avatarUrl: https://avatars.githubusercontent.com/u/10561752?u=5ee314d54aa79592c18566827ad8914debd5630d&v=4
+ url: https://github.com/dzoladz
- login: JimFawkes
avatarUrl: https://avatars.githubusercontent.com/u/12075115?u=dc58ecfd064d72887c34bf500ddfd52592509acd&v=4
url: https://github.com/JimFawkes
+ - login: artempronevskiy
+ avatarUrl: https://avatars.githubusercontent.com/u/12235104?u=03df6e1e55c9c6fe5d230adabb8dd7d43d8bbe8f&v=4
+ url: https://github.com/artempronevskiy
- login: giuliano-oliveira
avatarUrl: https://avatars.githubusercontent.com/u/13181797?u=0ef2dfbf7fc9a9726d45c21d32b5d1038a174870&v=4
url: https://github.com/giuliano-oliveira
- login: TheR1D
avatarUrl: https://avatars.githubusercontent.com/u/16740832?u=b0dfdbdb27b79729430c71c6128962f77b7b53f7&v=4
url: https://github.com/TheR1D
+ - login: joshuatz
+ avatarUrl: https://avatars.githubusercontent.com/u/17817563?u=f1bf05b690d1fc164218f0b420cdd3acb7913e21&v=4
+ url: https://github.com/joshuatz
- login: jangia
avatarUrl: https://avatars.githubusercontent.com/u/17927101?u=9261b9bb0c3e3bb1ecba43e8915dc58d8c9a077e&v=4
url: https://github.com/jangia
- login: shuheng-liu
avatarUrl: https://avatars.githubusercontent.com/u/22414322?u=813c45f30786c6b511b21a661def025d8f7b609e&v=4
url: https://github.com/shuheng-liu
+ - login: salahelfarissi
+ avatarUrl: https://avatars.githubusercontent.com/u/23387408?u=73222a4be627c1a3dee9736e0da22224eccdc8f6&v=4
+ url: https://github.com/salahelfarissi
- login: pers0n4
avatarUrl: https://avatars.githubusercontent.com/u/24864600?u=f211a13a7b572cbbd7779b9c8d8cb428cc7ba07e&v=4
url: https://github.com/pers0n4
- login: kxzk
avatarUrl: https://avatars.githubusercontent.com/u/25046261?u=e185e58080090f9e678192cd214a14b14a2b232b&v=4
url: https://github.com/kxzk
+ - login: SebTota
+ avatarUrl: https://avatars.githubusercontent.com/u/25122511?v=4
+ url: https://github.com/SebTota
+ - login: nisutec
+ avatarUrl: https://avatars.githubusercontent.com/u/25281462?u=e562484c451fdfc59053163f64405f8eb262b8b0&v=4
+ url: https://github.com/nisutec
- login: hoenie-ams
avatarUrl: https://avatars.githubusercontent.com/u/25708487?u=cda07434f0509ac728d9edf5e681117c0f6b818b&v=4
url: https://github.com/hoenie-ams
@@ -440,9 +461,9 @@ sponsors:
- login: rlnchow
avatarUrl: https://avatars.githubusercontent.com/u/28018479?u=a93ca9cf1422b9ece155784a72d5f2fdbce7adff&v=4
url: https://github.com/rlnchow
- - login: mertguvencli
- avatarUrl: https://avatars.githubusercontent.com/u/29762151?u=16a906d90df96c8cff9ea131a575c4bc171b1523&v=4
- url: https://github.com/mertguvencli
+ - login: White-Mask
+ avatarUrl: https://avatars.githubusercontent.com/u/31826970?u=8625355dc25ddf9c85a8b2b0b9932826c4c8f44c&v=4
+ url: https://github.com/White-Mask
- login: HosamAlmoghraby
avatarUrl: https://avatars.githubusercontent.com/u/32025281?u=aa1b09feabccbf9dc506b81c71155f32d126cefa&v=4
url: https://github.com/HosamAlmoghraby
@@ -450,14 +471,14 @@ sponsors:
avatarUrl: https://avatars.githubusercontent.com/u/33275230?u=eb223cad27017bb1e936ee9b429b450d092d0236&v=4
url: https://github.com/engineerjoe440
- login: bnkc
- avatarUrl: https://avatars.githubusercontent.com/u/34930566?u=527044d90b5ebb7f8dad517db5da1f45253b774b&v=4
+ avatarUrl: https://avatars.githubusercontent.com/u/34930566?u=fa1dc8db3e920cf5c5636b97180a6f811fa01aaf&v=4
url: https://github.com/bnkc
- login: declon
avatarUrl: https://avatars.githubusercontent.com/u/36180226?v=4
url: https://github.com/declon
- - login: miraedbswo
- avatarUrl: https://avatars.githubusercontent.com/u/36796047?u=9e7a5b3e558edc61d35d0f9dfac37541bae7f56d&v=4
- url: https://github.com/miraedbswo
+ - login: curegit
+ avatarUrl: https://avatars.githubusercontent.com/u/37978051?u=1733c322079118c0cdc573c03d92813f50a9faec&v=4
+ url: https://github.com/curegit
- login: kristiangronberg
avatarUrl: https://avatars.githubusercontent.com/u/42678548?v=4
url: https://github.com/kristiangronberg
@@ -467,48 +488,51 @@ sponsors:
- login: ArtyomVancyan
avatarUrl: https://avatars.githubusercontent.com/u/44609997?v=4
url: https://github.com/ArtyomVancyan
- - login: josehenriqueroveda
- avatarUrl: https://avatars.githubusercontent.com/u/46685746?u=2e672057a7dbe1dba47e57c378fc0cac336022eb&v=4
- url: https://github.com/josehenriqueroveda
- login: hgalytoby
avatarUrl: https://avatars.githubusercontent.com/u/50397689?u=f4888c2c54929bd86eed0d3971d09fcb306e5088&v=4
url: https://github.com/hgalytoby
- - login: eladgunders
- avatarUrl: https://avatars.githubusercontent.com/u/52347338?u=83d454817cf991a035c8827d46ade050c813e2d6&v=4
- url: https://github.com/eladgunders
- login: conservative-dude
avatarUrl: https://avatars.githubusercontent.com/u/55538308?u=f250c44942ea6e73a6bd90739b381c470c192c11&v=4
url: https://github.com/conservative-dude
+ - login: Calesi19
+ avatarUrl: https://avatars.githubusercontent.com/u/58052598?u=273d4fc364c004602c93dd6adeaf5cc915b93cd2&v=4
+ url: https://github.com/Calesi19
- login: 0417taehyun
avatarUrl: https://avatars.githubusercontent.com/u/63915557?u=47debaa860fd52c9b98c97ef357ddcec3b3fb399&v=4
url: https://github.com/0417taehyun
+ - login: fernandosmither
+ avatarUrl: https://avatars.githubusercontent.com/u/66154723?u=a76a037b5d674938a75d2cff862fb6dfd63ec214&v=4
+ url: https://github.com/fernandosmither
+ - login: romabozhanovgithub
+ avatarUrl: https://avatars.githubusercontent.com/u/67696229?u=e4b921eef096415300425aca249348f8abb78ad7&v=4
+ url: https://github.com/romabozhanovgithub
+ - login: mbukeRepo
+ avatarUrl: https://avatars.githubusercontent.com/u/70356088?u=d2eb23e2b222a3b316c4183b05a3236b32819dc2&v=4
+ url: https://github.com/mbukeRepo
+ - login: adriiamontoto
+ avatarUrl: https://avatars.githubusercontent.com/u/75563346?u=eeb1350b82ecb4d96592f9b6cd1a16870c355e38&v=4
+ url: https://github.com/adriiamontoto
+ - login: PelicanQ
+ avatarUrl: https://avatars.githubusercontent.com/u/77930606?v=4
+ url: https://github.com/PelicanQ
+ - login: tahmarrrr23
+ avatarUrl: https://avatars.githubusercontent.com/u/138208610?u=465a46b0ff72a74252d3e3a71ac7d2f1919cda28&v=4
+ url: https://github.com/tahmarrrr23
- - login: ssbarnea
avatarUrl: https://avatars.githubusercontent.com/u/102495?u=b4bf6818deefe59952ac22fec6ed8c76de1b8f7c&v=4
url: https://github.com/ssbarnea
- login: Patechoc
avatarUrl: https://avatars.githubusercontent.com/u/2376641?u=23b49e9eda04f078cb74fa3f93593aa6a57bb138&v=4
url: https://github.com/Patechoc
- - login: LanceMoe
- avatarUrl: https://avatars.githubusercontent.com/u/18505474?u=7fd3ead4364bdf215b6d75cb122b3811c391ef6b&v=4
- url: https://github.com/LanceMoe
+ - login: DazzyMlv
+ avatarUrl: https://avatars.githubusercontent.com/u/23006212?u=df429da52882b0432e5ac81d4f1b489abc86433c&v=4
+ url: https://github.com/DazzyMlv
- login: sadikkuzu
avatarUrl: https://avatars.githubusercontent.com/u/23168063?u=d179c06bb9f65c4167fcab118526819f8e0dac17&v=4
url: https://github.com/sadikkuzu
- - login: ruizdiazever
- avatarUrl: https://avatars.githubusercontent.com/u/29817086?u=2df54af55663d246e3a4dc8273711c37f1adb117&v=4
- url: https://github.com/ruizdiazever
- - login: samnimoh
- avatarUrl: https://avatars.githubusercontent.com/u/33413170?u=147bc516be6cb647b28d7e3b3fea3a018a331145&v=4
- url: https://github.com/samnimoh
- login: danburonline
- avatarUrl: https://avatars.githubusercontent.com/u/34251194?u=2cad4388c1544e539ecb732d656e42fb07b4ff2d&v=4
+ avatarUrl: https://avatars.githubusercontent.com/u/34251194?u=94935cccfbec58083ab1e535212d54f1bf2c978a&v=4
url: https://github.com/danburonline
- - login: iharshgor
- avatarUrl: https://avatars.githubusercontent.com/u/35490011?u=2dea054476e752d9e92c9d71a9a7cc919b1c2f8e&v=4
- url: https://github.com/iharshgor
- login: rwxd
avatarUrl: https://avatars.githubusercontent.com/u/40308458?u=cd04a39e3655923be4f25c2ba8a5a07b3da3230a&v=4
url: https://github.com/rwxd
- - login: ThomasPalma1
- avatarUrl: https://avatars.githubusercontent.com/u/66331874?u=5763f7402d784ba189b60d704ff5849b4d0a63fb&v=4
- url: https://github.com/ThomasPalma1
diff --git a/docs/en/data/people.yml b/docs/en/data/people.yml
index 89d189564c..2877e7938c 100644
--- a/docs/en/data/people.yml
+++ b/docs/en/data/people.yml
@@ -1,16 +1,16 @@
maintainers:
- login: tiangolo
- answers: 1849
- prs: 466
+ answers: 1870
+ prs: 523
avatarUrl: https://avatars.githubusercontent.com/u/1326112?u=740f11212a731f56798f558ceddb0bd07642afa7&v=4
url: https://github.com/tiangolo
experts:
- login: Kludex
- count: 463
+ count: 522
avatarUrl: https://avatars.githubusercontent.com/u/7353520?u=62adc405ef418f4b6c8caa93d3eb8ab107bc4927&v=4
url: https://github.com/Kludex
- login: dmontagu
- count: 239
+ count: 241
avatarUrl: https://avatars.githubusercontent.com/u/35119617?u=540f30c937a6450812628b9592a1dfe91bbe148e&v=4
url: https://github.com/dmontagu
- login: Mause
@@ -21,26 +21,26 @@ experts:
count: 217
avatarUrl: https://avatars.githubusercontent.com/u/62724709?u=bba5af018423a2858d49309bed2a899bb5c34ac5&v=4
url: https://github.com/ycd
+- login: jgould22
+ count: 205
+ avatarUrl: https://avatars.githubusercontent.com/u/4335847?u=ed77f67e0bb069084639b24d812dbb2a2b1dc554&v=4
+ url: https://github.com/jgould22
- login: JarroVGIT
count: 193
avatarUrl: https://avatars.githubusercontent.com/u/13659033?u=e8bea32d07a5ef72f7dde3b2079ceb714923ca05&v=4
url: https://github.com/JarroVGIT
-- login: jgould22
- count: 157
- avatarUrl: https://avatars.githubusercontent.com/u/4335847?u=ed77f67e0bb069084639b24d812dbb2a2b1dc554&v=4
- url: https://github.com/jgould22
- login: euri10
count: 153
avatarUrl: https://avatars.githubusercontent.com/u/1104190?u=321a2e953e6645a7d09b732786c7a8061e0f8a8b&v=4
url: https://github.com/euri10
+- login: iudeen
+ count: 127
+ avatarUrl: https://avatars.githubusercontent.com/u/10519440?u=2843b3303282bff8b212dcd4d9d6689452e4470c&v=4
+ url: https://github.com/iudeen
- login: phy25
count: 126
avatarUrl: https://avatars.githubusercontent.com/u/331403?v=4
url: https://github.com/phy25
-- login: iudeen
- count: 121
- avatarUrl: https://avatars.githubusercontent.com/u/10519440?u=2843b3303282bff8b212dcd4d9d6689452e4470c&v=4
- url: https://github.com/iudeen
- login: raphaelauv
count: 83
avatarUrl: https://avatars.githubusercontent.com/u/10202690?u=e6f86f5c0c3026a15d6b51792fa3e532b12f1371&v=4
@@ -61,14 +61,18 @@ experts:
count: 49
avatarUrl: https://avatars.githubusercontent.com/u/516999?u=437c0c5038558c67e887ccd863c1ba0f846c03da&v=4
url: https://github.com/sm-Fifteen
+- login: yinziyan1206
+ count: 48
+ avatarUrl: https://avatars.githubusercontent.com/u/37829370?u=da44ca53aefd5c23f346fab8e9fd2e108294c179&v=4
+ url: https://github.com/yinziyan1206
- login: insomnes
count: 45
avatarUrl: https://avatars.githubusercontent.com/u/16958893?u=f8be7088d5076d963984a21f95f44e559192d912&v=4
url: https://github.com/insomnes
-- login: yinziyan1206
+- login: adriangb
count: 45
- avatarUrl: https://avatars.githubusercontent.com/u/37829370?u=da44ca53aefd5c23f346fab8e9fd2e108294c179&v=4
- url: https://github.com/yinziyan1206
+ avatarUrl: https://avatars.githubusercontent.com/u/1755071?u=612704256e38d6ac9cbed24f10e4b6ac2da74ecb&v=4
+ url: https://github.com/adriangb
- login: acidjunk
count: 45
avatarUrl: https://avatars.githubusercontent.com/u/685002?u=b5094ab4527fc84b006c0ac9ff54367bdebb2267&v=4
@@ -77,22 +81,26 @@ experts:
count: 45
avatarUrl: https://avatars.githubusercontent.com/u/27180793?u=5cf2877f50b3eb2bc55086089a78a36f07042889&v=4
url: https://github.com/Dustyposa
-- login: adriangb
- count: 44
- avatarUrl: https://avatars.githubusercontent.com/u/1755071?u=612704256e38d6ac9cbed24f10e4b6ac2da74ecb&v=4
- url: https://github.com/adriangb
-- login: frankie567
- count: 43
- avatarUrl: https://avatars.githubusercontent.com/u/1144727?u=85c025e3fcc7bd79a5665c63ee87cdf8aae13374&v=4
- url: https://github.com/frankie567
- login: odiseo0
count: 43
avatarUrl: https://avatars.githubusercontent.com/u/87550035?u=241a71f6b7068738b81af3e57f45ffd723538401&v=4
url: https://github.com/odiseo0
+- login: frankie567
+ count: 43
+ avatarUrl: https://avatars.githubusercontent.com/u/1144727?u=c159fe047727aedecbbeeaa96a1b03ceb9d39add&v=4
+ url: https://github.com/frankie567
- login: includeamin
count: 40
avatarUrl: https://avatars.githubusercontent.com/u/11836741?u=8bd5ef7e62fe6a82055e33c4c0e0a7879ff8cfb6&v=4
url: https://github.com/includeamin
+- login: n8sty
+ count: 40
+ avatarUrl: https://avatars.githubusercontent.com/u/2964996?v=4
+ url: https://github.com/n8sty
+- login: chbndrhnns
+ count: 38
+ avatarUrl: https://avatars.githubusercontent.com/u/7534547?v=4
+ url: https://github.com/chbndrhnns
- login: STeveShary
count: 37
avatarUrl: https://avatars.githubusercontent.com/u/5167622?u=de8f597c81d6336fcebc37b32dfd61a3f877160c&v=4
@@ -101,14 +109,14 @@ experts:
count: 35
avatarUrl: https://avatars.githubusercontent.com/u/31960541?u=47f4829c77f4962ab437ffb7995951e41eeebe9b&v=4
url: https://github.com/krishnardt
-- login: chbndrhnns
- count: 35
- avatarUrl: https://avatars.githubusercontent.com/u/7534547?v=4
- url: https://github.com/chbndrhnns
- login: panla
count: 32
avatarUrl: https://avatars.githubusercontent.com/u/41326348?u=ba2fda6b30110411ecbf406d187907e2b420ac19&v=4
url: https://github.com/panla
+- login: JavierSanchezCastro
+ count: 30
+ avatarUrl: https://avatars.githubusercontent.com/u/72013291?u=ae5679e6bd971d9d98cd5e76e8683f83642ba950&v=4
+ url: https://github.com/JavierSanchezCastro
- login: prostomarkeloff
count: 28
avatarUrl: https://avatars.githubusercontent.com/u/28061158?u=72309cc1f2e04e40fa38b29969cb4e9d3f722e7b&v=4
@@ -131,12 +139,12 @@ experts:
url: https://github.com/SirTelemak
- login: rafsaf
count: 21
- avatarUrl: https://avatars.githubusercontent.com/u/51059348?u=f8f0d6d6e90fac39fa786228158ba7f013c74271&v=4
+ avatarUrl: https://avatars.githubusercontent.com/u/51059348?u=5fe59a56e1f2f9ccd8005d71752a8276f133ae1a&v=4
url: https://github.com/rafsaf
-- login: n8sty
+- login: nymous
count: 20
- avatarUrl: https://avatars.githubusercontent.com/u/2964996?v=4
- url: https://github.com/n8sty
+ avatarUrl: https://avatars.githubusercontent.com/u/4216559?u=360a36fb602cded27273cbfc0afc296eece90662&v=4
+ url: https://github.com/nymous
- login: nsidnev
count: 20
avatarUrl: https://avatars.githubusercontent.com/u/22559461?u=a9cc3238217e21dc8796a1a500f01b722adb082c&v=4
@@ -145,14 +153,22 @@ experts:
count: 20
avatarUrl: https://avatars.githubusercontent.com/u/565544?v=4
url: https://github.com/chris-allnutt
-- login: zoliknemet
- count: 18
- avatarUrl: https://avatars.githubusercontent.com/u/22326718?u=31ba446ac290e23e56eea8e4f0c558aaf0b40779&v=4
- url: https://github.com/zoliknemet
+- login: chrisK824
+ count: 20
+ avatarUrl: https://avatars.githubusercontent.com/u/79946379?u=03d85b22d696a58a9603e55fbbbe2de6b0f4face&v=4
+ url: https://github.com/chrisK824
+- login: ebottos94
+ count: 20
+ avatarUrl: https://avatars.githubusercontent.com/u/100039558?u=e2c672da5a7977fd24d87ce6ab35f8bf5b1ed9fa&v=4
+ url: https://github.com/ebottos94
- login: retnikt
count: 18
avatarUrl: https://avatars.githubusercontent.com/u/24581770?v=4
url: https://github.com/retnikt
+- login: zoliknemet
+ count: 18
+ avatarUrl: https://avatars.githubusercontent.com/u/22326718?u=31ba446ac290e23e56eea8e4f0c558aaf0b40779&v=4
+ url: https://github.com/zoliknemet
- login: Hultner
count: 17
avatarUrl: https://avatars.githubusercontent.com/u/2669034?u=115e53df959309898ad8dc9443fbb35fee71df07&v=4
@@ -169,59 +185,39 @@ experts:
count: 17
avatarUrl: https://avatars.githubusercontent.com/u/16540232?u=05d2beb8e034d584d0a374b99d8826327bd7f614&v=4
url: https://github.com/caeser1996
-- login: jonatasoli
- count: 16
- avatarUrl: https://avatars.githubusercontent.com/u/26334101?u=071c062d2861d3dd127f6b4a5258cd8ef55d4c50&v=4
- url: https://github.com/jonatasoli
- login: dstlny
count: 16
avatarUrl: https://avatars.githubusercontent.com/u/41964673?u=9f2174f9d61c15c6e3a4c9e3aeee66f711ce311f&v=4
url: https://github.com/dstlny
-- login: abhint
- count: 15
- avatarUrl: https://avatars.githubusercontent.com/u/25699289?u=b5d219277b4d001ac26fb8be357fddd88c29d51b&v=4
- url: https://github.com/abhint
-- login: nymous
- count: 15
- avatarUrl: https://avatars.githubusercontent.com/u/4216559?u=360a36fb602cded27273cbfc0afc296eece90662&v=4
- url: https://github.com/nymous
+- login: jonatasoli
+ count: 16
+ avatarUrl: https://avatars.githubusercontent.com/u/26334101?u=071c062d2861d3dd127f6b4a5258cd8ef55d4c50&v=4
+ url: https://github.com/jonatasoli
- login: ghost
count: 15
avatarUrl: https://avatars.githubusercontent.com/u/10137?u=b1951d34a583cf12ec0d3b0781ba19be97726318&v=4
url: https://github.com/ghost
-- login: simondale00
- count: 15
- avatarUrl: https://avatars.githubusercontent.com/u/33907262?v=4
- url: https://github.com/simondale00
-- login: jorgerpo
- count: 15
- avatarUrl: https://avatars.githubusercontent.com/u/12537771?u=7444d20019198e34911082780cc7ad73f2b97cb3&v=4
- url: https://github.com/jorgerpo
last_month_active:
-- login: Kludex
- count: 24
- avatarUrl: https://avatars.githubusercontent.com/u/7353520?u=62adc405ef418f4b6c8caa93d3eb8ab107bc4927&v=4
- url: https://github.com/Kludex
+- login: Ventura94
+ count: 5
+ avatarUrl: https://avatars.githubusercontent.com/u/43103937?u=ccb837005aaf212a449c374618c4339089e2f733&v=4
+ url: https://github.com/Ventura94
+- login: JavierSanchezCastro
+ count: 4
+ avatarUrl: https://avatars.githubusercontent.com/u/72013291?u=ae5679e6bd971d9d98cd5e76e8683f83642ba950&v=4
+ url: https://github.com/JavierSanchezCastro
- login: jgould22
- count: 17
+ count: 3
avatarUrl: https://avatars.githubusercontent.com/u/4335847?u=ed77f67e0bb069084639b24d812dbb2a2b1dc554&v=4
url: https://github.com/jgould22
-- login: arjwilliams
- count: 8
- avatarUrl: https://avatars.githubusercontent.com/u/22227620?v=4
- url: https://github.com/arjwilliams
-- login: Ahmed-Abdou14
- count: 4
- avatarUrl: https://avatars.githubusercontent.com/u/104530599?u=05365b155a1ff911532e8be316acfad2e0736f98&v=4
- url: https://github.com/Ahmed-Abdou14
-- login: iudeen
+- login: Kludex
count: 3
- avatarUrl: https://avatars.githubusercontent.com/u/10519440?u=2843b3303282bff8b212dcd4d9d6689452e4470c&v=4
- url: https://github.com/iudeen
-- login: mikeedjones
+ avatarUrl: https://avatars.githubusercontent.com/u/7353520?u=62adc405ef418f4b6c8caa93d3eb8ab107bc4927&v=4
+ url: https://github.com/Kludex
+- login: n8sty
count: 3
- avatarUrl: https://avatars.githubusercontent.com/u/4087139?u=cc4a242896ac2fcf88a53acfaf190d0fe0a1f0c9&v=4
- url: https://github.com/mikeedjones
+ avatarUrl: https://avatars.githubusercontent.com/u/2964996?v=4
+ url: https://github.com/n8sty
top_contributors:
- login: waynerv
count: 25
@@ -236,21 +232,21 @@ top_contributors:
avatarUrl: https://avatars.githubusercontent.com/u/7353520?u=62adc405ef418f4b6c8caa93d3eb8ab107bc4927&v=4
url: https://github.com/Kludex
- login: jaystone776
- count: 17
+ count: 18
avatarUrl: https://avatars.githubusercontent.com/u/11191137?u=299205a95e9b6817a43144a48b643346a5aac5cc&v=4
url: https://github.com/jaystone776
- login: dmontagu
- count: 16
+ count: 17
avatarUrl: https://avatars.githubusercontent.com/u/35119617?u=540f30c937a6450812628b9592a1dfe91bbe148e&v=4
url: https://github.com/dmontagu
+- login: Xewus
+ count: 14
+ avatarUrl: https://avatars.githubusercontent.com/u/85196001?u=f8e2dc7e5104f109cef944af79050ea8d1b8f914&v=4
+ url: https://github.com/Xewus
- login: euri10
count: 13
avatarUrl: https://avatars.githubusercontent.com/u/1104190?u=321a2e953e6645a7d09b732786c7a8061e0f8a8b&v=4
url: https://github.com/euri10
-- login: Xewus
- count: 13
- avatarUrl: https://avatars.githubusercontent.com/u/85196001?u=f8e2dc7e5104f109cef944af79050ea8d1b8f914&v=4
- url: https://github.com/Xewus
- login: mariacamilagl
count: 12
avatarUrl: https://avatars.githubusercontent.com/u/11489395?u=4adb6986bf3debfc2b8216ae701f2bd47d73da7d&v=4
@@ -307,6 +303,10 @@ top_contributors:
count: 5
avatarUrl: https://avatars.githubusercontent.com/u/43503750?u=f440bc9062afb3c43b9b9c6cdfdcfe31d58699ef&v=4
url: https://github.com/ComicShrimp
+- login: tamtam-fitness
+ count: 5
+ avatarUrl: https://avatars.githubusercontent.com/u/62091034?u=8da19a6bd3d02f5d6ba30c7247d5b46c98dd1403&v=4
+ url: https://github.com/tamtam-fitness
- login: jekirl
count: 4
avatarUrl: https://avatars.githubusercontent.com/u/2546697?u=a027452387d85bd4a14834e19d716c99255fb3b7&v=4
@@ -335,6 +335,10 @@ top_contributors:
count: 4
avatarUrl: https://avatars.githubusercontent.com/u/61513630?u=320e43fe4dc7bc6efc64e9b8f325f8075634fd20&v=4
url: https://github.com/lsglucas
+- login: adriangb
+ count: 4
+ avatarUrl: https://avatars.githubusercontent.com/u/1755071?u=612704256e38d6ac9cbed24f10e4b6ac2da74ecb&v=4
+ url: https://github.com/adriangb
- login: iudeen
count: 4
avatarUrl: https://avatars.githubusercontent.com/u/10519440?u=2843b3303282bff8b212dcd4d9d6689452e4470c&v=4
@@ -347,23 +351,35 @@ top_contributors:
count: 4
avatarUrl: https://avatars.githubusercontent.com/u/36765187?u=c6e0ba571c1ccb6db9d94e62e4b8b5eda811a870&v=4
url: https://github.com/ivan-abc
+- login: rostik1410
+ count: 4
+ avatarUrl: https://avatars.githubusercontent.com/u/11443899?u=e26a635c2ba220467b308a326a579b8ccf4a8701&v=4
+ url: https://github.com/rostik1410
top_reviewers:
- login: Kludex
- count: 136
+ count: 145
avatarUrl: https://avatars.githubusercontent.com/u/7353520?u=62adc405ef418f4b6c8caa93d3eb8ab107bc4927&v=4
url: https://github.com/Kludex
- login: BilalAlpaslan
- count: 79
+ count: 86
avatarUrl: https://avatars.githubusercontent.com/u/47563997?u=63ed66e304fe8d765762c70587d61d9196e5c82d&v=4
url: https://github.com/BilalAlpaslan
- login: yezz123
- count: 78
+ count: 82
avatarUrl: https://avatars.githubusercontent.com/u/52716203?u=d7062cbc6eb7671d5dc9cc0e32a24ae335e0f225&v=4
url: https://github.com/yezz123
+- login: iudeen
+ count: 55
+ avatarUrl: https://avatars.githubusercontent.com/u/10519440?u=2843b3303282bff8b212dcd4d9d6689452e4470c&v=4
+ url: https://github.com/iudeen
- login: tokusumi
count: 51
avatarUrl: https://avatars.githubusercontent.com/u/41147016?u=55010621aece725aa702270b54fed829b6a1fe60&v=4
url: https://github.com/tokusumi
+- login: Xewus
+ count: 50
+ avatarUrl: https://avatars.githubusercontent.com/u/85196001?u=f8e2dc7e5104f109cef944af79050ea8d1b8f914&v=4
+ url: https://github.com/Xewus
- login: waynerv
count: 47
avatarUrl: https://avatars.githubusercontent.com/u/39515546?u=ec35139777597cdbbbddda29bf8b9d4396b429a9&v=4
@@ -372,10 +388,6 @@ top_reviewers:
count: 47
avatarUrl: https://avatars.githubusercontent.com/u/59285379?v=4
url: https://github.com/Laineyzhang55
-- login: iudeen
- count: 46
- avatarUrl: https://avatars.githubusercontent.com/u/10519440?u=2843b3303282bff8b212dcd4d9d6689452e4470c&v=4
- url: https://github.com/iudeen
- login: ycd
count: 45
avatarUrl: https://avatars.githubusercontent.com/u/62724709?u=bba5af018423a2858d49309bed2a899bb5c34ac5&v=4
@@ -384,10 +396,6 @@ top_reviewers:
count: 41
avatarUrl: https://avatars.githubusercontent.com/u/24587499?u=e772190a051ab0eaa9c8542fcff1892471638f2b&v=4
url: https://github.com/cikay
-- login: Xewus
- count: 38
- avatarUrl: https://avatars.githubusercontent.com/u/85196001?u=f8e2dc7e5104f109cef944af79050ea8d1b8f914&v=4
- url: https://github.com/Xewus
- login: JarroVGIT
count: 34
avatarUrl: https://avatars.githubusercontent.com/u/13659033?u=e8bea32d07a5ef72f7dde3b2079ceb714923ca05&v=4
@@ -404,22 +412,22 @@ top_reviewers:
count: 28
avatarUrl: https://avatars.githubusercontent.com/u/3127847?u=b0a652331da17efeb85cd6e3a4969182e5004804&v=4
url: https://github.com/cassiobotaro
+- login: lsglucas
+ count: 27
+ avatarUrl: https://avatars.githubusercontent.com/u/61513630?u=320e43fe4dc7bc6efc64e9b8f325f8075634fd20&v=4
+ url: https://github.com/lsglucas
- login: komtaki
count: 27
avatarUrl: https://avatars.githubusercontent.com/u/39375566?u=260ad6b1a4b34c07dbfa728da5e586f16f6d1824&v=4
url: https://github.com/komtaki
-- login: lsglucas
- count: 26
- avatarUrl: https://avatars.githubusercontent.com/u/61513630?u=320e43fe4dc7bc6efc64e9b8f325f8075634fd20&v=4
- url: https://github.com/lsglucas
+- login: Ryandaydev
+ count: 25
+ avatarUrl: https://avatars.githubusercontent.com/u/4292423?u=48f68868db8886fce31a1d802c1003914c6cd7c6&v=4
+ url: https://github.com/Ryandaydev
- login: LorhanSohaky
count: 24
avatarUrl: https://avatars.githubusercontent.com/u/16273730?u=095b66f243a2cd6a0aadba9a095009f8aaf18393&v=4
url: https://github.com/LorhanSohaky
-- login: Ryandaydev
- count: 24
- avatarUrl: https://avatars.githubusercontent.com/u/4292423?u=809f3d1074d04bbc28012a7f17f06ea56f5bd71a&v=4
- url: https://github.com/Ryandaydev
- login: dmontagu
count: 23
avatarUrl: https://avatars.githubusercontent.com/u/35119617?u=540f30c937a6450812628b9592a1dfe91bbe148e&v=4
@@ -448,6 +456,10 @@ top_reviewers:
count: 17
avatarUrl: https://avatars.githubusercontent.com/u/67154681?u=5d634834cc514028ea3f9115f7030b99a1f4d5a4&v=4
url: https://github.com/zy7y
+- login: peidrao
+ count: 17
+ avatarUrl: https://avatars.githubusercontent.com/u/32584628?u=a66902b40c13647d0ed0e573d598128240a4dd04&v=4
+ url: https://github.com/peidrao
- login: yanever
count: 16
avatarUrl: https://avatars.githubusercontent.com/u/21978760?v=4
@@ -456,14 +468,26 @@ top_reviewers:
count: 16
avatarUrl: https://avatars.githubusercontent.com/u/52768429?u=6a3aa15277406520ad37f6236e89466ed44bc5b8&v=4
url: https://github.com/SwftAlpc
+- login: nilslindemann
+ count: 16
+ avatarUrl: https://avatars.githubusercontent.com/u/6892179?u=1dca6a22195d6cd1ab20737c0e19a4c55d639472&v=4
+ url: https://github.com/nilslindemann
- login: axel584
count: 16
avatarUrl: https://avatars.githubusercontent.com/u/1334088?u=9667041f5b15dc002b6f9665fda8c0412933ac04&v=4
url: https://github.com/axel584
+- login: Alexandrhub
+ count: 16
+ avatarUrl: https://avatars.githubusercontent.com/u/119126536?u=9fc0d48f3307817bafecc5861eb2168401a6cb04&v=4
+ url: https://github.com/Alexandrhub
- login: DevDae
count: 16
avatarUrl: https://avatars.githubusercontent.com/u/87962045?u=08e10fa516e844934f4b3fc7c38b33c61697e4a1&v=4
url: https://github.com/DevDae
+- login: hasansezertasan
+ count: 16
+ avatarUrl: https://avatars.githubusercontent.com/u/13135006?u=99f0b0f0fc47e88e8abb337b4447357939ef93e7&v=4
+ url: https://github.com/hasansezertasan
- login: pedabraham
count: 15
avatarUrl: https://avatars.githubusercontent.com/u/16860088?u=abf922a7b920bf8fdb7867d8b43e091f1e796178&v=4
@@ -472,18 +496,14 @@ top_reviewers:
count: 15
avatarUrl: https://avatars.githubusercontent.com/u/63476957?u=6c86e59b48e0394d4db230f37fc9ad4d7e2c27c7&v=4
url: https://github.com/delhi09
-- login: Alexandrhub
- count: 15
- avatarUrl: https://avatars.githubusercontent.com/u/119126536?u=9fc0d48f3307817bafecc5861eb2168401a6cb04&v=4
- url: https://github.com/Alexandrhub
- login: sh0nk
count: 13
avatarUrl: https://avatars.githubusercontent.com/u/6478810?u=af15d724875cec682ed8088a86d36b2798f981c0&v=4
url: https://github.com/sh0nk
-- login: peidrao
+- login: wdh99
count: 13
- avatarUrl: https://avatars.githubusercontent.com/u/32584628?u=5b94b548ef0002ef3219d7c07ac0fac17c6201a2&v=4
- url: https://github.com/peidrao
+ avatarUrl: https://avatars.githubusercontent.com/u/108172295?u=8a8fb95d5afe3e0fa33257b2aecae88d436249eb&v=4
+ url: https://github.com/wdh99
- login: r0b2g1t
count: 13
avatarUrl: https://avatars.githubusercontent.com/u/5357541?u=6428442d875d5d71aaa1bb38bb11c4be1a526bc2&v=4
@@ -500,10 +520,6 @@ top_reviewers:
count: 11
avatarUrl: https://avatars.githubusercontent.com/u/46193920?u=789927ee09cfabd752d3bd554fa6baf4850d2777&v=4
url: https://github.com/solomein-sv
-- login: wdh99
- count: 11
- avatarUrl: https://avatars.githubusercontent.com/u/108172295?u=8a8fb95d5afe3e0fa33257b2aecae88d436249eb&v=4
- url: https://github.com/wdh99
- login: mariacamilagl
count: 10
avatarUrl: https://avatars.githubusercontent.com/u/11489395?u=4adb6986bf3debfc2b8216ae701f2bd47d73da7d&v=4
@@ -524,6 +540,10 @@ top_reviewers:
count: 10
avatarUrl: https://avatars.githubusercontent.com/u/43503750?u=f440bc9062afb3c43b9b9c6cdfdcfe31d58699ef&v=4
url: https://github.com/ComicShrimp
+- login: romashevchenko
+ count: 9
+ avatarUrl: https://avatars.githubusercontent.com/u/132477732?v=4
+ url: https://github.com/romashevchenko
- login: izaguerreiro
count: 9
avatarUrl: https://avatars.githubusercontent.com/u/2241504?v=4
@@ -532,15 +552,3 @@ top_reviewers:
count: 9
avatarUrl: https://avatars.githubusercontent.com/u/413772?u=64b77b6aa405c68a9c6bcf45f84257c66eea5f32&v=4
url: https://github.com/graingert
-- login: PandaHun
- count: 9
- avatarUrl: https://avatars.githubusercontent.com/u/13096845?u=646eba44db720e37d0dbe8e98e77ab534ea78a20&v=4
- url: https://github.com/PandaHun
-- login: kty4119
- count: 9
- avatarUrl: https://avatars.githubusercontent.com/u/49435654?v=4
- url: https://github.com/kty4119
-- login: bezaca
- count: 9
- avatarUrl: https://avatars.githubusercontent.com/u/69092910?u=4ac58eab99bd37d663f3d23551df96d4fbdbf760&v=4
- url: https://github.com/bezaca
diff --git a/docs/en/data/sponsors.yml b/docs/en/data/sponsors.yml
index 6d91195204..121a3b7616 100644
--- a/docs/en/data/sponsors.yml
+++ b/docs/en/data/sponsors.yml
@@ -5,12 +5,21 @@ gold:
- url: https://platform.sh/try-it-now/?utm_source=fastapi-signup&utm_medium=banner&utm_campaign=FastAPI-signup-June-2023
title: "Build, run and scale your apps on a modern, reliable, and secure PaaS."
img: https://fastapi.tiangolo.com/img/sponsors/platform-sh.png
- - url: https://www.buildwithfern.com/?utm_source=tiangolo&utm_medium=website&utm_campaign=main-badge
- title: Fern | SDKs and API docs
- img: https://fastapi.tiangolo.com/img/sponsors/fern.svg
- url: https://www.porter.run
title: Deploy FastAPI on AWS with a few clicks
img: https://fastapi.tiangolo.com/img/sponsors/porter.png
+ - url: https://bump.sh/fastapi?utm_source=fastapi&utm_medium=referral&utm_campaign=sponsor
+ title: Automate FastAPI documentation generation with Bump.sh
+ img: https://fastapi.tiangolo.com/img/sponsors/bump-sh.svg
+ - url: https://reflex.dev
+ title: Reflex
+ img: https://fastapi.tiangolo.com/img/sponsors/reflex.png
+ - url: https://github.com/scalar/scalar/?utm_source=fastapi&utm_medium=website&utm_campaign=main-badge
+ title: "Scalar: Beautiful Open-Source API References from Swagger/OpenAPI files"
+ img: https://fastapi.tiangolo.com/img/sponsors/scalar.svg
+ - url: https://www.propelauth.com/?utm_source=fastapi&utm_campaign=1223&utm_medium=mainbadge
+ title: Auth, user management and more for your B2B product
+ img: https://fastapi.tiangolo.com/img/sponsors/propelauth.png
silver:
- url: https://www.deta.sh/?ref=fastapi
title: The launchpad for all your (team's) ideas
@@ -27,19 +36,22 @@ silver:
- url: https://careers.powens.com/
title: Powens is hiring!
img: https://fastapi.tiangolo.com/img/sponsors/powens.png
- - url: https://www.svix.com/
- title: Svix - Webhooks as a service
- img: https://fastapi.tiangolo.com/img/sponsors/svix.svg
- url: https://databento.com/
title: Pay as you go for market data
img: https://fastapi.tiangolo.com/img/sponsors/databento.svg
+ - url: https://speakeasyapi.dev?utm_source=fastapi+repo&utm_medium=github+sponsorship
+ title: SDKs for your API | Speakeasy
+ img: https://fastapi.tiangolo.com/img/sponsors/speakeasy.png
+ - url: https://www.svix.com/
+ title: Svix - Webhooks as a service
+ img: https://fastapi.tiangolo.com/img/sponsors/svix.svg
+ - url: https://www.codacy.com/?utm_source=github&utm_medium=sponsors&utm_id=pioneers
+ title: Take code reviews from hours to minutes
+ img: https://fastapi.tiangolo.com/img/sponsors/codacy.png
bronze:
- url: https://www.exoflare.com/open-source/?utm_source=FastAPI&utm_campaign=open_source
title: Biosecurity risk assessments made easy.
img: https://fastapi.tiangolo.com/img/sponsors/exoflare.png
- - url: https://www.flint.sh
- title: IT expertise, consulting and development by passionate people
- img: https://fastapi.tiangolo.com/img/sponsors/flint.png
- url: https://bit.ly/3JJ7y5C
title: Build cross-modal and multimodal applications on the cloud
img: https://fastapi.tiangolo.com/img/sponsors/jina2.svg
diff --git a/docs/en/data/sponsors_badge.yml b/docs/en/data/sponsors_badge.yml
index 7c3bb2f479..4078454a8c 100644
--- a/docs/en/data/sponsors_badge.yml
+++ b/docs/en/data/sponsors_badge.yml
@@ -12,10 +12,14 @@ logins:
- ObliviousAI
- Doist
- nihpo
- - svix
- armand-sauzay
- databento-bot
+ - databento
- nanram22
- Flint-company
- porter-dev
- fern-api
+ - ndimares
+ - svixhq
+ - Alek99
+ - codacy
diff --git a/docs/en/docs/about/index.md b/docs/en/docs/about/index.md
new file mode 100644
index 0000000000..27b78696b5
--- /dev/null
+++ b/docs/en/docs/about/index.md
@@ -0,0 +1,3 @@
+# About
+
+About FastAPI, its design, inspiration and more. 🤓
diff --git a/docs/en/docs/advanced/additional-responses.md b/docs/en/docs/advanced/additional-responses.md
index 624036ce97..41b39c18e6 100644
--- a/docs/en/docs/advanced/additional-responses.md
+++ b/docs/en/docs/advanced/additional-responses.md
@@ -28,7 +28,7 @@ For example, to declare another response with a status code `404` and a Pydantic
```
!!! note
- Have in mind that you have to return the `JSONResponse` directly.
+ Keep in mind that you have to return the `JSONResponse` directly.
!!! info
The `model` key is not part of OpenAPI.
diff --git a/docs/en/docs/advanced/additional-status-codes.md b/docs/en/docs/advanced/additional-status-codes.md
index 416444d3bd..0ce2753431 100644
--- a/docs/en/docs/advanced/additional-status-codes.md
+++ b/docs/en/docs/advanced/additional-status-codes.md
@@ -26,7 +26,7 @@ To achieve that, import `JSONResponse`, and return your content there directly,
{!> ../../../docs_src/additional_status_codes/tutorial001_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="4 26"
{!> ../../../docs_src/additional_status_codes/tutorial001_an.py!}
@@ -41,7 +41,7 @@ To achieve that, import `JSONResponse`, and return your content there directly,
{!> ../../../docs_src/additional_status_codes/tutorial001_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
diff --git a/docs/en/docs/advanced/advanced-dependencies.md b/docs/en/docs/advanced/advanced-dependencies.md
index 402c5d7553..0cffab56db 100644
--- a/docs/en/docs/advanced/advanced-dependencies.md
+++ b/docs/en/docs/advanced/advanced-dependencies.md
@@ -24,13 +24,13 @@ To do that, we declare a method `__call__`:
{!> ../../../docs_src/dependencies/tutorial011_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="11"
{!> ../../../docs_src/dependencies/tutorial011_an.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -51,13 +51,13 @@ And now, we can use `__init__` to declare the parameters of the instance that we
{!> ../../../docs_src/dependencies/tutorial011_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="8"
{!> ../../../docs_src/dependencies/tutorial011_an.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -78,13 +78,13 @@ We could create an instance of this class with:
{!> ../../../docs_src/dependencies/tutorial011_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="17"
{!> ../../../docs_src/dependencies/tutorial011_an.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -113,13 +113,13 @@ checker(q="somequery")
{!> ../../../docs_src/dependencies/tutorial011_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="21"
{!> ../../../docs_src/dependencies/tutorial011_an.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
diff --git a/docs/en/docs/advanced/async-tests.md b/docs/en/docs/advanced/async-tests.md
index 9b39d70fca..f9c82e6ab4 100644
--- a/docs/en/docs/advanced/async-tests.md
+++ b/docs/en/docs/advanced/async-tests.md
@@ -84,6 +84,9 @@ response = client.get('/')
!!! tip
Note that we're using async/await with the new `AsyncClient` - the request is asynchronous.
+!!! warning
+ If your application relies on lifespan events, the `AsyncClient` won't trigger these events. To ensure they are triggered, use `LifespanManager` from florimondmanca/asgi-lifespan.
+
## Other Asynchronous Function Calls
As the testing function is now asynchronous, you can now also call (and `await`) other `async` functions apart from sending requests to your FastAPI application in your tests, exactly as you would call them anywhere else in your code.
diff --git a/docs/en/docs/advanced/behind-a-proxy.md b/docs/en/docs/advanced/behind-a-proxy.md
index e7af77f3da..01998cc912 100644
--- a/docs/en/docs/advanced/behind-a-proxy.md
+++ b/docs/en/docs/advanced/behind-a-proxy.md
@@ -125,7 +125,7 @@ Passing the `root_path` to `FastAPI` would be the equivalent of passing the `--r
### About `root_path`
-Have in mind that the server (Uvicorn) won't use that `root_path` for anything else than passing it to the app.
+Keep in mind that the server (Uvicorn) won't use that `root_path` for anything else than passing it to the app.
But if you go with your browser to http://127.0.0.1:8000/app you will see the normal response:
@@ -142,7 +142,7 @@ Uvicorn will expect the proxy to access Uvicorn at `http://127.0.0.1:8000/app`,
## About proxies with a stripped path prefix
-Have in mind that a proxy with stripped path prefix is only one of the ways to configure it.
+Keep in mind that a proxy with stripped path prefix is only one of the ways to configure it.
Probably in many cases the default will be that the proxy doesn't have a stripped path prefix.
diff --git a/docs/en/docs/advanced/custom-response.md b/docs/en/docs/advanced/custom-response.md
index ce2619e8de..827776f5e5 100644
--- a/docs/en/docs/advanced/custom-response.md
+++ b/docs/en/docs/advanced/custom-response.md
@@ -101,7 +101,7 @@ But as you passed the `HTMLResponse` in the `response_class` too, **FastAPI** wi
Here are some of the available responses.
-Have in mind that you can use `Response` to return anything else, or even create a custom sub-class.
+Keep in mind that you can use `Response` to return anything else, or even create a custom sub-class.
!!! note "Technical Details"
You could also use `from starlette.responses import HTMLResponse`.
diff --git a/docs/en/docs/advanced/dataclasses.md b/docs/en/docs/advanced/dataclasses.md
index 72daca06ad..ed1d5610fc 100644
--- a/docs/en/docs/advanced/dataclasses.md
+++ b/docs/en/docs/advanced/dataclasses.md
@@ -21,7 +21,7 @@ And of course, it supports the same:
This works the same way as with Pydantic models. And it is actually achieved in the same way underneath, using Pydantic.
!!! info
- Have in mind that dataclasses can't do everything Pydantic models can do.
+ Keep in mind that dataclasses can't do everything Pydantic models can do.
So, you might still need to use Pydantic models.
diff --git a/docs/en/docs/advanced/events.md b/docs/en/docs/advanced/events.md
index 6b7de41309..ca9d86ae41 100644
--- a/docs/en/docs/advanced/events.md
+++ b/docs/en/docs/advanced/events.md
@@ -92,7 +92,7 @@ The `lifespan` parameter of the `FastAPI` app takes an **async context manager**
## Alternative Events (deprecated)
!!! warning
- The recommended way to handle the *startup* and *shutdown* is using the `lifespan` parameter of the `FastAPI` app as described above.
+ The recommended way to handle the *startup* and *shutdown* is using the `lifespan` parameter of the `FastAPI` app as described above. If you provide a `lifespan` parameter, `startup` and `shutdown` event handlers will no longer be called. It's all `lifespan` or all events, not both.
You can probably skip this part.
@@ -159,4 +159,4 @@ Underneath, in the ASGI technical specification, this is part of the ReDoc's OpenAPI extension to include a custom logo.
-
-### Normal **FastAPI**
-
-First, write all your **FastAPI** application as normally:
-
-```Python hl_lines="1 4 7-9"
-{!../../../docs_src/extending_openapi/tutorial001.py!}
-```
-
-### Generate the OpenAPI schema
-
-Then, use the same utility function to generate the OpenAPI schema, inside a `custom_openapi()` function:
-
-```Python hl_lines="2 15-21"
-{!../../../docs_src/extending_openapi/tutorial001.py!}
-```
-
-### Modify the OpenAPI schema
-
-Now you can add the ReDoc extension, adding a custom `x-logo` to the `info` "object" in the OpenAPI schema:
-
-```Python hl_lines="22-24"
-{!../../../docs_src/extending_openapi/tutorial001.py!}
-```
-
-### Cache the OpenAPI schema
-
-You can use the property `.openapi_schema` as a "cache", to store your generated schema.
-
-That way, your application won't have to generate the schema every time a user opens your API docs.
-
-It will be generated only once, and then the same cached schema will be used for the next requests.
-
-```Python hl_lines="13-14 25-26"
-{!../../../docs_src/extending_openapi/tutorial001.py!}
-```
-
-### Override the method
-
-Now you can replace the `.openapi()` method with your new function.
-
-```Python hl_lines="29"
-{!../../../docs_src/extending_openapi/tutorial001.py!}
-```
-
-### Check it
-
-Once you go to http://127.0.0.1:8000/redoc you will see that you are using your custom logo (in this example, **FastAPI**'s logo):
-
-
-
-## Self-hosting JavaScript and CSS for docs
-
-The API docs use **Swagger UI** and **ReDoc**, and each of those need some JavaScript and CSS files.
-
-By default, those files are served from a CDN.
-
-But it's possible to customize it, you can set a specific CDN, or serve the files yourself.
-
-That's useful, for example, if you need your app to keep working even while offline, without open Internet access, or in a local network.
-
-Here you'll see how to serve those files yourself, in the same FastAPI app, and configure the docs to use them.
-
-### Project file structure
-
-Let's say your project file structure looks like this:
-
-```
-.
-├── app
-│ ├── __init__.py
-│ ├── main.py
-```
-
-Now create a directory to store those static files.
-
-Your new file structure could look like this:
-
-```
-.
-├── app
-│ ├── __init__.py
-│ ├── main.py
-└── static/
-```
-
-### Download the files
-
-Download the static files needed for the docs and put them on that `static/` directory.
-
-You can probably right-click each link and select an option similar to `Save link as...`.
-
-**Swagger UI** uses the files:
-
-* `swagger-ui-bundle.js`
-* `swagger-ui.css`
-
-And **ReDoc** uses the file:
-
-* `redoc.standalone.js`
-
-After that, your file structure could look like:
-
-```
-.
-├── app
-│ ├── __init__.py
-│ ├── main.py
-└── static
- ├── redoc.standalone.js
- ├── swagger-ui-bundle.js
- └── swagger-ui.css
-```
-
-### Serve the static files
-
-* Import `StaticFiles`.
-* "Mount" a `StaticFiles()` instance in a specific path.
-
-```Python hl_lines="7 11"
-{!../../../docs_src/extending_openapi/tutorial002.py!}
-```
-
-### Test the static files
-
-Start your application and go to http://127.0.0.1:8000/static/redoc.standalone.js.
-
-You should see a very long JavaScript file for **ReDoc**.
-
-It could start with something like:
-
-```JavaScript
-/*!
- * ReDoc - OpenAPI/Swagger-generated API Reference Documentation
- * -------------------------------------------------------------
- * Version: "2.0.0-rc.18"
- * Repo: https://github.com/Redocly/redoc
- */
-!function(e,t){"object"==typeof exports&&"object"==typeof m
-
-...
-```
-
-That confirms that you are being able to serve static files from your app, and that you placed the static files for the docs in the correct place.
-
-Now we can configure the app to use those static files for the docs.
-
-### Disable the automatic docs
-
-The first step is to disable the automatic docs, as those use the CDN by default.
-
-To disable them, set their URLs to `None` when creating your `FastAPI` app:
-
-```Python hl_lines="9"
-{!../../../docs_src/extending_openapi/tutorial002.py!}
-```
-
-### Include the custom docs
-
-Now you can create the *path operations* for the custom docs.
-
-You can re-use FastAPI's internal functions to create the HTML pages for the docs, and pass them the needed arguments:
-
-* `openapi_url`: the URL where the HTML page for the docs can get the OpenAPI schema for your API. You can use here the attribute `app.openapi_url`.
-* `title`: the title of your API.
-* `oauth2_redirect_url`: you can use `app.swagger_ui_oauth2_redirect_url` here to use the default.
-* `swagger_js_url`: the URL where the HTML for your Swagger UI docs can get the **JavaScript** file. This is the one that your own app is now serving.
-* `swagger_css_url`: the URL where the HTML for your Swagger UI docs can get the **CSS** file. This is the one that your own app is now serving.
-
-And similarly for ReDoc...
-
-```Python hl_lines="2-6 14-22 25-27 30-36"
-{!../../../docs_src/extending_openapi/tutorial002.py!}
-```
-
-!!! tip
- The *path operation* for `swagger_ui_redirect` is a helper for when you use OAuth2.
-
- If you integrate your API with an OAuth2 provider, you will be able to authenticate and come back to the API docs with the acquired credentials. And interact with it using the real OAuth2 authentication.
-
- Swagger UI will handle it behind the scenes for you, but it needs this "redirect" helper.
-
-### Create a *path operation* to test it
-
-Now, to be able to test that everything works, create a *path operation*:
-
-```Python hl_lines="39-41"
-{!../../../docs_src/extending_openapi/tutorial002.py!}
-```
-
-### Test it
-
-Now, you should be able to disconnect your WiFi, go to your docs at http://127.0.0.1:8000/docs, and reload the page.
-
-And even without Internet, you would be able to see the docs for your API and interact with it.
-
-## Configuring Swagger UI
-
-You can configure some extra Swagger UI parameters.
-
-To configure them, pass the `swagger_ui_parameters` argument when creating the `FastAPI()` app object or to the `get_swagger_ui_html()` function.
-
-`swagger_ui_parameters` receives a dictionary with the configurations passed to Swagger UI directly.
-
-FastAPI converts the configurations to **JSON** to make them compatible with JavaScript, as that's what Swagger UI needs.
-
-### Disable Syntax Highlighting
-
-For example, you could disable syntax highlighting in Swagger UI.
-
-Without changing the settings, syntax highlighting is enabled by default:
-
-
-
-But you can disable it by setting `syntaxHighlight` to `False`:
-
-```Python hl_lines="3"
-{!../../../docs_src/extending_openapi/tutorial003.py!}
-```
-
-...and then Swagger UI won't show the syntax highlighting anymore:
-
-
-
-### Change the Theme
-
-The same way you could set the syntax highlighting theme with the key `"syntaxHighlight.theme"` (notice that it has a dot in the middle):
-
-```Python hl_lines="3"
-{!../../../docs_src/extending_openapi/tutorial004.py!}
-```
-
-That configuration would change the syntax highlighting color theme:
-
-
-
-### Change Default Swagger UI Parameters
-
-FastAPI includes some default configuration parameters appropriate for most of the use cases.
-
-It includes these default configurations:
-
-```Python
-{!../../../fastapi/openapi/docs.py[ln:7-13]!}
-```
-
-You can override any of them by setting a different value in the argument `swagger_ui_parameters`.
-
-For example, to disable `deepLinking` you could pass these settings to `swagger_ui_parameters`:
-
-```Python hl_lines="3"
-{!../../../docs_src/extending_openapi/tutorial005.py!}
-```
-
-### Other Swagger UI Parameters
-
-To see all the other possible configurations you can use, read the official docs for Swagger UI parameters.
-
-### JavaScript-only settings
-
-Swagger UI also allows other configurations to be **JavaScript-only** objects (for example, JavaScript functions).
-
-FastAPI also includes these JavaScript-only `presets` settings:
-
-```JavaScript
-presets: [
- SwaggerUIBundle.presets.apis,
- SwaggerUIBundle.SwaggerUIStandalonePreset
-]
-```
-
-These are **JavaScript** objects, not strings, so you can't pass them from Python code directly.
-
-If you need to use JavaScript-only configurations like those, you can use one of the methods above. Override all the Swagger UI *path operation* and manually write any JavaScript you need.
diff --git a/docs/en/docs/advanced/generate-clients.md b/docs/en/docs/advanced/generate-clients.md
index 3fed48b0bc..3a810baee1 100644
--- a/docs/en/docs/advanced/generate-clients.md
+++ b/docs/en/docs/advanced/generate-clients.md
@@ -12,10 +12,17 @@ A common tool is openapi-typescript-codegen.
-Another option you could consider for several languages is Fern.
+## Client and SDK Generators - Sponsor
-!!! info
- Fern is also a FastAPI sponsor. 😎🎉
+There are also some **company-backed** Client and SDK generators based on OpenAPI (FastAPI), in some cases they can offer you **additional features** on top of high-quality generated SDKs/clients.
+
+Some of them also ✨ [**sponsor FastAPI**](../help-fastapi.md#sponsor-the-author){.internal-link target=_blank} ✨, this ensures the continued and healthy **development** of FastAPI and its **ecosystem**.
+
+And it shows their true commitment to FastAPI and its **community** (you), as they not only want to provide you a **good service** but also want to make sure you have a **good and healthy framework**, FastAPI. 🙇
+
+For example, you might want to try Speakeasy.
+
+There are also several other companies offering similar services that you can search and find online. 🤓
## Generate a TypeScript Frontend Client
@@ -27,7 +34,7 @@ Let's start with a simple FastAPI application:
{!> ../../../docs_src/generate_clients/tutorial001_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9-11 14-15 18 19 23"
{!> ../../../docs_src/generate_clients/tutorial001.py!}
@@ -80,7 +87,7 @@ It could look like this:
"description": "",
"main": "index.js",
"scripts": {
- "generate-client": "openapi --input http://localhost:8000/openapi.json --output ./src/client --client axios"
+ "generate-client": "openapi --input http://localhost:8000/openapi.json --output ./src/client --client axios --useOptions --useUnionTypes"
},
"author": "",
"license": "",
@@ -99,7 +106,7 @@ After having that NPM `generate-client` script there, you can run it with:
$ npm run generate-client
frontend-app@1.0.0 generate-client /home/user/code/frontend-app
-> openapi --input http://localhost:8000/openapi.json --output ./src/client --client axios
+> openapi --input http://localhost:8000/openapi.json --output ./src/client --client axios --useOptions --useUnionTypes
```
@@ -139,7 +146,7 @@ For example, you could have a section for **items** and another section for **us
{!> ../../../docs_src/generate_clients/tutorial002_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="23 28 36"
{!> ../../../docs_src/generate_clients/tutorial002.py!}
@@ -196,7 +203,7 @@ You can then pass that custom function to **FastAPI** as the `generate_unique_id
{!> ../../../docs_src/generate_clients/tutorial003_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="8-9 12"
{!> ../../../docs_src/generate_clients/tutorial003.py!}
@@ -222,9 +229,17 @@ But for the generated client we could **modify** the OpenAPI operation IDs right
We could download the OpenAPI JSON to a file `openapi.json` and then we could **remove that prefixed tag** with a script like this:
-```Python
-{!../../../docs_src/generate_clients/tutorial004.py!}
-```
+=== "Python"
+
+ ```Python
+ {!> ../../../docs_src/generate_clients/tutorial004.py!}
+ ```
+
+=== "Node.js"
+
+ ```Python
+ {!> ../../../docs_src/generate_clients/tutorial004.js!}
+ ```
With that, the operation IDs would be renamed from things like `items-get_items` to just `get_items`, that way the client generator can generate simpler method names.
@@ -239,7 +254,7 @@ Now as the end result is in a file `openapi.json`, you would modify the `package
"description": "",
"main": "index.js",
"scripts": {
- "generate-client": "openapi --input ./openapi.json --output ./src/client --client axios"
+ "generate-client": "openapi --input ./openapi.json --output ./src/client --client axios --useOptions --useUnionTypes"
},
"author": "",
"license": "",
diff --git a/docs/en/docs/advanced/index.md b/docs/en/docs/advanced/index.md
index 467f0833e6..d8dcd4ca67 100644
--- a/docs/en/docs/advanced/index.md
+++ b/docs/en/docs/advanced/index.md
@@ -17,8 +17,17 @@ You could still use most of the features in **FastAPI** with the knowledge from
And the next sections assume you already read it, and assume that you know those main ideas.
-## TestDriven.io course
+## External Courses
-If you would like to take an advanced-beginner course to complement this section of the docs, you might want to check: Test-Driven Development with FastAPI and Docker by **TestDriven.io**.
+Although the [Tutorial - User Guide](../tutorial/){.internal-link target=_blank} and this **Advanced User Guide** are written as a guided tutorial (like a book) and should be enough for you to **learn FastAPI**, you might want to complement it with additional courses.
-They are currently donating 10% of all profits to the development of **FastAPI**. 🎉 😄
+Or it might be the case that you just prefer to take other courses because they adapt better to your learning style.
+
+Some course providers ✨ [**sponsor FastAPI**](../help-fastapi.md#sponsor-the-author){.internal-link target=_blank} ✨, this ensures the continued and healthy **development** of FastAPI and its **ecosystem**.
+
+And it shows their true commitment to FastAPI and its **community** (you), as they not only want to provide you a **good learning experience** but also want to make sure you have a **good and healthy framework**, FastAPI. 🙇
+
+You might want to try their courses:
+
+* Talk Python Training
+* Test-Driven Development
diff --git a/docs/en/docs/advanced/openapi-callbacks.md b/docs/en/docs/advanced/openapi-callbacks.md
index 37339eae57..03429b187f 100644
--- a/docs/en/docs/advanced/openapi-callbacks.md
+++ b/docs/en/docs/advanced/openapi-callbacks.md
@@ -38,7 +38,7 @@ This part is pretty normal, most of the code is probably already familiar to you
!!! tip
The `callback_url` query parameter uses a Pydantic URL type.
-The only new thing is the `callbacks=messages_callback_router.routes` as an argument to the *path operation decorator*. We'll see what that is next.
+The only new thing is the `callbacks=invoices_callback_router.routes` as an argument to the *path operation decorator*. We'll see what that is next.
## Documenting the callback
diff --git a/docs/en/docs/advanced/path-operation-advanced-configuration.md b/docs/en/docs/advanced/path-operation-advanced-configuration.md
index 7ca88d43ed..8b79bfe22a 100644
--- a/docs/en/docs/advanced/path-operation-advanced-configuration.md
+++ b/docs/en/docs/advanced/path-operation-advanced-configuration.md
@@ -163,7 +163,7 @@ For example, in this application we don't use FastAPI's integrated functionality
```
!!! info
- In Pydantic version 1 the method to get the JSON Schema for a model was called `Item.schema()`, in Pydantic version 2, the method is called `Item.model_schema_json()`.
+ In Pydantic version 1 the method to get the JSON Schema for a model was called `Item.schema()`, in Pydantic version 2, the method is called `Item.model_json_schema()`.
Nevertheless, although we are not using the default integrated functionality, we are still using a Pydantic model to manually generate the JSON Schema for the data that we want to receive in YAML.
diff --git a/docs/en/docs/advanced/response-change-status-code.md b/docs/en/docs/advanced/response-change-status-code.md
index 979cef3f05..b88d74a8af 100644
--- a/docs/en/docs/advanced/response-change-status-code.md
+++ b/docs/en/docs/advanced/response-change-status-code.md
@@ -30,4 +30,4 @@ And if you declared a `response_model`, it will still be used to filter and conv
**FastAPI** will use that *temporal* response to extract the status code (also cookies and headers), and will put them in the final response that contains the value you returned, filtered by any `response_model`.
-You can also declare the `Response` parameter in dependencies, and set the status code in them. But have in mind that the last one to be set will win.
+You can also declare the `Response` parameter in dependencies, and set the status code in them. But keep in mind that the last one to be set will win.
diff --git a/docs/en/docs/advanced/response-cookies.md b/docs/en/docs/advanced/response-cookies.md
index 9178ef8162..d53985dbba 100644
--- a/docs/en/docs/advanced/response-cookies.md
+++ b/docs/en/docs/advanced/response-cookies.md
@@ -31,7 +31,7 @@ Then set Cookies in it, and then return it:
```
!!! tip
- Have in mind that if you return a response directly instead of using the `Response` parameter, FastAPI will return it directly.
+ Keep in mind that if you return a response directly instead of using the `Response` parameter, FastAPI will return it directly.
So, you will have to make sure your data is of the correct type. E.g. it is compatible with JSON, if you are returning a `JSONResponse`.
diff --git a/docs/en/docs/advanced/response-headers.md b/docs/en/docs/advanced/response-headers.md
index 758bd64556..49b5fe4766 100644
--- a/docs/en/docs/advanced/response-headers.md
+++ b/docs/en/docs/advanced/response-headers.md
@@ -37,6 +37,6 @@ Create a response as described in [Return a Response Directly](response-directly
## Custom Headers
-Have in mind that custom proprietary headers can be added using the 'X-' prefix.
+Keep in mind that custom proprietary headers can be added using the 'X-' prefix.
But if you have custom headers that you want a client in a browser to be able to see, you need to add them to your CORS configurations (read more in [CORS (Cross-Origin Resource Sharing)](../tutorial/cors.md){.internal-link target=_blank}), using the parameter `expose_headers` documented in Starlette's CORS docs.
diff --git a/docs/en/docs/advanced/security/http-basic-auth.md b/docs/en/docs/advanced/security/http-basic-auth.md
index 8177a4b289..680f4dff53 100644
--- a/docs/en/docs/advanced/security/http-basic-auth.md
+++ b/docs/en/docs/advanced/security/http-basic-auth.md
@@ -26,13 +26,13 @@ Then, when you type that username and password, the browser sends them in the he
{!> ../../../docs_src/security/tutorial006_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="2 7 11"
{!> ../../../docs_src/security/tutorial006_an.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -65,13 +65,13 @@ Then we can use `secrets.compare_digest()` to ensure that `credentials.username`
{!> ../../../docs_src/security/tutorial007_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="1 12-24"
{!> ../../../docs_src/security/tutorial007_an.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -105,7 +105,7 @@ if "johndoe" == "stanleyjobson" and "love123" == "swordfish":
...
```
-But right at the moment Python compares the first `j` in `johndoe` to the first `s` in `stanleyjobson`, it will return `False`, because it already knows that those two strings are not the same, thinking that "there's no need to waste more computation comparing the rest of the letters". And your application will say "incorrect user or password".
+But right at the moment Python compares the first `j` in `johndoe` to the first `s` in `stanleyjobson`, it will return `False`, because it already knows that those two strings are not the same, thinking that "there's no need to waste more computation comparing the rest of the letters". And your application will say "Incorrect username or password".
But then the attackers try with username `stanleyjobsox` and password `love123`.
@@ -116,11 +116,11 @@ if "stanleyjobsox" == "stanleyjobson" and "love123" == "swordfish":
...
```
-Python will have to compare the whole `stanleyjobso` in both `stanleyjobsox` and `stanleyjobson` before realizing that both strings are not the same. So it will take some extra microseconds to reply back "incorrect user or password".
+Python will have to compare the whole `stanleyjobso` in both `stanleyjobsox` and `stanleyjobson` before realizing that both strings are not the same. So it will take some extra microseconds to reply back "Incorrect username or password".
#### The time to answer helps the attackers
-At that point, by noticing that the server took some microseconds longer to send the "incorrect user or password" response, the attackers will know that they got _something_ right, some of the initial letters were right.
+At that point, by noticing that the server took some microseconds longer to send the "Incorrect username or password" response, the attackers will know that they got _something_ right, some of the initial letters were right.
And then they can try again knowing that it's probably something more similar to `stanleyjobsox` than to `johndoe`.
@@ -148,13 +148,13 @@ After detecting that the credentials are incorrect, return an `HTTPException` wi
{!> ../../../docs_src/security/tutorial007_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="26-30"
{!> ../../../docs_src/security/tutorial007_an.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
diff --git a/docs/en/docs/advanced/security/oauth2-scopes.md b/docs/en/docs/advanced/security/oauth2-scopes.md
index 41cd61683d..b93d2991c4 100644
--- a/docs/en/docs/advanced/security/oauth2-scopes.md
+++ b/docs/en/docs/advanced/security/oauth2-scopes.md
@@ -68,7 +68,7 @@ First, let's quickly see the parts that change from the examples in the main **T
{!> ../../../docs_src/security/tutorial005_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="2 4 8 12 47 65 106 108-116 122-125 129-135 140 156"
{!> ../../../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 152"
+ ```Python hl_lines="3 7 11 45 63 104 106-114 120-123 127-133 138 154"
{!> ../../../docs_src/security/tutorial005_py310.py!}
```
@@ -88,16 +88,16 @@ 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 153"
+ ```Python hl_lines="2 4 8 12 46 64 105 107-115 121-124 128-134 139 155"
{!> ../../../docs_src/security/tutorial005_py39.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! 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 153"
+ ```Python hl_lines="2 4 8 12 46 64 105 107-115 121-124 128-134 139 155"
{!> ../../../docs_src/security/tutorial005.py!}
```
@@ -121,7 +121,7 @@ The `scopes` parameter receives a `dict` with each scope as a key and the descri
{!> ../../../docs_src/security/tutorial005_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="63-66"
{!> ../../../docs_src/security/tutorial005_an.py!}
@@ -146,7 +146,7 @@ The `scopes` parameter receives a `dict` with each scope as a key and the descri
{!> ../../../docs_src/security/tutorial005_py39.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -188,7 +188,7 @@ And we return the scopes as part of the JWT token.
{!> ../../../docs_src/security/tutorial005_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="156"
{!> ../../../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="152"
+ ```Python hl_lines="154"
{!> ../../../docs_src/security/tutorial005_py310.py!}
```
@@ -208,16 +208,16 @@ And we return the scopes as part of the JWT token.
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="153"
+ ```Python hl_lines="155"
{!> ../../../docs_src/security/tutorial005_py39.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="153"
+ ```Python hl_lines="155"
{!> ../../../docs_src/security/tutorial005.py!}
```
@@ -254,7 +254,7 @@ In this case, it requires the scope `me` (it could require more than one scope).
{!> ../../../docs_src/security/tutorial005_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="4 140 171"
{!> ../../../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 165"
+ ```Python hl_lines="3 138 167"
{!> ../../../docs_src/security/tutorial005_py310.py!}
```
@@ -274,16 +274,16 @@ 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 166"
+ ```Python hl_lines="4 139 168"
{!> ../../../docs_src/security/tutorial005_py39.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="4 139 166"
+ ```Python hl_lines="4 139 168"
{!> ../../../docs_src/security/tutorial005.py!}
```
@@ -320,7 +320,7 @@ This `SecurityScopes` class is similar to `Request` (`Request` was used to get t
{!> ../../../docs_src/security/tutorial005_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="8 106"
{!> ../../../docs_src/security/tutorial005_an.py!}
@@ -344,7 +344,7 @@ This `SecurityScopes` class is similar to `Request` (`Request` was used to get t
{!> ../../../docs_src/security/tutorial005_py39.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -377,7 +377,7 @@ In this exception, we include the scopes required (if any) as a string separated
{!> ../../../docs_src/security/tutorial005_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="106 108-116"
{!> ../../../docs_src/security/tutorial005_an.py!}
@@ -401,7 +401,7 @@ In this exception, we include the scopes required (if any) as a string separated
{!> ../../../docs_src/security/tutorial005_py39.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -436,7 +436,7 @@ We also verify that we have a user with that username, and if not, we raise that
{!> ../../../docs_src/security/tutorial005_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="47 117-128"
{!> ../../../docs_src/security/tutorial005_an.py!}
@@ -460,7 +460,7 @@ We also verify that we have a user with that username, and if not, we raise that
{!> ../../../docs_src/security/tutorial005_py39.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -487,7 +487,7 @@ For this, we use `security_scopes.scopes`, that contains a `list` with all these
{!> ../../../docs_src/security/tutorial005_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="129-135"
{!> ../../../docs_src/security/tutorial005_an.py!}
@@ -511,7 +511,7 @@ For this, we use `security_scopes.scopes`, that contains a `list` with all these
{!> ../../../docs_src/security/tutorial005_py39.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
diff --git a/docs/en/docs/advanced/settings.md b/docs/en/docs/advanced/settings.md
index 8f6c7da93a..f6db8d2b15 100644
--- a/docs/en/docs/advanced/settings.md
+++ b/docs/en/docs/advanced/settings.md
@@ -260,13 +260,13 @@ Now we create a dependency that returns a new `config.Settings()`.
{!> ../../../docs_src/settings/app02_an_py39/main.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="6 12-13"
{!> ../../../docs_src/settings/app02_an/main.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -276,7 +276,7 @@ Now we create a dependency that returns a new `config.Settings()`.
```
!!! tip
- We'll discuss the `@lru_cache()` in a bit.
+ We'll discuss the `@lru_cache` in a bit.
For now you can assume `get_settings()` is a normal function.
@@ -288,13 +288,13 @@ And then we can require it from the *path operation function* as a dependency an
{!> ../../../docs_src/settings/app02_an_py39/main.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="17 19-21"
{!> ../../../docs_src/settings/app02_an/main.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -326,7 +326,7 @@ This practice is common enough that it has a name, these environment variables a
But a dotenv file doesn't really have to have that exact filename.
-Pydantic has support for reading from these types of files using an external library. You can read more at Pydantic Settings: Dotenv (.env) support.
+Pydantic has support for reading from these types of files using an external library. You can read more at Pydantic Settings: Dotenv (.env) support.
!!! tip
For this to work, you need to `pip install python-dotenv`.
@@ -388,7 +388,7 @@ def get_settings():
we would create that object for each request, and we would be reading the `.env` file for each request. ⚠️
-But as we are using the `@lru_cache()` decorator on top, the `Settings` object will be created only once, the first time it's called. ✔️
+But as we are using the `@lru_cache` decorator on top, the `Settings` object will be created only once, the first time it's called. ✔️
=== "Python 3.9+"
@@ -396,13 +396,13 @@ But as we are using the `@lru_cache()` decorator on top, the `Settings` object w
{!> ../../../docs_src/settings/app03_an_py39/main.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="1 11"
{!> ../../../docs_src/settings/app03_an/main.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -415,14 +415,14 @@ Then for any subsequent calls of `get_settings()` in the dependencies for the ne
#### `lru_cache` Technical Details
-`@lru_cache()` modifies the function it decorates to return the same value that was returned the first time, instead of computing it again, executing the code of the function every time.
+`@lru_cache` modifies the function it decorates to return the same value that was returned the first time, instead of computing it again, executing the code of the function every time.
So, the function below it will be executed once for each combination of arguments. And then the values returned by each of those combinations of arguments will be used again and again whenever the function is called with exactly the same combination of arguments.
For example, if you have a function:
```Python
-@lru_cache()
+@lru_cache
def say_hi(name: str, salutation: str = "Ms."):
return f"Hello {salutation} {name}"
```
@@ -474,7 +474,7 @@ In the case of our dependency `get_settings()`, the function doesn't even take a
That way, it behaves almost as if it was just a global variable. But as it uses a dependency function, then we can override it easily for testing.
-`@lru_cache()` is part of `functools` which is part of Python's standard library, you can read more about it in the Python docs for `@lru_cache()`.
+`@lru_cache` is part of `functools` which is part of Python's standard library, you can read more about it in the Python docs for `@lru_cache`.
## Recap
@@ -482,4 +482,4 @@ You can use Pydantic Settings to handle the settings or configurations for your
* By using a dependency you can simplify testing.
* You can use `.env` files with it.
-* Using `@lru_cache()` lets you avoid reading the dotenv file again and again for each request, while allowing you to override it during testing.
+* Using `@lru_cache` lets you avoid reading the dotenv file again and again for each request, while allowing you to override it during testing.
diff --git a/docs/en/docs/advanced/templates.md b/docs/en/docs/advanced/templates.md
index 38618aeeb0..6055b30170 100644
--- a/docs/en/docs/advanced/templates.md
+++ b/docs/en/docs/advanced/templates.md
@@ -25,14 +25,16 @@ $ pip install jinja2
* Import `Jinja2Templates`.
* Create a `templates` object that you can re-use later.
* Declare a `Request` parameter in the *path operation* that will return a template.
-* Use the `templates` you created to render and return a `TemplateResponse`, passing the `request` as one of the key-value pairs in the Jinja2 "context".
+* Use the `templates` you created to render and return a `TemplateResponse`, pass the name of the template, the request object, and a "context" dictionary with key-value pairs to be used inside of the Jinja2 template.
-```Python hl_lines="4 11 15-16"
+```Python hl_lines="4 11 15-18"
{!../../../docs_src/templates/tutorial001.py!}
```
!!! note
- Notice that you have to pass the `request` as part of the key-value pairs in the context for Jinja2. So, you also have to declare it in your *path operation*.
+ Before FastAPI 0.108.0, Starlette 0.29.0, the `name` was the first parameter.
+
+ Also, before that, in previous versions, the `request` object was passed as part of the key-value pairs in the context for Jinja2.
!!! tip
By declaring `response_class=HTMLResponse` the docs UI will be able to know that the response will be HTML.
@@ -44,21 +46,61 @@ $ pip install jinja2
## Writing templates
-Then you can write a template at `templates/item.html` with:
+Then you can write a template at `templates/item.html` with, for example:
```jinja hl_lines="7"
{!../../../docs_src/templates/templates/item.html!}
```
-It will show the `id` taken from the "context" `dict` you passed:
+### Template Context Values
+
+In the HTML that contains:
+
+{% raw %}
+
+```jinja
+Item ID: {{ id }}
+```
+
+{% endraw %}
+
+...it will show the `id` taken from the "context" `dict` you passed:
```Python
-{"request": request, "id": id}
+{"id": id}
+```
+
+For example, with an ID of `42`, this would render:
+
+```html
+Item ID: 42
+```
+
+### Template `url_for` Arguments
+
+You can also use `url_for()` inside of the template, it takes as arguments the same arguments that would be used by your *path operation function*.
+
+So, the section with:
+
+{% raw %}
+
+```jinja
+
+```
+
+{% endraw %}
+
+...will generate a link to the same URL that would be handled by the *path operation function* `read_item(id=id)`.
+
+For example, with an ID of `42`, this would render:
+
+```html
+
```
## Templates and static files
-And you can also use `url_for()` inside of the template, and use it, for example, with the `StaticFiles` you mounted.
+You can also use `url_for()` inside of the template, and use it, for example, with the `StaticFiles` you mounted with the `name="static"`.
```jinja hl_lines="4"
{!../../../docs_src/templates/templates/item.html!}
diff --git a/docs/en/docs/advanced/testing-dependencies.md b/docs/en/docs/advanced/testing-dependencies.md
index ee48a735d8..57dd87f569 100644
--- a/docs/en/docs/advanced/testing-dependencies.md
+++ b/docs/en/docs/advanced/testing-dependencies.md
@@ -40,7 +40,7 @@ And then **FastAPI** will call that override instead of the original dependency.
{!> ../../../docs_src/dependency_testing/tutorial001_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="29-30 33"
{!> ../../../docs_src/dependency_testing/tutorial001_an.py!}
@@ -55,7 +55,7 @@ And then **FastAPI** will call that override instead of the original dependency.
{!> ../../../docs_src/dependency_testing/tutorial001_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
diff --git a/docs/en/docs/advanced/websockets.md b/docs/en/docs/advanced/websockets.md
index 94cf191d27..b8dfab1d1f 100644
--- a/docs/en/docs/advanced/websockets.md
+++ b/docs/en/docs/advanced/websockets.md
@@ -124,7 +124,7 @@ They work the same way as for other FastAPI endpoints/*path operations*:
{!> ../../../docs_src/websockets/tutorial002_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="69-70 83"
{!> ../../../docs_src/websockets/tutorial002_an.py!}
@@ -139,7 +139,7 @@ They work the same way as for other FastAPI endpoints/*path operations*:
{!> ../../../docs_src/websockets/tutorial002_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -191,7 +191,7 @@ When a WebSocket connection is closed, the `await websocket.receive_text()` will
{!> ../../../docs_src/websockets/tutorial003_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="81-83"
{!> ../../../docs_src/websockets/tutorial003.py!}
@@ -212,7 +212,7 @@ Client #1596980209979 left the chat
!!! tip
The app above is a minimal and simple example to demonstrate how to handle and broadcast messages to several WebSocket connections.
- But have in mind that, as everything is handled in memory, in a single list, it will only work while the process is running, and will only work with a single process.
+ But keep in mind that, as everything is handled in memory, in a single list, it will only work while the process is running, and will only work with a single process.
If you need something easy to integrate with FastAPI but that is more robust, supported by Redis, PostgreSQL or others, check encode/broadcaster.
diff --git a/docs/en/docs/alternatives.md b/docs/en/docs/alternatives.md
index a777ddb98e..70bbcac91c 100644
--- a/docs/en/docs/alternatives.md
+++ b/docs/en/docs/alternatives.md
@@ -119,8 +119,6 @@ That's why when talking about version 2.0 it's common to say "Swagger", and for
These two were chosen for being fairly popular and stable, but doing a quick search, you could find dozens of additional alternative user interfaces for OpenAPI (that you can use with **FastAPI**).
- For example, you could try Fern which is also a FastAPI sponsor. 😎🎉
-
### Flask REST frameworks
There are several Flask REST frameworks, but after investing the time and work into investigating them, I found that many are discontinued or abandoned, with several standing issues that made them unfit.
@@ -187,13 +185,13 @@ It's a Flask plug-in, that ties together Webargs, Marshmallow and APISpec.
It uses the information from Webargs and Marshmallow to automatically generate OpenAPI schemas, using APISpec.
-It's a great tool, very under-rated. It should be way more popular than many Flask plug-ins out there. It might be due to its documentation being too concise and abstract.
+It's a great tool, very underrated. It should be way more popular than many Flask plug-ins out there. It might be due to its documentation being too concise and abstract.
This solved having to write YAML (another syntax) inside of Python docstrings.
This combination of Flask, Flask-apispec with Marshmallow and Webargs was my favorite backend stack until building **FastAPI**.
-Using it led to the creation of several Flask full-stack generators. These are the main stack I (and several external teams) have been using up to now:
+Using it led to the creation of several Flask full-stack generators. These are the main stacks I (and several external teams) have been using up to now:
* https://github.com/tiangolo/full-stack
* https://github.com/tiangolo/full-stack-flask-couchbase
@@ -213,7 +211,7 @@ This isn't even Python, NestJS is a JavaScript (TypeScript) NodeJS framework ins
It achieves something somewhat similar to what can be done with Flask-apispec.
-It has an integrated dependency injection system, inspired by Angular two. It requires pre-registering the "injectables" (like all the other dependency injection systems I know), so, it adds to the verbosity and code repetition.
+It has an integrated dependency injection system, inspired by Angular 2. It requires pre-registering the "injectables" (like all the other dependency injection systems I know), so, it adds to the verbosity and code repetition.
As the parameters are described with TypeScript types (similar to Python type hints), editor support is quite good.
@@ -265,7 +263,7 @@ I discovered Molten in the first stages of building **FastAPI**. And it has quit
It doesn't use a data validation, serialization and documentation third-party library like Pydantic, it has its own. So, these data type definitions would not be reusable as easily.
-It requires a little bit more verbose configurations. And as it is based on WSGI (instead of ASGI), it is not designed to take advantage of the high-performance provided by tools like Uvicorn, Starlette and Sanic.
+It requires a little bit more verbose configurations. And as it is based on WSGI (instead of ASGI), it is not designed to take advantage of the high performance provided by tools like Uvicorn, Starlette and Sanic.
The dependency injection system requires pre-registration of the dependencies and the dependencies are solved based on the declared types. So, it's not possible to declare more than one "component" that provides a certain type.
@@ -359,7 +357,7 @@ It is comparable to Marshmallow. Although it's faster than Marshmallow in benchm
### Starlette
-Starlette is a lightweight ASGI framework/toolkit, which is ideal for building high-performance asyncio services.
+Starlette is a lightweight ASGI framework/toolkit, which is ideal for building high-performance asyncio services.
It is very simple and intuitive. It's designed to be easily extensible, and have modular components.
diff --git a/docs/en/docs/async.md b/docs/en/docs/async.md
index 3d4b1956af..2ead1f2db7 100644
--- a/docs/en/docs/async.md
+++ b/docs/en/docs/async.md
@@ -409,11 +409,11 @@ Still, in both situations, chances are that **FastAPI** will [still be faster](/
### Dependencies
-The same applies for [dependencies](/tutorial/dependencies/index.md){.internal-link target=_blank}. If a dependency is a standard `def` function instead of `async def`, it is run in the external threadpool.
+The same applies for [dependencies](./tutorial/dependencies/index.md){.internal-link target=_blank}. If a dependency is a standard `def` function instead of `async def`, it is run in the external threadpool.
### Sub-dependencies
-You can have multiple dependencies and [sub-dependencies](/tutorial/dependencies/sub-dependencies.md){.internal-link target=_blank} requiring each other (as parameters of the function definitions), some of them might be created with `async def` and some with normal `def`. It would still work, and the ones created with normal `def` would be called on an external thread (from the threadpool) instead of being "awaited".
+You can have multiple dependencies and [sub-dependencies](./tutorial/dependencies/sub-dependencies.md){.internal-link target=_blank} requiring each other (as parameters of the function definitions), some of them might be created with `async def` and some with normal `def`. It would still work, and the ones created with normal `def` would be called on an external thread (from the threadpool) instead of being "awaited".
### Other utility functions
diff --git a/docs/en/docs/benchmarks.md b/docs/en/docs/benchmarks.md
index e05fec8406..d746b6d7c4 100644
--- a/docs/en/docs/benchmarks.md
+++ b/docs/en/docs/benchmarks.md
@@ -2,7 +2,7 @@
Independent TechEmpower benchmarks show **FastAPI** applications running under Uvicorn as one of the fastest Python frameworks available, only below Starlette and Uvicorn themselves (used internally by FastAPI). (*)
-But when checking benchmarks and comparisons you should have the following in mind.
+But when checking benchmarks and comparisons you should keep the following in mind.
## Benchmarks and speed
diff --git a/docs/en/docs/contributing.md b/docs/en/docs/contributing.md
index cfdb607d77..2d308a9dbd 100644
--- a/docs/en/docs/contributing.md
+++ b/docs/en/docs/contributing.md
@@ -4,11 +4,11 @@ First, you might want to see the basic ways to [help FastAPI and get help](help-
## Developing
-If you already cloned the repository and you know that you need to deep dive in the code, here are some guidelines to set up your environment.
+If you already cloned the fastapi repository and you want to deep dive in the code, here are some guidelines to set up your environment.
### Virtual environment with `venv`
-You can create a virtual environment in a directory using Python's `venv` module:
+You can create an isolated virtual local environment in a directory using Python's `venv` module. Let's do this in the cloned repository (where the `requirements.txt` is):
-
-Now run `space login` from the Space CLI. Upon pasting the token into the CLI prompt and pressing enter, you should see a confirmation message.
-
-
-
-Click on the new app called `fastapi-deta`, and it will open your API in a new browser tab on a URL like `https://fastapi-deta-gj7ka8.deta.app/`.
-
-You will get a JSON response from your FastAPI app:
-
-```JSON
-{
- "Hello": "World"
-}
-```
-
-And now you can head over to the `/docs` of your API. For this example, it would be `https://fastapi-deta-gj7ka8.deta.app/docs`.
-
-
-
-## Enable public access
-
-Deta will handle authentication for your account using cookies. By default, every app or API that you `push` or install to your Space is personal - it's only accessible to you.
-
-But you can also make your API public using the `Spacefile` from earlier.
-
-With a `public_routes` parameter, you can specify which paths of your API should be available to the public.
-
-Set your `public_routes` to `"*"` to open every route of your API to the public:
-
-```yaml
-v: 0
-micros:
- - name: fastapi-deta
- src: .
- engine: python3.9
- public_routes:
- - "/*"
-```
-
-Then run `space push` again to update your live API on Deta Space.
-
-Once it deploys, you can share your URL with anyone and they will be able to access your API. 🚀
-
-## HTTPS
-
-Congrats! You deployed your FastAPI app to Deta Space! 🎉 🍰
-
-Also, notice that Deta Space correctly handles HTTPS for you, so you don't have to take care of that and can be sure that your users will have a secure encrypted connection. ✅ 🔒
-
-## Create a release
-
-Space also allows you to publish your API. When you publish it, anyone else can install their own copy of your API, in their own Deta Space cloud.
-
-To do so, run `space release` in the Space CLI to create an **unlisted release**:
-
-
-
-## Learn more
-
-At some point, you will probably want to store some data for your app in a way that persists through time. For that you can use Deta Base and Deta Drive, both of which have a generous **free tier**.
-
-You can also read more in the Deta Space Documentation.
-
-!!! tip
- If you have any Deta related questions, comments, or feedback, head to the Deta Discord server.
-
-
-## Deployment Concepts
-
-Coming back to the concepts we discussed in [Deployments Concepts](./concepts.md){.internal-link target=_blank}, here's how each of them would be handled with Deta Space:
-
-- **HTTPS**: Handled by Deta Space, they will give you a subdomain and handle HTTPS automatically.
-- **Running on startup**: Handled by Deta Space, as part of their service.
-- **Restarts**: Handled by Deta Space, as part of their service.
-- **Replication**: Handled by Deta Space, as part of their service.
-- **Authentication**: Handled by Deta Space, as part of their service.
-- **Memory**: Limit predefined by Deta Space, you could contact them to increase it.
-- **Previous steps before starting**: Can be configured using the `Spacefile`.
-
-!!! note
- Deta Space is designed to make it easy and free to build cloud applications for yourself. Then you can optionally share them with anyone.
-
- It can simplify several use cases, but at the same time, it doesn't support others, like using external databases (apart from Deta's own NoSQL database system), custom virtual machines, etc.
-
- You can read more details in the Deta Space Documentation to see if it's the right choice for you.
diff --git a/docs/en/docs/deployment/https.md b/docs/en/docs/deployment/https.md
index 790976a718..5cf76c1111 100644
--- a/docs/en/docs/deployment/https.md
+++ b/docs/en/docs/deployment/https.md
@@ -9,7 +9,7 @@ But it is way more complex than that.
To **learn the basics of HTTPS**, from a consumer perspective, check https://howhttps.works/.
-Now, from a **developer's perspective**, here are several things to have in mind while thinking about HTTPS:
+Now, from a **developer's perspective**, here are several things to keep in mind while thinking about HTTPS:
* For HTTPS, **the server** needs to **have "certificates"** generated by a **third party**.
* Those certificates are actually **acquired** from the third party, not "generated".
diff --git a/docs/en/docs/deployment/index.md b/docs/en/docs/deployment/index.md
index 6c43d8abbe..b43bd050a3 100644
--- a/docs/en/docs/deployment/index.md
+++ b/docs/en/docs/deployment/index.md
@@ -16,6 +16,6 @@ There are several ways to do it depending on your specific use case and the tool
You could **deploy a server** yourself using a combination of tools, you could use a **cloud service** that does part of the work for you, or other possible options.
-I will show you some of the main concepts you should probably have in mind when deploying a **FastAPI** application (although most of it applies to any other type of web application).
+I will show you some of the main concepts you should probably keep in mind when deploying a **FastAPI** application (although most of it applies to any other type of web application).
-You will see more details to have in mind and some of the techniques to do it in the next sections. ✨
+You will see more details to keep in mind and some of the techniques to do it in the next sections. ✨
diff --git a/docs/en/docs/deployment/manually.md b/docs/en/docs/deployment/manually.md
index d6892b2c14..b10a3686d7 100644
--- a/docs/en/docs/deployment/manually.md
+++ b/docs/en/docs/deployment/manually.md
@@ -10,11 +10,11 @@ There are 3 main alternatives:
## Server Machine and Server Program
-There's a small detail about names to have in mind. 💡
+There's a small detail about names to keep in mind. 💡
The word "**server**" is commonly used to refer to both the remote/cloud computer (the physical or virtual machine) and also the program that is running on that machine (e.g. Uvicorn).
-Just have that in mind when you read "server" in general, it could refer to one of those two things.
+Just keep in mind that when you read "server" in general, it could refer to one of those two things.
When referring to the remote machine, it's common to call it **server**, but also **machine**, **VM** (virtual machine), **node**. Those all refer to some type of remote machine, normally running Linux, where you run programs.
diff --git a/docs/en/docs/deployment/server-workers.md b/docs/en/docs/deployment/server-workers.md
index 4ccd9d9f69..2df9f3d432 100644
--- a/docs/en/docs/deployment/server-workers.md
+++ b/docs/en/docs/deployment/server-workers.md
@@ -90,7 +90,9 @@ Let's see what each of those options mean:
```
* So, the colon in `main:app` would be equivalent to the Python `import` part in `from main import app`.
+
* `--workers`: The number of worker processes to use, each will run a Uvicorn worker, in this case, 4 workers.
+
* `--worker-class`: The Gunicorn-compatible worker class to use in the worker processes.
* Here we pass the class that Gunicorn can import and use with:
diff --git a/docs/en/docs/external-links.md b/docs/en/docs/external-links.md
index 0c91470bc0..b89021ee2c 100644
--- a/docs/en/docs/external-links.md
+++ b/docs/en/docs/external-links.md
@@ -9,79 +9,21 @@ Here's an incomplete list of some of them.
!!! tip
If you have an article, project, tool, or anything related to **FastAPI** that is not yet listed here, create a Pull Request adding it.
-## Articles
+{% for section_name, section_content in external_links.items() %}
-### English
+## {{ section_name }}
-{% if external_links %}
-{% for article in external_links.articles.english %}
+{% for lang_name, lang_content in section_content.items() %}
+
+### {{ lang_name }}
+
+{% for item in lang_content %}
+
+* {{ item.title }} by {{ item.author }}.
-* {{ article.title }} by {{ article.author }}.
{% endfor %}
-{% endif %}
-
-### Japanese
-
-{% if external_links %}
-{% for article in external_links.articles.japanese %}
-
-* {{ article.title }} by {{ article.author }}.
{% endfor %}
-{% endif %}
-
-### Vietnamese
-
-{% if external_links %}
-{% for article in external_links.articles.vietnamese %}
-
-* {{ article.title }} by {{ article.author }}.
{% endfor %}
-{% endif %}
-
-### Russian
-
-{% if external_links %}
-{% for article in external_links.articles.russian %}
-
-* {{ article.title }} by {{ article.author }}.
-{% endfor %}
-{% endif %}
-
-### German
-
-{% if external_links %}
-{% for article in external_links.articles.german %}
-
-* {{ article.title }} by {{ article.author }}.
-{% endfor %}
-{% endif %}
-
-### Taiwanese
-
-{% if external_links %}
-{% for article in external_links.articles.taiwanese %}
-
-* {{ article.title }} by {{ article.author }}.
-{% endfor %}
-{% endif %}
-
-## Podcasts
-
-{% if external_links %}
-{% for article in external_links.podcasts.english %}
-
-* {{ article.title }} by {{ article.author }}.
-{% endfor %}
-{% endif %}
-
-## Talks
-
-{% if external_links %}
-{% for article in external_links.talks.english %}
-
-* {{ article.title }} by {{ article.author }}.
-{% endfor %}
-{% endif %}
## Projects
diff --git a/docs/en/docs/fastapi-people.md b/docs/en/docs/fastapi-people.md
index 20caaa1ee8..7e26358d89 100644
--- a/docs/en/docs/fastapi-people.md
+++ b/docs/en/docs/fastapi-people.md
@@ -1,3 +1,8 @@
+---
+hide:
+ - navigation
+---
+
# FastAPI People
FastAPI has an amazing community that welcomes people from all backgrounds.
diff --git a/docs/en/docs/features.md b/docs/en/docs/features.md
index 98f37b5344..6f13b03bb9 100644
--- a/docs/en/docs/features.md
+++ b/docs/en/docs/features.md
@@ -1,3 +1,8 @@
+---
+hide:
+ - navigation
+---
+
# Features
## FastAPI features
diff --git a/docs/en/docs/help-fastapi.md b/docs/en/docs/help-fastapi.md
index e977dba200..71c5804097 100644
--- a/docs/en/docs/help-fastapi.md
+++ b/docs/en/docs/help-fastapi.md
@@ -106,7 +106,7 @@ In many cases they will only copy a fragment of the code, but that's not enough
* You can ask them to provide a minimal, reproducible, example, that you can **copy-paste** and run locally to see the same error or behavior they are seeing, or to understand their use case better.
-* If you are feeling too generous, you can try to **create an example** like that yourself, just based on the description of the problem. Just have in mind that this might take a lot of time and it might be better to ask them to clarify the problem first.
+* If you are feeling too generous, you can try to **create an example** like that yourself, just based on the description of the problem. Just keep in mind that this might take a lot of time and it might be better to ask them to clarify the problem first.
### Suggest solutions
@@ -148,7 +148,7 @@ Again, please try your best to be kind. 🤗
---
-Here's what to have in mind and how to review a pull request:
+Here's what to keep in mind and how to review a pull request:
### Understand the problem
@@ -231,11 +231,9 @@ Join the 👥 Gitter chat, but as it doesn't have channels and advanced features, conversations are more difficult, so Discord is now the recommended system.
-
### Don't use the chat for questions
-Have in mind that as chats allow more "free conversation", it's easy to ask questions that are too general and more difficult to answer, so, you might not receive answers.
+Keep in mind that as chats allow more "free conversation", it's easy to ask questions that are too general and more difficult to answer, so, you might not receive answers.
In GitHub, the template will guide you to write the right question so that you can more easily get a good answer, or even solve the problem yourself even before asking. And in GitHub I can make sure I always answer everything, even if it takes some time. I can't personally do that with the chat systems. 😅
diff --git a/docs/en/docs/help/index.md b/docs/en/docs/help/index.md
new file mode 100644
index 0000000000..5ee7df2fef
--- /dev/null
+++ b/docs/en/docs/help/index.md
@@ -0,0 +1,3 @@
+# Help
+
+Help and get help, contribute, get involved. 🤝
diff --git a/docs/en/docs/advanced/async-sql-databases.md b/docs/en/docs/how-to/async-sql-encode-databases.md
similarity index 93%
rename from docs/en/docs/advanced/async-sql-databases.md
rename to docs/en/docs/how-to/async-sql-encode-databases.md
index 12549a1903..0e2ccce78d 100644
--- a/docs/en/docs/advanced/async-sql-databases.md
+++ b/docs/en/docs/how-to/async-sql-encode-databases.md
@@ -1,4 +1,4 @@
-# Async SQL (Relational) Databases
+# Async SQL (Relational) Databases with Encode/Databases
!!! info
These docs are about to be updated. 🎉
@@ -114,6 +114,11 @@ Create the *path operation function* to create notes:
{!../../../docs_src/async_sql_databases/tutorial001.py!}
```
+!!! info
+ In Pydantic v1 the method was called `.dict()`, it was deprecated (but still supported) in Pydantic v2, and renamed to `.model_dump()`.
+
+ The examples here use `.dict()` for compatibility with Pydantic v1, but you should use `.model_dump()` instead if you can use Pydantic v2.
+
!!! Note
Notice that as we communicate with the database using `await`, the *path operation function* is declared with `async`.
diff --git a/docs/en/docs/advanced/conditional-openapi.md b/docs/en/docs/how-to/conditional-openapi.md
similarity index 100%
rename from docs/en/docs/advanced/conditional-openapi.md
rename to docs/en/docs/how-to/conditional-openapi.md
diff --git a/docs/en/docs/how-to/configure-swagger-ui.md b/docs/en/docs/how-to/configure-swagger-ui.md
new file mode 100644
index 0000000000..f36ba5ba8c
--- /dev/null
+++ b/docs/en/docs/how-to/configure-swagger-ui.md
@@ -0,0 +1,78 @@
+# Configure Swagger UI
+
+You can configure some extra Swagger UI parameters.
+
+To configure them, pass the `swagger_ui_parameters` argument when creating the `FastAPI()` app object or to the `get_swagger_ui_html()` function.
+
+`swagger_ui_parameters` receives a dictionary with the configurations passed to Swagger UI directly.
+
+FastAPI converts the configurations to **JSON** to make them compatible with JavaScript, as that's what Swagger UI needs.
+
+## Disable Syntax Highlighting
+
+For example, you could disable syntax highlighting in Swagger UI.
+
+Without changing the settings, syntax highlighting is enabled by default:
+
+
+
+But you can disable it by setting `syntaxHighlight` to `False`:
+
+```Python hl_lines="3"
+{!../../../docs_src/configure_swagger_ui/tutorial001.py!}
+```
+
+...and then Swagger UI won't show the syntax highlighting anymore:
+
+
+
+## Change the Theme
+
+The same way you could set the syntax highlighting theme with the key `"syntaxHighlight.theme"` (notice that it has a dot in the middle):
+
+```Python hl_lines="3"
+{!../../../docs_src/configure_swagger_ui/tutorial002.py!}
+```
+
+That configuration would change the syntax highlighting color theme:
+
+
+
+## Change Default Swagger UI Parameters
+
+FastAPI includes some default configuration parameters appropriate for most of the use cases.
+
+It includes these default configurations:
+
+```Python
+{!../../../fastapi/openapi/docs.py[ln:7-13]!}
+```
+
+You can override any of them by setting a different value in the argument `swagger_ui_parameters`.
+
+For example, to disable `deepLinking` you could pass these settings to `swagger_ui_parameters`:
+
+```Python hl_lines="3"
+{!../../../docs_src/configure_swagger_ui/tutorial003.py!}
+```
+
+## Other Swagger UI Parameters
+
+To see all the other possible configurations you can use, read the official docs for Swagger UI parameters.
+
+## JavaScript-only settings
+
+Swagger UI also allows other configurations to be **JavaScript-only** objects (for example, JavaScript functions).
+
+FastAPI also includes these JavaScript-only `presets` settings:
+
+```JavaScript
+presets: [
+ SwaggerUIBundle.presets.apis,
+ SwaggerUIBundle.SwaggerUIStandalonePreset
+]
+```
+
+These are **JavaScript** objects, not strings, so you can't pass them from Python code directly.
+
+If you need to use JavaScript-only configurations like those, you can use one of the methods above. Override all the Swagger UI *path operation* and manually write any JavaScript you need.
diff --git a/docs/en/docs/how-to/custom-docs-ui-assets.md b/docs/en/docs/how-to/custom-docs-ui-assets.md
new file mode 100644
index 0000000000..9726be2c71
--- /dev/null
+++ b/docs/en/docs/how-to/custom-docs-ui-assets.md
@@ -0,0 +1,199 @@
+# Custom Docs UI Static Assets (Self-Hosting)
+
+The API docs use **Swagger UI** and **ReDoc**, and each of those need some JavaScript and CSS files.
+
+By default, those files are served from a CDN.
+
+But it's possible to customize it, you can set a specific CDN, or serve the files yourself.
+
+## Custom CDN for JavaScript and CSS
+
+Let's say that you want to use a different CDN, for example you want to use `https://unpkg.com/`.
+
+This could be useful if for example you live in a country that restricts some URLs.
+
+### Disable the automatic docs
+
+The first step is to disable the automatic docs, as by default, those use the default CDN.
+
+To disable them, set their URLs to `None` when creating your `FastAPI` app:
+
+```Python hl_lines="8"
+{!../../../docs_src/custom_docs_ui/tutorial001.py!}
+```
+
+### Include the custom docs
+
+Now you can create the *path operations* for the custom docs.
+
+You can re-use FastAPI's internal functions to create the HTML pages for the docs, and pass them the needed arguments:
+
+* `openapi_url`: the URL where the HTML page for the docs can get the OpenAPI schema for your API. You can use here the attribute `app.openapi_url`.
+* `title`: the title of your API.
+* `oauth2_redirect_url`: you can use `app.swagger_ui_oauth2_redirect_url` here to use the default.
+* `swagger_js_url`: the URL where the HTML for your Swagger UI docs can get the **JavaScript** file. This is the custom CDN URL.
+* `swagger_css_url`: the URL where the HTML for your Swagger UI docs can get the **CSS** file. This is the custom CDN URL.
+
+And similarly for ReDoc...
+
+```Python hl_lines="2-6 11-19 22-24 27-33"
+{!../../../docs_src/custom_docs_ui/tutorial001.py!}
+```
+
+!!! tip
+ The *path operation* for `swagger_ui_redirect` is a helper for when you use OAuth2.
+
+ If you integrate your API with an OAuth2 provider, you will be able to authenticate and come back to the API docs with the acquired credentials. And interact with it using the real OAuth2 authentication.
+
+ Swagger UI will handle it behind the scenes for you, but it needs this "redirect" helper.
+
+### Create a *path operation* to test it
+
+Now, to be able to test that everything works, create a *path operation*:
+
+```Python hl_lines="36-38"
+{!../../../docs_src/custom_docs_ui/tutorial001.py!}
+```
+
+### Test it
+
+Now, you should be able to go to your docs at http://127.0.0.1:8000/docs, and reload the page, it will load those assets from the new CDN.
+
+## Self-hosting JavaScript and CSS for docs
+
+Self-hosting the JavaScript and CSS could be useful if, for example, you need your app to keep working even while offline, without open Internet access, or in a local network.
+
+Here you'll see how to serve those files yourself, in the same FastAPI app, and configure the docs to use them.
+
+### Project file structure
+
+Let's say your project file structure looks like this:
+
+```
+.
+├── app
+│ ├── __init__.py
+│ ├── main.py
+```
+
+Now create a directory to store those static files.
+
+Your new file structure could look like this:
+
+```
+.
+├── app
+│ ├── __init__.py
+│ ├── main.py
+└── static/
+```
+
+### Download the files
+
+Download the static files needed for the docs and put them on that `static/` directory.
+
+You can probably right-click each link and select an option similar to `Save link as...`.
+
+**Swagger UI** uses the files:
+
+* `swagger-ui-bundle.js`
+* `swagger-ui.css`
+
+And **ReDoc** uses the file:
+
+* `redoc.standalone.js`
+
+After that, your file structure could look like:
+
+```
+.
+├── app
+│ ├── __init__.py
+│ ├── main.py
+└── static
+ ├── redoc.standalone.js
+ ├── swagger-ui-bundle.js
+ └── swagger-ui.css
+```
+
+### Serve the static files
+
+* Import `StaticFiles`.
+* "Mount" a `StaticFiles()` instance in a specific path.
+
+```Python hl_lines="7 11"
+{!../../../docs_src/custom_docs_ui/tutorial002.py!}
+```
+
+### Test the static files
+
+Start your application and go to http://127.0.0.1:8000/static/redoc.standalone.js.
+
+You should see a very long JavaScript file for **ReDoc**.
+
+It could start with something like:
+
+```JavaScript
+/*!
+ * ReDoc - OpenAPI/Swagger-generated API Reference Documentation
+ * -------------------------------------------------------------
+ * Version: "2.0.0-rc.18"
+ * Repo: https://github.com/Redocly/redoc
+ */
+!function(e,t){"object"==typeof exports&&"object"==typeof m
+
+...
+```
+
+That confirms that you are being able to serve static files from your app, and that you placed the static files for the docs in the correct place.
+
+Now we can configure the app to use those static files for the docs.
+
+### Disable the automatic docs for static files
+
+The same as when using a custom CDN, the first step is to disable the automatic docs, as those use the CDN by default.
+
+To disable them, set their URLs to `None` when creating your `FastAPI` app:
+
+```Python hl_lines="9"
+{!../../../docs_src/custom_docs_ui/tutorial002.py!}
+```
+
+### Include the custom docs for static files
+
+And the same way as with a custom CDN, now you can create the *path operations* for the custom docs.
+
+Again, you can re-use FastAPI's internal functions to create the HTML pages for the docs, and pass them the needed arguments:
+
+* `openapi_url`: the URL where the HTML page for the docs can get the OpenAPI schema for your API. You can use here the attribute `app.openapi_url`.
+* `title`: the title of your API.
+* `oauth2_redirect_url`: you can use `app.swagger_ui_oauth2_redirect_url` here to use the default.
+* `swagger_js_url`: the URL where the HTML for your Swagger UI docs can get the **JavaScript** file. **This is the one that your own app is now serving**.
+* `swagger_css_url`: the URL where the HTML for your Swagger UI docs can get the **CSS** file. **This is the one that your own app is now serving**.
+
+And similarly for ReDoc...
+
+```Python hl_lines="2-6 14-22 25-27 30-36"
+{!../../../docs_src/custom_docs_ui/tutorial002.py!}
+```
+
+!!! tip
+ The *path operation* for `swagger_ui_redirect` is a helper for when you use OAuth2.
+
+ If you integrate your API with an OAuth2 provider, you will be able to authenticate and come back to the API docs with the acquired credentials. And interact with it using the real OAuth2 authentication.
+
+ Swagger UI will handle it behind the scenes for you, but it needs this "redirect" helper.
+
+### Create a *path operation* to test static files
+
+Now, to be able to test that everything works, create a *path operation*:
+
+```Python hl_lines="39-41"
+{!../../../docs_src/custom_docs_ui/tutorial002.py!}
+```
+
+### Test Static Files UI
+
+Now, you should be able to disconnect your WiFi, go to your docs at http://127.0.0.1:8000/docs, and reload the page.
+
+And even without Internet, you would be able to see the docs for your API and interact with it.
diff --git a/docs/en/docs/advanced/custom-request-and-route.md b/docs/en/docs/how-to/custom-request-and-route.md
similarity index 100%
rename from docs/en/docs/advanced/custom-request-and-route.md
rename to docs/en/docs/how-to/custom-request-and-route.md
diff --git a/docs/en/docs/how-to/extending-openapi.md b/docs/en/docs/how-to/extending-openapi.md
new file mode 100644
index 0000000000..a18fd737e6
--- /dev/null
+++ b/docs/en/docs/how-to/extending-openapi.md
@@ -0,0 +1,87 @@
+# Extending OpenAPI
+
+There are some cases where you might need to modify the generated OpenAPI schema.
+
+In this section you will see how.
+
+## The normal process
+
+The normal (default) process, is as follows.
+
+A `FastAPI` application (instance) has an `.openapi()` method that is expected to return the OpenAPI schema.
+
+As part of the application object creation, a *path operation* for `/openapi.json` (or for whatever you set your `openapi_url`) is registered.
+
+It just returns a JSON response with the result of the application's `.openapi()` method.
+
+By default, what the method `.openapi()` does is check the property `.openapi_schema` to see if it has contents and return them.
+
+If it doesn't, it generates them using the utility function at `fastapi.openapi.utils.get_openapi`.
+
+And that function `get_openapi()` receives as parameters:
+
+* `title`: The OpenAPI title, shown in the docs.
+* `version`: The version of your API, e.g. `2.5.0`.
+* `openapi_version`: The version of the OpenAPI specification used. By default, the latest: `3.1.0`.
+* `summary`: A short summary of the API.
+* `description`: The description of your API, this can include markdown and will be shown in the docs.
+* `routes`: A list of routes, these are each of the registered *path operations*. They are taken from `app.routes`.
+
+!!! info
+ The parameter `summary` is available in OpenAPI 3.1.0 and above, supported by FastAPI 0.99.0 and above.
+
+## Overriding the defaults
+
+Using the information above, you can use the same utility function to generate the OpenAPI schema and override each part that you need.
+
+For example, let's add ReDoc's OpenAPI extension to include a custom logo.
+
+### Normal **FastAPI**
+
+First, write all your **FastAPI** application as normally:
+
+```Python hl_lines="1 4 7-9"
+{!../../../docs_src/extending_openapi/tutorial001.py!}
+```
+
+### Generate the OpenAPI schema
+
+Then, use the same utility function to generate the OpenAPI schema, inside a `custom_openapi()` function:
+
+```Python hl_lines="2 15-21"
+{!../../../docs_src/extending_openapi/tutorial001.py!}
+```
+
+### Modify the OpenAPI schema
+
+Now you can add the ReDoc extension, adding a custom `x-logo` to the `info` "object" in the OpenAPI schema:
+
+```Python hl_lines="22-24"
+{!../../../docs_src/extending_openapi/tutorial001.py!}
+```
+
+### Cache the OpenAPI schema
+
+You can use the property `.openapi_schema` as a "cache", to store your generated schema.
+
+That way, your application won't have to generate the schema every time a user opens your API docs.
+
+It will be generated only once, and then the same cached schema will be used for the next requests.
+
+```Python hl_lines="13-14 25-26"
+{!../../../docs_src/extending_openapi/tutorial001.py!}
+```
+
+### Override the method
+
+Now you can replace the `.openapi()` method with your new function.
+
+```Python hl_lines="29"
+{!../../../docs_src/extending_openapi/tutorial001.py!}
+```
+
+### Check it
+
+Once you go to http://127.0.0.1:8000/redoc you will see that you are using your custom logo (in this example, **FastAPI**'s logo):
+
+
diff --git a/docs/en/docs/how-to/general.md b/docs/en/docs/how-to/general.md
new file mode 100644
index 0000000000..04367c6b76
--- /dev/null
+++ b/docs/en/docs/how-to/general.md
@@ -0,0 +1,39 @@
+# General - How To - Recipes
+
+Here are several pointers to other places in the docs, for general or frequent questions.
+
+## Filter Data - Security
+
+To ensure that you don't return more data than you should, read the docs for [Tutorial - Response Model - Return Type](../tutorial/response-model.md){.internal-link target=_blank}.
+
+## Documentation Tags - OpenAPI
+
+To add tags to your *path operations*, and group them in the docs UI, read the docs for [Tutorial - Path Operation Configurations - Tags](../tutorial/path-operation-configuration.md#tags){.internal-link target=_blank}.
+
+## Documentation Summary and Description - OpenAPI
+
+To add a summary and description to your *path operations*, and show them in the docs UI, read the docs for [Tutorial - Path Operation Configurations - Summary and Description](../tutorial/path-operation-configuration.md#summary-and-description){.internal-link target=_blank}.
+
+## Documentation Response description - OpenAPI
+
+To define the description of the response, shown in the docs UI, read the docs for [Tutorial - Path Operation Configurations - Response description](../tutorial/path-operation-configuration.md#response-description){.internal-link target=_blank}.
+
+## Documentation Deprecate a *Path Operation* - OpenAPI
+
+To deprecate a *path operation*, and show it in the docs UI, read the docs for [Tutorial - Path Operation Configurations - Deprecation](../tutorial/path-operation-configuration.md#deprecate-a-path-operation){.internal-link target=_blank}.
+
+## Convert any Data to JSON-compatible
+
+To convert any data to JSON-compatible, read the docs for [Tutorial - JSON Compatible Encoder](../tutorial/encoder.md){.internal-link target=_blank}.
+
+## OpenAPI Metadata - Docs
+
+To add metadata to your OpenAPI schema, including a license, version, contact, etc, read the docs for [Tutorial - Metadata and Docs URLs](../tutorial/metadata.md){.internal-link target=_blank}.
+
+## OpenAPI Custom URL
+
+To customize the OpenAPI URL (or remove it), read the docs for [Tutorial - Metadata and Docs URLs](../tutorial/metadata.md#openapi-url){.internal-link target=_blank}.
+
+## OpenAPI Docs URLs
+
+To update the URLs used for the automatically generated docs user interfaces, read the docs for [Tutorial - Metadata and Docs URLs](../tutorial/metadata.md#docs-urls){.internal-link target=_blank}.
diff --git a/docs/en/docs/advanced/graphql.md b/docs/en/docs/how-to/graphql.md
similarity index 100%
rename from docs/en/docs/advanced/graphql.md
rename to docs/en/docs/how-to/graphql.md
diff --git a/docs/en/docs/how-to/index.md b/docs/en/docs/how-to/index.md
new file mode 100644
index 0000000000..ec7fd38f8f
--- /dev/null
+++ b/docs/en/docs/how-to/index.md
@@ -0,0 +1,11 @@
+# How To - Recipes
+
+Here you will see different recipes or "how to" guides for **several topics**.
+
+Most of these ideas would be more or less **independent**, and in most cases you should only need to study them if they apply directly to **your project**.
+
+If something seems interesting and useful to your project, go ahead and check it, but otherwise, you might probably just skip them.
+
+!!! tip
+
+ If you want to **learn FastAPI** in a structured way (recommended), go and read the [Tutorial - User Guide](../tutorial/index.md){.internal-link target=_blank} chapter by chapter instead.
diff --git a/docs/en/docs/advanced/nosql-databases.md b/docs/en/docs/how-to/nosql-databases-couchbase.md
similarity index 99%
rename from docs/en/docs/advanced/nosql-databases.md
rename to docs/en/docs/how-to/nosql-databases-couchbase.md
index 606db35c75..ae6ad604ba 100644
--- a/docs/en/docs/advanced/nosql-databases.md
+++ b/docs/en/docs/how-to/nosql-databases-couchbase.md
@@ -1,4 +1,4 @@
-# NoSQL (Distributed / Big Data) Databases
+# NoSQL (Distributed / Big Data) Databases with Couchbase
!!! info
These docs are about to be updated. 🎉
diff --git a/docs/en/docs/how-to/separate-openapi-schemas.md b/docs/en/docs/how-to/separate-openapi-schemas.md
new file mode 100644
index 0000000000..10be1071a9
--- /dev/null
+++ b/docs/en/docs/how-to/separate-openapi-schemas.md
@@ -0,0 +1,231 @@
+# Separate OpenAPI Schemas for Input and Output or Not
+
+When using **Pydantic v2**, the generated OpenAPI is a bit more exact and **correct** than before. 😎
+
+In fact, in some cases, it will even have **two JSON Schemas** in OpenAPI for the same Pydantic model, for input and output, depending on if they have **default values**.
+
+Let's see how that works and how to change it if you need to do that.
+
+## Pydantic Models for Input and Output
+
+Let's say you have a Pydantic model with default values, like this one:
+
+=== "Python 3.10+"
+
+ ```Python hl_lines="7"
+ {!> ../../../docs_src/separate_openapi_schemas/tutorial001_py310.py[ln:1-7]!}
+
+ # Code below omitted 👇
+ ```
+
+
+
+
+
+
+contact fields| Parameter | Type | Description |
|---|---|---|
name | str | The identifying name of the contact person/organization. |
url | str | The URL pointing to the contact information. MUST be in the format of a URL. |
email | str | The email address of the contact person/organization. MUST be in the format of an email address. |
license_info fields| Parameter | Type | Description |
|---|---|---|
name | str | REQUIRED (if a license_info is set). The license name used for the API. |
identifier | str | An SPDX license expression for the API. The identifier field is mutually exclusive of the url field. Available since OpenAPI 3.1.0, FastAPI 0.99.0. |
url | str | A URL to the license used for the API. MUST be in the format of a URL. |
license_info fields| Parameter | Type | Description |
|---|---|---|
name | str | REQUIRED (if a license_info is set). The license name used for the API. |
identifier | str | An SPDX license expression for the API. The identifier field is mutually exclusive of the url field. Available since OpenAPI 3.1.0, FastAPI 0.99.0. |
url | str | A URL to the license used for the API. MUST be in the format of a URL. |
lt.
{!> ../../../docs_src/path_params_numeric_validations/tutorial006_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="12"
{!> ../../../docs_src/path_params_numeric_validations/tutorial006_an.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
diff --git a/docs/en/docs/tutorial/path-params.md b/docs/en/docs/tutorial/path-params.md
index 6594a7a8b5..847b563342 100644
--- a/docs/en/docs/tutorial/path-params.md
+++ b/docs/en/docs/tutorial/path-params.md
@@ -46,16 +46,18 @@ But if you go to the browser at ../../../docs_src/query_params_str_validations/tutorial001_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9"
{!> ../../../docs_src/query_params_str_validations/tutorial001.py!}
@@ -42,7 +42,7 @@ To achieve that, first import:
{!> ../../../docs_src/query_params_str_validations/tutorial002_an_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
In versions of Python below Python 3.9 you import `Annotated` from `typing_extensions`.
@@ -73,7 +73,7 @@ We had this type annotation:
q: str | None = None
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python
q: Union[str, None] = None
@@ -87,7 +87,7 @@ What we will do is wrap that with `Annotated`, so it becomes:
q: Annotated[str | None] = None
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python
q: Annotated[Union[str, None]] = None
@@ -107,7 +107,7 @@ Now that we have this `Annotated` where we can put more metadata, add `Query` to
{!> ../../../docs_src/query_params_str_validations/tutorial002_an_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="10"
{!> ../../../docs_src/query_params_str_validations/tutorial002_an.py!}
@@ -138,7 +138,7 @@ This is how you would use `Query()` as the default value of your function parame
{!> ../../../docs_src/query_params_str_validations/tutorial002_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9"
{!> ../../../docs_src/query_params_str_validations/tutorial002.py!}
@@ -173,7 +173,7 @@ q: str | None = None
But it declares it explicitly as being a query parameter.
!!! info
- Have in mind that the most important part to make a parameter optional is the part:
+ Keep in mind that the most important part to make a parameter optional is the part:
```Python
= None
@@ -199,7 +199,7 @@ This will validate the data, show a clear error when the data is not valid, and
### `Query` as the default value or in `Annotated`
-Have in mind that when using `Query` inside of `Annotated` you cannot use the `default` parameter for `Query`.
+Keep in mind that when using `Query` inside of `Annotated` you cannot use the `default` parameter for `Query`.
Instead use the actual default value of the function parameter. Otherwise, it would be inconsistent.
@@ -251,7 +251,7 @@ You can also add a parameter `min_length`:
{!> ../../../docs_src/query_params_str_validations/tutorial003_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="11"
{!> ../../../docs_src/query_params_str_validations/tutorial003_an.py!}
@@ -266,7 +266,7 @@ You can also add a parameter `min_length`:
{!> ../../../docs_src/query_params_str_validations/tutorial003_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -291,7 +291,7 @@ You can define a ../../../docs_src/query_params_str_validations/tutorial004_an.py!}
@@ -306,7 +306,7 @@ You can define a ../../../docs_src/query_params_str_validations/tutorial005_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="8"
{!> ../../../docs_src/query_params_str_validations/tutorial005_an.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -405,13 +405,13 @@ So, when you need to declare a value as required while using `Query`, you can si
{!> ../../../docs_src/query_params_str_validations/tutorial006_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="8"
{!> ../../../docs_src/query_params_str_validations/tutorial006_an.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -435,13 +435,13 @@ There's an alternative way to explicitly declare that a value is required. You c
{!> ../../../docs_src/query_params_str_validations/tutorial006b_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="8"
{!> ../../../docs_src/query_params_str_validations/tutorial006b_an.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -475,7 +475,7 @@ To do that, you can declare that `None` is a valid type but still use `...` as t
{!> ../../../docs_src/query_params_str_validations/tutorial006c_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="10"
{!> ../../../docs_src/query_params_str_validations/tutorial006c_an.py!}
@@ -490,7 +490,7 @@ To do that, you can declare that `None` is a valid type but still use `...` as t
{!> ../../../docs_src/query_params_str_validations/tutorial006c_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -502,33 +502,8 @@ To do that, you can declare that `None` is a valid type but still use `...` as t
!!! tip
Pydantic, which is what powers all the data validation and serialization in FastAPI, has a special behavior when you use `Optional` or `Union[Something, None]` without a default value, you can read more about it in the Pydantic docs about Required Optional fields.
-### Use Pydantic's `Required` instead of Ellipsis (`...`)
-
-If you feel uncomfortable using `...`, you can also import and use `Required` from Pydantic:
-
-=== "Python 3.9+"
-
- ```Python hl_lines="4 10"
- {!> ../../../docs_src/query_params_str_validations/tutorial006d_an_py39.py!}
- ```
-
-=== "Python 3.6+"
-
- ```Python hl_lines="2 9"
- {!> ../../../docs_src/query_params_str_validations/tutorial006d_an.py!}
- ```
-
-=== "Python 3.6+ non-Annotated"
-
- !!! tip
- Prefer to use the `Annotated` version if possible.
-
- ```Python hl_lines="2 8"
- {!> ../../../docs_src/query_params_str_validations/tutorial006d.py!}
- ```
-
!!! tip
- Remember that in most of the cases, when something is required, you can simply omit the default, so you normally don't have to use `...` nor `Required`.
+ Remember that in most of the cases, when something is required, you can simply omit the default, so you normally don't have to use `...`.
## Query parameter list / multiple values
@@ -548,7 +523,7 @@ For example, to declare a query parameter `q` that can appear multiple times in
{!> ../../../docs_src/query_params_str_validations/tutorial011_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="10"
{!> ../../../docs_src/query_params_str_validations/tutorial011_an.py!}
@@ -572,7 +547,7 @@ For example, to declare a query parameter `q` that can appear multiple times in
{!> ../../../docs_src/query_params_str_validations/tutorial011_py39.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -617,7 +592,7 @@ And you can also define a default `list` of values if none are provided:
{!> ../../../docs_src/query_params_str_validations/tutorial012_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="10"
{!> ../../../docs_src/query_params_str_validations/tutorial012_an.py!}
@@ -632,7 +607,7 @@ And you can also define a default `list` of values if none are provided:
{!> ../../../docs_src/query_params_str_validations/tutorial012_py39.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -668,13 +643,13 @@ You can also use `list` directly instead of `List[str]` (or `list[str]` in Pytho
{!> ../../../docs_src/query_params_str_validations/tutorial013_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="8"
{!> ../../../docs_src/query_params_str_validations/tutorial013_an.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -684,7 +659,7 @@ You can also use `list` directly instead of `List[str]` (or `list[str]` in Pytho
```
!!! note
- Have in mind that in this case, FastAPI won't check the contents of the list.
+ Keep in mind that in this case, FastAPI won't check the contents of the list.
For example, `List[int]` would check (and document) that the contents of the list are integers. But `list` alone wouldn't.
@@ -695,7 +670,7 @@ You can add more information about the parameter.
That information will be included in the generated OpenAPI and used by the documentation user interfaces and external tools.
!!! note
- Have in mind that different tools might have different levels of OpenAPI support.
+ Keep in mind that different tools might have different levels of OpenAPI support.
Some of them might not show all the extra information declared yet, although in most of the cases, the missing feature is already planned for development.
@@ -713,7 +688,7 @@ You can add a `title`:
{!> ../../../docs_src/query_params_str_validations/tutorial007_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="11"
{!> ../../../docs_src/query_params_str_validations/tutorial007_an.py!}
@@ -728,7 +703,7 @@ You can add a `title`:
{!> ../../../docs_src/query_params_str_validations/tutorial007_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -751,7 +726,7 @@ And a `description`:
{!> ../../../docs_src/query_params_str_validations/tutorial008_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="15"
{!> ../../../docs_src/query_params_str_validations/tutorial008_an.py!}
@@ -762,11 +737,11 @@ And a `description`:
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="12"
+ ```Python hl_lines="11"
{!> ../../../docs_src/query_params_str_validations/tutorial008_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -805,7 +780,7 @@ Then you can declare an `alias`, and that alias is what will be used to find the
{!> ../../../docs_src/query_params_str_validations/tutorial009_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="10"
{!> ../../../docs_src/query_params_str_validations/tutorial009_an.py!}
@@ -820,7 +795,7 @@ Then you can declare an `alias`, and that alias is what will be used to find the
{!> ../../../docs_src/query_params_str_validations/tutorial009_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -849,7 +824,7 @@ Then pass the parameter `deprecated=True` to `Query`:
{!> ../../../docs_src/query_params_str_validations/tutorial010_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="20"
{!> ../../../docs_src/query_params_str_validations/tutorial010_an.py!}
@@ -860,11 +835,11 @@ Then pass the parameter `deprecated=True` to `Query`:
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="17"
+ ```Python hl_lines="16"
{!> ../../../docs_src/query_params_str_validations/tutorial010_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -893,7 +868,7 @@ To exclude a query parameter from the generated OpenAPI schema (and thus, from t
{!> ../../../docs_src/query_params_str_validations/tutorial014_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="11"
{!> ../../../docs_src/query_params_str_validations/tutorial014_an.py!}
@@ -908,7 +883,7 @@ To exclude a query parameter from the generated OpenAPI schema (and thus, from t
{!> ../../../docs_src/query_params_str_validations/tutorial014_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -932,7 +907,7 @@ Validations specific for strings:
* `min_length`
* `max_length`
-* `regex`
+* `pattern`
In these examples you saw how to declare validations for `str` values.
diff --git a/docs/en/docs/tutorial/query-params.md b/docs/en/docs/tutorial/query-params.md
index 0b74b10f81..bc3b11948a 100644
--- a/docs/en/docs/tutorial/query-params.md
+++ b/docs/en/docs/tutorial/query-params.md
@@ -69,7 +69,7 @@ The same way, you can declare optional query parameters, by setting their defaul
{!> ../../../docs_src/query_params/tutorial002_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9"
{!> ../../../docs_src/query_params/tutorial002.py!}
@@ -90,7 +90,7 @@ You can also declare `bool` types, and they will be converted:
{!> ../../../docs_src/query_params/tutorial003_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9"
{!> ../../../docs_src/query_params/tutorial003.py!}
@@ -143,7 +143,7 @@ They will be detected by name:
{!> ../../../docs_src/query_params/tutorial004_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="8 10"
{!> ../../../docs_src/query_params/tutorial004.py!}
@@ -173,16 +173,18 @@ http://127.0.0.1:8000/items/foo-item
```JSON
{
- "detail": [
- {
- "loc": [
- "query",
- "needy"
- ],
- "msg": "field required",
- "type": "value_error.missing"
- }
- ]
+ "detail": [
+ {
+ "type": "missing",
+ "loc": [
+ "query",
+ "needy"
+ ],
+ "msg": "Field required",
+ "input": null,
+ "url": "https://errors.pydantic.dev/2.1/v/missing"
+ }
+ ]
}
```
@@ -209,7 +211,7 @@ And of course, you can define some parameters as required, some as having a defa
{!> ../../../docs_src/query_params/tutorial006_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="10"
{!> ../../../docs_src/query_params/tutorial006.py!}
diff --git a/docs/en/docs/tutorial/request-files.md b/docs/en/docs/tutorial/request-files.md
index 1fe1e7a33d..8eb8ace648 100644
--- a/docs/en/docs/tutorial/request-files.md
+++ b/docs/en/docs/tutorial/request-files.md
@@ -19,13 +19,13 @@ Import `File` and `UploadFile` from `fastapi`:
{!> ../../../docs_src/request_files/tutorial001_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="1"
{!> ../../../docs_src/request_files/tutorial001_an.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -44,13 +44,13 @@ Create file parameters the same way you would for `Body` or `Form`:
{!> ../../../docs_src/request_files/tutorial001_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="8"
{!> ../../../docs_src/request_files/tutorial001_an.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -71,7 +71,7 @@ The files will be uploaded as "form data".
If you declare the type of your *path operation function* parameter as `bytes`, **FastAPI** will read the file for you and you will receive the contents as `bytes`.
-Have in mind that this means that the whole contents will be stored in memory. This will work well for small files.
+Keep in mind that this means that the whole contents will be stored in memory. This will work well for small files.
But there are several cases in which you might benefit from using `UploadFile`.
@@ -85,13 +85,13 @@ Define a file parameter with a type of `UploadFile`:
{!> ../../../docs_src/request_files/tutorial001_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="13"
{!> ../../../docs_src/request_files/tutorial001_an.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -181,7 +181,7 @@ You can make a file optional by using standard type annotations and setting a de
{!> ../../../docs_src/request_files/tutorial001_02_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="10 18"
{!> ../../../docs_src/request_files/tutorial001_02_an.py!}
@@ -196,7 +196,7 @@ You can make a file optional by using standard type annotations and setting a de
{!> ../../../docs_src/request_files/tutorial001_02_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -215,13 +215,13 @@ You can also use `File()` with `UploadFile`, for example, to set additional meta
{!> ../../../docs_src/request_files/tutorial001_03_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="8 14"
{!> ../../../docs_src/request_files/tutorial001_03_an.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -244,7 +244,7 @@ To use that, declare a list of `bytes` or `UploadFile`:
{!> ../../../docs_src/request_files/tutorial002_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="11 16"
{!> ../../../docs_src/request_files/tutorial002_an.py!}
@@ -259,7 +259,7 @@ To use that, declare a list of `bytes` or `UploadFile`:
{!> ../../../docs_src/request_files/tutorial002_py39.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -285,7 +285,7 @@ And the same way as before, you can use `File()` to set additional parameters, e
{!> ../../../docs_src/request_files/tutorial003_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="12 19-21"
{!> ../../../docs_src/request_files/tutorial003_an.py!}
@@ -300,7 +300,7 @@ And the same way as before, you can use `File()` to set additional parameters, e
{!> ../../../docs_src/request_files/tutorial003_py39.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
diff --git a/docs/en/docs/tutorial/request-forms-and-files.md b/docs/en/docs/tutorial/request-forms-and-files.md
index 1818946c4e..a58291dc81 100644
--- a/docs/en/docs/tutorial/request-forms-and-files.md
+++ b/docs/en/docs/tutorial/request-forms-and-files.md
@@ -15,13 +15,13 @@ You can define files and form fields at the same time using `File` and `Form`.
{!> ../../../docs_src/request_forms_and_files/tutorial001_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="1"
{!> ../../../docs_src/request_forms_and_files/tutorial001_an.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -40,13 +40,13 @@ Create file and form parameters the same way you would for `Body` or `Query`:
{!> ../../../docs_src/request_forms_and_files/tutorial001_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9-11"
{!> ../../../docs_src/request_forms_and_files/tutorial001_an.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
diff --git a/docs/en/docs/tutorial/request-forms.md b/docs/en/docs/tutorial/request-forms.md
index 5d441a6141..0e8ac5f4f9 100644
--- a/docs/en/docs/tutorial/request-forms.md
+++ b/docs/en/docs/tutorial/request-forms.md
@@ -17,13 +17,13 @@ Import `Form` from `fastapi`:
{!> ../../../docs_src/request_forms/tutorial001_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="1"
{!> ../../../docs_src/request_forms/tutorial001_an.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -42,13 +42,13 @@ Create form parameters the same way you would for `Body` or `Query`:
{!> ../../../docs_src/request_forms/tutorial001_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="8"
{!> ../../../docs_src/request_forms/tutorial001_an.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
diff --git a/docs/en/docs/tutorial/response-model.md b/docs/en/docs/tutorial/response-model.md
index 2181cfb5ae..d5683ac7f2 100644
--- a/docs/en/docs/tutorial/response-model.md
+++ b/docs/en/docs/tutorial/response-model.md
@@ -16,7 +16,7 @@ You can use **type annotations** the same way you would for input data in functi
{!> ../../../docs_src/response_model/tutorial001_01_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="18 23"
{!> ../../../docs_src/response_model/tutorial001_01.py!}
@@ -65,7 +65,7 @@ You can use the `response_model` parameter in any of the *path operations*:
{!> ../../../docs_src/response_model/tutorial001_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="17 22 24-27"
{!> ../../../docs_src/response_model/tutorial001.py!}
@@ -101,7 +101,7 @@ Here we are declaring a `UserIn` model, it will contain a plaintext password:
{!> ../../../docs_src/response_model/tutorial002_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9 11"
{!> ../../../docs_src/response_model/tutorial002.py!}
@@ -121,7 +121,7 @@ And we are using this model to declare our input and the same model to declare o
{!> ../../../docs_src/response_model/tutorial002_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="18"
{!> ../../../docs_src/response_model/tutorial002.py!}
@@ -146,7 +146,7 @@ We can instead create an input model with the plaintext password and an output m
{!> ../../../docs_src/response_model/tutorial003_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9 11 16"
{!> ../../../docs_src/response_model/tutorial003.py!}
@@ -160,7 +160,7 @@ Here, even though our *path operation function* is returning the same input user
{!> ../../../docs_src/response_model/tutorial003_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="24"
{!> ../../../docs_src/response_model/tutorial003.py!}
@@ -174,7 +174,7 @@ Here, even though our *path operation function* is returning the same input user
{!> ../../../docs_src/response_model/tutorial003_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="22"
{!> ../../../docs_src/response_model/tutorial003.py!}
@@ -208,7 +208,7 @@ And in those cases, we can use classes and inheritance to take advantage of func
{!> ../../../docs_src/response_model/tutorial003_01_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9-13 15-16 20"
{!> ../../../docs_src/response_model/tutorial003_01.py!}
@@ -284,7 +284,7 @@ The same would happen if you had something like a its `exclude_unset` parameter to achieve this.
@@ -447,7 +452,7 @@ This can be used as a quick shortcut if you have only one Pydantic model and wan
{!> ../../../docs_src/response_model/tutorial005_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="31 37"
{!> ../../../docs_src/response_model/tutorial005.py!}
@@ -468,7 +473,7 @@ If you forget to use a `set` and use a `list` or `tuple` instead, FastAPI will s
{!> ../../../docs_src/response_model/tutorial006_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="31 37"
{!> ../../../docs_src/response_model/tutorial006.py!}
diff --git a/docs/en/docs/tutorial/schema-extra-example.md b/docs/en/docs/tutorial/schema-extra-example.md
index 39d184763f..9bb9ba4e31 100644
--- a/docs/en/docs/tutorial/schema-extra-example.md
+++ b/docs/en/docs/tutorial/schema-extra-example.md
@@ -20,13 +20,13 @@ You can declare `examples` for a Pydantic model that will be added to the genera
{!> ../../../docs_src/schema_extra_example/tutorial001_py310_pv1.py!}
```
-=== "Python 3.6+ Pydantic v2"
+=== "Python 3.8+ Pydantic v2"
```Python hl_lines="15-26"
{!> ../../../docs_src/schema_extra_example/tutorial001.py!}
```
-=== "Python 3.6+ Pydantic v1"
+=== "Python 3.8+ Pydantic v1"
```Python hl_lines="15-25"
{!> ../../../docs_src/schema_extra_example/tutorial001_pv1.py!}
@@ -38,13 +38,13 @@ That extra info will be added as-is to the output **JSON Schema** for that model
In Pydantic version 2, you would use the attribute `model_config`, that takes a `dict` as described in Pydantic's docs: Model Config.
- You can set `"json_schema_extra"` with a `dict` containing any additonal data you would like to show up in the generated JSON Schema, including `examples`.
+ You can set `"json_schema_extra"` with a `dict` containing any additional data you would like to show up in the generated JSON Schema, including `examples`.
=== "Pydantic v1"
In Pydantic version 1, you would use an internal class `Config` and `schema_extra`, as described in Pydantic's docs: Schema customization.
- You can set `schema_extra` with a `dict` containing any additonal data you would like to show up in the generated JSON Schema, including `examples`.
+ You can set `schema_extra` with a `dict` containing any additional data you would like to show up in the generated JSON Schema, including `examples`.
!!! tip
You could use the same technique to extend the JSON Schema and add your own custom extra info.
@@ -68,13 +68,13 @@ When using `Field()` with Pydantic models, you can also declare additional `exam
{!> ../../../docs_src/schema_extra_example/tutorial002_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="4 10-13"
{!> ../../../docs_src/schema_extra_example/tutorial002.py!}
```
-## `examples` in OpenAPI
+## `examples` in JSON Schema - OpenAPI
When using any of:
@@ -86,7 +86,7 @@ When using any of:
* `Form()`
* `File()`
-you can also declare a group of `examples` with additional information that will be added to **OpenAPI**.
+you can also declare a group of `examples` with additional information that will be added to their **JSON Schemas** inside of **OpenAPI**.
### `Body` with `examples`
@@ -104,7 +104,7 @@ Here we pass `examples` containing one example of the data expected in `Body()`:
{!> ../../../docs_src/schema_extra_example/tutorial003_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="23-30"
{!> ../../../docs_src/schema_extra_example/tutorial003_an.py!}
@@ -119,7 +119,7 @@ Here we pass `examples` containing one example of the data expected in `Body()`:
{!> ../../../docs_src/schema_extra_example/tutorial003_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -150,7 +150,7 @@ You can of course also pass multiple `examples`:
{!> ../../../docs_src/schema_extra_example/tutorial004_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="24-39"
{!> ../../../docs_src/schema_extra_example/tutorial004_an.py!}
@@ -165,7 +165,7 @@ You can of course also pass multiple `examples`:
{!> ../../../docs_src/schema_extra_example/tutorial004_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -174,9 +174,84 @@ You can of course also pass multiple `examples`:
{!> ../../../docs_src/schema_extra_example/tutorial004.py!}
```
-### Examples in the docs UI
+When you do this, the examples will be part of the internal **JSON Schema** for that body data.
-With `examples` added to `Body()` the `/docs` would look like:
+Nevertheless, at the time of writing this, Swagger UI, the tool in charge of showing the docs UI, doesn't support showing multiple examples for the data in **JSON Schema**. But read below for a workaround.
+
+### OpenAPI-specific `examples`
+
+Since before **JSON Schema** supported `examples` OpenAPI had support for a different field also called `examples`.
+
+This **OpenAPI-specific** `examples` goes in another section in the OpenAPI specification. It goes in the **details for each *path operation***, not inside each JSON Schema.
+
+And Swagger UI has supported this particular `examples` field for a while. So, you can use it to **show** different **examples in the docs UI**.
+
+The shape of this OpenAPI-specific field `examples` is a `dict` with **multiple examples** (instead of a `list`), each with extra information that will be added to **OpenAPI** too.
+
+This doesn't go inside of each JSON Schema contained in OpenAPI, this goes outside, in the *path operation* directly.
+
+### Using the `openapi_examples` Parameter
+
+You can declare the OpenAPI-specific `examples` in FastAPI with the parameter `openapi_examples` for:
+
+* `Path()`
+* `Query()`
+* `Header()`
+* `Cookie()`
+* `Body()`
+* `Form()`
+* `File()`
+
+The keys of the `dict` identify each example, and each value is another `dict`.
+
+Each specific example `dict` in the `examples` can contain:
+
+* `summary`: Short description for the example.
+* `description`: A long description that can contain Markdown text.
+* `value`: This is the actual example shown, e.g. a `dict`.
+* `externalValue`: alternative to `value`, a URL pointing to the example. Although this might not be supported by as many tools as `value`.
+
+You can use it like this:
+
+=== "Python 3.10+"
+
+ ```Python hl_lines="23-49"
+ {!> ../../../docs_src/schema_extra_example/tutorial005_an_py310.py!}
+ ```
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="23-49"
+ {!> ../../../docs_src/schema_extra_example/tutorial005_an_py39.py!}
+ ```
+
+=== "Python 3.8+"
+
+ ```Python hl_lines="24-50"
+ {!> ../../../docs_src/schema_extra_example/tutorial005_an.py!}
+ ```
+
+=== "Python 3.10+ non-Annotated"
+
+ !!! tip
+ Prefer to use the `Annotated` version if possible.
+
+ ```Python hl_lines="19-45"
+ {!> ../../../docs_src/schema_extra_example/tutorial005_py310.py!}
+ ```
+
+=== "Python 3.8+ non-Annotated"
+
+ !!! tip
+ Prefer to use the `Annotated` version if possible.
+
+ ```Python hl_lines="21-47"
+ {!> ../../../docs_src/schema_extra_example/tutorial005.py!}
+ ```
+
+### OpenAPI Examples in the Docs UI
+
+With `openapi_examples` added to `Body()` the `/docs` would look like:
@@ -210,20 +285,8 @@ OpenAPI also added `example` and `examples` fields to other parts of the specifi
* `File()`
* `Form()`
-### OpenAPI's `examples` field
-
-The shape of this field `examples` from OpenAPI is a `dict` with **multiple examples**, each with extra information that will be added to **OpenAPI** too.
-
-The keys of the `dict` identify each example, and each value is another `dict`.
-
-Each specific example `dict` in the `examples` can contain:
-
-* `summary`: Short description for the example.
-* `description`: A long description that can contain Markdown text.
-* `value`: This is the actual example shown, e.g. a `dict`.
-* `externalValue`: alternative to `value`, a URL pointing to the example. Although this might not be supported by as many tools as `value`.
-
-This applies to those other parts of the OpenAPI specification apart from JSON Schema.
+!!! info
+ This old OpenAPI-specific `examples` parameter is now `openapi_examples` since FastAPI `0.103.0`.
### JSON Schema's `examples` field
@@ -250,6 +313,12 @@ In versions of FastAPI before 0.99.0 (0.99.0 and above use the newer OpenAPI 3.1
But now that FastAPI 0.99.0 and above uses OpenAPI 3.1.0, that uses JSON Schema 2020-12, and Swagger UI 5.0.0 and above, everything is more consistent and the examples are included in JSON Schema.
+### Swagger UI and OpenAPI-specific `examples`
+
+Now, as Swagger UI didn't support multiple JSON Schema examples (as of 2023-08-26), users didn't have a way to show multiple examples in the docs.
+
+To solve that, FastAPI `0.103.0` **added support** for declaring the same old **OpenAPI-specific** `examples` field with the new parameter `openapi_examples`. 🤓
+
### Summary
I used to say I didn't like history that much... and look at me now giving "tech history" lessons. 😅
diff --git a/docs/en/docs/tutorial/security/first-steps.md b/docs/en/docs/tutorial/security/first-steps.md
index 5765cf2d62..2f39f1ec26 100644
--- a/docs/en/docs/tutorial/security/first-steps.md
+++ b/docs/en/docs/tutorial/security/first-steps.md
@@ -26,13 +26,13 @@ Copy the example in a file `main.py`:
{!> ../../../docs_src/security/tutorial001_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python
{!> ../../../docs_src/security/tutorial001_an.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -140,13 +140,13 @@ When we create an instance of the `OAuth2PasswordBearer` class we pass in the `t
{!> ../../../docs_src/security/tutorial001_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="7"
{!> ../../../docs_src/security/tutorial001_an.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -191,13 +191,13 @@ Now you can pass that `oauth2_scheme` in a dependency with `Depends`.
{!> ../../../docs_src/security/tutorial001_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="11"
{!> ../../../docs_src/security/tutorial001_an.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
diff --git a/docs/en/docs/tutorial/security/get-current-user.md b/docs/en/docs/tutorial/security/get-current-user.md
index 1a8c5d9a8d..dc6d87c9ca 100644
--- a/docs/en/docs/tutorial/security/get-current-user.md
+++ b/docs/en/docs/tutorial/security/get-current-user.md
@@ -8,13 +8,13 @@ In the previous chapter the security system (which is based on the dependency in
{!> ../../../docs_src/security/tutorial001_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="11"
{!> ../../../docs_src/security/tutorial001_an.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -45,7 +45,7 @@ The same way we use Pydantic to declare bodies, we can use it anywhere else:
{!> ../../../docs_src/security/tutorial002_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="5 13-17"
{!> ../../../docs_src/security/tutorial002_an.py!}
@@ -60,7 +60,7 @@ The same way we use Pydantic to declare bodies, we can use it anywhere else:
{!> ../../../docs_src/security/tutorial002_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -91,7 +91,7 @@ The same as we were doing before in the *path operation* directly, our new depen
{!> ../../../docs_src/security/tutorial002_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="26"
{!> ../../../docs_src/security/tutorial002_an.py!}
@@ -106,7 +106,7 @@ The same as we were doing before in the *path operation* directly, our new depen
{!> ../../../docs_src/security/tutorial002_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -131,7 +131,7 @@ The same as we were doing before in the *path operation* directly, our new depen
{!> ../../../docs_src/security/tutorial002_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="20-23 27-28"
{!> ../../../docs_src/security/tutorial002_an.py!}
@@ -146,7 +146,7 @@ The same as we were doing before in the *path operation* directly, our new depen
{!> ../../../docs_src/security/tutorial002_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -171,7 +171,7 @@ So now we can use the same `Depends` with our `get_current_user` in the *path op
{!> ../../../docs_src/security/tutorial002_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="32"
{!> ../../../docs_src/security/tutorial002_an.py!}
@@ -186,7 +186,7 @@ So now we can use the same `Depends` with our `get_current_user` in the *path op
{!> ../../../docs_src/security/tutorial002_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -227,7 +227,7 @@ Just use any kind of model, any kind of class, any kind of database that you nee
## Code size
-This example might seem verbose. Have in mind that we are mixing security, data models, utility functions and *path operations* in the same file.
+This example might seem verbose. Keep in mind that we are mixing security, data models, utility functions and *path operations* in the same file.
But here's the key point.
@@ -253,7 +253,7 @@ And all these thousands of *path operations* can be as small as 3 lines:
{!> ../../../docs_src/security/tutorial002_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="31-33"
{!> ../../../docs_src/security/tutorial002_an.py!}
@@ -268,7 +268,7 @@ And all these thousands of *path operations* can be as small as 3 lines:
{!> ../../../docs_src/security/tutorial002_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
diff --git a/docs/en/docs/tutorial/security/oauth2-jwt.md b/docs/en/docs/tutorial/security/oauth2-jwt.md
index deb722b966..1c792e3d9e 100644
--- a/docs/en/docs/tutorial/security/oauth2-jwt.md
+++ b/docs/en/docs/tutorial/security/oauth2-jwt.md
@@ -121,7 +121,7 @@ And another one to authenticate and return a user.
{!> ../../../docs_src/security/tutorial004_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="7 49 56-57 60-61 70-76"
{!> ../../../docs_src/security/tutorial004_an.py!}
@@ -136,7 +136,7 @@ And another one to authenticate and return a user.
{!> ../../../docs_src/security/tutorial004_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -188,7 +188,7 @@ Create a utility function to generate a new access token.
{!> ../../../docs_src/security/tutorial004_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="6 13-15 29-31 79-87"
{!> ../../../docs_src/security/tutorial004_an.py!}
@@ -203,7 +203,7 @@ Create a utility function to generate a new access token.
{!> ../../../docs_src/security/tutorial004_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -232,7 +232,7 @@ If the token is invalid, return an HTTP error right away.
{!> ../../../docs_src/security/tutorial004_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="90-107"
{!> ../../../docs_src/security/tutorial004_an.py!}
@@ -247,7 +247,7 @@ If the token is invalid, return an HTTP error right away.
{!> ../../../docs_src/security/tutorial004_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -274,7 +274,7 @@ Create a real JWT access token and return it
{!> ../../../docs_src/security/tutorial004_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="118-133"
{!> ../../../docs_src/security/tutorial004_an.py!}
@@ -285,16 +285,16 @@ Create a real JWT access token and return it
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="114-127"
+ ```Python hl_lines="114-129"
{!> ../../../docs_src/security/tutorial004_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
- ```Python hl_lines="115-128"
+ ```Python hl_lines="115-130"
{!> ../../../docs_src/security/tutorial004.py!}
```
@@ -318,7 +318,7 @@ In those cases, several of those entities could have the same ID, let's say `foo
So, to avoid ID collisions, when creating the JWT token for the user, you could prefix the value of the `sub` key, e.g. with `username:`. So, in this example, the value of `sub` could have been: `username:johndoe`.
-The important thing to have in mind is that the `sub` key should have a unique identifier across the entire application, and it should be a string.
+The important thing to keep in mind is that the `sub` key should have a unique identifier across the entire application, and it should be a string.
## Check it
diff --git a/docs/en/docs/tutorial/security/simple-oauth2.md b/docs/en/docs/tutorial/security/simple-oauth2.md
index abcf6b667c..88edc9eab9 100644
--- a/docs/en/docs/tutorial/security/simple-oauth2.md
+++ b/docs/en/docs/tutorial/security/simple-oauth2.md
@@ -61,7 +61,7 @@ First, import `OAuth2PasswordRequestForm`, and use it as a dependency with `Depe
{!> ../../../docs_src/security/tutorial003_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="4 79"
{!> ../../../docs_src/security/tutorial003_an.py!}
@@ -76,7 +76,7 @@ First, import `OAuth2PasswordRequestForm`, and use it as a dependency with `Depe
{!> ../../../docs_src/security/tutorial003_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -134,7 +134,7 @@ For the error, we use the exception `HTTPException`:
{!> ../../../docs_src/security/tutorial003_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="3 80-82"
{!> ../../../docs_src/security/tutorial003_an.py!}
@@ -149,7 +149,7 @@ For the error, we use the exception `HTTPException`:
{!> ../../../docs_src/security/tutorial003_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -194,7 +194,7 @@ So, the thief won't be able to try to use those same passwords in another system
{!> ../../../docs_src/security/tutorial003_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="83-86"
{!> ../../../docs_src/security/tutorial003_an.py!}
@@ -209,7 +209,7 @@ So, the thief won't be able to try to use those same passwords in another system
{!> ../../../docs_src/security/tutorial003_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -264,7 +264,7 @@ For this simple example, we are going to just be completely insecure and return
{!> ../../../docs_src/security/tutorial003_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="88"
{!> ../../../docs_src/security/tutorial003_an.py!}
@@ -279,7 +279,7 @@ For this simple example, we are going to just be completely insecure and return
{!> ../../../docs_src/security/tutorial003_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
@@ -321,7 +321,7 @@ So, in our endpoint, we will only get a user if the user exists, was correctly a
{!> ../../../docs_src/security/tutorial003_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="59-67 70-75 95"
{!> ../../../docs_src/security/tutorial003_an.py!}
@@ -336,7 +336,7 @@ So, in our endpoint, we will only get a user if the user exists, was correctly a
{!> ../../../docs_src/security/tutorial003_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
diff --git a/docs/en/docs/tutorial/sql-databases.md b/docs/en/docs/tutorial/sql-databases.md
index 6e0e5dc06e..70d9482df2 100644
--- a/docs/en/docs/tutorial/sql-databases.md
+++ b/docs/en/docs/tutorial/sql-databases.md
@@ -281,7 +281,7 @@ But for security, the `password` won't be in other Pydantic *models*, for exampl
{!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="3 6-8 11-12 23-24 27-28"
{!> ../../../docs_src/sql_databases/sql_app/schemas.py!}
@@ -301,7 +301,7 @@ while Pydantic *models* declare the types using `:`, the new type annotation syn
name: str
```
-Have it in mind, so you don't get confused when using `=` and `:` with them.
+Keep these in mind, so you don't get confused when using `=` and `:` with them.
### Create Pydantic *models* / schemas for reading / returning
@@ -325,7 +325,7 @@ Not only the IDs of those items, but all the data that we defined in the Pydanti
{!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="15-17 31-34"
{!> ../../../docs_src/sql_databases/sql_app/schemas.py!}
@@ -354,7 +354,7 @@ In the `Config` class, set the attribute `orm_mode = True`.
{!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="15 19-20 31 36-37"
{!> ../../../docs_src/sql_databases/sql_app/schemas.py!}
@@ -451,6 +451,11 @@ The steps are:
{!../../../docs_src/sql_databases/sql_app/crud.py!}
```
+!!! info
+ In Pydantic v1 the method was called `.dict()`, it was deprecated (but still supported) in Pydantic v2, and renamed to `.model_dump()`.
+
+ The examples here use `.dict()` for compatibility with Pydantic v1, but you should use `.model_dump()` instead if you can use Pydantic v2.
+
!!! tip
The SQLAlchemy model for `User` contains a `hashed_password` that should contain a secure hashed version of the password.
@@ -494,7 +499,7 @@ In a very simplistic way create the database tables:
{!> ../../../docs_src/sql_databases/sql_app_py39/main.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9"
{!> ../../../docs_src/sql_databases/sql_app/main.py!}
@@ -508,7 +513,7 @@ And you would also use Alembic for "migrations" (that's its main job).
A "migration" is the set of steps needed whenever you change the structure of your SQLAlchemy models, add a new attribute, etc. to replicate those changes in the database, add a new column, a new table, etc.
-You can find an example of Alembic in a FastAPI project in the templates from [Project Generation - Template](../project-generation.md){.internal-link target=_blank}. Specifically in the `alembic` directory in the source code.
+You can find an example of Alembic in a FastAPI project in the templates from [Project Generation - Template](../project-generation.md){.internal-link target=_blank}. Specifically in the `alembic` directory in the source code.
### Create a dependency
@@ -528,7 +533,7 @@ Our dependency will create a new SQLAlchemy `SessionLocal` that will be used in
{!> ../../../docs_src/sql_databases/sql_app_py39/main.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="15-20"
{!> ../../../docs_src/sql_databases/sql_app/main.py!}
@@ -553,7 +558,7 @@ This will then give us better editor support inside the *path operation function
{!> ../../../docs_src/sql_databases/sql_app_py39/main.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="24 32 38 47 53"
{!> ../../../docs_src/sql_databases/sql_app/main.py!}
@@ -574,7 +579,7 @@ Now, finally, here's the standard **FastAPI** *path operations* code.
{!> ../../../docs_src/sql_databases/sql_app_py39/main.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="23-28 31-34 37-42 45-49 52-55"
{!> ../../../docs_src/sql_databases/sql_app/main.py!}
@@ -624,7 +629,7 @@ def read_user(user_id: int, db: Session = Depends(get_db)):
```
!!! info
- If you need to connect to your relational database asynchronously, see [Async SQL (Relational) Databases](../advanced/async-sql-databases.md){.internal-link target=_blank}.
+ If you need to connect to your relational database asynchronously, see [Async SQL (Relational) Databases](../how-to/async-sql-encode-databases.md){.internal-link target=_blank}.
!!! note "Very Technical Details"
If you are curious and have a deep technical knowledge, you can check the very technical details of how this `async def` vs `def` is handled in the [Async](../async.md#very-technical-details){.internal-link target=_blank} docs.
@@ -673,7 +678,7 @@ For example, in a background task worker with ../../../docs_src/sql_databases/sql_app_py39/schemas.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python
{!> ../../../docs_src/sql_databases/sql_app/schemas.py!}
@@ -693,7 +698,7 @@ For example, in a background task worker with ../../../docs_src/sql_databases/sql_app_py39/main.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python
{!> ../../../docs_src/sql_databases/sql_app/main.py!}
@@ -752,7 +757,7 @@ The middleware we'll add (just a function) will create a new SQLAlchemy `Session
{!> ../../../docs_src/sql_databases/sql_app_py39/alt_main.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="14-22"
{!> ../../../docs_src/sql_databases/sql_app/alt_main.py!}
diff --git a/docs/en/docs/tutorial/static-files.md b/docs/en/docs/tutorial/static-files.md
index 7a0c36af3f..311d2b1c8d 100644
--- a/docs/en/docs/tutorial/static-files.md
+++ b/docs/en/docs/tutorial/static-files.md
@@ -22,7 +22,7 @@ You can serve static files automatically from a directory using `StaticFiles`.
This is different from using an `APIRouter` as a mounted application is completely independent. The OpenAPI and docs from your main application won't include anything from the mounted application, etc.
-You can read more about this in the **Advanced User Guide**.
+You can read more about this in the [Advanced User Guide](../advanced/index.md){.internal-link target=_blank}.
## Details
diff --git a/docs/en/docs/tutorial/testing.md b/docs/en/docs/tutorial/testing.md
index ec133a4d08..3f8dd69a1d 100644
--- a/docs/en/docs/tutorial/testing.md
+++ b/docs/en/docs/tutorial/testing.md
@@ -122,7 +122,7 @@ Both *path operations* require an `X-Token` header.
{!> ../../../docs_src/app_testing/app_b_an_py39/main.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python
{!> ../../../docs_src/app_testing/app_b_an/main.py!}
@@ -137,7 +137,7 @@ Both *path operations* require an `X-Token` header.
{!> ../../../docs_src/app_testing/app_b_py310/main.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Prefer to use the `Annotated` version if possible.
diff --git a/docs/en/mkdocs.yml b/docs/en/mkdocs.yml
index 4c4fe6b02e..92d081aa12 100644
--- a/docs/en/mkdocs.yml
+++ b/docs/en/mkdocs.yml
@@ -30,6 +30,7 @@ theme:
- content.code.annotate
- content.code.copy
- content.code.select
+ - navigation.tabs
icon:
repo: fontawesome/brands/github-alt
logo: img/icon-white.svg
@@ -42,135 +43,187 @@ plugins:
search: null
markdownextradata:
data: ../en/data
+ redirects:
+ redirect_maps:
+ deployment/deta.md: deployment/cloud.md
+ advanced/sql-databases-peewee.md: how-to/sql-databases-peewee.md
+ advanced/async-sql-databases.md: how-to/async-sql-encode-databases.md
+ advanced/nosql-databases.md: how-to/nosql-databases-couchbase.md
+ advanced/graphql.md: how-to/graphql.md
+ advanced/custom-request-and-route.md: how-to/custom-request-and-route.md
+ advanced/conditional-openapi.md: how-to/conditional-openapi.md
+ advanced/extending-openapi.md: how-to/extending-openapi.md
+ mkdocstrings:
+ handlers:
+ python:
+ options:
+ extensions:
+ - griffe_typingdoc
+ show_root_heading: true
+ show_if_no_docstring: true
+ preload_modules:
+ - httpx
+ - starlette
+ inherited_members: true
+ members_order: source
+ separate_signature: true
+ unwrap_annotated: true
+ filters:
+ - '!^_'
+ merge_init_into_class: true
+ docstring_section_style: spacy
+ signature_crossrefs: true
+ show_symbol_type_heading: true
+ show_symbol_type_toc: true
nav:
- FastAPI: index.md
-- Languages:
- - en: /
- - de: /de/
- - em: /em/
- - es: /es/
- - fa: /fa/
- - fr: /fr/
- - he: /he/
- - hu: /hu/
- - id: /id/
- - ja: /ja/
- - ko: /ko/
- - pl: /pl/
- - pt: /pt/
- - ru: /ru/
- - tr: /tr/
- - uk: /uk/
- - vi: /vi/
- - zh: /zh/
- features.md
+- Learn:
+ - learn/index.md
+ - python-types.md
+ - async.md
+ - Tutorial - User Guide:
+ - tutorial/index.md
+ - tutorial/first-steps.md
+ - tutorial/path-params.md
+ - tutorial/query-params.md
+ - tutorial/body.md
+ - tutorial/query-params-str-validations.md
+ - tutorial/path-params-numeric-validations.md
+ - tutorial/body-multiple-params.md
+ - tutorial/body-fields.md
+ - tutorial/body-nested-models.md
+ - tutorial/schema-extra-example.md
+ - tutorial/extra-data-types.md
+ - tutorial/cookie-params.md
+ - tutorial/header-params.md
+ - tutorial/response-model.md
+ - tutorial/extra-models.md
+ - tutorial/response-status-code.md
+ - tutorial/request-forms.md
+ - tutorial/request-files.md
+ - tutorial/request-forms-and-files.md
+ - tutorial/handling-errors.md
+ - tutorial/path-operation-configuration.md
+ - tutorial/encoder.md
+ - tutorial/body-updates.md
+ - Dependencies:
+ - tutorial/dependencies/index.md
+ - tutorial/dependencies/classes-as-dependencies.md
+ - tutorial/dependencies/sub-dependencies.md
+ - tutorial/dependencies/dependencies-in-path-operation-decorators.md
+ - tutorial/dependencies/global-dependencies.md
+ - tutorial/dependencies/dependencies-with-yield.md
+ - Security:
+ - tutorial/security/index.md
+ - tutorial/security/first-steps.md
+ - tutorial/security/get-current-user.md
+ - tutorial/security/simple-oauth2.md
+ - tutorial/security/oauth2-jwt.md
+ - tutorial/middleware.md
+ - tutorial/cors.md
+ - tutorial/sql-databases.md
+ - tutorial/bigger-applications.md
+ - tutorial/background-tasks.md
+ - tutorial/metadata.md
+ - tutorial/static-files.md
+ - tutorial/testing.md
+ - tutorial/debugging.md
+ - Advanced User Guide:
+ - advanced/index.md
+ - advanced/path-operation-advanced-configuration.md
+ - advanced/additional-status-codes.md
+ - advanced/response-directly.md
+ - advanced/custom-response.md
+ - advanced/additional-responses.md
+ - advanced/response-cookies.md
+ - advanced/response-headers.md
+ - advanced/response-change-status-code.md
+ - advanced/advanced-dependencies.md
+ - Advanced Security:
+ - advanced/security/index.md
+ - advanced/security/oauth2-scopes.md
+ - advanced/security/http-basic-auth.md
+ - advanced/using-request-directly.md
+ - advanced/dataclasses.md
+ - advanced/middleware.md
+ - advanced/sub-applications.md
+ - advanced/behind-a-proxy.md
+ - advanced/templates.md
+ - advanced/websockets.md
+ - advanced/events.md
+ - advanced/testing-websockets.md
+ - advanced/testing-events.md
+ - advanced/testing-dependencies.md
+ - advanced/testing-database.md
+ - advanced/async-tests.md
+ - advanced/settings.md
+ - advanced/openapi-callbacks.md
+ - advanced/openapi-webhooks.md
+ - advanced/wsgi.md
+ - advanced/generate-clients.md
+ - Deployment:
+ - deployment/index.md
+ - deployment/versions.md
+ - deployment/https.md
+ - deployment/manually.md
+ - deployment/concepts.md
+ - deployment/cloud.md
+ - deployment/server-workers.md
+ - deployment/docker.md
+ - How To - Recipes:
+ - how-to/index.md
+ - how-to/general.md
+ - how-to/sql-databases-peewee.md
+ - how-to/async-sql-encode-databases.md
+ - how-to/nosql-databases-couchbase.md
+ - how-to/graphql.md
+ - how-to/custom-request-and-route.md
+ - how-to/conditional-openapi.md
+ - how-to/extending-openapi.md
+ - how-to/separate-openapi-schemas.md
+ - how-to/custom-docs-ui-assets.md
+ - how-to/configure-swagger-ui.md
+- Reference (Code API):
+ - reference/index.md
+ - reference/fastapi.md
+ - reference/parameters.md
+ - reference/status.md
+ - reference/uploadfile.md
+ - reference/exceptions.md
+ - reference/dependencies.md
+ - reference/apirouter.md
+ - reference/background.md
+ - reference/request.md
+ - reference/websockets.md
+ - reference/httpconnection.md
+ - reference/response.md
+ - reference/responses.md
+ - reference/middleware.md
+ - OpenAPI:
+ - reference/openapi/index.md
+ - reference/openapi/docs.md
+ - reference/openapi/models.md
+ - reference/security/index.md
+ - reference/encoders.md
+ - reference/staticfiles.md
+ - reference/templating.md
+ - reference/testclient.md
- fastapi-people.md
-- python-types.md
-- Tutorial - User Guide:
- - tutorial/index.md
- - tutorial/first-steps.md
- - tutorial/path-params.md
- - tutorial/query-params.md
- - tutorial/body.md
- - tutorial/query-params-str-validations.md
- - tutorial/path-params-numeric-validations.md
- - tutorial/body-multiple-params.md
- - tutorial/body-fields.md
- - tutorial/body-nested-models.md
- - tutorial/schema-extra-example.md
- - tutorial/extra-data-types.md
- - tutorial/cookie-params.md
- - tutorial/header-params.md
- - tutorial/response-model.md
- - tutorial/extra-models.md
- - tutorial/response-status-code.md
- - tutorial/request-forms.md
- - tutorial/request-files.md
- - tutorial/request-forms-and-files.md
- - tutorial/handling-errors.md
- - tutorial/path-operation-configuration.md
- - tutorial/encoder.md
- - tutorial/body-updates.md
- - Dependencies:
- - tutorial/dependencies/index.md
- - tutorial/dependencies/classes-as-dependencies.md
- - tutorial/dependencies/sub-dependencies.md
- - tutorial/dependencies/dependencies-in-path-operation-decorators.md
- - tutorial/dependencies/global-dependencies.md
- - tutorial/dependencies/dependencies-with-yield.md
- - Security:
- - tutorial/security/index.md
- - tutorial/security/first-steps.md
- - tutorial/security/get-current-user.md
- - tutorial/security/simple-oauth2.md
- - tutorial/security/oauth2-jwt.md
- - tutorial/middleware.md
- - tutorial/cors.md
- - tutorial/sql-databases.md
- - tutorial/bigger-applications.md
- - tutorial/background-tasks.md
- - tutorial/metadata.md
- - tutorial/static-files.md
- - tutorial/testing.md
- - tutorial/debugging.md
-- Advanced User Guide:
- - advanced/index.md
- - advanced/path-operation-advanced-configuration.md
- - advanced/additional-status-codes.md
- - advanced/response-directly.md
- - advanced/custom-response.md
- - advanced/additional-responses.md
- - advanced/response-cookies.md
- - advanced/response-headers.md
- - advanced/response-change-status-code.md
- - advanced/advanced-dependencies.md
- - Advanced Security:
- - advanced/security/index.md
- - advanced/security/oauth2-scopes.md
- - advanced/security/http-basic-auth.md
- - advanced/using-request-directly.md
- - advanced/dataclasses.md
- - advanced/middleware.md
- - advanced/sql-databases-peewee.md
- - advanced/async-sql-databases.md
- - advanced/nosql-databases.md
- - advanced/sub-applications.md
- - advanced/behind-a-proxy.md
- - advanced/templates.md
- - advanced/graphql.md
- - advanced/websockets.md
- - advanced/events.md
- - advanced/custom-request-and-route.md
- - advanced/testing-websockets.md
- - advanced/testing-events.md
- - advanced/testing-dependencies.md
- - advanced/testing-database.md
- - advanced/async-tests.md
- - advanced/settings.md
- - advanced/conditional-openapi.md
- - advanced/extending-openapi.md
- - advanced/openapi-callbacks.md
- - advanced/openapi-webhooks.md
- - advanced/wsgi.md
- - advanced/generate-clients.md
-- async.md
-- Deployment:
- - deployment/index.md
- - deployment/versions.md
- - deployment/https.md
- - deployment/manually.md
- - deployment/concepts.md
- - deployment/deta.md
- - deployment/server-workers.md
- - deployment/docker.md
-- project-generation.md
-- alternatives.md
-- history-design-future.md
-- external-links.md
-- benchmarks.md
-- help-fastapi.md
-- newsletter.md
-- contributing.md
+- Resources:
+ - resources/index.md
+ - project-generation.md
+ - external-links.md
+ - newsletter.md
+- About:
+ - about/index.md
+ - alternatives.md
+ - history-design-future.md
+ - benchmarks.md
+- Help:
+ - help/index.md
+ - help-fastapi.md
+ - contributing.md
- release-notes.md
markdown_extensions:
toc:
@@ -214,27 +267,25 @@ extra:
- link: /
name: en - English
- link: /de/
- name: de
- - link: /em/
- name: 😉
+ name: de - Deutsch
- link: /es/
name: es - español
- link: /fa/
- name: fa
+ name: fa - فارسی
- link: /fr/
name: fr - français
- link: /he/
- name: he
+ name: he - עברית
- link: /hu/
- name: hu
+ name: hu - magyar
- link: /id/
- name: id
+ name: id - Bahasa Indonesia
- link: /ja/
name: ja - 日本語
- link: /ko/
name: ko - 한국어
- link: /pl/
- name: pl
+ name: pl - Polski
- link: /pt/
name: pt - português
- link: /ru/
@@ -242,11 +293,17 @@ extra:
- link: /tr/
name: tr - Türkçe
- link: /uk/
- name: uk
+ name: uk - українська мова
+ - link: /ur/
+ name: ur - اردو
- link: /vi/
name: vi - Tiếng Việt
+ - link: /yo/
+ name: yo - Yorùbá
- link: /zh/
name: zh - 汉语
+ - link: /em/
+ name: 😉
extra_css:
- css/termynal.css
- css/custom.css
diff --git a/docs/en/overrides/main.html b/docs/en/overrides/main.html
index 983d7eb3e7..476b436767 100644
--- a/docs/en/overrides/main.html
+++ b/docs/en/overrides/main.html
@@ -34,18 +34,36 @@
-
+
+
+
+
-
-## Activer l'accès public
-
-Par défaut, Deta va gérer l'authentification en utilisant des cookies pour votre compte.
-
-Mais une fois que vous êtes prêt, vous pouvez le rendre public avec :
-
-
-
-## En savoir plus
-
-À un moment donné, vous voudrez probablement stocker certaines données pour votre application d'une manière qui
-persiste dans le temps. Pour cela, vous pouvez utiliser Deta Base, il dispose également d'un généreux **plan gratuit**.
-
-Vous pouvez également en lire plus dans la documentation Deta.
diff --git a/docs/fr/docs/external-links.md b/docs/fr/docs/external-links.md
index 002e6d2b21..37b8c5b139 100644
--- a/docs/fr/docs/external-links.md
+++ b/docs/fr/docs/external-links.md
@@ -9,70 +9,21 @@ Voici une liste incomplète de certains d'entre eux.
!!! tip "Astuce"
Si vous avez un article, projet, outil, ou quoi que ce soit lié à **FastAPI** qui n'est actuellement pas listé ici, créez une Pull Request l'ajoutant.
-## Articles
+{% for section_name, section_content in external_links.items() %}
-### Anglais
+## {{ section_name }}
-{% if external_links %}
-{% for article in external_links.articles.english %}
+{% for lang_name, lang_content in section_content.items() %}
+
+### {{ lang_name }}
+
+{% for item in lang_content %}
+
+* {{ item.title }} by {{ item.author }}.
-* {{ article.title }} par {{ article.author }}.
{% endfor %}
-{% endif %}
-
-### Japonais
-
-{% if external_links %}
-{% for article in external_links.articles.japanese %}
-
-* {{ article.title }} par {{ article.author }}.
{% endfor %}
-{% endif %}
-
-### Vietnamien
-
-{% if external_links %}
-{% for article in external_links.articles.vietnamese %}
-
-* {{ article.title }} par {{ article.author }}.
{% endfor %}
-{% endif %}
-
-### Russe
-
-{% if external_links %}
-{% for article in external_links.articles.russian %}
-
-* {{ article.title }} par {{ article.author }}.
-{% endfor %}
-{% endif %}
-
-### Allemand
-
-{% if external_links %}
-{% for article in external_links.articles.german %}
-
-* {{ article.title }} par {{ article.author }}.
-{% endfor %}
-{% endif %}
-
-## Podcasts
-
-{% if external_links %}
-{% for article in external_links.podcasts.english %}
-
-* {{ article.title }} par {{ article.author }}.
-{% endfor %}
-{% endif %}
-
-## Conférences
-
-{% if external_links %}
-{% for article in external_links.talks.english %}
-
-* {{ article.title }} par {{ article.author }}.
-{% endfor %}
-{% endif %}
## Projets
diff --git a/docs/fr/docs/features.md b/docs/fr/docs/features.md
index dcc0e39ed7..0c1f6269a0 100644
--- a/docs/fr/docs/features.md
+++ b/docs/fr/docs/features.md
@@ -25,7 +25,7 @@ Documentation d'API interactive et interface web d'exploration. Comme le framewo
### Faite en python moderne
-Tout est basé sur la déclaration de type standard de **Python 3.6** (grâce à Pydantic). Pas de nouvelles syntaxes à apprendre. Juste du Python standard et moderne.
+Tout est basé sur la déclaration de type standard de **Python 3.8** (grâce à Pydantic). Pas de nouvelles syntaxes à apprendre. Juste du Python standard et moderne.
Si vous souhaitez un rappel de 2 minutes sur l'utilisation des types en Python (même si vous ne comptez pas utiliser FastAPI), jetez un oeil au tutoriel suivant: [Python Types](python-types.md){.internal-link target=_blank}.
@@ -71,9 +71,9 @@ my_second_user: User = User(**second_user_data)
Tout le framework a été conçu pour être facile et intuitif d'utilisation, toutes les décisions de design ont été testées sur de nombreux éditeurs avant même de commencer le développement final afin d'assurer la meilleure expérience de développement possible.
-Dans le dernier sondage effectué auprès de développeurs python il était clair que la fonctionnalité la plus utilisée est "l'autocomplètion".
+Dans le dernier sondage effectué auprès de développeurs python il était clair que la fonctionnalité la plus utilisée est "l’autocomplétion".
-Tout le framwork **FastAPI** a été conçu avec cela en tête. L'autocomplétion fonctionne partout.
+Tout le framework **FastAPI** a été conçu avec cela en tête. L'autocomplétion fonctionne partout.
Vous devrez rarement revenir à la documentation.
@@ -136,7 +136,7 @@ FastAPI contient un système simple mais extrêmement puissant d'Starlette. Le code utilisant Starlette que vous ajouterez fonctionnera donc aussi.
-En fait, `FastAPI` est un sous compposant de `Starlette`. Donc, si vous savez déjà comment utiliser Starlette, la plupart des fonctionnalités fonctionneront de la même manière.
+En fait, `FastAPI` est un sous composant de `Starlette`. Donc, si vous savez déjà comment utiliser Starlette, la plupart des fonctionnalités fonctionneront de la même manière.
Avec **FastAPI** vous aurez toutes les fonctionnalités de **Starlette** (FastAPI est juste Starlette sous stéroïdes):
-* Des performances vraiments impressionnantes. C'est l'un des framework Python les plus rapide, à égalité avec **NodeJS** et **GO**.
+* Des performances vraiment impressionnantes. C'est l'un des framework Python les plus rapide, à égalité avec **NodeJS** et **GO**.
* Le support des **WebSockets**.
* Le support de **GraphQL**.
* Les tâches d'arrière-plan.
@@ -180,7 +180,7 @@ Inclus des librairies externes basées, aussi, sur Pydantic, servent d' décorateur de validation
* 100% de couverture de test.
diff --git a/docs/fr/docs/help-fastapi.md b/docs/fr/docs/help-fastapi.md
index 0995721e1e..525c699f5f 100644
--- a/docs/fr/docs/help-fastapi.md
+++ b/docs/fr/docs/help-fastapi.md
@@ -36,8 +36,8 @@ Vous pouvez :
* Me suivre sur **Twitter**.
* Dites-moi comment vous utilisez FastAPI (j'adore entendre ça).
* Entendre quand je fais des annonces ou que je lance de nouveaux outils.
-* Vous connectez à moi sur **Linkedin**.
- * Etre notifié quand je fais des annonces ou que je lance de nouveaux outils (bien que j'utilise plus souvent Twitte 🤷♂).
+* Vous connectez à moi sur **LinkedIn**.
+ * Etre notifié quand je fais des annonces ou que je lance de nouveaux outils (bien que j'utilise plus souvent Twitter 🤷♂).
* Lire ce que j’écris (ou me suivre) sur **Dev.to** ou **Medium**.
* Lire d'autres idées, articles, et sur les outils que j'ai créés.
* Suivez-moi pour lire quand je publie quelque chose de nouveau.
@@ -84,24 +84,6 @@ Vous pouvez
- requests - Obligatoire si vous souhaitez utiliser `TestClient`.
-* jinja2 - Obligatoire si vous souhaitez utiliser la configuration de template par defaut.
+* jinja2 - Obligatoire si vous souhaitez utiliser la configuration de template par défaut.
* 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).
diff --git a/docs/fr/docs/python-types.md b/docs/fr/docs/python-types.md
index 4008ed96fc..f49fbafd36 100644
--- a/docs/fr/docs/python-types.md
+++ b/docs/fr/docs/python-types.md
@@ -119,7 +119,7 @@ Comme l'éditeur connaît le type des variables, vous n'avez pas seulement l'aut
-Maintenant que vous avez connaissance du problème, convertissez `age` en chaine de caractères grâce à `str(age)` :
+Maintenant que vous avez connaissance du problème, convertissez `age` en chaîne de caractères grâce à `str(age)` :
```Python hl_lines="2"
{!../../../docs_src/python_types/tutorial004.py!}
diff --git a/docs/fr/docs/tutorial/body.md b/docs/fr/docs/tutorial/body.md
index 1e732d3364..89720c973a 100644
--- a/docs/fr/docs/tutorial/body.md
+++ b/docs/fr/docs/tutorial/body.md
@@ -98,7 +98,7 @@ Et vous obtenez aussi de la vérification d'erreur pour les opérations incorrec
-Ce n'est pas un hasard, ce framework entier a été bati avec ce design comme objectif.
+Ce n'est pas un hasard, ce framework entier a été bâti avec ce design comme objectif.
Et cela a été rigoureusement testé durant la phase de design, avant toute implémentation, pour s'assurer que cela fonctionnerait avec tous les éditeurs.
diff --git a/docs/fr/docs/tutorial/first-steps.md b/docs/fr/docs/tutorial/first-steps.md
index 224c340c66..e98283f1e2 100644
--- a/docs/fr/docs/tutorial/first-steps.md
+++ b/docs/fr/docs/tutorial/first-steps.md
@@ -170,7 +170,7 @@ Si vous créez votre app avec :
{!../../../docs_src/first_steps/tutorial002.py!}
```
-Et la mettez dans un fichier `main.py`, alors vous appeleriez `uvicorn` avec :
+Et la mettez dans un fichier `main.py`, alors vous appelleriez `uvicorn` avec :
+ FastAPI keretrendszer, nagy teljesítmény, könnyen tanulható, gyorsan kódolható, productionre kész +
+ + +--- + +**Dokumentáció**: https://fastapi.tiangolo.com + +**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. + + +Kulcs funkciók: + +* **Gyors**: Nagyon nagy teljesítmény, a **NodeJS**-el és a **Go**-val egyenrangú (a Starlettenek és a Pydantic-nek köszönhetően). [Az egyik leggyorsabb Python keretrendszer](#performance). +* **Gyorsan kódolható**: A funkciók fejlesztési sebességét 200-300 százalékkal megnöveli. * +* **Kevesebb hiba**: Körülbelül 40%-al csökkenti az emberi (fejlesztői) hibák számát. * +* **Intuitív**: Kiváló szerkesztő támogatás. Kiegészítés mindenhol. Kevesebb hibakereséssel töltött idő. +* **Egyszerű**: Egyszerű tanulásra és használatra tervezve. Kevesebb dokumentáció olvasással töltött idő. +* **Rövid**: Kód duplikáció minimalizálása. Több funkció minden paraméter deklarálásával. Kevesebb hiba. +* **Robosztus**: Production ready kód. Automatikus interaktív dokumentáció val. +* **Szabvány alapú**: Az API-ok nyílt szabványaira alapuló (és azokkal teljesen kompatibilis): OpenAPI (korábban Swagger néven ismert) és a JSON Schema. + +* Egy production alkalmazásokat építő belső fejlesztői csapat tesztjein alapuló becslés. + +## Szponzorok + + + +{% if sponsors %} +{% for sponsor in sponsors.gold -%} +async def-et...uvicorn main:app --reload...email_validator - e-mail validációkra.
+* pydantic-settings - Beállítások követésére.
+* pydantic-extra-types - Extra típusok Pydantic-hoz.
+
+Starlette által használt:
+
+* httpx - Követelmény ha a `TestClient`-et akarod használni.
+* jinja2 - Követelmény ha az alap template konfigurációt akarod használni.
+* 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.
+
+Ezeket mind telepítheted a `pip install "fastapi[all]"` paranccsal.
+
+## Licensz
+Ez a projekt az MIT license, licensz alatt fut
diff --git a/docs/ja/docs/deployment/deta.md b/docs/ja/docs/deployment/deta.md
deleted file mode 100644
index 723f169a00..0000000000
--- a/docs/ja/docs/deployment/deta.md
+++ /dev/null
@@ -1,240 +0,0 @@
-# Deta にデプロイ
-
-このセクションでは、**FastAPI** アプリケーションを Deta の無料プランを利用して、簡単にデプロイする方法を学習します。🎁
-
-所要時間は約**10分**です。
-
-!!! info "備考"
- Deta は **FastAPI** のスポンサーです。🎉
-
-## ベーシックな **FastAPI** アプリ
-
-* アプリのためのディレクトリ (例えば `./fastapideta/`) を作成し、その中に入ってください。
-
-### FastAPI のコード
-
-* 以下の `main.py` ファイルを作成してください:
-
-```Python
-from fastapi import FastAPI
-
-app = FastAPI()
-
-
-@app.get("/")
-def read_root():
- return {"Hello": "World"}
-
-
-@app.get("/items/{item_id}")
-def read_item(item_id: int):
- return {"item_id": item_id}
-```
-
-### Requirements
-
-では、同じディレクトリに以下の `requirements.txt` ファイルを作成してください:
-
-```text
-fastapi
-```
-
-!!! tip "豆知識"
- アプリのローカルテストのために Uvicorn をインストールしたくなるかもしれませんが、Deta へのデプロイには不要です。
-
-### ディレクトリ構造
-
-以下の2つのファイルと1つの `./fastapideta/` ディレクトリがあるはずです:
-
-```
-.
-└── main.py
-└── requirements.txt
-```
-
-## Detaの無料アカウントの作成
-
-それでは、Detaの無料アカウントを作成しましょう。必要なものはメールアドレスとパスワードだけです。
-
-クレジットカードさえ必要ありません。
-
-## CLIのインストール
-
-アカウントを取得したら、Deta CLI をインストールしてください:
-
-=== "Linux, macOS"
-
-
-
-## パブリックアクセスの有効化
-
-デフォルトでは、Deta はクッキーを用いてアカウントの認証を行います。
-
-しかし、準備が整えば、以下の様に公開できます:
-
-
-
-## さらに詳しく知る
-
-様々な箇所で永続的にデータを保存したくなるでしょう。そのためには Deta Base を使用できます。惜しみない **無料利用枠** もあります。
-
-詳しくは Deta ドキュメントを参照してください。
diff --git a/docs/ja/docs/deployment/https.md b/docs/ja/docs/deployment/https.md
new file mode 100644
index 0000000000..a291f870fd
--- /dev/null
+++ b/docs/ja/docs/deployment/https.md
@@ -0,0 +1,200 @@
+# HTTPS について
+
+HTTPSは単に「有効」か「無効」かで決まるものだと思いがちです。
+
+しかし、それよりもはるかに複雑です。
+
+!!! tip
+ もし急いでいたり、HTTPSの仕組みについて気にしないのであれば、次のセクションに進み、さまざまなテクニックを使ってすべてをセットアップするステップ・バイ・ステップの手順をご覧ください。
+
+利用者の視点から **HTTPS の基本を学ぶ**に当たっては、次のリソースをオススメします: https://howhttps.works/.
+
+さて、**開発者の視点**から、HTTPSについて考える際に念頭に置くべきことをいくつかみていきましょう:
+
+* HTTPSの場合、**サーバ**は**第三者**によって生成された**「証明書」を持つ**必要があります。
+ * これらの証明書は「生成」されたものではなく、実際には第三者から**取得**されたものです。
+* 証明書には**有効期限**があります。
+ * つまりいずれ失効します。
+ * そのため**更新**をし、第三者から**再度取得**する必要があります。
+* 接続の暗号化は**TCPレベル**で行われます。
+ * それは**HTTPの1つ下**のレイヤーです。
+ * つまり、**証明書と暗号化**の処理は、**HTTPの前**に行われます。
+* **TCPは "ドメイン "について知りません**。IPアドレスについてのみ知っています。
+ * 要求された**特定のドメイン**に関する情報は、**HTTPデータ**に入ります。
+* **HTTPS証明書**は、**特定のドメイン**を「証明」しますが、プロトコルと暗号化はTCPレベルで行われ、どのドメインが扱われているかを**知る前**に行われます。
+* **デフォルトでは**、**IPアドレスごとに1つのHTTPS証明書**しか持てないことになります。
+ * これは、サーバーの規模やアプリケーションの規模に寄りません。
+ * しかし、これには**解決策**があります。
+* **TLS**プロトコル(HTTPの前に、TCPレベルで暗号化を処理するもの)には、**SNI**と呼ばれる**拡張**があります。
+ * このSNI拡張機能により、1つのサーバー(**単一のIPアドレス**を持つ)が**複数のHTTPS証明書**を持ち、**複数のHTTPSドメイン/アプリケーション**にサービスを提供できるようになります。
+ * これが機能するためには、**パブリックIPアドレス**でリッスンしている、サーバー上で動作している**単一の**コンポーネント(プログラム)が、サーバー内の**すべてのHTTPS証明書**を持っている必要があります。
+
+* セキュアな接続を取得した**後**でも、通信プロトコルは**HTTPのまま**です。
+ * コンテンツは**HTTPプロトコル**で送信されているにもかかわらず、**暗号化**されています。
+
+
+サーバー(マシン、ホストなど)上で**1つのプログラム/HTTPサーバー**を実行させ、**HTTPSに関する全てのこと**を管理するのが一般的です。
+
+**暗号化された HTTPS リクエスト** を受信し、**復号化された HTTP リクエスト** を同じサーバーで実行されている実際の HTTP アプリケーション(この場合は **FastAPI** アプリケーション)に送信し、アプリケーションから **HTTP レスポンス** を受け取り、適切な **HTTPS 証明書** を使用して **暗号化** し、そして**HTTPS** を使用してクライアントに送り返します。
+
+このサーバーはしばしば **TLS Termination Proxy**と呼ばれます。
+
+TLS Termination Proxyとして使えるオプションには、以下のようなものがあります:
+
+* Traefik(証明書の更新も対応)
+* Caddy (証明書の更新も対応)
+* Nginx
+* HAProxy
+
+
+## Let's Encrypt
+
+Let's Encrypt以前は、これらの**HTTPS証明書**は信頼できる第三者によって販売されていました。
+
+これらの証明書を取得するための手続きは面倒で、かなりの書類を必要とし、証明書はかなり高価なものでした。
+
+しかしその後、**Let's Encrypt** が作られました。
+
+これはLinux Foundationのプロジェクトから生まれたものです。 自動化された方法で、**HTTPS証明書を無料で**提供します。これらの証明書は、すべての標準的な暗号化セキュリティを使用し、また短命(約3ヶ月)ですが、こういった寿命の短さによって、**セキュリティは実際に優れています**。
+
+ドメインは安全に検証され、証明書は自動的に生成されます。また、証明書の更新も自動化されます。
+
+このアイデアは、これらの証明書の取得と更新を自動化することで、**安全なHTTPSを、無料で、永遠に**利用できるようにすることです。
+
+## 開発者のための HTTPS
+
+ここでは、HTTPS APIがどのように見えるかの例を、主に開発者にとって重要なアイデアに注意を払いながら、ステップ・バイ・ステップで説明します。
+
+### ドメイン名
+
+ステップの初めは、**ドメイン名**を**取得すること**から始まるでしょう。その後、DNSサーバー(おそらく同じクラウドプロバイダー)に設定します。
+
+おそらくクラウドサーバー(仮想マシン)かそれに類するものを手に入れ、固定の **パブリックIPアドレス**を持つことになるでしょう。
+
+DNSサーバーでは、**取得したドメイン**をあなたのサーバーのパプリック**IPアドレス**に向けるレコード(「`Aレコード`」)を設定します。
+
+これはおそらく、最初の1回だけあり、すべてをセットアップするときに行うでしょう。
+
+!!! tip
+ ドメイン名の話はHTTPSに関する話のはるか前にありますが、すべてがドメインとIPアドレスに依存するため、ここで言及する価値があります。
+
+### DNS
+
+では、実際のHTTPSの部分に注目してみよう。
+
+まず、ブラウザは**DNSサーバー**に**ドメインに対するIP**が何であるかを確認します。今回は、`someapp.example.com`とします。
+
+DNSサーバーは、ブラウザに特定の**IPアドレス**を使用するように指示します。このIPアドレスは、DNSサーバーで設定した、あなたのサーバーが使用するパブリックIPアドレスになります。
+
+
+
+### 型の追加
+
+先ほどのコードから一行変更してみましょう。
+
+以下の関数のパラメータ部分を:
+
+```Python
+ first_name, last_name
+```
+
+以下へ変更します:
+
+```Python
+ first_name: str, last_name: str
+```
+
+これだけです。
+
+それが「型ヒント」です:
+
+```Python hl_lines="1"
+{!../../../docs_src/python_types/tutorial002.py!}
+```
+
+これは、以下のようにデフォルト値を宣言するのと同じではありません:
+
+```Python
+ first_name="john", last_name="doe"
+```
+
+それとは別物です。
+
+イコール(`=`)ではなく、コロン(`:`)を使用します。
+
+そして、通常、型ヒントを追加しても、それらがない状態と起こることは何も変わりません。
+
+しかし今、あなたが再びその関数を作成している最中に、型ヒントを使っていると想像してみて下さい。
+
+同じタイミングで`Ctrl+Space`で自動補完を実行すると、以下のようになります:
+
+
+
+これであれば、あなたは「ベルを鳴らす」一つを見つけるまで、オプションを見て、スクロールすることができます:
+
+
+
+## より強い動機
+
+この関数を見てください。すでに型ヒントを持っています:
+
+```Python hl_lines="1"
+{!../../../docs_src/python_types/tutorial003.py!}
+```
+
+エディタは変数の型を知っているので、補完だけでなく、エラーチェックをすることもできます。
+
+
+
+これで`age`を`str(age)`で文字列に変換して修正する必要があることがわかります:
+
+```Python hl_lines="2"
+{!../../../docs_src/python_types/tutorial004.py!}
+```
+
+## 型の宣言
+
+関数のパラメータとして、型ヒントを宣言している主な場所を確認しました。
+
+これは **FastAPI** で使用する主な場所でもあります。
+
+### 単純な型
+
+`str`だけでなく、Pythonの標準的な型すべてを宣言することができます。
+
+例えば、以下を使用可能です:
+
+* `int`
+* `float`
+* `bool`
+* `bytes`
+
+```Python hl_lines="1"
+{!../../../docs_src/python_types/tutorial005.py!}
+```
+
+### 型パラメータを持つジェネリック型
+
+データ構造の中には、`dict`、`list`、`set`、そして`tuple`のように他の値を含むことができるものがあります。また内部の値も独自の型を持つことができます。
+
+これらの型や内部の型を宣言するには、Pythonの標準モジュール`typing`を使用します。
+
+これらの型ヒントをサポートするために特別に存在しています。
+
+#### `List`
+
+例えば、`str`の`list`の変数を定義してみましょう。
+
+`typing`から`List`をインポートします(大文字の`L`を含む):
+
+```Python hl_lines="1"
+{!../../../docs_src/python_types/tutorial006.py!}
+```
+
+同じようにコロン(`:`)の構文で変数を宣言します。
+
+型として、`List`を入力します。
+
+リストはいくつかの内部の型を含む型なので、それらを角括弧で囲んでいます。
+
+```Python hl_lines="4"
+{!../../../docs_src/python_types/tutorial006.py!}
+```
+
+!!! tip "豆知識"
+ 角括弧内の内部の型は「型パラメータ」と呼ばれています。
+
+ この場合、`str`は`List`に渡される型パラメータです。
+
+つまり: 変数`items`は`list`であり、このリストの各項目は`str`です。
+
+そうすることで、エディタはリストの項目を処理している間にもサポートを提供できます。
+
+
+
+タイプがなければ、それはほぼ不可能です。
+
+変数`item`はリスト`items`の要素の一つであることに注意してください。
+
+それでも、エディタはそれが`str`であることを知っていて、そのためのサポートを提供しています。
+
+#### `Tuple` と `Set`
+
+`tuple`と`set`の宣言も同様です:
+
+```Python hl_lines="1 4"
+{!../../../docs_src/python_types/tutorial007.py!}
+```
+
+つまり:
+
+* 変数`items_t`は`int`、`int`、`str`の3つの項目を持つ`tuple`です
+
+* 変数`items_s`はそれぞれの項目が`bytes`型である`set`です。
+
+#### `Dict`
+
+`dict`を宣言するためには、カンマ区切りで2つの型パラメータを渡します。
+
+最初の型パラメータは`dict`のキーです。
+
+2番目の型パラメータは`dict`の値です。
+
+```Python hl_lines="1 4"
+{!../../../docs_src/python_types/tutorial008.py!}
+```
+
+つまり:
+
+* 変数`prices`は`dict`であり:
+ * この`dict`のキーは`str`型です。(つまり、各項目の名前)
+ * この`dict`の値は`float`型です。(つまり、各項目の価格)
+
+#### `Optional`
+
+また、`Optional`を使用して、変数が`str`のような型を持つことを宣言することもできますが、それは「オプション」であり、`None`にすることもできます。
+
+```Python hl_lines="1 4"
+{!../../../docs_src/python_types/tutorial009.py!}
+```
+
+ただの`str`の代わりに`Optional[str]`を使用することで、エディタは値が常に`str`であると仮定している場合に実際には`None`である可能性があるエラーを検出するのに役立ちます。
+
+#### ジェネリック型
+
+以下のように角括弧で型パラメータを取る型を:
+
+* `List`
+* `Tuple`
+* `Set`
+* `Dict`
+* `Optional`
+* ...など
+
+**ジェネリック型** または **ジェネリクス** と呼びます。
+
+### 型としてのクラス
+
+変数の型としてクラスを宣言することもできます。
+
+例えば、`Person`クラスという名前のクラスがあるとしましょう:
+
+```Python hl_lines="1 2 3"
+{!../../../docs_src/python_types/tutorial010.py!}
+```
+
+変数の型を`Person`として宣言することができます:
+
+```Python hl_lines="6"
+{!../../../docs_src/python_types/tutorial010.py!}
+```
+
+そして、再び、すべてのエディタのサポートを得ることができます:
+
+
+
+## Pydanticのモデル
+
+Pydantic はデータ検証を行うためのPythonライブラリです。
+
+データの「形」を属性付きのクラスとして宣言します。
+
+そして、それぞれの属性は型を持ちます。
+
+さらに、いくつかの値を持つクラスのインスタンスを作成すると、その値を検証し、適切な型に変換して(もしそうであれば)全てのデータを持つオブジェクトを提供してくれます。
+
+また、その結果のオブジェクトですべてのエディタのサポートを受けることができます。
+
+Pydanticの公式ドキュメントから引用:
+
+```Python
+{!../../../docs_src/python_types/tutorial011.py!}
+```
+
+!!! info "情報"
+ Pydanticについてより学びたい方はドキュメントを参照してください.
+
+**FastAPI** はすべてPydanticをベースにしています。
+
+すべてのことは[チュートリアル - ユーザーガイド](tutorial/index.md){.internal-link target=_blank}で実際に見ることができます。
+
+## **FastAPI**での型ヒント
+
+**FastAPI** はこれらの型ヒントを利用していくつかのことを行います。
+
+**FastAPI** では型ヒントを使って型パラメータを宣言すると以下のものが得られます:
+
+* **エディタサポート**.
+* **型チェック**.
+
+...そして **FastAPI** は同じように宣言をすると、以下のことを行います:
+
+* **要件の定義**: リクエストパスパラメータ、クエリパラメータ、ヘッダー、ボディ、依存関係などから要件を定義します。
+* **データの変換**: リクエストのデータを必要な型に変換します。
+* **データの検証**: リクエストごとに:
+ * データが無効な場合にクライアントに返される **自動エラー** を生成します。
+* **ドキュメント** OpenAPIを使用したAPI:
+ * 自動的に対話型ドキュメントのユーザーインターフェイスで使用されます。
+
+すべてが抽象的に聞こえるかもしれません。心配しないでください。 この全ての動作は [チュートリアル - ユーザーガイド](tutorial/index.md){.internal-link target=_blank}で見ることができます。
+
+重要なのは、Pythonの標準的な型を使うことで、(クラスやデコレータなどを追加するのではなく)1つの場所で **FastAPI** が多くの作業を代わりにやってくれているということです。
+
+!!! info "情報"
+ すでにすべてのチュートリアルを終えて、型についての詳細を見るためにこのページに戻ってきた場合は、`mypy`のチートシートを参照してください
diff --git a/docs/ja/docs/tutorial/body-fields.md b/docs/ja/docs/tutorial/body-fields.md
new file mode 100644
index 0000000000..8f01e82162
--- /dev/null
+++ b/docs/ja/docs/tutorial/body-fields.md
@@ -0,0 +1,48 @@
+# ボディ - フィールド
+
+`Query`や`Path`、`Body`を使って *path operation関数* のパラメータに追加のバリデーションやメタデータを宣言するのと同じように、Pydanticの`Field`を使ってPydanticモデルの内部でバリデーションやメタデータを宣言することができます。
+
+## `Field`のインポート
+
+まず、以下のようにインポートします:
+
+```Python hl_lines="4"
+{!../../../docs_src/body_fields/tutorial001.py!}
+```
+
+!!! warning "注意"
+ `Field`は他の全てのもの(`Query`、`Path`、`Body`など)とは違い、`fastapi`からではなく、`pydantic`から直接インポートされていることに注意してください。
+
+## モデルの属性の宣言
+
+以下のように`Field`をモデルの属性として使用することができます:
+
+```Python hl_lines="11 12 13 14"
+{!../../../docs_src/body_fields/tutorial001.py!}
+```
+
+`Field`は`Query`や`Path`、`Body`と同じように動作し、全く同様のパラメータなどを持ちます。
+
+!!! note "技術詳細"
+ 実際には次に見る`Query`や`Path`などは、共通の`Param`クラスのサブクラスのオブジェクトを作成しますが、それ自体はPydanticの`FieldInfo`クラスのサブクラスです。
+
+ また、Pydanticの`Field`は`FieldInfo`のインスタンスも返します。
+
+ `Body`は`FieldInfo`のサブクラスのオブジェクトを直接返すこともできます。そして、他にも`Body`クラスのサブクラスであるものがあります。
+
+ `fastapi`から`Query`や`Path`などをインポートする場合、これらは実際には特殊なクラスを返す関数であることに注意してください。
+
+!!! tip "豆知識"
+ 型、デフォルト値、`Field`を持つ各モデルの属性が、`Path`や`Query`、`Body`の代わりに`Field`を持つ、*path operation 関数の*パラメータと同じ構造になっていることに注目してください。
+
+## 追加情報の追加
+
+追加情報は`Field`や`Query`、`Body`などで宣言することができます。そしてそれは生成されたJSONスキーマに含まれます。
+
+後に例を用いて宣言を学ぶ際に、追加情報を句悪方法を学べます。
+
+## まとめ
+
+Pydanticの`Field`を使用して、モデルの属性に追加のバリデーションやメタデータを宣言することができます。
+
+追加のキーワード引数を使用して、追加のJSONスキーマのメタデータを渡すこともできます。
diff --git a/docs/ja/docs/tutorial/body-multiple-params.md b/docs/ja/docs/tutorial/body-multiple-params.md
new file mode 100644
index 0000000000..2ba10c583e
--- /dev/null
+++ b/docs/ja/docs/tutorial/body-multiple-params.md
@@ -0,0 +1,169 @@
+# ボディ - 複数のパラメータ
+
+これまで`Path`と`Query`をどう使うかを見てきましたが、リクエストボディの宣言のより高度な使い方を見てみましょう。
+
+## `Path`、`Query`とボディパラメータを混ぜる
+
+まず、もちろん、`Path`と`Query`とリクエストボディのパラメータの宣言は自由に混ぜることができ、 **FastAPI** は何をするべきかを知っています。
+
+また、デフォルトの`None`を設定することで、ボディパラメータをオプションとして宣言することもできます:
+
+```Python hl_lines="19 20 21"
+{!../../../docs_src/body_multiple_params/tutorial001.py!}
+```
+
+!!! note "備考"
+ この場合、ボディから取得する`item`はオプションであることに注意してください。デフォルト値は`None`です。
+
+## 複数のボディパラメータ
+
+上述の例では、*path operations*は`item`の属性を持つ以下のようなJSONボディを期待していました:
+
+```JSON
+{
+ "name": "Foo",
+ "description": "The pretender",
+ "price": 42.0,
+ "tax": 3.2
+}
+```
+
+しかし、`item`と`user`のように複数のボディパラメータを宣言することもできます:
+
+```Python hl_lines="22"
+{!../../../docs_src/body_multiple_params/tutorial002.py!}
+```
+
+この場合、**FastAPI**は関数内に複数のボディパラメータ(Pydanticモデルである2つのパラメータ)があることに気付きます。
+
+そのため、パラメータ名をボディのキー(フィールド名)として使用し、以下のようなボディを期待しています:
+
+```JSON
+{
+ "item": {
+ "name": "Foo",
+ "description": "The pretender",
+ "price": 42.0,
+ "tax": 3.2
+ },
+ "user": {
+ "username": "dave",
+ "full_name": "Dave Grohl"
+ }
+}
+```
+
+!!! note "備考"
+ 以前と同じように`item`が宣言されていたにもかかわらず、`item`はキー`item`を持つボディの内部にあることが期待されていることに注意してください。
+
+**FastAPI** はリクエストから自動で変換を行い、パラメータ`item`が特定の内容を受け取り、`user`も同じように特定の内容を受け取ります。
+
+複合データの検証を行い、OpenAPIスキーマや自動ドキュメントのように文書化してくれます。
+
+## ボディ内の単数値
+
+クエリとパスパラメータの追加データを定義するための `Query` と `Path` があるのと同じように、 **FastAPI** は同等の `Body` を提供します。
+
+例えば、前のモデルを拡張して、同じボディに `item` と `user` の他にもう一つのキー `importance` を入れたいと決めることができます。
+
+単数値なのでそのまま宣言すると、**FastAPI** はそれがクエリパラメータであるとみなします。
+
+しかし、`Body`を使用して、**FastAPI** に別のボディキーとして扱うように指示することができます:
+
+
+```Python hl_lines="23"
+{!../../../docs_src/body_multiple_params/tutorial003.py!}
+```
+
+この場合、**FastAPI** は以下のようなボディを期待します:
+
+
+```JSON
+{
+ "item": {
+ "name": "Foo",
+ "description": "The pretender",
+ "price": 42.0,
+ "tax": 3.2
+ },
+ "user": {
+ "username": "dave",
+ "full_name": "Dave Grohl"
+ },
+ "importance": 5
+}
+```
+
+繰り返しになりますが、データ型の変換、検証、文書化などを行います。
+
+## 複数のボディパラメータとクエリ
+
+もちろん、ボディパラメータに加えて、必要に応じて追加のクエリパラメータを宣言することもできます。
+
+デフォルトでは、単数値はクエリパラメータとして解釈されるので、明示的に `Query` を追加する必要はありません。
+
+```Python
+q: str = None
+```
+
+以下において:
+
+```Python hl_lines="27"
+{!../../../docs_src/body_multiple_params/tutorial004.py!}
+```
+
+!!! info "情報"
+ `Body`もまた、後述する `Query` や `Path` などと同様に、すべての検証パラメータとメタデータパラメータを持っています。
+
+
+## 単一のボディパラメータの埋め込み
+
+Pydanticモデル`Item`のボディパラメータ`item`を1つだけ持っているとしましょう。
+
+デフォルトでは、**FastAPI**はそのボディを直接期待します。
+
+しかし、追加のボディパラメータを宣言したときのように、キー `item` を持つ JSON とその中のモデルの内容を期待したい場合は、特別な `Body` パラメータ `embed` を使うことができます:
+
+```Python
+item: Item = Body(..., embed=True)
+```
+
+以下において:
+
+```Python hl_lines="17"
+{!../../../docs_src/body_multiple_params/tutorial005.py!}
+```
+
+この場合、**FastAPI** は以下のようなボディを期待します:
+
+```JSON hl_lines="2"
+{
+ "item": {
+ "name": "Foo",
+ "description": "The pretender",
+ "price": 42.0,
+ "tax": 3.2
+ }
+}
+```
+
+以下の代わりに:
+
+```JSON
+{
+ "name": "Foo",
+ "description": "The pretender",
+ "price": 42.0,
+ "tax": 3.2
+}
+```
+
+## まとめ
+
+リクエストが単一のボディしか持てない場合でも、*path operation関数*に複数のボディパラメータを追加することができます。
+
+しかし、**FastAPI** はそれを処理し、関数内の正しいデータを与え、*path operation*内の正しいスキーマを検証し、文書化します。
+
+また、ボディの一部として受け取る単数値を宣言することもできます。
+
+また、単一のパラメータしか宣言されていない場合でも、ボディをキーに埋め込むように **FastAPI** に指示することができます。
diff --git a/docs/ja/docs/tutorial/body-nested-models.md b/docs/ja/docs/tutorial/body-nested-models.md
new file mode 100644
index 0000000000..7f916c47a1
--- /dev/null
+++ b/docs/ja/docs/tutorial/body-nested-models.md
@@ -0,0 +1,244 @@
+# ボディ - ネストされたモデル
+
+**FastAPI** を使用すると、深くネストされた任意のモデルを定義、検証、文書化、使用することができます(Pydanticのおかげです)。
+
+## リストのフィールド
+
+属性をサブタイプとして定義することができます。例えば、Pythonの`list`は以下のように定義できます:
+
+```Python hl_lines="12"
+{!../../../docs_src/body_nested_models/tutorial001.py!}
+```
+
+これにより、各項目の型は宣言されていませんが、`tags`はある項目のリストになります。
+
+## タイプパラメータを持つリストのフィールド
+
+しかし、Pythonには型や「タイプパラメータ」を使ってリストを宣言する方法があります:
+
+### typingの`List`をインポート
+
+まず、Pythonの標準の`typing`モジュールから`List`をインポートします:
+
+```Python hl_lines="1"
+{!../../../docs_src/body_nested_models/tutorial002.py!}
+```
+
+### タイプパラメータを持つ`List`の宣言
+
+`list`や`dict`、`tuple`のようなタイプパラメータ(内部の型)を持つ型を宣言するには:
+
+* `typing`モジュールからそれらをインストールします。
+* 角括弧(`[`と`]`)を使って「タイプパラメータ」として内部の型を渡します:
+
+```Python
+from typing import List
+
+my_list: List[str]
+```
+
+型宣言の標準的なPythonの構文はこれだけです。
+
+内部の型を持つモデルの属性にも同じ標準の構文を使用してください。
+
+そのため、以下の例では`tags`を具体的な「文字列のリスト」にすることができます:
+
+```Python hl_lines="14"
+{!../../../docs_src/body_nested_models/tutorial002.py!}
+```
+
+## セット型
+
+しかし、よく考えてみると、タグは繰り返すべきではなく、おそらくユニークな文字列になるのではないかと気付いたとします。
+
+そして、Pythonにはユニークな項目のセットのための特別なデータ型`set`があります。
+
+そのため、以下のように、`Set`をインポートして`str`の`set`として`tags`を宣言することができます:
+
+```Python hl_lines="1 14"
+{!../../../docs_src/body_nested_models/tutorial003.py!}
+```
+
+これを使えば、データが重複しているリクエストを受けた場合でも、ユニークな項目のセットに変換されます。
+
+そして、そのデータを出力すると、たとえソースに重複があったとしても、固有の項目のセットとして出力されます。
+
+また、それに応じて注釈をつけたり、文書化したりします。
+
+## ネストされたモデル
+
+Pydanticモデルの各属性には型があります。
+
+しかし、その型はそれ自体が別のPydanticモデルである可能性があります。
+
+そのため、特定の属性名、型、バリデーションを指定して、深くネストしたJSON`object`を宣言することができます。
+
+すべては、任意のネストにされています。
+
+### サブモデルの定義
+
+例えば、`Image`モデルを定義することができます:
+
+```Python hl_lines="9 10 11"
+{!../../../docs_src/body_nested_models/tutorial004.py!}
+```
+
+### サブモデルを型として使用
+
+そして、それを属性の型として使用することができます:
+
+```Python hl_lines="20"
+{!../../../docs_src/body_nested_models/tutorial004.py!}
+```
+
+これは **FastAPI** が以下のようなボディを期待することを意味します:
+
+```JSON
+{
+ "name": "Foo",
+ "description": "The pretender",
+ "price": 42.0,
+ "tax": 3.2,
+ "tags": ["rock", "metal", "bar"],
+ "image": {
+ "url": "http://example.com/baz.jpg",
+ "name": "The Foo live"
+ }
+}
+```
+
+繰り返しになりますが、**FastAPI** を使用して、その宣言を行うだけで以下のような恩恵を受けられます:
+
+* ネストされたモデルでも対応可能なエディタのサポート(補完など)
+* データ変換
+* データの検証
+* 自動文書化
+
+## 特殊な型とバリデーション
+
+`str`や`int`、`float`のような通常の単数型の他にも、`str`を継承したより複雑な単数型を使うこともできます。
+
+すべてのオプションをみるには、Pydanticのエキゾチック な型のドキュメントを確認してください。次の章でいくつかの例をみることができます。
+
+例えば、`Image`モデルのように`url`フィールドがある場合、`str`の代わりにPydanticの`HttpUrl`を指定することができます:
+
+```Python hl_lines="4 10"
+{!../../../docs_src/body_nested_models/tutorial005.py!}
+```
+
+文字列は有効なURLであることが確認され、そのようにJSONスキーマ・OpenAPIで文書化されます。
+
+## サブモデルのリストを持つ属性
+
+Pydanticモデルを`list`や`set`などのサブタイプとして使用することもできます:
+
+```Python hl_lines="20"
+{!../../../docs_src/body_nested_models/tutorial006.py!}
+```
+
+これは、次のようなJSONボディを期待します(変換、検証、ドキュメントなど):
+
+```JSON hl_lines="11"
+{
+ "name": "Foo",
+ "description": "The pretender",
+ "price": 42.0,
+ "tax": 3.2,
+ "tags": [
+ "rock",
+ "metal",
+ "bar"
+ ],
+ "images": [
+ {
+ "url": "http://example.com/baz.jpg",
+ "name": "The Foo live"
+ },
+ {
+ "url": "http://example.com/dave.jpg",
+ "name": "The Baz"
+ }
+ ]
+}
+```
+
+!!! info "情報"
+ `images`キーが画像オブジェクトのリストを持つようになったことに注目してください。
+
+## 深くネストされたモデル
+
+深くネストされた任意のモデルを定義することができます:
+
+```Python hl_lines="9 14 20 23 27"
+{!../../../docs_src/body_nested_models/tutorial007.py!}
+```
+
+!!! info "情報"
+ `Offer`は`Item`のリストであり、オプションの`Image`のリストを持っていることに注目してください。
+
+## 純粋なリストのボディ
+
+期待するJSONボディのトップレベルの値がJSON`array`(Pythonの`list`)であれば、Pydanticモデルと同じように、関数のパラメータで型を宣言することができます:
+
+```Python
+images: List[Image]
+```
+
+以下のように:
+
+```Python hl_lines="15"
+{!../../../docs_src/body_nested_models/tutorial008.py!}
+```
+
+## あらゆる場所でのエディタサポート
+
+エディタのサポートもどこでも受けることができます。
+
+以下のようにリストの中の項目でも:
+
+
+
+Pydanticモデルではなく、`dict`を直接使用している場合はこのようなエディタのサポートは得られません。
+
+しかし、それらについて心配する必要はありません。入力された辞書は自動的に変換され、出力も自動的にJSONに変換されます。
+
+## 任意の`dict`のボディ
+
+また、ある型のキーと別の型の値を持つ`dict`としてボディを宣言することもできます。
+
+有効なフィールド・属性名を事前に知る必要がありません(Pydanticモデルの場合のように)。
+
+これは、まだ知らないキーを受け取りたいときに便利だと思います。
+
+---
+
+他にも、`int`のように他の型のキーを持ちたい場合などに便利です。
+
+それをここで見ていきましょう。
+
+この場合、`int`のキーと`float`の値を持つものであれば、どんな`dict`でも受け入れることができます:
+
+```Python hl_lines="15"
+{!../../../docs_src/body_nested_models/tutorial009.py!}
+```
+
+!!! tip "豆知識"
+ JSONはキーとして`str`しかサポートしていないことに注意してください。
+
+ しかしPydanticには自動データ変換機能があります。
+
+ これは、APIクライアントがキーとして文字列しか送信できなくても、それらの文字列に純粋な整数が含まれている限り、Pydanticが変換して検証することを意味します。
+
+ そして、`weights`として受け取る`dict`は、実際には`int`のキーと`float`の値を持つことになります。
+
+## まとめ
+
+**FastAPI** を使用すると、Pydanticモデルが提供する最大限の柔軟性を持ちながら、コードをシンプルに短く、エレガントに保つことができます。
+
+以下のような利点があります:
+
+* エディタのサポート(どこでも補完!)
+* データ変換(別名:構文解析・シリアライズ)
+* データの検証
+* スキーマ文書
+* 自動文書化
diff --git a/docs/ja/docs/tutorial/extra-models.md b/docs/ja/docs/tutorial/extra-models.md
new file mode 100644
index 0000000000..aa2e5ffdcb
--- /dev/null
+++ b/docs/ja/docs/tutorial/extra-models.md
@@ -0,0 +1,195 @@
+# モデル - より詳しく
+
+先ほどの例に続き、複数の関連モデルを持つことが一般的です。
+
+これはユーザーモデルの場合は特にそうです。なぜなら:
+
+* **入力モデル** にはパスワードが必要です。
+* **出力モデル**はパスワードをもつべきではありません。
+* **データベースモデル**はおそらくハッシュ化されたパスワードが必要になるでしょう。
+
+!!! danger "危険"
+ ユーザーの平文のパスワードは絶対に保存しないでください。常に認証に利用可能な「安全なハッシュ」を保存してください。
+
+ 知らない方は、[セキュリティの章](security/simple-oauth2.md#password-hashing){.internal-link target=_blank}で「パスワードハッシュ」とは何かを学ぶことができます。
+
+## 複数のモデル
+
+ここでは、パスワードフィールドをもつモデルがどのように見えるのか、また、どこで使われるのか、大まかなイメージを紹介します:
+
+```Python hl_lines="9 11 16 22 24 29-30 33-35 40-41"
+{!../../../docs_src/extra_models/tutorial001.py!}
+```
+
+### `**user_in.dict()`について
+
+#### Pydanticの`.dict()`
+
+`user_in`は`UserIn`クラスのPydanticモデルです。
+
+Pydanticモデルには、モデルのデータを含む`dict`を返す`.dict()`メソッドがあります。
+
+そこで、以下のようなPydanticオブジェクト`user_in`を作成すると:
+
+```Python
+user_in = UserIn(username="john", password="secret", email="john.doe@example.com")
+```
+
+そして呼び出すと:
+
+```Python
+user_dict = user_in.dict()
+```
+
+これで変数`user_dict`のデータを持つ`dict`ができました。(これはPydanticモデルのオブジェクトの代わりに`dict`です)。
+
+そして呼び出すと:
+
+```Python
+print(user_dict)
+```
+
+以下のようなPythonの`dict`を得ることができます:
+
+```Python
+{
+ 'username': 'john',
+ 'password': 'secret',
+ 'email': 'john.doe@example.com',
+ 'full_name': None,
+}
+```
+
+#### `dict`の展開
+
+`user_dict`のような`dict`を受け取り、それを`**user_dict`を持つ関数(またはクラス)に渡すと、Pythonはそれを「展開」します。これは`user_dict`のキーと値を直接キー・バリューの引数として渡します。
+
+そこで上述の`user_dict`の続きを以下のように書くと:
+
+```Python
+UserInDB(**user_dict)
+```
+
+以下と同等の結果になります:
+
+```Python
+UserInDB(
+ username="john",
+ password="secret",
+ email="john.doe@example.com",
+ full_name=None,
+)
+```
+
+もっと正確に言えば、`user_dict`を将来的にどんな内容であっても直接使用することになります:
+
+```Python
+UserInDB(
+ username = user_dict["username"],
+ password = user_dict["password"],
+ email = user_dict["email"],
+ full_name = user_dict["full_name"],
+)
+```
+
+#### 別のモデルからつくるPydanticモデル
+
+上述の例では`user_in.dict()`から`user_dict`をこのコードのように取得していますが:
+
+```Python
+user_dict = user_in.dict()
+UserInDB(**user_dict)
+```
+
+これは以下と同等です:
+
+```Python
+UserInDB(**user_in.dict())
+```
+
+...なぜなら`user_in.dict()`は`dict`であり、`**`を付与して`UserInDB`を渡してPythonに「展開」させているからです。
+
+そこで、別のPydanticモデルのデータからPydanticモデルを取得します。
+
+#### `dict`の展開と追加引数
+
+そして、追加のキーワード引数`hashed_password=hashed_password`を以下のように追加すると:
+
+```Python
+UserInDB(**user_in.dict(), hashed_password=hashed_password)
+```
+
+...以下のようになります:
+
+```Python
+UserInDB(
+ username = user_dict["username"],
+ password = user_dict["password"],
+ email = user_dict["email"],
+ full_name = user_dict["full_name"],
+ hashed_password = hashed_password,
+)
+```
+
+!!! warning "注意"
+ サポートしている追加機能は、データの可能な流れをデモするだけであり、もちろん本当のセキュリティを提供しているわけではありません。
+
+## 重複の削減
+
+コードの重複を減らすことは、**FastAPI**の中核的なアイデアの1つです。
+
+コードの重複が増えると、バグやセキュリティの問題、コードの非同期化問題(ある場所では更新しても他の場所では更新されない場合)などが発生する可能性が高くなります。
+
+そして、これらのモデルは全てのデータを共有し、属性名や型を重複させています。
+
+もっと良い方法があります。
+
+他のモデルのベースとなる`UserBase`モデルを宣言することができます。そして、そのモデルの属性(型宣言、検証など)を継承するサブクラスを作ることができます。
+
+データの変換、検証、文書化などはすべて通常通りに動作します。
+
+このようにして、モデル間の違いだけを宣言することができます:
+
+```Python hl_lines="9 15 16 19 20 23 24"
+{!../../../docs_src/extra_models/tutorial002.py!}
+```
+
+## `Union`または`anyOf`
+
+レスポンスを2つの型の`Union`として宣言することができます。
+
+OpenAPIでは`anyOf`で定義されます。
+
+そのためには、標準的なPythonの型ヒント`typing.Union`を使用します:
+
+```Python hl_lines="1 14 15 18 19 20 33"
+{!../../../docs_src/extra_models/tutorial003.py!}
+```
+
+## モデルのリスト
+
+同じように、オブジェクトのリストのレスポンスを宣言することができます。
+
+そのためには、標準のPythonの`typing.List`を使用する:
+
+```Python hl_lines="1 20"
+{!../../../docs_src/extra_models/tutorial004.py!}
+```
+
+## 任意の`dict`を持つレスポンス
+
+また、Pydanticモデルを使用せずに、キーと値の型だけを定義した任意の`dict`を使ってレスポンスを宣言することもできます。
+
+これは、有効なフィールド・属性名(Pydanticモデルに必要なもの)を事前に知らない場合に便利です。
+
+この場合、`typing.Dict`を使用することができます:
+
+```Python hl_lines="1 8"
+{!../../../docs_src/extra_models/tutorial005.py!}
+```
+
+## まとめ
+
+複数のPydanticモデルを使用し、ケースごとに自由に継承します。
+
+エンティティが異なる「状態」を持たなければならない場合は、エンティティごとに単一のデータモデルを持つ必要はありません。`password` や `password_hash` やパスワードなしなどのいくつかの「状態」をもつユーザー「エンティティ」の場合の様にすれば良いです。
diff --git a/docs/ja/docs/tutorial/handling-errors.md b/docs/ja/docs/tutorial/handling-errors.md
new file mode 100644
index 0000000000..ec36e9880d
--- /dev/null
+++ b/docs/ja/docs/tutorial/handling-errors.md
@@ -0,0 +1,265 @@
+# エラーハンドリング
+
+APIを使用しているクライアントにエラーを通知する必要がある状況はたくさんあります。
+
+このクライアントは、フロントエンドを持つブラウザ、誰かのコード、IoTデバイスなどが考えられます。
+
+クライアントに以下のようなことを伝える必要があるかもしれません:
+
+* クライアントにはその操作のための十分な権限がありません。
+* クライアントはそのリソースにアクセスできません。
+* クライアントがアクセスしようとしていた項目が存在しません。
+* など
+
+これらの場合、通常は **400**(400から499)の範囲内の **HTTPステータスコード** を返すことになります。
+
+これは200のHTTPステータスコード(200から299)に似ています。これらの「200」ステータスコードは、何らかの形でリクエスト「成功」であったことを意味します。
+
+400の範囲にあるステータスコードは、クライアントからのエラーがあったことを意味します。
+
+**"404 Not Found"** のエラー(およびジョーク)を覚えていますか?
+
+## `HTTPException`の使用
+
+HTTPレスポンスをエラーでクライアントに返すには、`HTTPException`を使用します。
+
+### `HTTPException`のインポート
+
+```Python hl_lines="1"
+{!../../../docs_src/handling_errors/tutorial001.py!}
+```
+
+### コード内での`HTTPException`の発生
+
+`HTTPException`は通常のPythonの例外であり、APIに関連するデータを追加したものです。
+
+Pythonの例外なので、`return`ではなく、`raise`です。
+
+これはまた、*path operation関数*の内部で呼び出しているユーティリティ関数の内部から`HTTPException`を発生させた場合、*path operation関数*の残りのコードは実行されず、そのリクエストを直ちに終了させ、`HTTPException`からのHTTPエラーをクライアントに送信することを意味します。
+
+値を返す`return`よりも例外を発生させることの利点は、「依存関係とセキュリティ」のセクションでより明確になります。
+
+この例では、クライアントが存在しないIDでアイテムを要求した場合、`404`のステータスコードを持つ例外を発生させます:
+
+```Python hl_lines="11"
+{!../../../docs_src/handling_errors/tutorial001.py!}
+```
+
+### レスポンス結果
+
+クライアントが`http://example.com/items/foo`(`item_id` `"foo"`)をリクエストすると、HTTPステータスコードが200で、以下のJSONレスポンスが返されます:
+
+```JSON
+{
+ "item": "The Foo Wrestlers"
+}
+```
+
+しかし、クライアントが`http://example.com/items/bar`(存在しない`item_id` `"bar"`)をリクエストした場合、HTTPステータスコード404("not found"エラー)と以下のJSONレスポンスが返されます:
+
+```JSON
+{
+ "detail": "Item not found"
+}
+```
+
+!!! tip "豆知識"
+ `HTTPException`を発生させる際には、`str`だけでなく、JSONに変換できる任意の値を`detail`パラメータとして渡すことができます。
+
+ `dist`や`list`などを渡すことができます。
+
+ これらは **FastAPI** によって自動的に処理され、JSONに変換されます。
+
+## カスタムヘッダーの追加
+
+例えば、いくつかのタイプのセキュリティのために、HTTPエラーにカスタムヘッダを追加できると便利な状況がいくつかあります。
+
+おそらくコードの中で直接使用する必要はないでしょう。
+
+しかし、高度なシナリオのために必要な場合には、カスタムヘッダーを追加することができます:
+
+```Python hl_lines="14"
+{!../../../docs_src/handling_errors/tutorial002.py!}
+```
+
+## カスタム例外ハンドラのインストール
+
+カスタム例外ハンドラはStarletteと同じ例外ユーティリティを使用して追加することができます。
+
+あなた(または使用しているライブラリ)が`raise`するかもしれないカスタム例外`UnicornException`があるとしましょう。
+
+そして、この例外をFastAPIでグローバルに処理したいと思います。
+
+カスタム例外ハンドラを`@app.exception_handler()`で追加することができます:
+
+```Python hl_lines="5 6 7 13 14 15 16 17 18 24"
+{!../../../docs_src/handling_errors/tutorial003.py!}
+```
+
+ここで、`/unicorns/yolo`をリクエストすると、*path operation*は`UnicornException`を`raise`します。
+
+しかし、これは`unicorn_exception_handler`で処理されます。
+
+そのため、HTTPステータスコードが`418`で、JSONの内容が以下のような明確なエラーを受け取ることになります:
+
+```JSON
+{"message": "Oops! yolo did something. There goes a rainbow..."}
+```
+
+!!! note "技術詳細"
+ また、`from starlette.requests import Request`と`from starlette.responses import JSONResponse`を使用することもできます。
+
+ **FastAPI** は開発者の利便性を考慮して、`fastapi.responses`と同じ`starlette.responses`を提供しています。しかし、利用可能なレスポンスのほとんどはStarletteから直接提供されます。これは`Request`と同じです。
+
+## デフォルトの例外ハンドラのオーバーライド
+
+**FastAPI** にはいくつかのデフォルトの例外ハンドラがあります。
+
+これらのハンドラは、`HTTPException`を`raise`させた場合や、リクエストに無効なデータが含まれている場合にデフォルトのJSONレスポンスを返す役割を担っています。
+
+これらの例外ハンドラを独自のものでオーバーライドすることができます。
+
+### リクエスト検証の例外のオーバーライド
+
+リクエストに無効なデータが含まれている場合、**FastAPI** は内部的に`RequestValidationError`を発生させます。
+
+また、そのためのデフォルトの例外ハンドラも含まれています。
+
+これをオーバーライドするには`RequestValidationError`をインポートして`@app.exception_handler(RequestValidationError)`と一緒に使用して例外ハンドラをデコレートします。
+
+この例外ハンドラは`Requset`と例外を受け取ります。
+
+```Python hl_lines="2 14 15 16"
+{!../../../docs_src/handling_errors/tutorial004.py!}
+```
+
+これで、`/items/foo`にアクセスすると、デフォルトのJSONエラーの代わりに以下が返されます:
+
+```JSON
+{
+ "detail": [
+ {
+ "loc": [
+ "path",
+ "item_id"
+ ],
+ "msg": "value is not a valid integer",
+ "type": "type_error.integer"
+ }
+ ]
+}
+```
+
+以下のようなテキスト版を取得します:
+
+```
+1 validation error
+path -> item_id
+ value is not a valid integer (type=type_error.integer)
+```
+
+#### `RequestValidationError`と`ValidationError`
+
+!!! warning "注意"
+ これらは今のあなたにとって重要でない場合は省略しても良い技術的な詳細です。
+
+`RequestValidationError`はPydanticの`ValidationError`のサブクラスです。
+
+**FastAPI** は`response_model`でPydanticモデルを使用していて、データにエラーがあった場合、ログにエラーが表示されるようにこれを使用しています。
+
+しかし、クライアントやユーザーはそれを見ることはありません。その代わりに、クライアントはHTTPステータスコード`500`の「Internal Server Error」を受け取ります。
+
+*レスポンス*やコードのどこか(クライアントの*リクエスト*ではなく)にPydanticの`ValidationError`がある場合、それは実際にはコードのバグなのでこのようにすべきです。
+
+また、あなたがそれを修正している間は、セキュリティの脆弱性が露呈する場合があるため、クライアントやユーザーがエラーに関する内部情報にアクセスできないようにしてください。
+
+### エラーハンドラ`HTTPException`のオーバーライド
+
+同様に、`HTTPException`ハンドラをオーバーライドすることもできます。
+
+例えば、これらのエラーに対しては、JSONではなくプレーンテキストを返すようにすることができます:
+
+```Python hl_lines="3 4 9 10 11 22"
+{!../../../docs_src/handling_errors/tutorial004.py!}
+```
+
+!!! note "技術詳細"
+ また、`from starlette.responses import PlainTextResponse`を使用することもできます。
+
+ **FastAPI** は開発者の利便性を考慮して、`fastapi.responses`と同じ`starlette.responses`を提供しています。しかし、利用可能なレスポンスのほとんどはStarletteから直接提供されます。
+
+### `RequestValidationError`のボディの使用
+
+`RequestValidationError`には無効なデータを含む`body`が含まれています。
+
+アプリ開発中に本体のログを取ってデバッグしたり、ユーザーに返したりなどに使用することができます。
+
+```Python hl_lines="14"
+{!../../../docs_src/handling_errors/tutorial005.py!}
+```
+
+ここで、以下のような無効な項目を送信してみてください:
+
+```JSON
+{
+ "title": "towel",
+ "size": "XL"
+}
+```
+
+受信したボディを含むデータが無効であることを示すレスポンスが表示されます:
+
+```JSON hl_lines="12 13 14 15"
+{
+ "detail": [
+ {
+ "loc": [
+ "body",
+ "size"
+ ],
+ "msg": "value is not a valid integer",
+ "type": "type_error.integer"
+ }
+ ],
+ "body": {
+ "title": "towel",
+ "size": "XL"
+ }
+}
+```
+
+#### FastAPIの`HTTPException`とStarletteの`HTTPException`
+
+**FastAPI**は独自の`HTTPException`を持っています。
+
+また、 **FastAPI**のエラークラス`HTTPException`はStarletteのエラークラス`HTTPException`を継承しています。
+
+唯一の違いは、**FastAPI** の`HTTPException`はレスポンスに含まれるヘッダを追加できることです。
+
+これはOAuth 2.0といくつかのセキュリティユーティリティのために内部的に必要とされ、使用されています。
+
+そのため、コード内では通常通り **FastAPI** の`HTTPException`を発生させ続けることができます。
+
+しかし、例外ハンドラを登録する際には、Starletteの`HTTPException`を登録しておく必要があります。
+
+これにより、Starletteの内部コードやStarletteの拡張機能やプラグインの一部が`HTTPException`を発生させた場合、ハンドラがそれをキャッチして処理することができるようになります。
+
+以下の例では、同じコード内で両方の`HTTPException`を使用できるようにするために、Starletteの例外の名前を`StarletteHTTPException`に変更しています:
+
+```Python
+from starlette.exceptions import HTTPException as StarletteHTTPException
+```
+
+### **FastAPI** の例外ハンドラの再利用
+
+また、何らかの方法で例外を使用することもできますが、**FastAPI** から同じデフォルトの例外ハンドラを使用することもできます。
+
+デフォルトの例外ハンドラを`fastapi.exception_handlers`からインポートして再利用することができます:
+
+```Python hl_lines="2 3 4 5 15 21"
+{!../../../docs_src/handling_errors/tutorial006.py!}
+```
+
+この例では、非常に表現力のあるメッセージでエラーを`print`しています。
+
+しかし、例外を使用して、デフォルトの例外ハンドラを再利用することができるということが理解できます。
diff --git a/docs/ja/docs/tutorial/path-params-numeric-validations.md b/docs/ja/docs/tutorial/path-params-numeric-validations.md
new file mode 100644
index 0000000000..551aeabb3a
--- /dev/null
+++ b/docs/ja/docs/tutorial/path-params-numeric-validations.md
@@ -0,0 +1,122 @@
+# パスパラメータと数値の検証
+
+クエリパラメータに対して`Query`でより多くのバリデーションとメタデータを宣言できるのと同じように、パスパラメータに対しても`Path`で同じ種類のバリデーションとメタデータを宣言することができます。
+
+## Pathのインポート
+
+まず初めに、`fastapi`から`Path`をインポートします:
+
+```Python hl_lines="1"
+{!../../../docs_src/path_params_numeric_validations/tutorial001.py!}
+```
+
+## メタデータの宣言
+
+パラメータは`Query`と同じものを宣言することができます。
+
+例えば、パスパラメータ`item_id`に対して`title`のメタデータを宣言するには以下のようにします:
+
+```Python hl_lines="8"
+{!../../../docs_src/path_params_numeric_validations/tutorial001.py!}
+```
+
+!!! note "備考"
+ パスの一部でなければならないので、パスパラメータは常に必須です。
+
+ そのため、`...`を使用して必須と示す必要があります。
+
+ それでも、`None`で宣言しても、デフォルト値を設定しても、何の影響もなく、常に必要とされていることに変わりはありません。
+
+## 必要に応じてパラメータを並び替える
+
+クエリパラメータ`q`を必須の`str`として宣言したいとしましょう。
+
+また、このパラメータには何も宣言する必要がないので、`Query`を使う必要はありません。
+
+しかし、パスパラメータ`item_id`のために`Path`を使用する必要があります。
+
+Pythonは「デフォルト」を持たない値の前に「デフォルト」を持つ値を置くことができません。
+
+しかし、それらを並び替えることができ、デフォルト値を持たない値(クエリパラメータ`q`)を最初に持つことができます。
+
+**FastAPI**では関係ありません。パラメータは名前、型、デフォルトの宣言(`Query`、`Path`など)で検出され、順番は気にしません。
+
+そのため、以下のように関数を宣言することができます:
+
+```Python hl_lines="8"
+{!../../../docs_src/path_params_numeric_validations/tutorial002.py!}
+```
+
+## 必要に応じてパラメータを並び替えるトリック
+
+クエリパラメータ`q`を`Query`やデフォルト値なしで宣言し、パスパラメータ`item_id`を`Path`を用いて宣言し、それらを別の順番に並びたい場合、Pythonには少し特殊な構文が用意されています。
+
+関数の最初のパラメータとして`*`を渡します。
+
+Pythonはその`*`で何かをすることはありませんが、それ以降のすべてのパラメータがキーワード引数(キーと値のペア)として呼ばれるべきものであると知っているでしょう。それはkwargsとしても知られています。たとえデフォルト値がなくても。
+
+```Python hl_lines="8"
+{!../../../docs_src/path_params_numeric_validations/tutorial003.py!}
+```
+
+## 数値の検証: 以上
+
+`Query`と`Path`(、そして後述する他のもの)を用いて、文字列の制約を宣言することができますが、数値の制約も同様に宣言できます。
+
+ここで、`ge=1`の場合、`item_id`は`1`「より大きい`g`か、同じ`e`」整数でなれけばなりません。
+
+```Python hl_lines="8"
+{!../../../docs_src/path_params_numeric_validations/tutorial004.py!}
+```
+
+## 数値の検証: より大きいと小なりイコール
+
+以下も同様です:
+
+* `gt`: より大きい(`g`reater `t`han)
+* `le`: 小なりイコール(`l`ess than or `e`qual)
+
+```Python hl_lines="9"
+{!../../../docs_src/path_params_numeric_validations/tutorial005.py!}
+```
+
+## 数値の検証: 浮動小数点、 大なり小なり
+
+数値のバリデーションは`float`の値に対しても有効です。
+
+ここで重要になってくるのはgtだけでなくgeも宣言できることです。これと同様に、例えば、値が`1`より小さくても`0`より大きくなければならないことを要求することができます。
+
+したがって、`0.5`は有効な値ですが、`0.0`や`0`はそうではありません。
+
+これはltも同じです。
+
+```Python hl_lines="11"
+{!../../../docs_src/path_params_numeric_validations/tutorial006.py!}
+```
+
+## まとめ
+
+`Query`と`Path`(そしてまだ見たことない他のもの)では、[クエリパラメータと文字列の検証](query-params-str-validations.md){.internal-link target=_blank}と同じようにメタデータと文字列の検証を宣言することができます。
+
+また、数値のバリデーションを宣言することもできます:
+
+* `gt`: より大きい(`g`reater `t`han)
+* `ge`: 以上(`g`reater than or `e`qual)
+* `lt`: より小さい(`l`ess `t`han)
+* `le`: 以下(`l`ess than or `e`qual)
+
+!!! info "情報"
+ `Query`、`Path`などは後に共通の`Param`クラスのサブクラスを見ることになります。(使う必要はありません)
+
+ そして、それらすべては、これまで見てきた追加のバリデーションとメタデータと同じパラメータを共有しています。
+
+!!! note "技術詳細"
+ `fastapi`から`Query`、`Path`などをインポートすると、これらは実際には関数です。
+
+ 呼び出されると、同じ名前のクラスのインスタンスを返します。
+
+ そのため、関数である`Query`をインポートし、それを呼び出すと、`Query`という名前のクラスのインスタンスが返されます。
+
+ これらの関数は(クラスを直接使うのではなく)エディタが型についてエラーとしないようにするために存在します。
+
+ この方法によって、これらのエラーを無視するための設定を追加することなく、通常のエディタやコーディングツールを使用することができます。
diff --git a/docs/ja/docs/tutorial/response-model.md b/docs/ja/docs/tutorial/response-model.md
new file mode 100644
index 0000000000..749b330610
--- /dev/null
+++ b/docs/ja/docs/tutorial/response-model.md
@@ -0,0 +1,208 @@
+# レスポンスモデル
+
+*path operations* のいずれにおいても、`response_model`パラメータを使用して、レスポンスのモデルを宣言することができます:
+
+* `@app.get()`
+* `@app.post()`
+* `@app.put()`
+* `@app.delete()`
+* など。
+
+```Python hl_lines="17"
+{!../../../docs_src/response_model/tutorial001.py!}
+```
+
+!!! note "備考"
+ `response_model`は「デコレータ」メソッド(`get`、`post`など)のパラメータであることに注意してください。すべてのパラメータやボディのように、*path operation関数* のパラメータではありません。
+
+Pydanticモデルの属性に対して宣言するのと同じ型を受け取るので、Pydanticモデルになることもできますが、例えば、`List[Item]`のようなPydanticモデルの`list`になることもできます。
+
+FastAPIは`response_model`を使って以下のことをします:
+
+* 出力データを型宣言に変換します。
+* データを検証します。
+* OpenAPIの *path operation* で、レスポンス用のJSON Schemaを追加します。
+* 自動ドキュメントシステムで使用されます。
+
+しかし、最も重要なのは:
+
+* 出力データをモデルのデータに限定します。これがどのように重要なのか以下で見ていきましょう。
+
+!!! note "技術詳細"
+ レスポンスモデルは、関数の戻り値のアノテーションではなく、このパラメータで宣言されています。なぜなら、パス関数は実際にはそのレスポンスモデルを返すのではなく、`dict`やデータベースオブジェクト、あるいは他のモデルを返し、`response_model`を使用してフィールドの制限やシリアライズを行うからです。
+
+## 同じ入力データの返却
+
+ここでは`UserIn`モデルを宣言しています。それには平文のパスワードが含まれています:
+
+```Python hl_lines="9 11"
+{!../../../docs_src/response_model/tutorial002.py!}
+```
+
+そして、このモデルを使用して入力を宣言し、同じモデルを使って出力を宣言しています:
+
+```Python hl_lines="17 18"
+{!../../../docs_src/response_model/tutorial002.py!}
+```
+
+これで、ブラウザがパスワードを使ってユーザーを作成する際に、APIがレスポンスで同じパスワードを返すようになりました。
+
+この場合、ユーザー自身がパスワードを送信しているので問題ないかもしれません。
+
+しかし、同じモデルを別の*path operation*に使用すると、すべてのクライアントにユーザーのパスワードを送信してしまうことになります。
+
+!!! danger "危険"
+ ユーザーの平文のパスワードを保存したり、レスポンスで送信したりすることは絶対にしないでください。
+
+## 出力モデルの追加
+
+代わりに、平文のパスワードを持つ入力モデルと、パスワードを持たない出力モデルを作成することができます:
+
+```Python hl_lines="9 11 16"
+{!../../../docs_src/response_model/tutorial003.py!}
+```
+
+ここでは、*path operation関数*がパスワードを含む同じ入力ユーザーを返しているにもかかわらず:
+
+```Python hl_lines="24"
+{!../../../docs_src/response_model/tutorial003.py!}
+```
+
+...`response_model`を`UserOut`と宣言したことで、パスワードが含まれていません:
+
+```Python hl_lines="22"
+{!../../../docs_src/response_model/tutorial003.py!}
+```
+
+そのため、**FastAPI** は出力モデルで宣言されていない全てのデータをフィルタリングしてくれます(Pydanticを使用)。
+
+## ドキュメントを見る
+
+自動ドキュメントを見ると、入力モデルと出力モデルがそれぞれ独自のJSON Schemaを持っていることが確認できます。
+
+
+
+そして、両方のモデルは、対話型のAPIドキュメントに使用されます:
+
+
+
+## レスポンスモデルのエンコーディングパラメータ
+
+レスポンスモデルにはデフォルト値を設定することができます:
+
+```Python hl_lines="11 13 14"
+{!../../../docs_src/response_model/tutorial004.py!}
+```
+
+* `description: str = None`は`None`がデフォルト値です。
+* `tax: float = 10.5`は`10.5`がデフォルト値です。
+* `tags: List[str] = []` は空のリスト(`[]`)がデフォルト値です。
+
+しかし、実際に保存されていない場合には結果からそれらを省略した方が良いかもしれません。
+
+例えば、NoSQLデータベースに多くのオプション属性を持つモデルがあるが、デフォルト値でいっぱいの非常に長いJSONレスポンスを送信したくない場合です。
+
+### `response_model_exclude_unset`パラメータの使用
+
+*path operation デコレータ*に`response_model_exclude_unset=True`パラメータを設定することができます:
+
+```Python hl_lines="24"
+{!../../../docs_src/response_model/tutorial004.py!}
+```
+
+そして、これらのデフォルト値はレスポンスに含まれず、実際に設定された値のみが含まれます。
+
+そのため、*path operation*にID`foo`が設定されたitemのリクエストを送ると、レスポンスは以下のようになります(デフォルト値を含まない):
+
+```JSON
+{
+ "name": "Foo",
+ "price": 50.2
+}
+```
+
+!!! info "情報"
+ FastAPIはこれをするために、Pydanticモデルの`.dict()`をその`exclude_unset`パラメータで使用しています。
+
+!!! info "情報"
+ 以下も使用することができます:
+
+ * `response_model_exclude_defaults=True`
+ * `response_model_exclude_none=True`
+
+ `exclude_defaults`と`exclude_none`については、Pydanticのドキュメントで説明されている通りです。
+
+#### デフォルト値を持つフィールドの値を持つデータ
+
+しかし、ID`bar`のitemのように、デフォルト値が設定されているモデルのフィールドに値が設定されている場合:
+
+```Python hl_lines="3 5"
+{
+ "name": "Bar",
+ "description": "The bartenders",
+ "price": 62,
+ "tax": 20.2
+}
+```
+
+それらはレスポンスに含まれます。
+
+#### デフォルト値と同じ値を持つデータ
+
+ID`baz`のitemのようにデフォルト値と同じ値を持つデータの場合:
+
+```Python hl_lines="3 5 6"
+{
+ "name": "Baz",
+ "description": None,
+ "price": 50.2,
+ "tax": 10.5,
+ "tags": []
+}
+```
+
+FastAPIは十分に賢いので(実際には、Pydanticが十分に賢い)`description`や`tax`、`tags`はデフォルト値と同じ値を持っているにもかかわらず、明示的に設定されていることを理解しています。(デフォルトから取得するのではなく)
+
+そのため、それらはJSONレスポンスに含まれることになります。
+
+!!! tip "豆知識"
+ デフォルト値は`None`だけでなく、なんでも良いことに注意してください。
+ 例えば、リスト(`[]`)や`10.5`の`float`などです。
+
+### `response_model_include`と`response_model_exclude`
+
+*path operationデコレータ*として`response_model_include`と`response_model_exclude`も使用することができます。
+
+属性名を持つ`str`の`set`を受け取り、含める(残りを省略する)か、除外(残りを含む)します。
+
+これは、Pydanticモデルが1つしかなく、出力からいくつかのデータを削除したい場合のクイックショートカットとして使用することができます。
+
+!!! tip "豆知識"
+ それでも、これらのパラメータではなく、複数のクラスを使用して、上記のようなアイデアを使うことをおすすめします。
+
+ これは`response_model_include`や`response_mode_exclude`を使用していくつかの属性を省略しても、アプリケーションのOpenAPI(とドキュメント)で生成されたJSON Schemaが完全なモデルになるからです。
+
+ 同様に動作する`response_model_by_alias`にも当てはまります。
+
+```Python hl_lines="31 37"
+{!../../../docs_src/response_model/tutorial005.py!}
+```
+
+!!! tip "豆知識"
+ `{"name", "description"}`の構文はこれら2つの値をもつ`set`を作成します。
+
+ これは`set(["name", "description"])`と同等です。
+
+#### `set`の代わりに`list`を使用する
+
+もし`set`を使用することを忘れて、代わりに`list`や`tuple`を使用しても、FastAPIはそれを`set`に変換して正しく動作します:
+
+```Python hl_lines="31 37"
+{!../../../docs_src/response_model/tutorial006.py!}
+```
+
+## まとめ
+
+*path operationデコレータの*`response_model`パラメータを使用して、レスポンスモデルを定義し、特にプライベートデータがフィルタリングされていることを保証します。
+
+明示的に設定された値のみを返すには、`response_model_exclude_unset`を使用します。
diff --git a/docs/ja/docs/tutorial/response-status-code.md b/docs/ja/docs/tutorial/response-status-code.md
new file mode 100644
index 0000000000..ead2adddaa
--- /dev/null
+++ b/docs/ja/docs/tutorial/response-status-code.md
@@ -0,0 +1,89 @@
+# レスポンスステータスコード
+
+レスポンスモデルを指定するのと同じ方法で、レスポンスに使用されるHTTPステータスコードを以下の*path operations*のいずれかの`status_code`パラメータで宣言することもできます。
+
+* `@app.get()`
+* `@app.post()`
+* `@app.put()`
+* `@app.delete()`
+* など。
+
+```Python hl_lines="6"
+{!../../../docs_src/response_status_code/tutorial001.py!}
+```
+
+!!! note "備考"
+ `status_code`は「デコレータ」メソッド(`get`、`post`など)のパラメータであることに注意してください。すべてのパラメータやボディのように、*path operation関数*のものではありません。
+
+`status_code`パラメータはHTTPステータスコードを含む数値を受け取ります。
+
+!!! info "情報"
+ `status_code`は代わりに、Pythonの`http.HTTPStatus`のように、`IntEnum`を受け取ることもできます。
+
+これは:
+
+* レスポンスでステータスコードを返します。
+* OpenAPIスキーマ(およびユーザーインターフェース)に以下のように文書化します:
+
+
+
+!!! note "備考"
+ いくつかのレスポンスコード(次のセクションを参照)は、レスポンスにボディがないことを示しています。
+
+ FastAPIはこれを知っていて、レスポンスボディがないというOpenAPIドキュメントを生成します。
+
+## HTTPステータスコードについて
+
+!!! note "備考"
+ すでにHTTPステータスコードが何であるかを知っている場合は、次のセクションにスキップしてください。
+
+HTTPでは、レスポンスの一部として3桁の数字のステータスコードを送信します。
+
+これらのステータスコードは、それらを認識するために関連付けられた名前を持っていますが、重要な部分は番号です。
+
+つまり:
+
+* `100`以上は「情報」のためのものです。。直接使うことはほとんどありません。これらのステータスコードを持つレスポンスはボディを持つことができません。
+* **`200`** 以上は「成功」のレスポンスのためのものです。これらは最も利用するであろうものです。
+ * `200`はデフォルトのステータスコードで、すべてが「OK」であったことを意味します。
+ * 別の例としては、`201`(Created)があります。これはデータベースに新しいレコードを作成した後によく使用されます。
+ * 特殊なケースとして、`204`(No Content)があります。このレスポンスはクライアントに返すコンテンツがない場合に使用されます。そしてこのレスポンスはボディを持つことはできません。
+* **`300`** 以上は「リダイレクト」のためのものです。これらのステータスコードを持つレスポンスは`304`(Not Modified)を除き、ボディを持つことも持たないこともできます。
+* **`400`** 以上は「クライアントエラー」のレスポンスのためのものです。これらは、おそらく最も多用するであろう2番目のタイプです。
+ * 例えば、`404`は「Not Found」レスポンスです。
+ * クライアントからの一般的なエラーについては、`400`を使用することができます。
+* `500`以上はサーバーエラーのためのものです。これらを直接使うことはほとんどありません。アプリケーションコードやサーバーのどこかで何か問題が発生した場合、これらのステータスコードのいずれかが自動的に返されます。
+
+!!! tip "豆知識"
+ それぞれのステータスコードとどのコードが何のためのコードなのかについて詳細はMDN HTTP レスポンスステータスコードについてのドキュメントを参照してください。
+
+## 名前を覚えるための近道
+
+先ほどの例をもう一度見てみましょう:
+
+```Python hl_lines="6"
+{!../../../docs_src/response_status_code/tutorial001.py!}
+```
+
+`201`は「作成完了」のためのステータスコードです。
+
+しかし、それぞれのコードの意味を暗記する必要はありません。
+
+`fastapi.status`の便利な変数を利用することができます。
+
+```Python hl_lines="1 6"
+{!../../../docs_src/response_status_code/tutorial002.py!}
+```
+
+それらは便利です。それらは同じ番号を保持しており、その方法ではエディタの自動補完を使用してそれらを見つけることができます。
+
+
+
+!!! note "技術詳細"
+ また、`from starlette import status`を使うこともできます。
+
+ **FastAPI** は、`開発者の利便性を考慮して、fastapi.status`と同じ`starlette.status`を提供しています。しかし、これはStarletteから直接提供されています。
+
+## デフォルトの変更
+
+後に、[高度なユーザーガイド](../advanced/response-change-status-code.md){.internal-link target=_blank}で、ここで宣言しているデフォルトとは異なるステータスコードを返す方法を見ていきます。
diff --git a/docs/ja/docs/tutorial/schema-extra-example.md b/docs/ja/docs/tutorial/schema-extra-example.md
new file mode 100644
index 0000000000..3102a49362
--- /dev/null
+++ b/docs/ja/docs/tutorial/schema-extra-example.md
@@ -0,0 +1,58 @@
+# スキーマの追加 - 例
+
+JSON Schemaに追加する情報を定義することができます。
+
+一般的なユースケースはこのドキュメントで示されているように`example`を追加することです。
+
+JSON Schemaの追加情報を宣言する方法はいくつかあります。
+
+## Pydanticの`schema_extra`
+
+Pydanticのドキュメント: スキーマのカスタマイズで説明されているように、`Config`と`schema_extra`を使ってPydanticモデルの例を宣言することができます:
+
+```Python hl_lines="15 16 17 18 19 20 21 22 23"
+{!../../../docs_src/schema_extra_example/tutorial001.py!}
+```
+
+その追加情報はそのまま出力され、JSON Schemaに追加されます。
+
+## `Field`の追加引数
+
+後述する`Field`、`Path`、`Query`、`Body`などでは、任意の引数を関数に渡すことでJSON Schemaの追加情報を宣言することもできます:
+
+```Python hl_lines="4 10 11 12 13"
+{!../../../docs_src/schema_extra_example/tutorial002.py!}
+```
+
+!!! warning "注意"
+ これらの追加引数が渡されても、文書化のためのバリデーションは追加されず、注釈だけが追加されることを覚えておいてください。
+
+## `Body`の追加引数
+
+追加情報を`Field`に渡すのと同じように、`Path`、`Query`、`Body`などでも同じことができます。
+
+例えば、`Body`にボディリクエストの`example`を渡すことができます:
+
+```Python hl_lines="21 22 23 24 25 26"
+{!../../../docs_src/schema_extra_example/tutorial003.py!}
+```
+
+## ドキュメントのUIの例
+
+上記のいずれの方法でも、`/docs`の中では以下のようになります:
+
+
+
+## 技術詳細
+
+`example` と `examples`について...
+
+JSON Schemaの最新バージョンでは`examples`というフィールドを定義していますが、OpenAPIは`examples`を持たない古いバージョンのJSON Schemaをベースにしています。
+
+そのため、OpenAPIでは同じ目的のために`example`を独自に定義しており(`examples`ではなく`example`として)、それがdocs UI(Swagger UIを使用)で使用されています。
+
+つまり、`example`はJSON Schemaの一部ではありませんが、OpenAPIの一部であり、それがdocs UIで使用されることになります。
+
+## その他の情報
+
+同じように、フロントエンドのユーザーインターフェースなどをカスタマイズするために、各モデルのJSON Schemaに追加される独自の追加情報を追加することができます。
diff --git a/docs/ja/docs/tutorial/security/oauth2-jwt.md b/docs/ja/docs/tutorial/security/oauth2-jwt.md
index 348ffda016..d5b179aa05 100644
--- a/docs/ja/docs/tutorial/security/oauth2-jwt.md
+++ b/docs/ja/docs/tutorial/security/oauth2-jwt.md
@@ -167,7 +167,7 @@ JWTトークンの署名に使用するアルゴリズム`"HS256"`を指定し
JWTアクセストークンを作成し、それを返します。
-```Python hl_lines="115-128"
+```Python hl_lines="115-130"
{!../../../docs_src/security/tutorial004.py!}
```
diff --git a/docs/ko/docs/deployment/cloud.md b/docs/ko/docs/deployment/cloud.md
new file mode 100644
index 0000000000..f2b965a911
--- /dev/null
+++ b/docs/ko/docs/deployment/cloud.md
@@ -0,0 +1,17 @@
+# FastAPI를 클라우드 제공업체에서 배포하기
+
+사실상 거의 **모든 클라우드 제공업체**를 사용하여 여러분의 FastAPI 애플리케이션을 배포할 수 있습니다.
+
+대부분의 경우, 주요 클라우드 제공업체에서는 FastAPI를 배포할 수 있도록 가이드를 제공합니다.
+
+## 클라우드 제공업체 - 후원자들
+
+몇몇 클라우드 제공업체들은 [**FastAPI를 후원하며**](../help-fastapi.md#sponsor-the-author){.internal-link target=_blank} ✨, 이를 통해 FastAPI와 FastAPI **생태계**가 지속적이고 건전한 **발전**을 할 수 있습니다.
+
+이는 FastAPI와 **커뮤니티** (여러분)에 대한 진정한 헌신을 보여줍니다. 그들은 여러분에게 **좋은 서비스**를 제공할 뿐 만이 아니라 여러분이 **훌륭하고 건강한 프레임워크인** FastAPI 를 사용하길 원하기 때문입니다. 🙇
+
+아래와 같은 서비스를 사용해보고 각 서비스의 가이드를 따를 수도 있습니다:
+
+* Platform.sh
+* Porter
+* Deta
diff --git a/docs/ko/docs/index.md b/docs/ko/docs/index.md
index a6991a9b86..594b092f73 100644
--- a/docs/ko/docs/index.md
+++ b/docs/ko/docs/index.md
@@ -24,7 +24,7 @@
---
-FastAPI는 현대적이고, 빠르며(고성능), 파이썬 표준 타입 힌트에 기초한 Python3.6+의 API를 빌드하기 위한 웹 프레임워크입니다.
+FastAPI는 현대적이고, 빠르며(고성능), 파이썬 표준 타입 힌트에 기초한 Python3.8+의 API를 빌드하기 위한 웹 프레임워크입니다.
주요 특징으로:
@@ -107,7 +107,7 @@ FastAPI는 현대적이고, 빠르며(고성능), 파이썬 표준 타입 힌트
## 요구사항
-Python 3.7+
+Python 3.8+
FastAPI는 거인들의 어깨 위에 서 있습니다:
@@ -323,7 +323,7 @@ def update_item(item_id: int, item: Item):
새로운 문법, 특정 라이브러리의 메소드나 클래스 등을 배울 필요가 없습니다.
-그저 표준 **Python 3.6+**입니다.
+그저 표준 **Python 3.8+** 입니다.
예를 들어, `int`에 대해선:
diff --git a/docs/language_names.yml b/docs/language_names.yml
new file mode 100644
index 0000000000..7c37ff2b13
--- /dev/null
+++ b/docs/language_names.yml
@@ -0,0 +1,183 @@
+aa: Afaraf
+ab: аҧсуа бызшәа
+ae: avesta
+af: Afrikaans
+ak: Akan
+am: አማርኛ
+an: aragonés
+ar: اللغة العربية
+as: অসমীয়া
+av: авар мацӀ
+ay: aymar aru
+az: azərbaycan dili
+ba: башҡорт теле
+be: беларуская мова
+bg: български език
+bh: भोजपुरी
+bi: Bislama
+bm: bamanankan
+bn: বাংলা
+bo: བོད་ཡིག
+br: brezhoneg
+bs: bosanski jezik
+ca: Català
+ce: нохчийн мотт
+ch: Chamoru
+co: corsu
+cr: ᓀᐦᐃᔭᐍᐏᐣ
+cs: čeština
+cu: ѩзыкъ словѣньскъ
+cv: чӑваш чӗлхи
+cy: Cymraeg
+da: dansk
+de: Deutsch
+dv: Dhivehi
+dz: རྫོང་ཁ
+ee: Eʋegbe
+el: Ελληνικά
+en: English
+eo: Esperanto
+es: español
+et: eesti
+eu: euskara
+fa: فارسی
+ff: Fulfulde
+fi: suomi
+fj: Vakaviti
+fo: føroyskt
+fr: français
+fy: Frysk
+ga: Gaeilge
+gd: Gàidhlig
+gl: galego
+gu: ગુજરાતી
+gv: Gaelg
+ha: هَوُسَ
+he: עברית
+hi: हिन्दी
+ho: Hiri Motu
+hr: Hrvatski
+ht: Kreyòl ayisyen
+hu: magyar
+hy: Հայերեն
+hz: Otjiherero
+ia: Interlingua
+id: Bahasa Indonesia
+ie: Interlingue
+ig: Asụsụ Igbo
+ii: ꆈꌠ꒿ Nuosuhxop
+ik: Iñupiaq
+io: Ido
+is: Íslenska
+it: italiano
+iu: ᐃᓄᒃᑎᑐᑦ
+ja: 日本語
+jv: basa Jawa
+ka: ქართული
+kg: Kikongo
+ki: Gĩkũyũ
+kj: Kuanyama
+kk: қазақ тілі
+kl: kalaallisut
+km: ខេមរភាសា
+kn: ಕನ್ನಡ
+ko: 한국어
+kr: Kanuri
+ks: कश्मीरी
+ku: Kurdî
+kv: коми кыв
+kw: Kernewek
+ky: Кыргызча
+la: latine
+lb: Lëtzebuergesch
+lg: Luganda
+li: Limburgs
+ln: Lingála
+lo: ພາສາ
+lt: lietuvių kalba
+lu: Tshiluba
+lv: latviešu valoda
+mg: fiteny malagasy
+mh: Kajin M̧ajeļ
+mi: te reo Māori
+mk: македонски јазик
+ml: മലയാളം
+mn: Монгол хэл
+mr: मराठी
+ms: Bahasa Malaysia
+mt: Malti
+my: ဗမာစာ
+na: Ekakairũ Naoero
+nb: Norsk bokmål
+nd: isiNdebele
+ne: नेपाली
+ng: Owambo
+nl: Nederlands
+nn: Norsk nynorsk
+'no': Norsk
+nr: isiNdebele
+nv: Diné bizaad
+ny: chiCheŵa
+oc: occitan
+oj: ᐊᓂᔑᓈᐯᒧᐎᓐ
+om: Afaan Oromoo
+or: ଓଡ଼ିଆ
+os: ирон æвзаг
+pa: ਪੰਜਾਬੀ
+pi: पाऴि
+pl: Polski
+ps: پښتو
+pt: português
+qu: Runa Simi
+rm: rumantsch grischun
+rn: Ikirundi
+ro: Română
+ru: русский язык
+rw: Ikinyarwanda
+sa: संस्कृतम्
+sc: sardu
+sd: सिन्धी
+se: Davvisámegiella
+sg: yângâ tî sängö
+si: සිංහල
+sk: slovenčina
+sl: slovenščina
+sn: chiShona
+so: Soomaaliga
+sq: shqip
+sr: српски језик
+ss: SiSwati
+st: Sesotho
+su: Basa Sunda
+sv: svenska
+sw: Kiswahili
+ta: தமிழ்
+te: తెలుగు
+tg: тоҷикӣ
+th: ไทย
+ti: ትግርኛ
+tk: Türkmen
+tl: Wikang Tagalog
+tn: Setswana
+to: faka Tonga
+tr: Türkçe
+ts: Xitsonga
+tt: татар теле
+tw: Twi
+ty: Reo Tahiti
+ug: ئۇيغۇرچە
+uk: українська мова
+ur: اردو
+uz: Ўзбек
+ve: Tshivenḓa
+vi: Tiếng Việt
+vo: Volapük
+wa: walon
+wo: Wollof
+xh: isiXhosa
+yi: ייִדיש
+yo: Yorùbá
+za: Saɯ cueŋƅ
+zh: 汉语
+zh-hant: 繁體中文
+zu: isiZulu
diff --git a/docs/pl/docs/features.md b/docs/pl/docs/features.md
index 49d362dd98..ed10af9bc7 100644
--- a/docs/pl/docs/features.md
+++ b/docs/pl/docs/features.md
@@ -25,7 +25,7 @@ Interaktywna dokumentacja i webowe interfejsy do eksploracji API. Z racji tego,
### Nowoczesny Python
-Wszystko opiera się na standardowych deklaracjach typu **Python 3.6** (dzięki Pydantic). Brak nowej składni do uczenia. Po prostu standardowy, współczesny Python.
+Wszystko opiera się na standardowych deklaracjach typu **Python 3.8** (dzięki Pydantic). Brak nowej składni do uczenia. Po prostu standardowy, współczesny Python.
Jeśli potrzebujesz szybkiego przypomnienia jak używać deklaracji typów w Pythonie (nawet jeśli nie używasz FastAPI), sprawdź krótki samouczek: [Python Types](python-types.md){.internal-link target=_blank}.
diff --git a/docs/pl/docs/help-fastapi.md b/docs/pl/docs/help-fastapi.md
new file mode 100644
index 0000000000..3d02a87410
--- /dev/null
+++ b/docs/pl/docs/help-fastapi.md
@@ -0,0 +1,263 @@
+# Pomóż FastAPI - Uzyskaj pomoc
+
+Czy podoba Ci się **FastAPI**?
+
+Czy chciałbyś pomóc FastAPI, jego użytkownikom i autorowi?
+
+Może napotkałeś na trudności z **FastAPI** i potrzebujesz pomocy?
+
+Istnieje kilka bardzo łatwych sposobów, aby pomóc (czasami wystarczy jedno lub dwa kliknięcia).
+
+Istnieje również kilka sposobów uzyskania pomocy.
+
+## Zapisz się do newslettera
+
+Możesz zapisać się do rzadkiego [newslettera o **FastAPI i jego przyjaciołach**](/newsletter/){.internal-link target=_blank}, aby być na bieżąco z:
+
+* Aktualnościami o FastAPI i przyjaciołach 🚀
+* Przewodnikami 📝
+* Funkcjami ✨
+* Przełomowymi zmianami 🚨
+* Poradami i sztuczkami ✅
+
+## Śledź FastAPI na Twitterze
+
+Śledź @fastapi na **Twitterze** aby być na bieżąco z najnowszymi wiadomościami o **FastAPI**. 🐦
+
+## Dodaj gwiazdkę **FastAPI** na GitHubie
+
+Możesz "dodać gwiazdkę" FastAPI na GitHubie (klikając przycisk gwiazdki w prawym górnym rogu): https://github.com/tiangolo/fastapi. ⭐️
+
+Dodając gwiazdkę, inni użytkownicy będą mogli łatwiej znaleźć projekt i zobaczyć, że był już przydatny dla innych.
+
+## Obserwuj repozytorium GitHub w poszukiwaniu nowych wydań
+
+Możesz "obserwować" FastAPI na GitHubie (klikając przycisk "obserwuj" w prawym górnym rogu): https://github.com/tiangolo/fastapi. 👀
+
+Wybierz opcję "Tylko wydania".
+
+Dzięki temu będziesz otrzymywać powiadomienia (na swój adres e-mail) za każdym razem, gdy pojawi się nowe wydanie (nowa wersja) **FastAPI** z poprawkami błędów i nowymi funkcjami.
+
+## Skontaktuj się z autorem
+
+Możesz skontaktować się ze mną (Sebastián Ramírez / `tiangolo`), autorem.
+
+Możesz:
+
+* Śledzić mnie na **GitHubie**.
+ * Zobacz inne projekty open source, które stworzyłem, a mogą być dla Ciebie pomocne.
+ * Śledź mnie, aby dostać powiadomienie, gdy utworzę nowy projekt open source.
+* Śledzić mnie na **Twitterze** lub na Mastodonie.
+ * Napisz mi, w jaki sposób korzystasz z FastAPI (uwielbiam o tym czytać).
+ * Dowiedz się, gdy ogłoszę coś nowego lub wypuszczę nowe narzędzia.
+ * Możesz także śledzić @fastapi na Twitterze (to oddzielne konto).
+* Nawiąż ze mną kontakt na **Linkedinie**.
+ * Dowiedz się, gdy ogłoszę coś nowego lub wypuszczę nowe narzędzia (chociaż częściej korzystam z Twittera 🤷♂).
+* Czytaj moje posty (lub śledź mnie) na **Dev.to** lub na **Medium**.
+ * Czytaj o innych pomysłach, artykułach i dowiedz się o narzędziach, które stworzyłem.
+ * Śledź mnie, by wiedzieć gdy opublikuję coś nowego.
+
+## Napisz tweeta o **FastAPI**
+
+Napisz tweeta o **FastAPI** i powiedz czemu Ci się podoba. 🎉
+
+Uwielbiam czytać w jaki sposób **FastAPI** jest używane, co Ci się w nim podobało, w jakim projekcie/firmie go używasz itp.
+
+## Głosuj na FastAPI
+
+* Głosuj na **FastAPI** w Slant.
+* Głosuj na **FastAPI** w AlternativeTo.
+* Powiedz, że używasz **FastAPI** na StackShare.
+
+## Pomagaj innym, odpowiadając na ich pytania na GitHubie
+
+Możesz spróbować pomóc innym, odpowiadając w:
+
+* Dyskusjach na GitHubie
+* Problemach na GitHubie
+
+W wielu przypadkach możesz już znać odpowiedź na te pytania. 🤓
+
+Jeśli pomożesz wielu ludziom, możesz zostać oficjalnym [Ekspertem FastAPI](fastapi-people.md#experts){.internal-link target=_blank}. 🎉
+
+Pamiętaj tylko o najważniejszym: bądź życzliwy. Ludzie przychodzą sfrustrowani i w wielu przypadkach nie zadają pytań w najlepszy sposób, ale mimo to postaraj się być dla nich jak najbardziej życzliwy. 🤗
+
+Chciałbym, by społeczność **FastAPI** była życzliwa i przyjazna. Nie akceptuj prześladowania ani braku szacunku wobec innych. Dbajmy o siebie nawzajem.
+
+---
+
+Oto, jak pomóc innym z pytaniami (w dyskusjach lub problemach):
+
+### Zrozum pytanie
+
+* Upewnij się, czy rozumiesz **cel** i przypadek użycia osoby pytającej.
+
+* Następnie sprawdź, czy pytanie (większość to pytania) jest **jasne**.
+
+* W wielu przypadkach zadane pytanie dotyczy rozwiązania wymyślonego przez użytkownika, ale może istnieć **lepsze** rozwiązanie. Jeśli dokładnie zrozumiesz problem i przypadek użycia, być może będziesz mógł zaproponować lepsze **alternatywne rozwiązanie**.
+
+* Jeśli nie rozumiesz pytania, poproś o więcej **szczegółów**.
+
+### Odtwórz problem
+
+W większości przypadków problem wynika z **autorskiego kodu** osoby pytającej.
+
+Często pytający umieszczają tylko fragment kodu, niewystarczający do **odtworzenia problemu**.
+
+* Możesz poprosić ich o dostarczenie minimalnego, odtwarzalnego przykładu, który możesz **skopiować i wkleić** i uruchomić lokalnie, aby zobaczyć ten sam błąd lub zachowanie, które widzą, lub lepiej zrozumieć ich przypadki użycia.
+
+* Jeśli jesteś wyjątkowo pomocny, możesz spróbować **stworzyć taki przykład** samodzielnie, opierając się tylko na opisie problemu. Miej na uwadze, że może to zająć dużo czasu i lepiej może być najpierw poprosić ich o wyjaśnienie problemu.
+
+### Proponuj rozwiązania
+
+* Po zrozumieniu pytania możesz podać im możliwą **odpowiedź**.
+
+* W wielu przypadkach lepiej zrozumieć ich **podstawowy problem lub przypadek użycia**, ponieważ może istnieć lepszy sposób rozwiązania niż to, co próbują zrobić.
+
+### Poproś o zamknięcie
+
+Jeśli odpowiedzą, jest duża szansa, że rozwiązałeś ich problem, gratulacje, **jesteś bohaterem**! 🦸
+
+* Jeśli Twoja odpowiedź rozwiązała problem, możesz poprosić o:
+
+ * W Dyskusjach na GitHubie: oznaczenie komentarza jako **odpowiedź**.
+ * W Problemach na GitHubie: **zamknięcie** problemu.
+
+## Obserwuj repozytorium na GitHubie
+
+Możesz "obserwować" FastAPI na GitHubie (klikając przycisk "obserwuj" w prawym górnym rogu): https://github.com/tiangolo/fastapi. 👀
+
+Jeśli wybierzesz "Obserwuj" zamiast "Tylko wydania", otrzymasz powiadomienia, gdy ktoś utworzy nowy problem lub pytanie. Możesz również określić, że chcesz być powiadamiany tylko o nowych problemach, dyskusjach, PR-ach itp.
+
+Następnie możesz spróbować pomóc rozwiązać te problemy.
+
+## Zadawaj pytania
+
+Możesz utworzyć nowe pytanie w repozytorium na GitHubie, na przykład aby:
+
+* Zadać **pytanie** lub zapytać o **problem**.
+* Zaproponować nową **funkcję**.
+
+**Uwaga**: jeśli to zrobisz, poproszę Cię również o pomoc innym. 😉
+
+## Przeglądaj Pull Requesty
+
+Możesz pomóc mi w przeglądaniu pull requestów autorstwa innych osób.
+
+Jak wcześniej wspomniałem, postaraj się być jak najbardziej życzliwy. 🤗
+
+---
+
+Oto, co warto mieć na uwadze podczas oceny pull requestu:
+
+### Zrozum problem
+
+* Najpierw upewnij się, że **rozumiesz problem**, który próbuje rozwiązać pull request. Może być osadzony w większym kontekście w GitHubowej dyskusji lub problemie.
+
+* Jest też duża szansa, że pull request nie jest konieczny, ponieważ problem można rozwiązać w **inny sposób**. Wtedy możesz to zasugerować lub o to zapytać.
+
+### Nie martw się stylem
+
+* Nie przejmuj się zbytnio rzeczami takimi jak style wiadomości commitów, przy wcielaniu pull requesta łączę commity i modyfikuję opis sumarycznego commita ręcznie.
+
+* Nie przejmuj się również stylem kodu, automatyczne narzędzia w repozytorium sprawdzają to samodzielnie.
+
+A jeśli istnieje jakaś konkretna potrzeba dotycząca stylu lub spójności, sam poproszę o zmiany lub dodam commity z takimi zmianami.
+
+### Sprawdź kod
+
+* Przeczytaj kod, zastanów się czy ma sens, **uruchom go lokalnie** i potwierdź czy faktycznie rozwiązuje problem.
+
+* Następnie dodaj **komentarz** z informacją o tym, że sprawdziłeś kod, dzięki temu będę miał pewność, że faktycznie go sprawdziłeś.
+
+!!! info
+ Niestety, nie mogę ślepo ufać PR-om, nawet jeśli mają kilka zatwierdzeń.
+
+ Kilka razy zdarzyło się, że PR-y miały 3, 5 lub więcej zatwierdzeń (prawdopodobnie dlatego, że opis obiecuje rozwiązanie ważnego problemu), ale gdy sam sprawdziłem danego PR-a, okazał się być zbugowany lub nie rozwiązywał problemu, który rzekomo miał rozwiązywać. 😅
+
+ Dlatego tak ważne jest, abyś faktycznie przeczytał i uruchomił kod oraz napisał w komentarzu, że to zrobiłeś. 🤓
+
+* Jeśli PR można uprościć w jakiś sposób, możesz o to poprosić, ale nie ma potrzeby być zbyt wybrednym, może być wiele subiektywnych punktów widzenia (a ja też będę miał swój 🙈), więc lepiej żebyś skupił się na kluczowych rzeczach.
+
+### Testy
+
+* Pomóż mi sprawdzić, czy PR ma **testy**.
+
+* Sprawdź, czy testy **nie przechodzą** przed PR. 🚨
+
+* Następnie sprawdź, czy testy **przechodzą** po PR. ✅
+
+* Wiele PR-ów nie ma testów, możesz **przypomnieć** im o dodaniu testów, a nawet **zaproponować** samemu jakieś testy. To jedna z rzeczy, które pochłaniają najwięcej czasu i możesz w tym bardzo pomóc.
+
+* Następnie skomentuj również to, czego spróbowałeś, wtedy będę wiedział, że to sprawdziłeś. 🤓
+
+## Utwórz Pull Request
+
+Możesz [wnieść wkład](contributing.md){.internal-link target=_blank} do kodu źródłowego za pomocą Pull Requestu, na przykład:
+
+* Naprawić literówkę, którą znalazłeś w dokumentacji.
+* Podzielić się artykułem, filmem lub podcastem, który stworzyłeś lub znalazłeś na temat FastAPI, edytując ten plik.
+ * Upewnij się, że dodajesz swój link na początku odpowiedniej sekcji.
+* Pomóc w [tłumaczeniu dokumentacji](contributing.md#translations){.internal-link target=_blank} na Twój język.
+ * Możesz również pomóc w weryfikacji tłumaczeń stworzonych przez innych.
+* Zaproponować nowe sekcje dokumentacji.
+* Naprawić istniejący problem/błąd.
+ * Upewnij się, że dodajesz testy.
+* Dodać nową funkcję.
+ * Upewnij się, że dodajesz testy.
+ * Upewnij się, że dodajesz dokumentację, jeśli jest to istotne.
+
+## Pomóż w utrzymaniu FastAPI
+
+Pomóż mi utrzymać **FastAPI**! 🤓
+
+Jest wiele pracy do zrobienia, a w większości przypadków **TY** możesz to zrobić.
+
+Główne zadania, które możesz wykonać teraz to:
+
+* [Pomóc innym z pytaniami na GitHubie](#help-others-with-questions-in-github){.internal-link target=_blank} (zobacz sekcję powyżej).
+* [Oceniać Pull Requesty](#review-pull-requests){.internal-link target=_blank} (zobacz sekcję powyżej).
+
+Te dwie czynności **zajmują najwięcej czasu**. To główna praca związana z utrzymaniem FastAPI.
+
+Jeśli możesz mi w tym pomóc, **pomożesz mi utrzymać FastAPI** i zapewnisz że będzie **rozwijać się szybciej i lepiej**. 🚀
+
+## Dołącz do czatu
+
+Dołącz do 👥 serwera czatu na Discordzie 👥 i spędzaj czas z innymi w społeczności FastAPI.
+
+!!! wskazówka
+ Jeśli masz pytania, zadaj je w Dyskusjach na GitHubie, jest dużo większa szansa, że otrzymasz pomoc od [Ekspertów FastAPI](fastapi-people.md#experts){.internal-link target=_blank}.
+
+ Używaj czatu tylko do innych ogólnych rozmów.
+
+### Nie zadawaj pytań na czacie
+
+Miej na uwadze, że ponieważ czaty pozwalają na bardziej "swobodną rozmowę", łatwo jest zadawać pytania, które są zbyt ogólne i trudniejsze do odpowiedzi, więc możesz nie otrzymać odpowiedzi.
+
+Na GitHubie szablon poprowadzi Cię do napisania odpowiedniego pytania, dzięki czemu łatwiej uzyskasz dobrą odpowiedź, a nawet rozwiążesz problem samodzielnie, zanim zapytasz. Ponadto na GitHubie mogę się upewnić, że zawsze odpowiadam na wszystko, nawet jeśli zajmuje to trochę czasu. Osobiście nie mogę tego zrobić z systemami czatu. 😅
+
+Rozmów w systemach czatu nie można tak łatwo przeszukiwać, jak na GitHubie, więc pytania i odpowiedzi mogą zaginąć w rozmowie. A tylko te na GitHubie liczą się do zostania [Ekspertem FastAPI](fastapi-people.md#experts){.internal-link target=_blank}, więc najprawdopodobniej otrzymasz więcej uwagi na GitHubie.
+
+Z drugiej strony w systemach czatu są tysiące użytkowników, więc jest duża szansa, że znajdziesz tam kogoś do rozmowy, prawie w każdej chwili. 😄
+
+## Wspieraj autora
+
+Możesz również finansowo wesprzeć autora (mnie) poprzez sponsoring na GitHubie.
+
+Tam możesz postawić mi kawę ☕️ aby podziękować. 😄
+
+Możesz także zostać srebrnym lub złotym sponsorem FastAPI. 🏅🎉
+
+## Wspieraj narzędzia, które napędzają FastAPI
+
+Jak widziałeś w dokumentacji, FastAPI stoi na ramionach gigantów, Starlette i Pydantic.
+
+Możesz również wesprzeć:
+
+* Samuel Colvin (Pydantic)
+* Encode (Starlette, Uvicorn)
+
+---
+
+Dziękuję! 🚀
diff --git a/docs/pl/docs/index.md b/docs/pl/docs/index.md
index bade7a88cb..49f5c2b011 100644
--- a/docs/pl/docs/index.md
+++ b/docs/pl/docs/index.md
@@ -24,7 +24,7 @@
---
-FastAPI to nowoczesny, wydajny framework webowy do budowania API z użyciem Pythona 3.6+ bazujący na standardowym typowaniu Pythona.
+FastAPI to nowoczesny, wydajny framework webowy do budowania API z użyciem Pythona 3.8+ bazujący na standardowym typowaniu Pythona.
Kluczowe cechy:
@@ -106,7 +106,7 @@ Jeżeli tworzysz aplikacje CLI<
## Wymagania
-Python 3.7+
+Python 3.8+
FastAPI oparty jest na:
@@ -321,7 +321,7 @@ Robisz to tak samo jak ze standardowymi typami w Pythonie.
Nie musisz sie uczyć żadnej nowej składni, metod lub klas ze specyficznych bibliotek itp.
-Po prostu standardowy **Python 3.6+**.
+Po prostu standardowy **Python 3.8+**.
Na przykład, dla danych typu `int`:
diff --git a/docs/pt/docs/deployment/deta.md b/docs/pt/docs/deployment/deta.md
deleted file mode 100644
index 9271bba42e..0000000000
--- a/docs/pt/docs/deployment/deta.md
+++ /dev/null
@@ -1,258 +0,0 @@
-# Implantação FastAPI na Deta
-
-Nessa seção você aprenderá sobre como realizar a implantação de uma aplicação **FastAPI** na Deta utilizando o plano gratuito. 🎁
-
-Isso tudo levará aproximadamente **10 minutos**.
-
-!!! info "Informação"
- Deta é uma patrocinadora do **FastAPI**. 🎉
-
-## Uma aplicação **FastAPI** simples
-
-* Crie e entre em um diretório para a sua aplicação, por exemplo, `./fastapideta/`.
-
-### Código FastAPI
-
-* Crie o arquivo `main.py` com:
-
-```Python
-from fastapi import FastAPI
-
-app = FastAPI()
-
-
-@app.get("/")
-def read_root():
- return {"Hello": "World"}
-
-
-@app.get("/items/{item_id}")
-def read_item(item_id: int):
- return {"item_id": item_id}
-```
-
-### Requisitos
-
-Agora, no mesmo diretório crie o arquivo `requirements.txt` com:
-
-```text
-fastapi
-```
-
-!!! tip "Dica"
- Você não precisa instalar Uvicorn para realizar a implantação na Deta, embora provavelmente queira instalá-lo para testar seu aplicativo localmente.
-
-### Estrutura de diretório
-
-Agora você terá o diretório `./fastapideta/` com dois arquivos:
-
-```
-.
-└── main.py
-└── requirements.txt
-```
-
-## Crie uma conta gratuita na Deta
-
-Agora crie uma conta gratuita na Deta, você precisará apenas de um email e senha.
-
-Você nem precisa de um cartão de crédito.
-
-## Instale a CLI
-
-Depois de ter sua conta criada, instale Deta CLI:
-
-=== "Linux, macOS"
-
-
-
-## Permitir acesso público
-
-Por padrão, a Deta lidará com a autenticação usando cookies para sua conta.
-
-Mas quando estiver pronto, você pode torná-lo público com:
-
-
-
-## Saiba mais
-
-Em algum momento, você provavelmente desejará armazenar alguns dados para seu aplicativo de uma forma que persista ao longo do tempo. Para isso você pode usar Deta Base, que também tem um generoso **nível gratuito**.
-
-Você também pode ler mais na documentação da Deta.
-
-## Conceitos de implantação
-
-Voltando aos conceitos que discutimos em [Deployments Concepts](./concepts.md){.internal-link target=_blank}, veja como cada um deles seria tratado com a Deta:
-
-* **HTTPS**: Realizado pela Deta, eles fornecerão um subdomínio e lidarão com HTTPS automaticamente.
-* **Executando na inicialização**: Realizado pela Deta, como parte de seu serviço.
-* **Reinicialização**: Realizado pela Deta, como parte de seu serviço.
-* **Replicação**: Realizado pela Deta, como parte de seu serviço.
-* **Memória**: Limite predefinido pela Deta, você pode contatá-los para aumentá-lo.
-* **Etapas anteriores a inicialização**: Não suportado diretamente, você pode fazê-lo funcionar com o sistema Cron ou scripts adicionais.
-
-!!! note "Nota"
- O Deta foi projetado para facilitar (e gratuitamente) a implantação rápida de aplicativos simples.
-
- Ele pode simplificar vários casos de uso, mas, ao mesmo tempo, não suporta outros, como o uso de bancos de dados externos (além do próprio sistema de banco de dados NoSQL da Deta), máquinas virtuais personalizadas, etc.
-
- Você pode ler mais detalhes na documentação da Deta para ver se é a escolha certa para você.
diff --git a/docs/pt/docs/external-links.md b/docs/pt/docs/external-links.md
index 6ec6c3a27c..77ec323511 100644
--- a/docs/pt/docs/external-links.md
+++ b/docs/pt/docs/external-links.md
@@ -9,70 +9,21 @@ Aqui tem uma lista, incompleta, de algumas delas.
!!! tip "Dica"
Se você tem um artigo, projeto, ferramenta ou qualquer coisa relacionada ao **FastAPI** que ainda não está listada aqui, crie um _Pull Request_ adicionando ele.
-## Artigos
+{% for section_name, section_content in external_links.items() %}
-### Inglês
+## {{ section_name }}
-{% if external_links %}
-{% for article in external_links.articles.english %}
+{% for lang_name, lang_content in section_content.items() %}
+
+### {{ lang_name }}
+
+{% for item in lang_content %}
+
+* {{ item.title }} by {{ item.author }}.
-* {{ article.title }} by {{ article.author }}.
{% endfor %}
-{% endif %}
-
-### Japonês
-
-{% if external_links %}
-{% for article in external_links.articles.japanese %}
-
-* {{ article.title }} by {{ article.author }}.
{% endfor %}
-{% endif %}
-
-### Vietnamita
-
-{% if external_links %}
-{% for article in external_links.articles.vietnamese %}
-
-* {{ article.title }} by {{ article.author }}.
{% endfor %}
-{% endif %}
-
-### Russo
-
-{% if external_links %}
-{% for article in external_links.articles.russian %}
-
-* {{ article.title }} by {{ article.author }}.
-{% endfor %}
-{% endif %}
-
-### Alemão
-
-{% if external_links %}
-{% for article in external_links.articles.german %}
-
-* {{ article.title }} by {{ article.author }}.
-{% endfor %}
-{% endif %}
-
-## Podcasts
-
-{% if external_links %}
-{% for article in external_links.podcasts.english %}
-
-* {{ article.title }} by {{ article.author }}.
-{% endfor %}
-{% endif %}
-
-## Palestras
-
-{% if external_links %}
-{% for article in external_links.talks.english %}
-
-* {{ article.title }} by {{ article.author }}.
-{% endfor %}
-{% endif %}
## Projetos
diff --git a/docs/pt/docs/features.md b/docs/pt/docs/features.md
index bd0db8e762..822992c5b9 100644
--- a/docs/pt/docs/features.md
+++ b/docs/pt/docs/features.md
@@ -25,7 +25,7 @@ Documentação interativa da API e navegação _web_ da interface de usuário. C
### Apenas Python moderno
-Tudo é baseado no padrão das declarações de **tipos do Python 3.6** (graças ao Pydantic). Nenhuma sintaxe nova para aprender. Apenas o padrão moderno do Python.
+Tudo é baseado no padrão das declarações de **tipos do Python 3.8** (graças ao Pydantic). Nenhuma sintaxe nova para aprender. Apenas o padrão moderno do Python.
Se você precisa refrescar a memória rapidamente sobre como usar tipos do Python (mesmo que você não use o FastAPI), confira esse rápido tutorial: [Tipos do Python](python-types.md){.internal-link target=_blank}.
diff --git a/docs/pt/docs/help-fastapi.md b/docs/pt/docs/help-fastapi.md
index d82ce3414a..d04905197d 100644
--- a/docs/pt/docs/help-fastapi.md
+++ b/docs/pt/docs/help-fastapi.md
@@ -114,8 +114,6 @@ do FastAPI.
Use o chat apenas para outro tipo de assunto.
-Também existe o chat do Gitter, porém ele não possuí canais e recursos avançados, conversas são mais engessadas, por isso o Discord é mais recomendado.
-
### Não faça perguntas no chat
Tenha em mente que os chats permitem uma "conversa mais livre", dessa forma é muito fácil fazer perguntas que são muito genéricas e dificeís de responder, assim você pode acabar não sendo respondido.
diff --git a/docs/pt/docs/index.md b/docs/pt/docs/index.md
index 591e7f3d4f..d1e64b3b90 100644
--- a/docs/pt/docs/index.md
+++ b/docs/pt/docs/index.md
@@ -24,7 +24,7 @@
---
-FastAPI é um moderno e rápido (alta performance) _framework web_ para construção de APIs com Python 3.6 ou superior, baseado nos _type hints_ padrões do Python.
+FastAPI é um moderno e rápido (alta performance) _framework web_ para construção de APIs com Python 3.8 ou superior, baseado nos _type hints_ padrões do Python.
Os recursos chave são:
@@ -100,7 +100,7 @@ Se você estiver construindo uma aplicação ../../../docs_src/body_multiple_params/tutorial001.py!}
@@ -44,7 +44,7 @@ Mas você pode também declarar múltiplos parâmetros de corpo, por exemplo, `i
{!> ../../../docs_src/body_multiple_params/tutorial002_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="22"
{!> ../../../docs_src/body_multiple_params/tutorial002.py!}
@@ -87,7 +87,7 @@ Se você declará-lo como é, porque é um valor singular, o **FastAPI** assumir
Mas você pode instruir o **FastAPI** para tratá-lo como outra chave do corpo usando `Body`:
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="22"
{!> ../../../docs_src/body_multiple_params/tutorial003.py!}
@@ -143,7 +143,7 @@ Por exemplo:
{!> ../../../docs_src/body_multiple_params/tutorial004_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="27"
{!> ../../../docs_src/body_multiple_params/tutorial004.py!}
@@ -172,7 +172,7 @@ como em:
{!> ../../../docs_src/body_multiple_params/tutorial005_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="17"
{!> ../../../docs_src/body_multiple_params/tutorial005.py!}
diff --git a/docs/pt/docs/tutorial/encoder.md b/docs/pt/docs/tutorial/encoder.md
index bb4483fdc8..b9bfbf63bf 100644
--- a/docs/pt/docs/tutorial/encoder.md
+++ b/docs/pt/docs/tutorial/encoder.md
@@ -26,7 +26,7 @@ A função recebe um objeto, como um modelo Pydantic e retorna uma versão compa
{!> ../../../docs_src/encoder/tutorial001_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="5 22"
{!> ../../../docs_src/encoder/tutorial001.py!}
diff --git a/docs/pt/docs/tutorial/extra-models.md b/docs/pt/docs/tutorial/extra-models.md
index dd5407eb2d..1343a3ae48 100644
--- a/docs/pt/docs/tutorial/extra-models.md
+++ b/docs/pt/docs/tutorial/extra-models.md
@@ -17,7 +17,7 @@ Isso é especialmente o caso para modelos de usuários, porque:
Aqui está uma ideia geral de como os modelos poderiam parecer com seus campos de senha e os lugares onde são usados:
-=== "Python 3.6 and above"
+=== "Python 3.8 and above"
```Python hl_lines="9 11 16 22 24 29-30 33-35 40-41"
{!> ../../../docs_src/extra_models/tutorial001.py!}
@@ -158,7 +158,7 @@ Toda conversão de dados, validação, documentação, etc. ainda funcionará no
Dessa forma, podemos declarar apenas as diferenças entre os modelos (com `password` em texto claro, com `hashed_password` e sem senha):
-=== "Python 3.6 and above"
+=== "Python 3.8 and above"
```Python hl_lines="9 15-16 19-20 23-24"
{!> ../../../docs_src/extra_models/tutorial002.py!}
@@ -181,7 +181,7 @@ Para fazer isso, use a dica de tipo padrão do Python `Union`, inclua o tipo mais específico primeiro, seguido pelo tipo menos específico. No exemplo abaixo, o tipo mais específico `PlaneItem` vem antes de `CarItem` em `Union[PlaneItem, CarItem]`.
-=== "Python 3.6 and above"
+=== "Python 3.8 and above"
```Python hl_lines="1 14-15 18-20 33"
{!> ../../../docs_src/extra_models/tutorial003.py!}
@@ -213,7 +213,7 @@ Da mesma forma, você pode declarar respostas de listas de objetos.
Para isso, use o padrão Python `typing.List` (ou simplesmente `list` no Python 3.9 e superior):
-=== "Python 3.6 and above"
+=== "Python 3.8 and above"
```Python hl_lines="1 20"
{!> ../../../docs_src/extra_models/tutorial004.py!}
@@ -233,7 +233,7 @@ Isso é útil se você não souber os nomes de campo / atributo válidos (que se
Neste caso, você pode usar `typing.Dict` (ou simplesmente dict no Python 3.9 e superior):
-=== "Python 3.6 and above"
+=== "Python 3.8 and above"
```Python hl_lines="1 8"
{!> ../../../docs_src/extra_models/tutorial005.py!}
diff --git a/docs/pt/docs/tutorial/header-params.md b/docs/pt/docs/tutorial/header-params.md
index bc8843327f..4bdfb7e9cd 100644
--- a/docs/pt/docs/tutorial/header-params.md
+++ b/docs/pt/docs/tutorial/header-params.md
@@ -12,7 +12,7 @@ Primeiro importe `Header`:
{!> ../../../docs_src/header_params/tutorial001_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="3"
{!> ../../../docs_src/header_params/tutorial001.py!}
@@ -30,7 +30,7 @@ O primeiro valor é o valor padrão, você pode passar todas as validações adi
{!> ../../../docs_src/header_params/tutorial001_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9"
{!> ../../../docs_src/header_params/tutorial001.py!}
@@ -66,7 +66,7 @@ Se por algum motivo você precisar desabilitar a conversão automática de subli
{!> ../../../docs_src/header_params/tutorial002_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="10"
{!> ../../../docs_src/header_params/tutorial002.py!}
@@ -97,7 +97,7 @@ Por exemplo, para declarar um cabeçalho de `X-Token` que pode aparecer mais de
{!> ../../../docs_src/header_params/tutorial003_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9"
{!> ../../../docs_src/header_params/tutorial003.py!}
diff --git a/docs/pt/docs/tutorial/path-operation-configuration.md b/docs/pt/docs/tutorial/path-operation-configuration.md
index e0a23f6655..13a87240f1 100644
--- a/docs/pt/docs/tutorial/path-operation-configuration.md
+++ b/docs/pt/docs/tutorial/path-operation-configuration.md
@@ -13,7 +13,7 @@ Você pode passar diretamente o código `int`, como `404`.
Mas se você não se lembrar o que cada código numérico significa, pode usar as constantes de atalho em `status`:
-=== "Python 3.6 and above"
+=== "Python 3.8 and above"
```Python hl_lines="3 17"
{!> ../../../docs_src/path_operation_configuration/tutorial001.py!}
@@ -42,7 +42,7 @@ Esse código de status será usado na resposta e será adicionado ao esquema Ope
Você pode adicionar tags para sua *operação de rota*, passe o parâmetro `tags` com uma `list` de `str` (comumente apenas um `str`):
-=== "Python 3.6 and above"
+=== "Python 3.8 and above"
```Python hl_lines="17 22 27"
{!> ../../../docs_src/path_operation_configuration/tutorial002.py!}
@@ -80,7 +80,7 @@ Nestes casos, pode fazer sentido armazenar as tags em um `Enum`.
Você pode adicionar um `summary` e uma `description`:
-=== "Python 3.6 and above"
+=== "Python 3.8 and above"
```Python hl_lines="20-21"
{!> ../../../docs_src/path_operation_configuration/tutorial003.py!}
@@ -104,7 +104,7 @@ Como as descrições tendem a ser longas e cobrir várias linhas, você pode dec
Você pode escrever Markdown na docstring, ele será interpretado e exibido corretamente (levando em conta a indentação da docstring).
-=== "Python 3.6 and above"
+=== "Python 3.8 and above"
```Python hl_lines="19-27"
{!> ../../../docs_src/path_operation_configuration/tutorial004.py!}
@@ -131,7 +131,7 @@ Ela será usada nas documentações interativas:
Você pode especificar a descrição da resposta com o parâmetro `response_description`:
-=== "Python 3.6 and above"
+=== "Python 3.8 and above"
```Python hl_lines="21"
{!> ../../../docs_src/path_operation_configuration/tutorial005.py!}
diff --git a/docs/pt/docs/tutorial/path-params-numeric-validations.md b/docs/pt/docs/tutorial/path-params-numeric-validations.md
index ec9b74b300..eb0d31dc34 100644
--- a/docs/pt/docs/tutorial/path-params-numeric-validations.md
+++ b/docs/pt/docs/tutorial/path-params-numeric-validations.md
@@ -12,7 +12,7 @@ Primeiro, importe `Path` de `fastapi`:
{!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="3"
{!> ../../../docs_src/path_params_numeric_validations/tutorial001.py!}
@@ -30,7 +30,7 @@ Por exemplo para declarar um valor de metadado `title` para o parâmetro de rota
{!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="10"
{!> ../../../docs_src/path_params_numeric_validations/tutorial001.py!}
diff --git a/docs/pt/docs/tutorial/path-params.md b/docs/pt/docs/tutorial/path-params.md
index 5de3756ed6..cd8c188584 100644
--- a/docs/pt/docs/tutorial/path-params.md
+++ b/docs/pt/docs/tutorial/path-params.md
@@ -236,7 +236,6 @@ Então, você poderia usar ele com:
Com o **FastAPI**, usando as declarações de tipo do Python, você obtém:
* Suporte no editor: verificação de erros, e opção de autocompletar, etc.
-* Parsing de dados
* "Parsing" de dados
* Validação de dados
* Anotação da API e documentação automática
diff --git a/docs/pt/docs/tutorial/query-params.md b/docs/pt/docs/tutorial/query-params.md
index 3ada4fd213..08bb99dbc8 100644
--- a/docs/pt/docs/tutorial/query-params.md
+++ b/docs/pt/docs/tutorial/query-params.md
@@ -69,7 +69,7 @@ Da mesma forma, você pode declarar parâmetros de consulta opcionais, definindo
{!> ../../../docs_src/query_params/tutorial002_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9"
{!> ../../../docs_src/query_params/tutorial002.py!}
@@ -91,7 +91,7 @@ Você também pode declarar tipos `bool`, e eles serão convertidos:
{!> ../../../docs_src/query_params/tutorial003_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9"
{!> ../../../docs_src/query_params/tutorial003.py!}
@@ -143,7 +143,7 @@ Eles serão detectados pelo nome:
{!> ../../../docs_src/query_params/tutorial004_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="8 10"
{!> ../../../docs_src/query_params/tutorial004.py!}
@@ -209,7 +209,7 @@ E claro, você pode definir alguns parâmetros como obrigatórios, alguns possui
{!> ../../../docs_src/query_params/tutorial006_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="10"
{!> ../../../docs_src/query_params/tutorial006.py!}
diff --git a/docs/ru/docs/external-links.md b/docs/ru/docs/external-links.md
index 4daf65898b..2448ef82ef 100644
--- a/docs/ru/docs/external-links.md
+++ b/docs/ru/docs/external-links.md
@@ -9,70 +9,21 @@
!!! tip
Если у вас есть статья, проект, инструмент или что-либо, связанное с **FastAPI**, что еще не перечислено здесь, создайте Pull Request.
-## Статьи
+{% for section_name, section_content in external_links.items() %}
-### На английском
+## {{ section_name }}
-{% if external_links %}
-{% for article in external_links.articles.english %}
+{% for lang_name, lang_content in section_content.items() %}
+
+### {{ lang_name }}
+
+{% for item in lang_content %}
+
+* {{ item.title }} by {{ item.author }}.
-* {{ article.title }} by {{ article.author }}.
{% endfor %}
-{% endif %}
-
-### На японском
-
-{% if external_links %}
-{% for article in external_links.articles.japanese %}
-
-* {{ article.title }} by {{ article.author }}.
{% endfor %}
-{% endif %}
-
-### На вьетнамском
-
-{% if external_links %}
-{% for article in external_links.articles.vietnamese %}
-
-* {{ article.title }} by {{ article.author }}.
{% endfor %}
-{% endif %}
-
-### На русском
-
-{% if external_links %}
-{% for article in external_links.articles.russian %}
-
-* {{ article.title }} by {{ article.author }}.
-{% endfor %}
-{% endif %}
-
-### На немецком
-
-{% if external_links %}
-{% for article in external_links.articles.german %}
-
-* {{ article.title }} by {{ article.author }}.
-{% endfor %}
-{% endif %}
-
-## Подкасты
-
-{% if external_links %}
-{% for article in external_links.podcasts.english %}
-
-* {{ article.title }} by {{ article.author }}.
-{% endfor %}
-{% endif %}
-
-## Talks
-
-{% if external_links %}
-{% for article in external_links.talks.english %}
-
-* {{ article.title }} by {{ article.author }}.
-{% endfor %}
-{% endif %}
## Проекты
diff --git a/docs/ru/docs/features.md b/docs/ru/docs/features.md
index e18f7bc87c..97841cc835 100644
--- a/docs/ru/docs/features.md
+++ b/docs/ru/docs/features.md
@@ -27,7 +27,7 @@
### Только современный Python
-Все эти возможности основаны на стандартных **аннотациях типов Python 3.6** (благодаря Pydantic). Не нужно изучать новый синтаксис. Только лишь стандартный современный Python.
+Все эти возможности основаны на стандартных **аннотациях типов Python 3.8** (благодаря Pydantic). Не нужно изучать новый синтаксис. Только лишь стандартный современный Python.
Если вам нужно освежить знания, как использовать аннотации типов в Python (даже если вы не используете FastAPI), выделите 2 минуты и просмотрите краткое руководство: [Введение в аннотации типов Python¶
](python-types.md){.internal-link target=_blank}.
diff --git a/docs/ru/docs/help-fastapi.md b/docs/ru/docs/help-fastapi.md
index a69e37bd8c..65ff768d1e 100644
--- a/docs/ru/docs/help-fastapi.md
+++ b/docs/ru/docs/help-fastapi.md
@@ -223,8 +223,6 @@
Используйте этот чат только для бесед на отвлечённые темы.
-Существует также чат в Gitter, но поскольку в нем нет каналов и расширенных функций, общение в нём сложнее, потому рекомендуемой системой является Discord.
-
### Не использовать чаты для вопросов
Имейте в виду, что чаты позволяют больше "свободного общения", потому там легко задавать вопросы, которые слишком общие и на которые труднее ответить, так что Вы можете не получить нужные Вам ответы.
diff --git a/docs/ru/docs/index.md b/docs/ru/docs/index.md
index 30c32e0463..6c99f623dd 100644
--- a/docs/ru/docs/index.md
+++ b/docs/ru/docs/index.md
@@ -27,7 +27,7 @@
---
-FastAPI — это современный, быстрый (высокопроизводительный) веб-фреймворк для создания API используя Python 3.6+, в основе которого лежит стандартная аннотация типов Python.
+FastAPI — это современный, быстрый (высокопроизводительный) веб-фреймворк для создания API используя Python 3.8+, в основе которого лежит стандартная аннотация типов Python.
Ключевые особенности:
@@ -109,7 +109,7 @@ FastAPI — это современный, быстрый (высокопрои
## Зависимости
-Python 3.7+
+Python 3.8+
FastAPI стоит на плечах гигантов:
@@ -321,11 +321,11 @@ def update_item(item_id: int, item: Item):
Таким образом, вы объявляете **один раз** типы параметров, тело и т. д. в качестве параметров функции.
-Вы делаете это испльзуя стандартную современную типизацию Python.
+Вы делаете это используя стандартную современную типизацию Python.
Вам не нужно изучать новый синтаксис, методы или классы конкретной библиотеки и т. д.
-Только стандартный **Python 3.6+**.
+Только стандартный **Python 3.8+**.
Например, для `int`:
diff --git a/docs/ru/docs/learn/index.md b/docs/ru/docs/learn/index.md
new file mode 100644
index 0000000000..b2e4cabc75
--- /dev/null
+++ b/docs/ru/docs/learn/index.md
@@ -0,0 +1,5 @@
+# Обучение
+
+Здесь представлены вводные разделы и учебные пособия для изучения **FastAPI**.
+
+Вы можете считать это **книгой**, **курсом**, **официальным** и рекомендуемым способом изучения FastAPI. 😎
diff --git a/docs/ru/docs/tutorial/background-tasks.md b/docs/ru/docs/tutorial/background-tasks.md
index 81efda786a..73ba860bc3 100644
--- a/docs/ru/docs/tutorial/background-tasks.md
+++ b/docs/ru/docs/tutorial/background-tasks.md
@@ -63,7 +63,7 @@
{!> ../../../docs_src/background_tasks/tutorial002_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="13 15 22 25"
{!> ../../../docs_src/background_tasks/tutorial002.py!}
@@ -71,7 +71,7 @@
В этом примере сообщения будут записаны в `log.txt` *после* того, как ответ сервера был отправлен.
-Если бы в запросе была очередь `q`, она бы первой записалась в `log.txt` фоновой задачей (потому что вызывается в зависимости `get_query`).
+Если бы в запрос был передан query-параметр `q`, он бы первыми записался в `log.txt` фоновой задачей (потому что вызывается в зависимости `get_query`).
После другая фоновая задача, которая была сгенерирована в функции, запишет сообщение из параметра `email`.
diff --git a/docs/ru/docs/tutorial/body-fields.md b/docs/ru/docs/tutorial/body-fields.md
index 674b8bde47..02a598004a 100644
--- a/docs/ru/docs/tutorial/body-fields.md
+++ b/docs/ru/docs/tutorial/body-fields.md
@@ -12,7 +12,7 @@
{!> ../../../docs_src/body_fields/tutorial001_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="4"
{!> ../../../docs_src/body_fields/tutorial001.py!}
@@ -31,13 +31,13 @@
{!> ../../../docs_src/body_fields/tutorial001_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="11-14"
{!> ../../../docs_src/body_fields/tutorial001.py!}
```
-Функция `Field` работает так же, как `Query`, `Path` и `Body`, у ее такие же параметры и т.д.
+Функция `Field` работает так же, как `Query`, `Path` и `Body`, у неё такие же параметры и т.д.
!!! note "Технические детали"
На самом деле, `Query`, `Path` и другие функции, которые вы увидите в дальнейшем, создают объекты подклассов общего класса `Param`, который сам по себе является подклассом `FieldInfo` из Pydantic.
diff --git a/docs/ru/docs/tutorial/body-multiple-params.md b/docs/ru/docs/tutorial/body-multiple-params.md
index a20457092b..e52ef6f6f0 100644
--- a/docs/ru/docs/tutorial/body-multiple-params.md
+++ b/docs/ru/docs/tutorial/body-multiple-params.md
@@ -20,7 +20,7 @@
{!> ../../../docs_src/body_multiple_params/tutorial001_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="19-21"
{!> ../../../docs_src/body_multiple_params/tutorial001_an.py!}
@@ -35,7 +35,7 @@
{!> ../../../docs_src/body_multiple_params/tutorial001_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! Заметка
Рекомендуется использовать версию с `Annotated`, если это возможно.
@@ -68,7 +68,7 @@
{!> ../../../docs_src/body_multiple_params/tutorial002_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="22"
{!> ../../../docs_src/body_multiple_params/tutorial002.py!}
@@ -123,7 +123,7 @@
{!> ../../../docs_src/body_multiple_params/tutorial003_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="24"
{!> ../../../docs_src/body_multiple_params/tutorial003_an.py!}
@@ -138,7 +138,7 @@
{!> ../../../docs_src/body_multiple_params/tutorial003_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! Заметка
Рекомендуется использовать `Annotated` версию, если это возможно.
@@ -197,7 +197,7 @@ q: str | None = None
{!> ../../../docs_src/body_multiple_params/tutorial004_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="28"
{!> ../../../docs_src/body_multiple_params/tutorial004_an.py!}
@@ -212,7 +212,7 @@ q: str | None = None
{!> ../../../docs_src/body_multiple_params/tutorial004_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! Заметка
Рекомендуется использовать `Annotated` версию, если это возможно.
@@ -250,7 +250,7 @@ item: Item = Body(embed=True)
{!> ../../../docs_src/body_multiple_params/tutorial005_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="18"
{!> ../../../docs_src/body_multiple_params/tutorial005_an.py!}
@@ -265,7 +265,7 @@ item: Item = Body(embed=True)
{!> ../../../docs_src/body_multiple_params/tutorial005_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! Заметка
Рекомендуется использовать `Annotated` версию, если это возможно.
diff --git a/docs/ru/docs/tutorial/body-nested-models.md b/docs/ru/docs/tutorial/body-nested-models.md
index 6435e316f4..bbf9b76859 100644
--- a/docs/ru/docs/tutorial/body-nested-models.md
+++ b/docs/ru/docs/tutorial/body-nested-models.md
@@ -12,7 +12,7 @@
{!> ../../../docs_src/body_nested_models/tutorial001_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="14"
{!> ../../../docs_src/body_nested_models/tutorial001.py!}
@@ -73,7 +73,7 @@ my_list: List[str]
{!> ../../../docs_src/body_nested_models/tutorial002_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="14"
{!> ../../../docs_src/body_nested_models/tutorial002.py!}
@@ -85,7 +85,7 @@ my_list: List[str]
И в Python есть специальный тип данных для множеств уникальных элементов - `set`.
-Тогда мы может обьявить поле `tags` как множество строк:
+Тогда мы можем обьявить поле `tags` как множество строк:
=== "Python 3.10+"
@@ -99,7 +99,7 @@ my_list: List[str]
{!> ../../../docs_src/body_nested_models/tutorial003_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="1 14"
{!> ../../../docs_src/body_nested_models/tutorial003.py!}
@@ -137,7 +137,7 @@ my_list: List[str]
{!> ../../../docs_src/body_nested_models/tutorial004_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9-11"
{!> ../../../docs_src/body_nested_models/tutorial004.py!}
@@ -159,7 +159,7 @@ my_list: List[str]
{!> ../../../docs_src/body_nested_models/tutorial004_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="20"
{!> ../../../docs_src/body_nested_models/tutorial004.py!}
@@ -208,7 +208,7 @@ my_list: List[str]
{!> ../../../docs_src/body_nested_models/tutorial005_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="4 10"
{!> ../../../docs_src/body_nested_models/tutorial005.py!}
@@ -232,7 +232,7 @@ my_list: List[str]
{!> ../../../docs_src/body_nested_models/tutorial006_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="20"
{!> ../../../docs_src/body_nested_models/tutorial006.py!}
@@ -283,7 +283,7 @@ my_list: List[str]
{!> ../../../docs_src/body_nested_models/tutorial007_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9 14 20 23 27"
{!> ../../../docs_src/body_nested_models/tutorial007.py!}
@@ -314,7 +314,7 @@ images: list[Image]
{!> ../../../docs_src/body_nested_models/tutorial008_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="15"
{!> ../../../docs_src/body_nested_models/tutorial008.py!}
@@ -354,7 +354,7 @@ images: list[Image]
{!> ../../../docs_src/body_nested_models/tutorial009_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9"
{!> ../../../docs_src/body_nested_models/tutorial009.py!}
diff --git a/docs/ru/docs/tutorial/cookie-params.md b/docs/ru/docs/tutorial/cookie-params.md
index a6f2caa267..5f99458b69 100644
--- a/docs/ru/docs/tutorial/cookie-params.md
+++ b/docs/ru/docs/tutorial/cookie-params.md
@@ -12,7 +12,7 @@
{!> ../../../docs_src/cookie_params/tutorial001_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="3"
{!> ../../../docs_src/cookie_params/tutorial001.py!}
@@ -30,7 +30,7 @@
{!> ../../../docs_src/cookie_params/tutorial001_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9"
{!> ../../../docs_src/cookie_params/tutorial001.py!}
diff --git a/docs/ru/docs/tutorial/debugging.md b/docs/ru/docs/tutorial/debugging.md
index 755d98cf20..38709e56df 100644
--- a/docs/ru/docs/tutorial/debugging.md
+++ b/docs/ru/docs/tutorial/debugging.md
@@ -22,7 +22,7 @@ $ python myapp.py
+
+## Сокращение
+
+Но вы видите, что здесь мы имеем некоторое повторение кода, дважды написав `CommonQueryParams`:
+
+=== "Python 3.6+ без Annotated"
+
+ !!! tip "Подсказка"
+ Рекомендуется использовать версию с `Annotated` если возможно.
+
+ ```Python
+ commons: CommonQueryParams = Depends(CommonQueryParams)
+ ```
+
+=== "Python 3.6+"
+
+ ```Python
+ commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)]
+ ```
+
+Для случаев, когда зависимостью является *конкретный* класс, который **FastAPI** "вызовет" для создания экземпляра этого класса, можно использовать укороченную запись.
+
+
+Вместо того чтобы писать:
+
+=== "Python 3.6+"
+
+ ```Python
+ commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)]
+ ```
+
+=== "Python 3.6+ без Annotated"
+
+ !!! tip "Подсказка"
+ Рекомендуется использовать версию с `Annotated` если возможно.
+
+ ```Python
+ commons: CommonQueryParams = Depends(CommonQueryParams)
+ ```
+
+...следует написать:
+
+=== "Python 3.6+"
+
+ ```Python
+ commons: Annotated[CommonQueryParams, Depends()]
+ ```
+
+=== "Python 3.6 без Annotated"
+
+ !!! tip "Подсказка"
+ Рекомендуется использовать версию с `Annotated` если возможно.
+
+ ```Python
+ commons: CommonQueryParams = Depends()
+ ```
+
+Вы объявляете зависимость как тип параметра и используете `Depends()` без какого-либо параметра, вместо того чтобы *снова* писать полный класс внутри `Depends(CommonQueryParams)`.
+
+Аналогичный пример будет выглядеть следующим образом:
+
+=== "Python 3.10+"
+
+ ```Python hl_lines="19"
+ {!> ../../../docs_src/dependencies/tutorial004_an_py310.py!}
+ ```
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="19"
+ {!> ../../../docs_src/dependencies/tutorial004_an_py39.py!}
+ ```
+
+=== "Python 3.6+"
+
+ ```Python hl_lines="20"
+ {!> ../../../docs_src/dependencies/tutorial004_an.py!}
+ ```
+
+=== "Python 3.10+ без Annotated"
+
+ !!! tip "Подсказка"
+ Рекомендуется использовать версию с `Annotated` если возможно.
+
+ ```Python hl_lines="17"
+ {!> ../../../docs_src/dependencies/tutorial004_py310.py!}
+ ```
+
+=== "Python 3.6+ без Annotated"
+
+ !!! tip "Подсказка"
+ Рекомендуется использовать версию с `Annotated` если возможно.
+
+ ```Python hl_lines="19"
+ {!> ../../../docs_src/dependencies/tutorial004.py!}
+ ```
+
+...и **FastAPI** будет знать, что делать.
+
+!!! tip "Подсказка"
+ Если это покажется вам более запутанным, чем полезным, не обращайте внимания, это вам не *нужно*.
+
+ Это просто сокращение. Потому что **FastAPI** заботится о том, чтобы помочь вам свести к минимуму повторение кода.
diff --git a/docs/ru/docs/tutorial/dependencies/global-dependencies.md b/docs/ru/docs/tutorial/dependencies/global-dependencies.md
index 870d42cf54..eb1b4d7c1c 100644
--- a/docs/ru/docs/tutorial/dependencies/global-dependencies.md
+++ b/docs/ru/docs/tutorial/dependencies/global-dependencies.md
@@ -12,13 +12,13 @@
{!> ../../../docs_src/dependencies/tutorial012_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="16"
{!> ../../../docs_src/dependencies/tutorial012_an.py!}
```
-=== "Python 3.6 non-Annotated"
+=== "Python 3.8 non-Annotated"
!!! tip "Подсказка"
Рекомендуется использовать 'Annotated' версию, если это возможно.
diff --git a/docs/ru/docs/tutorial/extra-data-types.md b/docs/ru/docs/tutorial/extra-data-types.md
index efcbcb38a2..0f613a6b29 100644
--- a/docs/ru/docs/tutorial/extra-data-types.md
+++ b/docs/ru/docs/tutorial/extra-data-types.md
@@ -55,7 +55,7 @@
Вот пример *операции пути* с параметрами, который демонстрирует некоторые из вышеперечисленных типов.
-=== "Python 3.6 и выше"
+=== "Python 3.8 и выше"
```Python hl_lines="1 3 12-16"
{!> ../../../docs_src/extra_data_types/tutorial001.py!}
@@ -69,7 +69,7 @@
Обратите внимание, что параметры внутри функции имеют свой естественный тип данных, и вы, например, можете выполнять обычные манипуляции с датами, такие как:
-=== "Python 3.6 и выше"
+=== "Python 3.8 и выше"
```Python hl_lines="18-19"
{!> ../../../docs_src/extra_data_types/tutorial001.py!}
diff --git a/docs/ru/docs/tutorial/extra-models.md b/docs/ru/docs/tutorial/extra-models.md
index a346f7432c..30176b4e3c 100644
--- a/docs/ru/docs/tutorial/extra-models.md
+++ b/docs/ru/docs/tutorial/extra-models.md
@@ -23,7 +23,7 @@
{!> ../../../docs_src/extra_models/tutorial001_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9 11 16 22 24 29-30 33-35 40-41"
{!> ../../../docs_src/extra_models/tutorial001.py!}
@@ -164,7 +164,7 @@ UserInDB(
{!> ../../../docs_src/extra_models/tutorial002_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9 15-16 19-20 23-24"
{!> ../../../docs_src/extra_models/tutorial002.py!}
@@ -187,7 +187,7 @@ UserInDB(
{!> ../../../docs_src/extra_models/tutorial003_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="1 14-15 18-20 33"
{!> ../../../docs_src/extra_models/tutorial003.py!}
@@ -219,7 +219,7 @@ some_variable: PlaneItem | CarItem
{!> ../../../docs_src/extra_models/tutorial004_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="1 20"
{!> ../../../docs_src/extra_models/tutorial004.py!}
@@ -239,7 +239,7 @@ some_variable: PlaneItem | CarItem
{!> ../../../docs_src/extra_models/tutorial005_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="1 8"
{!> ../../../docs_src/extra_models/tutorial005.py!}
diff --git a/docs/ru/docs/tutorial/header-params.md b/docs/ru/docs/tutorial/header-params.md
new file mode 100644
index 0000000000..1be4ac7071
--- /dev/null
+++ b/docs/ru/docs/tutorial/header-params.md
@@ -0,0 +1,227 @@
+# Header-параметры
+
+Вы можете определить параметры заголовка таким же образом, как вы определяете параметры `Query`, `Path` и `Cookie`.
+
+## Импорт `Header`
+
+Сперва импортируйте `Header`:
+
+=== "Python 3.10+"
+
+ ```Python hl_lines="3"
+ {!> ../../../docs_src/header_params/tutorial001_an_py310.py!}
+ ```
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="3"
+ {!> ../../../docs_src/header_params/tutorial001_an_py39.py!}
+ ```
+
+=== "Python 3.8+"
+
+ ```Python hl_lines="3"
+ {!> ../../../docs_src/header_params/tutorial001_an.py!}
+ ```
+
+=== "Python 3.10+ без Annotated"
+
+ !!! tip "Подсказка"
+ Предпочтительнее использовать версию с аннотацией, если это возможно.
+
+ ```Python hl_lines="1"
+ {!> ../../../docs_src/header_params/tutorial001_py310.py!}
+ ```
+
+=== "Python 3.8+ без Annotated"
+
+ !!! tip "Подсказка"
+ Предпочтительнее использовать версию с аннотацией, если это возможно.
+
+ ```Python hl_lines="3"
+ {!> ../../../docs_src/header_params/tutorial001.py!}
+ ```
+
+## Объявление параметров `Header`
+
+Затем объявите параметры заголовка, используя ту же структуру, что и с `Path`, `Query` и `Cookie`.
+
+Первое значение является значением по умолчанию, вы можете передать все дополнительные параметры валидации или аннотации:
+
+=== "Python 3.10+"
+
+ ```Python hl_lines="9"
+ {!> ../../../docs_src/header_params/tutorial001_an_py310.py!}
+ ```
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="9"
+ {!> ../../../docs_src/header_params/tutorial001_an_py39.py!}
+ ```
+
+=== "Python 3.8+"
+
+ ```Python hl_lines="10"
+ {!> ../../../docs_src/header_params/tutorial001_an.py!}
+ ```
+
+=== "Python 3.10+ без Annotated"
+
+ !!! tip "Подсказка"
+ Предпочтительнее использовать версию с аннотацией, если это возможно.
+
+ ```Python hl_lines="7"
+ {!> ../../../docs_src/header_params/tutorial001_py310.py!}
+ ```
+
+=== "Python 3.8+ без Annotated"
+
+ !!! tip "Подсказка"
+ Предпочтительнее использовать версию с аннотацией, если это возможно.
+
+ ```Python hl_lines="9"
+ {!> ../../../docs_src/header_params/tutorial001.py!}
+ ```
+
+!!! note "Технические детали"
+ `Header` - это "родственный" класс `Path`, `Query` и `Cookie`. Он также наследуется от того же общего класса `Param`.
+
+ Но помните, что когда вы импортируете `Query`, `Path`, `Header` и другие из `fastapi`, на самом деле это функции, которые возвращают специальные классы.
+
+!!! info "Дополнительная информация"
+ Чтобы объявить заголовки, важно использовать `Header`, иначе параметры интерпретируются как query-параметры.
+
+## Автоматическое преобразование
+
+`Header` обладает небольшой дополнительной функциональностью в дополнение к тому, что предоставляют `Path`, `Query` и `Cookie`.
+
+Большинство стандартных заголовков разделены символом "дефис", также известным как "минус" (`-`).
+
+Но переменная вроде `user-agent` недопустима в Python.
+
+По умолчанию `Header` преобразует символы имен параметров из символа подчеркивания (`_`) в дефис (`-`) для извлечения и документирования заголовков.
+
+Кроме того, HTTP-заголовки не чувствительны к регистру, поэтому вы можете объявить их в стандартном стиле Python (также известном как "snake_case").
+
+Таким образом вы можете использовать `user_agent`, как обычно, в коде Python, вместо того, чтобы вводить заглавные буквы как `User_Agent` или что-то подобное.
+
+Если по какой-либо причине вам необходимо отключить автоматическое преобразование подчеркиваний в дефисы, установите для параметра `convert_underscores` в `Header` значение `False`:
+
+=== "Python 3.10+"
+
+ ```Python hl_lines="10"
+ {!> ../../../docs_src/header_params/tutorial002_an_py310.py!}
+ ```
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="11"
+ {!> ../../../docs_src/header_params/tutorial002_an_py39.py!}
+ ```
+
+=== "Python 3.8+"
+
+ ```Python hl_lines="12"
+ {!> ../../../docs_src/header_params/tutorial002_an.py!}
+ ```
+
+=== "Python 3.10+ без Annotated"
+
+ !!! tip "Подсказка"
+ Предпочтительнее использовать версию с аннотацией, если это возможно.
+
+ ```Python hl_lines="8"
+ {!> ../../../docs_src/header_params/tutorial002_py310.py!}
+ ```
+
+=== "Python 3.8+ без Annotated"
+
+ !!! tip "Подсказка"
+ Предпочтительнее использовать версию с аннотацией, если это возможно.
+
+ ```Python hl_lines="10"
+ {!> ../../../docs_src/header_params/tutorial002.py!}
+ ```
+
+!!! warning "Внимание"
+ Прежде чем установить для `convert_underscores` значение `False`, имейте в виду, что некоторые HTTP-прокси и серверы запрещают использование заголовков с подчеркиванием.
+
+## Повторяющиеся заголовки
+
+Есть возможность получать несколько заголовков с одним и тем же именем, но разными значениями.
+
+Вы можете определить эти случаи, используя список в объявлении типа.
+
+Вы получите все значения из повторяющегося заголовка в виде `list` Python.
+
+Например, чтобы объявить заголовок `X-Token`, который может появляться более одного раза, вы можете написать:
+
+=== "Python 3.10+"
+
+ ```Python hl_lines="9"
+ {!> ../../../docs_src/header_params/tutorial003_an_py310.py!}
+ ```
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="9"
+ {!> ../../../docs_src/header_params/tutorial003_an_py39.py!}
+ ```
+
+=== "Python 3.8+"
+
+ ```Python hl_lines="10"
+ {!> ../../../docs_src/header_params/tutorial003_an.py!}
+ ```
+
+=== "Python 3.10+ без Annotated"
+
+ !!! tip "Подсказка"
+ Предпочтительнее использовать версию с аннотацией, если это возможно.
+
+ ```Python hl_lines="7"
+ {!> ../../../docs_src/header_params/tutorial003_py310.py!}
+ ```
+
+=== "Python 3.9+ без Annotated"
+
+ !!! tip "Подсказка"
+ Предпочтительнее использовать версию с аннотацией, если это возможно.
+
+ ```Python hl_lines="9"
+ {!> ../../../docs_src/header_params/tutorial003_py39.py!}
+ ```
+
+=== "Python 3.8+ без Annotated"
+
+ !!! tip "Подсказка"
+ Предпочтительнее использовать версию с аннотацией, если это возможно.
+
+ ```Python hl_lines="9"
+ {!> ../../../docs_src/header_params/tutorial003.py!}
+ ```
+
+Если вы взаимодействуете с этой *операцией пути*, отправляя два HTTP-заголовка, таких как:
+
+```
+X-Token: foo
+X-Token: bar
+```
+
+Ответ был бы таким:
+
+```JSON
+{
+ "X-Token values": [
+ "bar",
+ "foo"
+ ]
+}
+```
+
+## Резюме
+
+Объявляйте заголовки с помощью `Header`, используя тот же общий шаблон, как при `Query`, `Path` и `Cookie`.
+
+И не беспокойтесь о символах подчеркивания в ваших переменных, **FastAPI** позаботится об их преобразовании.
diff --git a/docs/ru/docs/tutorial/path-operation-configuration.md b/docs/ru/docs/tutorial/path-operation-configuration.md
index 013903add1..db99409f46 100644
--- a/docs/ru/docs/tutorial/path-operation-configuration.md
+++ b/docs/ru/docs/tutorial/path-operation-configuration.md
@@ -25,7 +25,7 @@
{!> ../../../docs_src/path_operation_configuration/tutorial001_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="3 17"
{!> ../../../docs_src/path_operation_configuration/tutorial001.py!}
@@ -54,7 +54,7 @@
{!> ../../../docs_src/path_operation_configuration/tutorial002_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="17 22 27"
{!> ../../../docs_src/path_operation_configuration/tutorial002.py!}
@@ -92,7 +92,7 @@
{!> ../../../docs_src/path_operation_configuration/tutorial003_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="20-21"
{!> ../../../docs_src/path_operation_configuration/tutorial003.py!}
@@ -116,7 +116,7 @@
{!> ../../../docs_src/path_operation_configuration/tutorial004_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="19-27"
{!> ../../../docs_src/path_operation_configuration/tutorial004.py!}
@@ -142,7 +142,7 @@
{!> ../../../docs_src/path_operation_configuration/tutorial005_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="21"
{!> ../../../docs_src/path_operation_configuration/tutorial005.py!}
diff --git a/docs/ru/docs/tutorial/path-params-numeric-validations.md b/docs/ru/docs/tutorial/path-params-numeric-validations.md
index 0d034ef343..bd2c29d0a0 100644
--- a/docs/ru/docs/tutorial/path-params-numeric-validations.md
+++ b/docs/ru/docs/tutorial/path-params-numeric-validations.md
@@ -18,7 +18,7 @@
{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="3-4"
{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an.py!}
@@ -33,7 +33,7 @@
{!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!}
```
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
!!! tip "Подсказка"
Рекомендуется использовать версию с `Annotated` если возможно.
@@ -67,7 +67,7 @@
{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="11"
{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an.py!}
@@ -82,7 +82,7 @@
{!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!}
```
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
!!! tip "Подсказка"
Рекомендуется использовать версию с `Annotated` если возможно.
@@ -117,7 +117,7 @@
Поэтому вы можете определить функцию так:
-=== "Python 3.6 без Annotated"
+=== "Python 3.8 без Annotated"
!!! tip "Подсказка"
Рекомендуется использовать версию с `Annotated` если возможно.
@@ -134,7 +134,7 @@
{!> ../../../docs_src/path_params_numeric_validations/tutorial002_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9"
{!> ../../../docs_src/path_params_numeric_validations/tutorial002_an.py!}
@@ -174,7 +174,7 @@ Python не будет ничего делать с `*`, но он будет з
{!> ../../../docs_src/path_params_numeric_validations/tutorial003_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9"
{!> ../../../docs_src/path_params_numeric_validations/tutorial003_an.py!}
@@ -192,13 +192,13 @@ Python не будет ничего делать с `*`, но он будет з
{!> ../../../docs_src/path_params_numeric_validations/tutorial004_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9"
{!> ../../../docs_src/path_params_numeric_validations/tutorial004_an.py!}
```
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
!!! tip "Подсказка"
Рекомендуется использовать версию с `Annotated` если возможно.
@@ -220,13 +220,13 @@ Python не будет ничего делать с `*`, но он будет з
{!> ../../../docs_src/path_params_numeric_validations/tutorial005_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9"
{!> ../../../docs_src/path_params_numeric_validations/tutorial005_an.py!}
```
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
!!! tip "Подсказка"
Рекомендуется использовать версию с `Annotated` если возможно.
@@ -251,13 +251,13 @@ Python не будет ничего делать с `*`, но он будет з
{!> ../../../docs_src/path_params_numeric_validations/tutorial006_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="12"
{!> ../../../docs_src/path_params_numeric_validations/tutorial006_an.py!}
```
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
!!! tip "Подсказка"
Рекомендуется использовать версию с `Annotated` если возможно.
diff --git a/docs/ru/docs/tutorial/query-params-str-validations.md b/docs/ru/docs/tutorial/query-params-str-validations.md
index 68042db639..cc826b8711 100644
--- a/docs/ru/docs/tutorial/query-params-str-validations.md
+++ b/docs/ru/docs/tutorial/query-params-str-validations.md
@@ -10,7 +10,7 @@
{!> ../../../docs_src/query_params_str_validations/tutorial001_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9"
{!> ../../../docs_src/query_params_str_validations/tutorial001.py!}
@@ -42,7 +42,7 @@ Query-параметр `q` имеет тип `Union[str, None]` (или `str | N
{!> ../../../docs_src/query_params_str_validations/tutorial002_an_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
В версиях Python ниже Python 3.9 `Annotation` импортируется из `typing_extensions`.
@@ -66,7 +66,7 @@ Query-параметр `q` имеет тип `Union[str, None]` (или `str | N
q: str | None = None
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python
q: Union[str, None] = None
@@ -80,7 +80,7 @@ Query-параметр `q` имеет тип `Union[str, None]` (или `str | N
q: Annotated[str | None] = None
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python
q: Annotated[Union[str, None]] = None
@@ -100,7 +100,7 @@ Query-параметр `q` имеет тип `Union[str, None]` (или `str | N
{!> ../../../docs_src/query_params_str_validations/tutorial002_an_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="10"
{!> ../../../docs_src/query_params_str_validations/tutorial002_an.py!}
@@ -131,7 +131,7 @@ Query-параметр `q` имеет тип `Union[str, None]` (или `str | N
{!> ../../../docs_src/query_params_str_validations/tutorial002_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9"
{!> ../../../docs_src/query_params_str_validations/tutorial002.py!}
@@ -244,7 +244,7 @@ q: str = Query(default="rick")
{!> ../../../docs_src/query_params_str_validations/tutorial003_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="11"
{!> ../../../docs_src/query_params_str_validations/tutorial003_an.py!}
@@ -259,7 +259,7 @@ q: str = Query(default="rick")
{!> ../../../docs_src/query_params_str_validations/tutorial003_py310.py!}
```
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
!!! tip "Подсказка"
Рекомендуется использовать версию с `Annotated` если возможно.
@@ -284,7 +284,7 @@ q: str = Query(default="rick")
{!> ../../../docs_src/query_params_str_validations/tutorial004_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="12"
{!> ../../../docs_src/query_params_str_validations/tutorial004_an.py!}
@@ -299,7 +299,7 @@ q: str = Query(default="rick")
{!> ../../../docs_src/query_params_str_validations/tutorial004_py310.py!}
```
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
!!! tip "Подсказка"
Рекомендуется использовать версию с `Annotated` если возможно.
@@ -330,13 +330,13 @@ q: str = Query(default="rick")
{!> ../../../docs_src/query_params_str_validations/tutorial005_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="8"
{!> ../../../docs_src/query_params_str_validations/tutorial005_an.py!}
```
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
!!! tip "Подсказка"
Рекомендуется использовать версию с `Annotated` если возможно.
@@ -384,13 +384,13 @@ q: Union[str, None] = None
{!> ../../../docs_src/query_params_str_validations/tutorial006_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="8"
{!> ../../../docs_src/query_params_str_validations/tutorial006_an.py!}
```
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
!!! tip "Подсказка"
Рекомендуется использовать версию с `Annotated` если возможно.
@@ -414,13 +414,13 @@ q: Union[str, None] = None
{!> ../../../docs_src/query_params_str_validations/tutorial006b_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="8"
{!> ../../../docs_src/query_params_str_validations/tutorial006b_an.py!}
```
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
!!! tip "Подсказка"
Рекомендуется использовать версию с `Annotated` если возможно.
@@ -454,7 +454,7 @@ q: Union[str, None] = None
{!> ../../../docs_src/query_params_str_validations/tutorial006c_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="10"
{!> ../../../docs_src/query_params_str_validations/tutorial006c_an.py!}
@@ -469,7 +469,7 @@ q: Union[str, None] = None
{!> ../../../docs_src/query_params_str_validations/tutorial006c_py310.py!}
```
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
!!! tip "Подсказка"
Рекомендуется использовать версию с `Annotated` если возможно.
@@ -491,13 +491,13 @@ q: Union[str, None] = None
{!> ../../../docs_src/query_params_str_validations/tutorial006d_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="2 9"
{!> ../../../docs_src/query_params_str_validations/tutorial006d_an.py!}
```
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
!!! tip "Подсказка"
Рекомендуется использовать версию с `Annotated` если возможно.
@@ -527,7 +527,7 @@ q: Union[str, None] = None
{!> ../../../docs_src/query_params_str_validations/tutorial011_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="10"
{!> ../../../docs_src/query_params_str_validations/tutorial011_an.py!}
@@ -551,7 +551,7 @@ q: Union[str, None] = None
{!> ../../../docs_src/query_params_str_validations/tutorial011_py39.py!}
```
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
!!! tip "Подсказка"
Рекомендуется использовать версию с `Annotated` если возможно.
@@ -596,7 +596,7 @@ http://localhost:8000/items/?q=foo&q=bar
{!> ../../../docs_src/query_params_str_validations/tutorial012_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="10"
{!> ../../../docs_src/query_params_str_validations/tutorial012_an.py!}
@@ -611,7 +611,7 @@ http://localhost:8000/items/?q=foo&q=bar
{!> ../../../docs_src/query_params_str_validations/tutorial012_py39.py!}
```
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
!!! tip "Подсказка"
Рекомендуется использовать версию с `Annotated` если возможно.
@@ -647,13 +647,13 @@ http://localhost:8000/items/
{!> ../../../docs_src/query_params_str_validations/tutorial013_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="8"
{!> ../../../docs_src/query_params_str_validations/tutorial013_an.py!}
```
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
!!! tip "Подсказка"
Рекомендуется использовать версию с `Annotated` если возможно.
@@ -692,7 +692,7 @@ http://localhost:8000/items/
{!> ../../../docs_src/query_params_str_validations/tutorial007_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="11"
{!> ../../../docs_src/query_params_str_validations/tutorial007_an.py!}
@@ -707,7 +707,7 @@ http://localhost:8000/items/
{!> ../../../docs_src/query_params_str_validations/tutorial007_py310.py!}
```
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
!!! tip "Подсказка"
Рекомендуется использовать версию с `Annotated` если возможно.
@@ -730,7 +730,7 @@ http://localhost:8000/items/
{!> ../../../docs_src/query_params_str_validations/tutorial008_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="15"
{!> ../../../docs_src/query_params_str_validations/tutorial008_an.py!}
@@ -741,11 +741,11 @@ http://localhost:8000/items/
!!! tip "Подсказка"
Рекомендуется использовать версию с `Annotated` если возможно.
- ```Python hl_lines="12"
+ ```Python hl_lines="11"
{!> ../../../docs_src/query_params_str_validations/tutorial008_py310.py!}
```
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
!!! tip "Подсказка"
Рекомендуется использовать версию с `Annotated` если возможно.
@@ -784,7 +784,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems
{!> ../../../docs_src/query_params_str_validations/tutorial009_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="10"
{!> ../../../docs_src/query_params_str_validations/tutorial009_an.py!}
@@ -799,7 +799,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems
{!> ../../../docs_src/query_params_str_validations/tutorial009_py310.py!}
```
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
!!! tip "Подсказка"
Рекомендуется использовать версию с `Annotated` если возможно.
@@ -828,7 +828,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems
{!> ../../../docs_src/query_params_str_validations/tutorial010_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="20"
{!> ../../../docs_src/query_params_str_validations/tutorial010_an.py!}
@@ -839,11 +839,11 @@ http://127.0.0.1:8000/items/?item-query=foobaritems
!!! tip "Подсказка"
Рекомендуется использовать версию с `Annotated` если возможно.
- ```Python hl_lines="17"
+ ```Python hl_lines="16"
{!> ../../../docs_src/query_params_str_validations/tutorial010_py310.py!}
```
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
!!! tip "Подсказка"
Рекомендуется использовать версию с `Annotated` если возможно.
@@ -872,7 +872,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems
{!> ../../../docs_src/query_params_str_validations/tutorial014_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="11"
{!> ../../../docs_src/query_params_str_validations/tutorial014_an.py!}
@@ -887,7 +887,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems
{!> ../../../docs_src/query_params_str_validations/tutorial014_py310.py!}
```
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
!!! tip "Подсказка"
Рекомендуется использовать версию с `Annotated` если возможно.
diff --git a/docs/ru/docs/tutorial/query-params.md b/docs/ru/docs/tutorial/query-params.md
index 68333ec566..6e885cb656 100644
--- a/docs/ru/docs/tutorial/query-params.md
+++ b/docs/ru/docs/tutorial/query-params.md
@@ -69,7 +69,7 @@ http://127.0.0.1:8000/items/?skip=20
{!> ../../../docs_src/query_params/tutorial002_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9"
{!> ../../../docs_src/query_params/tutorial002.py!}
@@ -90,7 +90,7 @@ http://127.0.0.1:8000/items/?skip=20
{!> ../../../docs_src/query_params/tutorial003_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9"
{!> ../../../docs_src/query_params/tutorial003.py!}
@@ -143,7 +143,7 @@ http://127.0.0.1:8000/items/foo?short=yes
{!> ../../../docs_src/query_params/tutorial004_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="8 10"
{!> ../../../docs_src/query_params/tutorial004.py!}
@@ -209,7 +209,7 @@ http://127.0.0.1:8000/items/foo-item?needy=sooooneedy
{!> ../../../docs_src/query_params/tutorial006_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="10"
{!> ../../../docs_src/query_params/tutorial006.py!}
diff --git a/docs/ru/docs/tutorial/request-files.md b/docs/ru/docs/tutorial/request-files.md
new file mode 100644
index 0000000000..00f8c83770
--- /dev/null
+++ b/docs/ru/docs/tutorial/request-files.md
@@ -0,0 +1,314 @@
+# Загрузка файлов
+
+Используя класс `File`, мы можем позволить клиентам загружать файлы.
+
+!!! info "Дополнительная информация"
+ Чтобы получать загруженные файлы, сначала установите `python-multipart`.
+
+ Например: `pip install python-multipart`.
+
+ Это связано с тем, что загружаемые файлы передаются как данные формы.
+
+## Импорт `File`
+
+Импортируйте `File` и `UploadFile` из модуля `fastapi`:
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="3"
+ {!> ../../../docs_src/request_files/tutorial001_an_py39.py!}
+ ```
+
+=== "Python 3.6+"
+
+ ```Python hl_lines="1"
+ {!> ../../../docs_src/request_files/tutorial001_an.py!}
+ ```
+
+=== "Python 3.6+ без Annotated"
+
+ !!! tip "Подсказка"
+ Предпочтительнее использовать версию с аннотацией, если это возможно.
+
+ ```Python hl_lines="1"
+ {!> ../../../docs_src/request_files/tutorial001.py!}
+ ```
+
+## Определите параметры `File`
+
+Создайте параметры `File` так же, как вы это делаете для `Body` или `Form`:
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="9"
+ {!> ../../../docs_src/request_files/tutorial001_an_py39.py!}
+ ```
+
+=== "Python 3.6+"
+
+ ```Python hl_lines="8"
+ {!> ../../../docs_src/request_files/tutorial001_an.py!}
+ ```
+
+=== "Python 3.6+ без Annotated"
+
+ !!! tip "Подсказка"
+ Предпочтительнее использовать версию с аннотацией, если это возможно.
+
+ ```Python hl_lines="7"
+ {!> ../../../docs_src/request_files/tutorial001.py!}
+ ```
+
+!!! info "Дополнительная информация"
+ `File` - это класс, который наследуется непосредственно от `Form`.
+
+ Но помните, что когда вы импортируете `Query`, `Path`, `File` и другие из `fastapi`, на самом деле это функции, которые возвращают специальные классы.
+
+!!! tip "Подсказка"
+ Для объявления тела файла необходимо использовать `File`, поскольку в противном случае параметры будут интерпретироваться как параметры запроса или параметры тела (JSON).
+
+Файлы будут загружены как данные формы.
+
+Если вы объявите тип параметра у *функции операции пути* как `bytes`, то **FastAPI** прочитает файл за вас, и вы получите его содержимое в виде `bytes`.
+
+Следует иметь в виду, что все содержимое будет храниться в памяти. Это хорошо подходит для небольших файлов.
+
+Однако возможны случаи, когда использование `UploadFile` может оказаться полезным.
+
+## Загрузка файла с помощью `UploadFile`
+
+Определите параметр файла с типом `UploadFile`:
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="14"
+ {!> ../../../docs_src/request_files/tutorial001_an_py39.py!}
+ ```
+
+=== "Python 3.6+"
+
+ ```Python hl_lines="13"
+ {!> ../../../docs_src/request_files/tutorial001_an.py!}
+ ```
+
+=== "Python 3.6+ без Annotated"
+
+ !!! tip "Подсказка"
+ Предпочтительнее использовать версию с аннотацией, если это возможно.
+
+ ```Python hl_lines="12"
+ {!> ../../../docs_src/request_files/tutorial001.py!}
+ ```
+
+Использование `UploadFile` имеет ряд преимуществ перед `bytes`:
+
+* Использовать `File()` в значении параметра по умолчанию не обязательно.
+* При этом используется "буферный" файл:
+ * Файл, хранящийся в памяти до максимального предела размера, после преодоления которого он будет храниться на диске.
+* Это означает, что он будет хорошо работать с большими файлами, такими как изображения, видео, большие бинарные файлы и т.д., не потребляя при этом всю память.
+* Из загруженного файла можно получить метаданные.
+* Он реализует file-like `async` интерфейс.
+* Он предоставляет реальный объект Python `SpooledTemporaryFile` который вы можете передать непосредственно другим библиотекам, которые ожидают файл в качестве объекта.
+
+### `UploadFile`
+
+`UploadFile` имеет следующие атрибуты:
+
+* `filename`: Строка `str` с исходным именем файла, который был загружен (например, `myimage.jpg`).
+* `content_type`: Строка `str` с типом содержимого (MIME type / media type) (например, `image/jpeg`).
+* `file`: `SpooledTemporaryFile` (a file-like объект). Это фактический файл Python, который можно передавать непосредственно другим функциям или библиотекам, ожидающим файл в качестве объекта.
+
+`UploadFile` имеет следующие методы `async`. Все они вызывают соответствующие файловые методы (используя внутренний SpooledTemporaryFile).
+
+* `write(data)`: Записать данные `data` (`str` или `bytes`) в файл.
+* `read(size)`: Прочитать количество `size` (`int`) байт/символов из файла.
+* `seek(offset)`: Перейти к байту на позиции `offset` (`int`) в файле.
+ * Наример, `await myfile.seek(0)` перейдет к началу файла.
+ * Это особенно удобно, если вы один раз выполнили команду `await myfile.read()`, а затем вам нужно прочитать содержимое файла еще раз.
+* `close()`: Закрыть файл.
+
+Поскольку все эти методы являются `async` методами, вам следует использовать "await" вместе с ними.
+
+Например, внутри `async` *функции операции пути* можно получить содержимое с помощью:
+
+```Python
+contents = await myfile.read()
+```
+
+Если вы находитесь внутри обычной `def` *функции операции пути*, можно получить прямой доступ к файлу `UploadFile.file`, например:
+
+```Python
+contents = myfile.file.read()
+```
+
+!!! note "Технические детали `async`"
+ При использовании методов `async` **FastAPI** запускает файловые методы в пуле потоков и ожидает их.
+
+!!! note "Технические детали Starlette"
+ **FastAPI** наследует `UploadFile` непосредственно из **Starlette**, но добавляет некоторые детали для совместимости с **Pydantic** и другими частями FastAPI.
+
+## Про данные формы ("Form Data")
+
+Способ, которым HTML-формы (``) отправляют данные на сервер, обычно использует "специальную" кодировку для этих данных, отличную от JSON.
+
+**FastAPI** позаботится о том, чтобы считать эти данные из нужного места, а не из JSON.
+
+!!! note "Технические детали"
+ Данные из форм обычно кодируются с использованием "media type" `application/x-www-form-urlencoded` когда он не включает файлы.
+
+ Но когда форма включает файлы, она кодируется как multipart/form-data. Если вы используете `File`, **FastAPI** будет знать, что ему нужно получить файлы из нужной части тела.
+
+ Если вы хотите узнать больше об этих кодировках и полях форм, перейдите по ссылке MDN web docs for POST.
+
+!!! warning "Внимание"
+ В операции *функции операции пути* можно объявить несколько параметров `File` и `Form`, но нельзя также объявлять поля `Body`, которые предполагается получить в виде JSON, поскольку тело запроса будет закодировано с помощью `multipart/form-data`, а не `application/json`.
+
+ Это не является ограничением **FastAPI**, это часть протокола HTTP.
+
+## Необязательная загрузка файлов
+
+Вы можете сделать загрузку файла необязательной, используя стандартные аннотации типов и установив значение по умолчанию `None`:
+
+=== "Python 3.10+"
+
+ ```Python hl_lines="9 17"
+ {!> ../../../docs_src/request_files/tutorial001_02_an_py310.py!}
+ ```
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="9 17"
+ {!> ../../../docs_src/request_files/tutorial001_02_an_py39.py!}
+ ```
+
+=== "Python 3.6+"
+
+ ```Python hl_lines="10 18"
+ {!> ../../../docs_src/request_files/tutorial001_02_an.py!}
+ ```
+
+=== "Python 3.10+ без Annotated"
+
+ !!! tip "Подсказка"
+ Предпочтительнее использовать версию с аннотацией, если это возможно.
+
+ ```Python hl_lines="7 15"
+ {!> ../../../docs_src/request_files/tutorial001_02_py310.py!}
+ ```
+
+=== "Python 3.6+ без Annotated"
+
+ !!! tip "Подсказка"
+ Предпочтительнее использовать версию с аннотацией, если это возможно.
+
+ ```Python hl_lines="9 17"
+ {!> ../../../docs_src/request_files/tutorial001_02.py!}
+ ```
+
+## `UploadFile` с дополнительными метаданными
+
+Вы также можете использовать `File()` вместе с `UploadFile`, например, для установки дополнительных метаданных:
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="9 15"
+ {!> ../../../docs_src/request_files/tutorial001_03_an_py39.py!}
+ ```
+
+=== "Python 3.6+"
+
+ ```Python hl_lines="8 14"
+ {!> ../../../docs_src/request_files/tutorial001_03_an.py!}
+ ```
+
+=== "Python 3.6+ без Annotated"
+
+ !!! tip "Подсказка"
+ Предпочтительнее использовать версию с аннотацией, если это возможно.
+
+ ```Python hl_lines="7 13"
+ {!> ../../../docs_src/request_files/tutorial001_03.py!}
+ ```
+
+## Загрузка нескольких файлов
+
+Можно одновременно загружать несколько файлов.
+
+Они будут связаны с одним и тем же "полем формы", отправляемым с помощью данных формы.
+
+Для этого необходимо объявить список `bytes` или `UploadFile`:
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="10 15"
+ {!> ../../../docs_src/request_files/tutorial002_an_py39.py!}
+ ```
+
+=== "Python 3.6+"
+
+ ```Python hl_lines="11 16"
+ {!> ../../../docs_src/request_files/tutorial002_an.py!}
+ ```
+
+=== "Python 3.9+ без Annotated"
+
+ !!! tip "Подсказка"
+ Предпочтительнее использовать версию с аннотацией, если это возможно.
+
+ ```Python hl_lines="8 13"
+ {!> ../../../docs_src/request_files/tutorial002_py39.py!}
+ ```
+
+=== "Python 3.6+ без Annotated"
+
+ !!! tip "Подсказка"
+ Предпочтительнее использовать версию с аннотацией, если это возможно.
+
+ ```Python hl_lines="10 15"
+ {!> ../../../docs_src/request_files/tutorial002.py!}
+ ```
+
+Вы получите, как и было объявлено, список `list` из `bytes` или `UploadFile`.
+
+!!! note "Technical Details"
+ Можно также использовать `from starlette.responses import HTMLResponse`.
+
+ **FastAPI** предоставляет тот же `starlette.responses`, что и `fastapi.responses`, просто для удобства разработчика. Однако большинство доступных ответов поступает непосредственно из Starlette.
+
+### Загрузка нескольких файлов с дополнительными метаданными
+
+Так же, как и раньше, вы можете использовать `File()` для задания дополнительных параметров, даже для `UploadFile`:
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="11 18-20"
+ {!> ../../../docs_src/request_files/tutorial003_an_py39.py!}
+ ```
+
+=== "Python 3.6+"
+
+ ```Python hl_lines="12 19-21"
+ {!> ../../../docs_src/request_files/tutorial003_an.py!}
+ ```
+
+=== "Python 3.9+ без Annotated"
+
+ !!! tip "Подсказка"
+ Предпочтительнее использовать версию с аннотацией, если это возможно.
+
+ ```Python hl_lines="9 16"
+ {!> ../../../docs_src/request_files/tutorial003_py39.py!}
+ ```
+
+=== "Python 3.6+ без Annotated"
+
+ !!! tip "Подсказка"
+ Предпочтительнее использовать версию с аннотацией, если это возможно.
+
+ ```Python hl_lines="11 18"
+ {!> ../../../docs_src/request_files/tutorial003.py!}
+ ```
+
+## Резюме
+
+Используйте `File`, `bytes` и `UploadFile` для работы с файлами, которые будут загружаться и передаваться в виде данных формы.
diff --git a/docs/ru/docs/tutorial/request-forms-and-files.md b/docs/ru/docs/tutorial/request-forms-and-files.md
new file mode 100644
index 0000000000..3f587c38a3
--- /dev/null
+++ b/docs/ru/docs/tutorial/request-forms-and-files.md
@@ -0,0 +1,69 @@
+# Файлы и формы в запросе
+
+Вы можете определять файлы и поля формы одновременно, используя `File` и `Form`.
+
+!!! info "Дополнительная информация"
+ Чтобы получать загруженные файлы и/или данные форм, сначала установите `python-multipart`.
+
+ Например: `pip install python-multipart`.
+
+## Импортируйте `File` и `Form`
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="3"
+ {!> ../../../docs_src/request_forms_and_files/tutorial001_an_py39.py!}
+ ```
+
+=== "Python 3.6+"
+
+ ```Python hl_lines="1"
+ {!> ../../../docs_src/request_forms_and_files/tutorial001_an.py!}
+ ```
+
+=== "Python 3.6+ без Annotated"
+
+ !!! tip "Подсказка"
+ Предпочтительнее использовать версию с аннотацией, если это возможно.
+
+ ```Python hl_lines="1"
+ {!> ../../../docs_src/request_forms_and_files/tutorial001.py!}
+ ```
+
+## Определите параметры `File` и `Form`
+
+Создайте параметры файла и формы таким же образом, как для `Body` или `Query`:
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="10-12"
+ {!> ../../../docs_src/request_forms_and_files/tutorial001_an_py39.py!}
+ ```
+
+=== "Python 3.6+"
+
+ ```Python hl_lines="9-11"
+ {!> ../../../docs_src/request_forms_and_files/tutorial001_an.py!}
+ ```
+
+=== "Python 3.6+ без Annotated"
+
+ !!! tip "Подсказка"
+ Предпочтительнее использовать версию с аннотацией, если это возможно.
+
+ ```Python hl_lines="8"
+ {!> ../../../docs_src/request_forms_and_files/tutorial001.py!}
+ ```
+
+Файлы и поля формы будут загружены в виде данных формы, и вы получите файлы и поля формы.
+
+Вы можете объявить некоторые файлы как `bytes`, а некоторые - как `UploadFile`.
+
+!!! warning "Внимание"
+ Вы можете объявить несколько параметров `File` и `Form` в операции *path*, но вы не можете также объявить поля `Body`, которые вы ожидаете получить в виде JSON, так как запрос будет иметь тело, закодированное с помощью `multipart/form-data` вместо `application/json`.
+
+ Это не ограничение **Fast API**, это часть протокола HTTP.
+
+## Резюме
+
+Используйте `File` и `Form` вместе, когда необходимо получить данные и файлы в одном запросе.
diff --git a/docs/ru/docs/tutorial/request-forms.md b/docs/ru/docs/tutorial/request-forms.md
index a20cf78e0a..0fc9e4eda4 100644
--- a/docs/ru/docs/tutorial/request-forms.md
+++ b/docs/ru/docs/tutorial/request-forms.md
@@ -17,13 +17,13 @@
{!> ../../../docs_src/request_forms/tutorial001_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="1"
{!> ../../../docs_src/request_forms/tutorial001_an.py!}
```
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
!!! tip "Подсказка"
Рекомендуется использовать 'Annotated' версию, если это возможно.
@@ -42,13 +42,13 @@
{!> ../../../docs_src/request_forms/tutorial001_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="8"
{!> ../../../docs_src/request_forms/tutorial001_an.py!}
```
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
!!! tip "Подсказка"
Рекомендуется использовать 'Annotated' версию, если это возможно.
diff --git a/docs/ru/docs/tutorial/response-model.md b/docs/ru/docs/tutorial/response-model.md
index c5e111790d..38b45e2a57 100644
--- a/docs/ru/docs/tutorial/response-model.md
+++ b/docs/ru/docs/tutorial/response-model.md
@@ -16,7 +16,7 @@ FastAPI позволяет использовать **аннотации тип
{!> ../../../docs_src/response_model/tutorial001_01_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="18 23"
{!> ../../../docs_src/response_model/tutorial001_01.py!}
@@ -65,7 +65,7 @@ FastAPI будет использовать этот возвращаемый т
{!> ../../../docs_src/response_model/tutorial001_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="17 22 24-27"
{!> ../../../docs_src/response_model/tutorial001.py!}
@@ -101,7 +101,7 @@ FastAPI будет использовать значение `response_model` д
{!> ../../../docs_src/response_model/tutorial002_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9 11"
{!> ../../../docs_src/response_model/tutorial002.py!}
@@ -120,7 +120,7 @@ FastAPI будет использовать значение `response_model` д
{!> ../../../docs_src/response_model/tutorial002_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="18"
{!> ../../../docs_src/response_model/tutorial002.py!}
@@ -145,7 +145,7 @@ FastAPI будет использовать значение `response_model` д
{!> ../../../docs_src/response_model/tutorial003_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9 11 16"
{!> ../../../docs_src/response_model/tutorial003.py!}
@@ -159,7 +159,7 @@ FastAPI будет использовать значение `response_model` д
{!> ../../../docs_src/response_model/tutorial003_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="24"
{!> ../../../docs_src/response_model/tutorial003.py!}
@@ -173,7 +173,7 @@ FastAPI будет использовать значение `response_model` д
{!> ../../../docs_src/response_model/tutorial003_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="22"
{!> ../../../docs_src/response_model/tutorial003.py!}
@@ -207,7 +207,7 @@ FastAPI будет использовать значение `response_model` д
{!> ../../../docs_src/response_model/tutorial003_01_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9-13 15-16 20"
{!> ../../../docs_src/response_model/tutorial003_01.py!}
@@ -283,7 +283,7 @@ FastAPI совместно с Pydantic выполнит некоторую ма
{!> ../../../docs_src/response_model/tutorial003_04_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="10"
{!> ../../../docs_src/response_model/tutorial003_04.py!}
@@ -305,7 +305,7 @@ FastAPI совместно с Pydantic выполнит некоторую ма
{!> ../../../docs_src/response_model/tutorial003_05_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="9"
{!> ../../../docs_src/response_model/tutorial003_05.py!}
@@ -329,7 +329,7 @@ FastAPI совместно с Pydantic выполнит некоторую ма
{!> ../../../docs_src/response_model/tutorial004_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="11 13-14"
{!> ../../../docs_src/response_model/tutorial004.py!}
@@ -359,7 +359,7 @@ FastAPI совместно с Pydantic выполнит некоторую ма
{!> ../../../docs_src/response_model/tutorial004_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="24"
{!> ../../../docs_src/response_model/tutorial004.py!}
@@ -446,7 +446,7 @@ FastAPI достаточно умен (на самом деле, это засл
{!> ../../../docs_src/response_model/tutorial005_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="31 37"
{!> ../../../docs_src/response_model/tutorial005.py!}
@@ -467,7 +467,7 @@ FastAPI достаточно умен (на самом деле, это засл
{!> ../../../docs_src/response_model/tutorial006_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="31 37"
{!> ../../../docs_src/response_model/tutorial006.py!}
diff --git a/docs/ru/docs/tutorial/schema-extra-example.md b/docs/ru/docs/tutorial/schema-extra-example.md
index a0363b9ba7..a13ab59354 100644
--- a/docs/ru/docs/tutorial/schema-extra-example.md
+++ b/docs/ru/docs/tutorial/schema-extra-example.md
@@ -14,7 +14,7 @@
{!> ../../../docs_src/schema_extra_example/tutorial001_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="15-23"
{!> ../../../docs_src/schema_extra_example/tutorial001.py!}
@@ -39,7 +39,7 @@
{!> ../../../docs_src/schema_extra_example/tutorial002_py310.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="4 10-13"
{!> ../../../docs_src/schema_extra_example/tutorial002.py!}
@@ -78,7 +78,7 @@
{!> ../../../docs_src/schema_extra_example/tutorial003_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="23-28"
{!> ../../../docs_src/schema_extra_example/tutorial003_an.py!}
@@ -93,7 +93,7 @@
{!> ../../../docs_src/schema_extra_example/tutorial003_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip Заметка
Рекомендуется использовать версию с `Annotated`, если это возможно.
@@ -133,7 +133,7 @@
{!> ../../../docs_src/schema_extra_example/tutorial004_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="24-50"
{!> ../../../docs_src/schema_extra_example/tutorial004_an.py!}
@@ -148,7 +148,7 @@
{!> ../../../docs_src/schema_extra_example/tutorial004_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip Заметка
Рекомендуется использовать версию с `Annotated`, если это возможно.
diff --git a/docs/ru/docs/tutorial/testing.md b/docs/ru/docs/tutorial/testing.md
index 3f90051123..ca47a6f51e 100644
--- a/docs/ru/docs/tutorial/testing.md
+++ b/docs/ru/docs/tutorial/testing.md
@@ -122,7 +122,7 @@
{!> ../../../docs_src/app_testing/app_b_an_py39/main.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python
{!> ../../../docs_src/app_testing/app_b_an/main.py!}
@@ -137,7 +137,7 @@
{!> ../../../docs_src/app_testing/app_b_py310/main.py!}
```
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
!!! tip "Подсказка"
По возможности используйте версию с `Annotated`.
diff --git a/docs/tr/docs/external-links.md b/docs/tr/docs/external-links.md
new file mode 100644
index 0000000000..78eaf1729d
--- /dev/null
+++ b/docs/tr/docs/external-links.md
@@ -0,0 +1,33 @@
+# Harici Bağlantılar ve Makaleler
+
+**FastAPI** sürekli büyüyen harika bir topluluğa sahiptir.
+
+**FastAPI** ile alakalı birçok yazı, makale, araç ve proje bulunmaktadır.
+
+Bunlardan bazılarının tamamlanmamış bir listesi aşağıda bulunmaktadır.
+
+!!! tip "İpucu"
+ Eğer **FastAPI** ile alakalı henüz burada listelenmemiş bir makale, proje, araç veya başka bir şeyiniz varsa, bunu eklediğiniz bir Pull Request oluşturabilirsiniz.
+
+{% for section_name, section_content in external_links.items() %}
+
+## {{ section_name }}
+
+{% for lang_name, lang_content in section_content.items() %}
+
+### {{ lang_name }}
+
+{% for item in lang_content %}
+
+* {{ item.title }} by {{ item.author }}.
+
+{% endfor %}
+{% endfor %}
+{% endfor %}
+
+## Projeler
+
+`fastapi` konulu en son GitHub projeleri:
+
+
- FastAPI framework, yüksek performanslı, öğrenmesi kolay, geliştirmesi hızlı, kullanıma sunulmaya hazır. + FastAPI framework, yüksek performanslı, öğrenmesi oldukça kolay, kodlaması hızlı, kullanıma hazır
--- -**dokümantasyon**: https://fastapi.tiangolo.com +**Dokümantasyon**: https://fastapi.tiangolo.com -**Kaynak kodu**: https://github.com/tiangolo/fastapi +**Kaynak Kod**: https://github.com/tiangolo/fastapi --- -FastAPI, Python 3.6+'nın standart type hintlerine dayanan modern ve hızlı (yüksek performanslı) API'lar oluşturmak için kullanılabilecek web framework'ü. +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. -Ana özellikleri: +Temel özellikleri şunlardır: -* **Hızlı**: çok yüksek performanslı, **NodeJS** ve **Go** ile eşdeğer seviyede performans sağlıyor, (Starlette ve Pydantic sayesinde.) [Python'un en hızlı frameworklerinden bir tanesi.](#performans). -* **Kodlaması hızlı**: Yeni özellikler geliştirmek neredeyse %200 - %300 daha hızlı. * -* **Daha az bug**: Geliştirici (insan) kaynaklı hatalar neredeyse %40 azaltıldı. * -* **Sezgileri güçlü**: Editor (otomatik-tamamlama) desteği harika. Otomatik tamamlama her yerde. Debuglamak ile daha az zaman harcayacaksınız. -* **Kolay**: Öğrenmesi ve kullanması kolay olacak şekilde. Doküman okumak için harcayacağınız süre azaltıldı. -* **Kısa**: Kod tekrarını minimuma indirdik. Fonksiyon parametrelerinin tiplerini belirtmede farklı yollar sunarak karşılaşacağınız bug'ları azalttık. -* **Güçlü**: Otomatik dokümantasyon ile beraber, kullanıma hazır kod yaz. +* **Hızlı**: Çok yüksek performanslı, **NodeJS** ve **Go** ile eşit düzeyde (Starlette ve Pydantic sayesinde). [En hızlı Python framework'lerinden bir tanesidir](#performans). +* **Kodlaması Hızlı**: Geliştirme hızını yaklaşık %200 ile %300 aralığında arttırır. * +* **Daha az hata**: İnsan (geliştirici) kaynaklı hataları yaklaşık %40 azaltır. * +* **Sezgisel**: Muhteşem bir editör desteği. Her yerde otomatik tamamlama. Hata ayıklama ile daha az zaman harcayacaksınız. +* **Kolay**: Öğrenmesi ve kullanması kolay olacak şekilde tasarlandı. Doküman okuma ile daha az zaman harcayacaksınız. +* **Kısa**: Kod tekrarı minimize edildi. Her parametre tanımlamasında birden fazla özellik ve daha az hatayla karşılaşacaksınız. +* **Güçlü**: Otomatik ve etkileşimli dokümantasyon ile birlikte, kullanıma hazır kod elde edebilirsiniz. +* **Standard öncelikli**: API'lar için açık standartlara dayalı (ve tamamen uyumlu); OpenAPI (eski adıyla Swagger) ve JSON Schema. -* **Standartlar belirli**: Tamamiyle API'ların açık standartlara bağlı ve (tam uyumlululuk içerisinde); OpenAPI (eski adıyla Swagger) ve JSON Schema. +* ilgili kanılar, dahili geliştirme ekibinin geliştirdikleri ürünlere yaptıkları testlere dayanmaktadır. -* Bahsi geçen rakamsal ifadeler tamamiyle, geliştirme takımının kendi sundukları ürünü geliştirirken yaptıkları testlere dayanmakta. - -## Sponsors +## Sponsorlar @@ -55,74 +57,72 @@ Ana özellikleri: -Other sponsors +Diğer Sponsorlar ## Görüşler - -"_[...] Bugünlerde **FastAPI**'ı çok fazla kullanıyorum [...] Aslına bakarsanız **Microsoft'taki Machine Learning servislerimizin** hepsinde kullanmayı düşünüyorum. FastAPI ile geliştirdiğimiz servislerin bazıları çoktan **Windows**'un ana ürünlerine ve **Office** ürünlerine entegre edilmeye başlandı bile._" +"_[...] Bugünlerde **FastAPI**'ı çok fazla kullanıyorum. [...] Aslında bunu ekibimin **Microsoft'taki Machine Learning servislerinin** tamamında kullanmayı planlıyorum. Bunlardan bazıları **Windows**'un ana ürünlerine ve **Office** ürünlerine entegre ediliyor._"async def...uvicorn main:app --reload hakkında...uvicorn main:app --reload komutuyla ilgili...email_validator - email doğrulaması için.
+* pydantic-settings - ayar yönetimi için.
+* pydantic-extra-types - Pydantic ile birlikte kullanılabilecek ek tipler için.
Starlette tarafında kullanılan:
-* httpx - Eğer `TestClient` kullanmak istiyorsan gerekli.
-* jinja2 - Eğer kendine ait template konfigürasyonu oluşturmak istiyorsan gerekli
-* python-multipart - Form kullanmak istiyorsan gerekli ("dönüşümü").
+* httpx - Eğer `TestClient` yapısını kullanacaksanız gereklidir.
+* jinja2 - Eğer varsayılan template konfigürasyonunu kullanacaksanız gereklidir.
+* 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).
-* graphene - `GraphQLApp` desteği için gerekli.
-* ujson - `UJSONResponse` kullanmak istiyorsan gerekli.
+* ujson - `UJSONResponse` kullanacaksanız gerekli.
Hem FastAPI hem de Starlette tarafından kullanılan:
-* uvicorn - oluşturduğumuz uygulamayı bir web sunucusuna servis etmek için gerekli
-* orjson - `ORJSONResponse` kullanmak istiyor isen gerekli.
+* uvicorn - oluşturduğumuz uygulamayı servis edecek web sunucusu görevini üstlenir.
+* orjson - `ORJSONResponse` kullanacaksanız gereklidir.
Bunların hepsini `pip install fastapi[all]` ile yükleyebilirsin.
## Lisans
-Bu proje, MIT lisansı şartlarına göre lisanslanmıştır.
+Bu proje, MIT lisansı şartları altında lisanslanmıştır.
diff --git a/docs/tr/docs/newsletter.md b/docs/tr/docs/newsletter.md
new file mode 100644
index 0000000000..22ca1b1e29
--- /dev/null
+++ b/docs/tr/docs/newsletter.md
@@ -0,0 +1,5 @@
+# FastAPI ve Arkadaşları Bülteni
+
+
+
+
diff --git a/docs/uk/docs/alternatives.md b/docs/uk/docs/alternatives.md
new file mode 100644
index 0000000000..e712579769
--- /dev/null
+++ b/docs/uk/docs/alternatives.md
@@ -0,0 +1,412 @@
+# Альтернативи, натхнення та порівняння
+
+Що надихнуло на створення **FastAPI**, який він у порінянні з іншими альтернативами та чого він у них навчився.
+
+## Вступ
+
+**FastAPI** не існувало б, якби не попередні роботи інших.
+
+Раніше було створено багато інструментів, які надихнули на його створення.
+
+Я кілька років уникав створення нового фреймворку. Спочатку я спробував вирішити всі функції, охоплені **FastAPI**, використовуючи багато різних фреймворків, плагінів та інструментів.
+
+Але в якийсь момент не було іншого виходу, окрім створення чогось, що надавало б усі ці функції, взявши найкращі ідеї з попередніх інструментів і поєднавши їх найкращим чином, використовуючи мовні функції, які навіть не були доступні раніше (Python 3.6+ підказки типів).
+
+## Попередні інструменти
+
+### Django
+
+Це найпопулярніший фреймворк Python, який користується широкою довірою. Він використовується для створення таких систем, як Instagram.
+
+Він відносно тісно пов’язаний з реляційними базами даних (наприклад, MySQL або PostgreSQL), тому мати базу даних NoSQL (наприклад, Couchbase, MongoDB, Cassandra тощо) як основний механізм зберігання не дуже просто.
+
+Він був створений для створення HTML у серверній частині, а не для створення API, які використовуються сучасним інтерфейсом (як-от React, Vue.js і Angular) або іншими системами (як-от IoT пристрої), які спілкуються з ним.
+
+### Django REST Framework
+
+Фреймворк Django REST був створений як гнучкий інструментарій для створення веб-інтерфейсів API використовуючи Django в основі, щоб покращити його можливості API.
+
+Його використовують багато компаній, включаючи Mozilla, Red Hat і Eventbrite.
+
+Це був один із перших прикладів **автоматичної документації API**, і саме це була одна з перших ідей, яка надихнула на «пошук» **FastAPI**.
+
+!!! Примітка
+ Django REST Framework створив Том Крісті. Той самий творець Starlette і Uvicorn, на яких базується **FastAPI**.
+
+
+!!! Перегляньте "Надихнуло **FastAPI** на"
+ Мати автоматичний веб-інтерфейс документації API.
+
+### Flask
+
+Flask — це «мікрофреймворк», він не включає інтеграцію бази даних, а також багато речей, які за замовчуванням є в Django.
+
+Ця простота та гнучкість дозволяють використовувати бази даних NoSQL як основну систему зберігання даних.
+
+Оскільки він дуже простий, він порівняно легкий та інтуїтивний для освоєння, хоча в деяких моментах документація стає дещо технічною.
+
+Він також зазвичай використовується для інших програм, яким не обов’язково потрібна база даних, керування користувачами або будь-яка з багатьох функцій, які є попередньо вбудованими в Django. Хоча багато з цих функцій можна додати за допомогою плагінів.
+
+Відокремлення частин було ключовою особливістю, яку я хотів зберегти, при цьому залишаючись «мікрофреймворком», який можна розширити, щоб охопити саме те, що потрібно.
+
+Враховуючи простоту Flask, він здавався хорошим підходом для створення API. Наступним, що знайшов, був «Django REST Framework» для Flask.
+
+!!! Переглянте "Надихнуло **FastAPI** на"
+ Бути мікрофреймоворком. Зробити легким комбінування та поєднання необхідних інструментів та частин.
+
+ Мати просту та легку у використанні систему маршрутизації.
+
+
+### Requests
+
+**FastAPI** насправді не є альтернативою **Requests**. Сфера їх застосування дуже різна.
+
+Насправді цілком звична річ використовувати Requests *всередині* програми FastAPI.
+
+Але все ж FastAPI черпав натхнення з Requests.
+
+**Requests** — це бібліотека для *взаємодії* з API (як клієнт), а **FastAPI** — це бібліотека для *створення* API (як сервер).
+
+Вони більш-менш знаходяться на протилежних кінцях, доповнюючи одна одну.
+
+Requests мають дуже простий та інтуїтивно зрозумілий дизайн, дуже простий у використанні, з розумними параметрами за замовчуванням. Але в той же час він дуже потужний і налаштовується.
+
+Ось чому, як сказано на офіційному сайті:
+
+> Requests є одним із найбільш завантажуваних пакетів Python усіх часів
+
+Використовувати його дуже просто. Наприклад, щоб виконати запит `GET`, ви повинні написати:
+
+```Python
+response = requests.get("http://example.com/some/url")
+```
+
+Відповідна операція *роуту* API FastAPI може виглядати так:
+
+```Python hl_lines="1"
+@app.get("/some/url")
+def read_url():
+ return {"message": "Hello World"}
+```
+
+Зверніть увагу на схожість у `requests.get(...)` і `@app.get(...)`.
+
+!!! Перегляньте "Надихнуло **FastAPI** на"
+ * Майте простий та інтуїтивно зрозумілий API.
+ * Використовуйте імена (операції) методів HTTP безпосередньо, простим та інтуїтивно зрозумілим способом.
+ * Розумні параметри за замовчуванням, але потужні налаштування.
+
+
+### Swagger / OpenAPI
+
+Головною функцією, яку я хотів від Django REST Framework, була автоматична API документація.
+
+Потім я виявив, що існує стандарт для документування API з використанням JSON (або YAML, розширення JSON) під назвою Swagger.
+
+І вже був створений веб-інтерфейс користувача для Swagger API. Отже, можливість генерувати документацію Swagger для API дозволить використовувати цей веб-інтерфейс автоматично.
+
+У якийсь момент Swagger було передано Linux Foundation, щоб перейменувати його на OpenAPI.
+
+Тому, коли говорять про версію 2.0, прийнято говорити «Swagger», а про версію 3+ «OpenAPI».
+
+!!! Перегляньте "Надихнуло **FastAPI** на"
+ Прийняти і використовувати відкритий стандарт для специфікацій API замість спеціальної схеми.
+
+ Інтегрувати інструменти інтерфейсу на основі стандартів:
+
+ * Інтерфейс Swagger
+ * ReDoc
+
+ Ці два було обрано через те, що вони досить популярні та стабільні, але, виконавши швидкий пошук, ви можете знайти десятки додаткових альтернативних інтерфейсів для OpenAPI (які можна використовувати з **FastAPI**).
+
+### Фреймворки REST для Flask
+
+Існує кілька фреймворків Flask REST, але, витративши час і роботу на їх дослідження, я виявив, що багато з них припинено або залишено, з кількома постійними проблемами, які зробили їх непридатними.
+
+### Marshmallow
+
+Однією з головних функцій, необхідних для систем API, є "серіалізація", яка бере дані з коду (Python) і перетворює їх на щось, що можна надіслати через мережу. Наприклад, перетворення об’єкта, що містить дані з бази даних, на об’єкт JSON. Перетворення об’єктів `datetime` на строки тощо.
+
+Іншою важливою функцією, необхідною для API, є перевірка даних, яка забезпечує дійсність даних за певними параметрами. Наприклад, що деяке поле є `int`, а не деяка випадкова строка. Це особливо корисно для вхідних даних.
+
+Без системи перевірки даних вам довелося б виконувати всі перевірки вручну, у коді.
+
+Marshmallow створено для забезпечення цих функцій. Це чудова бібліотека, і я часто нею користувався раніше.
+
+Але він був створений до того, як існували підказки типу Python. Отже, щоб визначити кожну схему, вам потрібно використовувати спеціальні утиліти та класи, надані Marshmallow.
+
+!!! Перегляньте "Надихнуло **FastAPI** на"
+ Використовувати код для автоматичного визначення "схем", які надають типи даних і перевірку.
+
+### Webargs
+
+Іншою важливою функцією, необхідною для API, є аналіз даних із вхідних запитів.
+
+Webargs — це інструмент, створений, щоб забезпечити це поверх кількох фреймворків, включаючи Flask.
+
+Він використовує Marshmallow в основі для перевірки даних. І створений тими ж розробниками.
+
+Це чудовий інструмент, і я також часто використовував його, перш ніж створити **FastAPI**.
+
+!!! Інформація
+ Webargs був створений тими ж розробниками Marshmallow.
+
+!!! Перегляньте "Надихнуло **FastAPI** на"
+ Мати автоматичну перевірку даних вхідного запиту.
+
+### APISpec
+
+Marshmallow і Webargs забезпечують перевірку, аналіз і серіалізацію як плагіни.
+
+Але документація досі відсутня. Потім було створено APISpec.
+
+Це плагін для багатьох фреймворків (також є плагін для Starlette).
+
+Принцип роботи полягає в тому, що ви пишете визначення схеми, використовуючи формат YAML, у docstring кожної функції, що обробляє маршрут.
+
+І він генерує схеми OpenAPI.
+
+Так це працює у Flask, Starlette, Responder тощо.
+
+Але потім ми знову маємо проблему наявності мікросинтаксису всередині Python строки (великий YAML).
+
+Редактор тут нічим не може допомогти. І якщо ми змінимо параметри чи схеми Marshmallow і забудемо також змінити цю строку документа YAML, згенерована схема буде застарілою.
+
+!!! Інформація
+ APISpec був створений тими ж розробниками Marshmallow.
+
+
+!!! Перегляньте "Надихнуло **FastAPI** на"
+ Підтримувати відкритий стандарт API, OpenAPI.
+
+### Flask-apispec
+
+Це плагін Flask, який об’єднує Webargs, Marshmallow і APISpec.
+
+Він використовує інформацію з Webargs і Marshmallow для автоматичного створення схем OpenAPI за допомогою APISpec.
+
+Це чудовий інструмент, дуже недооцінений. Він має бути набагато популярнішим, ніж багато плагінів Flask. Це може бути пов’язано з тим, що його документація надто стисла й абстрактна.
+
+Це вирішило необхідність писати YAML (інший синтаксис) всередині рядків документів Python.
+
+Ця комбінація Flask, Flask-apispec із Marshmallow і Webargs була моїм улюбленим бекенд-стеком до створення **FastAPI**.
+
+Їі використання призвело до створення кількох генераторів повного стека Flask. Це основний стек, який я (та кілька зовнішніх команд) використовував досі:
+
+* https://github.com/tiangolo/full-stack
+* https://github.com/tiangolo/full-stack-flask-couchbase
+* https://github.com/tiangolo/full-stack-flask-couchdb
+
+І ці самі генератори повного стеку були основою [**FastAPI** генераторів проектів](project-generation.md){.internal-link target=_blank}.
+
+!!! Інформація
+ Flask-apispec був створений тими ж розробниками Marshmallow.
+
+!!! Перегляньте "Надихнуло **FastAPI** на"
+ Створення схеми OpenAPI автоматично з того самого коду, який визначає серіалізацію та перевірку.
+
+### NestJS (та Angular)
+
+Це навіть не Python, NestJS — це фреймворк NodeJS JavaScript (TypeScript), натхненний Angular.
+
+Це досягає чогось подібного до того, що можна зробити з Flask-apispec.
+
+Він має інтегровану систему впровадження залежностей, натхненну Angular two. Він потребує попередньої реєстрації «injectables» (як і всі інші системи впровадження залежностей, які я знаю), тому це збільшує багатослівність та повторення коду.
+
+Оскільки параметри описані за допомогою типів TypeScript (подібно до підказок типу Python), підтримка редактора досить хороша.
+
+Але оскільки дані TypeScript не зберігаються після компіляції в JavaScript, вони не можуть покладатися на типи для визначення перевірки, серіалізації та документації одночасно. Через це та деякі дизайнерські рішення, щоб отримати перевірку, серіалізацію та автоматичну генерацію схеми, потрібно додати декоратори в багатьох місцях. Таким чином код стає досить багатослівним.
+
+Він не дуже добре обробляє вкладені моделі. Отже, якщо тіло JSON у запиті є об’єктом JSON із внутрішніми полями, які, у свою чергу, є вкладеними об’єктами JSON, його неможливо належним чином задокументувати та перевірити.
+
+!!! Перегляньте "Надихнуло **FastAPI** на"
+ Використовувати типи Python, щоб мати чудову підтримку редактора.
+
+ Мати потужну систему впровадження залежностей. Знайдіть спосіб звести до мінімуму повторення коду.
+
+### Sanic
+
+Це був один із перших надзвичайно швидких фреймворків Python на основі `asyncio`. Він був дуже схожий на Flask.
+
+!!! Примітка "Технічні деталі"
+ Він використовував `uvloop` замість стандартного циклу Python `asyncio`. Ось що зробило його таким швидким.
+
+ Це явно надихнуло Uvicorn і Starlette, які зараз швидші за Sanic у відкритих тестах.
+
+!!! Перегляньте "Надихнуло **FastAPI** на"
+ Знайти спосіб отримати божевільну продуктивність.
+
+ Ось чому **FastAPI** базується на Starlette, оскільки це найшвидша доступна структура (перевірена тестами сторонніх розробників).
+
+### Falcon
+
+Falcon — ще один високопродуктивний фреймворк Python, він розроблений як мінімальний і працює як основа інших фреймворків, таких як Hug.
+
+Він розроблений таким чином, щоб мати функції, які отримують два параметри, один «запит» і один «відповідь». Потім ви «читаєте» частини запиту та «записуєте» частини у відповідь. Через такий дизайн неможливо оголосити параметри запиту та тіла за допомогою стандартних підказок типу Python як параметри функції.
+
+Таким чином, перевірка даних, серіалізація та документація повинні виконуватися в коді, а не автоматично. Або вони повинні бути реалізовані як фреймворк поверх Falcon, як Hug. Така сама відмінність спостерігається в інших фреймворках, натхненних дизайном Falcon, що мають один об’єкт запиту та один об’єкт відповіді як параметри.
+
+!!! Перегляньте "Надихнуло **FastAPI** на"
+ Знайти способи отримати чудову продуктивність.
+
+ Разом із Hug (оскільки Hug базується на Falcon) надихнув **FastAPI** оголосити параметр `response` у функціях.
+
+ Хоча у FastAPI це необов’язково, і використовується в основному для встановлення заголовків, файлів cookie та альтернативних кодів стану.
+
+### Molten
+
+Я відкрив для себе Molten на перших етапах створення **FastAPI**. І він має досить схожі ідеї:
+
+* Базується на підказках типу Python.
+* Перевірка та документація цих типів.
+* Система впровадження залежностей.
+
+Він не використовує перевірку даних, серіалізацію та бібліотеку документації сторонніх розробників, як Pydantic, він має свою власну. Таким чином, ці визначення типів даних не можна було б використовувати повторно так легко.
+
+Це вимагає трохи більш докладних конфігурацій. І оскільки він заснований на WSGI (замість ASGI), він не призначений для використання високопродуктивних інструментів, таких як Uvicorn, Starlette і Sanic.
+
+Система впровадження залежностей вимагає попередньої реєстрації залежностей, і залежності вирішуються на основі оголошених типів. Отже, неможливо оголосити більше ніж один «компонент», який надає певний тип.
+
+Маршрути оголошуються в одному місці з використанням функцій, оголошених в інших місцях (замість використання декораторів, які можна розмістити безпосередньо поверх функції, яка обробляє кінцеву точку). Це ближче до того, як це робить Django, ніж до Flask (і Starlette). Він розділяє в коді речі, які відносно тісно пов’язані.
+
+!!! Перегляньте "Надихнуло **FastAPI** на"
+ Визначити додаткові перевірки для типів даних, використовуючи значення "за замовчуванням" атрибутів моделі. Це покращує підтримку редактора, а раніше вона була недоступна в Pydantic.
+
+ Це фактично надихнуло оновити частини Pydantic, щоб підтримувати той самий стиль оголошення перевірки (всі ці функції вже доступні в Pydantic).
+
+### Hug
+
+Hug був одним із перших фреймворків, який реалізував оголошення типів параметрів API за допомогою підказок типу Python. Це була чудова ідея, яка надихнула інші інструменти зробити те саме.
+
+Він використовував спеціальні типи у своїх оголошеннях замість стандартних типів Python, але це все одно був величезний крок вперед.
+
+Це також був один із перших фреймворків, який генерував спеціальну схему, що оголошувала весь API у JSON.
+
+Він не базувався на таких стандартах, як OpenAPI та JSON Schema. Тому було б непросто інтегрувати його з іншими інструментами, як-от Swagger UI. Але знову ж таки, це була дуже інноваційна ідея.
+
+Він має цікаву незвичайну функцію: використовуючи ту саму структуру, можна створювати API, а також CLI.
+
+Оскільки він заснований на попередньому стандарті для синхронних веб-фреймворків Python (WSGI), він не може працювати з Websockets та іншими речами, хоча він також має високу продуктивність.
+
+!!! Інформація
+ Hug створив Тімоті Крослі, той самий творець `isort`, чудовий інструмент для автоматичного сортування імпорту у файлах Python.
+
+!!! Перегляньте "Надихнуло **FastAPI** на"
+ Hug надихнув частину APIStar і був одним із найбільш перспективних інструментів, поряд із APIStar.
+
+ Hug надихнув **FastAPI** на використання підказок типу Python для оголошення параметрів і автоматичного створення схеми, що визначає API.
+
+ Hug надихнув **FastAPI** оголосити параметр `response` у функціях для встановлення заголовків і файлів cookie.
+
+### APIStar (<= 0,5)
+
+Безпосередньо перед тим, як вирішити створити **FastAPI**, я знайшов сервер **APIStar**. Він мав майже все, що я шукав, і мав чудовий дизайн.
+
+Це була одна з перших реалізацій фреймворку, що використовує підказки типу Python для оголошення параметрів і запитів, яку я коли-небудь бачив (до NestJS і Molten). Я знайшов його більш-менш одночасно з Hug. Але APIStar використовував стандарт OpenAPI.
+
+Він мав автоматичну перевірку даних, серіалізацію даних і генерацію схеми OpenAPI на основі підказок того самого типу в кількох місцях.
+
+Визначення схеми тіла не використовували ті самі підказки типу Python, як Pydantic, воно було трохи схоже на Marshmallow, тому підтримка редактора була б не такою хорошою, але все ж APIStar був найкращим доступним варіантом.
+
+Він мав найкращі показники продуктивності на той час (перевершив лише Starlette).
+
+Спочатку він не мав автоматичного веб-інтерфейсу документації API, але я знав, що можу додати до нього інтерфейс користувача Swagger.
+
+Він мав систему введення залежностей. Він вимагав попередньої реєстрації компонентів, як і інші інструменти, розглянуті вище. Але все одно це була чудова функція.
+
+Я ніколи не міг використовувати його в повноцінному проекті, оскільки він не мав інтеграції безпеки, тому я не міг замінити всі функції, які мав, генераторами повного стеку на основі Flask-apispec. У моїх невиконаних проектах я мав створити запит на вилучення, додавши цю функцію.
+
+Але потім фокус проекту змінився.
+
+Це вже не був веб-фреймворк API, оскільки творцю потрібно було зосередитися на Starlette.
+
+Тепер APIStar — це набір інструментів для перевірки специфікацій OpenAPI, а не веб-фреймворк.
+
+!!! Інформація
+ APIStar створив Том Крісті. Той самий хлопець, який створив:
+
+ * Django REST Framework
+ * Starlette (на якому базується **FastAPI**)
+ * Uvicorn (використовується Starlette і **FastAPI**)
+
+!!! Перегляньте "Надихнуло **FastAPI** на"
+ Існувати.
+
+ Ідею оголошення кількох речей (перевірки даних, серіалізації та документації) за допомогою тих самих типів Python, які в той же час забезпечували чудову підтримку редактора, я вважав геніальною ідеєю.
+
+ І після тривалого пошуку подібної структури та тестування багатьох різних альтернатив, APIStar став найкращим доступним варіантом.
+
+ Потім APIStar перестав існувати як сервер, і було створено Starlette, який став новою кращою основою для такої системи. Це стало останнім джерелом натхнення для створення **FastAPI**. Я вважаю **FastAPI** «духовним спадкоємцем» APIStar, удосконалюючи та розширюючи функції, систему введення тексту та інші частини на основі досвіду, отриманого від усіх цих попередніх інструментів.
+
+## Використовується **FastAPI**
+
+### Pydantic
+
+Pydantic — це бібліотека для визначення перевірки даних, серіалізації та документації (за допомогою схеми JSON) на основі підказок типу Python.
+
+Це робить його надзвичайно інтуїтивним.
+
+Його можна порівняти з Marshmallow. Хоча він швидший за Marshmallow у тестах. Оскільки він базується на тих самих підказках типу Python, підтримка редактора чудова.
+
+!!! Перегляньте "**FastAPI** використовує його для"
+ Виконання перевірки всіх даних, серіалізації даних і автоматичної документацію моделі (на основі схеми JSON).
+
+ Потім **FastAPI** бере ці дані схеми JSON і розміщує їх у OpenAPI, окремо від усіх інших речей, які він робить.
+
+### Starlette
+
+Starlette — це легкий фреймворк/набір інструментів ASGI, який ідеально підходить для створення високопродуктивних asyncio сервісів.
+
+Він дуже простий та інтуїтивно зрозумілий. Його розроблено таким чином, щоб його можна було легко розширювати та мати модульні компоненти.
+
+Він має:
+
+* Серйозно вражаючу продуктивність.
+* Підтримку WebSocket.
+* Фонові завдання в процесі.
+* Події запуску та завершення роботи.
+* Тестового клієнта, побудований на HTTPX.
+* CORS, GZip, статичні файли, потокові відповіді.
+* Підтримку сеансів і файлів cookie.
+* 100% покриття тестом.
+* 100% анотовану кодову базу.
+* Кілька жорстких залежностей.
+
+Starlette наразі є найшвидшим фреймворком Python із перевірених. Перевершує лише Uvicorn, який є не фреймворком, а сервером.
+
+Starlette надає всі основні функції веб-мікрофреймворку.
+
+Але він не забезпечує автоматичної перевірки даних, серіалізації чи документації.
+
+Це одна з головних речей, які **FastAPI** додає зверху, все на основі підказок типу Python (з використанням Pydantic). Це, а також система впровадження залежностей, утиліти безпеки, створення схеми OpenAPI тощо.
+
+!!! Примітка "Технічні деталі"
+ ASGI — це новий «стандарт», який розробляється членами основної команди Django. Це ще не «стандарт Python» (PEP), хоча вони в процесі цього.
+
+ Тим не менш, він уже використовується як «стандарт» кількома інструментами. Це значно покращує сумісність, оскільки ви можете переключити Uvicorn на будь-який інший сервер ASGI (наприклад, Daphne або Hypercorn), або ви можете додати інструменти, сумісні з ASGI, як-от `python-socketio`.
+
+!!! Перегляньте "**FastAPI** використовує його для"
+ Керування всіма основними веб-частинами. Додавання функцій зверху.
+
+ Сам клас `FastAPI` безпосередньо успадковує клас `Starlette`.
+
+ Отже, усе, що ви можете робити зі Starlette, ви можете робити це безпосередньо за допомогою **FastAPI**, оскільки це, по суті, Starlette на стероїдах.
+
+### Uvicorn
+
+Uvicorn — це блискавичний сервер ASGI, побудований на uvloop і httptools.
+
+Це не веб-фреймворк, а сервер. Наприклад, він не надає інструментів для маршрутизації. Це те, що фреймворк на кшталт Starlette (або **FastAPI**) забезпечить поверх нього.
+
+Це рекомендований сервер для Starlette і **FastAPI**.
+
+!!! Перегляньте "**FastAPI** рекомендує це як"
+ Основний веб-сервер для запуску програм **FastAPI**.
+
+ Ви можете поєднати його з Gunicorn, щоб мати асинхронний багатопроцесний сервер.
+
+ Додаткову інформацію див. у розділі [Розгортання](deployment/index.md){.internal-link target=_blank}.
+
+## Орієнтири та швидкість
+
+Щоб зрозуміти, порівняти та побачити різницю між Uvicorn, Starlette і FastAPI, перегляньте розділ про [Бенчмарки](benchmarks.md){.internal-link target=_blank}.
diff --git a/docs/uk/docs/index.md b/docs/uk/docs/index.md
new file mode 100644
index 0000000000..fad693f79d
--- /dev/null
+++ b/docs/uk/docs/index.md
@@ -0,0 +1,465 @@
+
++ Готовий до продакшину, високопродуктивний, простий у вивченні та швидкий для написання коду фреймворк +
+ + +--- + +**Документація**: https://fastapi.tiangolo.com + +**Програмний код**: https://github.com/tiangolo/fastapi + +--- + +FastAPI - це сучасний, швидкий (високопродуктивний), вебфреймворк для створення API за допомогою Python 3.8+,в основі якого лежить стандартна анотація типів Python. + +Ключові особливості: + +* **Швидкий**: Дуже висока продуктивність, на рівні з **NodeJS** та **Go** (завдяки Starlette та Pydantic). [Один із найшвидших фреймворків](#performance). + +* **Швидке написання коду**: Пришвидшує розробку функціоналу приблизно на 200%-300%. * +* **Менше помилок**: Зменшить кількість помилок спричинених людиною (розробником) на 40%. * +* **Інтуїтивний**: Чудова підтримка редакторами коду. Доповнення всюди. Зменште час на налагодження. +* **Простий**: Спроектований, для легкого використання та навчання. Знадобиться менше часу на читання документації. +* **Короткий**: Зведе до мінімуму дублювання коду. Кожен оголошений параметр може виконувати кілька функцій. +* **Надійний**: Ви матимете стабільний код готовий до продакшину з автоматичною інтерактивною документацією. +* **Стандартизований**: Оснований та повністю сумісний з відкритими стандартами для API: OpenAPI (попередньо відомий як Swagger) та JSON Schema. + +* оцінка на основі тестів внутрішньої команди розробників, створення продуктових застосунків. + +## Спонсори + + + +{% if sponsors %} +{% for sponsor in sponsors.gold -%} +async def...uvicorn main:app --reload...email_validator - для валідації електронної пошти.
+* pydantic-settings - для управління налаштуваннями.
+* pydantic-extra-types - для додаткових типів, що можуть бути використані з Pydantic.
+
+
+Starlette використовує:
+
+* httpx - Необхідно, якщо Ви хочете використовувати `TestClient`.
+* jinja2 - Необхідно, якщо Ви хочете використовувати шаблони як конфігурацію за замовчуванням.
+* python-multipart - Необхідно, якщо Ви хочете підтримувати "розбір" форми за допомогою `request.form()`.
+* itsdangerous - Необхідно для підтримки `SessionMiddleware`.
+* pyyaml - Необхідно для підтримки Starlette `SchemaGenerator` (ймовірно, вам це не потрібно з FastAPI).
+* ujson - Необхідно, якщо Ви хочете використовувати `UJSONResponse`.
+
+FastAPI / Starlette використовують:
+
+* uvicorn - для сервера, який завантажує та обслуговує вашу програму.
+* orjson - Необхідно, якщо Ви хочете використовувати `ORJSONResponse`.
+
+Ви можете встановити все це за допомогою `pip install fastapi[all]`.
+
+## Ліцензія
+
+Цей проєкт ліцензовано згідно з умовами ліцензії MIT.
diff --git a/docs/uk/docs/python-types.md b/docs/uk/docs/python-types.md
new file mode 100644
index 0000000000..6c8e290168
--- /dev/null
+++ b/docs/uk/docs/python-types.md
@@ -0,0 +1,448 @@
+# Вступ до типів Python
+
+Python підтримує додаткові "підказки типу" ("type hints") (також звані "анотаціями типу" ("type annotations")).
+
+Ці **"type hints"** є спеціальним синтаксисом, що дозволяє оголошувати тип змінної.
+
+За допомогою оголошення типів для ваших змінних, редактори та інструменти можуть надати вам кращу підтримку.
+
+Це просто **швидкий посібник / нагадування** про анотації типів у Python. Він покриває лише мінімум, необхідний щоб використовувати їх з **FastAPI**... що насправді дуже мало.
+
+**FastAPI** повністю базується на цих анотаціях типів, вони дають йому багато переваг.
+
+Але навіть якщо ви ніколи не використаєте **FastAPI**, вам буде корисно дізнатись трохи про них.
+
+!!! note
+ Якщо ви експерт у Python і ви вже знаєте усе про анотації типів - перейдіть до наступного розділу.
+
+## Мотивація
+
+Давайте почнемо з простого прикладу:
+
+```Python
+{!../../../docs_src/python_types/tutorial001.py!}
+```
+
+Виклик цієї програми виводить:
+
+```
+John Doe
+```
+
+Функція виконує наступне:
+
+* Бере `first_name` та `last_name`.
+* Конвертує кожну літеру кожного слова у верхній регістр за допомогою `title()`.
+* Конкатенує їх разом із пробілом по середині.
+
+```Python hl_lines="2"
+{!../../../docs_src/python_types/tutorial001.py!}
+```
+
+### Редагуйте це
+
+Це дуже проста програма.
+
+Але тепер уявіть, що ви писали це з нуля.
+
+У певний момент ви розпочали б визначення функції, у вас були б готові параметри...
+
+Але тоді вам потрібно викликати "той метод, який переводить першу літеру у верхній регістр".
+
+Це буде `upper`? Чи `uppercase`? `first_uppercase`? `capitalize`?
+
+Тоді ви спробуєте давнього друга програміста - автозаповнення редактора коду.
+
+Ви надрукуєте перший параметр функції, `first_name`, тоді крапку (`.`), а тоді натиснете `Ctrl+Space`, щоб запустити автозаповнення.
+
+Але, на жаль, ви не отримаєте нічого корисного:
+
+
+
+### Додайте типи
+
+Давайте змінимо один рядок з попередньої версії.
+
+Ми змінимо саме цей фрагмент, параметри функції, з:
+
+```Python
+ first_name, last_name
+```
+
+на:
+
+```Python
+ first_name: str, last_name: str
+```
+
+Ось і все.
+
+Це "type hints":
+
+```Python hl_lines="1"
+{!../../../docs_src/python_types/tutorial002.py!}
+```
+
+Це не те саме, що оголошення значень за замовчуванням, як це було б з:
+
+```Python
+ first_name="john", last_name="doe"
+```
+
+Це зовсім інше.
+
+Ми використовуємо двокрапку (`:`), не дорівнює (`=`).
+
+І додавання анотації типу зазвичай не змінює того, що сталось би без них.
+
+Але тепер, уявіть що ви посеред процесу створення функції, але з анотаціями типів.
+
+В цей же момент, ви спробуєте викликати автозаповнення з допомогою `Ctrl+Space` і побачите:
+
+
+
+Разом з цим, ви можете прокручувати, переглядати опції, допоки ви не знайдете одну, що звучить схоже:
+
+
+
+## Більше мотивації
+
+Перевірте цю функцію, вона вже має анотацію типу:
+
+```Python hl_lines="1"
+{!../../../docs_src/python_types/tutorial003.py!}
+```
+
+Оскільки редактор знає типи змінних, ви не тільки отримаєте автозаповнення, ви також отримаєте перевірку помилок:
+
+
+
+Тепер ви знаєте, щоб виправити це, вам потрібно перетворити `age` у строку з допомогою `str(age)`:
+
+```Python hl_lines="2"
+{!../../../docs_src/python_types/tutorial004.py!}
+```
+
+## Оголошення типів
+
+Щойно ви побачили основне місце для оголошення анотацій типу. Як параметри функції.
+
+Це також основне місце, де ви б їх використовували у **FastAPI**.
+
+### Прості типи
+
+Ви можете оголошувати усі стандартні типи у Python, не тільки `str`.
+
+Ви можете використовувати, наприклад:
+
+* `int`
+* `float`
+* `bool`
+* `bytes`
+
+```Python hl_lines="1"
+{!../../../docs_src/python_types/tutorial005.py!}
+```
+
+### Generic-типи з параметрами типів
+
+Існують деякі структури даних, які можуть містити інші значення, наприклад `dict`, `list`, `set` та `tuple`. І внутрішні значення також можуть мати свій тип.
+
+Ці типи, які мають внутрішні типи, називаються "**generic**" типами. І оголосити їх можна навіть із внутрішніми типами.
+
+Щоб оголосити ці типи та внутрішні типи, ви можете використовувати стандартний модуль Python `typing`. Він існує спеціально для підтримки анотацій типів.
+
+#### Новіші версії Python
+
+Синтаксис із використанням `typing` **сумісний** з усіма версіями, від Python 3.6 до останніх, включаючи Python 3.9, Python 3.10 тощо.
+
+У міру розвитку Python **новіші версії** мають покращену підтримку анотацій типів і в багатьох випадках вам навіть не потрібно буде імпортувати та використовувати модуль `typing` для оголошення анотацій типу.
+
+Якщо ви можете вибрати новішу версію Python для свого проекту, ви зможете скористатися цією додатковою простотою. Дивіться кілька прикладів нижче.
+
+#### List (список)
+
+Наприклад, давайте визначимо змінну, яка буде `list` із `str`.
+
+=== "Python 3.8 і вище"
+
+ З модуля `typing`, імпортуємо `List` (з великої літери `L`):
+
+ ``` Python hl_lines="1"
+ {!> ../../../docs_src/python_types/tutorial006.py!}
+ ```
+
+ Оголосимо змінну з тим самим синтаксисом двокрапки (`:`).
+
+ Як тип вкажемо `List`, який ви імпортували з `typing`.
+
+ Оскільки список є типом, який містить деякі внутрішні типи, ви поміщаєте їх у квадратні дужки:
+
+ ```Python hl_lines="4"
+ {!> ../../../docs_src/python_types/tutorial006.py!}
+ ```
+
+=== "Python 3.9 і вище"
+
+ Оголосимо змінну з тим самим синтаксисом двокрапки (`:`).
+
+ Як тип вкажемо `list`.
+
+ Оскільки список є типом, який містить деякі внутрішні типи, ви поміщаєте їх у квадратні дужки:
+
+ ```Python hl_lines="1"
+ {!> ../../../docs_src/python_types/tutorial006_py39.py!}
+ ```
+
+!!! info
+ Ці внутрішні типи в квадратних дужках називаються "параметрами типу".
+
+ У цьому випадку, `str` це параметр типу переданий у `List` (або `list` у Python 3.9 і вище).
+
+Це означає: "змінна `items` це `list`, і кожен з елементів у цьому списку - `str`".
+
+!!! tip
+ Якщо ви використовуєте Python 3.9 і вище, вам не потрібно імпортувати `List` з `typing`, ви можете використовувати натомість тип `list`.
+
+Зробивши це, ваш редактор може надати підтримку навіть під час обробки елементів зі списку:
+
+
+
+Без типів цього майже неможливо досягти.
+
+Зверніть увагу, що змінна `item` є одним із елементів у списку `items`.
+
+І все ж редактор знає, що це `str`, і надає підтримку для цього.
+
+#### Tuple and Set (кортеж та набір)
+
+Ви повинні зробити те ж саме, щоб оголосити `tuple` і `set`:
+
+=== "Python 3.8 і вище"
+
+ ```Python hl_lines="1 4"
+ {!> ../../../docs_src/python_types/tutorial007.py!}
+ ```
+
+=== "Python 3.9 і вище"
+
+ ```Python hl_lines="1"
+ {!> ../../../docs_src/python_types/tutorial007_py39.py!}
+ ```
+
+Це означає:
+
+* Змінна `items_t` це `tuple` з 3 елементами, `int`, ще `int`, та `str`.
+* Змінна `items_s` це `set`, і кожен його елемент типу `bytes`.
+
+#### Dict (словник)
+
+Щоб оголосити `dict`, вам потрібно передати 2 параметри типу, розділені комами.
+
+Перший параметр типу для ключа у `dict`.
+
+Другий параметр типу для значення у `dict`:
+
+=== "Python 3.8 і вище"
+
+ ```Python hl_lines="1 4"
+ {!> ../../../docs_src/python_types/tutorial008.py!}
+ ```
+
+=== "Python 3.9 і вище"
+
+ ```Python hl_lines="1"
+ {!> ../../../docs_src/python_types/tutorial008_py39.py!}
+ ```
+
+Це означає:
+
+* Змінна `prices` це `dict`:
+ * Ключі цього `dict` типу `str` (наприклад, назва кожного елементу).
+ * Значення цього `dict` типу `float` (наприклад, ціна кожного елементу).
+
+#### Union (об'єднання)
+
+Ви можете оголосити, що змінна може бути будь-яким із **кількох типів**, наприклад, `int` або `str`.
+
+У Python 3.6 і вище (включаючи Python 3.10) ви можете використовувати тип `Union` з `typing` і вставляти в квадратні дужки можливі типи, які можна прийняти.
+
+У Python 3.10 також є **альтернативний синтаксис**, у якому ви можете розділити можливі типи за допомогою вертикальної смуги (`|`).
+
+=== "Python 3.8 і вище"
+
+ ```Python hl_lines="1 4"
+ {!> ../../../docs_src/python_types/tutorial008b.py!}
+ ```
+
+=== "Python 3.10 і вище"
+
+ ```Python hl_lines="1"
+ {!> ../../../docs_src/python_types/tutorial008b_py310.py!}
+ ```
+
+В обох випадках це означає, що `item` може бути `int` або `str`.
+
+#### Possibly `None` (Optional)
+
+Ви можете оголосити, що значення може мати тип, наприклад `str`, але також може бути `None`.
+
+У Python 3.6 і вище (включаючи Python 3.10) ви можете оголосити його, імпортувавши та використовуючи `Optional` з модуля `typing`.
+
+```Python hl_lines="1 4"
+{!../../../docs_src/python_types/tutorial009.py!}
+```
+
+Використання `Optional[str]` замість просто `str` дозволить редактору допомогти вам виявити помилки, коли ви могли б вважати, що значенням завжди є `str`, хоча насправді воно також може бути `None`.
+
+`Optional[Something]` насправді є скороченням для `Union[Something, None]`, вони еквівалентні.
+
+Це також означає, що в Python 3.10 ви можете використовувати `Something | None`:
+
+=== "Python 3.8 і вище"
+
+ ```Python hl_lines="1 4"
+ {!> ../../../docs_src/python_types/tutorial009.py!}
+ ```
+
+=== "Python 3.8 і вище - альтернатива"
+
+ ```Python hl_lines="1 4"
+ {!> ../../../docs_src/python_types/tutorial009b.py!}
+ ```
+
+=== "Python 3.10 і вище"
+
+ ```Python hl_lines="1"
+ {!> ../../../docs_src/python_types/tutorial009_py310.py!}
+ ```
+
+#### Generic типи
+
+Ці типи, які приймають параметри типу у квадратних дужках, називаються **Generic types** or **Generics**, наприклад:
+
+=== "Python 3.8 і вище"
+
+ * `List`
+ * `Tuple`
+ * `Set`
+ * `Dict`
+ * `Union`
+ * `Optional`
+ * ...та інші.
+
+=== "Python 3.9 і вище"
+
+ Ви можете використовувати ті самі вбудовані типи, як generic (з квадратними дужками та типами всередині):
+
+ * `list`
+ * `tuple`
+ * `set`
+ * `dict`
+
+ І те саме, що й у Python 3.8, із модуля `typing`:
+
+ * `Union`
+ * `Optional`
+ * ...та інші.
+
+=== "Python 3.10 і вище"
+
+ Ви можете використовувати ті самі вбудовані типи, як generic (з квадратними дужками та типами всередині):
+
+ * `list`
+ * `tuple`
+ * `set`
+ * `dict`
+
+ І те саме, що й у Python 3.8, із модуля `typing`:
+
+ * `Union`
+ * `Optional` (так само як у Python 3.8)
+ * ...та інші.
+
+ У Python 3.10, як альтернатива використанню `Union` та `Optional`, ви можете використовувати вертикальну смугу (`|`) щоб оголосити об'єднання типів.
+
+### Класи як типи
+
+Ви також можете оголосити клас як тип змінної.
+
+Скажімо, у вас є клас `Person` з імʼям:
+
+```Python hl_lines="1-3"
+{!../../../docs_src/python_types/tutorial010.py!}
+```
+
+Потім ви можете оголосити змінну типу `Person`:
+
+```Python hl_lines="6"
+{!../../../docs_src/python_types/tutorial010.py!}
+```
+
+І знову ж таки, ви отримуєте всю підтримку редактора:
+
+
+
+## Pydantic моделі
+
+Pydantic це бібліотека Python для валідації даних.
+
+Ви оголошуєте «форму» даних як класи з атрибутами.
+
+І кожен атрибут має тип.
+
+Потім ви створюєте екземпляр цього класу з деякими значеннями, і він перевірить ці значення, перетворить їх у відповідний тип (якщо є потреба) і надасть вам об’єкт з усіма даними.
+
+І ви отримуєте всю підтримку редактора з цим отриманим об’єктом.
+
+Приклад з документації Pydantic:
+
+=== "Python 3.8 і вище"
+
+ ```Python
+ {!> ../../../docs_src/python_types/tutorial011.py!}
+ ```
+
+=== "Python 3.9 і вище"
+
+ ```Python
+ {!> ../../../docs_src/python_types/tutorial011_py39.py!}
+ ```
+
+=== "Python 3.10 і вище"
+
+ ```Python
+ {!> ../../../docs_src/python_types/tutorial011_py310.py!}
+ ```
+
+!!! info
+ Щоб дізнатись більше про Pydantic, перегляньте його документацію.
+
+**FastAPI** повністю базується на Pydantic.
+
+Ви побачите набагато більше цього всього на практиці в [Tutorial - User Guide](tutorial/index.md){.internal-link target=_blank}.
+
+## Анотації типів у **FastAPI**
+
+**FastAPI** використовує ці підказки для виконання кількох речей.
+
+З **FastAPI** ви оголошуєте параметри з підказками типу, і отримуєте:
+
+* **Підтримку редактора**.
+* **Перевірку типів**.
+
+...і **FastAPI** використовує ті самі оголошення для:
+
+* **Визначення вимог**: з параметрів шляху запиту, параметрів запиту, заголовків, тіл, залежностей тощо.
+* **Перетворення даних**: із запиту в необхідний тип.
+* **Перевірка даних**: що надходять від кожного запиту:
+ * Генерування **автоматичних помилок**, що повертаються клієнту, коли дані недійсні.
+* **Документування** API за допомогою OpenAPI:
+ * який потім використовується для автоматичної інтерактивної документації користувальницьких інтерфейсів.
+
+Все це може здатися абстрактним. Не хвилюйтеся. Ви побачите все це в дії в [Туторіал - Посібник користувача](tutorial/index.md){.internal-link target=_blank}.
+
+Важливо те, що за допомогою стандартних типів Python в одному місці (замість того, щоб додавати більше класів, декораторів тощо), **FastAPI** зробить багато роботи за вас.
+
+!!! info
+ Якщо ви вже пройшли весь навчальний посібник і повернулися, щоб дізнатися більше про типи, ось хороший ресурс "шпаргалка" від `mypy`.
diff --git a/docs/uk/docs/tutorial/body-fields.md b/docs/uk/docs/tutorial/body-fields.md
new file mode 100644
index 0000000000..eee993cbe3
--- /dev/null
+++ b/docs/uk/docs/tutorial/body-fields.md
@@ -0,0 +1,116 @@
+# Тіло - Поля
+
+Так само як ви можете визначати додаткову валідацію та метадані у параметрах *функції обробки шляху* за допомогою `Query`, `Path` та `Body`, ви можете визначати валідацію та метадані всередині моделей Pydantic за допомогою `Field` від Pydantic.
+
+## Імпорт `Field`
+
+Спочатку вам потрібно імпортувати це:
+
+=== "Python 3.10+"
+
+ ```Python hl_lines="4"
+ {!> ../../../docs_src/body_fields/tutorial001_an_py310.py!}
+ ```
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="4"
+ {!> ../../../docs_src/body_fields/tutorial001_an_py39.py!}
+ ```
+
+=== "Python 3.8+"
+
+ ```Python hl_lines="4"
+ {!> ../../../docs_src/body_fields/tutorial001_an.py!}
+ ```
+
+=== "Python 3.10+ non-Annotated"
+
+ !!! tip
+ Варто користуватись `Annotated` версією, якщо це можливо.
+
+ ```Python hl_lines="2"
+ {!> ../../../docs_src/body_fields/tutorial001_py310.py!}
+ ```
+
+=== "Python 3.8+ non-Annotated"
+
+ !!! tip
+ Варто користуватись `Annotated` версією, якщо це можливо.
+
+ ```Python hl_lines="4"
+ {!> ../../../docs_src/body_fields/tutorial001.py!}
+ ```
+
+!!! warning
+ Зверніть увагу, що `Field` імпортується прямо з `pydantic`, а не з `fastapi`, як всі інші (`Query`, `Path`, `Body` тощо).
+
+## Оголошення атрибутів моделі
+
+Ви можете використовувати `Field` з атрибутами моделі:
+
+=== "Python 3.10+"
+
+ ```Python hl_lines="11-14"
+ {!> ../../../docs_src/body_fields/tutorial001_an_py310.py!}
+ ```
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="11-14"
+ {!> ../../../docs_src/body_fields/tutorial001_an_py39.py!}
+ ```
+
+=== "Python 3.8+"
+
+ ```Python hl_lines="12-15"
+ {!> ../../../docs_src/body_fields/tutorial001_an.py!}
+ ```
+
+=== "Python 3.10+ non-Annotated"
+
+ !!! tip
+ Варто користуватись `Annotated` версією, якщо це можливо..
+
+ ```Python hl_lines="9-12"
+ {!> ../../../docs_src/body_fields/tutorial001_py310.py!}
+ ```
+
+=== "Python 3.8+ non-Annotated"
+
+ !!! tip
+ Варто користуватись `Annotated` версією, якщо це можливо..
+
+ ```Python hl_lines="11-14"
+ {!> ../../../docs_src/body_fields/tutorial001.py!}
+ ```
+
+`Field` працює так само, як `Query`, `Path` і `Body`, у нього такі самі параметри тощо.
+
+!!! note "Технічні деталі"
+ Насправді, `Query`, `Path` та інші, що ви побачите далі, створюють об'єкти підкласів загального класу `Param`, котрий сам є підкласом класу `FieldInfo` з Pydantic.
+
+ І `Field` від Pydantic також повертає екземпляр `FieldInfo`.
+
+ `Body` також безпосередньо повертає об'єкти підкласу `FieldInfo`. І є інші підкласи, які ви побачите пізніше, що є підкласами класу Body.
+
+ Пам'ятайте, що коли ви імпортуєте 'Query', 'Path' та інше з 'fastapi', вони фактично є функціями, які повертають спеціальні класи.
+
+!!! tip
+ Зверніть увагу, що кожен атрибут моделі із типом, значенням за замовчуванням та `Field` має ту саму структуру, що й параметр *функції обробки шляху*, з `Field` замість `Path`, `Query` і `Body`.
+
+## Додавання додаткової інформації
+
+Ви можете визначити додаткову інформацію у `Field`, `Query`, `Body` тощо. І вона буде включена у згенеровану JSON схему.
+
+Ви дізнаєтеся більше про додавання додаткової інформації пізніше у документації, коли вивчатимете визначення прикладів.
+
+!!! warning
+ Додаткові ключі, передані в `Field`, також будуть присутні у згенерованій схемі OpenAPI для вашого додатка.
+ Оскільки ці ключі не обов'язково можуть бути частиною специфікації OpenAPI, деякі інструменти OpenAPI, наприклад, [OpenAPI валідатор](https://validator.swagger.io/), можуть не працювати з вашою згенерованою схемою.
+
+## Підсумок
+
+Ви можете використовувати `Field` з Pydantic для визначення додаткових перевірок та метаданих для атрибутів моделі.
+
+Ви також можете використовувати додаткові іменовані аргументи для передачі додаткових метаданих JSON схеми.
diff --git a/docs/uk/docs/tutorial/body.md b/docs/uk/docs/tutorial/body.md
index e78c5de0e3..9759e7f450 100644
--- a/docs/uk/docs/tutorial/body.md
+++ b/docs/uk/docs/tutorial/body.md
@@ -19,7 +19,7 @@
Спочатку вам потрібно імпортувати `BaseModel` з `pydantic`:
-=== "Python 3.6 і вище"
+=== "Python 3.8 і вище"
```Python hl_lines="4"
{!> ../../../docs_src/body/tutorial001.py!}
@@ -37,7 +37,7 @@
Використовуйте стандартні типи Python для всіх атрибутів:
-=== "Python 3.6 і вище"
+=== "Python 3.8 і вище"
```Python hl_lines="7-11"
{!> ../../../docs_src/body/tutorial001.py!}
@@ -75,7 +75,7 @@
Щоб додати модель даних до вашої *операції шляху*, оголосіть її так само, як ви оголосили параметри шляху та запиту:
-=== "Python 3.6 і вище"
+=== "Python 3.8 і вище"
```Python hl_lines="18"
{!> ../../../docs_src/body/tutorial001.py!}
@@ -149,7 +149,7 @@
Усередині функції ви можете отримати прямий доступ до всіх атрибутів об’єкта моделі:
-=== "Python 3.6 і вище"
+=== "Python 3.8 і вище"
```Python hl_lines="21"
{!> ../../../docs_src/body/tutorial002.py!}
@@ -167,7 +167,7 @@
**FastAPI** розпізнає, що параметри функції, які відповідають параметрам шляху, мають бути **взяті з шляху**, а параметри функції, які оголошуються як моделі Pydantic, **взяті з тіла запиту**.
-=== "Python 3.6 і вище"
+=== "Python 3.8 і вище"
```Python hl_lines="17-18"
{!> ../../../docs_src/body/tutorial003.py!}
@@ -185,7 +185,7 @@
**FastAPI** розпізнає кожен з них і візьме дані з потрібного місця.
-=== "Python 3.6 і вище"
+=== "Python 3.8 і вище"
```Python hl_lines="18"
{!> ../../../docs_src/body/tutorial004.py!}
diff --git a/docs/uk/docs/tutorial/cookie-params.md b/docs/uk/docs/tutorial/cookie-params.md
index 2b0e8993c6..199b938397 100644
--- a/docs/uk/docs/tutorial/cookie-params.md
+++ b/docs/uk/docs/tutorial/cookie-params.md
@@ -18,7 +18,7 @@
{!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="3"
{!> ../../../docs_src/cookie_params/tutorial001_an.py!}
@@ -33,7 +33,7 @@
{!> ../../../docs_src/cookie_params/tutorial001_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Бажано використовувати `Annotated` версію, якщо це можливо.
@@ -60,7 +60,7 @@
{!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="10"
{!> ../../../docs_src/cookie_params/tutorial001_an.py!}
@@ -75,7 +75,7 @@
{!> ../../../docs_src/cookie_params/tutorial001_py310.py!}
```
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
!!! tip
Бажано використовувати `Annotated` версію, якщо це можливо.
diff --git a/docs/uk/docs/tutorial/encoder.md b/docs/uk/docs/tutorial/encoder.md
new file mode 100644
index 0000000000..b6583341f3
--- /dev/null
+++ b/docs/uk/docs/tutorial/encoder.md
@@ -0,0 +1,42 @@
+# JSON Compatible Encoder
+
+Існують випадки, коли вам може знадобитися перетворити тип даних (наприклад, модель Pydantic) в щось сумісне з JSON (наприклад, `dict`, `list`, і т. д.).
+
+Наприклад, якщо вам потрібно зберегти це в базі даних.
+
+Для цього, **FastAPI** надає `jsonable_encoder()` функцію.
+
+## Використання `jsonable_encoder`
+
+Давайте уявимо, що у вас є база даних `fake_db`, яка приймає лише дані, сумісні з JSON.
+
+Наприклад, вона не приймає об'єкти типу `datetime`, оскільки вони не сумісні з JSON.
+
+Отже, об'єкт типу `datetime` потрібно перетворити в рядок `str`, який містить дані в ISO форматі.
+
+Тим самим способом ця база даних не прийматиме об'єкт типу Pydantic model (об'єкт з атрибутами), а лише `dict`.
+
+Ви можете використовувати `jsonable_encoder` для цього.
+
+Вона приймає об'єкт, такий як Pydantic model, і повертає його версію, сумісну з JSON:
+
+=== "Python 3.10+"
+
+ ```Python hl_lines="4 21"
+ {!> ../../../docs_src/encoder/tutorial001_py310.py!}
+ ```
+
+=== "Python 3.8+"
+
+ ```Python hl_lines="5 22"
+ {!> ../../../docs_src/encoder/tutorial001.py!}
+ ```
+
+У цьому прикладі вона конвертує Pydantic model у `dict`, а `datetime` у `str`.
+
+Результат виклику цієї функції - це щось, що можна кодувати з використанням стандарту Python `json.dumps()`.
+
+Вона не повертає велику строку `str`, яка містить дані у форматі JSON (як строка). Вона повертає стандартну структуру даних Python (наприклад `dict`) із значеннями та підзначеннями, які є сумісними з JSON.
+
+!!! Примітка
+ `jsonable_encoder` фактично використовується **FastAPI** внутрішньо для перетворення даних. Проте вона корисна в багатьох інших сценаріях.
diff --git a/docs/uk/docs/tutorial/extra-data-types.md b/docs/uk/docs/tutorial/extra-data-types.md
new file mode 100644
index 0000000000..ec5ec0d18f
--- /dev/null
+++ b/docs/uk/docs/tutorial/extra-data-types.md
@@ -0,0 +1,130 @@
+# Додаткові типи даних
+
+До цього часу, ви використовували загальнопоширені типи даних, такі як:
+
+* `int`
+* `float`
+* `str`
+* `bool`
+
+Але можна також використовувати більш складні типи даних.
+
+І ви все ще матимете ті ж можливості, які були показані до цього:
+
+* Чудова підтримка редактора.
+* Конвертація даних з вхідних запитів.
+* Конвертація даних для відповіді.
+* Валідація даних.
+* Автоматична анотація та документація.
+
+## Інші типи даних
+
+Ось додаткові типи даних для використання:
+
+* `UUID`:
+ * Стандартний "Універсальний Унікальний Ідентифікатор", який часто використовується як ідентифікатор у багатьох базах даних та системах.
+ * У запитах та відповідях буде представлений як `str`.
+* `datetime.datetime`:
+ * Пайтонівський `datetime.datetime`.
+ * У запитах та відповідях буде представлений як `str` в форматі ISO 8601, як: `2008-09-15T15:53:00+05:00`.
+* `datetime.date`:
+ * Пайтонівський `datetime.date`.
+ * У запитах та відповідях буде представлений як `str` в форматі ISO 8601, як: `2008-09-15`.
+* `datetime.time`:
+ * Пайтонівський `datetime.time`.
+ * У запитах та відповідях буде представлений як `str` в форматі ISO 8601, як: `14:23:55.003`.
+* `datetime.timedelta`:
+ * Пайтонівський `datetime.timedelta`.
+ * У запитах та відповідях буде представлений як `float` загальної кількості секунд.
+ * Pydantic також дозволяє представляти це як "ISO 8601 time diff encoding", більше інформації дивись у документації.
+* `frozenset`:
+ * У запитах і відповідях це буде оброблено так само, як і `set`:
+ * У запитах список буде зчитано, дублікати будуть видалені та він буде перетворений на `set`.
+ * У відповідях, `set` буде перетворений на `list`.
+ * Згенерована схема буде вказувати, що значення `set` є унікальними (з використанням JSON Schema's `uniqueItems`).
+* `bytes`:
+ * Стандартний Пайтонівський `bytes`.
+ * У запитах і відповідях це буде оброблено як `str`.
+ * Згенерована схема буде вказувати, що це `str` з "форматом" `binary`.
+* `Decimal`:
+ * Стандартний Пайтонівський `Decimal`.
+ * У запитах і відповідях це буде оброблено так само, як і `float`.
+* Ви можете перевірити всі дійсні типи даних Pydantic тут: типи даних Pydantic.
+
+## Приклад
+
+Ось приклад *path operation* з параметрами, використовуючи деякі з вищезазначених типів.
+
+=== "Python 3.10+"
+
+ ```Python hl_lines="1 3 12-16"
+ {!> ../../../docs_src/extra_data_types/tutorial001_an_py310.py!}
+ ```
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="1 3 12-16"
+ {!> ../../../docs_src/extra_data_types/tutorial001_an_py39.py!}
+ ```
+
+=== "Python 3.8+"
+
+ ```Python hl_lines="1 3 13-17"
+ {!> ../../../docs_src/extra_data_types/tutorial001_an.py!}
+ ```
+
+=== "Python 3.10+ non-Annotated"
+
+ !!! tip
+ Бажано використовувати `Annotated` версію, якщо це можливо.
+
+ ```Python hl_lines="1 2 11-15"
+ {!> ../../../docs_src/extra_data_types/tutorial001_py310.py!}
+ ```
+
+=== "Python 3.8+ non-Annotated"
+
+ !!! tip
+ Бажано використовувати `Annotated` версію, якщо це можливо.
+
+ ```Python hl_lines="1 2 12-16"
+ {!> ../../../docs_src/extra_data_types/tutorial001.py!}
+ ```
+
+Зверніть увагу, що параметри всередині функції мають свій звичайний тип даних, і ви можете, наприклад, виконувати звичайні маніпуляції з датами, такі як:
+
+=== "Python 3.10+"
+
+ ```Python hl_lines="18-19"
+ {!> ../../../docs_src/extra_data_types/tutorial001_an_py310.py!}
+ ```
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="18-19"
+ {!> ../../../docs_src/extra_data_types/tutorial001_an_py39.py!}
+ ```
+
+=== "Python 3.8+"
+
+ ```Python hl_lines="19-20"
+ {!> ../../../docs_src/extra_data_types/tutorial001_an.py!}
+ ```
+
+=== "Python 3.10+ non-Annotated"
+
+ !!! tip
+ Бажано використовувати `Annotated` версію, якщо це можливо.
+
+ ```Python hl_lines="17-18"
+ {!> ../../../docs_src/extra_data_types/tutorial001_py310.py!}
+ ```
+
+=== "Python 3.8+ non-Annotated"
+
+ !!! tip
+ Бажано використовувати `Annotated` версію, якщо це можливо.
+
+ ```Python hl_lines="18-19"
+ {!> ../../../docs_src/extra_data_types/tutorial001.py!}
+ ```
diff --git a/docs/uk/docs/tutorial/index.md b/docs/uk/docs/tutorial/index.md
new file mode 100644
index 0000000000..e5bae74bc9
--- /dev/null
+++ b/docs/uk/docs/tutorial/index.md
@@ -0,0 +1,80 @@
+# Туторіал - Посібник користувача
+
+У цьому посібнику показано, як користуватися **FastAPI** з більшістю його функцій, крок за кроком.
+
+Кожен розділ поступово надбудовується на попередні, але він структурований на окремі теми, щоб ви могли перейти безпосередньо до будь-якої конкретної, щоб вирішити ваші конкретні потреби API.
+
+Він також створений як довідник для роботи у майбутньому.
+
+Тож ви можете повернутися і побачити саме те, що вам потрібно.
+
+## Запустіть код
+
+Усі блоки коду можна скопіювати та використовувати безпосередньо (це фактично перевірені файли Python).
+
+Щоб запустити будь-який із прикладів, скопіюйте код у файл `main.py` і запустіть `uvicorn` за допомогою:
+
+get
+
+!!! info Thông tin về "`@decorator`"
+ Cú pháp `@something` trong Python được gọi là một "decorator".
+
+ Bạn đặt nó trên một hàm. Giống như một chiếc mũ xinh xắn (Tôi ddonas đó là lí do mà thuật ngữ này ra đời).
+
+ Một "decorator" lấy một hàm bên dưới và thực hiện một vài thứ với nó.
+
+ Trong trường hợp của chúng ta, decorator này nói **FastAPI** rằng hàm bên dưới ứng với **đường dẫn** `/` và một **toán tử** `get`.
+
+ Nó là một "**decorator đường dẫn toán tử**".
+
+Bạn cũng có thể sử dụng với các toán tử khác:
+
+* `@app.post()`
+* `@app.put()`
+* `@app.delete()`
+
+Và nhiều hơn với các toán tử còn lại:
+
+* `@app.options()`
+* `@app.head()`
+* `@app.patch()`
+* `@app.trace()`
+
+!!! tip
+ Bạn thoải mái sử dụng mỗi toán tử (phương thức HTTP) như bạn mơ ước.
+
+ **FastAPI** không bắt buộc bất kì ý nghĩa cụ thể nào.
+
+ Thông tin ở đây được biểu thị như là một chỉ dẫn, không phải là một yêu cầu bắt buộc.
+
+ Ví dụ, khi sử dụng GraphQL bạn thông thường thực hiện tất cả các hành động chỉ bằng việc sử dụng các toán tử `POST`.
+
+### Step 4: Định nghĩa **hàm cho đường dẫn toán tử**
+
+Đây là "**hàm cho đường dẫn toán tử**":
+
+* **đường dẫn**: là `/`.
+* **toán tử**: là `get`.
+* **hàm**: là hàm bên dưới "decorator" (bên dưới `@app.get("/")`).
+
+```Python hl_lines="7"
+{!../../../docs_src/first_steps/tutorial001.py!}
+```
+
+Đây là một hàm Python.
+
+Nó sẽ được gọi bởi **FastAPI** bất cứ khi nào nó nhận một request tới URL "`/`" sử dụng một toán tử `GET`.
+
+Trong trường hợp này, nó là một hàm `async`.
+
+---
+
+Bạn cũng có thể định nghĩa nó như là một hàm thông thường thay cho `async def`:
+
+```Python hl_lines="7"
+{!../../../docs_src/first_steps/tutorial003.py!}
+```
+
+!!! note
+ Nếu bạn không biết sự khác nhau, kiểm tra [Async: *"Trong khi vội vàng?"*](../async.md#in-a-hurry){.internal-link target=_blank}.
+
+### Bước 5: Nội dung trả về
+
+```Python hl_lines="8"
+{!../../../docs_src/first_steps/tutorial001.py!}
+```
+
+Bạn có thể trả về một `dict`, `list`, một trong những giá trị đơn như `str`, `int`,...
+
+Bạn cũng có thể trả về Pydantic model (bạn sẽ thấy nhiều hơn về nó sau).
+
+Có nhiều object và model khác nhau sẽ được tự động chuyển đổi sang JSON (bao gồm cả ORM,...). Thử sử dụng loại ưa thích của bạn, nó có khả năng cao đã được hỗ trợ.
+
+## Tóm lại
+
+* Import `FastAPI`.
+* Tạo một `app` instance.
+* Viết một **decorator cho đường dẫn toán tử** (giống như `@app.get("/")`).
+* Viết một **hàm cho đường dẫn toán tử** (giống như `def root(): ...` ở trên).
+* Chạy server trong môi trường phát triển (giống như `uvicorn main:app --reload`).
diff --git a/docs/vi/docs/tutorial/index.md b/docs/vi/docs/tutorial/index.md
new file mode 100644
index 0000000000..e8a93fe408
--- /dev/null
+++ b/docs/vi/docs/tutorial/index.md
@@ -0,0 +1,80 @@
+# Hướng dẫn sử dụng
+
+Hướng dẫn này cho bạn thấy từng bước cách sử dụng **FastAPI** đa số các tính năng của nó.
+
+Mỗi phần được xây dựng từ những phần trước đó, nhưng nó được cấu trúc thành các chủ đề riêng biệt, do đó bạn có thể xem trực tiếp từng phần cụ thể bất kì để giải quyết những API cụ thể mà bạn cần.
+
+Nó cũng được xây dựng để làm việc như một tham chiếu trong tương lai.
+
+Do đó bạn có thể quay lại và tìm chính xác những gì bạn cần.
+
+## Chạy mã
+
+Tất cả các code block có thể được sao chép và sử dụng trực tiếp (chúng thực chất là các tệp tin Python đã được kiểm thử).
+
+Để chạy bất kì ví dụ nào, sao chép code tới tệp tin `main.py`, và bắt đầu `uvicorn` với:
+
++ Ìlànà wẹ́ẹ́bù FastAPI, iṣẹ́ gíga, ó rọrùn láti kọ̀, o yára láti kóòdù, ó sì ṣetán fún iṣelọpọ ní lílo +
+ + +--- + +**Àkọsílẹ̀**: https://fastapi.tiangolo.com + +**Orisun Kóòdù**: https://github.com/tiangolo/fastapi + +--- + +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. + +À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 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à. +* **Irọrun**: A kọ kí ó le rọrun láti lo àti láti kọ ẹkọ nínú rè. Ó máa fún ọ ní àkókò díẹ̀ látı ka àkọsílẹ. +* **Ó kúkurú ní kikọ**: Ó dín àtúnkọ àti àtúntò kóòdù kù. Ìkéde àṣàyàn kọ̀ọ̀kan nínú rẹ̀ ní ọ̀pọ̀lọpọ̀ àwọn ìlò. O ṣe iranlọwọ láti má ṣe ní ọ̀pọ̀lọpọ̀ àṣìṣe. +* **Ó lágbára**: Ó ń ṣe àgbéjáde kóòdù tí ó ṣetán fún ìṣelọ́pọ̀. Pẹ̀lú àkọsílẹ̀ tí ó máa ṣàlàyé ara rẹ̀ fún ẹ ní ìbáṣepọ̀ aládàáṣiṣẹ́ pẹ̀lú rè. +* **Ajohunše/Ìtọ́kasí**: Ó da lori (àti ibamu ni kikun pẹ̀lú) àwọn ìmọ ajohunše/ìtọ́kasí fún àwọn API: OpenAPI (èyí tí a mọ tẹlẹ si Swagger) àti JSON Schema. + +* iṣiro yi da lori àwọn idanwo tí ẹgbẹ ìdàgbàsókè FastAPI ṣe, nígbàtí wọn kọ àwọn ohun elo iṣelọpọ kóòdù pẹ̀lú rẹ. + +## Àwọn onígbọ̀wọ́ + + + +{% if sponsors %} +{% for sponsor in sponsors.gold -%} +async def...uvicorn main:app --reload...email_validator - fún ifọwọsi ímeèlì.
+* pydantic-settings - fún ètò ìsàkóso.
+* pydantic-extra-types - fún àfikún oríṣi láti lọ pẹ̀lú Pydantic.
+
+Èyí tí Starlette ń lò:
+
+* httpx - Nílò tí ó bá fẹ́ láti lọ `TestClient`.
+* jinja2 - Nílò tí ó bá fẹ́ láti lọ iṣeto awoṣe aiyipada.
+* 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`.
+
+Ó lè fi gbogbo àwọn wọ̀nyí sórí ẹrọ pẹ̀lú `pip install "fastapi[all]"`.
+
+## Iwe-aṣẹ
+
+Iṣẹ́ yìí ni iwe-aṣẹ lábẹ́ àwọn òfin tí iwe-aṣẹ MIT.
diff --git a/docs/yo/mkdocs.yml b/docs/yo/mkdocs.yml
new file mode 100644
index 0000000000..de18856f44
--- /dev/null
+++ b/docs/yo/mkdocs.yml
@@ -0,0 +1 @@
+INHERIT: ../en/mkdocs.yml
diff --git a/docs/zh/docs/advanced/additional-responses.md b/docs/zh/docs/advanced/additional-responses.md
new file mode 100644
index 0000000000..2a1e1ed891
--- /dev/null
+++ b/docs/zh/docs/advanced/additional-responses.md
@@ -0,0 +1,219 @@
+# OPENAPI 中的其他响应
+
+您可以声明附加响应,包括附加状态代码、媒体类型、描述等。
+
+这些额外的响应将包含在OpenAPI模式中,因此它们也将出现在API文档中。
+
+但是对于那些额外的响应,你必须确保你直接返回一个像 `JSONResponse` 一样的 `Response` ,并包含你的状态代码和内容。
+
+## `model`附加响应
+您可以向路径操作装饰器传递参数 `responses` 。
+
+它接收一个 `dict`,键是每个响应的状态代码(如`200`),值是包含每个响应信息的其他 `dict`。
+
+每个响应字典都可以有一个关键模型,其中包含一个 `Pydantic` 模型,就像 `response_model` 一样。
+
+**FastAPI**将采用该模型,生成其`JSON Schema`并将其包含在`OpenAPI`中的正确位置。
+
+例如,要声明另一个具有状态码 `404` 和`Pydantic`模型 `Message` 的响应,可以写:
+```Python hl_lines="18 22"
+{!../../../docs_src/additional_responses/tutorial001.py!}
+```
+
+
+!!! Note
+ 请记住,您必须直接返回 `JSONResponse` 。
+
+!!! Info
+ `model` 密钥不是OpenAPI的一部分。
+ **FastAPI**将从那里获取`Pydantic`模型,生成` JSON Schema` ,并将其放在正确的位置。
+ - 正确的位置是:
+ - 在键 `content` 中,其具有另一个`JSON`对象( `dict` )作为值,该`JSON`对象包含:
+ - 媒体类型的密钥,例如 `application/json` ,它包含另一个`JSON`对象作为值,该对象包含:
+ - 一个键` schema` ,它的值是来自模型的`JSON Schema`,正确的位置在这里。
+ - **FastAPI**在这里添加了对OpenAPI中另一个地方的全局JSON模式的引用,而不是直接包含它。这样,其他应用程序和客户端可以直接使用这些JSON模式,提供更好的代码生成工具等。
+
+
+**在OpenAPI中为该路径操作生成的响应将是:**
+
+```json hl_lines="3-12"
+{
+ "responses": {
+ "404": {
+ "description": "Additional Response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Message"
+ }
+ }
+ }
+ },
+ "200": {
+ "description": "Successful Response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Item"
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/HTTPValidationError"
+ }
+ }
+ }
+ }
+ }
+}
+
+```
+**模式被引用到OpenAPI模式中的另一个位置:**
+```json hl_lines="4-16"
+{
+ "components": {
+ "schemas": {
+ "Message": {
+ "title": "Message",
+ "required": [
+ "message"
+ ],
+ "type": "object",
+ "properties": {
+ "message": {
+ "title": "Message",
+ "type": "string"
+ }
+ }
+ },
+ "Item": {
+ "title": "Item",
+ "required": [
+ "id",
+ "value"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "value": {
+ "title": "Value",
+ "type": "string"
+ }
+ }
+ },
+ "ValidationError": {
+ "title": "ValidationError",
+ "required": [
+ "loc",
+ "msg",
+ "type"
+ ],
+ "type": "object",
+ "properties": {
+ "loc": {
+ "title": "Location",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "msg": {
+ "title": "Message",
+ "type": "string"
+ },
+ "type": {
+ "title": "Error Type",
+ "type": "string"
+ }
+ }
+ },
+ "HTTPValidationError": {
+ "title": "HTTPValidationError",
+ "type": "object",
+ "properties": {
+ "detail": {
+ "title": "Detail",
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ValidationError"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+```
+## 主响应的其他媒体类型
+
+您可以使用相同的 `responses` 参数为相同的主响应添加不同的媒体类型。
+
+例如,您可以添加一个额外的媒体类型` image/png` ,声明您的路径操作可以返回JSON对象(媒体类型 `application/json` )或PNG图像:
+
+```Python hl_lines="19-24 28"
+{!../../../docs_src/additional_responses/tutorial002.py!}
+```
+
+!!! Note
+ - 请注意,您必须直接使用 `FileResponse` 返回图像。
+
+!!! Info
+ - 除非在 `responses` 参数中明确指定不同的媒体类型,否则**FastAPI**将假定响应与主响应类具有相同的媒体类型(默认为` application/json` )。
+ - 但是如果您指定了一个自定义响应类,并将 `None `作为其媒体类型,**FastAPI**将使用 `application/json` 作为具有关联模型的任何其他响应。
+
+## 组合信息
+您还可以联合接收来自多个位置的响应信息,包括 `response_model `、 `status_code` 和 `responses `参数。
+
+您可以使用默认的状态码 `200` (或者您需要的自定义状态码)声明一个 `response_model `,然后直接在OpenAPI模式中在 `responses` 中声明相同响应的其他信息。
+
+**FastAPI**将保留来自 `responses` 的附加信息,并将其与模型中的JSON Schema结合起来。
+
+例如,您可以使用状态码 `404` 声明响应,该响应使用`Pydantic`模型并具有自定义的` description` 。
+
+以及一个状态码为 `200` 的响应,它使用您的 `response_model` ,但包含自定义的 `example` :
+
+```Python hl_lines="20-31"
+{!../../../docs_src/additional_responses/tutorial003.py!}
+```
+
+所有这些都将被合并并包含在您的OpenAPI中,并在API文档中显示:
+
+## 联合预定义响应和自定义响应
+
+您可能希望有一些应用于许多路径操作的预定义响应,但是你想将不同的路径和自定义的相应组合在一块。
+对于这些情况,你可以使用Python的技术,将 `dict` 与 `**dict_to_unpack` 解包:
+```Python
+old_dict = {
+ "old key": "old value",
+ "second old key": "second old value",
+}
+new_dict = {**old_dict, "new key": "new value"}
+```
+
+这里, new_dict 将包含来自 old_dict 的所有键值对加上新的键值对:
+```python
+{
+ "old key": "old value",
+ "second old key": "second old value",
+ "new key": "new value",
+}
+```
+您可以使用该技术在路径操作中重用一些预定义的响应,并将它们与其他自定义响应相结合。
+**例如:**
+```Python hl_lines="13-17 26"
+{!../../../docs_src/additional_responses/tutorial004.py!}
+```
+## 有关OpenAPI响应的更多信息
+
+要了解您可以在响应中包含哪些内容,您可以查看OpenAPI规范中的以下部分:
+ + [OpenAPI响应对象](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#responsesObject),它包括 Response Object 。
+ + [OpenAPI响应对象](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#responseObject),您可以直接在 `responses` 参数中的每个响应中包含任何内容。包括 `description` 、 `headers` 、 `content` (其中是声明不同的媒体类型和JSON Schemas)和 `links` 。
diff --git a/docs/zh/docs/advanced/generate-clients.md b/docs/zh/docs/advanced/generate-clients.md
new file mode 100644
index 0000000000..e222e479c8
--- /dev/null
+++ b/docs/zh/docs/advanced/generate-clients.md
@@ -0,0 +1,266 @@
+# 生成客户端
+
+因为 **FastAPI** 是基于OpenAPI规范的,自然您可以使用许多相匹配的工具,包括自动生成API文档 (由 Swagger UI 提供)。
+
+一个不太明显而又特别的优势是,你可以为你的API针对不同的**编程语言**来**生成客户端**(有时候被叫做 **SDKs** )。
+
+## OpenAPI 客户端生成
+
+有许多工具可以从**OpenAPI**生成客户端。
+
+一个常见的工具是 OpenAPI Generator。
+
+如果您正在开发**前端**,一个非常有趣的替代方案是 openapi-typescript-codegen。
+
+## 生成一个 TypeScript 前端客户端
+
+让我们从一个简单的 FastAPI 应用开始:
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="7-9 12-13 16-17 21"
+ {!> ../../../docs_src/generate_clients/tutorial001_py39.py!}
+ ```
+
+=== "Python 3.8+"
+
+ ```Python hl_lines="9-11 14-15 18 19 23"
+ {!> ../../../docs_src/generate_clients/tutorial001.py!}
+ ```
+
+请注意,*路径操作* 定义了他们所用于请求数据和回应数据的模型,所使用的模型是`Item` 和 `ResponseMessage`。
+
+### API 文档
+
+如果您访问API文档,您将看到它具有在请求中发送和在响应中接收数据的**模式(schemas)**:
+
+
+
+您可以看到这些模式,因为它们是用程序中的模型声明的。
+
+那些信息可以在应用的 **OpenAPI模式** 被找到,然后显示在API文档中(通过Swagger UI)。
+
+OpenAPI中所包含的模型里有相同的信息可以用于 **生成客户端代码**。
+
+### 生成一个TypeScript 客户端
+
+现在我们有了带有模型的应用,我们可以为前端生成客户端代码。
+
+#### 安装 `openapi-typescript-codegen`
+
+您可以使用以下工具在前端代码中安装 `openapi-typescript-codegen`:
+
+
+
+您还将自动补全要发送的数据:
+
+
+
+!!! tip
+ 请注意, `name` 和 `price` 的自动补全,是通过其在`Item`模型(FastAPI)中的定义实现的。
+
+如果发送的数据字段不符,你也会看到编辑器的错误提示:
+
+
+
+响应(response)对象也拥有自动补全:
+
+
+
+## 带有标签的 FastAPI 应用
+
+在许多情况下,你的FastAPI应用程序会更复杂,你可能会使用标签来分隔不同组的*路径操作(path operations)*。
+
+例如,您可以有一个用 `items` 的部分和另一个用于 `users` 的部分,它们可以用标签来分隔:
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="21 26 34"
+ {!> ../../../docs_src/generate_clients/tutorial002_py39.py!}
+ ```
+
+=== "Python 3.8+"
+
+ ```Python hl_lines="23 28 36"
+ {!> ../../../docs_src/generate_clients/tutorial002.py!}
+ ```
+
+### 生成带有标签的 TypeScript 客户端
+
+如果您使用标签为FastAPI应用生成客户端,它通常也会根据标签分割客户端代码。
+
+通过这种方式,您将能够为客户端代码进行正确地排序和分组:
+
+
+
+在这个案例中,您有:
+
+* `ItemsService`
+* `UsersService`
+
+### 客户端方法名称
+
+现在生成的方法名像 `createItemItemsPost` 看起来不太简洁:
+
+```TypeScript
+ItemsService.createItemItemsPost({name: "Plumbus", price: 5})
+```
+
+...这是因为客户端生成器为每个 *路径操作* 使用OpenAPI的内部 **操作 ID(operation ID)**。
+
+OpenAPI要求每个操作 ID 在所有 *路径操作* 中都是唯一的,因此 FastAPI 使用**函数名**、**路径**和**HTTP方法/操作**来生成此操作ID,因为这样可以确保这些操作 ID 是唯一的。
+
+但接下来我会告诉你如何改进。 🤓
+
+## 自定义操作ID和更好的方法名
+
+您可以**修改**这些操作ID的**生成**方式,以使其更简洁,并在客户端中具有**更简洁的方法名称**。
+
+在这种情况下,您必须确保每个操作ID在其他方面是**唯一**的。
+
+例如,您可以确保每个*路径操作*都有一个标签,然后根据**标签**和*路径操作***名称**(函数名)来生成操作ID。
+
+### 自定义生成唯一ID函数
+
+FastAPI为每个*路径操作*使用一个**唯一ID**,它用于**操作ID**,也用于任何所需自定义模型的名称,用于请求或响应。
+
+你可以自定义该函数。它接受一个 `APIRoute` 对象作为输入,并输出一个字符串。
+
+例如,以下是一个示例,它使用第一个标签(你可能只有一个标签)和*路径操作*名称(函数名)。
+
+然后,你可以将这个自定义函数作为 `generate_unique_id_function` 参数传递给 **FastAPI**:
+
+=== "Python 3.9+"
+
+ ```Python hl_lines="6-7 10"
+ {!> ../../../docs_src/generate_clients/tutorial003_py39.py!}
+ ```
+
+=== "Python 3.8+"
+
+ ```Python hl_lines="8-9 12"
+ {!> ../../../docs_src/generate_clients/tutorial003.py!}
+ ```
+
+### 使用自定义操作ID生成TypeScript客户端
+
+现在,如果你再次生成客户端,你会发现它具有改善的方法名称:
+
+
+
+正如你所见,现在方法名称中只包含标签和函数名,不再包含URL路径和HTTP操作的信息。
+
+### 预处理用于客户端生成器的OpenAPI规范
+
+生成的代码仍然存在一些**重复的信息**。
+
+我们已经知道该方法与 **items** 相关,因为它在 `ItemsService` 中(从标签中获取),但方法名中仍然有标签名作为前缀。😕
+
+一般情况下对于OpenAPI,我们可能仍然希望保留它,因为这将确保操作ID是**唯一的**。
+
+但对于生成的客户端,我们可以在生成客户端之前**修改** OpenAPI 操作ID,以使方法名称更加美观和**简洁**。
+
+我们可以将 OpenAPI JSON 下载到一个名为`openapi.json`的文件中,然后使用以下脚本**删除此前缀的标签**:
+
+```Python
+{!../../../docs_src/generate_clients/tutorial004.py!}
+```
+
+通过这样做,操作ID将从类似于 `items-get_items` 的名称重命名为 `get_items` ,这样客户端生成器就可以生成更简洁的方法名称。
+
+### 使用预处理的OpenAPI生成TypeScript客户端
+
+现在,由于最终结果保存在文件openapi.json中,你可以修改 package.json 文件以使用此本地文件,例如:
+
+```JSON hl_lines="7"
+{
+ "name": "frontend-app",
+ "version": "1.0.0",
+ "description": "",
+ "main": "index.js",
+ "scripts": {
+ "generate-client": "openapi --input ./openapi.json --output ./src/client --client axios"
+ },
+ "author": "",
+ "license": "",
+ "devDependencies": {
+ "openapi-typescript-codegen": "^0.20.1",
+ "typescript": "^4.6.2"
+ }
+}
+```
+
+生成新的客户端之后,你现在将拥有**清晰的方法名称**,具备**自动补全**、**错误提示**等功能:
+
+
+
+## 优点
+
+当使用自动生成的客户端时,你将获得以下的自动补全功能:
+
+* 方法。
+* 请求体中的数据、查询参数等。
+* 响应数据。
+
+你还将获得针对所有内容的错误提示。
+
+每当你更新后端代码并**重新生成**前端代码时,新的*路径操作*将作为方法可用,旧的方法将被删除,并且其他任何更改将反映在生成的代码中。 🤓
+
+这也意味着如果有任何更改,它将自动**反映**在客户端代码中。如果你**构建**客户端,在使用的数据上存在**不匹配**时,它将报错。
+
+因此,你将在开发周期的早期**检测到许多错误**,而不必等待错误在生产环境中向最终用户展示,然后尝试调试问题所在。 ✨
diff --git a/docs/zh/docs/advanced/settings.md b/docs/zh/docs/advanced/settings.md
index 597e99a779..76070fb7fa 100644
--- a/docs/zh/docs/advanced/settings.md
+++ b/docs/zh/docs/advanced/settings.md
@@ -223,13 +223,13 @@ $ ADMIN_EMAIL="deadpool@example.com" APP_NAME="ChimichangApp"uvicorn main:app
{!> ../../../docs_src/settings/app02_an_py39/main.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="6 12-13"
{!> ../../../docs_src/settings/app02_an/main.py!}
```
-=== "Python 3.6+ 非注解版本"
+=== "Python 3.8+ 非注解版本"
!!! tip
如果可能,请尽量使用 `Annotated` 版本。
@@ -239,7 +239,7 @@ $ ADMIN_EMAIL="deadpool@example.com" APP_NAME="ChimichangApp"uvicorn main:app
```
!!! tip
- 我们稍后会讨论 `@lru_cache()`。
+ 我们稍后会讨论 `@lru_cache`。
目前,您可以将 `get_settings()` 视为普通函数。
@@ -251,13 +251,13 @@ $ ADMIN_EMAIL="deadpool@example.com" APP_NAME="ChimichangApp"uvicorn main:app
{!> ../../../docs_src/settings/app02_an_py39/main.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="17 19-21"
{!> ../../../docs_src/settings/app02_an/main.py!}
```
-=== "Python 3.6+ 非注解版本"
+=== "Python 3.8+ 非注解版本"
!!! tip
如果可能,请尽量使用 `Annotated` 版本。
@@ -289,7 +289,7 @@ $ ADMIN_EMAIL="deadpool@example.com" APP_NAME="ChimichangApp"uvicorn main:app
但是,dotenv 文件实际上不一定要具有确切的文件名。
-Pydantic 支持使用外部库从这些类型的文件中读取。您可以在Pydantic 设置: Dotenv (.env) 支持中阅读更多相关信息。
+Pydantic 支持使用外部库从这些类型的文件中读取。您可以在Pydantic 设置: Dotenv (.env) 支持中阅读更多相关信息。
!!! tip
要使其工作,您需要执行 `pip install python-dotenv`。
@@ -337,7 +337,7 @@ def get_settings():
我们将为每个请求创建该对象,并且将在每个请求中读取 `.env` 文件。 ⚠️
-但是,由于我们在顶部使用了 `@lru_cache()` 装饰器,因此只有在第一次调用它时,才会创建 `Settings` 对象一次。 ✔️
+但是,由于我们在顶部使用了 `@lru_cache` 装饰器,因此只有在第一次调用它时,才会创建 `Settings` 对象一次。 ✔️
=== "Python 3.9+"
@@ -345,13 +345,13 @@ def get_settings():
{!> ../../../docs_src/settings/app03_an_py39/main.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="1 11"
{!> ../../../docs_src/settings/app03_an/main.py!}
```
-=== "Python 3.6+ 非注解版本"
+=== "Python 3.8+ 非注解版本"
!!! tip
如果可能,请尽量使用 `Annotated` 版本。
@@ -364,13 +364,13 @@ def get_settings():
#### `lru_cache` 技术细节
-`@lru_cache()` 修改了它所装饰的函数,以返回第一次返回的相同值,而不是再次计算它,每次都执行函数的代码。
+`@lru_cache` 修改了它所装饰的函数,以返回第一次返回的相同值,而不是再次计算它,每次都执行函数的代码。
因此,下面的函数将对每个参数组合执行一次。然后,每个参数组合返回的值将在使用完全相同的参数组合调用函数时再次使用。
例如,如果您有一个函数:
```Python
-@lru_cache()
+@lru_cache
def say_hi(name: str, salutation: str = "Ms."):
return f"Hello {salutation} {name}"
```
@@ -422,7 +422,7 @@ participant execute as Execute function
这样,它的行为几乎就像是一个全局变量。但是由于它使用了依赖项函数,因此我们可以轻松地进行测试时的覆盖。
-`@lru_cache()` 是 `functools` 的一部分,它是 Python 标准库的一部分,您可以在Python 文档中了解有关 `@lru_cache()` 的更多信息。
+`@lru_cache` 是 `functools` 的一部分,它是 Python 标准库的一部分,您可以在Python 文档中了解有关 `@lru_cache` 的更多信息。
## 小结
@@ -430,4 +430,4 @@ participant execute as Execute function
* 通过使用依赖项,您可以简化测试。
* 您可以使用 `.env` 文件。
-* 使用 `@lru_cache()` 可以避免为每个请求重复读取 dotenv 文件,同时允许您在测试时进行覆盖。
+* 使用 `@lru_cache` 可以避免为每个请求重复读取 dotenv 文件,同时允许您在测试时进行覆盖。
diff --git a/docs/zh/docs/advanced/websockets.md b/docs/zh/docs/advanced/websockets.md
index a723487fdf..a5cbdd9651 100644
--- a/docs/zh/docs/advanced/websockets.md
+++ b/docs/zh/docs/advanced/websockets.md
@@ -118,7 +118,7 @@ $ uvicorn main:app --reload
{!> ../../../docs_src/websockets/tutorial002_an_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="69-70 83"
{!> ../../../docs_src/websockets/tutorial002_an.py!}
@@ -133,7 +133,7 @@ $ uvicorn main:app --reload
{!> ../../../docs_src/websockets/tutorial002_py310.py!}
```
-=== "Python 3.6+ 非带注解版本"
+=== "Python 3.8+ 非带注解版本"
!!! tip
如果可能,请尽量使用 `Annotated` 版本。
@@ -181,7 +181,7 @@ $ uvicorn main:app --reload
{!> ../../../docs_src/websockets/tutorial003_py39.py!}
```
-=== "Python 3.6+"
+=== "Python 3.8+"
```Python hl_lines="81-83"
{!> ../../../docs_src/websockets/tutorial003.py!}
diff --git a/docs/zh/docs/async.md b/docs/zh/docs/async.md
new file mode 100644
index 0000000000..59eebd0491
--- /dev/null
+++ b/docs/zh/docs/async.md
@@ -0,0 +1,430 @@
+# 并发 async / await
+
+有关路径操作函数的 `async def` 语法以及异步代码、并发和并行的一些背景知识。
+
+## 赶时间吗?
+
+TL;DR:
+
+如果你正在使用第三方库,它们会告诉你使用 `await` 关键字来调用它们,就像这样:
+
+```Python
+results = await some_library()
+```
+
+然后,通过 `async def` 声明你的 *路径操作函数*:
+
+```Python hl_lines="2"
+@app.get('/')
+async def read_results():
+ results = await some_library()
+ return results
+```
+
+!!! note
+ 你只能在被 `async def` 创建的函数内使用 `await`
+
+---
+
+如果你正在使用一个第三方库和某些组件(比如:数据库、API、文件系统...)进行通信,第三方库又不支持使用 `await` (目前大多数数据库三方库都是这样),这种情况你可以像平常那样使用 `def` 声明一个路径操作函数,就像这样:
+
+```Python hl_lines="2"
+@app.get('/')
+def results():
+ results = some_library()
+ return results
+```
+
+---
+
+如果你的应用程序不需要与其他任何东西通信而等待其响应,请使用 `async def`。
+
+---
+
+如果你不清楚,使用 `def` 就好.
+
+---
+
+**注意**:你可以根据需要在路径操作函数中混合使用 `def` 和 `async def`,并使用最适合你的方式去定义每个函数。FastAPI 将为他们做正确的事情。
+
+无论如何,在上述任何情况下,FastAPI 仍将异步工作,速度也非常快。
+
+但是,通过遵循上述步骤,它将能够进行一些性能优化。
+
+## 技术细节
+
+Python 的现代版本支持通过一种叫**"协程"**——使用 `async` 和 `await` 语法的东西来写**”异步代码“**。
+
+让我们在下面的部分中逐一介绍:
+
+* **异步代码**
+* **`async` 和 `await`**
+* **协程**
+
+## 异步代码
+
+异步代码仅仅意味着编程语言 💬 有办法告诉计算机/程序 🤖 在代码中的某个点,它 🤖 将不得不等待在某些地方完成一些事情。让我们假设一些事情被称为 "慢文件"📝.
+
+所以,在等待"慢文件"📝完成的这段时间,计算机可以做一些其他工作。
+
+然后计算机/程序 🤖 每次有机会都会回来,因为它又在等待,或者它 🤖 完成了当前所有的工作。而且它 🤖 将查看它等待的所有任务中是否有已经完成的,做它必须做的任何事情。
+
+接下来,它 🤖 完成第一个任务(比如是我们的"慢文件"📝) 并继续与之相关的一切。
+
+这个"等待其他事情"通常指的是一些相对较慢(与处理器和 RAM 存储器的速度相比)的 I/O 操作,比如说:
+
+* 通过网络发送来自客户端的数据
+* 客户端接收来自网络中的数据
+* 磁盘中要由系统读取并提供给程序的文件的内容
+* 程序提供给系统的要写入磁盘的内容
+* 一个 API 的远程调用
+* 一个数据库操作,直到完成
+* 一个数据库查询,直到返回结果
+* 等等.
+
+这个执行的时间大多是在等待 I/O 操作,因此它们被叫做 "I/O 密集型" 操作。
+
+它被称为"异步"的原因是因为计算机/程序不必与慢任务"同步",去等待任务完成的确切时刻,而在此期间不做任何事情直到能够获取任务结果才继续工作。
+
+相反,作为一个"异步"系统,一旦完成,任务就可以排队等待一段时间(几微秒),等待计算机程序完成它要做的任何事情,然后回来获取结果并继续处理它们。
+
+对于"同步"(与"异步"相反),他们通常也使用"顺序"一词,因为计算机程序在切换到另一个任务之前是按顺序执行所有步骤,即使这些步骤涉及到等待。
+
+### 并发与汉堡
+
+上述异步代码的思想有时也被称为“并发”,它不同于“并行”。
+
+并发和并行都与“不同的事情或多或少同时发生”有关。
+
+但是并发和并行之间的细节是完全不同的。
+
+要了解差异,请想象以下关于汉堡的故事:
+
+### 并发汉堡
+
+你和你的恋人一起去快餐店,你排队在后面,收银员从你前面的人接单。😍
+
+
+
+然后轮到你了,你为你的恋人和你选了两个非常豪华的汉堡。🍔🍔
+
+
+
+收银员对厨房里的厨师说了一些话,让他们知道他们必须为你准备汉堡(尽管他们目前正在为之前的顾客准备汉堡)。
+
+
+
+你付钱了。 💸
+
+收银员给你轮到的号码。
+
+
+
+当你在等待的时候,你和你的恋人一起去挑选一张桌子,然后你们坐下来聊了很长时间(因为汉堡很豪华,需要一些时间来准备)。
+
+当你和你的恋人坐在桌子旁,等待汉堡的时候,你可以用这段时间来欣赏你的恋人是多么的棒、可爱和聪明✨😍✨。
+
+
+
+在等待中和你的恋人交谈时,你会不时地查看柜台上显示的号码,看看是否已经轮到你了。
+
+然后在某个时刻,终于轮到你了。你去柜台拿汉堡然后回到桌子上。
+
+
+
+你们享用了汉堡,整个过程都很开心。✨
+
+
+
+!!! info
+ 漂亮的插画来自 Ketrina Thompson. 🎨
+
+---
+
+在那个故事里,假设你是计算机程序 🤖 。
+
+当你在排队时,你只是闲着😴, 轮到你前不做任何事情(仅排队)。但排队很快,因为收银员只接订单(不准备订单),所以这一切都还好。
+
+然后,当轮到你时,需要你做一些实际性的工作,比如查看菜单,决定你想要什么,让你的恋人选择,支付,检查你是否提供了正确的账单或卡,检查你的收费是否正确,检查订单是否有正确的项目,等等。
+
+此时,即使你仍然没有汉堡,你和收银员的工作也"暂停"了⏸, 因为你必须等待一段时间 🕙 让你的汉堡做好。
+
+但是,当你离开柜台并坐在桌子旁,在轮到你的号码前的这段时间,你可以将焦点切换到 🔀 你的恋人上,并做一些"工作"⏯ 🤓。你可以做一些非常"有成效"的事情,比如和你的恋人调情😍.
+
+之后,收银员 💁 把号码显示在显示屏上,并说到 "汉堡做好了",而当显示的号码是你的号码时,你不会立刻疯狂地跳起来。因为你知道没有人会偷你的汉堡,因为你有你的号码,而其他人又有他们自己的号码。
+
+所以你要等待你的恋人完成故事(完成当前的工作⏯ /正在做的事🤓), 轻轻微笑,说你要吃汉堡⏸.
+
+然后你去柜台🔀, 到现在初始任务已经完成⏯, 拿起汉堡,说声谢谢,然后把它们送到桌上。这就完成了与计数器交互的步骤/任务⏹. 这反过来又产生了一项新任务,即"吃汉堡"🔀 ⏯, 上一个"拿汉堡"的任务已经结束了⏹.
+
+### 并行汉堡
+
+现在让我们假设不是"并发汉堡",而是"并行汉堡"。
+
+你和你的恋人一起去吃并行快餐。
+
+你站在队伍中,同时是厨师的几个收银员(比方说8个)从前面的人那里接单。
+
+你之前的每个人都在等待他们的汉堡准备好后才离开柜台,因为8名收银员都会在下一份订单前马上准备好汉堡。
+
+
+
+然后,终于轮到你了,你为你的恋人和你订购了两个非常精美的汉堡。
+
+你付钱了 💸。
+
+
+
+收银员去厨房。
+
+你站在柜台前 🕙等待着,这样就不会有人在你之前抢走你的汉堡,因为没有轮流的号码。
+
+
+
+当你和你的恋人忙于不让任何人出现在你面前,并且在他们到来的时候拿走你的汉堡时,你无法关注到你的恋人。😞
+
+这是"同步"的工作,你被迫与服务员/厨师 👨🍳"同步"。你在此必须等待 🕙 ,在收银员/厨师 👨🍳 完成汉堡并将它们交给你的确切时间到达之前一直等待,否则其他人可能会拿走它们。
+
+
+
+你经过长时间的等待 🕙 ,收银员/厨师 👨🍳终于带着汉堡回到了柜台。
+
+
+
+你拿着汉堡,和你的情人一起上桌。
+
+你们仅仅是吃了它们,就结束了。⏹
+
+
+
+没有太多的交谈或调情,因为大部分时间 🕙 都在柜台前等待😞。
+
+!!! info
+ 漂亮的插画来自 Ketrina Thompson. 🎨
+
+---
+
+在这个并行汉堡的场景中,你是一个计算机程序 🤖 且有两个处理器(你和你的恋人),都在等待 🕙 ,并投入他们的注意力 ⏯ 在柜台上等待了很长一段时间。
+
+这家快餐店有 8 个处理器(收银员/厨师)。而并发汉堡店可能只有 2 个(一个收银员和一个厨师)。
+
+但最终的体验仍然不是最好的。😞
+
+---
+
+这将是与汉堡的类似故事。🍔
+
+一种更"贴近生活"的例子,想象一家银行。
+
+直到最近,大多数银行都有多个出纳员 👨💼👨💼👨💼👨💼 还有一条长长排队队伍🕙🕙🕙🕙🕙🕙🕙🕙。
+
+所有收银员都是一个接一个的在客户面前做完所有的工作👨💼⏯.
+
+你必须经过 🕙 较长时间排队,否则你就没机会了。
+
+你可不会想带你的恋人 😍 和你一起去银行办事🏦.
+
+### 汉堡结论
+
+在"你与恋人一起吃汉堡"的这个场景中,因为有很多人在等待🕙, 使用并发系统更有意义⏸🔀⏯.
+
+大多数 Web 应用都是这样的。
+
+你的服务器正在等待很多很多用户通过他们不太好的网络发送来的请求。
+
+然后再次等待 🕙 响应回来。
+
+这个"等待" 🕙 是以微秒为单位测量的,但总的来说,最后还是等待很久。
+
+这就是为什么使用异步对于 Web API 很有意义的原因 ⏸🔀⏯。
+
+这种异步机制正是 NodeJS 受到欢迎的原因(尽管 NodeJS 不是并行的),以及 Go 作为编程语言的优势所在。
+
+这与 **FastAPI** 的性能水平相同。
+
+您可以同时拥有并行性和异步性,您可以获得比大多数经过测试的 NodeJS 框架更高的性能,并且与 Go 不相上下, Go 是一种更接近于 C 的编译语言(全部归功于 Starlette)。
+
+### 并发比并行好吗?
+
+不!这不是故事的本意。
+
+并发不同于并行。而是在需要大量等待的特定场景下效果更好。因此,在 Web 应用程序开发中,它通常比并行要好得多,但这并不意味着全部。
+
+因此,为了平衡这一点,想象一下下面的短篇故事:
+
+> 你必须打扫一个又大又脏的房子。
+
+*是的,这就是完整的故事。*
+
+---
+
+在任何地方, 都不需要等待 🕙 ,只需要在房子的多个地方做着很多工作。
+
+你可以像汉堡的例子那样轮流执行,先是客厅,然后是厨房,但因为你不需要等待 🕙 ,对于任何事情都是清洁,清洁,还是清洁,轮流不会影响任何事情。
+
+无论是否轮流执行(并发),都需要相同的时间来完成,而你也会完成相同的工作量。
+
+但在这种情况下,如果你能带上 8 名前收银员/厨师,现在是清洁工一起清扫,他们中的每一个人(加上你)都能占据房子的一个区域来清扫,你就可以在额外的帮助下并行的更快地完成所有工作。
+
+在这个场景中,每个清洁工(包括您)都将是一个处理器,完成这个工作的一部分。
+
+由于大多数执行时间是由实际工作(而不是等待)占用的,并且计算机中的工作是由 CPU 完成的,所以他们称这些问题为"CPU 密集型"。
+
+---
+
+CPU 密集型操作的常见示例是需要复杂的数学处理。
+
+例如:
+
+* **音频**或**图像**处理;
+* **计算机视觉**: 一幅图像由数百万像素组成,每个像素有3种颜色值,处理通常需要同时对这些像素进行计算;
+* **机器学习**: 它通常需要大量的"矩阵"和"向量"乘法。想象一个包含数字的巨大电子表格,并同时将所有数字相乘;
+* **深度学习**: 这是机器学习的一个子领域,同样适用。只是没有一个数字的电子表格可以相乘,而是一个庞大的数字集合,在很多情况下,你需要使用一个特殊的处理器来构建和使用这些模型。
+
+### 并发 + 并行: Web + 机器学习
+
+使用 **FastAPI**,您可以利用 Web 开发中常见的并发机制的优势(NodeJS 的主要吸引力)。
+
+并且,您也可以利用并行和多进程(让多个进程并行运行)的优点来处理与机器学习系统中类似的 **CPU 密集型** 工作。
+
+这一点,再加上 Python 是**数据科学**、机器学习(尤其是深度学习)的主要语言这一简单事实,使得 **FastAPI** 与数据科学/机器学习 Web API 和应用程序(以及其他许多应用程序)非常匹配。
+
+了解如何在生产环境中实现这种并行性,可查看此文 [Deployment](deployment/index.md){.internal-link target=_blank}。
+
+## `async` 和 `await`
+
+现代版本的 Python 有一种非常直观的方式来定义异步代码。这使它看起来就像正常的"顺序"代码,并在适当的时候"等待"。
+
+当有一个操作需要等待才能给出结果,且支持这个新的 Python 特性时,您可以编写如下代码:
+
+```Python
+burgers = await get_burgers(2)
+```
+
+这里的关键是 `await`。它告诉 Python 它必须等待 ⏸ `get_burgers(2)` 完成它的工作 🕙 ,然后将结果存储在 `burgers` 中。这样,Python 就会知道此时它可以去做其他事情 🔀 ⏯ (比如接收另一个请求)。
+
+要使 `await` 工作,它必须位于支持这种异步机制的函数内。因此,只需使用 `async def` 声明它:
+
+```Python hl_lines="1"
+async def get_burgers(number: int):
+ # Do some asynchronous stuff to create the burgers
+ return burgers
+```
+
+...而不是 `def`:
+
+```Python hl_lines="2"
+# This is not asynchronous
+def get_sequential_burgers(number: int):
+ # Do some sequential stuff to create the burgers
+ return burgers
+```
+
+使用 `async def`,Python 就知道在该函数中,它将遇上 `await`,并且它可以"暂停" ⏸ 执行该函数,直至执行其他操作 🔀 后回来。
+
+当你想调用一个 `async def` 函数时,你必须"等待"它。因此,这不会起作用:
+
+```Python
+# This won't work, because get_burgers was defined with: async def
+burgers = get_burgers(2)
+```
+
+---
+
+因此,如果您使用的库告诉您可以使用 `await` 调用它,则需要使用 `async def` 创建路径操作函数 ,如:
+
+```Python hl_lines="2-3"
+@app.get('/burgers')
+async def read_burgers():
+ burgers = await get_burgers(2)
+ return burgers
+```
+
+### 更多技术细节
+
+您可能已经注意到,`await` 只能在 `async def` 定义的函数内部使用。
+
+但与此同时,必须"等待"通过 `async def` 定义的函数。因此,带 `async def` 的函数也只能在 `async def` 定义的函数内部调用。
+
+那么,这关于先有鸡还是先有蛋的问题,如何调用第一个 `async` 函数?
+
+如果您使用 **FastAPI**,你不必担心这一点,因为"第一个"函数将是你的路径操作函数,FastAPI 将知道如何做正确的事情。
+
+但如果您想在没有 FastAPI 的情况下使用 `async` / `await`,则可以这样做。
+
+### 编写自己的异步代码
+
+Starlette (和 **FastAPI**) 是基于 AnyIO 实现的,这使得它们可以兼容 Python 的标准库 asyncio 和 Trio。
+
+特别是,你可以直接使用 AnyIO 来处理高级的并发用例,这些用例需要在自己的代码中使用更高级的模式。
+
+即使您没有使用 **FastAPI**,您也可以使用 AnyIO 编写自己的异步程序,使其拥有较高的兼容性并获得一些好处(例如, 结构化并发)。
+
+### 其他形式的异步代码
+
+这种使用 `async` 和 `await` 的风格在语言中相对较新。
+
+但它使处理异步代码变得容易很多。
+
+这种相同的语法(或几乎相同)最近也包含在现代版本的 JavaScript 中(在浏览器和 NodeJS 中)。
+
+但在此之前,处理异步代码非常复杂和困难。
+
+在以前版本的 Python,你可以使用多线程或者 Gevent。但代码的理解、调试和思考都要复杂许多。
+
+在以前版本的 NodeJS / 浏览器 JavaScript 中,你会使用"回调",因此也可能导致回调地狱。
+
+## 协程
+
+**协程**只是 `async def` 函数返回的一个非常奇特的东西的称呼。Python 知道它有点像一个函数,它可以启动,也会在某个时刻结束,而且它可能会在内部暂停 ⏸ ,只要内部有一个 `await`。
+
+通过使用 `async` 和 `await` 的异步代码的所有功能大多数被概括为"协程"。它可以与 Go 的主要关键特性 "Goroutines" 相媲美。
+
+## 结论
+
+让我们再来回顾下上文所说的:
+
+> Python 的现代版本可以通过使用 `async` 和 `await` 语法创建**协程**,并用于支持**异步代码**。
+
+现在应该能明白其含义了。✨
+
+所有这些使得 FastAPI(通过 Starlette)如此强大,也是它拥有如此令人印象深刻的性能的原因。
+
+## 非常技术性的细节
+
+!!! warning
+ 你可以跳过这里。
+
+ 这些都是 FastAPI 如何在内部工作的技术细节。
+
+ 如果您有相当多的技术知识(协程、线程、阻塞等),并且对 FastAPI 如何处理 `async def` 与常规 `def` 感到好奇,请继续。
+
+### 路径操作函数
+
+当你使用 `def` 而不是 `async def` 来声明一个*路径操作函数*时,它运行在外部的线程池中并等待其结果,而不是直接调用(因为它会阻塞服务器)。
+
+如果您使用过另一个不以上述方式工作的异步框架,并且您习惯于用普通的 `def` 定义普通的仅计算路径操作函数,以获得微小的性能增益(大约100纳秒),请注意,在 FastAPI 中,效果将完全相反。在这些情况下,最好使用 `async def`,除非路径操作函数内使用执行阻塞 I/O 的代码。
+
+在这两种情况下,与您之前的框架相比,**FastAPI** 可能[仍然很快](/#performance){.internal-link target=_blank}。
+
+### 依赖
+
+这同样适用于[依赖](./tutorial/dependencies/index.md){.internal-link target=_blank}。如果一个依赖是标准的 `def` 函数而不是 `async def`,它将被运行在外部线程池中。
+
+### 子依赖
+
+你可以拥有多个相互依赖的依赖以及[子依赖](./tutorial/dependencies/sub-dependencies.md){.internal-link target=_blank} (作为函数的参数),它们中的一些可能是通过 `async def` 声明,也可能是通过 `def` 声明。它们仍然可以正常工作,这些通过 `def` 声明的函数将会在外部线程中调用(来自线程池),而不是"被等待"。
+
+### 其他函数
+
+您可直接调用通过 `def` 或 `async def` 创建的任何其他函数,FastAPI 不会影响您调用它们的方式。
+
+这与 FastAPI 为您调用*路径操作函数*和依赖项的逻辑相反。
+
+如果你的函数是通过 `def` 声明的,它将被直接调用(在代码中编写的地方),而不会在线程池中,如果这个函数通过 `async def` 声明,当在代码中调用时,你就应该使用 `await` 等待函数的结果。
+
+---
+
+再次提醒,这些是非常技术性的细节,如果你来搜索它可能对你有用。
+
+否则,您最好应该遵守的指导原则赶时间吗?.
diff --git a/docs/zh/docs/deployment/cloud.md b/docs/zh/docs/deployment/cloud.md
new file mode 100644
index 0000000000..398f613728
--- /dev/null
+++ b/docs/zh/docs/deployment/cloud.md
@@ -0,0 +1,17 @@
+# 在云上部署 FastAPI
+
+您几乎可以使用**任何云服务商**来部署 FastAPI 应用程序。
+
+在大多数情况下,主要的云服务商都有部署 FastAPI 的指南。
+
+## 云服务商 - 赞助商
+
+一些云服务商 ✨ [**赞助 FastAPI**](../help-fastapi.md#sponsor-the-author){.internal-link target=_blank} ✨,这确保了FastAPI 及其**生态系统**持续健康地**发展**。
+
+这表明了他们对 FastAPI 及其**社区**(您)的真正承诺,因为他们不仅想为您提供**良好的服务**,而且还想确保您拥有一个**良好且健康的框架**:FastAPI。 🙇
+
+您可能想尝试他们的服务并阅读他们的指南:
+
+* Platform.sh
+* Porter
+* Deta
diff --git a/docs/zh/docs/deployment/https.md b/docs/zh/docs/deployment/https.md
new file mode 100644
index 0000000000..cf01a4585b
--- /dev/null
+++ b/docs/zh/docs/deployment/https.md
@@ -0,0 +1,192 @@
+# 关于 HTTPS
+
+人们很容易认为 HTTPS 仅仅是“启用”或“未启用”的东西。
+
+但实际情况比这复杂得多。
+
+!!!提示
+ 如果你很赶时间或不在乎,请继续阅读下一部分,下一部分会提供一个step-by-step的教程,告诉你怎么使用不同技术来把一切都配置好。
+
+要从用户的视角**了解 HTTPS 的基础知识**,请查看 https://howhttps.works/。
+
+现在,从**开发人员的视角**,在了解 HTTPS 时需要记住以下几点:
+
+* 要使用 HTTPS,**服务器**需要拥有由**第三方**生成的**"证书(certificate)"**。
+ * 这些证书实际上是从第三方**获取**的,而不是“生成”的。
+* 证书有**生命周期**。
+ * 它们会**过期**。
+ * 然后它们需要**更新**,**再次从第三方获取**。
+* 连接的加密发生在 **TCP 层**。
+ * 这是 HTTP 协议**下面的一层**。
+ * 因此,**证书和加密**处理是在 **HTTP之前**完成的。
+* **TCP 不知道域名**。 仅仅知道 IP 地址。
+ * 有关所请求的 **特定域名** 的信息位于 **HTTP 数据**中。
+* **HTTPS 证书**“证明”**某个域名**,但协议和加密发生在 TCP 层,在知道正在处理哪个域名**之前**。
+* **默认情况下**,这意味着你**每个 IP 地址只能拥有一个 HTTPS 证书**。
+ * 无论你的服务器有多大,或者服务器上的每个应用程序有多小。
+ * 不过,对此有一个**解决方案**。
+* **TLS** 协议(在 HTTP 之下的TCP 层处理加密的协议)有一个**扩展**,称为 **SNI**。
+ * SNI 扩展允许一台服务器(具有 **单个 IP 地址**)拥有 **多个 HTTPS 证书** 并提供 **多个 HTTPS 域名/应用程序**。
+ * 为此,服务器上会有**单独**的一个组件(程序)侦听**公共 IP 地址**,这个组件必须拥有服务器中的**所有 HTTPS 证书**。
+* **获得安全连接后**,通信协议**仍然是HTTP**。
+ * 内容是 **加密过的**,即使它们是通过 **HTTP 协议** 发送的。
+
+通常的做法是在服务器上运行**一个程序/HTTP 服务器**并**管理所有 HTTPS 部分**:接收**加密的 HTTPS 请求**, 将 **解密的 HTTP 请求** 发送到在同一服务器中运行的实际 HTTP 应用程序(在本例中为 **FastAPI** 应用程序),从应用程序中获取 **HTTP 响应**, 使用适当的 **HTTPS 证书**对其进行加密并使用 **HTTPS** 将其发送回客户端。 此服务器通常被称为 **TLS 终止代理(TLS Termination Proxy)**。
+
+你可以用作 TLS 终止代理的一些选项包括:
+
+* Traefik(也可以处理证书更新)
+* Caddy(也可以处理证书更新)
+* Nginx
+* HAProxy
+
+## Let's Encrypt
+
+在 Let's Encrypt 之前,这些 **HTTPS 证书** 由受信任的第三方出售。
+
+过去,获得这些证书的过程非常繁琐,需要大量的文书工作,而且证书非常昂贵。
+
+但随后 **Let's Encrypt** 创建了。
+
+它是 Linux 基金会的一个项目。 它以自动方式免费提供 **HTTPS 证书**。 这些证书可以使用所有符合标准的安全加密,并且有效期很短(大约 3 个月),因此**安全性实际上更好**,因为它们的生命周期缩短了。
+
+域可以被安全地验证并自动生成证书。 这还允许自动更新这些证书。
+
+我们的想法是自动获取和更新这些证书,以便你可以永远免费拥有**安全的 HTTPS**。
+
+## 面向开发人员的 HTTPS
+
+这里有一个 HTTPS API 看起来是什么样的示例,我们会分步说明,并且主要关注对开发人员重要的部分。
+
+
+### 域名
+
+第一步我们要先**获取**一些**域名(Domain Name)**。 然后可以在 DNS 服务器(可能是你的同一家云服务商提供的)中配置它。
+
+你可能拥有一个云服务器(虚拟机)或类似的东西,并且它会有一个固定 **公共IP地址**。
+
+在 DNS 服务器中,你可以配置一条记录(“A 记录”)以将 **你的域名** 指向你服务器的公共 **IP 地址**。
+
+这个操作一般只需要在最开始执行一次。
+
+!!! tip
+ 域名这部分发生在 HTTPS 之前,由于这一切都依赖于域名和 IP 地址,所以先在这里提一下。
+
+### DNS
+
+现在让我们关注真正的 HTTPS 部分。
+
+首先,浏览器将通过 **DNS 服务器** 查询**域名的IP** 是什么,在本例中为 `someapp.example.com`。
+
+DNS 服务器会告诉浏览器使用某个特定的 **IP 地址**。 这将是你在 DNS 服务器中为你的服务器配置的公共 IP 地址。
+
+
-在系统中进行身份认证后,你将看到:
+通过身份验证后,显示下图所示的内容:
-### 获取本人的用户数据
+### 获取当前用户数据
-现在执行 `/users/me` 路径的 `GET` 操作。
+使用 `/users/me` 路径的 `GET` 操作。
-你将获得你的用户数据,如:
+可以提取如下当前用户数据:
```JSON
{
@@ -238,7 +246,7 @@ UserInDB(
-如果你点击锁定图标并注销,然后再次尝试同一操作,则会得到 HTTP 401 错误:
+点击小锁图标,注销后,再执行同样的操作,则会得到 HTTP 401 错误:
```JSON
{
@@ -246,17 +254,17 @@ UserInDB(
}
```
-### 未启用的用户
+### 未激活用户
-现在尝试使用未启用的用户,并通过以下方式进行身份认证:
+测试未激活用户,输入以下信息,进行身份验证:
用户名:`alice`
密码:`secret2`
-然后尝试执行 `/users/me` 路径的 `GET` 操作。
+然后,执行 `/users/me` 路径的 `GET` 操作。
-你将得到一个「未启用的用户」错误,如:
+显示下列**未激活用户**错误信息:
```JSON
{
@@ -264,12 +272,12 @@ UserInDB(
}
```
-## 总结
+## 小结
-现在你掌握了为你的 API 实现一个基于 `username` 和 `password` 的完整安全系统的工具。
+使用本章的工具实现基于 `username` 和 `password` 的完整 API 安全系统。
-使用这些工具,你可以使安全系统与任何数据库以及任何用户或数据模型兼容。
+这些工具让安全系统兼容任何数据库、用户及数据模型。
-唯一缺少的细节是它实际上还并不「安全」。
+唯一欠缺的是,它仍然不是真的**安全**。
-在下一章中,你将看到如何使用一个安全的哈希密码库和 JWT 令牌。
+下一章,介绍使用密码哈希支持库与 JWT 令牌实现真正的安全机制。
diff --git a/docs/zh/docs/tutorial/sql-databases.md b/docs/zh/docs/tutorial/sql-databases.md
index 482588f94d..c49374971e 100644
--- a/docs/zh/docs/tutorial/sql-databases.md
+++ b/docs/zh/docs/tutorial/sql-databases.md
@@ -78,9 +78,23 @@ ORM 具有在代码和数据库表(“*关系型”)中的**对象**之间
现在让我们看看每个文件/模块的作用。
+## 安装 SQLAlchemy
+
+先下载`SQLAlchemy`所需要的依赖:
+
+