mirror of
https://github.com/fastapi/fastapi.git
synced 2026-06-09 08:04:46 -04:00
Compare commits
7 Commits
check-zh-t
...
enable-hin
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f2fe72b986 | ||
|
|
bf30d501f1 | ||
|
|
227b6e02bc | ||
|
|
c63c3f2fef | ||
|
|
44063e3b67 | ||
|
|
b8965b767f | ||
|
|
5e5e855d76 |
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
github: [tiangolo]
|
||||
27
.github/dependabot.yml
vendored
27
.github/dependabot.yml
vendored
@@ -4,47 +4,26 @@ updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
interval: "daily"
|
||||
cooldown:
|
||||
default-days: 7
|
||||
commit-message:
|
||||
prefix: ⬆
|
||||
labels:
|
||||
- "internal"
|
||||
- "dependencies"
|
||||
- "github_actions"
|
||||
groups:
|
||||
github-actions:
|
||||
patterns:
|
||||
- "*"
|
||||
# Python
|
||||
- package-ecosystem: "uv"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
interval: "daily"
|
||||
cooldown:
|
||||
default-days: 7
|
||||
commit-message:
|
||||
prefix: ⬆
|
||||
groups:
|
||||
python-packages:
|
||||
dependency-type: "development"
|
||||
patterns:
|
||||
- "*"
|
||||
# pre-commit
|
||||
- package-ecosystem: "pre-commit"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
interval: "daily"
|
||||
cooldown:
|
||||
default-days: 7
|
||||
commit-message:
|
||||
prefix: ⬆
|
||||
labels:
|
||||
- "internal"
|
||||
- "dependencies"
|
||||
- "pre-commit"
|
||||
groups:
|
||||
pre-commit:
|
||||
patterns:
|
||||
- "*"
|
||||
|
||||
1
.github/workflows/add-to-project.yml
vendored
1
.github/workflows/add-to-project.yml
vendored
@@ -13,7 +13,6 @@ jobs:
|
||||
add-to-project:
|
||||
name: Add to project
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- uses: actions/add-to-project@5afcf98fcd03f1c2f92c3c83f58ae24323cc57fd # v2.0.0
|
||||
with:
|
||||
|
||||
27
.github/workflows/build-docs.yml
vendored
27
.github/workflows/build-docs.yml
vendored
@@ -16,7 +16,6 @@ jobs:
|
||||
# Required permissions
|
||||
permissions:
|
||||
pull-requests: read
|
||||
timeout-minutes: 5
|
||||
# Set job outputs to values from filter step
|
||||
outputs:
|
||||
docs: ${{ steps.filter.outputs.docs }}
|
||||
@@ -35,15 +34,15 @@ jobs:
|
||||
- docs_src/**
|
||||
- pyproject.toml
|
||||
- uv.lock
|
||||
- mkdocs.yml
|
||||
- mkdocs.env.yml
|
||||
- .github/workflows/build-docs.yml
|
||||
- .github/workflows/deploy-docs.yml
|
||||
- scripts/docs.py
|
||||
- scripts/mkdocs_hooks.py
|
||||
langs:
|
||||
needs:
|
||||
- changes
|
||||
if: ${{ needs.changes.outputs.docs == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
outputs:
|
||||
langs: ${{ steps.show-langs.outputs.langs }}
|
||||
steps:
|
||||
@@ -57,8 +56,6 @@ jobs:
|
||||
- name: Setup uv
|
||||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||||
with:
|
||||
# Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
|
||||
# See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
|
||||
version: "0.11.4"
|
||||
enable-cache: true
|
||||
cache-dependency-glob: |
|
||||
@@ -77,7 +74,6 @@ jobs:
|
||||
- langs
|
||||
if: ${{ needs.changes.outputs.docs == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 7
|
||||
strategy:
|
||||
matrix:
|
||||
lang: ${{ fromJson(needs.langs.outputs.langs) }}
|
||||
@@ -96,8 +92,6 @@ jobs:
|
||||
- name: Setup uv
|
||||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||||
with:
|
||||
# Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
|
||||
# See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
|
||||
version: "0.11.4"
|
||||
enable-cache: true
|
||||
cache-dependency-glob: |
|
||||
@@ -109,28 +103,21 @@ jobs:
|
||||
run: uv run ./scripts/docs.py update-languages
|
||||
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
||||
with:
|
||||
key: zensical-${{ matrix.lang }}-${{ github.ref }}
|
||||
path: site_zensical_src/${{ matrix.lang }}/.cache
|
||||
key: mkdocs-cards-${{ matrix.lang }}-${{ github.ref }}
|
||||
path: docs/${{ matrix.lang }}/.cache
|
||||
- name: Build Docs
|
||||
run: | # zizmor: ignore[template-injection] - comes from trusted source
|
||||
uv run ./scripts/docs.py build-lang ${{ matrix.lang }}
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: docs-site-${{ matrix.lang }}
|
||||
# English owns root static assets. Translated pages reference /img, /css,
|
||||
# and /js, so omit duplicated language-local copies from artifacts.
|
||||
path: |
|
||||
./site/**
|
||||
!./site/${{ matrix.lang }}/img/**
|
||||
!./site/${{ matrix.lang }}/css/**
|
||||
!./site/${{ matrix.lang }}/js/**
|
||||
path: ./site/**
|
||||
include-hidden-files: true
|
||||
|
||||
# https://github.com/marketplace/actions/alls-green#why
|
||||
docs-all-green: # This job does nothing and is only used for the branch protection
|
||||
if: always()
|
||||
needs:
|
||||
- langs
|
||||
- build-docs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -138,4 +125,4 @@ jobs:
|
||||
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
|
||||
with:
|
||||
jobs: ${{ toJSON(needs) }}
|
||||
allowed-skips: langs, build-docs
|
||||
allowed-skips: build-docs
|
||||
|
||||
2
.github/workflows/contributors.yml
vendored
2
.github/workflows/contributors.yml
vendored
@@ -33,8 +33,6 @@ jobs:
|
||||
- name: Setup uv
|
||||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||||
with:
|
||||
# Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
|
||||
# See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
|
||||
version: "0.11.4"
|
||||
enable-cache: true
|
||||
cache-dependency-glob: |
|
||||
|
||||
56
.github/workflows/create-draft-release.yml
vendored
56
.github/workflows/create-draft-release.yml
vendored
@@ -1,56 +0,0 @@
|
||||
name: Create Draft Release
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
create-draft-release:
|
||||
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
permissions:
|
||||
contents: write
|
||||
env:
|
||||
PREPARE_RELEASE_VERSION_FILE: fastapi/__init__.py
|
||||
PREPARE_RELEASE_RELEASE_NOTES_FILE: docs/en/docs/release-notes.md
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
run: echo "$GITHUB_CONTEXT"
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
ref: ${{ github.event.repository.default_branch }}
|
||||
persist-credentials: true
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
||||
with:
|
||||
python-version-file: ".python-version"
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||||
with:
|
||||
# Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
|
||||
# See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
|
||||
version: "0.11.4"
|
||||
- name: Extract release details
|
||||
id: release-details
|
||||
run: |
|
||||
set -euo pipefail
|
||||
version="$(uv run python scripts/prepare_release.py current-version)"
|
||||
uv run python scripts/prepare_release.py release-notes > draft-release-notes.md
|
||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||
- name: Create draft release
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
VERSION: ${{ steps.release-details.outputs.version }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
gh release create "$VERSION" \
|
||||
--draft \
|
||||
--title "$VERSION" \
|
||||
--notes-file draft-release-notes.md \
|
||||
--target "$(git rev-parse HEAD)"
|
||||
5
.github/workflows/deploy-docs.yml
vendored
5
.github/workflows/deploy-docs.yml
vendored
@@ -16,7 +16,6 @@ jobs:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
statuses: write
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
@@ -32,8 +31,6 @@ jobs:
|
||||
- name: Setup uv
|
||||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||||
with:
|
||||
# Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
|
||||
# See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
|
||||
version: "0.11.4"
|
||||
enable-cache: false
|
||||
- name: Install GitHub Actions dependencies
|
||||
@@ -63,7 +60,7 @@ jobs:
|
||||
env:
|
||||
PROJECT_NAME: fastapitiangolo
|
||||
BRANCH: ${{ ( github.event.workflow_run.head_repository.full_name == github.repository && github.event.workflow_run.head_branch == 'master' && 'main' ) || ( github.event.workflow_run.head_sha ) }}
|
||||
uses: cloudflare/wrangler-action@ebbaa1584979971c8614a24965b4405ff95890e0 # v4.0.0
|
||||
uses: cloudflare/wrangler-action@9acf94ace14e7dc412b076f2c5c20b8ce93c79cd # v3.15.0
|
||||
with:
|
||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} # zizmor: ignore[secrets-outside-env]
|
||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} # zizmor: ignore[secrets-outside-env]
|
||||
|
||||
3
.github/workflows/detect-conflicts.yml
vendored
3
.github/workflows/detect-conflicts.yml
vendored
@@ -12,10 +12,9 @@ jobs:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Check if PRs have merge conflicts
|
||||
uses: eps1lon/actions-label-merge-conflict@0273be72a0bbd58fcd71d0d6c02c209b50d1e5e1 # v3.1.0
|
||||
uses: eps1lon/actions-label-merge-conflict@1df065ebe6e3310545d4f4c4e862e43bdca146f0 # v3.0.3
|
||||
with:
|
||||
dirtyLabel: "conflicts"
|
||||
repoToken: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
1
.github/workflows/guard-dependencies.yml
vendored
1
.github/workflows/guard-dependencies.yml
vendored
@@ -15,7 +15,6 @@ permissions:
|
||||
jobs:
|
||||
check-author:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Check if author is org member or allowed bot
|
||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||
|
||||
1
.github/workflows/issue-manager.yml
vendored
1
.github/workflows/issue-manager.yml
vendored
@@ -23,7 +23,6 @@ jobs:
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
|
||||
3
.github/workflows/label-approved.yml
vendored
3
.github/workflows/label-approved.yml
vendored
@@ -13,7 +13,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
timeout-minutes: 7
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
@@ -29,8 +28,6 @@ jobs:
|
||||
- name: Setup uv
|
||||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||||
with:
|
||||
# Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
|
||||
# See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
|
||||
version: "0.11.4"
|
||||
enable-cache: true
|
||||
cache-dependency-glob: |
|
||||
|
||||
4
.github/workflows/labeler.yml
vendored
4
.github/workflows/labeler.yml
vendored
@@ -17,7 +17,6 @@ jobs:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- uses: actions/labeler@f27b608878404679385c85cfa523b85ccb86e213 # v6.1.0
|
||||
if: ${{ github.event.action != 'labeled' && github.event.action != 'unlabeled' }}
|
||||
@@ -29,9 +28,8 @@ jobs:
|
||||
permissions:
|
||||
pull-requests: read
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- uses: agilepathway/label-checker@c3d16ad512e7cea5961df85ff2486bb774caf3c5 # v1.6.65
|
||||
with:
|
||||
one_of: breaking,security,feature,bug,refactor,upgrade,docs,lang-all,internal,release
|
||||
one_of: breaking,security,feature,bug,refactor,upgrade,docs,lang-all,internal
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
3
.github/workflows/latest-changes.yml
vendored
3
.github/workflows/latest-changes.yml
vendored
@@ -22,7 +22,6 @@ jobs:
|
||||
latest-changes:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
@@ -39,7 +38,7 @@ jobs:
|
||||
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
|
||||
with:
|
||||
limit-access-to-actor: true
|
||||
- uses: tiangolo/latest-changes@eb3f6e7ff0073896ecb561e774a121de9418fa06 # 0.5.0
|
||||
- uses: tiangolo/latest-changes@c9d329cb147f0ddf4fb631214e3f838ff17ccbbd # 0.4.1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
latest_changes_file: docs/en/docs/release-notes.md
|
||||
|
||||
3
.github/workflows/notify-translations.yml
vendored
3
.github/workflows/notify-translations.yml
vendored
@@ -24,7 +24,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
discussions: write
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
@@ -40,8 +39,6 @@ jobs:
|
||||
- name: Setup uv
|
||||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||||
with:
|
||||
# Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
|
||||
# See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
|
||||
version: "0.11.4"
|
||||
enable-cache: true
|
||||
cache-dependency-glob: |
|
||||
|
||||
2
.github/workflows/people.yml
vendored
2
.github/workflows/people.yml
vendored
@@ -33,8 +33,6 @@ jobs:
|
||||
- name: Setup uv
|
||||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||||
with:
|
||||
# Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
|
||||
# See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
|
||||
version: "0.11.4"
|
||||
enable-cache: true
|
||||
cache-dependency-glob: |
|
||||
|
||||
4
.github/workflows/pre-commit.yml
vendored
4
.github/workflows/pre-commit.yml
vendored
@@ -15,7 +15,6 @@ env:
|
||||
jobs:
|
||||
pre-commit:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
@@ -49,8 +48,6 @@ jobs:
|
||||
- name: Setup uv
|
||||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||||
with:
|
||||
# Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
|
||||
# See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
|
||||
version: "0.11.4"
|
||||
cache-dependency-glob: |
|
||||
pyproject.toml
|
||||
@@ -87,7 +84,6 @@ jobs:
|
||||
needs:
|
||||
- pre-commit
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
|
||||
80
.github/workflows/prepare-release.yml
vendored
80
.github/workflows/prepare-release.yml
vendored
@@ -1,80 +0,0 @@
|
||||
name: Prepare Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
bump:
|
||||
description: Release bump
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- patch
|
||||
- minor
|
||||
- major
|
||||
date:
|
||||
description: Release date in YYYY-MM-DD format. Defaults to today.
|
||||
required: false
|
||||
type: string
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
prepare-release:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
permissions:
|
||||
contents: write
|
||||
issues: write
|
||||
pull-requests: write
|
||||
env:
|
||||
PREPARE_RELEASE_VERSION_FILE: fastapi/__init__.py
|
||||
PREPARE_RELEASE_RELEASE_NOTES_FILE: docs/en/docs/release-notes.md
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
run: echo "$GITHUB_CONTEXT"
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
token: ${{ secrets.FASTAPI_LATEST_CHANGES }} # zizmor: ignore[secrets-outside-env]
|
||||
persist-credentials: true
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
||||
with:
|
||||
python-version-file: ".python-version"
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||||
with:
|
||||
# Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
|
||||
# See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
|
||||
version: "0.11.4"
|
||||
- name: Prepare release
|
||||
env:
|
||||
PREPARE_RELEASE_BUMP: ${{ inputs.bump }}
|
||||
PREPARE_RELEASE_DATE: ${{ inputs.date }}
|
||||
run: uv run python scripts/prepare_release.py prepare
|
||||
- name: Get release version
|
||||
id: release-version
|
||||
run: |
|
||||
version="$(uv run python scripts/prepare_release.py current-version)"
|
||||
echo "$version"
|
||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||
- name: Create release pull request
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.FASTAPI_LATEST_CHANGES }}
|
||||
VERSION: ${{ steps.release-version.outputs.version }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
branch="release-${VERSION}-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git switch -c "$branch"
|
||||
git add $PREPARE_RELEASE_VERSION_FILE $PREPARE_RELEASE_RELEASE_NOTES_FILE
|
||||
git commit -m "🔖 Release version ${VERSION}"
|
||||
git push --set-upstream origin "$branch"
|
||||
gh pr create \
|
||||
--base master \
|
||||
--head "$branch" \
|
||||
--title "🔖 Release version ${VERSION}" \
|
||||
--body "Prepare release ${VERSION}." \
|
||||
--label release
|
||||
6
.github/workflows/publish.yml
vendored
6
.github/workflows/publish.yml
vendored
@@ -3,7 +3,7 @@ name: Publish
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
- created
|
||||
|
||||
permissions: {}
|
||||
|
||||
@@ -13,7 +13,6 @@ jobs:
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
@@ -29,10 +28,7 @@ jobs:
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||||
with:
|
||||
# Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
|
||||
# See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
|
||||
version: "0.11.4"
|
||||
enable-cache: "false"
|
||||
- name: Build distribution
|
||||
run: uv build
|
||||
- name: Publish
|
||||
|
||||
3
.github/workflows/smokeshow.yml
vendored
3
.github/workflows/smokeshow.yml
vendored
@@ -12,7 +12,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
statuses: write
|
||||
timeout-minutes: 5
|
||||
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
@@ -28,8 +27,6 @@ jobs:
|
||||
- name: Setup uv
|
||||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||||
with:
|
||||
# Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
|
||||
# See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
|
||||
version: "0.11.4"
|
||||
cache-dependency-glob: |
|
||||
pyproject.toml
|
||||
|
||||
3
.github/workflows/sponsors.yml
vendored
3
.github/workflows/sponsors.yml
vendored
@@ -18,7 +18,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
@@ -34,8 +33,6 @@ jobs:
|
||||
- name: Setup uv
|
||||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||||
with:
|
||||
# Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
|
||||
# See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
|
||||
version: "0.11.4"
|
||||
enable-cache: true
|
||||
cache-dependency-glob: |
|
||||
|
||||
2
.github/workflows/test-redistribute.yml
vendored
2
.github/workflows/test-redistribute.yml
vendored
@@ -14,7 +14,6 @@ permissions: {}
|
||||
jobs:
|
||||
test-redistribute:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
@@ -58,7 +57,6 @@ jobs:
|
||||
needs:
|
||||
- test-redistribute
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Decide whether the needed jobs succeeded or failed
|
||||
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
|
||||
|
||||
24
.github/workflows/test.yml
vendored
24
.github/workflows/test.yml
vendored
@@ -25,7 +25,6 @@ jobs:
|
||||
permissions:
|
||||
pull-requests: read
|
||||
# Set job outputs to values from filter step
|
||||
timeout-minutes: 5
|
||||
outputs:
|
||||
src: ${{ steps.filter.outputs.src }}
|
||||
steps:
|
||||
@@ -51,7 +50,6 @@ jobs:
|
||||
needs:
|
||||
- changes
|
||||
if: needs.changes.outputs.src == 'true' || github.ref == 'refs/heads/master'
|
||||
timeout-minutes: 10
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ windows-latest, macos-latest ]
|
||||
@@ -83,11 +81,6 @@ jobs:
|
||||
uv-resolution: highest
|
||||
codspeed: codspeed
|
||||
deprecated-tests: "no-deprecation"
|
||||
- os: ubuntu-latest
|
||||
python-version: "3.13"
|
||||
uv-resolution: highest
|
||||
deprecated-tests: "no-deprecation"
|
||||
without-httpx2: true
|
||||
- os: ubuntu-latest
|
||||
python-version: "3.14"
|
||||
coverage: coverage
|
||||
@@ -120,8 +113,6 @@ jobs:
|
||||
- name: Setup uv
|
||||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||||
with:
|
||||
# Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
|
||||
# See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
|
||||
version: "0.11.4"
|
||||
enable-cache: true
|
||||
cache-dependency-glob: |
|
||||
@@ -138,19 +129,15 @@ jobs:
|
||||
- name: Install deprecated libraries just for testing
|
||||
if: matrix.deprecated-tests == 'test-deprecation'
|
||||
run: uv pip install orjson ujson
|
||||
- name: Uninstall httpx2 to run tests with httpx
|
||||
if: matrix.without-httpx2 == 'true'
|
||||
run: uv pip uninstall httpx2
|
||||
- name: Reinstall SQLAlchemy without Cython extensions
|
||||
if: matrix.python-version == '3.14t' && matrix.os == 'ubuntu-latest'
|
||||
run: "DISABLE_SQLALCHEMY_CEXT=1 uv pip install --force-reinstall --no-binary :all: sqlalchemy"
|
||||
- run: mkdir coverage
|
||||
- name: Test
|
||||
run: uv run --no-sync bash scripts/test-cov.sh $PYTEST_OPTIONS
|
||||
run: uv run --no-sync bash scripts/test-cov.sh
|
||||
env:
|
||||
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.deprecated-tests}}
|
||||
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.deprecated-tests}}
|
||||
PYTEST_OPTIONS: ${{ (matrix.without-httpx2 == 'true') && '-W ignore::UserWarning' || '' }}
|
||||
# Do not store coverage for all possible combinations to avoid file size max errors in Smokeshow
|
||||
- name: Store coverage files
|
||||
if: matrix.coverage == 'coverage'
|
||||
@@ -165,7 +152,6 @@ jobs:
|
||||
- changes
|
||||
if: needs.changes.outputs.src == 'true' || github.ref == 'refs/heads/master'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
env:
|
||||
UV_PYTHON: "3.13"
|
||||
UV_RESOLUTION: highest
|
||||
@@ -184,8 +170,6 @@ jobs:
|
||||
- name: Setup uv
|
||||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||||
with:
|
||||
# Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
|
||||
# See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
|
||||
version: "0.11.4"
|
||||
enable-cache: true
|
||||
cache-dependency-glob: |
|
||||
@@ -194,7 +178,7 @@ jobs:
|
||||
- name: Install Dependencies
|
||||
run: uv sync --no-dev --group tests --extra all
|
||||
- name: CodSpeed benchmarks
|
||||
uses: CodSpeedHQ/action@3194d9a39c4d46684cb44bf7207fc56626aad8fd # v4.15.1
|
||||
uses: CodSpeedHQ/action@658a901452bb54c799643e060733b7afe9121b8d # v4.14.0
|
||||
with:
|
||||
mode: simulation
|
||||
run: uv run --no-sync pytest tests/benchmarks --codspeed
|
||||
@@ -203,7 +187,6 @@ jobs:
|
||||
needs:
|
||||
- test
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
@@ -218,8 +201,6 @@ jobs:
|
||||
- name: Setup uv
|
||||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||||
with:
|
||||
# Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
|
||||
# See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
|
||||
version: "0.11.4"
|
||||
enable-cache: true
|
||||
cache-dependency-glob: |
|
||||
@@ -251,7 +232,6 @@ jobs:
|
||||
- coverage-combine
|
||||
- benchmark
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
|
||||
3
.github/workflows/topic-repos.yml
vendored
3
.github/workflows/topic-repos.yml
vendored
@@ -13,7 +13,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
@@ -29,8 +28,6 @@ jobs:
|
||||
- name: Setup uv
|
||||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||||
with:
|
||||
# Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
|
||||
# See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
|
||||
version: "0.11.4"
|
||||
enable-cache: true
|
||||
cache-dependency-glob: |
|
||||
|
||||
4
.github/workflows/translate.yml
vendored
4
.github/workflows/translate.yml
vendored
@@ -60,8 +60,6 @@ jobs:
|
||||
- name: Setup uv
|
||||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||||
with:
|
||||
# Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
|
||||
# See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
|
||||
version: "0.11.4"
|
||||
cache-dependency-glob: |
|
||||
pyproject.toml
|
||||
@@ -103,8 +101,6 @@ jobs:
|
||||
- name: Setup uv
|
||||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||||
with:
|
||||
# Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
|
||||
# See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
|
||||
version: "0.11.4"
|
||||
cache-dependency-glob: |
|
||||
pyproject.toml
|
||||
|
||||
24
.github/workflows/zizmor.yml
vendored
24
.github/workflows/zizmor.yml
vendored
@@ -1,24 +0,0 @@
|
||||
name: Zizmor
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
zizmor:
|
||||
name: Run zizmor
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
permissions:
|
||||
security-events: write # Required for upload-sarif (used by zizmor-action) to upload SARIF files.
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Run zizmor
|
||||
uses: zizmorcore/zizmor-action@5f14fd08f7cf1cb1609c1e344975f152c7ee938d # v0.5.6
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -7,7 +7,6 @@ __pycache__
|
||||
htmlcov
|
||||
dist
|
||||
site
|
||||
site_zensical_src
|
||||
.coverage*
|
||||
coverage.xml
|
||||
.netlify
|
||||
|
||||
@@ -96,6 +96,6 @@ repos:
|
||||
name: zizmor
|
||||
language: python
|
||||
entry: uv run zizmor .
|
||||
files: ^\.github/workflows/|^uv\.lock$
|
||||
files: ^\.github\/workflows\/
|
||||
require_serial: true
|
||||
pass_filenames: false
|
||||
|
||||
1
CONTRIBUTING.md
Normal file
1
CONTRIBUTING.md
Normal file
@@ -0,0 +1 @@
|
||||
Please read the [Development - Contributing](https://fastapi.tiangolo.com/contributing/) guidelines in the documentation site.
|
||||
@@ -71,7 +71,6 @@ The key features are:
|
||||
<a href="https://www.interviewpal.com/?utm_source=fastapi&utm_medium=open-source&utm_campaign=dev-hiring" target="_blank" title="InterviewPal - AI Interview Coach for Engineers and Devs"><img src="https://fastapi.tiangolo.com/img/sponsors/interviewpal.png"></a>
|
||||
<a href="https://dribia.com/en/" target="_blank" title="Dribia - Data Science within your reach"><img src="https://fastapi.tiangolo.com/img/sponsors/dribia.png"></a>
|
||||
<a href="https://talordata.com/?campaignid=oh5dVZ3Zc3YGiAI2&utm_source=fastapi&utm_term=fastapi" target="_blank" title="TalorData SERP API - Multi-Engine Search Results Data"><img src="https://fastapi.tiangolo.com/img/sponsors/talordata.png"></a>
|
||||
<a href="https://www.rapidproxy.io/?ref=fastapi" target="_blank" title="Try RapidProxy for free - Residential Proxies with 90M+ Global IPs. Starting from $0.65/GB for web scraping, automation, and data collection."><img src="https://fastapi.tiangolo.com/img/sponsors/rapidproxy.png"></a>
|
||||
|
||||
<!-- /sponsors -->
|
||||
|
||||
|
||||
31
SECURITY.md
Normal file
31
SECURITY.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Security Policy
|
||||
|
||||
Security is very important for FastAPI and its community. 🔒
|
||||
|
||||
Learn more about it below. 👇
|
||||
|
||||
## Versions
|
||||
|
||||
The latest version of FastAPI is supported.
|
||||
|
||||
You are encouraged to [write tests](https://fastapi.tiangolo.com/tutorial/testing/) for your application and update your FastAPI version frequently after ensuring that your tests are passing. This way you will benefit from the latest features, bug fixes, and **security fixes**.
|
||||
|
||||
You can learn more about [FastAPI versions and how to pin and upgrade them](https://fastapi.tiangolo.com/deployment/versions/) for your project in the docs.
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
If you think you found a vulnerability, and even if you are not sure about it, please report it right away by sending an email to: security@tiangolo.com. Please try to be as explicit as possible, describing all the steps and example code to reproduce the security issue.
|
||||
|
||||
I (the author, [@tiangolo](https://x.com/tiangolo)) will review it thoroughly and get back to you.
|
||||
|
||||
## Public Discussions
|
||||
|
||||
Please restrain from publicly discussing a potential security vulnerability. 🙊
|
||||
|
||||
It's better to discuss privately and try to find a solution first, to limit the potential impact as much as possible.
|
||||
|
||||
---
|
||||
|
||||
Thanks for your help!
|
||||
|
||||
The FastAPI community and I thank you for that. 🙇
|
||||
@@ -1,6 +1,6 @@
|
||||
# LLM-Testdatei { #llm-test-file }
|
||||
|
||||
Dieses Dokument testet, ob das <abbr title="Large Language Model - Großes Sprachmodell">LLM</abbr>, das die Dokumentation übersetzt, den <abbr title="General Prompt - Allgemeiner Prompt">`general_prompt`</abbr> in `scripts/translate.py` und den sprachspezifischen Prompt in `docs/{language code}/llm-prompt.md` versteht. Der sprachsspezifische Prompt wird an `general_prompt` angehängt.
|
||||
Dieses Dokument testet, ob das <abbr title="Large Language Model – Großes Sprachmodell">LLM</abbr>, das die Dokumentation übersetzt, den <abbr title="General Prompt – Allgemeiner Prompt">`general_prompt`</abbr> in `scripts/translate.py` und den sprachspezifischen Prompt in `docs/{language code}/llm-prompt.md` versteht. Der sprachsspezifische Prompt wird an `general_prompt` angehängt.
|
||||
|
||||
Hier hinzugefügte Tests werden von allen Erstellern sprachsspezifischer Prompts gesehen.
|
||||
|
||||
@@ -95,7 +95,7 @@ $ <font color="#4E9A06">fastapi</font> run <u style="text-decoration-style:solid
|
||||
... und noch ein Konsolen-Codebeispiel ...
|
||||
|
||||
```console
|
||||
// Ein Verzeichnis "Code" erstellen
|
||||
// Create a directory "Code"
|
||||
$ mkdir code
|
||||
// In dieses Verzeichnis wechseln
|
||||
$ cd code
|
||||
@@ -124,6 +124,10 @@ Siehe Abschnitt `### Content of code blocks` im allgemeinen Prompt in `scripts/t
|
||||
|
||||
//// tab | Test
|
||||
|
||||
/// info | Info
|
||||
Etwas Text
|
||||
///
|
||||
|
||||
/// note | Hinweis
|
||||
Etwas Text
|
||||
///
|
||||
@@ -132,6 +136,10 @@ Etwas Text
|
||||
Etwas Text
|
||||
///
|
||||
|
||||
/// check | Testen
|
||||
Etwas Text
|
||||
///
|
||||
|
||||
/// tip | Tipp
|
||||
Etwas Text
|
||||
///
|
||||
@@ -189,15 +197,15 @@ Hier einige Dinge, die in HTML-„abbr“-Elemente gepackt sind (einige sind erf
|
||||
|
||||
### Das abbr gibt eine vollständige Phrase { #the-abbr-gives-a-full-phrase }
|
||||
|
||||
* <abbr title="Getting Things Done - Dinge erledigt bekommen">GTD</abbr>
|
||||
* <abbr title="less than - kleiner als"><code>lt</code></abbr>
|
||||
* <abbr title="Getting Things Done – Dinge erledigt bekommen">GTD</abbr>
|
||||
* <abbr title="less than – kleiner als"><code>lt</code></abbr>
|
||||
* <abbr title="XML Web Token">XWT</abbr>
|
||||
* <abbr title="Paralleles Server-Gateway-Interface">PSGI</abbr>
|
||||
|
||||
### Das abbr gibt eine vollständige Phrase und eine Erklärung { #the-abbr-gives-a-full-phrase-and-an-explanation }
|
||||
|
||||
* <abbr title="Mozilla Developer Network - Mozilla-Entwicklernetzwerk: Dokumentation für Entwickler, geschrieben von den Firefox-Leuten">MDN</abbr>
|
||||
* <abbr title="Input/Output - Eingabe/Ausgabe: Lesen oder Schreiben auf der Festplatte, Netzwerkkommunikation.">I/O</abbr>.
|
||||
* <abbr title="Mozilla Developer Network – Mozilla-Entwicklernetzwerk: Dokumentation für Entwickler, geschrieben von den Firefox-Leuten">MDN</abbr>
|
||||
* <abbr title="Input/Output – Eingabe/Ausgabe: Lesen oder Schreiben auf der Festplatte, Netzwerkkommunikation.">I/O</abbr>.
|
||||
|
||||
////
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ Das Django REST Framework wurde von Tom Christie erstellt. Derselbe Schöpfer vo
|
||||
|
||||
///
|
||||
|
||||
/// tip | Inspirierte **FastAPI** dazu
|
||||
/// check | Inspirierte **FastAPI**
|
||||
|
||||
Eine automatische API-Dokumentationsoberfläche zu haben.
|
||||
|
||||
@@ -56,7 +56,7 @@ Diese Entkopplung der Teile und die Tatsache, dass es sich um ein „Mikroframew
|
||||
|
||||
Angesichts der Einfachheit von Flask schien es eine gute Ergänzung zum Erstellen von APIs zu sein. Als Nächstes musste ein „Django REST Framework“ für Flask gefunden werden.
|
||||
|
||||
/// tip | Inspirierte **FastAPI** dazu
|
||||
/// check | Inspirierte **FastAPI**
|
||||
|
||||
Ein Mikroframework zu sein. Es einfach zu machen, die benötigten Tools und Teile zu kombinieren.
|
||||
|
||||
@@ -98,7 +98,7 @@ def read_url():
|
||||
|
||||
Sehen Sie sich die Ähnlichkeiten in `requests.get(...)` und `@app.get(...)` an.
|
||||
|
||||
/// tip | Inspirierte **FastAPI** dazu
|
||||
/// check | Inspirierte **FastAPI**
|
||||
|
||||
* Über eine einfache und intuitive API zu verfügen.
|
||||
* HTTP-Methodennamen (Operationen) direkt, auf einfache und intuitive Weise zu verwenden.
|
||||
@@ -118,7 +118,7 @@ Irgendwann wurde Swagger an die Linux Foundation übergeben und in OpenAPI umben
|
||||
|
||||
Aus diesem Grund spricht man bei Version 2.0 häufig von „Swagger“ und ab Version 3 von „OpenAPI“.
|
||||
|
||||
/// tip | Inspirierte **FastAPI** dazu
|
||||
/// check | Inspirierte **FastAPI**
|
||||
|
||||
Einen offenen Standard für API-Spezifikationen zu übernehmen und zu verwenden, anstelle eines benutzerdefinierten Schemas.
|
||||
|
||||
@@ -147,7 +147,7 @@ Für diese Funktionen wurde Marshmallow entwickelt. Es ist eine großartige Bibl
|
||||
|
||||
Aber sie wurde erstellt, bevor Typhinweise in Python existierten. Um also ein <dfn title="die Definition, wie Daten geformt sein sollen">Schema</dfn> zu definieren, müssen Sie bestimmte Werkzeuge und Klassen verwenden, die von Marshmallow bereitgestellt werden.
|
||||
|
||||
/// tip | Inspirierte **FastAPI** dazu
|
||||
/// check | Inspirierte **FastAPI**
|
||||
|
||||
Code zu verwenden, um „Schemas“ zu definieren, welche Datentypen und Validierung automatisch bereitstellen.
|
||||
|
||||
@@ -163,13 +163,13 @@ Es verwendet unter der Haube Marshmallow, um die Datenvalidierung durchzuführen
|
||||
|
||||
Es ist ein großartiges Tool und ich habe es auch oft verwendet, bevor ich **FastAPI** hatte.
|
||||
|
||||
/// note | Hinweis
|
||||
/// info | Info
|
||||
|
||||
Webargs wurde von denselben Marshmallow-Entwicklern erstellt.
|
||||
|
||||
///
|
||||
|
||||
/// tip | Inspirierte **FastAPI** dazu
|
||||
/// check | Inspirierte **FastAPI**
|
||||
|
||||
Eingehende Requestdaten automatisch zu validieren.
|
||||
|
||||
@@ -193,13 +193,13 @@ Aber dann haben wir wieder das Problem einer Mikrosyntax innerhalb eines Python-
|
||||
|
||||
Der Texteditor kann dabei nicht viel helfen. Und wenn wir Parameter oder Marshmallow-Schemas ändern und vergessen, auch den YAML-Docstring zu ändern, wäre das generierte Schema veraltet.
|
||||
|
||||
/// note | Hinweis
|
||||
/// info | Info
|
||||
|
||||
APISpec wurde von denselben Marshmallow-Entwicklern erstellt.
|
||||
|
||||
///
|
||||
|
||||
/// tip | Inspirierte **FastAPI** dazu
|
||||
/// check | Inspirierte **FastAPI**
|
||||
|
||||
Den offenen Standard für APIs, OpenAPI, zu unterstützen.
|
||||
|
||||
@@ -225,13 +225,13 @@ Die Verwendung führte zur Entwicklung mehrerer Flask-Full-Stack-Generatoren. Di
|
||||
|
||||
Und dieselben Full-Stack-Generatoren bildeten die Basis der [**FastAPI**-Projektgeneratoren](project-generation.md).
|
||||
|
||||
/// note | Hinweis
|
||||
/// info | Info
|
||||
|
||||
Flask-apispec wurde von denselben Marshmallow-Entwicklern erstellt.
|
||||
|
||||
///
|
||||
|
||||
/// tip | Inspirierte **FastAPI** dazu
|
||||
/// check | Inspirierte **FastAPI**
|
||||
|
||||
Das OpenAPI-Schema automatisch zu generieren, aus demselben Code, welcher die Serialisierung und Validierung definiert.
|
||||
|
||||
@@ -251,7 +251,7 @@ Da TypeScript-Daten jedoch nach der Kompilierung nach JavaScript nicht erhalten
|
||||
|
||||
Es kann nicht sehr gut mit verschachtelten Modellen umgehen. Wenn es sich beim JSON-Body im Request also um ein JSON-Objekt mit inneren Feldern handelt, die wiederum verschachtelte JSON-Objekte sind, kann er nicht richtig dokumentiert und validiert werden.
|
||||
|
||||
/// tip | Inspirierte **FastAPI** dazu
|
||||
/// check | Inspirierte **FastAPI**
|
||||
|
||||
Python-Typen zu verwenden, um eine hervorragende Editorunterstützung zu erhalten.
|
||||
|
||||
@@ -271,7 +271,7 @@ Hat eindeutig Uvicorn und Starlette inspiriert, welche derzeit in offenen Benchm
|
||||
|
||||
///
|
||||
|
||||
/// tip | Inspirierte **FastAPI** dazu
|
||||
/// check | Inspirierte **FastAPI**
|
||||
|
||||
Einen Weg zu finden, eine hervorragende Performanz zu haben.
|
||||
|
||||
@@ -287,7 +287,7 @@ Es ist so konzipiert, dass es über Funktionen verfügt, welche zwei Parameter e
|
||||
|
||||
Daher müssen Datenvalidierung, Serialisierung und Dokumentation im Code und nicht automatisch erfolgen. Oder sie müssen als Framework oberhalb von Falcon implementiert werden, so wie Hug. Dieselbe Unterscheidung findet auch in anderen Frameworks statt, die vom Design von Falcon inspiriert sind und ein Requestobjekt und ein Responseobjekt als Parameter haben.
|
||||
|
||||
/// tip | Inspirierte **FastAPI** dazu
|
||||
/// check | Inspirierte **FastAPI**
|
||||
|
||||
Wege zu finden, eine großartige Performanz zu erzielen.
|
||||
|
||||
@@ -313,7 +313,7 @@ Das Dependency Injection System erfordert eine Vorab-Registrierung der Abhängig
|
||||
|
||||
Routen werden an einer einzigen Stelle deklariert, indem Funktionen verwendet werden, die an anderen Stellen deklariert wurden (anstatt Dekoratoren zu verwenden, welche direkt über der Funktion platziert werden können, welche den Endpunkt verarbeitet). Dies ähnelt eher der Vorgehensweise von Django als der Vorgehensweise von Flask (und Starlette). Es trennt im Code Dinge, die relativ eng miteinander gekoppelt sind.
|
||||
|
||||
/// tip | Inspirierte **FastAPI** dazu
|
||||
/// check | Inspirierte **FastAPI**
|
||||
|
||||
Zusätzliche Validierungen für Datentypen zu definieren, mithilfe des „Default“-Werts von Modellattributen. Dies verbessert die Editorunterstützung und war zuvor in Pydantic nicht verfügbar.
|
||||
|
||||
@@ -335,13 +335,13 @@ Es verfügt über eine interessante, ungewöhnliche Funktion: Mit demselben Fram
|
||||
|
||||
Da es auf dem bisherigen Standard für synchrone Python-Webframeworks (WSGI) basiert, kann es nicht mit Websockets und anderen Dingen umgehen, verfügt aber dennoch über eine hohe Performanz.
|
||||
|
||||
/// note | Hinweis
|
||||
/// info | Info
|
||||
|
||||
Hug wurde von Timothy Crosley erstellt, demselben Schöpfer von [`isort`](https://github.com/timothycrosley/isort), einem großartigen Tool zum automatischen Sortieren von Importen in Python-Dateien.
|
||||
|
||||
///
|
||||
|
||||
/// tip | Ideen, die **FastAPI** inspiriert haben
|
||||
/// check | Ideen, die **FastAPI** inspiriert haben
|
||||
|
||||
Hug inspirierte Teile von APIStar und war eines der Tools, die ich am vielversprechendsten fand, neben APIStar.
|
||||
|
||||
@@ -375,7 +375,7 @@ Es handelte sich nicht länger um ein API-Webframework, da sich der Entwickler a
|
||||
|
||||
Jetzt handelt es sich bei APIStar um eine Reihe von Tools zur Validierung von OpenAPI-Spezifikationen, nicht um ein Webframework.
|
||||
|
||||
/// note | Hinweis
|
||||
/// info | Info
|
||||
|
||||
APIStar wurde von Tom Christie erstellt. Derselbe, welcher Folgendes erstellt hat:
|
||||
|
||||
@@ -385,7 +385,7 @@ APIStar wurde von Tom Christie erstellt. Derselbe, welcher Folgendes erstellt ha
|
||||
|
||||
///
|
||||
|
||||
/// tip | Inspirierte **FastAPI** dazu
|
||||
/// check | Inspirierte **FastAPI**
|
||||
|
||||
Zu existieren.
|
||||
|
||||
@@ -409,7 +409,7 @@ Das macht es äußerst intuitiv.
|
||||
|
||||
Es ist vergleichbar mit Marshmallow. Obwohl es in Benchmarks schneller als Marshmallow ist. Und da es auf den gleichen Python-Typhinweisen basiert, ist die Editorunterstützung großartig.
|
||||
|
||||
/// tip | **FastAPI** verwendet es, um
|
||||
/// check | **FastAPI** verwendet es, um
|
||||
|
||||
Die gesamte Datenvalidierung, Datenserialisierung und automatische Modelldokumentation (basierend auf JSON Schema) zu erledigen.
|
||||
|
||||
@@ -452,7 +452,7 @@ Dennoch wird es bereits von mehreren Tools als „Standard“ verwendet. Das ver
|
||||
|
||||
///
|
||||
|
||||
/// tip | **FastAPI** verwendet es, um
|
||||
/// check | **FastAPI** verwendet es, um
|
||||
|
||||
Alle Kern-Webaspekte zu handhaben. Und fügt Funktionen obenauf.
|
||||
|
||||
@@ -470,7 +470,7 @@ Es handelt sich nicht um ein Webframework, sondern um einen Server. Beispielswei
|
||||
|
||||
Es ist der empfohlene Server für Starlette und **FastAPI**.
|
||||
|
||||
/// tip | **FastAPI** empfiehlt es als
|
||||
/// check | **FastAPI** empfiehlt es als
|
||||
|
||||
Hauptwebserver zum Ausführen von **FastAPI**-Anwendungen.
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ Sie und Ihr Schwarm essen die Burger und haben eine schöne Zeit. ✨
|
||||
|
||||
<img src="/img/async/concurrent-burgers/concurrent-burgers-07.png" class="illustration">
|
||||
|
||||
/// note | Hinweis
|
||||
/// info | Info
|
||||
|
||||
Die wunderschönen Illustrationen stammen von [Ketrina Thompson](https://www.instagram.com/ketrinadrawsalot). 🎨
|
||||
|
||||
@@ -205,7 +205,7 @@ Sie essen sie und sind fertig. ⏹
|
||||
|
||||
Es wurde nicht viel geredet oder geflirtet, da die meiste Zeit mit Warten 🕙 vor der Theke verbracht wurde. 😞
|
||||
|
||||
/// note | Hinweis
|
||||
/// info | Info
|
||||
|
||||
Die wunderschönen Illustrationen stammen von [Ketrina Thompson](https://www.instagram.com/ketrinadrawsalot). 🎨
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ was gleichbedeutend wäre mit:
|
||||
from backend.main import app
|
||||
```
|
||||
|
||||
### `fastapi dev` mit Pfad oder mit der CLI-Option `--entrypoint` { #fastapi-dev-with-path-or-with-entrypoint-cli-option }
|
||||
### `fastapi dev` mit Pfad { #fastapi-dev-with-path }
|
||||
|
||||
Sie können auch den Dateipfad an den Befehl `fastapi dev` übergeben, dann wird das zu verwendende FastAPI-App-Objekt erraten:
|
||||
|
||||
@@ -103,13 +103,7 @@ Sie können auch den Dateipfad an den Befehl `fastapi dev` übergeben, dann wird
|
||||
$ fastapi dev main.py
|
||||
```
|
||||
|
||||
Oder Sie können auch die Option `--entrypoint` an den Befehl `fastapi dev` übergeben:
|
||||
|
||||
```console
|
||||
$ fastapi dev --entrypoint main:app
|
||||
```
|
||||
|
||||
Aber Sie müssten sich merken, bei jedem Aufruf des `fastapi`-Befehls den korrekten Pfad\entrypoint zu übergeben.
|
||||
Aber Sie müssten sich merken, bei jedem Aufruf des `fastapi`-Befehls den korrekten Pfad zu übergeben.
|
||||
|
||||
Zusätzlich könnten andere Tools sie nicht finden, z. B. die [VS Code Extension](editor-support.md) oder [FastAPI Cloud](https://fastapicloud.com), daher wird empfohlen, den `entrypoint` in `pyproject.toml` zu verwenden.
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ second_user_data = {
|
||||
my_second_user: User = User(**second_user_data)
|
||||
```
|
||||
|
||||
/// note | Hinweis
|
||||
/// info | Info
|
||||
|
||||
`**second_user_data` bedeutet:
|
||||
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
# Helfen { #help }
|
||||
# FastAPI helfen – Hilfe erhalten { #help-fastapi-get-help }
|
||||
|
||||
Möchten Sie FastAPI helfen oder Hilfe zu FastAPI erhalten?
|
||||
Mögen Sie **FastAPI**?
|
||||
|
||||
Es gibt sehr einfache Möglichkeiten, zu helfen und Hilfe zu bekommen.
|
||||
Möchten Sie FastAPI, anderen Benutzern und dem Autor helfen?
|
||||
|
||||
Oder möchten Sie Hilfe zu **FastAPI** erhalten?
|
||||
|
||||
Es gibt sehr einfache Möglichkeiten zu helfen (einige erfordern nur ein oder zwei Klicks).
|
||||
|
||||
Und es gibt auch mehrere Möglichkeiten, Hilfe zu bekommen.
|
||||
|
||||
## Newsletter abonnieren { #subscribe-to-the-newsletter }
|
||||
|
||||
Sie können den (unregelmäßigen) [**FastAPI and friends**-Newsletter](newsletter.md) abonnieren, um über Folgendes informiert zu bleiben:
|
||||
Sie können den (unregelmäßigen) [**FastAPI and friends**-Newsletter](newsletter.md) abonnieren, um über folgende Themen informiert zu bleiben:
|
||||
|
||||
* Neuigkeiten über FastAPI und Freunde 🚀
|
||||
* Anleitungen 📝
|
||||
@@ -14,13 +20,9 @@ Sie können den (unregelmäßigen) [**FastAPI and friends**-Newsletter](newslett
|
||||
* Breaking Changes 🚨
|
||||
* Tipps und Tricks ✅
|
||||
|
||||
## FastAPI online folgen { #follow-fastapi-online }
|
||||
## FastAPI auf X (Twitter) folgen { #follow-fastapi-on-x-twitter }
|
||||
|
||||
Sie können **FastAPI** an mehreren Orten online folgen:
|
||||
|
||||
* [@fastapi auf **X / Twitter**](https://x.com/fastapi)
|
||||
* [@fastapi.tiangolo.com auf **Bluesky**](https://bsky.app/profile/fastapi.tiangolo.com)
|
||||
* [FastAPI auf **LinkedIn**](https://www.linkedin.com/company/fastapi/)
|
||||
[Folgen Sie @fastapi auf **X (Twitter)**](https://x.com/fastapi), um die neuesten Nachrichten über **FastAPI** zu erhalten. 🐦
|
||||
|
||||
## **FastAPI** auf GitHub einen Stern geben { #star-fastapi-in-github }
|
||||
|
||||
@@ -28,43 +30,200 @@ Sie können FastAPI auf GitHub „starren“ (klicken Sie auf den Stern-Button o
|
||||
|
||||
Durch das Hinzufügen eines Sterns können andere Benutzer es leichter finden und sehen, dass es für andere bereits nützlich war.
|
||||
|
||||
## Das GitHub-Repository auf Releases beobachten { #watch-the-github-repository-for-releases }
|
||||
## Das GitHub-Repository auf Releases überwachen { #watch-the-github-repository-for-releases }
|
||||
|
||||
Sie können FastAPI auf GitHub „beobachten“ (klicken Sie auf den „Watch“-Button oben rechts): [https://github.com/fastapi/fastapi](https://github.com/fastapi/fastapi). 👀
|
||||
Sie können FastAPI auf GitHub „beobachten“ (klicken Sie auf den „watch“-Button oben rechts): [https://github.com/fastapi/fastapi](https://github.com/fastapi/fastapi). 👀
|
||||
|
||||
Dort können Sie „Releases only“ auswählen.
|
||||
|
||||
Auf diese Weise erhalten Sie Benachrichtigungen (per E‑Mail), wenn es ein neues Release (eine neue Version) von **FastAPI** mit Bugfixes und neuen Funktionen gibt.
|
||||
Auf diese Weise erhalten Sie Benachrichtigungen (per E-Mail), wenn es ein neues Release (eine neue Version) von **FastAPI** mit Bugfixes und neuen Funktionen gibt.
|
||||
|
||||
## Dem Autor folgen { #follow-the-author }
|
||||
## Mit dem Autor vernetzen { #connect-with-the-author }
|
||||
|
||||
Sie können [mir (Sebastián Ramírez / `tiangolo`)](https://tiangolo.com), dem Autor, an einigen Orten folgen, um mitzubekommen, wenn ich Neuigkeiten zu FastAPI und Freunden habe:
|
||||
Sie können sich mit [mir (Sebastián Ramírez / `tiangolo`)](https://tiangolo.com), dem Autor, vernetzen.
|
||||
|
||||
* [@tiangolo auf **GitHub**](https://github.com/tiangolo).
|
||||
* [@tiangolo auf **X (Twitter)**](https://x.com/tiangolo)
|
||||
* [@tiangolo.com auf **Bluesky**](https://bsky.app/profile/tiangolo.com)
|
||||
* [@tiangolo auf **LinkedIn**](https://www.linkedin.com/in/tiangolo/).
|
||||
Sie können:
|
||||
|
||||
* [Mir auf **GitHub** folgen](https://github.com/tiangolo).
|
||||
* Andere Open-Source-Projekte sehen, die ich erstellt habe und die Ihnen helfen könnten.
|
||||
* Mir folgen, um zu sehen, wenn ich ein neues Open-Source-Projekt erstelle.
|
||||
* [Mir auf **X (Twitter)** folgen](https://x.com/tiangolo) oder [Mastodon](https://fosstodon.org/@tiangolo).
|
||||
* Mir mitteilen, wie Sie FastAPI verwenden (ich höre das gerne).
|
||||
* Mitbekommen, wenn ich Ankündigungen mache oder neue Tools veröffentliche.
|
||||
* Sie können auch [@fastapi auf X (Twitter) folgen](https://x.com/fastapi) (ein separates Konto).
|
||||
* [Mir auf **LinkedIn** folgen](https://www.linkedin.com/in/tiangolo/).
|
||||
* Mitbekommen, wenn ich Ankündigungen mache oder neue Tools veröffentliche (obwohl ich X (Twitter) häufiger verwende 🤷♂).
|
||||
* Lesen, was ich schreibe (oder mir folgen) auf [**Dev.to**](https://dev.to/tiangolo) oder [**Medium**](https://medium.com/@tiangolo).
|
||||
* Andere Ideen, Artikel lesen und mehr über die von mir erstellten Tools erfahren.
|
||||
* Mir folgen, um zu lesen, wenn ich etwas Neues veröffentliche.
|
||||
|
||||
## Über **FastAPI** tweeten { #tweet-about-fastapi }
|
||||
|
||||
[Tweeten Sie über **FastAPI**](https://x.com/compose/tweet?text=I'm loving @fastapi because... https://github.com/fastapi/fastapi) und teilen Sie mir und anderen mit, warum es Ihnen gefällt. 🎉
|
||||
|
||||
Ich höre gerne, wie **FastAPI** verwendet wird, was Ihnen daran gefallen hat, in welchem Projekt/Unternehmen Sie es verwenden, usw.
|
||||
|
||||
## Für FastAPI abstimmen { #vote-for-fastapi }
|
||||
|
||||
* [Stimmen Sie für **FastAPI** auf Slant](https://www.slant.co/options/34241/~fastapi-review).
|
||||
* [Stimmen Sie für **FastAPI** auf AlternativeTo](https://alternativeto.net/software/fastapi/about/).
|
||||
* [Sagen Sie auf StackShare, dass Sie **FastAPI** verwenden](https://stackshare.io/pypi-fastapi).
|
||||
|
||||
## Anderen bei Fragen auf GitHub helfen { #help-others-with-questions-in-github }
|
||||
|
||||
Sie können versuchen, anderen bei ihren Fragen in [GitHub-Diskussionen](https://github.com/fastapi/fastapi/discussions/categories/questions?discussions_q=category%3AQuestions+is%3Aunanswered) zu helfen.
|
||||
Sie können versuchen, anderen bei ihren Fragen zu helfen:
|
||||
|
||||
* [GitHub-Diskussionen](https://github.com/fastapi/fastapi/discussions/categories/questions?discussions_q=category%3AQuestions+is%3Aunanswered)
|
||||
* [GitHub-Issues](https://github.com/fastapi/fastapi/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Aquestion+-label%3Aanswered+)
|
||||
|
||||
In vielen Fällen kennen Sie möglicherweise bereits die Antwort auf diese Fragen. 🤓
|
||||
|
||||
Wenn Sie vielen Menschen bei ihren Fragen helfen, werden Sie offizieller [FastAPI-Experte](fastapi-people.md#fastapi-experts). 🎉
|
||||
|
||||
Denken Sie daran, der wichtigste Punkt ist: Versuchen Sie, freundlich zu sein. 🤗
|
||||
Denken Sie daran, der wichtigste Punkt ist: Versuchen Sie, freundlich zu sein. Die Leute bringen ihre Frustrationen mit und fragen in vielen Fällen nicht auf die beste Art und Weise, aber versuchen Sie dennoch so gut wie möglich, freundlich zu sein. 🤗
|
||||
|
||||
### So helfen { #how-to-help }
|
||||
Die **FastAPI**-Community soll freundlich und einladend sein. Akzeptieren Sie gleichzeitig kein Mobbing oder respektloses Verhalten gegenüber anderen. Wir müssen uns umeinander kümmern.
|
||||
|
||||
Folgen Sie der [Anleitung, wie Sie helfen können](https://tiangolo.com/open-source/help/#help-others-with-questions-in-github) hier.
|
||||
---
|
||||
|
||||
So helfen Sie anderen bei Fragen (in Diskussionen oder Issues):
|
||||
|
||||
### Die Frage verstehen { #understand-the-question }
|
||||
|
||||
* Prüfen Sie, ob Sie verstehen können, was der **Zweck** und der Anwendungsfall der fragenden Person ist.
|
||||
|
||||
* Überprüfen Sie dann, ob die Frage (die überwiegende Mehrheit sind Fragen) **klar** ist.
|
||||
|
||||
* In vielen Fällen handelt es sich bei der gestellten Frage um eine Lösung, die der Benutzer sich vorstellt, aber es könnte eine **bessere** Lösung geben. Wenn Sie das Problem und den Anwendungsfall besser verstehen, können Sie eine bessere **Alternativlösung** vorschlagen.
|
||||
|
||||
* Wenn Sie die Frage nicht verstehen können, fragen Sie nach weiteren **Details**.
|
||||
|
||||
### Das Problem reproduzieren { #reproduce-the-problem }
|
||||
|
||||
In den meisten Fällen und bei den meisten Fragen gibt es etwas in Bezug auf den **originalen Code** der Person.
|
||||
|
||||
In vielen Fällen wird nur ein Fragment des Codes gepostet, aber das reicht nicht aus, um **das Problem zu reproduzieren**.
|
||||
|
||||
* Sie können die Person bitten, ein [minimales, reproduzierbares Beispiel](https://stackoverflow.com/help/minimal-reproducible-example) bereitzustellen, welches Sie **kopieren, einfügen** und lokal ausführen können, um den gleichen Fehler oder das gleiche Verhalten zu sehen, das die Person sieht, oder um ihren Anwendungsfall besser zu verstehen.
|
||||
|
||||
* Wenn Sie in Geberlaune sind, können Sie ein solches Beispiel selbst erstellen, nur basierend auf der Beschreibung des Problems. Denken Sie jedoch daran, dass dies viel Zeit in Anspruch nehmen kann und dass es besser sein kann, zunächst um eine Klärung des Problems zu bitten.
|
||||
|
||||
### Lösungen vorschlagen { #suggest-solutions }
|
||||
|
||||
* Nachdem Sie die Frage verstanden haben, können Sie eine mögliche **Antwort** geben.
|
||||
|
||||
* In vielen Fällen ist es besser, das **zugrunde liegende Problem oder den Anwendungsfall** zu verstehen, da es möglicherweise einen besseren Weg zur Lösung gibt als das, was die Person versucht.
|
||||
|
||||
### Um Schließung bitten { #ask-to-close }
|
||||
|
||||
Wenn die Person antwortet, besteht eine hohe Chance, dass Sie ihr Problem gelöst haben. Herzlichen Glückwunsch, **Sie sind ein Held**! 🦸
|
||||
|
||||
* Wenn es tatsächlich das Problem gelöst hat, können Sie sie darum bitten:
|
||||
|
||||
* In GitHub-Diskussionen: den Kommentar als **Antwort** zu markieren.
|
||||
* In GitHub-Issues: Das Issue zu **schließen**.
|
||||
|
||||
## Das GitHub-Repository beobachten { #watch-the-github-repository }
|
||||
|
||||
Sie können FastAPI auf GitHub „beobachten“ (klicken Sie auf den „watch“-Button oben rechts): [https://github.com/fastapi/fastapi](https://github.com/fastapi/fastapi). 👀
|
||||
|
||||
Wenn Sie dann „Watching“ statt „Releases only“ auswählen, erhalten Sie Benachrichtigungen, wenn jemand ein neues Issue eröffnet oder eine neue Frage stellt. Sie können auch spezifizieren, dass Sie nur über neue Issues, Diskussionen, PRs usw. benachrichtigt werden möchten.
|
||||
|
||||
Dann können Sie versuchen, bei der Lösung solcher Fragen zu helfen.
|
||||
|
||||
## Fragen stellen { #ask-questions }
|
||||
|
||||
Sie können im GitHub-Repository [eine neue Frage erstellen](https://github.com/fastapi/fastapi/discussions/new?category=questions), zum Beispiel um:
|
||||
Sie können im GitHub-Repository [eine neue Frage erstellen](https://github.com/fastapi/fastapi/discussions/new?category=questions), zum Beispiel:
|
||||
|
||||
* Eine **Frage** zu stellen oder nach einem **Problem** zu fragen.
|
||||
* Eine neue **Funktionalität** vorzuschlagen.
|
||||
* Stellen Sie eine **Frage** oder bitten Sie um Hilfe mit einem **Problem**.
|
||||
* Schlagen Sie eine neue **Funktionalität** vor.
|
||||
|
||||
**Hinweis**: Wenn Sie das tun, bitte ich Sie, auch anderen zu helfen. 😉
|
||||
|
||||
## Pull Requests prüfen { #review-pull-requests }
|
||||
|
||||
Sie können mir helfen, Pull Requests von anderen zu überprüfen.
|
||||
|
||||
Noch einmal, bitte versuchen Sie Ihr Bestes, freundlich zu sein. 🤗
|
||||
|
||||
---
|
||||
|
||||
Hier ist, was Sie beachten sollten und wie Sie einen Pull Request überprüfen:
|
||||
|
||||
### Das Problem verstehen { #understand-the-problem }
|
||||
|
||||
* Stellen Sie zunächst sicher, dass Sie **das Problem verstehen**, welches der Pull Request zu lösen versucht. Möglicherweise gibt es eine längere Diskussion dazu in einer GitHub-Diskussion oder einem GitHub-Issue.
|
||||
|
||||
* Es besteht auch eine gute Chance, dass der Pull Request nicht wirklich benötigt wird, da das Problem auf **andere Weise** gelöst werden kann. Dann können Sie das vorschlagen oder danach fragen.
|
||||
|
||||
### Keine Panik wegen des Stils { #dont-worry-about-style }
|
||||
|
||||
* Machen Sie sich keine Sorgen über Dinge wie den Stil von Commit-Nachrichten. Ich werde den Commit zusammenführen und manuell anpassen.
|
||||
|
||||
* Außerdem, keine Sorgen über Stilregeln, es gibt bereits automatisierte Tools, die das überprüfen.
|
||||
|
||||
Und wenn es irgendeinen anderen Stil- oder Konsistenzbedarf gibt, werde ich direkt danach fragen oder zusätzliche Commits mit den erforderlichen Änderungen hinzufügen.
|
||||
|
||||
### Den Code testen { #check-the-code }
|
||||
|
||||
* Prüfen und lesen Sie den Code, fragen Sie sich, ob er Sinn macht, **führen Sie ihn lokal aus** und testen Sie, ob er das Problem tatsächlich löst.
|
||||
|
||||
* Schreiben Sie dann einen **Kommentar** und berichten, dass Sie das getan haben. So weiß ich, dass Sie ihn wirklich überprüft haben.
|
||||
|
||||
/// info | Info
|
||||
|
||||
Leider kann ich PRs, nur weil sie von mehreren gutgeheißen wurden, nicht einfach vertrauen.
|
||||
|
||||
Es ist mehrmals passiert, dass es PRs mit drei, fünf oder mehr Zustimmungen gibt, wahrscheinlich weil die Beschreibung ansprechend ist, aber wenn ich die PRs überprüfe, sind sie tatsächlich fehlerhaft, haben einen Bug, oder lösen das Problem nicht, welches sie behaupten, zu lösen. 😅
|
||||
|
||||
Daher ist es wirklich wichtig, dass Sie den Code wirklich lesen und ausführen und mir in den Kommentaren mitteilen, dass Sie dies getan haben. 🤓
|
||||
|
||||
///
|
||||
|
||||
* Wenn der PR in irgendeiner Weise vereinfacht werden kann, können Sie danach fragen, aber es gibt keinen Grund, zu wählerisch zu sein. Es gibt viele subjektive Standpunkte (und ich habe auch meinen eigenen 🙈), also ist es besser, wenn man sich auf die grundlegenden Dinge konzentriert.
|
||||
|
||||
### Tests { #tests }
|
||||
|
||||
* Helfen Sie mir zu überprüfen, dass der PR **Tests** hat.
|
||||
|
||||
* Überprüfen Sie, dass diese Tests vor dem PR **fehlschlagen**. 🚨
|
||||
|
||||
* Überprüfen Sie dann, dass diese Tests nach dem PR **bestanden** werden. ✅
|
||||
|
||||
* Viele PRs haben keine Tests. Sie können den Autor daran **erinnern**, Tests hinzuzufügen, oder Sie können sogar selbst einige Tests **vorschlagen**. Das ist eines der Dinge, die am meisten Zeit in Anspruch nehmen, und Sie können dabei viel helfen.
|
||||
|
||||
* Kommentieren Sie auch hier anschließend, was Sie versucht haben, sodass ich weiß, dass Sie es überprüft haben. 🤓
|
||||
|
||||
## Einen Pull Request erstellen { #create-a-pull-request }
|
||||
|
||||
Sie können [zum Quellcode mit Pull Requests beitragen](contributing.md), zum Beispiel:
|
||||
|
||||
* Um einen Tippfehler zu beheben, den Sie in der Dokumentation gefunden haben.
|
||||
* Um einen Artikel, ein Video oder einen Podcast über FastAPI zu teilen, den Sie erstellt oder gefunden haben, indem Sie [diese Datei bearbeiten](https://github.com/fastapi/fastapi/edit/master/docs/en/data/external_links.yml).
|
||||
* Stellen Sie sicher, dass Sie Ihren Link am Anfang des entsprechenden Abschnitts einfügen.
|
||||
* Um zu helfen, [die Dokumentation in Ihre Sprache zu übersetzen](contributing.md#translations).
|
||||
* Sie können auch dabei helfen, die von anderen erstellten Übersetzungen zu überprüfen.
|
||||
* Um neue Dokumentationsabschnitte vorzuschlagen.
|
||||
* Um ein bestehendes Problem/Bug zu beheben.
|
||||
* Stellen Sie sicher, dass Sie Tests hinzufügen.
|
||||
* Um eine neue Funktionalität hinzuzufügen.
|
||||
* Stellen Sie sicher, dass Sie Tests hinzufügen.
|
||||
* Stellen Sie sicher, dass Sie Dokumentation hinzufügen, falls das notwendig ist.
|
||||
|
||||
## FastAPI pflegen { #help-maintain-fastapi }
|
||||
|
||||
Helfen Sie mir, **FastAPI** zu pflegen! 🤓
|
||||
|
||||
Es gibt viel zu tun, und das meiste davon können **SIE** tun.
|
||||
|
||||
Die Hauptaufgaben, die Sie jetzt erledigen können, sind:
|
||||
|
||||
* [Anderen bei Fragen auf GitHub helfen](#help-others-with-questions-in-github) (siehe Abschnitt oben).
|
||||
* [Pull Requests prüfen](#review-pull-requests) (siehe Abschnitt oben).
|
||||
|
||||
Diese beiden Aufgaben sind die Dinge, die **am meisten Zeit verbrauchen**. Das ist die Hauptarbeit bei der Wartung von FastAPI.
|
||||
|
||||
Wenn Sie mir dabei helfen können, **helfen Sie mir, FastAPI zu pflegen** und Sie stellen sicher, dass es weiterhin **schneller und besser voranschreitet**. 🚀
|
||||
|
||||
## Am Chat teilnehmen { #join-the-chat }
|
||||
|
||||
@@ -72,7 +231,7 @@ Treten Sie dem 👥 [Discord-Chatserver](https://discord.gg/VQjSZaeJmf) 👥 bei
|
||||
|
||||
/// tip | Tipp
|
||||
|
||||
Bei Fragen stellen Sie sie in GitHub-Diskussionen, dort besteht eine viel größere Chance, dass Sie Hilfe erhalten.
|
||||
Bei Fragen stellen Sie sie in [GitHub-Diskussionen](https://github.com/fastapi/fastapi/discussions/new?category=questions), dort besteht eine viel größere Chance, dass Sie Hilfe von den [FastAPI-Experten](fastapi-people.md#fastapi-experts) erhalten.
|
||||
|
||||
Nutzen Sie den Chat nur für andere allgemeine Gespräche.
|
||||
|
||||
@@ -82,6 +241,16 @@ Nutzen Sie den Chat nur für andere allgemeine Gespräche.
|
||||
|
||||
Bedenken Sie, dass Sie in Chats, die „freie Konversation“ erlauben, leicht Fragen stellen können, die zu allgemein und schwer zu beantworten sind, sodass Sie möglicherweise keine Antworten erhalten.
|
||||
|
||||
Auf GitHub hilft Ihnen die Vorlage dabei, die richtige Frage zu stellen, sodass Sie leichter eine gute Antwort erhalten können, oder sogar das Problem selbst lösen, bevor Sie überhaupt fragen.
|
||||
Auf GitHub hilft Ihnen die Vorlage dabei, die richtige Frage zu stellen, sodass Sie leichter eine gute Antwort erhalten können, oder sogar das Problem selbst lösen, bevor Sie überhaupt fragen. Und auf GitHub kann ich sicherstellen, dass ich immer alles beantworte, auch wenn es einige Zeit dauert. Persönlich kann ich das mit den Chat-Systemen nicht machen. 😅
|
||||
|
||||
Unterhaltungen in den Chat-Systemen sind auch nicht so leicht durchsuchbar wie auf GitHub, sie gehen verloren.
|
||||
Unterhaltungen in den Chat-Systemen sind auch nicht so leicht durchsuchbar wie auf GitHub, sodass Fragen und Antworten möglicherweise im Gespräch verloren gehen. Und nur die auf GitHub machen einen [FastAPI-Experten](fastapi-people.md#fastapi-experts), Sie werden also höchstwahrscheinlich mehr Aufmerksamkeit auf GitHub erhalten.
|
||||
|
||||
Auf der anderen Seite gibt es Tausende von Benutzern in den Chat-Systemen, sodass die Wahrscheinlichkeit hoch ist, dass Sie dort fast immer jemanden zum Reden finden. 😄
|
||||
|
||||
## Den Autor sponsern { #sponsor-the-author }
|
||||
|
||||
Wenn Ihr **Produkt/Firma** auf **FastAPI** angewiesen ist oder in Zusammenhang steht und Sie seine Benutzer erreichen möchten, können Sie den Autor (mich) über [GitHub-Sponsoren](https://github.com/sponsors/tiangolo) unterstützen. Je nach Stufe können Sie einige zusätzliche Vorteile erhalten, wie z. B. ein Abzeichen in der Dokumentation. 🎁
|
||||
|
||||
---
|
||||
|
||||
Danke! 🚀
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
---
|
||||
include_yaml:
|
||||
sponsors: data/sponsors.yml
|
||||
---
|
||||
|
||||
# FastAPI { #fastapi }
|
||||
|
||||
<style>
|
||||
|
||||
@@ -172,7 +172,7 @@ Da die Liste ein Typ ist, welcher innere Typen enthält, werden diese von eckige
|
||||
|
||||
{* ../../docs_src/python_types/tutorial006_py310.py hl[1] *}
|
||||
|
||||
/// note | Hinweis
|
||||
/// info | Info
|
||||
|
||||
Die inneren Typen in den eckigen Klammern werden als „Typ-Parameter“ bezeichnet.
|
||||
|
||||
@@ -283,7 +283,7 @@ Ein Beispiel aus der offiziellen Pydantic Dokumentation:
|
||||
|
||||
{* ../../docs_src/python_types/tutorial011_py310.py *}
|
||||
|
||||
/// note | Hinweis
|
||||
/// info | Info
|
||||
|
||||
Um mehr über [Pydantic zu erfahren, schauen Sie sich dessen Dokumentation an](https://docs.pydantic.dev/).
|
||||
|
||||
@@ -341,7 +341,7 @@ Das mag alles abstrakt klingen. Machen Sie sich keine Sorgen. Sie werden all das
|
||||
|
||||
Das Wichtigste ist, dass **FastAPI** durch die Verwendung von Standard-Python-Typen an einer einzigen Stelle (anstatt weitere Klassen, Dekoratoren usw. hinzuzufügen) einen Großteil der Arbeit für Sie erledigt.
|
||||
|
||||
/// note | Hinweis
|
||||
/// info | Info
|
||||
|
||||
Wenn Sie bereits das ganze Tutorial durchgearbeitet haben und mehr über Typen erfahren wollen, dann ist eine gute Ressource [der „Cheat Sheet“ von `mypy`](https://mypy.readthedocs.io/en/latest/cheat_sheet_py3.html).
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Wenn Sie eine Anwendung oder eine Web-API erstellen, ist es selten der Fall, das
|
||||
|
||||
**FastAPI** bietet ein praktisches Werkzeug zur Strukturierung Ihrer Anwendung bei gleichzeitiger Wahrung der Flexibilität.
|
||||
|
||||
/// note | Hinweis
|
||||
/// info | Info
|
||||
|
||||
Wenn Sie von Flask kommen, wäre dies das Äquivalent zu Flasks Blueprints.
|
||||
|
||||
@@ -194,7 +194,7 @@ Das Endergebnis ist, dass die Pfade für diese Artikel jetzt wie folgt lauten:
|
||||
|
||||
///
|
||||
|
||||
/// tip | Tipp
|
||||
/// check | Testen
|
||||
|
||||
Die Parameter `prefix`, `tags`, `responses` und `dependencies` sind (wie in vielen anderen Fällen) nur ein Feature von **FastAPI**, um Ihnen dabei zu helfen, Codeverdoppelung zu vermeiden.
|
||||
|
||||
@@ -339,7 +339,7 @@ Wir könnten sie auch wie folgt importieren:
|
||||
from app.routers import items, users
|
||||
```
|
||||
|
||||
/// note | Hinweis
|
||||
/// info | Info
|
||||
|
||||
Die erste Version ist ein „relativer Import“:
|
||||
|
||||
@@ -382,7 +382,7 @@ Inkludieren wir nun die `router` aus diesen Submodulen `users` und `items`:
|
||||
|
||||
{* ../../docs_src/bigger_applications/app_an_py310/main.py hl[10:11] title["app/main.py"] *}
|
||||
|
||||
/// note | Hinweis
|
||||
/// info | Info
|
||||
|
||||
`users.router` enthält den `APIRouter` in der Datei `app/routers/users.py`.
|
||||
|
||||
@@ -402,7 +402,7 @@ Hinter den Kulissen wird es also tatsächlich so funktionieren, als ob alles die
|
||||
|
||||
///
|
||||
|
||||
/// tip | Tipp
|
||||
/// check | Testen
|
||||
|
||||
Bei der Einbindung von Routern müssen Sie sich keine Gedanken über die Leistung machen.
|
||||
|
||||
@@ -451,7 +451,7 @@ Hier machen wir es ... nur um zu zeigen, dass wir es können 🤷:
|
||||
|
||||
und es wird korrekt funktionieren, zusammen mit allen anderen *Pfadoperationen*, die mit `app.include_router()` hinzugefügt wurden.
|
||||
|
||||
/// note | Sehr technische Details
|
||||
/// info | Sehr technische Details
|
||||
|
||||
**Hinweis**: Dies ist ein sehr technisches Detail, das Sie wahrscheinlich **einfach überspringen** können.
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ Daher wird die Zeile:
|
||||
|
||||
nicht ausgeführt.
|
||||
|
||||
/// note | Hinweis
|
||||
/// info | Info
|
||||
|
||||
Für weitere Informationen besuchen Sie bitte [die offizielle Python-Dokumentation](https://docs.python.org/3/library/__main__.html).
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ Aber denken Sie daran, dass bei der Nutzung von `Query`, `Path`, `Header` und an
|
||||
|
||||
///
|
||||
|
||||
/// note | Hinweis
|
||||
/// info | Info
|
||||
|
||||
Um Header zu deklarieren, müssen Sie `Header` verwenden, da die Parameter sonst als Query-Parameter interpretiert werden würden.
|
||||
|
||||
|
||||
1
docs/de/mkdocs.yml
Normal file
1
docs/de/mkdocs.yml
Normal file
@@ -0,0 +1 @@
|
||||
INHERIT: ../en/mkdocs.yml
|
||||
@@ -1,16 +1,16 @@
|
||||
tiangolo:
|
||||
login: tiangolo
|
||||
count: 961
|
||||
count: 942
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/1326112?u=cb5d06e73a9e1998141b1641aa88e443c6717651&v=4
|
||||
url: https://github.com/tiangolo
|
||||
dependabot:
|
||||
login: dependabot
|
||||
count: 201
|
||||
count: 189
|
||||
avatarUrl: https://avatars.githubusercontent.com/in/29110?v=4
|
||||
url: https://github.com/apps/dependabot
|
||||
YuriiMotov:
|
||||
login: YuriiMotov
|
||||
count: 78
|
||||
count: 70
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/109919500?u=bc48be95c429989224786106b027f3c5e40cc354&v=4
|
||||
url: https://github.com/YuriiMotov
|
||||
alejsdev:
|
||||
@@ -35,7 +35,7 @@ Kludex:
|
||||
url: https://github.com/Kludex
|
||||
svlandeg:
|
||||
login: svlandeg
|
||||
count: 24
|
||||
count: 23
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/8796347?u=556c97650c27021911b0b9447ec55e75987b0e8a&v=4
|
||||
url: https://github.com/svlandeg
|
||||
dmontagu:
|
||||
@@ -578,11 +578,6 @@ Taoup:
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/22348542?v=4
|
||||
url: https://github.com/Taoup
|
||||
zadevhub:
|
||||
login: zadevhub
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/138465437?v=4
|
||||
url: https://github.com/zadevhub
|
||||
savannahostrowski:
|
||||
login: savannahostrowski
|
||||
count: 2
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
maintainers:
|
||||
- login: tiangolo
|
||||
answers: 1929
|
||||
answers: 1927
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/1326112?u=cb5d06e73a9e1998141b1641aa88e443c6717651&v=4
|
||||
url: https://github.com/tiangolo
|
||||
experts:
|
||||
- login: tiangolo
|
||||
count: 1929
|
||||
count: 1927
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/1326112?u=cb5d06e73a9e1998141b1641aa88e443c6717651&v=4
|
||||
url: https://github.com/tiangolo
|
||||
- login: YuriiMotov
|
||||
count: 1178
|
||||
count: 1164
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/109919500?u=bc48be95c429989224786106b027f3c5e40cc354&v=4
|
||||
url: https://github.com/YuriiMotov
|
||||
- login: github-actions
|
||||
@@ -137,7 +137,7 @@ experts:
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/41326348?u=ba2fda6b30110411ecbf406d187907e2b420ac19&v=4
|
||||
url: https://github.com/panla
|
||||
- login: valentinDruzhinin
|
||||
count: 31
|
||||
count: 30
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/12831905?u=aae1ebc675c91e8fa582df4fcc4fc4128106344d&v=4
|
||||
url: https://github.com/valentinDruzhinin
|
||||
- login: prostomarkeloff
|
||||
@@ -184,10 +184,6 @@ experts:
|
||||
count: 21
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/51059348?u=5fe59a56e1f2f9ccd8005d71752a8276f133ae1a&v=4
|
||||
url: https://github.com/rafsaf
|
||||
- login: ebottos94
|
||||
count: 20
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/100039558?u=8b91053b3abe4a9209375e3651e1c1ef192d884b&v=4
|
||||
url: https://github.com/ebottos94
|
||||
- login: nsidnev
|
||||
count: 20
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/22559461?u=a9cc3238217e21dc8796a1a500f01b722adb082c&v=4
|
||||
@@ -196,6 +192,10 @@ experts:
|
||||
count: 20
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/565544?v=4
|
||||
url: https://github.com/chris-allnutt
|
||||
- login: ebottos94
|
||||
count: 20
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/100039558?u=8b91053b3abe4a9209375e3651e1c1ef192d884b&v=4
|
||||
url: https://github.com/ebottos94
|
||||
- login: estebanx64
|
||||
count: 19
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/10840422?u=2ca073ee47a625e495a9573bd374ddcd7be5ec91&v=4
|
||||
@@ -240,84 +240,23 @@ experts:
|
||||
count: 16
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/26334101?u=f601c3f111f2148bd9244c2cb3ebbd57b592e674&v=4
|
||||
url: https://github.com/jonatasoli
|
||||
- login: abhint
|
||||
- login: mattmess1221
|
||||
count: 15
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/25699289?u=b5d219277b4d001ac26fb8be357fddd88c29d51b&v=4
|
||||
url: https://github.com/abhint
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/3409962?u=d22ea18aa8ea688af25a45df306134d593621a44&v=4
|
||||
url: https://github.com/mattmess1221
|
||||
last_month_experts:
|
||||
- login: YuriiMotov
|
||||
count: 14
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/109919500?u=bc48be95c429989224786106b027f3c5e40cc354&v=4
|
||||
url: https://github.com/YuriiMotov
|
||||
- login: yudin-s
|
||||
count: 5
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/781481?u=8c1ab221edbe051eb55310747ebe39574e808118&v=4
|
||||
url: https://github.com/yudin-s
|
||||
- login: BitWeaverDev
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/288751066?v=4
|
||||
url: https://github.com/BitWeaverDev
|
||||
- login: Zawwarsami16
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/105767627?u=5bb2b7a639a9207a5ded536f963a4c7bd6d04d21&v=4
|
||||
url: https://github.com/Zawwarsami16
|
||||
- login: tiangolo
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/1326112?u=cb5d06e73a9e1998141b1641aa88e443c6717651&v=4
|
||||
url: https://github.com/tiangolo
|
||||
- login: mg1986jp
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/20254686?u=6da9cdad3ecf8a4f3cbc33a518c3998ed0ac685a&v=4
|
||||
url: https://github.com/mg1986jp
|
||||
- login: Bogdusik
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/166155258?u=11440b02966a3f5e5eeebc21d67b7bbb7d370487&v=4
|
||||
url: https://github.com/Bogdusik
|
||||
three_months_experts:
|
||||
- login: YuriiMotov
|
||||
count: 57
|
||||
count: 12
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/109919500?u=bc48be95c429989224786106b027f3c5e40cc354&v=4
|
||||
url: https://github.com/YuriiMotov
|
||||
- login: Firatasi
|
||||
count: 7
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/112112161?u=3219914a49a4a604b3626007823db7de049b6d66&v=4
|
||||
url: https://github.com/Firatasi
|
||||
- login: yudin-s
|
||||
count: 5
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/781481?u=8c1ab221edbe051eb55310747ebe39574e808118&v=4
|
||||
url: https://github.com/yudin-s
|
||||
- login: tiangolo
|
||||
count: 4
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/1326112?u=cb5d06e73a9e1998141b1641aa88e443c6717651&v=4
|
||||
url: https://github.com/tiangolo
|
||||
- login: BitWeaverDev
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/288751066?v=4
|
||||
url: https://github.com/BitWeaverDev
|
||||
- login: ericgitangu
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/11472845?u=9d916cf0f5c80e63cb1d753b8b50dcb8ced3b883&v=4
|
||||
url: https://github.com/ericgitangu
|
||||
- login: Zawwarsami16
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/105767627?u=5bb2b7a639a9207a5ded536f963a4c7bd6d04d21&v=4
|
||||
url: https://github.com/Zawwarsami16
|
||||
- login: luzzodev
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/27291415?u=5607ae1ce75c5f54f09500ca854227f7bfd2033b&v=4
|
||||
url: https://github.com/luzzodev
|
||||
- login: mg1986jp
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/20254686?u=6da9cdad3ecf8a4f3cbc33a518c3998ed0ac685a&v=4
|
||||
url: https://github.com/mg1986jp
|
||||
- login: sueun-dev
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/57546981?u=0b0483bdcc7d521e85c06f28d2fc64e258bd466f&v=4
|
||||
url: https://github.com/sueun-dev
|
||||
- login: Bogdusik
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/166155258?u=11440b02966a3f5e5eeebc21d67b7bbb7d370487&v=4
|
||||
url: https://github.com/Bogdusik
|
||||
- login: cookesan
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/6601329?u=7bfc9b017198a9fa50929ae8ae0a787632424ffd&v=4
|
||||
@@ -330,99 +269,43 @@ three_months_experts:
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/34988899?u=b8e3c0cf26f4bd1faea265d2f5f66f564af63463&v=4
|
||||
url: https://github.com/Bahtya
|
||||
- login: saitarrun
|
||||
- login: luzzodev
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/116748905?u=3433afbaf06676a482ebf4ba33b08ddb3fc5c5bf&v=4
|
||||
url: https://github.com/saitarrun
|
||||
- login: JavierSanchezCastro
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/72013291?u=ae5679e6bd971d9d98cd5e76e8683f83642ba950&v=4
|
||||
url: https://github.com/JavierSanchezCastro
|
||||
- login: christiansousadev
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/103544118?u=690f3f76d1dc4d0929de5020679d5604f860acbc&v=4
|
||||
url: https://github.com/christiansousadev
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/27291415?u=5607ae1ce75c5f54f09500ca854227f7bfd2033b&v=4
|
||||
url: https://github.com/luzzodev
|
||||
- login: DoctorJohn
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/14076775?u=ec43fe79a98dbc864b428afc7220753e25ca3af2&v=4
|
||||
url: https://github.com/DoctorJohn
|
||||
six_months_experts:
|
||||
three_months_experts:
|
||||
- login: YuriiMotov
|
||||
count: 145
|
||||
count: 74
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/109919500?u=bc48be95c429989224786106b027f3c5e40cc354&v=4
|
||||
url: https://github.com/YuriiMotov
|
||||
- login: tiangolo
|
||||
count: 13
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/1326112?u=cb5d06e73a9e1998141b1641aa88e443c6717651&v=4
|
||||
url: https://github.com/tiangolo
|
||||
- login: JavierSanchezCastro
|
||||
count: 9
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/72013291?u=ae5679e6bd971d9d98cd5e76e8683f83642ba950&v=4
|
||||
url: https://github.com/JavierSanchezCastro
|
||||
- login: Firatasi
|
||||
count: 7
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/112112161?u=3219914a49a4a604b3626007823db7de049b6d66&v=4
|
||||
url: https://github.com/Firatasi
|
||||
- login: yudin-s
|
||||
count: 5
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/781481?u=8c1ab221edbe051eb55310747ebe39574e808118&v=4
|
||||
url: https://github.com/yudin-s
|
||||
- login: valentinDruzhinin
|
||||
count: 5
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/12831905?u=aae1ebc675c91e8fa582df4fcc4fc4128106344d&v=4
|
||||
url: https://github.com/valentinDruzhinin
|
||||
- login: JavierSanchezCastro
|
||||
count: 7
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/72013291?u=ae5679e6bd971d9d98cd5e76e8683f83642ba950&v=4
|
||||
url: https://github.com/JavierSanchezCastro
|
||||
- login: Toygarmetu
|
||||
count: 5
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/92878791?u=538530cb6d5554e71f9c28709d794db9a74d23d9&v=4
|
||||
url: https://github.com/Toygarmetu
|
||||
- login: luzzodev
|
||||
- login: tiangolo
|
||||
count: 5
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/1326112?u=cb5d06e73a9e1998141b1641aa88e443c6717651&v=4
|
||||
url: https://github.com/tiangolo
|
||||
- login: luzzodev
|
||||
count: 4
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/27291415?u=5607ae1ce75c5f54f09500ca854227f7bfd2033b&v=4
|
||||
url: https://github.com/luzzodev
|
||||
- login: ceb10n
|
||||
count: 5
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/235213?u=edcce471814a1eba9f0cdaa4cd0de18921a940a6&v=4
|
||||
url: https://github.com/ceb10n
|
||||
- login: RichieB2B
|
||||
count: 4
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/1461970?u=edaa57d1077705244ea5c9244f4783d94ff11f12&v=4
|
||||
url: https://github.com/RichieB2B
|
||||
- login: sachinh35
|
||||
count: 4
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/21972708?u=8560b97b8b41e175f476270b56de8a493b84f302&v=4
|
||||
url: https://github.com/sachinh35
|
||||
- login: BitWeaverDev
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/288751066?v=4
|
||||
url: https://github.com/BitWeaverDev
|
||||
- login: ericgitangu
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/11472845?u=9d916cf0f5c80e63cb1d753b8b50dcb8ced3b883&v=4
|
||||
url: https://github.com/ericgitangu
|
||||
- login: Zawwarsami16
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/105767627?u=5bb2b7a639a9207a5ded536f963a4c7bd6d04d21&v=4
|
||||
url: https://github.com/Zawwarsami16
|
||||
- login: EmmanuelNiyonshuti
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/142030687?u=ab131d5ad4670280a978f489babe71c9bf9c1097&v=4
|
||||
url: https://github.com/EmmanuelNiyonshuti
|
||||
- login: Kludex
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/7353520?u=df8a3f06ba8f55ae1967a3e2d5ed882903a4e330&v=4
|
||||
url: https://github.com/Kludex
|
||||
- login: mg1986jp
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/20254686?u=6da9cdad3ecf8a4f3cbc33a518c3998ed0ac685a&v=4
|
||||
url: https://github.com/mg1986jp
|
||||
- login: sueun-dev
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/57546981?u=0b0483bdcc7d521e85c06f28d2fc64e258bd466f&v=4
|
||||
url: https://github.com/sueun-dev
|
||||
- login: Bogdusik
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/166155258?u=11440b02966a3f5e5eeebc21d67b7bbb7d370487&v=4
|
||||
url: https://github.com/Bogdusik
|
||||
- login: cookesan
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/6601329?u=7bfc9b017198a9fa50929ae8ae0a787632424ffd&v=4
|
||||
@@ -439,6 +322,10 @@ six_months_experts:
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/116748905?u=3433afbaf06676a482ebf4ba33b08ddb3fc5c5bf&v=4
|
||||
url: https://github.com/saitarrun
|
||||
- login: EmmanuelNiyonshuti
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/142030687?u=ab131d5ad4670280a978f489babe71c9bf9c1097&v=4
|
||||
url: https://github.com/EmmanuelNiyonshuti
|
||||
- login: christiansousadev
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/103544118?u=690f3f76d1dc4d0929de5020679d5604f860acbc&v=4
|
||||
@@ -451,6 +338,103 @@ six_months_experts:
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/46934916?u=18d7aacc6ce59f054749209645d11cfe77b52f90&v=4
|
||||
url: https://github.com/gaardhus
|
||||
- login: valentinDruzhinin
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/12831905?u=aae1ebc675c91e8fa582df4fcc4fc4128106344d&v=4
|
||||
url: https://github.com/valentinDruzhinin
|
||||
six_months_experts:
|
||||
- login: YuriiMotov
|
||||
count: 166
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/109919500?u=bc48be95c429989224786106b027f3c5e40cc354&v=4
|
||||
url: https://github.com/YuriiMotov
|
||||
- login: tiangolo
|
||||
count: 23
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/1326112?u=cb5d06e73a9e1998141b1641aa88e443c6717651&v=4
|
||||
url: https://github.com/tiangolo
|
||||
- login: JavierSanchezCastro
|
||||
count: 12
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/72013291?u=ae5679e6bd971d9d98cd5e76e8683f83642ba950&v=4
|
||||
url: https://github.com/JavierSanchezCastro
|
||||
- login: luzzodev
|
||||
count: 9
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/27291415?u=5607ae1ce75c5f54f09500ca854227f7bfd2033b&v=4
|
||||
url: https://github.com/luzzodev
|
||||
- login: Firatasi
|
||||
count: 7
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/112112161?u=3219914a49a4a604b3626007823db7de049b6d66&v=4
|
||||
url: https://github.com/Firatasi
|
||||
- login: Toygarmetu
|
||||
count: 5
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/92878791?u=538530cb6d5554e71f9c28709d794db9a74d23d9&v=4
|
||||
url: https://github.com/Toygarmetu
|
||||
- login: ceb10n
|
||||
count: 5
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/235213?u=edcce471814a1eba9f0cdaa4cd0de18921a940a6&v=4
|
||||
url: https://github.com/ceb10n
|
||||
- login: JunjieAraoXiong
|
||||
count: 5
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/167785867?u=b69afe090c8bf5fd73f2d23fc3a887b28f68f192&v=4
|
||||
url: https://github.com/JunjieAraoXiong
|
||||
- login: valentinDruzhinin
|
||||
count: 4
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/12831905?u=aae1ebc675c91e8fa582df4fcc4fc4128106344d&v=4
|
||||
url: https://github.com/valentinDruzhinin
|
||||
- login: krylosov-aa
|
||||
count: 4
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/242901957?u=4c9c7b468203b09bca64936fb464620e32cdd252&v=4
|
||||
url: https://github.com/krylosov-aa
|
||||
- login: ericgitangu
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/11472845?u=9d916cf0f5c80e63cb1d753b8b50dcb8ced3b883&v=4
|
||||
url: https://github.com/ericgitangu
|
||||
- login: EmmanuelNiyonshuti
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/142030687?u=ab131d5ad4670280a978f489babe71c9bf9c1097&v=4
|
||||
url: https://github.com/EmmanuelNiyonshuti
|
||||
- login: sachinh35
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/21972708?u=8560b97b8b41e175f476270b56de8a493b84f302&v=4
|
||||
url: https://github.com/sachinh35
|
||||
- login: RichieB2B
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/1461970?u=edaa57d1077705244ea5c9244f4783d94ff11f12&v=4
|
||||
url: https://github.com/RichieB2B
|
||||
- login: cookesan
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/6601329?u=7bfc9b017198a9fa50929ae8ae0a787632424ffd&v=4
|
||||
url: https://github.com/cookesan
|
||||
- login: coleifer
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/119974?u=b3a546c94ee1105e792e0acad2c4743d800e7975&v=4
|
||||
url: https://github.com/coleifer
|
||||
- login: Bahtya
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/34988899?u=b8e3c0cf26f4bd1faea265d2f5f66f564af63463&v=4
|
||||
url: https://github.com/Bahtya
|
||||
- login: saitarrun
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/116748905?u=3433afbaf06676a482ebf4ba33b08ddb3fc5c5bf&v=4
|
||||
url: https://github.com/saitarrun
|
||||
- login: cepedus
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/26345924?u=38495abbdbb8695dd76478cae5963bf994c498bc&v=4
|
||||
url: https://github.com/cepedus
|
||||
- login: christiansousadev
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/103544118?u=690f3f76d1dc4d0929de5020679d5604f860acbc&v=4
|
||||
url: https://github.com/christiansousadev
|
||||
- login: DoctorJohn
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/14076775?u=ec43fe79a98dbc864b428afc7220753e25ca3af2&v=4
|
||||
url: https://github.com/DoctorJohn
|
||||
- login: gaardhus
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/46934916?u=18d7aacc6ce59f054749209645d11cfe77b52f90&v=4
|
||||
url: https://github.com/gaardhus
|
||||
- login: Kludex
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/7353520?u=df8a3f06ba8f55ae1967a3e2d5ed882903a4e330&v=4
|
||||
url: https://github.com/Kludex
|
||||
- login: y2kbugger
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/6101677?u=1d50077e29582dc01fcbdff846f04fe7ec73fe2e&v=4
|
||||
@@ -475,29 +459,49 @@ six_months_experts:
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/142113?u=bf10f10080026346b092633c380977b61cee0d9c&v=4
|
||||
url: https://github.com/florentx
|
||||
- login: jc-louis
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/51329768?v=4
|
||||
url: https://github.com/jc-louis
|
||||
- login: bughuntr7
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/236391583?u=7f51ff690e3a5711f845a115903c39e21c8af938&v=4
|
||||
url: https://github.com/bughuntr7
|
||||
- login: CodeKraken-cmd
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/48470371?u=e7c0e7ec8e35ca5fb3ae40a586ed5e788fd0fe6d&v=4
|
||||
url: https://github.com/CodeKraken-cmd
|
||||
- login: svlandeg
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/8796347?u=556c97650c27021911b0b9447ec55e75987b0e8a&v=4
|
||||
url: https://github.com/svlandeg
|
||||
- login: jymchng
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/27895426?u=fb88c47775147d62a395fdb895d1af4148c7b566&v=4
|
||||
url: https://github.com/jymchng
|
||||
one_year_experts:
|
||||
- login: YuriiMotov
|
||||
count: 647
|
||||
count: 951
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/109919500?u=bc48be95c429989224786106b027f3c5e40cc354&v=4
|
||||
url: https://github.com/YuriiMotov
|
||||
- login: luzzodev
|
||||
count: 35
|
||||
count: 48
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/27291415?u=5607ae1ce75c5f54f09500ca854227f7bfd2033b&v=4
|
||||
url: https://github.com/luzzodev
|
||||
- login: tiangolo
|
||||
count: 32
|
||||
count: 30
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/1326112?u=cb5d06e73a9e1998141b1641aa88e443c6717651&v=4
|
||||
url: https://github.com/tiangolo
|
||||
- login: valentinDruzhinin
|
||||
count: 31
|
||||
count: 30
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/12831905?u=aae1ebc675c91e8fa582df4fcc4fc4128106344d&v=4
|
||||
url: https://github.com/valentinDruzhinin
|
||||
- login: JavierSanchezCastro
|
||||
count: 17
|
||||
count: 18
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/72013291?u=ae5679e6bd971d9d98cd5e76e8683f83642ba950&v=4
|
||||
url: https://github.com/JavierSanchezCastro
|
||||
- login: sachinh35
|
||||
count: 8
|
||||
count: 9
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/21972708?u=8560b97b8b41e175f476270b56de8a493b84f302&v=4
|
||||
url: https://github.com/sachinh35
|
||||
- login: Firatasi
|
||||
@@ -508,14 +512,6 @@ one_year_experts:
|
||||
count: 7
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/14076775?u=ec43fe79a98dbc864b428afc7220753e25ca3af2&v=4
|
||||
url: https://github.com/DoctorJohn
|
||||
- login: svlandeg
|
||||
count: 6
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/8796347?u=556c97650c27021911b0b9447ec55e75987b0e8a&v=4
|
||||
url: https://github.com/svlandeg
|
||||
- login: RichieB2B
|
||||
count: 6
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/1461970?u=edaa57d1077705244ea5c9244f4783d94ff11f12&v=4
|
||||
url: https://github.com/RichieB2B
|
||||
- login: raceychan
|
||||
count: 6
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/75417963?u=060c62870ec5a791765e63ac20d8885d11143786&v=4
|
||||
@@ -524,22 +520,30 @@ one_year_experts:
|
||||
count: 6
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/37829370?u=da44ca53aefd5c23f346fab8e9fd2e108294c179&v=4
|
||||
url: https://github.com/yinziyan1206
|
||||
- login: yudin-s
|
||||
count: 5
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/781481?u=8c1ab221edbe051eb55310747ebe39574e808118&v=4
|
||||
url: https://github.com/yudin-s
|
||||
- login: Toygarmetu
|
||||
count: 5
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/92878791?u=538530cb6d5554e71f9c28709d794db9a74d23d9&v=4
|
||||
url: https://github.com/Toygarmetu
|
||||
- login: Kludex
|
||||
count: 5
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/7353520?u=df8a3f06ba8f55ae1967a3e2d5ed882903a4e330&v=4
|
||||
url: https://github.com/Kludex
|
||||
- login: ceb10n
|
||||
count: 5
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/235213?u=edcce471814a1eba9f0cdaa4cd0de18921a940a6&v=4
|
||||
url: https://github.com/ceb10n
|
||||
- login: RichieB2B
|
||||
count: 5
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/1461970?u=edaa57d1077705244ea5c9244f4783d94ff11f12&v=4
|
||||
url: https://github.com/RichieB2B
|
||||
- login: JunjieAraoXiong
|
||||
count: 5
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/167785867?u=b69afe090c8bf5fd73f2d23fc3a887b28f68f192&v=4
|
||||
url: https://github.com/JunjieAraoXiong
|
||||
- login: svlandeg
|
||||
count: 5
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/8796347?u=556c97650c27021911b0b9447ec55e75987b0e8a&v=4
|
||||
url: https://github.com/svlandeg
|
||||
- login: WilliamDEdwards
|
||||
count: 4
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/12184311?u=9b29d5d1d71f5f1a7ef9e439963ad3529e3b33a4&v=4
|
||||
@@ -560,22 +564,14 @@ one_year_experts:
|
||||
count: 4
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/157279130?u=16d6466476cf7dbc55a4cd575b6ea920ebdd81e1&v=4
|
||||
url: https://github.com/isgin01
|
||||
- login: BitWeaverDev
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/288751066?v=4
|
||||
url: https://github.com/BitWeaverDev
|
||||
- login: Kludex
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/7353520?u=df8a3f06ba8f55ae1967a3e2d5ed882903a4e330&v=4
|
||||
url: https://github.com/Kludex
|
||||
- login: ericgitangu
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/11472845?u=9d916cf0f5c80e63cb1d753b8b50dcb8ced3b883&v=4
|
||||
url: https://github.com/ericgitangu
|
||||
- login: Zawwarsami16
|
||||
- login: henrymcl
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/105767627?u=5bb2b7a639a9207a5ded536f963a4c7bd6d04d21&v=4
|
||||
url: https://github.com/Zawwarsami16
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/26480299?v=4
|
||||
url: https://github.com/henrymcl
|
||||
- login: EmmanuelNiyonshuti
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/142030687?u=ab131d5ad4670280a978f489babe71c9bf9c1097&v=4
|
||||
@@ -604,18 +600,6 @@ one_year_experts:
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/210023470?u=c25d66addf36a747bd9fab773c4a6e7b238f45d4&v=4
|
||||
url: https://github.com/Jelle-tenB
|
||||
- login: mg1986jp
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/20254686?u=6da9cdad3ecf8a4f3cbc33a518c3998ed0ac685a&v=4
|
||||
url: https://github.com/mg1986jp
|
||||
- login: sueun-dev
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/57546981?u=0b0483bdcc7d521e85c06f28d2fc64e258bd466f&v=4
|
||||
url: https://github.com/sueun-dev
|
||||
- login: Bogdusik
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/166155258?u=11440b02966a3f5e5eeebc21d67b7bbb7d370487&v=4
|
||||
url: https://github.com/Bogdusik
|
||||
- login: cookesan
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/6601329?u=7bfc9b017198a9fa50929ae8ae0a787632424ffd&v=4
|
||||
@@ -624,10 +608,6 @@ one_year_experts:
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/119974?u=b3a546c94ee1105e792e0acad2c4743d800e7975&v=4
|
||||
url: https://github.com/coleifer
|
||||
- login: henrymcl
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/26480299?v=4
|
||||
url: https://github.com/henrymcl
|
||||
- login: Bahtya
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/34988899?u=b8e3c0cf26f4bd1faea265d2f5f66f564af63463&v=4
|
||||
@@ -692,6 +672,10 @@ one_year_experts:
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/80290187?u=2b72e497ca4444ecec1f9dc2d1b8d5437a27b83f&v=4
|
||||
url: https://github.com/Brikas
|
||||
- login: BloodyRain2k
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/1014362?v=4
|
||||
url: https://github.com/BloodyRain2k
|
||||
- login: usiqwerty
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/37992525?u=0c6e91d7b3887aa558755f4225ce74a003cbe852&v=4
|
||||
@@ -716,3 +700,23 @@ one_year_experts:
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/7587353?v=4
|
||||
url: https://github.com/purepani
|
||||
- login: asmaier
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/3169297?u=84c83cbdb64104331febe16ae232ecf30952d01d&v=4
|
||||
url: https://github.com/asmaier
|
||||
- login: davidhuser
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/4357648?u=6ed702f8f6d49a8b2a0ed33cbd8ab59c2d7db7f7&v=4
|
||||
url: https://github.com/davidhuser
|
||||
- login: XieJiSS
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/24671280?u=7ea0d9bfe46cf762594d62fd2f3c6d3813c3584c&v=4
|
||||
url: https://github.com/XieJiSS
|
||||
- login: profatsky
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/92920843?u=81e54bb0b613c171f7cd0ab3cbb58873782c9c9c&v=4
|
||||
url: https://github.com/profatsky
|
||||
- login: pythonweb2
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/32141163?v=4
|
||||
url: https://github.com/pythonweb2
|
||||
|
||||
@@ -55,9 +55,6 @@ silver:
|
||||
- url: https://talordata.com/?campaignid=oh5dVZ3Zc3YGiAI2&utm_source=fastapi&utm_term=fastapi
|
||||
title: TalorData SERP API - Multi-Engine Search Results Data
|
||||
img: https://fastapi.tiangolo.com/img/sponsors/talordata.png
|
||||
- url: https://www.rapidproxy.io/?ref=fastapi
|
||||
title: Try RapidProxy for free - Residential Proxies with 90M+ Global IPs. Starting from $0.65/GB for web scraping, automation, and data collection.
|
||||
img: https://fastapi.tiangolo.com/img/sponsors/rapidproxy.png
|
||||
bronze:
|
||||
- url: https://www.exoflare.com/open-source/?utm_source=FastAPI&utm_campaign=open_source
|
||||
title: Biosecurity risk assessments made easy.
|
||||
@@ -65,3 +62,6 @@ bronze:
|
||||
# - url: https://testdriven.io/courses/tdd-fastapi/
|
||||
# title: Learn to build high-quality web apps with best practices
|
||||
# img: https://fastapi.tiangolo.com/img/sponsors/testdriven.svg
|
||||
- url: https://www.testmu.ai/?utm_source=fastapi&utm_medium=partner&utm_campaign=sponsor&utm_term=opensource&utm_content=webpage
|
||||
title: TestMu AI. The Native AI-Agentic Cloud Platform to Supercharge Quality Engineering.
|
||||
img: https://fastapi.tiangolo.com/img/sponsors/testmu.png
|
||||
|
||||
@@ -1,278 +1,258 @@
|
||||
- name: full-stack-fastapi-template
|
||||
html_url: https://github.com/fastapi/full-stack-fastapi-template
|
||||
stars: 43447
|
||||
stars: 42944
|
||||
owner_login: fastapi
|
||||
owner_html_url: https://github.com/fastapi
|
||||
- name: Hello-Python
|
||||
html_url: https://github.com/mouredev/Hello-Python
|
||||
stars: 35831
|
||||
stars: 35430
|
||||
owner_login: mouredev
|
||||
owner_html_url: https://github.com/mouredev
|
||||
- name: serve
|
||||
html_url: https://github.com/jina-ai/serve
|
||||
stars: 21864
|
||||
stars: 21876
|
||||
owner_login: jina-ai
|
||||
owner_html_url: https://github.com/jina-ai
|
||||
- name: HivisionIDPhotos
|
||||
html_url: https://github.com/Zeyi-Lin/HivisionIDPhotos
|
||||
stars: 21144
|
||||
stars: 21054
|
||||
owner_login: Zeyi-Lin
|
||||
owner_html_url: https://github.com/Zeyi-Lin
|
||||
- name: Douyin_TikTok_Download_API
|
||||
html_url: https://github.com/Evil0ctal/Douyin_TikTok_Download_API
|
||||
stars: 18122
|
||||
owner_login: Evil0ctal
|
||||
owner_html_url: https://github.com/Evil0ctal
|
||||
- name: sqlmodel
|
||||
html_url: https://github.com/fastapi/sqlmodel
|
||||
stars: 17987
|
||||
stars: 17886
|
||||
owner_login: fastapi
|
||||
owner_html_url: https://github.com/fastapi
|
||||
- name: Douyin_TikTok_Download_API
|
||||
html_url: https://github.com/Evil0ctal/Douyin_TikTok_Download_API
|
||||
stars: 17546
|
||||
owner_login: Evil0ctal
|
||||
owner_html_url: https://github.com/Evil0ctal
|
||||
- name: fastapi-best-practices
|
||||
html_url: https://github.com/zhanymkanov/fastapi-best-practices
|
||||
stars: 17401
|
||||
stars: 17138
|
||||
owner_login: zhanymkanov
|
||||
owner_html_url: https://github.com/zhanymkanov
|
||||
- name: SurfSense
|
||||
html_url: https://github.com/MODSetter/SurfSense
|
||||
stars: 14374
|
||||
stars: 14045
|
||||
owner_login: MODSetter
|
||||
owner_html_url: https://github.com/MODSetter
|
||||
- name: machine-learning-zoomcamp
|
||||
html_url: https://github.com/DataTalksClub/machine-learning-zoomcamp
|
||||
stars: 13169
|
||||
stars: 13015
|
||||
owner_login: DataTalksClub
|
||||
owner_html_url: https://github.com/DataTalksClub
|
||||
- name: fastapi_mcp
|
||||
html_url: https://github.com/tadata-org/fastapi_mcp
|
||||
stars: 11885
|
||||
stars: 11837
|
||||
owner_login: tadata-org
|
||||
owner_html_url: https://github.com/tadata-org
|
||||
- name: awesome-fastapi
|
||||
html_url: https://github.com/mjhea0/awesome-fastapi
|
||||
stars: 11406
|
||||
stars: 11315
|
||||
owner_login: mjhea0
|
||||
owner_html_url: https://github.com/mjhea0
|
||||
- name: XHS-Downloader
|
||||
html_url: https://github.com/JoeanAmier/XHS-Downloader
|
||||
stars: 11375
|
||||
stars: 11013
|
||||
owner_login: JoeanAmier
|
||||
owner_html_url: https://github.com/JoeanAmier
|
||||
- name: polar
|
||||
html_url: https://github.com/polarsource/polar
|
||||
stars: 9894
|
||||
stars: 9775
|
||||
owner_login: polarsource
|
||||
owner_html_url: https://github.com/polarsource
|
||||
- name: pycaret
|
||||
html_url: https://github.com/pycaret/pycaret
|
||||
stars: 9801
|
||||
stars: 9753
|
||||
owner_login: pycaret
|
||||
owner_html_url: https://github.com/pycaret
|
||||
- name: FastUI
|
||||
html_url: https://github.com/pydantic/FastUI
|
||||
stars: 8966
|
||||
stars: 8961
|
||||
owner_login: pydantic
|
||||
owner_html_url: https://github.com/pydantic
|
||||
- name: FileCodeBox
|
||||
html_url: https://github.com/vastsa/FileCodeBox
|
||||
stars: 8305
|
||||
stars: 8241
|
||||
owner_login: vastsa
|
||||
owner_html_url: https://github.com/vastsa
|
||||
- name: nonebot2
|
||||
html_url: https://github.com/nonebot/nonebot2
|
||||
stars: 7544
|
||||
stars: 7488
|
||||
owner_login: nonebot
|
||||
owner_html_url: https://github.com/nonebot
|
||||
- name: hatchet
|
||||
html_url: https://github.com/hatchet-dev/hatchet
|
||||
stars: 7258
|
||||
stars: 7044
|
||||
owner_login: hatchet-dev
|
||||
owner_html_url: https://github.com/hatchet-dev
|
||||
- name: fastapi-users
|
||||
html_url: https://github.com/fastapi-users/fastapi-users
|
||||
stars: 6152
|
||||
stars: 6107
|
||||
owner_login: fastapi-users
|
||||
owner_html_url: https://github.com/fastapi-users
|
||||
- name: serge
|
||||
html_url: https://github.com/serge-chat/serge
|
||||
stars: 5726
|
||||
stars: 5731
|
||||
owner_login: serge-chat
|
||||
owner_html_url: https://github.com/serge-chat
|
||||
- name: Yuxi
|
||||
html_url: https://github.com/xerrors/Yuxi
|
||||
stars: 5323
|
||||
stars: 5063
|
||||
owner_login: xerrors
|
||||
owner_html_url: https://github.com/xerrors
|
||||
- name: Kokoro-FastAPI
|
||||
html_url: https://github.com/remsky/Kokoro-FastAPI
|
||||
stars: 4936
|
||||
stars: 4785
|
||||
owner_login: remsky
|
||||
owner_html_url: https://github.com/remsky
|
||||
- name: devpush
|
||||
html_url: https://github.com/hunvreus/devpush
|
||||
stars: 4664
|
||||
owner_login: hunvreus
|
||||
owner_html_url: https://github.com/hunvreus
|
||||
- name: strawberry
|
||||
html_url: https://github.com/strawberry-graphql/strawberry
|
||||
stars: 4663
|
||||
stars: 4649
|
||||
owner_login: strawberry-graphql
|
||||
owner_html_url: https://github.com/strawberry-graphql
|
||||
- name: honcho
|
||||
html_url: https://github.com/plastic-labs/honcho
|
||||
stars: 4606
|
||||
owner_login: plastic-labs
|
||||
owner_html_url: https://github.com/plastic-labs
|
||||
- name: devpush
|
||||
html_url: https://github.com/hunvreus/devpush
|
||||
stars: 4641
|
||||
owner_login: hunvreus
|
||||
owner_html_url: https://github.com/hunvreus
|
||||
- name: poem
|
||||
html_url: https://github.com/poem-web/poem
|
||||
stars: 4398
|
||||
stars: 4387
|
||||
owner_login: poem-web
|
||||
owner_html_url: https://github.com/poem-web
|
||||
- name: dynaconf
|
||||
html_url: https://github.com/dynaconf/dynaconf
|
||||
stars: 4302
|
||||
stars: 4291
|
||||
owner_login: dynaconf
|
||||
owner_html_url: https://github.com/dynaconf
|
||||
- name: logfire
|
||||
html_url: https://github.com/pydantic/logfire
|
||||
stars: 4276
|
||||
owner_login: pydantic
|
||||
owner_html_url: https://github.com/pydantic
|
||||
- name: chatgpt-web-share
|
||||
html_url: https://github.com/chatpire/chatgpt-web-share
|
||||
stars: 4273
|
||||
stars: 4269
|
||||
owner_login: chatpire
|
||||
owner_html_url: https://github.com/chatpire
|
||||
- name: huma
|
||||
html_url: https://github.com/danielgtaylor/huma
|
||||
stars: 4133
|
||||
owner_login: danielgtaylor
|
||||
owner_html_url: https://github.com/danielgtaylor
|
||||
- name: logfire
|
||||
html_url: https://github.com/pydantic/logfire
|
||||
stars: 4206
|
||||
owner_login: pydantic
|
||||
owner_html_url: https://github.com/pydantic
|
||||
- name: atrilabs-engine
|
||||
html_url: https://github.com/Atri-Labs/atrilabs-engine
|
||||
stars: 4073
|
||||
stars: 4080
|
||||
owner_login: Atri-Labs
|
||||
owner_html_url: https://github.com/Atri-Labs
|
||||
- name: huma
|
||||
html_url: https://github.com/danielgtaylor/huma
|
||||
stars: 4043
|
||||
owner_login: danielgtaylor
|
||||
owner_html_url: https://github.com/danielgtaylor
|
||||
- name: datamodel-code-generator
|
||||
html_url: https://github.com/koxudaxi/datamodel-code-generator
|
||||
stars: 3918
|
||||
stars: 3882
|
||||
owner_login: koxudaxi
|
||||
owner_html_url: https://github.com/koxudaxi
|
||||
- name: LitServe
|
||||
html_url: https://github.com/Lightning-AI/LitServe
|
||||
stars: 3886
|
||||
stars: 3879
|
||||
owner_login: Lightning-AI
|
||||
owner_html_url: https://github.com/Lightning-AI
|
||||
- name: mcp-context-forge
|
||||
html_url: https://github.com/IBM/mcp-context-forge
|
||||
stars: 3797
|
||||
owner_login: IBM
|
||||
owner_html_url: https://github.com/IBM
|
||||
- name: fastapi-admin
|
||||
html_url: https://github.com/fastapi-admin/fastapi-admin
|
||||
stars: 3784
|
||||
stars: 3759
|
||||
owner_login: fastapi-admin
|
||||
owner_html_url: https://github.com/fastapi-admin
|
||||
- name: headroom
|
||||
html_url: https://github.com/chopratejas/headroom
|
||||
stars: 3701
|
||||
owner_login: chopratejas
|
||||
owner_html_url: https://github.com/chopratejas
|
||||
- name: mcp-context-forge
|
||||
html_url: https://github.com/IBM/mcp-context-forge
|
||||
stars: 3644
|
||||
owner_login: IBM
|
||||
owner_html_url: https://github.com/IBM
|
||||
- name: tracecat
|
||||
html_url: https://github.com/TracecatHQ/tracecat
|
||||
stars: 3624
|
||||
stars: 3564
|
||||
owner_login: TracecatHQ
|
||||
owner_html_url: https://github.com/TracecatHQ
|
||||
- name: farfalle
|
||||
html_url: https://github.com/rashadphz/farfalle
|
||||
stars: 3535
|
||||
stars: 3530
|
||||
owner_login: rashadphz
|
||||
owner_html_url: https://github.com/rashadphz
|
||||
- name: opyrator
|
||||
html_url: https://github.com/ml-tooling/opyrator
|
||||
stars: 3136
|
||||
stars: 3137
|
||||
owner_login: ml-tooling
|
||||
owner_html_url: https://github.com/ml-tooling
|
||||
- name: honcho
|
||||
html_url: https://github.com/plastic-labs/honcho
|
||||
stars: 3135
|
||||
owner_login: plastic-labs
|
||||
owner_html_url: https://github.com/plastic-labs
|
||||
- name: docarray
|
||||
html_url: https://github.com/docarray/docarray
|
||||
stars: 3119
|
||||
stars: 3118
|
||||
owner_login: docarray
|
||||
owner_html_url: https://github.com/docarray
|
||||
- name: fastapi-realworld-example-app
|
||||
html_url: https://github.com/nsidnev/fastapi-realworld-example-app
|
||||
stars: 3110
|
||||
stars: 3111
|
||||
owner_login: nsidnev
|
||||
owner_html_url: https://github.com/nsidnev
|
||||
- name: uvicorn-gunicorn-fastapi-docker
|
||||
html_url: https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker
|
||||
stars: 2910
|
||||
stars: 2912
|
||||
owner_login: tiangolo
|
||||
owner_html_url: https://github.com/tiangolo
|
||||
- name: FastAPI-template
|
||||
html_url: https://github.com/s3rius/FastAPI-template
|
||||
stars: 2800
|
||||
stars: 2780
|
||||
owner_login: s3rius
|
||||
owner_html_url: https://github.com/s3rius
|
||||
- name: YC-Killer
|
||||
html_url: https://github.com/sahibzada-allahyar/YC-Killer
|
||||
stars: 2770
|
||||
owner_login: sahibzada-allahyar
|
||||
owner_html_url: https://github.com/sahibzada-allahyar
|
||||
- name: sqladmin
|
||||
html_url: https://github.com/smithyhq/sqladmin
|
||||
stars: 2739
|
||||
stars: 2716
|
||||
owner_login: smithyhq
|
||||
owner_html_url: https://github.com/smithyhq
|
||||
- name: best-of-web-python
|
||||
html_url: https://github.com/ml-tooling/best-of-web-python
|
||||
stars: 2723
|
||||
stars: 2711
|
||||
owner_login: ml-tooling
|
||||
owner_html_url: https://github.com/ml-tooling
|
||||
- name: Rapid-MLX
|
||||
html_url: https://github.com/raullenchai/Rapid-MLX
|
||||
stars: 2640
|
||||
owner_login: raullenchai
|
||||
owner_html_url: https://github.com/raullenchai
|
||||
- name: YC-Killer
|
||||
html_url: https://github.com/sahibzada-allahyar/YC-Killer
|
||||
stars: 2626
|
||||
owner_login: sahibzada-allahyar
|
||||
owner_html_url: https://github.com/sahibzada-allahyar
|
||||
- name: fastapi-react
|
||||
html_url: https://github.com/Buuntu/fastapi-react
|
||||
stars: 2588
|
||||
stars: 2581
|
||||
owner_login: Buuntu
|
||||
owner_html_url: https://github.com/Buuntu
|
||||
- name: any-auto-register
|
||||
html_url: https://github.com/lxf746/any-auto-register
|
||||
stars: 2542
|
||||
owner_login: lxf746
|
||||
owner_html_url: https://github.com/lxf746
|
||||
- name: NoteDiscovery
|
||||
html_url: https://github.com/gamosoft/NoteDiscovery
|
||||
stars: 2531
|
||||
owner_login: gamosoft
|
||||
owner_html_url: https://github.com/gamosoft
|
||||
- name: supabase-py
|
||||
html_url: https://github.com/supabase/supabase-py
|
||||
stars: 2518
|
||||
stars: 2499
|
||||
owner_login: supabase
|
||||
owner_html_url: https://github.com/supabase
|
||||
- name: 30-Days-of-Python
|
||||
html_url: https://github.com/codingforentrepreneurs/30-Days-of-Python
|
||||
stars: 2470
|
||||
owner_login: codingforentrepreneurs
|
||||
owner_html_url: https://github.com/codingforentrepreneurs
|
||||
- name: RasaGPT
|
||||
html_url: https://github.com/paulpierre/RasaGPT
|
||||
stars: 2466
|
||||
owner_login: paulpierre
|
||||
owner_html_url: https://github.com/paulpierre
|
||||
- name: NoteDiscovery
|
||||
html_url: https://github.com/gamosoft/NoteDiscovery
|
||||
stars: 2465
|
||||
owner_login: gamosoft
|
||||
owner_html_url: https://github.com/gamosoft
|
||||
- name: 30-Days-of-Python
|
||||
html_url: https://github.com/codingforentrepreneurs/30-Days-of-Python
|
||||
stars: 2459
|
||||
owner_login: codingforentrepreneurs
|
||||
owner_html_url: https://github.com/codingforentrepreneurs
|
||||
- name: AIstudioProxyAPI
|
||||
html_url: https://github.com/CJackHwang/AIstudioProxyAPI
|
||||
stars: 2396
|
||||
stars: 2346
|
||||
owner_login: CJackHwang
|
||||
owner_html_url: https://github.com/CJackHwang
|
||||
- name: fastapi-langgraph-agent-production-ready-template
|
||||
html_url: https://github.com/wassim249/fastapi-langgraph-agent-production-ready-template
|
||||
stars: 2338
|
||||
owner_login: wassim249
|
||||
owner_html_url: https://github.com/wassim249
|
||||
- name: nextpy
|
||||
html_url: https://github.com/dot-agent/nextpy
|
||||
stars: 2336
|
||||
@@ -280,122 +260,117 @@
|
||||
owner_html_url: https://github.com/dot-agent
|
||||
- name: langserve
|
||||
html_url: https://github.com/langchain-ai/langserve
|
||||
stars: 2330
|
||||
stars: 2319
|
||||
owner_login: langchain-ai
|
||||
owner_html_url: https://github.com/langchain-ai
|
||||
- name: fastapi-utils
|
||||
html_url: https://github.com/fastapiutils/fastapi-utils
|
||||
stars: 2310
|
||||
stars: 2306
|
||||
owner_login: fastapiutils
|
||||
owner_html_url: https://github.com/fastapiutils
|
||||
- name: fastapi-langgraph-agent-production-ready-template
|
||||
html_url: https://github.com/wassim249/fastapi-langgraph-agent-production-ready-template
|
||||
stars: 2218
|
||||
owner_login: wassim249
|
||||
owner_html_url: https://github.com/wassim249
|
||||
- name: fastapi-best-architecture
|
||||
html_url: https://github.com/fastapi-practices/fastapi-best-architecture
|
||||
stars: 2256
|
||||
stars: 2206
|
||||
owner_login: fastapi-practices
|
||||
owner_html_url: https://github.com/fastapi-practices
|
||||
- name: solara
|
||||
html_url: https://github.com/widgetti/solara
|
||||
stars: 2162
|
||||
stars: 2160
|
||||
owner_login: widgetti
|
||||
owner_html_url: https://github.com/widgetti
|
||||
- name: vue-fastapi-admin
|
||||
html_url: https://github.com/mizhexiaoxiao/vue-fastapi-admin
|
||||
stars: 2148
|
||||
stars: 2108
|
||||
owner_login: mizhexiaoxiao
|
||||
owner_html_url: https://github.com/mizhexiaoxiao
|
||||
- name: mangum
|
||||
html_url: https://github.com/Kludex/mangum
|
||||
stars: 2119
|
||||
stars: 2106
|
||||
owner_login: Kludex
|
||||
owner_html_url: https://github.com/Kludex
|
||||
- name: slowapi
|
||||
html_url: https://github.com/laurentS/slowapi
|
||||
stars: 2000
|
||||
stars: 1960
|
||||
owner_login: laurentS
|
||||
owner_html_url: https://github.com/laurentS
|
||||
- name: xhs_ai_publisher
|
||||
html_url: https://github.com/BetaStreetOmnis/xhs_ai_publisher
|
||||
stars: 1980
|
||||
stars: 1948
|
||||
owner_login: BetaStreetOmnis
|
||||
owner_html_url: https://github.com/BetaStreetOmnis
|
||||
- name: openapi-python-client
|
||||
html_url: https://github.com/openapi-generators/openapi-python-client
|
||||
stars: 1960
|
||||
owner_login: openapi-generators
|
||||
owner_html_url: https://github.com/openapi-generators
|
||||
- name: agentkit
|
||||
html_url: https://github.com/BCG-X-Official/agentkit
|
||||
stars: 1944
|
||||
owner_login: BCG-X-Official
|
||||
owner_html_url: https://github.com/BCG-X-Official
|
||||
- name: FastAPI-boilerplate
|
||||
html_url: https://github.com/benavlabs/FastAPI-boilerplate
|
||||
stars: 1931
|
||||
owner_login: benavlabs
|
||||
owner_html_url: https://github.com/benavlabs
|
||||
- name: piccolo
|
||||
html_url: https://github.com/piccolo-orm/piccolo
|
||||
stars: 1904
|
||||
owner_login: piccolo-orm
|
||||
owner_html_url: https://github.com/piccolo-orm
|
||||
- name: openapi-python-client
|
||||
html_url: https://github.com/openapi-generators/openapi-python-client
|
||||
stars: 1941
|
||||
owner_login: openapi-generators
|
||||
owner_html_url: https://github.com/openapi-generators
|
||||
- name: manage-fastapi
|
||||
html_url: https://github.com/ycd/manage-fastapi
|
||||
stars: 1903
|
||||
stars: 1901
|
||||
owner_login: ycd
|
||||
owner_html_url: https://github.com/ycd
|
||||
- name: piccolo
|
||||
html_url: https://github.com/piccolo-orm/piccolo
|
||||
stars: 1896
|
||||
owner_login: piccolo-orm
|
||||
owner_html_url: https://github.com/piccolo-orm
|
||||
- name: FastAPI-boilerplate
|
||||
html_url: https://github.com/benavlabs/FastAPI-boilerplate
|
||||
stars: 1892
|
||||
owner_login: benavlabs
|
||||
owner_html_url: https://github.com/benavlabs
|
||||
- name: fastapi-cache
|
||||
html_url: https://github.com/long2ice/fastapi-cache
|
||||
stars: 1865
|
||||
stars: 1859
|
||||
owner_login: long2ice
|
||||
owner_html_url: https://github.com/long2ice
|
||||
- name: kiro-gateway
|
||||
html_url: https://github.com/jwadow/kiro-gateway
|
||||
stars: 1853
|
||||
owner_login: jwadow
|
||||
owner_html_url: https://github.com/jwadow
|
||||
- name: ormar
|
||||
html_url: https://github.com/ormar-orm/ormar
|
||||
stars: 1809
|
||||
owner_login: ormar-orm
|
||||
owner_html_url: https://github.com/ormar-orm
|
||||
- name: any-auto-register
|
||||
html_url: https://github.com/lxf746/any-auto-register
|
||||
stars: 1857
|
||||
owner_login: lxf746
|
||||
owner_html_url: https://github.com/lxf746
|
||||
- name: python-week-2022
|
||||
html_url: https://github.com/rochacbruno/python-week-2022
|
||||
stars: 1806
|
||||
stars: 1810
|
||||
owner_login: rochacbruno
|
||||
owner_html_url: https://github.com/rochacbruno
|
||||
- name: open-wearables
|
||||
html_url: https://github.com/the-momentum/open-wearables
|
||||
stars: 1782
|
||||
owner_login: the-momentum
|
||||
owner_html_url: https://github.com/the-momentum
|
||||
- name: ormar
|
||||
html_url: https://github.com/ormar-orm/ormar
|
||||
stars: 1806
|
||||
owner_login: ormar-orm
|
||||
owner_html_url: https://github.com/ormar-orm
|
||||
- name: termpair
|
||||
html_url: https://github.com/cs01/termpair
|
||||
stars: 1735
|
||||
stars: 1731
|
||||
owner_login: cs01
|
||||
owner_html_url: https://github.com/cs01
|
||||
- name: WebRPA
|
||||
html_url: https://github.com/pmh1314520/WebRPA
|
||||
stars: 1718
|
||||
owner_login: pmh1314520
|
||||
owner_html_url: https://github.com/pmh1314520
|
||||
- name: codex-lb
|
||||
html_url: https://github.com/Soju06/codex-lb
|
||||
stars: 1709
|
||||
owner_login: Soju06
|
||||
owner_html_url: https://github.com/Soju06
|
||||
- name: fastapi-crudrouter
|
||||
html_url: https://github.com/awtkns/fastapi-crudrouter
|
||||
stars: 1692
|
||||
stars: 1687
|
||||
owner_login: awtkns
|
||||
owner_html_url: https://github.com/awtkns
|
||||
- name: bracket
|
||||
html_url: https://github.com/evroon/bracket
|
||||
stars: 1682
|
||||
stars: 1653
|
||||
owner_login: evroon
|
||||
owner_html_url: https://github.com/evroon
|
||||
- name: WebRPA
|
||||
html_url: https://github.com/pmh1314520/WebRPA
|
||||
stars: 1653
|
||||
owner_login: pmh1314520
|
||||
owner_html_url: https://github.com/pmh1314520
|
||||
- name: fastapi-pagination
|
||||
html_url: https://github.com/uriyyo/fastapi-pagination
|
||||
stars: 1658
|
||||
stars: 1646
|
||||
owner_login: uriyyo
|
||||
owner_html_url: https://github.com/uriyyo
|
||||
- name: langchain-serve
|
||||
@@ -403,9 +378,14 @@
|
||||
stars: 1640
|
||||
owner_login: jina-ai
|
||||
owner_html_url: https://github.com/jina-ai
|
||||
- name: headroom
|
||||
html_url: https://github.com/chopratejas/headroom
|
||||
stars: 1624
|
||||
owner_login: chopratejas
|
||||
owner_html_url: https://github.com/chopratejas
|
||||
- name: awesome-fastapi-projects
|
||||
html_url: https://github.com/Kludex/awesome-fastapi-projects
|
||||
stars: 1603
|
||||
stars: 1599
|
||||
owner_login: Kludex
|
||||
owner_html_url: https://github.com/Kludex
|
||||
- name: coronavirus-tracker-api
|
||||
@@ -415,81 +395,101 @@
|
||||
owner_html_url: https://github.com/ExpDev07
|
||||
- name: fastapi-amis-admin
|
||||
html_url: https://github.com/amisadmin/fastapi-amis-admin
|
||||
stars: 1554
|
||||
stars: 1541
|
||||
owner_login: amisadmin
|
||||
owner_html_url: https://github.com/amisadmin
|
||||
- name: fastcrud
|
||||
html_url: https://github.com/benavlabs/fastcrud
|
||||
stars: 1519
|
||||
stars: 1512
|
||||
owner_login: benavlabs
|
||||
owner_html_url: https://github.com/benavlabs
|
||||
- name: tavily-key-generator
|
||||
html_url: https://github.com/skernelx/tavily-key-generator
|
||||
stars: 1507
|
||||
owner_login: skernelx
|
||||
owner_html_url: https://github.com/skernelx
|
||||
- name: open-wearables
|
||||
html_url: https://github.com/the-momentum/open-wearables
|
||||
stars: 1496
|
||||
owner_login: the-momentum
|
||||
owner_html_url: https://github.com/the-momentum
|
||||
- name: fastapi-boilerplate
|
||||
html_url: https://github.com/teamhide/fastapi-boilerplate
|
||||
stars: 1490
|
||||
stars: 1486
|
||||
owner_login: teamhide
|
||||
owner_html_url: https://github.com/teamhide
|
||||
- name: tavily-key-generator
|
||||
html_url: https://github.com/skernelx/tavily-key-generator
|
||||
stars: 1478
|
||||
owner_login: skernelx
|
||||
owner_html_url: https://github.com/skernelx
|
||||
- name: prometheus-fastapi-instrumentator
|
||||
html_url: https://github.com/trallnag/prometheus-fastapi-instrumentator
|
||||
stars: 1458
|
||||
stars: 1451
|
||||
owner_login: trallnag
|
||||
owner_html_url: https://github.com/trallnag
|
||||
- name: awesome-python-resources
|
||||
html_url: https://github.com/DjangoEx/awesome-python-resources
|
||||
stars: 1448
|
||||
stars: 1449
|
||||
owner_login: DjangoEx
|
||||
owner_html_url: https://github.com/DjangoEx
|
||||
- name: fastapi-tutorial
|
||||
html_url: https://github.com/liaogx/fastapi-tutorial
|
||||
stars: 1404
|
||||
stars: 1399
|
||||
owner_login: liaogx
|
||||
owner_html_url: https://github.com/liaogx
|
||||
- name: fastapi-code-generator
|
||||
html_url: https://github.com/koxudaxi/fastapi-code-generator
|
||||
stars: 1397
|
||||
stars: 1383
|
||||
owner_login: koxudaxi
|
||||
owner_html_url: https://github.com/koxudaxi
|
||||
- name: aktools
|
||||
html_url: https://github.com/akfamily/aktools
|
||||
stars: 1394
|
||||
owner_login: akfamily
|
||||
owner_html_url: https://github.com/akfamily
|
||||
- name: RuoYi-Vue3-FastAPI
|
||||
html_url: https://github.com/insistence/RuoYi-Vue3-FastAPI
|
||||
stars: 1364
|
||||
owner_login: insistence
|
||||
owner_html_url: https://github.com/insistence
|
||||
- name: budgetml
|
||||
html_url: https://github.com/ebhy/budgetml
|
||||
stars: 1345
|
||||
owner_login: ebhy
|
||||
owner_html_url: https://github.com/ebhy
|
||||
- name: full-stack-ai-agent-template
|
||||
html_url: https://github.com/vstorm-co/full-stack-ai-agent-template
|
||||
stars: 1316
|
||||
owner_login: vstorm-co
|
||||
owner_html_url: https://github.com/vstorm-co
|
||||
- name: aktools
|
||||
html_url: https://github.com/akfamily/aktools
|
||||
stars: 1334
|
||||
owner_login: akfamily
|
||||
owner_html_url: https://github.com/akfamily
|
||||
- name: RuoYi-Vue3-FastAPI
|
||||
html_url: https://github.com/insistence/RuoYi-Vue3-FastAPI
|
||||
stars: 1302
|
||||
owner_login: insistence
|
||||
owner_html_url: https://github.com/insistence
|
||||
- name: bolt-python
|
||||
html_url: https://github.com/slackapi/bolt-python
|
||||
stars: 1308
|
||||
stars: 1296
|
||||
owner_login: slackapi
|
||||
owner_html_url: https://github.com/slackapi
|
||||
- name: bedrock-chat
|
||||
html_url: https://github.com/aws-samples/bedrock-chat
|
||||
stars: 1304
|
||||
stars: 1288
|
||||
owner_login: aws-samples
|
||||
owner_html_url: https://github.com/aws-samples
|
||||
- name: restish
|
||||
html_url: https://github.com/rest-sh/restish
|
||||
stars: 1303
|
||||
stars: 1279
|
||||
owner_login: rest-sh
|
||||
owner_html_url: https://github.com/rest-sh
|
||||
- name: fastapi-alembic-sqlmodel-async
|
||||
html_url: https://github.com/vargasjona/fastapi-alembic-sqlmodel-async
|
||||
stars: 1270
|
||||
owner_login: vargasjona
|
||||
owner_html_url: https://github.com/vargasjona
|
||||
- name: fastapi_production_template
|
||||
html_url: https://github.com/zhanymkanov/fastapi_production_template
|
||||
stars: 1243
|
||||
owner_login: zhanymkanov
|
||||
owner_html_url: https://github.com/zhanymkanov
|
||||
- name: yubal
|
||||
html_url: https://github.com/guillevc/yubal
|
||||
stars: 1302
|
||||
stars: 1203
|
||||
owner_login: guillevc
|
||||
owner_html_url: https://github.com/guillevc
|
||||
- name: langchain-extract
|
||||
html_url: https://github.com/langchain-ai/langchain-extract
|
||||
stars: 1196
|
||||
owner_login: langchain-ai
|
||||
owner_html_url: https://github.com/langchain-ai
|
||||
- name: Chatterbox-TTS-Server
|
||||
html_url: https://github.com/devnen/Chatterbox-TTS-Server
|
||||
stars: 1194
|
||||
owner_login: devnen
|
||||
owner_html_url: https://github.com/devnen
|
||||
|
||||
@@ -38,11 +38,6 @@ alv2017:
|
||||
count: 88
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/31544722?v=4
|
||||
url: https://github.com/alv2017
|
||||
YuriiMotov:
|
||||
login: YuriiMotov
|
||||
count: 87
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/109919500?u=bc48be95c429989224786106b027f3c5e40cc354&v=4
|
||||
url: https://github.com/YuriiMotov
|
||||
nazarepiedady:
|
||||
login: nazarepiedady
|
||||
count: 87
|
||||
@@ -50,7 +45,7 @@ nazarepiedady:
|
||||
url: https://github.com/nazarepiedady
|
||||
tiangolo:
|
||||
login: tiangolo
|
||||
count: 83
|
||||
count: 82
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/1326112?u=cb5d06e73a9e1998141b1641aa88e443c6717651&v=4
|
||||
url: https://github.com/tiangolo
|
||||
AlertRED:
|
||||
@@ -68,9 +63,14 @@ nilslindemann:
|
||||
count: 67
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/6892179?u=1dca6a22195d6cd1ab20737c0e19a4c55d639472&v=4
|
||||
url: https://github.com/nilslindemann
|
||||
YuriiMotov:
|
||||
login: YuriiMotov
|
||||
count: 67
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/109919500?u=bc48be95c429989224786106b027f3c5e40cc354&v=4
|
||||
url: https://github.com/YuriiMotov
|
||||
cassiobotaro:
|
||||
login: cassiobotaro
|
||||
count: 65
|
||||
count: 64
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/3127847?u=a08022b191ddbd0a6159b2981d9d878b6d5bb71f&v=4
|
||||
url: https://github.com/cassiobotaro
|
||||
waynerv:
|
||||
@@ -131,7 +131,7 @@ solomein-sv:
|
||||
mezgoodle:
|
||||
login: mezgoodle
|
||||
count: 38
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/41520940?u=b9f71909a70223d623afa9c2b848a14649daa07d&v=4
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/41520940?u=4a9c765af688389d54296845d18b8f6cd6ddf09a&v=4
|
||||
url: https://github.com/mezgoodle
|
||||
JavierSanchezCastro:
|
||||
login: JavierSanchezCastro
|
||||
@@ -616,7 +616,7 @@ socket-socket:
|
||||
nick-cjyx9:
|
||||
login: nick-cjyx9
|
||||
count: 10
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/119087246?u=5fc07fc3db727b3c00393d0a3739fb2b6e896a1b&v=4
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/119087246?u=3d51dcbd79222ecb6538642f31dc7c8bb708d191&v=4
|
||||
url: https://github.com/nick-cjyx9
|
||||
marcelomarkus:
|
||||
login: marcelomarkus
|
||||
@@ -693,11 +693,6 @@ Yarous:
|
||||
count: 9
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/61277193?u=5b462347458a373b2d599c6f416d2b75eddbffad&v=4
|
||||
url: https://github.com/Yarous
|
||||
ABcDexter:
|
||||
login: ABcDexter
|
||||
count: 9
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/7236257?u=baa7e62eb4d0014b5854bfd0d5c2b20bd9617e0d&v=4
|
||||
url: https://github.com/ABcDexter
|
||||
dimaqq:
|
||||
login: dimaqq
|
||||
count: 8
|
||||
@@ -748,11 +743,6 @@ sungchan1:
|
||||
count: 8
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/28076127?u=fadbf24840186aca639d344bb3e0ecf7ff3441cf&v=4
|
||||
url: https://github.com/sungchan1
|
||||
EdmilsonRodrigues:
|
||||
login: EdmilsonRodrigues
|
||||
count: 8
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/62777025?u=217d6f3cd6cc750bb8818a3af7726c8d74eb7c2d&v=4
|
||||
url: https://github.com/EdmilsonRodrigues
|
||||
roli2py:
|
||||
login: roli2py
|
||||
count: 8
|
||||
@@ -808,6 +798,11 @@ Zerohertz:
|
||||
count: 7
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/42334717?u=5ebf4d33e73b1ad373154f6cdee44f7cab4d05ba&v=4
|
||||
url: https://github.com/Zerohertz
|
||||
EdmilsonRodrigues:
|
||||
login: EdmilsonRodrigues
|
||||
count: 7
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/62777025?u=217d6f3cd6cc750bb8818a3af7726c8d74eb7c2d&v=4
|
||||
url: https://github.com/EdmilsonRodrigues
|
||||
deniscapeto:
|
||||
login: deniscapeto
|
||||
count: 6
|
||||
@@ -1281,7 +1276,7 @@ rafsaf:
|
||||
frnsimoes:
|
||||
login: frnsimoes
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/66239468?u=be491199e4695bb0ac43d17d59cf7d41f9df629f&v=4
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/66239468?u=bd788dabd4d9321455db8b8751c1a2676783f50f&v=4
|
||||
url: https://github.com/frnsimoes
|
||||
lieryan:
|
||||
login: lieryan
|
||||
@@ -1443,11 +1438,6 @@ Mohammad222PR:
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/116789737?u=25810a5fe049d2f1618e2e7417cea011cc353ce4&v=4
|
||||
url: https://github.com/Mohammad222PR
|
||||
crr004:
|
||||
login: crr004
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/110995013?u=b1a0cd6b11043dafa7caa1ab6e151c8e063476bc&v=4
|
||||
url: https://github.com/crr004
|
||||
blaisep:
|
||||
login: blaisep
|
||||
count: 2
|
||||
@@ -1821,7 +1811,7 @@ tiaggo16:
|
||||
kiharito:
|
||||
login: kiharito
|
||||
count: 2
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/38311245?u=531bd2230b752826edc01dc9d950f2f36017a6f0&v=4
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/38311245?v=4
|
||||
url: https://github.com/kiharito
|
||||
t4f1d:
|
||||
login: t4f1d
|
||||
|
||||
@@ -5,7 +5,7 @@ nilslindemann:
|
||||
url: https://github.com/nilslindemann
|
||||
tiangolo:
|
||||
login: tiangolo
|
||||
count: 78
|
||||
count: 67
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/1326112?u=cb5d06e73a9e1998141b1641aa88e443c6717651&v=4
|
||||
url: https://github.com/tiangolo
|
||||
jaystone776:
|
||||
@@ -303,11 +303,11 @@ nayeonkinn:
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/98254573?u=64a75ac99b320d4935eff8d1fceea9680fa07473&v=4
|
||||
url: https://github.com/nayeonkinn
|
||||
p3bri4n:
|
||||
login: p3bri4n
|
||||
pe-brian:
|
||||
login: pe-brian
|
||||
count: 3
|
||||
avatarUrl: https://avatars.githubusercontent.com/u/1783138?u=7e6242eb9e85bcf673fa88bbac9dd6dc3f03b1b5&v=4
|
||||
url: https://github.com/p3bri4n
|
||||
url: https://github.com/pe-brian
|
||||
maxscheijen:
|
||||
login: maxscheijen
|
||||
count: 3
|
||||
|
||||
@@ -1,7 +1,267 @@
|
||||
# Contributing
|
||||
# Development - Contributing
|
||||
|
||||
First, you might want to see the basic ways to [help FastAPI and get help](help-fastapi.md).
|
||||
|
||||
## Developing
|
||||
|
||||
To contribute code to the project, please follow the guidelines in [tiangolo.com - Contributing](https://tiangolo.com/open-source/contributing/).
|
||||
If you already cloned the [fastapi repository](https://github.com/fastapi/fastapi) and you want to deep dive in the code, here are some guidelines to set up your environment.
|
||||
|
||||
### Install requirements
|
||||
|
||||
Create a virtual environment and install the required packages with [`uv`](https://github.com/astral-sh/uv):
|
||||
|
||||
<div class="termy">
|
||||
|
||||
```console
|
||||
$ uv sync --extra all
|
||||
|
||||
---> 100%
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
It will install all the dependencies and your local FastAPI in your local environment.
|
||||
|
||||
### Using your local FastAPI
|
||||
|
||||
If you create a Python file that imports and uses FastAPI, and run it with the Python from your local environment, it will use your cloned local FastAPI source code.
|
||||
|
||||
And if you update that local FastAPI source code when you run that Python file again, it will use the fresh version of FastAPI you just edited.
|
||||
|
||||
That way, you don't have to "install" your local version to be able to test every change.
|
||||
|
||||
/// note | Technical Details
|
||||
|
||||
This only happens when you install using `uv sync --extra all` instead of running `pip install fastapi` directly.
|
||||
|
||||
That is because `uv sync --extra all` will install the local version of FastAPI in "editable" mode by default.
|
||||
|
||||
///
|
||||
|
||||
### Format the code
|
||||
|
||||
There is a script that you can run that will format and clean all your code:
|
||||
|
||||
<div class="termy">
|
||||
|
||||
```console
|
||||
$ bash scripts/format.sh
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
It will also auto-sort all your imports.
|
||||
|
||||
## Tests
|
||||
|
||||
There is a script that you can run locally to test all the code and generate coverage reports in HTML:
|
||||
|
||||
<div class="termy">
|
||||
|
||||
```console
|
||||
$ bash scripts/test-cov-html.sh
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
This command generates a directory `./htmlcov/`, if you open the file `./htmlcov/index.html` in your browser, you can explore interactively the regions of code that are covered by the tests, and notice if there is any region missing.
|
||||
|
||||
## Docs
|
||||
|
||||
First, make sure you set up your environment as described above, that will install all the requirements.
|
||||
|
||||
### Docs live
|
||||
|
||||
During local development, there is a script that builds the site and checks for any changes, live-reloading:
|
||||
|
||||
<div class="termy">
|
||||
|
||||
```console
|
||||
$ python ./scripts/docs.py live
|
||||
|
||||
<span style="color: green;">[INFO]</span> Serving on http://127.0.0.1:8008
|
||||
<span style="color: green;">[INFO]</span> Start watching changes
|
||||
<span style="color: green;">[INFO]</span> Start detecting changes
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
It will serve the documentation on `http://127.0.0.1:8008`.
|
||||
|
||||
That way, you can edit the documentation/source files and see the changes live.
|
||||
|
||||
/// tip
|
||||
|
||||
Alternatively, you can perform the same steps that scripts does manually.
|
||||
|
||||
Go into the language directory, for the main docs in English it's at `docs/en/`:
|
||||
|
||||
```console
|
||||
$ cd docs/en/
|
||||
```
|
||||
|
||||
Then run `mkdocs` in that directory:
|
||||
|
||||
```console
|
||||
$ mkdocs serve --dev-addr 127.0.0.1:8008
|
||||
```
|
||||
|
||||
///
|
||||
|
||||
#### Typer CLI (optional)
|
||||
|
||||
The instructions here show you how to use the script at `./scripts/docs.py` with the `python` program directly.
|
||||
|
||||
But you can also use [Typer CLI](https://typer.tiangolo.com/typer-cli/), and you will get autocompletion in your terminal for the commands after installing completion.
|
||||
|
||||
If you install Typer CLI, you can install completion with:
|
||||
|
||||
<div class="termy">
|
||||
|
||||
```console
|
||||
$ typer --install-completion
|
||||
|
||||
zsh completion installed in /home/user/.bashrc.
|
||||
Completion will take effect once you restart the terminal.
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
### Docs Structure
|
||||
|
||||
The documentation uses [MkDocs](https://www.mkdocs.org/).
|
||||
|
||||
And there are extra tools/scripts in place to handle translations in `./scripts/docs.py`.
|
||||
|
||||
/// tip
|
||||
|
||||
You don't need to see the code in `./scripts/docs.py`, you just use it in the command line.
|
||||
|
||||
///
|
||||
|
||||
All the documentation is in Markdown format in the directory `./docs/en/`.
|
||||
|
||||
Many of the tutorials have blocks of code.
|
||||
|
||||
In most of the cases, these blocks of code are actual complete applications that can be run as is.
|
||||
|
||||
In fact, those blocks of code are not written inside the Markdown, they are Python files in the `./docs_src/` directory.
|
||||
|
||||
And those Python files are included/injected in the documentation when generating the site.
|
||||
|
||||
### Docs for tests
|
||||
|
||||
Most of the tests actually run against the example source files in the documentation.
|
||||
|
||||
This helps to make sure that:
|
||||
|
||||
* The documentation is up-to-date.
|
||||
* The documentation examples can be run as is.
|
||||
* Most of the features are covered by the documentation, ensured by test coverage.
|
||||
|
||||
#### Apps and docs at the same time
|
||||
|
||||
If you run the examples with, e.g.:
|
||||
|
||||
<div class="termy">
|
||||
|
||||
```console
|
||||
$ fastapi dev tutorial001.py
|
||||
|
||||
<span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
as Uvicorn by default will use the port `8000`, the documentation on port `8008` won't clash.
|
||||
|
||||
### Translations
|
||||
|
||||
Help with translations is VERY MUCH appreciated! And it can't be done without the help from the community. 🌎 🚀
|
||||
|
||||
Translation pull requests are made by LLMs guided with prompts designed by the FastAPI team together with the community of native speakers for each supported language.
|
||||
|
||||
#### LLM Prompt per Language
|
||||
|
||||
Each language has a directory: [https://github.com/fastapi/fastapi/tree/master/docs](https://github.com/fastapi/fastapi/tree/master/docs), in it you can see a file `llm-prompt.md` with the prompt specific for that language.
|
||||
|
||||
For example, for Spanish, the prompt is at: [`docs/es/llm-prompt.md`](https://github.com/fastapi/fastapi/blob/master/docs/es/llm-prompt.md).
|
||||
|
||||
If you see mistakes in your language, you can make suggestions to the prompt in that file for your language, and request the specific pages you would like to re-generate after the changes.
|
||||
|
||||
#### Reviewing Translation PRs
|
||||
|
||||
We don’t require approval from native speakers for translation PRs generated automatically by our translation workflow. However, you can still review them and suggest improvements to the LLM prompt for that language to make the future translations better.
|
||||
|
||||
You can check the currently [existing pull requests](https://github.com/fastapi/fastapi/pulls) for your language. You can filter the pull requests by the ones with the label for your language. For example, for Spanish, the label is [`lang-es`](https://github.com/fastapi/fastapi/pulls?q=is%3Aopen+sort%3Aupdated-desc+label%3Alang-es+label%3Aawaiting-review).
|
||||
|
||||
You can also review already merged translation PRs. To do this, go to the [closed pull requests](https://github.com/fastapi/fastapi/pulls?q=is%3Apr+is%3Aclosed) and filter by your language label. For example, for Spanish, you can use [`lang-es`](https://github.com/fastapi/fastapi/pulls?q=is%3Apr+is%3Aclosed+label%3Alang-es).
|
||||
|
||||
When reviewing a pull request, it's better not to suggest changes in the same pull request, because it is LLM generated, and it won't be possible to make sure that small individual changes are replicated in other similar sections, or that they are preserved when translating the same content again.
|
||||
|
||||
Instead of adding suggestions to the translation PR, make the suggestions to the LLM prompt file for that language, in a new PR. For example, for Spanish, the LLM prompt file is at: [`docs/es/llm-prompt.md`](https://github.com/fastapi/fastapi/blob/master/docs/es/llm-prompt.md).
|
||||
|
||||
/// tip
|
||||
|
||||
Check the docs about [adding a pull request review](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-request-reviews) to approve it or request changes.
|
||||
|
||||
///
|
||||
|
||||
PRs with suggestions to the language-specific LLM prompt require approval from at least one native speaker. Your help here is very much appreciated!
|
||||
|
||||
#### Subscribe to Notifications for Your Language
|
||||
|
||||
Check if there's a [GitHub Discussion](https://github.com/fastapi/fastapi/discussions/categories/translations) to coordinate translations for your language. You can subscribe to it, and when there's a new pull request to review, an automatic comment will be added to the discussion.
|
||||
|
||||
To check the 2-letter code for the language you want to translate, you can use the table [List of ISO 639-1 codes](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
|
||||
|
||||
#### Request a New Language
|
||||
|
||||
Let's say that you want to request translations for a language that is not yet translated, not even some pages. For example, Latin.
|
||||
|
||||
* The first step would be for you to find other 2 people that would be willing to be reviewing translation PRs for that language with you.
|
||||
* Once there are at least 3 people that would be willing to commit to help maintain that language, you can continue the next steps.
|
||||
* Create a new discussion following the template.
|
||||
* Tag the other 2 people that will help with the language, and ask them to confirm there they will help.
|
||||
|
||||
Once there are several people in the discussion, the FastAPI team can evaluate it and can make it an official translation.
|
||||
|
||||
Then the docs will be automatically translated using LLMs, and the team of native speakers can review the translation, and help tweak the LLM prompts.
|
||||
|
||||
Once there's a new translation, for example if docs are updated or there's a new section, there will be a comment in the same discussion with the link to the new translation to review.
|
||||
|
||||
## Automated Code and AI
|
||||
|
||||
You are encouraged to use all the tools you want to do your work and contribute as efficiently as possible, this includes AI (LLM) tools, etc. Nevertheless, contributions should have meaningful human intervention, judgement, context, etc.
|
||||
|
||||
If the **human effort** put in a PR, e.g. writing LLM prompts, is **less** than the **effort we would need to put** to **review it**, please **don't** submit the PR.
|
||||
|
||||
Think of it this way: we can already write LLM prompts or run automated tools ourselves, and that would be faster than reviewing external PRs.
|
||||
|
||||
### Closing Automated and AI PRs
|
||||
|
||||
If we see PRs that seem AI generated or automated in similar ways, we'll flag them and close them.
|
||||
|
||||
The same applies to comments and descriptions, please don't copy paste the content generated by an LLM.
|
||||
|
||||
### Human Effort Denial of Service
|
||||
|
||||
Using automated tools and AI to submit PRs or comments that we have to carefully review and handle would be the equivalent of a [Denial-of-service attack](https://en.wikipedia.org/wiki/Denial-of-service_attack) on our human effort.
|
||||
|
||||
It would be very little effort from the person submitting the PR (an LLM prompt) that generates a large amount of effort on our side (carefully reviewing code).
|
||||
|
||||
Please don't do that.
|
||||
|
||||
We'll need to block accounts that spam us with repeated automated PRs or comments.
|
||||
|
||||
### Use Tools Wisely
|
||||
|
||||
As Uncle Ben said:
|
||||
|
||||
<blockquote>
|
||||
With great <strike>power</strike> <strong>tools</strong> comes great responsibility.
|
||||
</blockquote>
|
||||
|
||||
Avoid inadvertently doing harm.
|
||||
|
||||
You have amazing tools at hand, use them wisely to help effectively.
|
||||
|
||||
@@ -56,6 +56,7 @@ There are several alternatives, including:
|
||||
* [Hypercorn](https://hypercorn.readthedocs.io/): an ASGI server compatible with HTTP/2 and Trio among other features.
|
||||
* [Daphne](https://github.com/django/daphne): the ASGI server built for Django Channels.
|
||||
* [Granian](https://github.com/emmett-framework/granian): A Rust HTTP server for Python applications.
|
||||
* [NGINX Unit](https://unit.nginx.org/howto/fastapi/): NGINX Unit is a lightweight and versatile web application runtime.
|
||||
|
||||
## Server Machine and Server Program { #server-machine-and-server-program }
|
||||
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
---
|
||||
include_yaml:
|
||||
topic_repos: data/topic_repos.yml
|
||||
---
|
||||
|
||||
# External Links
|
||||
|
||||
**FastAPI** has a great community constantly growing.
|
||||
|
||||
@@ -95,7 +95,7 @@ which would be equivalent to:
|
||||
from backend.main import app
|
||||
```
|
||||
|
||||
### `fastapi dev` with path or with `--entrypoint` CLI option { #fastapi-dev-with-path-or-with-entrypoint-cli-option }
|
||||
### `fastapi dev` with path { #fastapi-dev-with-path }
|
||||
|
||||
You can also pass the file path to the `fastapi dev` command, and it will guess the FastAPI app object to use:
|
||||
|
||||
@@ -103,13 +103,7 @@ You can also pass the file path to the `fastapi dev` command, and it will guess
|
||||
$ fastapi dev main.py
|
||||
```
|
||||
|
||||
Or, you can also pass the `--entrypoint` option to the `fastapi dev` command:
|
||||
|
||||
```console
|
||||
$ fastapi dev --entrypoint main:app
|
||||
```
|
||||
|
||||
But you would have to remember to pass the correct path\entrypoint every time you call the `fastapi` command.
|
||||
But you would have to remember to pass the correct path every time you call the `fastapi` command.
|
||||
|
||||
Additionally, other tools might not be able to find it, for example the [VS Code Extension](editor-support.md) or [FastAPI Cloud](https://fastapicloud.com), so it is recommended to use the `entrypoint` in `pyproject.toml`.
|
||||
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
---
|
||||
hide:
|
||||
- navigation
|
||||
|
||||
include_yaml:
|
||||
github_sponsors: data/github_sponsors.yml
|
||||
people: data/people.yml
|
||||
contributors: data/contributors.yml
|
||||
translation_reviewers: data/translation_reviewers.yml
|
||||
skip_users: data/skip_users.yml
|
||||
members: data/members.yml
|
||||
sponsors_badge: data/sponsors_badge.yml
|
||||
sponsors: data/sponsors.yml
|
||||
---
|
||||
|
||||
# FastAPI People
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
# Help { #help }
|
||||
# Help FastAPI - Get Help { #help-fastapi-get-help }
|
||||
|
||||
Would you like to help FastAPI or get help about FastAPI?
|
||||
Do you like **FastAPI**?
|
||||
|
||||
There are very simple ways to help and get help.
|
||||
Would you like to help FastAPI, other users, and the author?
|
||||
|
||||
Or would you like to get help with **FastAPI**?
|
||||
|
||||
There are very simple ways to help (several involve just one or two clicks).
|
||||
|
||||
And there are several ways to get help too.
|
||||
|
||||
## Subscribe to the newsletter { #subscribe-to-the-newsletter }
|
||||
|
||||
@@ -14,13 +20,9 @@ You can subscribe to the (infrequent) [**FastAPI and friends** newsletter](newsl
|
||||
* Breaking changes 🚨
|
||||
* Tips and tricks ✅
|
||||
|
||||
## Follow FastAPI online { #follow-fastapi-online }
|
||||
## Follow FastAPI on X (Twitter) { #follow-fastapi-on-x-twitter }
|
||||
|
||||
You can follow **FastAPI** online in several places:
|
||||
|
||||
* [@fastapi on **X / Twitter**](https://x.com/fastapi)
|
||||
* [@fastapi.tiangolo.com on **Bluesky**](https://bsky.app/profile/fastapi.tiangolo.com)
|
||||
* [FastAPI on **LinkedIn**](https://www.linkedin.com/company/fastapi/)
|
||||
[Follow @fastapi on **X (Twitter)**](https://x.com/fastapi) to get the latest news about **FastAPI**. 🐦
|
||||
|
||||
## Star **FastAPI** in GitHub { #star-fastapi-in-github }
|
||||
|
||||
@@ -36,28 +38,98 @@ There you can select "Releases only".
|
||||
|
||||
By doing it, you will receive notifications (in your email) whenever there's a new release (a new version) of **FastAPI** with bug fixes and new features.
|
||||
|
||||
## Follow the author { #follow-the-author }
|
||||
## Connect with the author { #connect-with-the-author }
|
||||
|
||||
You can follow [me (Sebastián Ramírez / `tiangolo`)](https://tiangolo.com), the author in a few places, to hear when I have news to share about FastAPI and friends:
|
||||
You can connect with [me (Sebastián Ramírez / `tiangolo`)](https://tiangolo.com), the author.
|
||||
|
||||
* [@tiangolo on **GitHub**](https://github.com/tiangolo).
|
||||
* [@tiangolo on **X (Twitter)**](https://x.com/tiangolo)
|
||||
* [@tiangolo.com on **Bluesky**](https://bsky.app/profile/tiangolo.com)
|
||||
* [@tiangolo on **LinkedIn**](https://www.linkedin.com/in/tiangolo/).
|
||||
You can:
|
||||
|
||||
* [Follow me on **GitHub**](https://github.com/tiangolo).
|
||||
* See other Open Source projects I have created that could help you.
|
||||
* Follow me to see when I create a new Open Source project.
|
||||
* [Follow me on **X (Twitter)**](https://x.com/tiangolo) or [Mastodon](https://fosstodon.org/@tiangolo).
|
||||
* Tell me how you use FastAPI (I love to hear that).
|
||||
* Hear when I make announcements or release new tools.
|
||||
* You can also [follow @fastapi on X (Twitter)](https://x.com/fastapi) (a separate account).
|
||||
* [Follow me on **LinkedIn**](https://www.linkedin.com/in/tiangolo/).
|
||||
* Hear when I make announcements or release new tools (although I use X (Twitter) more often 🤷♂).
|
||||
* Read what I write (or follow me) on [**Dev.to**](https://dev.to/tiangolo) or [**Medium**](https://medium.com/@tiangolo).
|
||||
* Read other ideas, articles, and read about tools I have created.
|
||||
* Follow me to read when I publish something new.
|
||||
|
||||
## Tweet about **FastAPI** { #tweet-about-fastapi }
|
||||
|
||||
[Tweet about **FastAPI**](https://x.com/compose/tweet?text=I'm loving @fastapi because... https://github.com/fastapi/fastapi) and let me and others know why you like it. 🎉
|
||||
|
||||
I love to hear about how **FastAPI** is being used, what you have liked in it, in which project/company are you using it, etc.
|
||||
|
||||
## Vote for FastAPI { #vote-for-fastapi }
|
||||
|
||||
* [Vote for **FastAPI** in Slant](https://www.slant.co/options/34241/~fastapi-review).
|
||||
* [Vote for **FastAPI** in AlternativeTo](https://alternativeto.net/software/fastapi/about/).
|
||||
* [Say you use **FastAPI** on StackShare](https://stackshare.io/pypi-fastapi).
|
||||
|
||||
## Help others with questions in GitHub { #help-others-with-questions-in-github }
|
||||
|
||||
You can try and help others with their questions in [GitHub Discussions](https://github.com/fastapi/fastapi/discussions/categories/questions?discussions_q=category%3AQuestions+is%3Aunanswered).
|
||||
You can try and help others with their questions in:
|
||||
|
||||
* [GitHub Discussions](https://github.com/fastapi/fastapi/discussions/categories/questions?discussions_q=category%3AQuestions+is%3Aunanswered)
|
||||
* [GitHub Issues](https://github.com/fastapi/fastapi/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Aquestion+-label%3Aanswered+)
|
||||
|
||||
In many cases you might already know the answer for those questions. 🤓
|
||||
|
||||
If you are helping a lot of people with their questions, you will become an official [FastAPI Expert](fastapi-people.md#fastapi-experts). 🎉
|
||||
|
||||
Just remember, the most important point is: try to be kind. 🤗
|
||||
Just remember, the most important point is: try to be kind. People come with their frustrations and in many cases don't ask in the best way, but try as best as you can to be kind. 🤗
|
||||
|
||||
### How to Help { #how-to-help }
|
||||
The idea is for the **FastAPI** community to be kind and welcoming. At the same time, don't accept bullying or disrespectful behavior towards others. We have to take care of each other.
|
||||
|
||||
Follow the [guide on how to help](https://tiangolo.com/open-source/help/#help-others-with-questions-in-github) here.
|
||||
---
|
||||
|
||||
Here's how to help others with questions (in discussions or issues):
|
||||
|
||||
### Understand the question { #understand-the-question }
|
||||
|
||||
* Check if you can understand what is the **purpose** and use case of the person asking.
|
||||
|
||||
* Then check if the question (the vast majority are questions) is **clear**.
|
||||
|
||||
* In many cases the question asked is about an imaginary solution from the user, but there might be a **better** one. If you can understand the problem and use case better, you might be able to suggest a better **alternative solution**.
|
||||
|
||||
* If you can't understand the question, ask for more **details**.
|
||||
|
||||
### Reproduce the problem { #reproduce-the-problem }
|
||||
|
||||
For most of the cases and most of the questions there's something related to the person's **original code**.
|
||||
|
||||
In many cases they will only copy a fragment of the code, but that's not enough to **reproduce the problem**.
|
||||
|
||||
* You can ask them to provide a [minimal, reproducible, example](https://stackoverflow.com/help/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 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 { #suggest-solutions }
|
||||
|
||||
* After being able to understand the question, you can give them a possible **answer**.
|
||||
|
||||
* In many cases, it's better to understand their **underlying problem or use case**, because there might be a better way to solve it than what they are trying to do.
|
||||
|
||||
### Ask to close { #ask-to-close }
|
||||
|
||||
If they reply, there's a high chance you would have solved their problem, congrats, **you're a hero**! 🦸
|
||||
|
||||
* Now, if that solved their problem, you can ask them to:
|
||||
|
||||
* In GitHub Discussions: mark the comment as the **answer**.
|
||||
* In GitHub Issues: **close** the issue.
|
||||
|
||||
## Watch the GitHub repository { #watch-the-github-repository }
|
||||
|
||||
You can "watch" FastAPI in GitHub (clicking the "watch" button at the top right): [https://github.com/fastapi/fastapi](https://github.com/fastapi/fastapi). 👀
|
||||
|
||||
If you select "Watching" instead of "Releases only" you will receive notifications when someone creates a new issue or question. You can also specify that you only want to be notified about new issues, or discussions, or PRs, etc.
|
||||
|
||||
Then you can try and help them solve those questions.
|
||||
|
||||
## Ask Questions { #ask-questions }
|
||||
|
||||
@@ -66,22 +138,122 @@ You can [create a new question](https://github.com/fastapi/fastapi/discussions/n
|
||||
* Ask a **question** or ask about a **problem**.
|
||||
* Suggest a new **feature**.
|
||||
|
||||
## Join the Chat { #join-the-chat }
|
||||
**Note**: if you do it, then I'm going to ask you to also help others. 😉
|
||||
|
||||
## Review Pull Requests { #review-pull-requests }
|
||||
|
||||
You can help me review pull requests from others.
|
||||
|
||||
Again, please try your best to be kind. 🤗
|
||||
|
||||
---
|
||||
|
||||
Here's what to keep in mind and how to review a pull request:
|
||||
|
||||
### Understand the problem { #understand-the-problem }
|
||||
|
||||
* First, make sure you **understand the problem** that the pull request is trying to solve. It might have a longer discussion in a GitHub Discussion or issue.
|
||||
|
||||
* There's also a good chance that the pull request is not actually needed because the problem can be solved in a **different way**. Then you can suggest or ask about that.
|
||||
|
||||
### Don't worry about style { #dont-worry-about-style }
|
||||
|
||||
* Don't worry too much about things like commit message styles, I will squash and merge customizing the commit manually.
|
||||
|
||||
* Also don't worry about style rules, there are already automatized tools checking that.
|
||||
|
||||
And if there's any other style or consistency need, I'll ask directly for that, or I'll add commits on top with the needed changes.
|
||||
|
||||
### Check the code { #check-the-code }
|
||||
|
||||
* Check and read the code, see if it makes sense, **run it locally** and see if it actually solves the problem.
|
||||
|
||||
* Then **comment** saying that you did that, that's how I will know you really checked it.
|
||||
|
||||
/// note
|
||||
|
||||
Unfortunately, I can't simply trust PRs that just have several approvals.
|
||||
|
||||
Several times it has happened that there are PRs with 3, 5 or more approvals, probably because the description is appealing, but when I check the PRs, they are actually broken, have a bug, or don't solve the problem they claim to solve. 😅
|
||||
|
||||
So, it's really important that you actually read and run the code, and let me know in the comments that you did. 🤓
|
||||
|
||||
///
|
||||
|
||||
* If the PR can be simplified in a way, you can ask for that, but there's no need to be too picky, there might be a lot of subjective points of view (and I will have my own as well 🙈), so it's better if you can focus on the fundamental things.
|
||||
|
||||
### Tests { #tests }
|
||||
|
||||
* Help me check that the PR has **tests**.
|
||||
|
||||
* Check that the tests **fail** before the PR. 🚨
|
||||
|
||||
* Then check that the tests **pass** after the PR. ✅
|
||||
|
||||
* Many PRs don't have tests, you can **remind** them to add tests, or you can even **suggest** some tests yourself. That's one of the things that consume most time and you can help a lot with that.
|
||||
|
||||
* Then also comment what you tried, that way I'll know that you checked it. 🤓
|
||||
|
||||
## Create a Pull Request { #create-a-pull-request }
|
||||
|
||||
You can [contribute](contributing.md) to the source code with Pull Requests, for example:
|
||||
|
||||
* To fix a typo you found on the documentation.
|
||||
* To share an article, video, or podcast you created or found about FastAPI by [editing this file](https://github.com/fastapi/fastapi/edit/master/docs/en/data/external_links.yml).
|
||||
* Make sure you add your link to the start of the corresponding section.
|
||||
* To help [translate the documentation](contributing.md#translations) to your language.
|
||||
* You can also help to review the translations created by others.
|
||||
* To propose new documentation sections.
|
||||
* To fix an existing issue/bug.
|
||||
* Make sure to add tests.
|
||||
* To add a new feature.
|
||||
* Make sure to add tests.
|
||||
* Make sure to add documentation if it's relevant.
|
||||
|
||||
Note that PRs from non-team members are not allowed to modify `pyproject.toml` or `uv.lock`, to prevent supply chain risk.
|
||||
If you would like to add a new dependency, create a new [Discussion](https://github.com/fastapi/fastapi/discussions/categories/questions) to explain why.
|
||||
|
||||
## Help Maintain FastAPI { #help-maintain-fastapi }
|
||||
|
||||
Help me maintain **FastAPI**! 🤓
|
||||
|
||||
There's a lot of work to do, and for most of it, **YOU** can do it.
|
||||
|
||||
The main tasks that you can do right now are:
|
||||
|
||||
* [Help others with questions in GitHub](#help-others-with-questions-in-github) (see the section above).
|
||||
* [Review Pull Requests](#review-pull-requests) (see the section above).
|
||||
|
||||
Those two tasks are what **consume time the most**. That's the main work of maintaining FastAPI.
|
||||
|
||||
If you can help me with that, **you are helping me maintain FastAPI** and making sure it keeps **advancing faster and better**. 🚀
|
||||
|
||||
## Join the chat { #join-the-chat }
|
||||
|
||||
Join the 👥 [Discord chat server](https://discord.gg/VQjSZaeJmf) 👥 and hang out with others in the FastAPI community.
|
||||
|
||||
/// tip
|
||||
|
||||
For questions, ask them in GitHub Discussions, there's a much better chance you will receive help.
|
||||
For questions, ask them in [GitHub Discussions](https://github.com/fastapi/fastapi/discussions/new?category=questions), there's a much better chance you will receive help by the [FastAPI Experts](fastapi-people.md#fastapi-experts).
|
||||
|
||||
Use the chat only for other general conversations.
|
||||
|
||||
///
|
||||
|
||||
### Don't use the Chat for Questions { #dont-use-the-chat-for-questions }
|
||||
### Don't use the chat for questions { #dont-use-the-chat-for-questions }
|
||||
|
||||
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.
|
||||
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. 😅
|
||||
|
||||
Conversations in the chat systems are also not as easily searchable as in GitHub, they get lost.
|
||||
Conversations in the chat systems are also not as easily searchable as in GitHub, so questions and answers might get lost in the conversation. And only the ones in GitHub count to become a [FastAPI Expert](fastapi-people.md#fastapi-experts), so you will most probably receive more attention in GitHub.
|
||||
|
||||
On the other side, there are thousands of users in the chat systems, so there's a high chance you'll find someone to talk to there, almost all the time. 😄
|
||||
|
||||
## Sponsor the author { #sponsor-the-author }
|
||||
|
||||
If your **product/company** depends on or is related to **FastAPI** and you want to reach its users, you can sponsor the author (me) through [GitHub sponsors](https://github.com/sponsors/tiangolo). Depending on the tier, you could get some extra benefits, like a badge in the docs. 🎁
|
||||
|
||||
---
|
||||
|
||||
Thanks! 🚀
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 1.7 KiB |
@@ -1,8 +1,3 @@
|
||||
---
|
||||
include_yaml:
|
||||
sponsors: data/sponsors.yml
|
||||
---
|
||||
|
||||
# FastAPI { #fastapi }
|
||||
|
||||
<style>
|
||||
|
||||
165
docs/en/docs/management-tasks.md
Normal file
165
docs/en/docs/management-tasks.md
Normal file
@@ -0,0 +1,165 @@
|
||||
# Repository Management Tasks
|
||||
|
||||
These are the tasks that can be performed to manage the FastAPI repository by [team members](./fastapi-people.md#team).
|
||||
|
||||
/// tip
|
||||
|
||||
This section is useful only to a handful of people, team members with permissions to manage the repository. You can probably skip it. 😉
|
||||
|
||||
///
|
||||
|
||||
...so, you are a [team member of FastAPI](./fastapi-people.md#team)? Wow, you are so cool! 😎
|
||||
|
||||
You can help with everything on [Help FastAPI - Get Help](./help-fastapi.md) the same ways as external contributors. But additionally, there are some tasks that only you (as part of the team) can perform.
|
||||
|
||||
Here are the general instructions for the tasks you can perform.
|
||||
|
||||
Thanks a lot for your help. 🙇
|
||||
|
||||
## Be Nice
|
||||
|
||||
First of all, be nice. 😊
|
||||
|
||||
You probably are super nice if you were added to the team, but it's worth mentioning it. 🤓
|
||||
|
||||
### When Things are Difficult
|
||||
|
||||
When things are great, everything is easier, so that doesn't need much instructions. But when things are difficult, here are some guidelines.
|
||||
|
||||
Try to find the good side. In general, if people are not being unfriendly, try to thank their effort and interest, even if you disagree with the main subject (discussion, PR), just thank them for being interested in the project, or for having dedicated some time to try to do something.
|
||||
|
||||
It's difficult to convey emotion in text, use emojis to help. 😅
|
||||
|
||||
In discussions and PRs, in many cases, people bring their frustration and show it without filter, in many cases exaggerating, complaining, being entitled, etc. That's really not nice, and when it happens, it lowers our priority to solve their problems. But still, try to breath, and be gentle with your answers.
|
||||
|
||||
Try to avoid using bitter sarcasm or potentially passive-aggressive comments. If something is wrong, it's better to be direct (try to be gentle) than sarcastic.
|
||||
|
||||
Try to be as specific and objective as possible, avoid generalizations.
|
||||
|
||||
For conversations that are more difficult, for example to reject a PR, you can ask me (@tiangolo) to handle it directly.
|
||||
|
||||
## Edit PR Titles
|
||||
|
||||
* Edit the PR title to start with an emoji from [gitmoji](https://gitmoji.dev/).
|
||||
* Use the emoji character, not the GitHub code. So, use `🐛` instead of `:bug:`. This is so that it shows up correctly outside of GitHub, for example in the release notes.
|
||||
* For translations use the `🌐` emoji ("globe with meridians").
|
||||
* Start the title with a verb. For example `Add`, `Refactor`, `Fix`, etc. This way the title will say the action that the PR does. Like `Add support for teleporting`, instead of `Teleporting wasn't working, so this PR fixes it`.
|
||||
* Edit the text of the PR title to start in "imperative", like giving an order. So, instead of `Adding support for teleporting` use `Add support for teleporting`.
|
||||
* Try to make the title descriptive about what it achieves. If it's a feature, try to describe it, for example `Add support for teleporting` instead of `Create TeleportAdapter class`.
|
||||
* Do not finish the title with a period (`.`).
|
||||
* When the PR is for a translation, start with the `🌐` and then `Add {language} translation for` and then the translated file path. For example:
|
||||
|
||||
```Markdown
|
||||
🌐 Add Spanish translation for `docs/es/docs/teleporting.md`
|
||||
```
|
||||
|
||||
Once the PR is merged, a GitHub Action ([latest-changes](https://github.com/tiangolo/latest-changes)) will use the PR title to update the latest changes automatically.
|
||||
|
||||
So, having a nice PR title will not only look nice in GitHub, but also in the release notes. 📝
|
||||
|
||||
## Add Labels to PRs
|
||||
|
||||
The same GitHub Action [latest-changes](https://github.com/tiangolo/latest-changes) uses one label in the PR to decide the section in the release notes to put this PR in.
|
||||
|
||||
Make sure you use a supported label from the [latest-changes list of labels](https://github.com/tiangolo/latest-changes#using-labels):
|
||||
|
||||
* `breaking`: Breaking Changes
|
||||
* Existing code will break if they update the version without changing their code. This rarely happens, so this label is not frequently used.
|
||||
* `security`: Security Fixes
|
||||
* This is for security fixes, like vulnerabilities. It would almost never be used.
|
||||
* `feature`: Features
|
||||
* New features, adding support for things that didn't exist before.
|
||||
* `bug`: Fixes
|
||||
* Something that was supported didn't work, and this fixes it. There are many PRs that claim to be bug fixes because the user is doing something in an unexpected way that is not supported, but they considered it what should be supported by default. Many of these are actually features or refactors. But in some cases there's an actual bug.
|
||||
* `refactor`: Refactors
|
||||
* This is normally for changes to the internal code that don't change the behavior. Normally it improves maintainability, or enables future features, etc.
|
||||
* `upgrade`: Upgrades
|
||||
* This is for upgrades to direct dependencies from the project, or extra optional dependencies, normally in `pyproject.toml`. So, things that would affect final users, they would end up receiving the upgrade in their code base once they update. But this is not for upgrades to internal dependencies used for development, testing, docs, etc. Those internal dependencies or GitHub Action versions should be marked as `internal`, not `upgrade`.
|
||||
* `docs`: Docs
|
||||
* Changes in docs. This includes updating the docs, fixing typos. But it doesn't include changes to translations.
|
||||
* You can normally quickly detect it by going to the "Files changed" tab in the PR and checking if the updated file(s) starts with `docs/en/docs`. The original version of the docs is always in English, so in `docs/en/docs`.
|
||||
* `lang-all`: Translations
|
||||
* Use this for translations. You can normally quickly detect it by going to the "Files changed" tab in the PR and checking if the updated file(s) starts with `docs/{some lang}/docs` but not `docs/en/docs`. For example, `docs/es/docs`.
|
||||
* `internal`: Internal
|
||||
* Use this for changes that only affect how the repo is managed. For example upgrades to internal dependencies, changes in GitHub Actions or scripts, etc.
|
||||
|
||||
/// tip
|
||||
|
||||
Some tools like Dependabot, will add some labels, like `dependencies`, but have in mind that this label is not used by the `latest-changes` GitHub Action, so it won't be used in the release notes. Please make sure one of the labels above is added.
|
||||
|
||||
///
|
||||
|
||||
## Add Labels to Translation PRs
|
||||
|
||||
When there's a PR for a translation, apart from adding the `lang-all` label, also add a label for the language.
|
||||
|
||||
There will be a label for each language using the language code, like `lang-{lang code}`, for example, `lang-es` for Spanish, `lang-fr` for French, etc.
|
||||
|
||||
* Add the specific language label.
|
||||
* Add the label `awaiting-review`.
|
||||
|
||||
The label `awaiting-review` is special, only used for translations. A GitHub Action will detect it, then it will read the language label, and it will update the GitHub Discussions managing the translations for that language to notify people that there's a new translation to review.
|
||||
|
||||
Once a native speaker comes, reviews the PR, and approves it, the GitHub Action will come and remove the `awaiting-review` label, and add the `approved-1` label.
|
||||
|
||||
This way, we can notice when there are new translations ready, because they have the `approved-1` label.
|
||||
|
||||
## Merge Translation PRs
|
||||
|
||||
Translations are generated automatically with LLMs and scripts.
|
||||
|
||||
There's one GitHub Action that can be manually run to add or update translations for a language: [`translate.yml`](https://github.com/fastapi/fastapi/actions/workflows/translate.yml).
|
||||
|
||||
For these language translation PRs, confirm that:
|
||||
|
||||
* The PR was automated (authored by @tiangolo), not made by another user.
|
||||
* It has the labels `lang-all` and `lang-{lang code}`.
|
||||
|
||||
For PRs that update language-specific LLM prompts, confirm that:
|
||||
|
||||
* The PR has the labels `lang-all` and `lang-{lang code}`.
|
||||
* It is approved by at least one native speaker.
|
||||
* In some cases you might need to translate several pages with new prompt to make sure it works as expected.
|
||||
|
||||
If the PR meets the above conditions, you can merge it. 😎
|
||||
|
||||
## Review PRs
|
||||
|
||||
* If a PR doesn't explain what it does or why, if it seems like it could be useful, ask for more information. Otherwise, feel free to close it.
|
||||
|
||||
* If a PR seems to be spam, meaningless, only to change statistics (to appear as "contributor") or similar, you can simply mark it as `invalid`, and it will be automatically closed.
|
||||
|
||||
* If a PR seems to be AI generated, and seems like reviewing it would take more time from you than the time it took to write the prompt, mark it as `maybe-ai`, and it will be automatically closed.
|
||||
|
||||
* A PR should have a specific use case that it is solving.
|
||||
|
||||
* If the PR is for a feature, it should have docs.
|
||||
* Unless it's a feature we want to discourage, like support for a corner case that we don't want users to use.
|
||||
* The docs should include a source example file, not write Python directly in Markdown.
|
||||
* If the source example(s) file can have different syntax for different Python versions, there should be different versions of the file, and they should be shown in tabs in the docs.
|
||||
* There should be tests testing the source example.
|
||||
* Before the PR is applied, the new tests should fail.
|
||||
* After applying the PR, the new tests should pass.
|
||||
* Coverage should stay at 100%.
|
||||
* If you see the PR makes sense, or we discussed it and considered it should be accepted, you can add commits on top of the PR to tweak it, to add docs, tests, format, refactor, remove extra files, etc.
|
||||
* Feel free to comment in the PR to ask for more information, to suggest changes, etc.
|
||||
* Once you think the PR is ready, move it in the internal GitHub project for me to review it.
|
||||
|
||||
## FastAPI People PRs
|
||||
|
||||
Every month, a GitHub Action updates the FastAPI People data. Those PRs look like this one: [👥 Update FastAPI People](https://github.com/fastapi/fastapi/pull/11669).
|
||||
|
||||
If the tests are passing, you can merge it right away.
|
||||
|
||||
## Dependabot PRs
|
||||
|
||||
Dependabot will create PRs to update dependencies for several things, and those PRs all look similar, but some are way more delicate than others.
|
||||
|
||||
* If the PR is for a direct dependency, so, Dependabot is modifying `pyproject.toml` in the main dependencies, **don't merge it**. 😱 Let me check it first. There's a good chance that some additional tweaks or updates are needed.
|
||||
* If the PR updates one of the internal dependencies, for example the group `dev` in `pyproject.toml`, or GitHub Action versions, if the tests are passing, the release notes (shown in a summary in the PR) don't show any obvious potential breaking change, you can merge it. 😎
|
||||
|
||||
## Mark GitHub Discussions Answers
|
||||
|
||||
When a question in GitHub Discussions has been answered, mark the answer by clicking "Mark as answer".
|
||||
|
||||
You can filter discussions by [`Questions` that are `Unanswered`](https://github.com/tiangolo/fastapi/discussions/categories/questions?discussions_q=category:Questions+is:open+is:unanswered).
|
||||
@@ -12,7 +12,19 @@ I normally give the final review to each PR before merging them. I make the fina
|
||||
|
||||
There's a team of people that help manage and maintain the project. 😎
|
||||
|
||||
Learn more about it in [tiangolo.com - GitHub FastAPI](https://tiangolo.com/github-fastapi/).
|
||||
They have different levels of permissions and [specific instructions](./management-tasks.md).
|
||||
|
||||
Some of the tasks they can perform include:
|
||||
|
||||
* Adding labels to PRs.
|
||||
* Editing PR titles.
|
||||
* Adding commits on top of PRs to tweak them.
|
||||
* Mark answers in GitHub Discussions questions, etc.
|
||||
* Merge some specific types of PRs.
|
||||
|
||||
You can see the current team members in [FastAPI People - Team](./fastapi-people.md#team).
|
||||
|
||||
Joining the team is by invitation only, and I could update or remove permissions, instructions, or membership.
|
||||
|
||||
## FastAPI Experts
|
||||
|
||||
@@ -20,6 +32,8 @@ The people that help others the most in GitHub Discussions can become [**FastAPI
|
||||
|
||||
This is normally the best way to contribute to the project.
|
||||
|
||||
## External Help
|
||||
## External Contributions
|
||||
|
||||
External help is very much appreciated. There are many ways to [help](./help-fastapi.md). ☕️
|
||||
External contributions are very welcome and appreciated, including answering questions, submitting PRs, etc. 🙇♂️
|
||||
|
||||
There are many ways to [help maintain FastAPI](./help-fastapi.md#help-maintain-fastapi).
|
||||
|
||||
@@ -9,67 +9,6 @@ hide:
|
||||
|
||||
### Docs
|
||||
|
||||
* ✏️ Use `Annotated` in inline example in `docs/en/docs/tutorial/body-multiple-params.md`. PR [#15591](https://github.com/fastapi/fastapi/pull/15591) by [@TheArchons](https://github.com/TheArchons).
|
||||
* 📝 Remove "NGINX Unit" from the list of ASGI-servers in docs. PR [#15475](https://github.com/fastapi/fastapi/pull/15475) by [@angryfoxx](https://github.com/angryfoxx).
|
||||
* 📝 Update `docs/en/docs/tutorial/security/oauth2-jwt.md`. PR [#14781](https://github.com/fastapi/fastapi/pull/14781) by [@zadevhub](https://github.com/zadevhub).
|
||||
|
||||
### Translations
|
||||
|
||||
* 🌐 Update translations for zh-hant (update-outdated). PR [#15671](https://github.com/fastapi/fastapi/pull/15671) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 🌐 Update translations for es (update-outdated). PR [#15670](https://github.com/fastapi/fastapi/pull/15670) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 🌐 Update translations for fr (update-outdated). PR [#15669](https://github.com/fastapi/fastapi/pull/15669) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 🌐 Update translations for ja (update-outdated). PR [#15668](https://github.com/fastapi/fastapi/pull/15668) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 🌐 Update translations for pt (update-outdated). PR [#15667](https://github.com/fastapi/fastapi/pull/15667) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 🌐 Update translations for tr (update-outdated). PR [#15666](https://github.com/fastapi/fastapi/pull/15666) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 🌐 Update translations for zh (update-outdated). PR [#15665](https://github.com/fastapi/fastapi/pull/15665) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 🌐 Update translations for ko (update-outdated). PR [#15664](https://github.com/fastapi/fastapi/pull/15664) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 🌐 Update translations for de (update-outdated). PR [#15673](https://github.com/fastapi/fastapi/pull/15673) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 🌐 Update translations for uk (update-outdated). PR [#15672](https://github.com/fastapi/fastapi/pull/15672) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 🌐 Update translations for ru (update-outdated). PR [#15674](https://github.com/fastapi/fastapi/pull/15674) by [@tiangolo](https://github.com/tiangolo).
|
||||
|
||||
### Internal
|
||||
|
||||
* 🔧 Update sponsors, add Rapidproxy. PR [#15689](https://github.com/fastapi/fastapi/pull/15689) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 🔧 Update sponsors: Remove TestMu. PR [#15688](https://github.com/fastapi/fastapi/pull/15688) by [@tiangolo](https://github.com/tiangolo).
|
||||
* ⬆ Bump the python-packages group across 1 directory with 11 updates. PR [#15683](https://github.com/fastapi/fastapi/pull/15683) by [@dependabot[bot]](https://github.com/apps/dependabot).
|
||||
* ⬆ Bump aiohttp from 3.13.4 to 3.14.0. PR [#15681](https://github.com/fastapi/fastapi/pull/15681) by [@dependabot[bot]](https://github.com/apps/dependabot).
|
||||
* ⬆ Bump the github-actions group with 2 updates. PR [#15682](https://github.com/fastapi/fastapi/pull/15682) by [@dependabot[bot]](https://github.com/apps/dependabot).
|
||||
* ⬆ Bump starlette from 1.0.0 to 1.1.0. PR [#15684](https://github.com/fastapi/fastapi/pull/15684) by [@dependabot[bot]](https://github.com/apps/dependabot).
|
||||
* 👥 Update FastAPI People - Experts. PR [#15677](https://github.com/fastapi/fastapi/pull/15677) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 👥 Update FastAPI GitHub topic repositories. PR [#15675](https://github.com/fastapi/fastapi/pull/15675) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 👥 Update FastAPI People - Contributors and Translators. PR [#15662](https://github.com/fastapi/fastapi/pull/15662) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 👷 Automate release preparation. PR [#15661](https://github.com/fastapi/fastapi/pull/15661) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 🔥 Remove slim package stub, deprecated for a while. PR [#15649](https://github.com/fastapi/fastapi/pull/15649) by [@tiangolo](https://github.com/tiangolo).
|
||||
* ⬆ Bump authlib from 1.6.11 to 1.7.2. PR [#15512](https://github.com/fastapi/fastapi/pull/15512) by [@dependabot[bot]](https://github.com/apps/dependabot).
|
||||
* ⬆ Bump pymdown-extensions from 10.21.2 to 10.21.3. PR [#15569](https://github.com/fastapi/fastapi/pull/15569) by [@dependabot[bot]](https://github.com/apps/dependabot).
|
||||
* ⬆ Bump CodSpeedHQ/action from 4.14.0 to 4.15.1. PR [#15513](https://github.com/fastapi/fastapi/pull/15513) by [@dependabot[bot]](https://github.com/apps/dependabot).
|
||||
* ⬆ Bump python-multipart from 0.0.26 to 0.0.29. PR [#15595](https://github.com/fastapi/fastapi/pull/15595) by [@dependabot[bot]](https://github.com/apps/dependabot).
|
||||
* 🔒️ Improve GitHub actions security. PR [#15607](https://github.com/fastapi/fastapi/pull/15607) by [@YuriiMotov](https://github.com/YuriiMotov).
|
||||
* ⚰️ Remove ruff and coverage ignores for non-existing files. PR [#15610](https://github.com/fastapi/fastapi/pull/15610) by [@YuriiMotov](https://github.com/YuriiMotov).
|
||||
* ✅ Use custom `changing_dir` instead of `CLIRunner.isolated_filesystem` to set working dir. PR [#15616](https://github.com/fastapi/fastapi/pull/15616) by [@YuriiMotov](https://github.com/YuriiMotov).
|
||||
* ✅ Add `httpx2` test dependency to avoid deprecation warning. PR [#15603](https://github.com/fastapi/fastapi/pull/15603) by [@YuriiMotov](https://github.com/YuriiMotov).
|
||||
* ⬆ Bump the python-packages group with 15 updates. PR [#15594](https://github.com/fastapi/fastapi/pull/15594) by [@dependabot[bot]](https://github.com/apps/dependabot).
|
||||
* 👷 Configure Dependabot to group updates and update weekly. PR [#15560](https://github.com/fastapi/fastapi/pull/15560) by [@YuriiMotov](https://github.com/YuriiMotov).
|
||||
|
||||
## 0.136.3 (2026-05-23)
|
||||
|
||||
### Refactors
|
||||
|
||||
* ♻️ Do not accept underscore headers when using `convert_underscores=True` (the default). PR [#15589](https://github.com/fastapi/fastapi/pull/15589) by [@tiangolo](https://github.com/tiangolo).
|
||||
|
||||
## 0.136.2 (2026-05-23)
|
||||
|
||||
### Refactors
|
||||
|
||||
* ♻️ Validate Server Sent Event fields to avoid applications from sending broken data. PR [#15588](https://github.com/fastapi/fastapi/pull/15588) by [@tiangolo](https://github.com/tiangolo).
|
||||
|
||||
### Docs
|
||||
|
||||
* 📝 Document `--entrypoint` CLI option. PR [#15464](https://github.com/fastapi/fastapi/pull/15464) by [@YuriiMotov](https://github.com/YuriiMotov).
|
||||
* 📝 Update and simplify docs about help and management. PR [#15583](https://github.com/fastapi/fastapi/pull/15583) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 📝 Add docs references to central contributing docs. PR [#15580](https://github.com/fastapi/fastapi/pull/15580) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 📝 Update security policy. PR [#15577](https://github.com/fastapi/fastapi/pull/15577) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 🍱 Update sponsors: TalorData image. PR [#15562](https://github.com/fastapi/fastapi/pull/15562) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 📝 Update docs, simplify usage of admonitions, only default ones. PR [#15553](https://github.com/fastapi/fastapi/pull/15553) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 📝 Fix image URLs in `index.md`. PR [#15534](https://github.com/fastapi/fastapi/pull/15534) by [@YuriiMotov](https://github.com/YuriiMotov).
|
||||
* ✏️ Fix Azkaban spelling typo in `virtual-environments.md`. PR [#15463](https://github.com/fastapi/fastapi/pull/15463) by [@isaacbernat](https://github.com/isaacbernat).
|
||||
@@ -79,7 +18,6 @@ hide:
|
||||
|
||||
### Translations
|
||||
|
||||
* 🌐 Improve translation consistency in `docs/pt/docs/advanced/generate-clients.md`. PR [#15456](https://github.com/fastapi/fastapi/pull/15456) by [@Will-thom](https://github.com/Will-thom).
|
||||
* 🌐 Update translations for ja (update-outdated). PR [#15530](https://github.com/fastapi/fastapi/pull/15530) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 🌐 Update translations for uk (update-outdated). PR [#15529](https://github.com/fastapi/fastapi/pull/15529) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 🌐 Update translations for pt (update-outdated). PR [#15528](https://github.com/fastapi/fastapi/pull/15528) by [@tiangolo](https://github.com/tiangolo).
|
||||
@@ -95,13 +33,6 @@ hide:
|
||||
|
||||
### Internal
|
||||
|
||||
* ✅ Update tests, don't double dispose the engine. PR [#15587](https://github.com/fastapi/fastapi/pull/15587) by [@tiangolo](https://github.com/tiangolo).
|
||||
* ⚡️ Speed up test suite via caching and fixture scopes to make it ~24% faster. PR [#13583](https://github.com/fastapi/fastapi/pull/13583) by [@dikos1337](https://github.com/dikos1337).
|
||||
* 🔥 Remove config files now in central GitHub repo. PR [#15585](https://github.com/fastapi/fastapi/pull/15585) by [@tiangolo](https://github.com/tiangolo).
|
||||
* ⬆ Bump urllib3 from 2.6.3 to 2.7.0. PR [#15502](https://github.com/fastapi/fastapi/pull/15502) by [@dependabot[bot]](https://github.com/apps/dependabot).
|
||||
* ⬆ Bump idna from 3.11 to 3.15. PR [#15565](https://github.com/fastapi/fastapi/pull/15565) by [@dependabot[bot]](https://github.com/apps/dependabot).
|
||||
* ⬆ Bump cloudflare/wrangler-action from 3.15.0 to 4.0.0. PR [#15571](https://github.com/fastapi/fastapi/pull/15571) by [@dependabot[bot]](https://github.com/apps/dependabot).
|
||||
* 🔧 Migrate docs from MkDocs to Zensical. PR [#15563](https://github.com/fastapi/fastapi/pull/15563) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 🔒️ Only allow team members to modify dependencies. PR [#15548](https://github.com/fastapi/fastapi/pull/15548) by [@svlandeg](https://github.com/svlandeg).
|
||||
* ⬆ Bump actions/add-to-project from 1.0.2 to 2.0.0. PR [#15490](https://github.com/fastapi/fastapi/pull/15490) by [@dependabot[bot]](https://github.com/apps/dependabot).
|
||||
* ⬆ Bump actions/labeler from 6.0.1 to 6.1.0. PR [#15507](https://github.com/fastapi/fastapi/pull/15507) by [@dependabot[bot]](https://github.com/apps/dependabot).
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
# Translations
|
||||
|
||||
Translation pull requests are made by LLMs guided with prompts designed by the FastAPI team together with the community of native speakers for each supported language.
|
||||
|
||||
## LLM Prompt per Language
|
||||
|
||||
Each language has a directory: [https://github.com/fastapi/fastapi/tree/master/docs](https://github.com/fastapi/fastapi/tree/master/docs), in it you can see a file `llm-prompt.md` with the prompt specific for that language.
|
||||
|
||||
For example, for Spanish, the prompt is at: [`docs/es/llm-prompt.md`](https://github.com/fastapi/fastapi/blob/master/docs/es/llm-prompt.md).
|
||||
|
||||
If you see mistakes in your language, you can make suggestions to the prompt in that file for your language, and request the specific pages you would like to re-generate after the changes.
|
||||
|
||||
PRs with suggestions to the language-specific LLM prompt require approval from at least one native speaker. Your help here is very much appreciated!
|
||||
|
||||
## Request a New Language
|
||||
|
||||
Let's say that you want to request translations for a language that is not yet translated, not even some pages. For example, Latin.
|
||||
|
||||
* The first step would be for you to find other 2 people that would be willing to be reviewing translation PRs for that language with you.
|
||||
* Once there are at least 3 people that would be willing to commit to help maintain that language, you can continue the next steps.
|
||||
* Create a new discussion following the template.
|
||||
* Tag the other 2 people that will help with the language, and ask them to confirm there they will help.
|
||||
|
||||
Once there are several people in the discussion, the FastAPI team can evaluate it and can make it an official translation.
|
||||
|
||||
Then the docs will be automatically translated using LLMs, and the team of native speakers can review the translation, and help tweak the LLM prompts.
|
||||
|
||||
Once there's a new translation, for example if docs are updated or there's a new section, there will be a comment in the same discussion with the link to the new translation to review.
|
||||
@@ -126,7 +126,7 @@ By default, **FastAPI** will then expect its body directly.
|
||||
But if you want it to expect a JSON with a key `item` and inside of it the model contents, as it does when you declare extra body parameters, you can use the special `Body` parameter `embed`:
|
||||
|
||||
```Python
|
||||
item: Annotated[Item, Body(embed=True)]
|
||||
item: Item = Body(embed=True)
|
||||
```
|
||||
|
||||
as in:
|
||||
|
||||
@@ -180,7 +180,7 @@ which would be equivalent to:
|
||||
from backend.main import app
|
||||
```
|
||||
|
||||
### `fastapi dev` with path or with `--entrypoint` CLI option { #fastapi-dev-with-path-or-with-entrypoint-cli-option }
|
||||
### `fastapi dev` with path { #fastapi-dev-with-path }
|
||||
|
||||
You can also pass the file path to the `fastapi dev` command, and it will guess the FastAPI app object to use:
|
||||
|
||||
@@ -188,13 +188,7 @@ You can also pass the file path to the `fastapi dev` command, and it will guess
|
||||
$ fastapi dev main.py
|
||||
```
|
||||
|
||||
Or, you can also pass the `--entrypoint` option to the `fastapi dev` command:
|
||||
|
||||
```console
|
||||
$ fastapi dev --entrypoint main:app
|
||||
```
|
||||
|
||||
But you would have to remember to pass the correct path\entrypoint every time you call the `fastapi` command.
|
||||
But you would have to remember to pass the correct path every time you call the `fastapi` command.
|
||||
|
||||
Additionally, other tools might not be able to find it, for example the [VS Code Extension](../editor-support.md) or [FastAPI Cloud](https://fastapicloud.com), so it is recommended to use the `entrypoint` in `pyproject.toml`.
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4
|
||||
|
||||
It is not encrypted, so, anyone could recover the information from the contents.
|
||||
|
||||
But it's signed. So, when you receive a token that you issued, you can verify that it was you who issued it.
|
||||
But it's signed. So, when you receive a token that you emitted, you can verify that you actually emitted it.
|
||||
|
||||
That way, you can create a token with an expiration of, let's say, 1 week. And then when the user comes back the next day with the token, you know that user is still logged in to your system.
|
||||
|
||||
|
||||
5
docs/en/mkdocs.env.yml
Normal file
5
docs/en/mkdocs.env.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
# Define this here and not in the main mkdocs.yml file because that one is auto
|
||||
# updated and written, and the script would remove the env var
|
||||
markdown_extensions:
|
||||
pymdownx.highlight:
|
||||
linenums: !ENV [LINENUMS, false]
|
||||
@@ -1,10 +1,10 @@
|
||||
INHERIT: ../en/mkdocs.env.yml
|
||||
site_name: FastAPI
|
||||
site_description: FastAPI framework, high performance, easy to learn, fast to code, ready for production
|
||||
site_url: https://fastapi.tiangolo.com/
|
||||
theme:
|
||||
variant: classic
|
||||
name: material
|
||||
custom_dir: overrides
|
||||
custom_dir: ../en/overrides
|
||||
palette:
|
||||
- media: (prefers-color-scheme)
|
||||
toggle:
|
||||
@@ -45,13 +45,38 @@ theme:
|
||||
- search.suggest
|
||||
- toc.follow
|
||||
icon:
|
||||
repo: octicons/mark-github-24
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: img/icon-white.svg
|
||||
favicon: img/favicon.png
|
||||
language: en
|
||||
repo_name: fastapi/fastapi
|
||||
repo_url: https://github.com/fastapi/fastapi
|
||||
plugins:
|
||||
social:
|
||||
cards_layout_options:
|
||||
logo: ../en/docs/img/icon-white.svg
|
||||
typeset: null
|
||||
search: null
|
||||
macros:
|
||||
include_yaml:
|
||||
- github_sponsors: ../en/data/github_sponsors.yml
|
||||
- people: ../en/data/people.yml
|
||||
- contributors: ../en/data/contributors.yml
|
||||
- translators: ../en/data/translators.yml
|
||||
- translation_reviewers: ../en/data/translation_reviewers.yml
|
||||
- skip_users: ../en/data/skip_users.yml
|
||||
- members: ../en/data/members.yml
|
||||
- sponsors_badge: ../en/data/sponsors_badge.yml
|
||||
- sponsors: ../en/data/sponsors.yml
|
||||
- topic_repos: ../en/data/topic_repos.yml
|
||||
redirects:
|
||||
redirect_maps:
|
||||
deployment/deta.md: deployment/cloud.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
|
||||
advanced/testing-database.md: how-to/testing-database.md
|
||||
mkdocstrings:
|
||||
handlers:
|
||||
python:
|
||||
@@ -77,13 +102,13 @@ plugins:
|
||||
nav:
|
||||
- FastAPI: index.md
|
||||
- features.md
|
||||
- "":
|
||||
- Learn:
|
||||
- learn/index.md
|
||||
- python-types.md
|
||||
- async.md
|
||||
- environment-variables.md
|
||||
- virtual-environments.md
|
||||
- "":
|
||||
- Tutorial - User Guide:
|
||||
- tutorial/index.md
|
||||
- tutorial/first-steps.md
|
||||
- tutorial/path-params.md
|
||||
@@ -112,14 +137,14 @@ nav:
|
||||
- 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
|
||||
@@ -136,7 +161,7 @@ nav:
|
||||
- tutorial/static-files.md
|
||||
- tutorial/testing.md
|
||||
- tutorial/debugging.md
|
||||
- "":
|
||||
- Advanced User Guide:
|
||||
- advanced/index.md
|
||||
- advanced/stream-data.md
|
||||
- advanced/path-operation-advanced-configuration.md
|
||||
@@ -148,7 +173,7 @@ nav:
|
||||
- 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
|
||||
@@ -174,7 +199,7 @@ nav:
|
||||
- advanced/strict-content-type.md
|
||||
- fastapi-cli.md
|
||||
- editor-support.md
|
||||
- "":
|
||||
- Deployment:
|
||||
- deployment/index.md
|
||||
- deployment/versions.md
|
||||
- deployment/fastapicloud.md
|
||||
@@ -184,7 +209,7 @@ nav:
|
||||
- deployment/cloud.md
|
||||
- deployment/server-workers.md
|
||||
- deployment/docker.md
|
||||
- "":
|
||||
- How To - Recipes:
|
||||
- how-to/index.md
|
||||
- how-to/general.md
|
||||
- how-to/migrate-from-pydantic-v1-to-pydantic-v2.md
|
||||
@@ -197,7 +222,7 @@ nav:
|
||||
- how-to/configure-swagger-ui.md
|
||||
- how-to/testing-database.md
|
||||
- how-to/authentication-error-status-code.md
|
||||
- "":
|
||||
- Reference (Code API):
|
||||
- reference/index.md
|
||||
- reference/fastapi.md
|
||||
- reference/parameters.md
|
||||
@@ -213,7 +238,7 @@ nav:
|
||||
- reference/response.md
|
||||
- reference/responses.md
|
||||
- reference/middleware.md
|
||||
- "":
|
||||
- OpenAPI:
|
||||
- reference/openapi/index.md
|
||||
- reference/openapi/docs.md
|
||||
- reference/openapi/models.md
|
||||
@@ -223,15 +248,15 @@ nav:
|
||||
- reference/templating.md
|
||||
- reference/testclient.md
|
||||
- fastapi-people.md
|
||||
- "":
|
||||
- Resources:
|
||||
- resources/index.md
|
||||
- help-fastapi.md
|
||||
- contributing.md
|
||||
- translations.md
|
||||
- project-generation.md
|
||||
- external-links.md
|
||||
- newsletter.md
|
||||
- "":
|
||||
- management-tasks.md
|
||||
- About:
|
||||
- about/index.md
|
||||
- alternatives.md
|
||||
- history-design-future.md
|
||||
@@ -239,7 +264,10 @@ nav:
|
||||
- management.md
|
||||
- release-notes.md
|
||||
markdown_extensions:
|
||||
zensical.extensions.macros: null
|
||||
material.extensions.preview:
|
||||
targets:
|
||||
include:
|
||||
- '*'
|
||||
abbr: null
|
||||
attr_list: null
|
||||
footnotes: null
|
||||
@@ -284,16 +312,16 @@ markdown_extensions:
|
||||
markdown_include_variants: null
|
||||
extra:
|
||||
social:
|
||||
- icon: octicons/mark-github-24
|
||||
- icon: fontawesome/brands/github-alt
|
||||
link: https://github.com/fastapi/fastapi
|
||||
- icon: fontawesome/brands/discord
|
||||
link: https://discord.gg/VQjSZaeJmf
|
||||
- icon: fontawesome/brands/x-twitter
|
||||
- icon: fontawesome/brands/twitter
|
||||
link: https://x.com/fastapi
|
||||
- icon: fontawesome/brands/bluesky
|
||||
link: https://bsky.app/profile/fastapi.tiangolo.com
|
||||
- icon: fontawesome/brands/linkedin
|
||||
link: https://www.linkedin.com/company/fastapi
|
||||
- icon: fontawesome/solid/globe
|
||||
link: https://tiangolo.com
|
||||
alternate:
|
||||
- link: /
|
||||
name: en - English
|
||||
@@ -303,6 +331,8 @@ extra:
|
||||
name: es - español
|
||||
- link: /fr/
|
||||
name: fr - français
|
||||
- link: /hi/
|
||||
name: hi - हिन्दी
|
||||
- link: /ja/
|
||||
name: ja - 日本語
|
||||
- link: /ko/
|
||||
@@ -326,5 +356,5 @@ extra_javascript:
|
||||
- js/termynal.js
|
||||
- js/custom.js
|
||||
- js/init_kapa_widget.js
|
||||
validation:
|
||||
unresolved_references: false
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
</div>
|
||||
{% if not config.extra.generator == false %}
|
||||
Made with
|
||||
<a href="https://zensical.org" target="_blank" rel="noopener">
|
||||
Zensical
|
||||
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
|
||||
Material for MkDocs
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -124,6 +124,10 @@ Consulta la sección `### Content of code blocks` en el prompt general en `scrip
|
||||
|
||||
//// tab | Prueba
|
||||
|
||||
/// info | Información
|
||||
Algo de texto
|
||||
///
|
||||
|
||||
/// note | Nota
|
||||
Algo de texto
|
||||
///
|
||||
@@ -132,6 +136,10 @@ Algo de texto
|
||||
Algo de texto
|
||||
///
|
||||
|
||||
/// check | Revisa
|
||||
Algo de texto
|
||||
///
|
||||
|
||||
/// tip | Consejo
|
||||
Algo de texto
|
||||
///
|
||||
@@ -464,7 +472,7 @@ Para instrucciones específicas del idioma, mira p. ej. la sección `### Heading
|
||||
* el middleware
|
||||
* la aplicación móvil
|
||||
* el módulo
|
||||
* el mount
|
||||
* el montaje
|
||||
* la red
|
||||
* el origen
|
||||
* el override
|
||||
|
||||
@@ -36,7 +36,7 @@ Django REST Framework fue creado por Tom Christie. El mismo creador de Starlette
|
||||
|
||||
///
|
||||
|
||||
/// tip | Inspiró a **FastAPI** a
|
||||
/// check | Inspiró a **FastAPI** a
|
||||
|
||||
Tener una interfaz de usuario web de documentación automática de APIs.
|
||||
|
||||
@@ -56,7 +56,7 @@ Esta separación de partes, y ser un "microframework" que podría extenderse par
|
||||
|
||||
Dada la simplicidad de Flask, parecía una buena opción para construir APIs. Lo siguiente a encontrar era un "Django REST Framework" para Flask.
|
||||
|
||||
/// tip | Inspiró a **FastAPI** a
|
||||
/// check | Inspiró a **FastAPI** a
|
||||
|
||||
Ser un micro-framework. Haciendo fácil mezclar y combinar las herramientas y partes necesarias.
|
||||
|
||||
@@ -98,7 +98,7 @@ def read_url():
|
||||
|
||||
Mira las similitudes entre `requests.get(...)` y `@app.get(...)`.
|
||||
|
||||
/// tip | Inspiró a **FastAPI** a
|
||||
/// check | Inspiró a **FastAPI** a
|
||||
|
||||
* Tener un API simple e intuitivo.
|
||||
* Usar nombres de métodos HTTP (operaciones) directamente, de una manera sencilla e intuitiva.
|
||||
@@ -118,7 +118,7 @@ En algún punto, Swagger fue entregado a la Linux Foundation, para ser renombrad
|
||||
|
||||
Es por eso que cuando se habla de la versión 2.0 es común decir "Swagger", y para la versión 3+ "OpenAPI".
|
||||
|
||||
/// tip | Inspiró a **FastAPI** a
|
||||
/// check | Inspiró a **FastAPI** a
|
||||
|
||||
Adoptar y usar un estándar abierto para especificaciones de API, en lugar de usar un esquema personalizado.
|
||||
|
||||
@@ -147,7 +147,7 @@ Estas funcionalidades son para lo que fue creado Marshmallow. Es un gran paquete
|
||||
|
||||
Pero fue creado antes de que existieran las anotaciones de tipos en Python. Así que, para definir cada <dfn title="la definición de cómo deberían formarse los datos">esquema</dfn> necesitas usar utilidades y clases específicas proporcionadas por Marshmallow.
|
||||
|
||||
/// tip | Inspiró a **FastAPI** a
|
||||
/// check | Inspiró a **FastAPI** a
|
||||
|
||||
Usar código para definir "esquemas" que proporcionen tipos de datos y validación automáticamente.
|
||||
|
||||
@@ -163,13 +163,13 @@ Usa Marshmallow por debajo para hacer la validación de datos. Y fue creada por
|
||||
|
||||
Es una gran herramienta y la he usado mucho también, antes de tener **FastAPI**.
|
||||
|
||||
/// note | Nota
|
||||
/// info | Información
|
||||
|
||||
Webargs fue creada por los mismos desarrolladores de Marshmallow.
|
||||
|
||||
///
|
||||
|
||||
/// tip | Inspiró a **FastAPI** a
|
||||
/// check | Inspiró a **FastAPI** a
|
||||
|
||||
Tener validación automática de datos entrantes en una request.
|
||||
|
||||
@@ -183,7 +183,7 @@ Pero la documentación todavía falta. Entonces APISpec fue creado.
|
||||
|
||||
Es un plug-in para muchos frameworks (y hay un plug-in para Starlette también).
|
||||
|
||||
La manera en que funciona es que escribes la definición del esquema usando el formato YAML dentro del docstring de cada función que maneja un path.
|
||||
La manera en que funciona es que escribes la definición del esquema usando el formato YAML dentro del docstring de cada función que maneja una ruta.
|
||||
|
||||
Y genera esquemas OpenAPI.
|
||||
|
||||
@@ -193,13 +193,13 @@ Pero luego, tenemos otra vez el problema de tener una micro-sintaxis, dentro de
|
||||
|
||||
El editor no puede ayudar mucho con eso. Y si modificamos parámetros o esquemas de Marshmallow y olvidamos también modificar ese docstring YAML, el esquema generado estaría obsoleto.
|
||||
|
||||
/// note | Nota
|
||||
/// info | Información
|
||||
|
||||
APISpec fue creado por los mismos desarrolladores de Marshmallow.
|
||||
|
||||
///
|
||||
|
||||
/// tip | Inspiró a **FastAPI** a
|
||||
/// check | Inspiró a **FastAPI** a
|
||||
|
||||
Soportar el estándar abierto para APIs, OpenAPI.
|
||||
|
||||
@@ -225,13 +225,13 @@ Usarlo llevó a la creación de varios generadores de full-stack para Flask. Est
|
||||
|
||||
Y estos mismos generadores de full-stack fueron la base de los [Generadores de Proyectos **FastAPI**](project-generation.md).
|
||||
|
||||
/// note | Nota
|
||||
/// info | Información
|
||||
|
||||
Flask-apispec fue creado por los mismos desarrolladores de Marshmallow.
|
||||
|
||||
///
|
||||
|
||||
/// tip | Inspiró a **FastAPI** a
|
||||
/// check | Inspiró a **FastAPI** a
|
||||
|
||||
Generar el esquema OpenAPI automáticamente, desde el mismo código que define la serialización y validación.
|
||||
|
||||
@@ -251,7 +251,7 @@ Pero como los datos de TypeScript no se preservan después de la compilación a
|
||||
|
||||
No puede manejar muy bien modelos anidados. Entonces, si el cuerpo JSON en la request es un objeto JSON que tiene campos internos que a su vez son objetos JSON anidados, no puede ser documentado y validado apropiadamente.
|
||||
|
||||
/// tip | Inspiró a **FastAPI** a
|
||||
/// check | Inspiró a **FastAPI** a
|
||||
|
||||
Usar tipos de Python para tener un gran soporte del editor.
|
||||
|
||||
@@ -271,7 +271,7 @@ Claramente inspiró a Uvicorn y Starlette, que actualmente son más rápidos que
|
||||
|
||||
///
|
||||
|
||||
/// tip | Inspiró a **FastAPI** a
|
||||
/// check | Inspiró a **FastAPI** a
|
||||
|
||||
Encontrar una manera de tener un rendimiento impresionante.
|
||||
|
||||
@@ -287,7 +287,7 @@ Está diseñado para tener funciones que reciben dos parámetros, un "request" y
|
||||
|
||||
Por lo tanto, la validación de datos, la serialización y la documentación, tienen que hacerse en código, no automáticamente. O tienen que implementarse como un framework sobre Falcon, como Hug. Esta misma distinción ocurre en otros frameworks que se inspiran en el diseño de Falcon, de tener un objeto request y un objeto response como parámetros.
|
||||
|
||||
/// tip | Inspiró a **FastAPI** a
|
||||
/// check | Inspiró a **FastAPI** a
|
||||
|
||||
Buscar maneras de obtener un gran rendimiento.
|
||||
|
||||
@@ -311,9 +311,9 @@ Requiere configuraciones un poquito más verbosas. Y dado que se basa en WSGI (e
|
||||
|
||||
El sistema de inyección de dependencias requiere pre-registrar las dependencias y las dependencias se resuelven en base a los tipos declarados. Por lo tanto, no es posible declarar más de un "componente" que proporcione cierto tipo.
|
||||
|
||||
Los paths se declaran en un solo lugar, usando funciones declaradas en otros lugares (en lugar de usar decoradores que pueden colocarse justo encima de la función que maneja el endpoint). Esto se acerca más a cómo lo hace Django que a cómo lo hace Flask (y Starlette). Separa en el código cosas que están relativamente acopladas.
|
||||
Las rutas se declaran en un solo lugar, usando funciones declaradas en otros lugares (en lugar de usar decoradores que pueden colocarse justo encima de la función que maneja el endpoint). Esto se acerca más a cómo lo hace Django que a cómo lo hace Flask (y Starlette). Separa en el código cosas que están relativamente acopladas.
|
||||
|
||||
/// tip | Inspiró a **FastAPI** a
|
||||
/// check | Inspiró a **FastAPI** a
|
||||
|
||||
Definir validaciones extra para tipos de datos usando el valor "default" de los atributos del modelo. Esto mejora el soporte del editor y no estaba disponible en Pydantic antes.
|
||||
|
||||
@@ -335,13 +335,13 @@ Tiene una funcionalidad interesante e inusual: usando el mismo framework, es pos
|
||||
|
||||
Dado que se basa en el estándar previo para frameworks web Python sincrónicos (WSGI), no puede manejar Websockets y otras cosas, aunque aún así tiene un alto rendimiento también.
|
||||
|
||||
/// note | Nota
|
||||
/// info | Información
|
||||
|
||||
Hug fue creado por Timothy Crosley, el mismo creador de [`isort`](https://github.com/timothycrosley/isort), una gran herramienta para ordenar automáticamente imports en archivos Python.
|
||||
|
||||
///
|
||||
|
||||
/// tip | Ideas que inspiraron a **FastAPI**
|
||||
/// check | Ideas que inspiraron a **FastAPI**
|
||||
|
||||
Hug inspiró partes de APIStar, y fue una de las herramientas que encontré más prometedoras, junto a APIStar.
|
||||
|
||||
@@ -375,7 +375,7 @@ Ya no era un framework web API, ya que el creador necesitaba enfocarse en Starle
|
||||
|
||||
Ahora APIStar es un conjunto de herramientas para validar especificaciones OpenAPI, no un framework web.
|
||||
|
||||
/// note | Nota
|
||||
/// info | Información
|
||||
|
||||
APIStar fue creado por Tom Christie. El mismo que creó:
|
||||
|
||||
@@ -385,7 +385,7 @@ APIStar fue creado por Tom Christie. El mismo que creó:
|
||||
|
||||
///
|
||||
|
||||
/// tip | Inspiró a **FastAPI** a
|
||||
/// check | Inspiró a **FastAPI** a
|
||||
|
||||
Existir.
|
||||
|
||||
@@ -409,7 +409,7 @@ Eso lo hace extremadamente intuitivo.
|
||||
|
||||
Es comparable a Marshmallow. Aunque es más rápido que Marshmallow en benchmarks. Y como está basado en las mismas anotaciones de tipos de Python, el soporte del editor es estupendo.
|
||||
|
||||
/// tip | **FastAPI** lo usa para
|
||||
/// check | **FastAPI** lo usa para
|
||||
|
||||
Manejar toda la validación de datos, serialización de datos y documentación automática de modelos (basada en JSON Schema).
|
||||
|
||||
@@ -452,7 +452,7 @@ No obstante, ya está siendo usado como un "estándar" por varias herramientas.
|
||||
|
||||
///
|
||||
|
||||
/// tip | **FastAPI** lo usa para
|
||||
/// check | **FastAPI** lo usa para
|
||||
|
||||
Manejar todas las partes web centrales. Añadiendo funcionalidades encima.
|
||||
|
||||
@@ -470,7 +470,7 @@ No es un framework web, sino un servidor. Por ejemplo, no proporciona herramient
|
||||
|
||||
Es el servidor recomendado para Starlette y **FastAPI**.
|
||||
|
||||
/// tip | **FastAPI** lo recomienda como
|
||||
/// check | **FastAPI** lo recomienda como
|
||||
|
||||
El servidor web principal para ejecutar aplicaciones **FastAPI**.
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ Tú y tu crush comen las hamburguesas y pasan un buen rato. ✨
|
||||
|
||||
<img src="/img/async/concurrent-burgers/concurrent-burgers-07.png" class="illustration">
|
||||
|
||||
/// note | Nota
|
||||
/// info | Información
|
||||
|
||||
Hermosas ilustraciones de [Ketrina Thompson](https://www.instagram.com/ketrinadrawsalot). 🎨
|
||||
|
||||
@@ -205,7 +205,7 @@ Simplemente las comes, y has terminado. ⏹
|
||||
|
||||
No hubo mucho hablar o coquetear ya que la mayor parte del tiempo se dedicó a esperar 🕙 frente al mostrador. 😞
|
||||
|
||||
/// note | Nota
|
||||
/// info | Información
|
||||
|
||||
Hermosas ilustraciones de [Ketrina Thompson](https://www.instagram.com/ketrinadrawsalot). 🎨
|
||||
|
||||
@@ -413,7 +413,7 @@ Si tienes bastante conocimiento técnico (coroutines, hilos, bloqueo, etc.) y ti
|
||||
|
||||
///
|
||||
|
||||
### Path operation functions { #path-operation-functions }
|
||||
### Funciones de *path operation* { #path-operation-functions }
|
||||
|
||||
Cuando declaras una *path operation function* con `def` normal en lugar de `async def`, se ejecuta en un threadpool externo que luego es esperado, en lugar de ser llamado directamente (ya que bloquearía el servidor).
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ lo cual sería equivalente a:
|
||||
from backend.main import app
|
||||
```
|
||||
|
||||
### `fastapi dev` con path o con la opción CLI `--entrypoint` { #fastapi-dev-with-path-or-with-entrypoint-cli-option }
|
||||
### `fastapi dev` con path { #fastapi-dev-with-path }
|
||||
|
||||
También puedes pasar el path del archivo al comando `fastapi dev`, y adivinará el objeto app de FastAPI a usar:
|
||||
|
||||
@@ -103,13 +103,7 @@ También puedes pasar el path del archivo al comando `fastapi dev`, y adivinará
|
||||
$ fastapi dev main.py
|
||||
```
|
||||
|
||||
O también puedes pasar la opción `--entrypoint` al comando `fastapi dev`:
|
||||
|
||||
```console
|
||||
$ fastapi dev --entrypoint main:app
|
||||
```
|
||||
|
||||
Pero tendrías que recordar pasar el path\entrypoint correcto cada vez que llames al comando `fastapi`.
|
||||
Pero tendrías que recordar pasar el path correcto cada vez que llames al comando `fastapi`.
|
||||
|
||||
Adicionalmente, otras herramientas podrían no ser capaces de encontrarla, por ejemplo la [Extensión de VS Code](editor-support.md) o [FastAPI Cloud](https://fastapicloud.com), así que se recomienda usar el `entrypoint` en `pyproject.toml`.
|
||||
|
||||
@@ -121,7 +115,7 @@ Por defecto, **auto-reload** está habilitado, recargando automáticamente el se
|
||||
|
||||
## `fastapi run` { #fastapi-run }
|
||||
|
||||
Ejecutar `fastapi run` inicia FastAPI en modo de producción.
|
||||
Ejecutar `fastapi run` inicia FastAPI en modo de producción por defecto.
|
||||
|
||||
Por defecto, **auto-reload** está deshabilitado. También escucha en la dirección IP `0.0.0.0`, lo que significa todas las direcciones IP disponibles, de esta manera será accesible públicamente por cualquiera que pueda comunicarse con la máquina. Esta es la manera en la que normalmente lo ejecutarías en producción, por ejemplo, en un contenedor.
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ second_user_data = {
|
||||
my_second_user: User = User(**second_user_data)
|
||||
```
|
||||
|
||||
/// note | Nota
|
||||
/// info | Información
|
||||
|
||||
`**second_user_data` significa:
|
||||
|
||||
@@ -179,7 +179,7 @@ Con **FastAPI** obtienes todas las funcionalidades de **Starlette** (ya que Fast
|
||||
|
||||
**FastAPI** es totalmente compatible con (y está basado en) [**Pydantic**](https://docs.pydantic.dev/). Por lo tanto, cualquier código adicional de Pydantic que tengas, también funcionará.
|
||||
|
||||
Incluyendo paquetes externos también basados en Pydantic, como <abbr title="Object-Relational Mapper - Mapeador Objeto-Relacional">ORM</abbr>s, <abbr title="Object-Document Mapper - Mapeador Objeto-Documento">ODM</abbr>s para bases de datos.
|
||||
Incluyendo paquetes externos también basados en Pydantic, como <abbr title="Object-Relational Mapper – Mapeador Objeto-Relacional">ORM</abbr>s, <abbr title="Object-Document Mapper – Mapeador Objeto-Documento">ODM</abbr>s para bases de datos.
|
||||
|
||||
Esto también significa que, en muchos casos, puedes pasar el mismo objeto que obtienes de un request **directamente a la base de datos**, ya que todo se valida automáticamente.
|
||||
|
||||
@@ -190,7 +190,7 @@ Con **FastAPI** obtienes todas las funcionalidades de **Pydantic** (ya que FastA
|
||||
* **Sin complicaciones**:
|
||||
* Sin micro-lenguaje de definición de esquemas nuevo que aprender.
|
||||
* Si conoces los tipos en Python sabes cómo usar Pydantic.
|
||||
* Se lleva bien con tu **<abbr title="Integrated Development Environment - Entorno de Desarrollo Integrado: similar a un editor de código">IDE</abbr>/<dfn title="Un programa que verifica errores de código">linter</dfn>/cerebro**:
|
||||
* Se lleva bien con tu **<abbr title="Integrated Development Environment – Entorno de Desarrollo Integrado: similar a un editor de código">IDE</abbr>/<dfn title="Un programa que verifica errores de código">linter</dfn>/cerebro**:
|
||||
* Porque las estructuras de datos de pydantic son solo instances de clases que defines; autocompletado, linting, mypy y tu intuición deberían funcionar correctamente con tus datos validados.
|
||||
* Valida **estructuras complejas**:
|
||||
* Uso de modelos jerárquicos de Pydantic, `List` y `Dict` de `typing` de Python, etc.
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
# Ayuda { #help }
|
||||
# Ayuda a FastAPI - Consigue Ayuda { #help-fastapi-get-help }
|
||||
|
||||
¿Te gustaría ayudar a FastAPI o conseguir ayuda sobre FastAPI?
|
||||
¿Te gusta **FastAPI**?
|
||||
|
||||
Hay formas muy sencillas de ayudar y de conseguir ayuda.
|
||||
¿Te gustaría ayudar a FastAPI, a otros usuarios y al autor?
|
||||
|
||||
¿O te gustaría conseguir ayuda con **FastAPI**?
|
||||
|
||||
Hay formas muy sencillas de ayudar (varias implican solo uno o dos clics).
|
||||
|
||||
Y también hay varias formas de conseguir ayuda.
|
||||
|
||||
## Suscríbete al boletín { #subscribe-to-the-newsletter }
|
||||
|
||||
@@ -14,13 +20,9 @@ Puedes suscribirte al (esporádico) [boletín **FastAPI and friends**](newslette
|
||||
* Cambios importantes 🚨
|
||||
* Consejos y trucos ✅
|
||||
|
||||
## Sigue a FastAPI en línea { #follow-fastapi-online }
|
||||
## Sigue a FastAPI en X (Twitter) { #follow-fastapi-on-x-twitter }
|
||||
|
||||
Puedes seguir a **FastAPI** en línea en varios lugares:
|
||||
|
||||
* [@fastapi en **X / Twitter**](https://x.com/fastapi)
|
||||
* [@fastapi.tiangolo.com en **Bluesky**](https://bsky.app/profile/fastapi.tiangolo.com)
|
||||
* [FastAPI en **LinkedIn**](https://www.linkedin.com/company/fastapi/)
|
||||
[Sigue a @fastapi en **X (Twitter)**](https://x.com/fastapi) para obtener las últimas noticias sobre **FastAPI**. 🐦
|
||||
|
||||
## Dale una estrella a **FastAPI** en GitHub { #star-fastapi-in-github }
|
||||
|
||||
@@ -36,43 +38,200 @@ Allí puedes seleccionar "Releases only".
|
||||
|
||||
Al hacerlo, recibirás notificaciones (en tu email) cada vez que haya un nuevo lanzamiento (una nueva versión) de **FastAPI** con correcciones de bugs y nuevas funcionalidades.
|
||||
|
||||
## Sigue al autor { #follow-the-author }
|
||||
## Conéctate con el autor { #connect-with-the-author }
|
||||
|
||||
Puedes seguir [a mí (Sebastián Ramírez / `tiangolo`)](https://tiangolo.com), el autor, en algunos lugares, para enterarte cuando tenga noticias para compartir sobre FastAPI y amigos:
|
||||
Puedes conectar [conmigo (Sebastián Ramírez / `tiangolo`)](https://tiangolo.com), el autor.
|
||||
|
||||
* [@tiangolo en **GitHub**](https://github.com/tiangolo).
|
||||
* [@tiangolo en **X (Twitter)**](https://x.com/tiangolo)
|
||||
* [@tiangolo.com en **Bluesky**](https://bsky.app/profile/tiangolo.com)
|
||||
* [@tiangolo en **LinkedIn**](https://www.linkedin.com/in/tiangolo/).
|
||||
Puedes:
|
||||
|
||||
* [Seguirme en **GitHub**](https://github.com/tiangolo).
|
||||
* Ver otros proyectos de Código Abierto que he creado y que podrían ayudarte.
|
||||
* Seguirme para ver cuándo creo un nuevo proyecto de Código Abierto.
|
||||
* [Seguirme en **X (Twitter)**](https://x.com/tiangolo) o [Mastodon](https://fosstodon.org/@tiangolo).
|
||||
* Contarme cómo usas FastAPI (me encanta oír eso).
|
||||
* Enterarte cuando hago anuncios o lanzo nuevas herramientas.
|
||||
* También puedes [seguir @fastapi en X (Twitter)](https://x.com/fastapi) (una cuenta aparte).
|
||||
* [Seguirme en **LinkedIn**](https://www.linkedin.com/in/tiangolo/).
|
||||
* Enterarte cuando hago anuncios o lanzo nuevas herramientas (aunque uso X (Twitter) más a menudo 🤷♂).
|
||||
* Leer lo que escribo (o seguirme) en [**Dev.to**](https://dev.to/tiangolo) o [**Medium**](https://medium.com/@tiangolo).
|
||||
* Leer otras ideas, artículos, y leer sobre las herramientas que he creado.
|
||||
* Seguirme para leer lo que publico nuevo.
|
||||
|
||||
## Twittea sobre **FastAPI** { #tweet-about-fastapi }
|
||||
|
||||
[Twittea sobre **FastAPI**](https://x.com/compose/tweet?text=I'm loving @fastapi because... https://github.com/fastapi/fastapi) y dime a mí y a otros por qué te gusta. 🎉
|
||||
|
||||
Me encanta escuchar cómo se está utilizando **FastAPI**, qué te ha gustado, en qué proyecto/empresa lo estás usando, etc.
|
||||
|
||||
## Vota por FastAPI { #vote-for-fastapi }
|
||||
|
||||
* [Vota por **FastAPI** en Slant](https://www.slant.co/options/34241/~fastapi-review).
|
||||
* [Vota por **FastAPI** en AlternativeTo](https://alternativeto.net/software/fastapi/about/).
|
||||
* [Di que usas **FastAPI** en StackShare](https://stackshare.io/pypi-fastapi).
|
||||
|
||||
## Ayuda a otros con preguntas en GitHub { #help-others-with-questions-in-github }
|
||||
|
||||
Puedes intentar ayudar a otros con sus preguntas en [GitHub Discussions](https://github.com/fastapi/fastapi/discussions/categories/questions?discussions_q=category%3AQuestions+is%3Aunanswered).
|
||||
Puedes intentar ayudar a otros con sus preguntas en:
|
||||
|
||||
En muchos casos, puede que ya conozcas la respuesta a esas preguntas. 🤓
|
||||
* [GitHub Discussions](https://github.com/fastapi/fastapi/discussions/categories/questions?discussions_q=category%3AQuestions+is%3Aunanswered)
|
||||
* [GitHub Issues](https://github.com/fastapi/fastapi/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Aquestion+-label%3Aanswered+)
|
||||
|
||||
En muchos casos, probablemente ya conozcas la respuesta a esas preguntas. 🤓
|
||||
|
||||
Si estás ayudando mucho a la gente con sus preguntas, te convertirás en un [FastAPI Expert](fastapi-people.md#fastapi-experts) oficial. 🎉
|
||||
|
||||
Solo recuerda, el punto más importante es: intenta ser amable. 🤗
|
||||
Solo recuerda, el punto más importante es: trata de ser amable. La gente llega con sus frustraciones y, en muchos casos, no pregunta de la mejor manera, pero haz todo lo posible por ser amable. 🤗
|
||||
|
||||
### Cómo ayudar { #how-to-help }
|
||||
La idea es que la comunidad de **FastAPI** sea amable y acogedora. Al mismo tiempo, no aceptes acoso o comportamiento irrespetuoso hacia los demás. Tenemos que cuidarnos unos a otros.
|
||||
|
||||
Sigue la [guía sobre cómo ayudar](https://tiangolo.com/open-source/help/#help-others-with-questions-in-github) aquí.
|
||||
---
|
||||
|
||||
Aquí te explico cómo ayudar a otros con preguntas (en discusiones o issues):
|
||||
|
||||
### Entiende la pregunta { #understand-the-question }
|
||||
|
||||
* Revisa si puedes entender cuál es el **propósito** y el caso de uso de la persona que pregunta.
|
||||
|
||||
* Luego revisa si la pregunta (la gran mayoría son preguntas) es **clara**.
|
||||
|
||||
* En muchos casos, la pregunta planteada es sobre una solución imaginaria del usuario, pero podría haber una **mejor**. Si puedes entender mejor el problema y el caso de uso, podrías sugerir una mejor **solución alternativa**.
|
||||
|
||||
* Si no puedes entender la pregunta, pide más **detalles**.
|
||||
|
||||
### Reproduce el problema { #reproduce-the-problem }
|
||||
|
||||
En la mayoría de los casos y preguntas hay algo relacionado con el **código original** de la persona.
|
||||
|
||||
En muchos casos solo copiarán un fragmento del código, pero eso no es suficiente para **reproducir el problema**.
|
||||
|
||||
* Puedes pedirles que proporcionen un [ejemplo mínimo, reproducible](https://stackoverflow.com/help/minimal-reproducible-example), que puedas **copiar-pegar** y ejecutar localmente para ver el mismo error o comportamiento que están viendo, o para entender mejor su caso de uso.
|
||||
|
||||
* Si te sientes muy generoso, puedes intentar **crear un ejemplo** así tú mismo, solo basado en la descripción del problema. Solo ten en cuenta que esto podría llevar mucho tiempo y podría ser mejor pedirles que aclaren el problema primero.
|
||||
|
||||
### Sugerir soluciones { #suggest-solutions }
|
||||
|
||||
* Después de poder entender la pregunta, puedes darles una posible **respuesta**.
|
||||
|
||||
* En muchos casos, es mejor entender su **problema subyacente o caso de uso**, porque podría haber una mejor manera de resolverlo que lo que están intentando hacer.
|
||||
|
||||
### Pide cerrar { #ask-to-close }
|
||||
|
||||
Si responden, hay una alta probabilidad de que hayas resuelto su problema, felicidades, ¡**eres un héroe**! 🦸
|
||||
|
||||
* Ahora, si eso resolvió su problema, puedes pedirles que:
|
||||
|
||||
* En GitHub Discussions: marquen el comentario como la **respuesta**.
|
||||
* En GitHub Issues: **cierren** el issue.
|
||||
|
||||
## Observa el repositorio de GitHub { #watch-the-github-repository }
|
||||
|
||||
Puedes "observar" FastAPI en GitHub (haciendo clic en el botón "watch" en la parte superior derecha): [https://github.com/fastapi/fastapi](https://github.com/fastapi/fastapi). 👀
|
||||
|
||||
Si seleccionas "Watching" en lugar de "Releases only", recibirás notificaciones cuando alguien cree un nuevo issue o pregunta. También puedes especificar que solo deseas que te notifiquen sobre nuevos issues, discusiones, PRs, etc.
|
||||
|
||||
Luego puedes intentar ayudarlos a resolver esas preguntas.
|
||||
|
||||
## Haz preguntas { #ask-questions }
|
||||
|
||||
Puedes [crear una nueva pregunta](https://github.com/fastapi/fastapi/discussions/new?category=questions) en el repositorio de GitHub, por ejemplo para:
|
||||
Puedes [crear una nueva pregunta](https://github.com/fastapi/fastapi/discussions/new?category=questions) en el repositorio de GitHub, por ejemplo, para:
|
||||
|
||||
* Hacer una **pregunta** o preguntar sobre un **problema**.
|
||||
* Sugerir una nueva **funcionalidad**.
|
||||
|
||||
**Nota**: si lo haces, entonces te voy a pedir que también ayudes a otros. 😉
|
||||
|
||||
## Revisa Pull Requests { #review-pull-requests }
|
||||
|
||||
Puedes ayudarme a revisar pull requests de otros.
|
||||
|
||||
De nuevo, por favor, haz tu mejor esfuerzo por ser amable. 🤗
|
||||
|
||||
---
|
||||
|
||||
Aquí está lo que debes tener en cuenta y cómo revisar un pull request:
|
||||
|
||||
### Entiende el problema { #understand-the-problem }
|
||||
|
||||
* Primero, asegúrate de **entender el problema** que el pull request está intentando resolver. Podría tener una discusión más larga en una GitHub Discussion o issue.
|
||||
|
||||
* También hay una buena posibilidad de que el pull request no sea realmente necesario porque el problema se puede resolver de una manera **diferente**. Entonces puedes sugerir o preguntar sobre eso.
|
||||
|
||||
### No te preocupes por el estilo { #dont-worry-about-style }
|
||||
|
||||
* No te preocupes demasiado por cosas como los estilos de los mensajes de commit, yo haré squash y merge personalizando el commit manualmente.
|
||||
|
||||
* Tampoco te preocupes por las reglas de estilo, hay herramientas automatizadas verificando eso.
|
||||
|
||||
Y si hay alguna otra necesidad de estilo o consistencia, pediré directamente eso, o agregaré commits encima con los cambios necesarios.
|
||||
|
||||
### Revisa el código { #check-the-code }
|
||||
|
||||
* Revisa y lee el código, ve si tiene sentido, **ejecútalo localmente** y ve si realmente resuelve el problema.
|
||||
|
||||
* Luego **comenta** diciendo que hiciste eso, así sabré que realmente lo revisaste.
|
||||
|
||||
/// info | Información
|
||||
|
||||
Desafortunadamente, no puedo simplemente confiar en PRs que solo tienen varias aprobaciones.
|
||||
|
||||
Varias veces ha sucedido que hay PRs con 3, 5 o más aprobaciones, probablemente porque la descripción es atractiva, pero cuando reviso los PRs, en realidad están rotos, tienen un bug, o no resuelven el problema que dicen resolver. 😅
|
||||
|
||||
Así que, es realmente importante que realmente leas y ejecutes el código, y me hagas saber en los comentarios que lo hiciste. 🤓
|
||||
|
||||
///
|
||||
|
||||
* Si el PR se puede simplificar de alguna manera, puedes pedir eso, pero no hay necesidad de ser demasiado exigente, podría haber muchos puntos de vista subjetivos (y yo tendré el mío también 🙈), así que es mejor si puedes centrarte en las cosas fundamentales.
|
||||
|
||||
### Tests { #tests }
|
||||
|
||||
* Ayúdame a verificar que el PR tenga **tests**.
|
||||
|
||||
* Verifica que los tests **fallen** antes del PR. 🚨
|
||||
|
||||
* Luego verifica que los tests **pasen** después del PR. ✅
|
||||
|
||||
* Muchos PRs no tienen tests, puedes **recordarles** que agreguen tests, o incluso puedes **sugerir** algunos tests tú mismo. Eso es una de las cosas que consume más tiempo y puedes ayudar mucho con eso.
|
||||
|
||||
* Luego también comenta lo que intentaste, de esa manera sabré que lo revisaste. 🤓
|
||||
|
||||
## Crea un Pull Request { #create-a-pull-request }
|
||||
|
||||
Puedes [contribuir](contributing.md) al código fuente con Pull Requests, por ejemplo:
|
||||
|
||||
* Para corregir un error tipográfico que encontraste en la documentación.
|
||||
* Para compartir un artículo, video o podcast que creaste o encontraste sobre FastAPI [editando este archivo](https://github.com/fastapi/fastapi/edit/master/docs/en/data/external_links.yml).
|
||||
* Asegúrate de agregar tu enlace al inicio de la sección correspondiente.
|
||||
* Para ayudar a [traducir la documentación](contributing.md#translations) a tu idioma.
|
||||
* También puedes ayudar a revisar las traducciones creadas por otros.
|
||||
* Para proponer nuevas secciones de documentación.
|
||||
* Para corregir un issue/bug existente.
|
||||
* Asegúrate de agregar tests.
|
||||
* Para agregar una nueva funcionalidad.
|
||||
* Asegúrate de agregar tests.
|
||||
* Asegúrate de agregar documentación si es relevante.
|
||||
|
||||
## Ayuda a Mantener FastAPI { #help-maintain-fastapi }
|
||||
|
||||
¡Ayúdame a mantener **FastAPI**! 🤓
|
||||
|
||||
Hay mucho trabajo por hacer, y para la mayoría de ello, **TÚ** puedes hacerlo.
|
||||
|
||||
Las tareas principales que puedes hacer ahora son:
|
||||
|
||||
* [Ayudar a otros con preguntas en GitHub](#help-others-with-questions-in-github) (ver la sección arriba).
|
||||
* [Revisar Pull Requests](#review-pull-requests) (ver la sección arriba).
|
||||
|
||||
Esas dos tareas son las que **consumen más tiempo**. Ese es el trabajo principal de mantener FastAPI.
|
||||
|
||||
Si puedes ayudarme con eso, **me estás ayudando a mantener FastAPI** y asegurando que siga **avanzando más rápido y mejor**. 🚀
|
||||
|
||||
## Únete al chat { #join-the-chat }
|
||||
|
||||
Únete al servidor de chat 👥 [Discord](https://discord.gg/VQjSZaeJmf) 👥 y charla con otros en la comunidad de FastAPI.
|
||||
|
||||
/// tip | Consejo
|
||||
|
||||
Para preguntas, hazlas en GitHub Discussions, hay muchas más probabilidades de que recibas ayuda.
|
||||
Para preguntas, házlas en [GitHub Discussions](https://github.com/fastapi/fastapi/discussions/new?category=questions), hay muchas más probabilidades de que recibas ayuda de parte de los [FastAPI Experts](fastapi-people.md#fastapi-experts).
|
||||
|
||||
Usa el chat solo para otras conversaciones generales.
|
||||
|
||||
@@ -82,6 +241,16 @@ Usa el chat solo para otras conversaciones generales.
|
||||
|
||||
Ten en cuenta que dado que los chats permiten una "conversación más libre", es fácil hacer preguntas que son demasiado generales y más difíciles de responder, por lo que es posible que no recibas respuestas.
|
||||
|
||||
En GitHub, la plantilla te guiará para escribir la pregunta correcta para que puedas obtener más fácilmente una buena respuesta, o incluso resolver el problema tú mismo antes de preguntar.
|
||||
En GitHub, la plantilla te guiará para escribir la pregunta correcta para que puedas obtener más fácilmente una buena respuesta, o incluso resolver el problema por ti mismo antes de preguntar. Y en GitHub puedo asegurarme de responder siempre todo, incluso si lleva tiempo. No puedo hacer eso personalmente con los sistemas de chat. 😅
|
||||
|
||||
Las conversaciones en los sistemas de chat tampoco son tan fáciles de buscar como en GitHub; se pierden.
|
||||
Las conversaciones en los sistemas de chat tampoco son tan fácilmente buscables como en GitHub, por lo que las preguntas y respuestas podrían perderse en la conversación. Y solo las que están en GitHub cuentan para convertirse en un [FastAPI Expert](fastapi-people.md#fastapi-experts), por lo que probablemente recibirás más atención en GitHub.
|
||||
|
||||
Por otro lado, hay miles de usuarios en los sistemas de chat, por lo que hay muchas posibilidades de que encuentres a alguien con quien hablar allí, casi todo el tiempo. 😄
|
||||
|
||||
## Hazte sponsor del autor { #sponsor-the-author }
|
||||
|
||||
Si tu **producto/empresa** depende de o está relacionado con **FastAPI** y quieres llegar a sus usuarios, puedes hacerte sponsor del autor (de mí) a través de [GitHub sponsors](https://github.com/sponsors/tiangolo). Según el nivel, podrías obtener algunos beneficios extra, como una insignia en la documentación. 🎁
|
||||
|
||||
---
|
||||
|
||||
¡Gracias! 🚀
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
---
|
||||
include_yaml:
|
||||
sponsors: data/sponsors.yml
|
||||
---
|
||||
|
||||
# FastAPI { #fastapi }
|
||||
|
||||
<style>
|
||||
|
||||
@@ -172,7 +172,7 @@ Como la lista es un tipo que contiene algunos tipos internos, los pones entre co
|
||||
|
||||
{* ../../docs_src/python_types/tutorial006_py310.py hl[1] *}
|
||||
|
||||
/// note | Nota
|
||||
/// info | Información
|
||||
|
||||
Esos tipos internos en los corchetes se denominan "parámetros de tipo".
|
||||
|
||||
@@ -283,7 +283,7 @@ Un ejemplo de la documentación oficial de Pydantic:
|
||||
|
||||
{* ../../docs_src/python_types/tutorial011_py310.py *}
|
||||
|
||||
/// note | Nota
|
||||
/// info | Información
|
||||
|
||||
Para saber más sobre [Pydantic, revisa su documentación](https://docs.pydantic.dev/).
|
||||
|
||||
@@ -341,7 +341,7 @@ Todo esto puede sonar abstracto. No te preocupes. Verás todo esto en acción en
|
||||
|
||||
Lo importante es que al usar tipos estándar de Python, en un solo lugar (en lugar de agregar más clases, decoradores, etc.), **FastAPI** hará gran parte del trabajo por ti.
|
||||
|
||||
/// note | Nota
|
||||
/// info | Información
|
||||
|
||||
Si ya revisaste todo el tutorial y volviste para ver más sobre tipos, un buen recurso es [la "cheat sheet" de `mypy`](https://mypy.readthedocs.io/en/latest/cheat_sheet_py3.html).
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Si estás construyendo una aplicación o una API web, rara vez podrás poner tod
|
||||
|
||||
**FastAPI** proporciona una herramienta conveniente para estructurar tu aplicación manteniendo toda la flexibilidad.
|
||||
|
||||
/// note | Nota
|
||||
/// info | Información
|
||||
|
||||
Si vienes de Flask, esto sería el equivalente a los Blueprints de Flask.
|
||||
|
||||
@@ -194,7 +194,7 @@ Tener `dependencies` en el `APIRouter` puede ser usado, por ejemplo, para requer
|
||||
|
||||
///
|
||||
|
||||
/// tip | Consejo
|
||||
/// check | Revisa
|
||||
|
||||
Los parámetros `prefix`, `tags`, `responses`, y `dependencies` son (como en muchos otros casos) solo una funcionalidad de **FastAPI** para ayudarte a evitar la duplicación de código.
|
||||
|
||||
@@ -339,7 +339,7 @@ También podríamos importarlos así:
|
||||
from app.routers import items, users
|
||||
```
|
||||
|
||||
/// note | Nota
|
||||
/// info | Información
|
||||
|
||||
La primera versión es un "import relativo":
|
||||
|
||||
@@ -382,7 +382,7 @@ Ahora, incluyamos los `router`s de los submódulos `users` y `items`:
|
||||
|
||||
{* ../../docs_src/bigger_applications/app_an_py310/main.py hl[10:11] title["app/main.py"] *}
|
||||
|
||||
/// note | Nota
|
||||
/// info | Información
|
||||
|
||||
`users.router` contiene el `APIRouter` dentro del archivo `app/routers/users.py`.
|
||||
|
||||
@@ -402,7 +402,7 @@ Así, detrás de escena, funcionará como si todo fuera la misma única app.
|
||||
|
||||
///
|
||||
|
||||
/// tip | Consejo
|
||||
/// check | Revisa
|
||||
|
||||
No tienes que preocuparte por el rendimiento al incluir routers.
|
||||
|
||||
@@ -451,7 +451,7 @@ Aquí lo hacemos... solo para mostrar que podemos 🤷:
|
||||
|
||||
y funcionará correctamente, junto con todas las otras *path operations* añadidas con `app.include_router()`.
|
||||
|
||||
/// note | Detalles Muy Técnicos
|
||||
/// info | Detalles Muy Técnicos
|
||||
|
||||
**Nota**: este es un detalle muy técnico que probablemente puedes **simplemente omitir**.
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ Pero recuerda que cuando importas `Query`, `Path`, `Header`, y otros de `fastapi
|
||||
|
||||
///
|
||||
|
||||
/// note | Nota
|
||||
/// info | Información
|
||||
|
||||
Para declarar headers, necesitas usar `Header`, porque de otra forma los parámetros serían interpretados como parámetros de query.
|
||||
|
||||
@@ -58,7 +58,7 @@ Antes de establecer `convert_underscores` a `False`, ten en cuenta que algunos p
|
||||
|
||||
Es posible recibir headers duplicados. Eso significa, el mismo header con múltiples valores.
|
||||
|
||||
Puedes definir esos casos usando una list en la declaración del tipo.
|
||||
Puedes definir esos casos usando una lista en la declaración del tipo.
|
||||
|
||||
Recibirás todos los valores del header duplicado como una `list` de Python.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Cuando trabajas en proyectos de Python probablemente deberías usar un **entorno virtual** (o un mecanismo similar) para aislar los paquetes que instalas para cada proyecto.
|
||||
|
||||
/// note | Nota
|
||||
/// info | Información
|
||||
|
||||
Si ya sabes sobre entornos virtuales, cómo crearlos y usarlos, podrías querer saltar esta sección. 🤓
|
||||
|
||||
@@ -18,7 +18,7 @@ Un **entorno virtual** es un directorio con algunos archivos en él.
|
||||
|
||||
///
|
||||
|
||||
/// note | Nota
|
||||
/// info | Información
|
||||
|
||||
Esta página te enseñará cómo usar **entornos virtuales** y cómo funcionan.
|
||||
|
||||
|
||||
1
docs/es/mkdocs.yml
Normal file
1
docs/es/mkdocs.yml
Normal file
@@ -0,0 +1 @@
|
||||
INHERIT: ../en/mkdocs.yml
|
||||
@@ -124,6 +124,10 @@ Voir la section `### Content of code blocks` dans l’invite générale dans `sc
|
||||
|
||||
//// tab | Test
|
||||
|
||||
/// info | Info
|
||||
Du texte
|
||||
///
|
||||
|
||||
/// note | Remarque
|
||||
Du texte
|
||||
///
|
||||
@@ -132,6 +136,10 @@ Du texte
|
||||
Du texte
|
||||
///
|
||||
|
||||
/// check | Vérifications
|
||||
Du texte
|
||||
///
|
||||
|
||||
/// tip | Astuce
|
||||
Du texte
|
||||
///
|
||||
|
||||
@@ -43,7 +43,7 @@ Django REST Framework a été créé par Tom Christie. Le créateur de Starlette
|
||||
|
||||
///
|
||||
|
||||
/// tip | A inspiré **FastAPI** à
|
||||
/// check | A inspiré **FastAPI** à
|
||||
|
||||
Avoir une interface de documentation automatique de l'API.
|
||||
|
||||
@@ -65,7 +65,7 @@ qui est nécessaire, était une caractéristique clé que je voulais conserver.
|
||||
|
||||
Compte tenu de la simplicité de Flask, il semblait bien adapté à la création d'API. La prochaine chose à trouver était un « Django REST Framework » pour Flask.
|
||||
|
||||
/// tip | A inspiré **FastAPI** à
|
||||
/// check | A inspiré **FastAPI** à
|
||||
|
||||
Être un micro‑framework. Il est donc facile de combiner les outils et les pièces nécessaires.
|
||||
|
||||
@@ -107,7 +107,7 @@ def read_url():
|
||||
|
||||
Notez les similitudes entre `requests.get(...)` et `@app.get(...)`.
|
||||
|
||||
/// tip | A inspiré **FastAPI** à
|
||||
/// check | A inspiré **FastAPI** à
|
||||
|
||||
* Avoir une API simple et intuitive.
|
||||
* Utiliser les noms de méthodes HTTP (opérations) directement, de manière simple et intuitive.
|
||||
@@ -128,7 +128,7 @@ Swagger pour une API permettrait d'utiliser cette interface utilisateur web auto
|
||||
|
||||
C'est pourquoi, lorsqu'on parle de la version 2.0, il est courant de dire « Swagger », et pour la version 3+ « OpenAPI ».
|
||||
|
||||
/// tip | A inspiré **FastAPI** à
|
||||
/// check | A inspiré **FastAPI** à
|
||||
|
||||
Adopter et utiliser une norme ouverte pour les spécifications des API, au lieu d'un schéma personnalisé.
|
||||
|
||||
@@ -164,7 +164,7 @@ Ces fonctionnalités sont ce pourquoi Marshmallow a été construit. C'est une e
|
||||
|
||||
Mais elle a été créée avant que les annotations de type n'existent en Python. Ainsi, pour définir chaque <dfn title="la définition de la façon dont les données doivent être formées">schéma</dfn>, vous devez utiliser des utilitaires et des classes spécifiques fournies par Marshmallow.
|
||||
|
||||
/// tip | A inspiré **FastAPI** à
|
||||
/// check | A inspiré **FastAPI** à
|
||||
|
||||
Utiliser du code pour définir des « schémas » qui fournissent automatiquement les types de données et la validation.
|
||||
|
||||
@@ -180,13 +180,13 @@ Il utilise Marshmallow pour effectuer la validation des données. Et il a été
|
||||
|
||||
C'est un outil formidable et je l'ai beaucoup utilisé aussi, avant d'avoir **FastAPI**.
|
||||
|
||||
/// note | Remarque
|
||||
/// info
|
||||
|
||||
Webargs a été créé par les développeurs de Marshmallow.
|
||||
|
||||
///
|
||||
|
||||
/// tip | A inspiré **FastAPI** à
|
||||
/// check | A inspiré **FastAPI** à
|
||||
|
||||
Disposer d'une validation automatique des données des requêtes entrantes.
|
||||
|
||||
@@ -210,13 +210,13 @@ Mais alors, nous avons à nouveau le problème d'avoir une micro-syntaxe, dans u
|
||||
|
||||
L'éditeur ne peut guère aider en la matière. Et si nous modifions les paramètres ou les schémas Marshmallow et que nous oublions de modifier également cette docstring YAML, le schéma généré deviendrait obsolète.
|
||||
|
||||
/// note | Remarque
|
||||
/// info
|
||||
|
||||
APISpec a été créé par les développeurs de Marshmallow.
|
||||
|
||||
///
|
||||
|
||||
/// tip | A inspiré **FastAPI** à
|
||||
/// check | A inspiré **FastAPI** à
|
||||
|
||||
Supporter la norme ouverte pour les API, OpenAPI.
|
||||
|
||||
@@ -243,13 +243,13 @@ j'ai (ainsi que plusieurs équipes externes) utilisées jusqu'à présent :
|
||||
|
||||
Ces mêmes générateurs full-stack ont servi de base aux [Générateurs de projets pour **FastAPI**](project-generation.md).
|
||||
|
||||
/// note | Remarque
|
||||
/// info
|
||||
|
||||
Flask-apispec a été créé par les développeurs de Marshmallow.
|
||||
|
||||
///
|
||||
|
||||
/// tip | A inspiré **FastAPI** à
|
||||
/// check | A inspiré **FastAPI** à
|
||||
|
||||
Générer le schéma OpenAPI automatiquement, à partir du même code qui définit la sérialisation et la validation.
|
||||
|
||||
@@ -270,7 +270,7 @@ Mais comme les données TypeScript ne sont pas préservées après la compilatio
|
||||
|
||||
Il ne peut pas très bien gérer les modèles imbriqués. Ainsi, si le corps JSON de la requête est un objet JSON comportant des champs internes qui sont à leur tour des objets JSON imbriqués, il ne peut pas être correctement documenté et validé.
|
||||
|
||||
/// tip | A inspiré **FastAPI** à
|
||||
/// check | A inspiré **FastAPI** à
|
||||
|
||||
Utiliser les types Python pour bénéficier d'un excellent support de l'éditeur.
|
||||
|
||||
@@ -290,7 +290,7 @@ Il a clairement inspiré Uvicorn et Starlette, qui sont actuellement plus rapide
|
||||
|
||||
///
|
||||
|
||||
/// tip | A inspiré **FastAPI** à
|
||||
/// check | A inspiré **FastAPI** à
|
||||
|
||||
Trouver un moyen d'avoir une performance folle.
|
||||
|
||||
@@ -308,7 +308,7 @@ pas possible de déclarer des paramètres de requête et des corps avec des indi
|
||||
|
||||
Ainsi, la validation, la sérialisation et la documentation des données doivent être effectuées dans le code, et non pas automatiquement. Ou bien elles doivent être implémentées comme un framework au-dessus de Falcon, comme Hug. Cette même distinction se retrouve dans d'autres frameworks qui s'inspirent de la conception de Falcon, qui consiste à avoir un objet de requête et un objet de réponse comme paramètres.
|
||||
|
||||
/// tip | A inspiré **FastAPI** à
|
||||
/// check | A inspiré **FastAPI** à
|
||||
|
||||
Trouver des moyens d'obtenir de bonnes performances.
|
||||
|
||||
@@ -338,7 +338,7 @@ d'utiliser des décorateurs qui peuvent être placés juste au-dessus de la fonc
|
||||
méthode est plus proche de celle de Django que de celle de Flask (et Starlette). Il sépare dans le code des choses
|
||||
qui sont relativement fortement couplées.
|
||||
|
||||
/// tip | A inspiré **FastAPI** à
|
||||
/// check | A inspiré **FastAPI** à
|
||||
|
||||
Définir des validations supplémentaires pour les types de données utilisant la valeur « par défaut » des attributs du modèle. Ceci améliore le support de l'éditeur, et n'était pas disponible dans Pydantic auparavant.
|
||||
|
||||
@@ -361,13 +361,13 @@ API et des CLI.
|
||||
|
||||
Comme il est basé sur l'ancienne norme pour les frameworks web Python synchrones (WSGI), il ne peut pas gérer les Websockets et autres, bien qu'il soit également très performant.
|
||||
|
||||
/// note | Remarque
|
||||
/// info
|
||||
|
||||
Hug a été créé par Timothy Crosley, le créateur de [`isort`](https://github.com/timothycrosley/isort), un excellent outil pour trier automatiquement les imports dans les fichiers Python.
|
||||
|
||||
///
|
||||
|
||||
/// tip | Idées ayant inspiré **FastAPI**
|
||||
/// check | Idées ayant inspiré **FastAPI**
|
||||
|
||||
Hug a inspiré certaines parties d'APIStar, et était l'un des outils que je trouvais les plus prometteurs, à côté d'APIStar.
|
||||
|
||||
@@ -404,7 +404,7 @@ Il ne s'agissait plus d'un framework web API, le créateur devant se concentrer
|
||||
|
||||
Maintenant, APIStar est un ensemble d'outils pour valider les spécifications OpenAPI, et non un framework web.
|
||||
|
||||
/// note | Remarque
|
||||
/// info
|
||||
|
||||
APIStar a été créé par Tom Christie. Le même gars qui a créé :
|
||||
|
||||
@@ -414,7 +414,7 @@ APIStar a été créé par Tom Christie. Le même gars qui a créé :
|
||||
|
||||
///
|
||||
|
||||
/// tip | A inspiré **FastAPI** à
|
||||
/// check | A inspiré **FastAPI** à
|
||||
|
||||
Exister.
|
||||
|
||||
@@ -439,7 +439,7 @@ Cela le rend extrêmement intuitif.
|
||||
Il est comparable à Marshmallow. Bien qu'il soit plus rapide que Marshmallow dans les benchmarks. Et comme il est
|
||||
basé sur les mêmes annotations de type Python, le support de l'éditeur est grand.
|
||||
|
||||
/// tip | **FastAPI** l'utilise pour
|
||||
/// check | **FastAPI** l'utilise pour
|
||||
|
||||
Gérer toute la validation des données, leur sérialisation et la documentation automatique du modèle (basée sur le schéma JSON).
|
||||
|
||||
@@ -482,7 +482,7 @@ Néanmoins, il est déjà utilisé comme « standard » par plusieurs outils. Ce
|
||||
|
||||
///
|
||||
|
||||
/// tip | **FastAPI** l'utilise pour
|
||||
/// check | **FastAPI** l'utilise pour
|
||||
|
||||
Gérer toutes les parties web de base. Ajouter des fonctionnalités par-dessus.
|
||||
|
||||
@@ -501,7 +501,7 @@ quelque chose qu'un framework comme Starlette (ou **FastAPI**) fournirait par-de
|
||||
|
||||
C'est le serveur recommandé pour Starlette et **FastAPI**.
|
||||
|
||||
/// tip | **FastAPI** le recommande comme
|
||||
/// check | **FastAPI** le recommande comme
|
||||
|
||||
Le serveur web principal pour exécuter les applications **FastAPI**.
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ Vous et votre crush 😍 mangez les burgers 🍔 et passez un bon moment ✨.
|
||||
|
||||
<img src="/img/async/concurrent-burgers/concurrent-burgers-07.png" class="illustration">
|
||||
|
||||
/// note | Remarque
|
||||
/// info
|
||||
|
||||
Illustrations proposées par [Ketrina Thompson](https://www.instagram.com/ketrinadrawsalot). 🎨
|
||||
|
||||
@@ -205,7 +205,7 @@ Vous les mangez, et vous avez terminé 🍔 ⏹.
|
||||
|
||||
Durant tout ce processus, il n'y a presque pas eu de discussions ou de flirts car la plupart de votre temps à été passé à attendre 🕙 devant le comptoir 😞.
|
||||
|
||||
/// note | Remarque
|
||||
/// info
|
||||
|
||||
Illustrations proposées par [Ketrina Thompson](https://www.instagram.com/ketrinadrawsalot). 🎨
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ ce qui serait équivalent à :
|
||||
from backend.main import app
|
||||
```
|
||||
|
||||
### `fastapi dev` avec un chemin ou avec l’option CLI `--entrypoint` { #fastapi-dev-with-path-or-with-entrypoint-cli-option }
|
||||
### `fastapi dev` avec un chemin { #fastapi-dev-with-path }
|
||||
|
||||
Vous pouvez également passer le chemin du fichier à la commande `fastapi dev`, et elle devinera l’objet d’application FastAPI à utiliser :
|
||||
|
||||
@@ -103,13 +103,7 @@ Vous pouvez également passer le chemin du fichier à la commande `fastapi dev`,
|
||||
$ fastapi dev main.py
|
||||
```
|
||||
|
||||
Ou bien, vous pouvez aussi passer l’option `--entrypoint` à la commande `fastapi dev` :
|
||||
|
||||
```console
|
||||
$ fastapi dev --entrypoint main:app
|
||||
```
|
||||
|
||||
Mais vous devez vous rappeler de passer le bon chemin\entrypoint à chaque fois que vous appelez la commande `fastapi`.
|
||||
Mais vous devez vous rappeler de passer le bon chemin à chaque fois que vous appelez la commande `fastapi`.
|
||||
|
||||
De plus, d’autres outils pourraient ne pas pouvoir le trouver, par exemple l’[extension VS Code](editor-support.md) ou [FastAPI Cloud](https://fastapicloud.com), il est donc recommandé d’utiliser le `entrypoint` dans `pyproject.toml`.
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ second_user_data = {
|
||||
my_second_user: User = User(**second_user_data)
|
||||
```
|
||||
|
||||
/// note | Remarque
|
||||
/// info
|
||||
|
||||
`**second_user_data` signifie :
|
||||
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
# Aider { #help }
|
||||
# Aider FastAPI - Obtenir de l'aide { #help-fastapi-get-help }
|
||||
|
||||
Souhaitez-vous aider FastAPI ou obtenir de l'aide à propos de FastAPI ?
|
||||
Aimez-vous **FastAPI** ?
|
||||
|
||||
Il existe des moyens très simples d'aider et d'obtenir de l'aide.
|
||||
Souhaitez-vous aider FastAPI, les autres utilisateurs et l'auteur ?
|
||||
|
||||
Ou souhaitez-vous obtenir de l'aide avec **FastAPI** ?
|
||||
|
||||
Il existe des moyens très simples d'aider (plusieurs ne nécessitent qu'un ou deux clics).
|
||||
|
||||
Et il existe aussi plusieurs façons d'obtenir de l'aide.
|
||||
|
||||
## S'abonner à la newsletter { #subscribe-to-the-newsletter }
|
||||
|
||||
@@ -14,13 +20,9 @@ Vous pouvez vous abonner à la (peu fréquente) [newsletter **FastAPI and friend
|
||||
* Changements majeurs 🚨
|
||||
* Astuces et conseils ✅
|
||||
|
||||
## Suivre FastAPI en ligne { #follow-fastapi-online }
|
||||
## Suivre FastAPI sur X (Twitter) { #follow-fastapi-on-x-twitter }
|
||||
|
||||
Vous pouvez suivre **FastAPI** en ligne à plusieurs endroits :
|
||||
|
||||
* [@fastapi sur **X / Twitter**](https://x.com/fastapi)
|
||||
* [@fastapi.tiangolo.com sur **Bluesky**](https://bsky.app/profile/fastapi.tiangolo.com)
|
||||
* [FastAPI sur **LinkedIn**](https://www.linkedin.com/company/fastapi/)
|
||||
[Suivez @fastapi sur **X (Twitter)**](https://x.com/fastapi) pour obtenir les dernières nouvelles sur **FastAPI**. 🐦
|
||||
|
||||
## Mettre une étoile à **FastAPI** sur GitHub { #star-fastapi-in-github }
|
||||
|
||||
@@ -36,28 +38,98 @@ Vous pouvez y sélectionner « Releases only ».
|
||||
|
||||
Ainsi, vous recevrez des notifications (par e‑mail) chaque fois qu'il y aura une nouvelle release (une nouvelle version) de **FastAPI** avec des corrections de bugs et de nouvelles fonctionnalités.
|
||||
|
||||
## Suivre l'auteur { #follow-the-author }
|
||||
## Entrer en contact avec l'auteur { #connect-with-the-author }
|
||||
|
||||
Vous pouvez suivre [moi (Sebastián Ramírez / `tiangolo`)](https://tiangolo.com), l'auteur, à plusieurs endroits, pour être informé quand j'ai des nouvelles à partager sur FastAPI et ses amis :
|
||||
Vous pouvez entrer en contact avec [moi (Sebastián Ramírez / `tiangolo`)](https://tiangolo.com), l'auteur.
|
||||
|
||||
* [@tiangolo sur **GitHub**](https://github.com/tiangolo).
|
||||
* [@tiangolo sur **X (Twitter)**](https://x.com/tiangolo)
|
||||
* [@tiangolo.com sur **Bluesky**](https://bsky.app/profile/tiangolo.com)
|
||||
* [@tiangolo sur **LinkedIn**](https://www.linkedin.com/in/tiangolo/).
|
||||
Vous pouvez :
|
||||
|
||||
* [Me suivre sur **GitHub**](https://github.com/tiangolo).
|
||||
* Voir d'autres projets Open Source que j'ai créés et qui pourraient vous aider.
|
||||
* Me suivre pour voir quand je crée un nouveau projet Open Source.
|
||||
* [Me suivre sur **X (Twitter)**](https://x.com/tiangolo) ou sur [Mastodon](https://fosstodon.org/@tiangolo).
|
||||
* Me dire comment vous utilisez FastAPI (j'adore l'entendre).
|
||||
* Être informé quand je fais des annonces ou publie de nouveaux outils.
|
||||
* Vous pouvez aussi [suivre @fastapi sur X (Twitter)](https://x.com/fastapi) (un compte séparé).
|
||||
* [Me suivre sur **LinkedIn**](https://www.linkedin.com/in/tiangolo/).
|
||||
* Être informé quand je fais des annonces ou publie de nouveaux outils (même si j'utilise plus souvent X (Twitter) 🤷♂).
|
||||
* Lire ce que j'écris (ou me suivre) sur [**Dev.to**](https://dev.to/tiangolo) ou [**Medium**](https://medium.com/@tiangolo).
|
||||
* Lire d'autres idées, des articles, et découvrir des outils que j'ai créés.
|
||||
* Me suivre pour lire quand je publie quelque chose de nouveau.
|
||||
|
||||
## Tweeter à propos de **FastAPI** { #tweet-about-fastapi }
|
||||
|
||||
[Tweetez à propos de **FastAPI**](https://x.com/compose/tweet?text=I'm loving @fastapi because... https://github.com/fastapi/fastapi) et faites savoir à moi et aux autres pourquoi vous l'appréciez. 🎉
|
||||
|
||||
J'adore entendre comment **FastAPI** est utilisé, ce que vous avez aimé, dans quel projet/quelle entreprise vous l'utilisez, etc.
|
||||
|
||||
## Voter pour FastAPI { #vote-for-fastapi }
|
||||
|
||||
* [Votez pour **FastAPI** sur Slant](https://www.slant.co/options/34241/~fastapi-review).
|
||||
* [Votez pour **FastAPI** sur AlternativeTo](https://alternativeto.net/software/fastapi/about/).
|
||||
* [Indiquez que vous utilisez **FastAPI** sur StackShare](https://stackshare.io/pypi-fastapi).
|
||||
|
||||
## Aider les autres avec des questions sur GitHub { #help-others-with-questions-in-github }
|
||||
|
||||
Vous pouvez essayer d'aider les autres avec leurs questions dans [GitHub Discussions](https://github.com/fastapi/fastapi/discussions/categories/questions?discussions_q=category%3AQuestions+is%3Aunanswered).
|
||||
Vous pouvez essayer d'aider les autres avec leurs questions dans :
|
||||
|
||||
* [GitHub Discussions](https://github.com/fastapi/fastapi/discussions/categories/questions?discussions_q=category%3AQuestions+is%3Aunanswered)
|
||||
* [GitHub Issues](https://github.com/fastapi/fastapi/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Aquestion+-label%3Aanswered+)
|
||||
|
||||
Dans de nombreux cas, vous connaissez peut-être déjà la réponse à ces questions. 🤓
|
||||
|
||||
Si vous aidez beaucoup de personnes avec leurs questions, vous deviendrez un [Expert FastAPI](fastapi-people.md#fastapi-experts) officiel. 🎉
|
||||
|
||||
N'oubliez pas, le point le plus important est : essayez d'être aimable. 🤗
|
||||
N'oubliez pas, le point le plus important est : essayez d'être aimable. Les gens viennent avec leurs frustrations et, dans bien des cas, ne posent pas la question de la meilleure façon, mais faites de votre mieux pour rester aimable. 🤗
|
||||
|
||||
### Comment aider { #how-to-help }
|
||||
L'idée est que la communauté **FastAPI** soit bienveillante et accueillante. En même temps, n'acceptez pas l'intimidation ni les comportements irrespectueux envers les autres. Nous devons prendre soin les uns des autres.
|
||||
|
||||
Suivez le [guide sur la manière d'aider](https://tiangolo.com/open-source/help/#help-others-with-questions-in-github) ici.
|
||||
---
|
||||
|
||||
Voici comment aider les autres avec des questions (dans les discussions ou les issues) :
|
||||
|
||||
### Comprendre la question { #understand-the-question }
|
||||
|
||||
* Vérifiez si vous comprenez quel est l’**objectif** et le cas d'utilisation de la personne qui pose la question.
|
||||
|
||||
* Ensuite, vérifiez si la question (la grande majorité sont des questions) est **claire**.
|
||||
|
||||
* Dans de nombreux cas, la question porte sur une solution imaginaire de l'utilisateur, mais il pourrait y en avoir une **meilleure**. Si vous comprenez mieux le problème et le cas d'utilisation, vous pourriez suggérer une **solution alternative** plus adaptée.
|
||||
|
||||
* Si vous ne comprenez pas la question, demandez plus de **détails**.
|
||||
|
||||
### Reproduire le problème { #reproduce-the-problem }
|
||||
|
||||
Dans la plupart des cas et pour la plupart des questions, il y a quelque chose lié au **code original** de la personne.
|
||||
|
||||
Dans de nombreux cas, elle ne copiera qu'un fragment de code, mais ce n'est pas suffisant pour **reproduire le problème**.
|
||||
|
||||
* Vous pouvez leur demander de fournir un [exemple minimal, complet et vérifiable](https://stackoverflow.com/help/minimal-reproducible-example), que vous pouvez **copier‑coller** et exécuter localement pour voir la même erreur ou le même comportement qu'ils observent, ou pour mieux comprendre leur cas d'utilisation.
|
||||
|
||||
* Si vous vous sentez très généreux, vous pouvez essayer de **créer un tel exemple** vous‑même, simplement à partir de la description du problème. Gardez simplement à l'esprit que cela peut prendre beaucoup de temps et qu'il peut être préférable de leur demander d'abord de clarifier le problème.
|
||||
|
||||
### Suggérer des solutions { #suggest-solutions }
|
||||
|
||||
* Après avoir compris la question, vous pouvez leur donner une **réponse** possible.
|
||||
|
||||
* Dans de nombreux cas, il est préférable de comprendre leur **problème sous‑jacent ou cas d'utilisation**, car il pourrait exister une meilleure façon de le résoudre que ce qu'ils essaient de faire.
|
||||
|
||||
### Demander la clôture { #ask-to-close }
|
||||
|
||||
S'ils répondent, il y a de fortes chances que vous ayez résolu leur problème, bravo, **vous êtes un héros** ! 🦸
|
||||
|
||||
* Maintenant, si cela a résolu leur problème, vous pouvez leur demander de :
|
||||
|
||||
* Dans GitHub Discussions : marquer le commentaire comme **réponse**.
|
||||
* Dans GitHub Issues : **fermer** l'issue.
|
||||
|
||||
## Suivre le dépôt GitHub { #watch-the-github-repository }
|
||||
|
||||
Vous pouvez « watch » FastAPI sur GitHub (en cliquant sur le bouton « watch » en haut à droite) : [https://github.com/fastapi/fastapi](https://github.com/fastapi/fastapi). 👀
|
||||
|
||||
Si vous sélectionnez « Watching » au lieu de « Releases only », vous recevrez des notifications lorsque quelqu'un crée une nouvelle issue ou question. Vous pouvez aussi préciser que vous ne souhaitez être notifié que pour les nouvelles issues, ou les discussions, ou les PR, etc.
|
||||
|
||||
Vous pouvez alors essayer de les aider à résoudre ces questions.
|
||||
|
||||
## Poser des questions { #ask-questions }
|
||||
|
||||
@@ -66,22 +138,119 @@ Vous pouvez [créer une nouvelle question](https://github.com/fastapi/fastapi/di
|
||||
* Poser une **question** ou demander à propos d'un **problème**.
|
||||
* Suggérer une nouvelle **fonctionnalité**.
|
||||
|
||||
**Remarque** : si vous le faites, je vais vous demander d'aider aussi les autres. 😉
|
||||
|
||||
## Relire des Pull Requests { #review-pull-requests }
|
||||
|
||||
Vous pouvez m'aider à relire les pull requests des autres.
|
||||
|
||||
Encore une fois, essayez autant que possible d'être aimable. 🤗
|
||||
|
||||
---
|
||||
|
||||
Voici ce à garder à l'esprit et comment relire une pull request :
|
||||
|
||||
### Comprendre le problème { #understand-the-problem }
|
||||
|
||||
* D'abord, assurez‑vous de **comprendre le problème** que la pull request essaie de résoudre. Il peut y avoir une discussion plus longue dans une GitHub Discussion ou une issue.
|
||||
|
||||
* Il y a aussi de bonnes chances que la pull request ne soit pas réellement nécessaire parce que le problème peut être résolu d'une **autre manière**. Vous pouvez alors le suggérer ou poser la question.
|
||||
|
||||
### Ne pas s'inquiéter du style { #dont-worry-about-style }
|
||||
|
||||
* Ne vous souciez pas trop des choses comme les styles de messages de commit, je ferai un squash and merge en personnalisant le commit manuellement.
|
||||
|
||||
* Ne vous inquiétez pas non plus des règles de style, il existe déjà des outils automatisés qui vérifient cela.
|
||||
|
||||
Et s'il y a d'autres besoins de style ou de cohérence, je le demanderai directement, ou j'ajouterai des commits par‑dessus avec les changements nécessaires.
|
||||
|
||||
### Vérifier le code { #check-the-code }
|
||||
|
||||
* Vérifiez et lisez le code, voyez s'il a du sens, **exécutez‑le localement** et voyez s'il résout effectivement le problème.
|
||||
|
||||
* Ensuite, **commentez** en disant que vous l'avez fait, c'est ainsi que je saurai que vous l'avez vraiment vérifié.
|
||||
|
||||
/// info
|
||||
|
||||
Malheureusement, je ne peux pas simplement faire confiance aux PR qui ont juste plusieurs approbations.
|
||||
|
||||
Plusieurs fois, il est arrivé qu'il y ait des PR avec 3, 5 ou plus approbations, probablement parce que la description est attrayante, mais lorsque je vérifie les PR, elles sont en fait cassées, ont un bug, ou ne résolvent pas le problème qu'elles prétendent résoudre. 😅
|
||||
|
||||
Donc, il est vraiment important que vous lisiez et exécutiez le code, et que vous me le disiez dans les commentaires. 🤓
|
||||
|
||||
///
|
||||
|
||||
* Si la PR peut être simplifiée d'une certaine manière, vous pouvez le demander, mais il n'est pas nécessaire d'être trop pointilleux, il peut y avoir beaucoup de points de vue subjectifs (et j'aurai les miens aussi 🙈), donc il est préférable de vous concentrer sur les choses fondamentales.
|
||||
|
||||
### Tests { #tests }
|
||||
|
||||
* Aidez‑moi à vérifier que la PR a des **tests**.
|
||||
|
||||
* Vérifiez que les tests **échouent** avant la PR. 🚨
|
||||
|
||||
* Puis vérifiez que les tests **réussissent** après la PR. ✅
|
||||
|
||||
* Beaucoup de PR n'ont pas de tests, vous pouvez leur **rappeler** d'ajouter des tests, ou même **suggérer** des tests vous‑même. C'est l'une des choses qui consomment le plus de temps et vous pouvez beaucoup aider.
|
||||
|
||||
* Commentez aussi ce que vous avez essayé, ainsi je saurai que vous l'avez vérifié. 🤓
|
||||
|
||||
## Créer une Pull Request { #create-a-pull-request }
|
||||
|
||||
Vous pouvez [contribuer](contributing.md) au code source avec des Pull Requests, par exemple :
|
||||
|
||||
* Corriger une coquille que vous avez trouvée dans la documentation.
|
||||
* Partager un article, une vidéo ou un podcast que vous avez créé ou trouvé à propos de FastAPI en [modifiant ce fichier](https://github.com/fastapi/fastapi/edit/master/docs/en/data/external_links.yml).
|
||||
* Vous devez vous assurer d'ajouter votre lien au début de la section correspondante.
|
||||
* Aider à [traduire la documentation](contributing.md#translations) dans votre langue.
|
||||
* Vous pouvez aussi aider à relire les traductions créées par d'autres.
|
||||
* Proposer de nouvelles sections de documentation.
|
||||
* Corriger une issue/un bug existant.
|
||||
* Vous devez ajouter des tests.
|
||||
* Ajouter une nouvelle fonctionnalité.
|
||||
* Vous devez ajouter des tests.
|
||||
* Vous devez ajouter de la documentation si c'est pertinent.
|
||||
|
||||
## Aider à maintenir FastAPI { #help-maintain-fastapi }
|
||||
|
||||
Aidez‑moi à maintenir **FastAPI** ! 🤓
|
||||
|
||||
Il y a beaucoup de travail à faire, et pour la plupart, **VOUS** pouvez le faire.
|
||||
|
||||
Les principales tâches que vous pouvez faire dès maintenant sont :
|
||||
|
||||
* [Aider les autres avec des questions sur GitHub](#help-others-with-questions-in-github) (voir la section ci‑dessus).
|
||||
* [Relire des Pull Requests](#review-pull-requests) (voir la section ci‑dessus).
|
||||
|
||||
Ces deux tâches sont celles qui **consomment le plus de temps**. C'est le travail principal de la maintenance de FastAPI.
|
||||
|
||||
Si vous pouvez m'aider avec cela, **vous m'aidez à maintenir FastAPI** et à vous assurer qu'il continue **d'avancer plus vite et mieux**. 🚀
|
||||
|
||||
## Rejoindre le chat { #join-the-chat }
|
||||
|
||||
Rejoignez le 👥 [serveur Discord](https://discord.gg/VQjSZaeJmf) 👥 et échangez avec d'autres membres de la communauté FastAPI.
|
||||
|
||||
/// tip | Astuce
|
||||
|
||||
Pour les questions, posez‑les dans GitHub Discussions, vous avez bien plus de chances de recevoir de l'aide.
|
||||
Pour les questions, posez‑les dans [GitHub Discussions](https://github.com/fastapi/fastapi/discussions/new?category=questions), vous avez bien plus de chances de recevoir de l'aide par les [Experts FastAPI](fastapi-people.md#fastapi-experts).
|
||||
|
||||
Utilisez le chat uniquement pour d'autres conversations générales.
|
||||
|
||||
///
|
||||
|
||||
### Ne pas utiliser le chat pour les questions { #dont-use-the-chat-for-questions }
|
||||
### N'utilisez pas le chat pour les questions { #dont-use-the-chat-for-questions }
|
||||
|
||||
Gardez à l'esprit que, comme les chats permettent une « conversation libre », il est facile de poser des questions trop générales et plus difficiles à répondre ; vous pourriez donc ne pas recevoir de réponses.
|
||||
|
||||
Sur GitHub, le modèle vous guidera pour rédiger la bonne question afin que vous puissiez plus facilement obtenir une bonne réponse, ou même résoudre le problème vous‑même avant de demander.
|
||||
Sur GitHub, le modèle vous guidera pour rédiger la bonne question afin que vous puissiez plus facilement obtenir une bonne réponse, ou même résoudre le problème vous‑même avant de demander. Et sur GitHub, je peux m'assurer de toujours tout répondre, même si cela prend du temps. Je ne peux pas personnellement faire cela avec les systèmes de chat. 😅
|
||||
|
||||
Les conversations dans les systèmes de chat ne sont pas non plus aussi facilement recherchables que sur GitHub, elles se perdent.
|
||||
Les conversations dans les systèmes de chat ne sont pas non plus aussi facilement recherchables que sur GitHub, donc les questions et réponses peuvent se perdre dans la conversation. Et seules celles sur GitHub comptent pour devenir un [Expert FastAPI](fastapi-people.md#fastapi-experts), vous aurez donc très probablement plus d'attention sur GitHub.
|
||||
|
||||
D'un autre côté, il y a des milliers d'utilisateurs dans les systèmes de chat, il y a donc de fortes chances que vous trouviez presque toujours quelqu'un avec qui parler. 😄
|
||||
|
||||
## Sponsoriser l'auteur { #sponsor-the-author }
|
||||
|
||||
Si votre **produit/entreprise** dépend de **FastAPI** ou y est lié et que vous souhaitez atteindre ses utilisateurs, vous pouvez sponsoriser l'auteur (moi) via [GitHub sponsors](https://github.com/sponsors/tiangolo). Selon le niveau, vous pourriez obtenir des avantages supplémentaires, comme un badge dans les documents. 🎁
|
||||
|
||||
---
|
||||
|
||||
Merci ! 🚀
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
---
|
||||
include_yaml:
|
||||
sponsors: data/sponsors.yml
|
||||
---
|
||||
|
||||
# FastAPI { #fastapi }
|
||||
|
||||
<style>
|
||||
|
||||
@@ -172,7 +172,7 @@ Comme la liste est un type qui contient des types internes, mettez-les entre cro
|
||||
|
||||
{* ../../docs_src/python_types/tutorial006_py310.py hl[1] *}
|
||||
|
||||
/// note | Remarque
|
||||
/// info
|
||||
|
||||
Ces types internes entre crochets sont appelés « paramètres de type ».
|
||||
|
||||
@@ -283,7 +283,7 @@ Un exemple tiré de la documentation officielle de Pydantic :
|
||||
|
||||
{* ../../docs_src/python_types/tutorial011_py310.py *}
|
||||
|
||||
/// note | Remarque
|
||||
/// info
|
||||
|
||||
Pour en savoir plus à propos de [Pydantic, consultez sa documentation](https://docs.pydantic.dev/).
|
||||
|
||||
@@ -341,7 +341,7 @@ Tout cela peut sembler abstrait. Ne vous inquiétez pas. Vous verrez tout cela e
|
||||
|
||||
L'important est qu'en utilisant les types standards de Python, en un seul endroit (au lieu d'ajouter plus de classes, de décorateurs, etc.), **FastAPI** fera une grande partie du travail pour vous.
|
||||
|
||||
/// note | Remarque
|
||||
/// info
|
||||
|
||||
Si vous avez déjà parcouru tout le tutoriel et êtes revenu pour en voir plus sur les types, une bonne ressource est [l'« aide-mémoire » de `mypy`](https://mypy.readthedocs.io/en/latest/cheat_sheet_py3.html).
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Si vous créez une application ou une API web, il est rare que vous puissiez tou
|
||||
|
||||
**FastAPI** fournit un outil pratique pour structurer votre application tout en conservant toute la flexibilité.
|
||||
|
||||
/// note | Remarque
|
||||
/// info
|
||||
|
||||
Si vous venez de Flask, cela équivaut aux Blueprints de Flask.
|
||||
|
||||
@@ -194,7 +194,7 @@ Avoir des `dependencies` dans le `APIRouter` peut servir, par exemple, à exiger
|
||||
|
||||
///
|
||||
|
||||
/// tip | Astuce
|
||||
/// check | Vérifications
|
||||
|
||||
Les paramètres `prefix`, `tags`, `responses` et `dependencies` sont (comme dans de nombreux autres cas) simplement une fonctionnalité de **FastAPI** pour vous aider à éviter la duplication de code.
|
||||
|
||||
@@ -339,7 +339,7 @@ Nous pourrions aussi les importer ainsi :
|
||||
from app.routers import items, users
|
||||
```
|
||||
|
||||
/// note | Remarque
|
||||
/// info
|
||||
|
||||
La première version est un « import relatif » :
|
||||
|
||||
@@ -382,7 +382,7 @@ Incluons maintenant les `router` des sous-modules `users` et `items` :
|
||||
|
||||
{* ../../docs_src/bigger_applications/app_an_py310/main.py hl[10:11] title["app/main.py"] *}
|
||||
|
||||
/// note | Remarque
|
||||
/// info
|
||||
|
||||
`users.router` contient le `APIRouter` à l'intérieur du fichier `app/routers/users.py`.
|
||||
|
||||
@@ -402,7 +402,7 @@ Donc, en coulisses, cela fonctionnera comme si tout faisait partie d'une seule e
|
||||
|
||||
///
|
||||
|
||||
/// tip | Astuce
|
||||
/// check | Vérifications
|
||||
|
||||
Vous n'avez pas à vous soucier de la performance lors de l'inclusion de routeurs.
|
||||
|
||||
@@ -451,7 +451,7 @@ Ici, nous le faisons ... juste pour montrer que nous le pouvons 🤷 :
|
||||
|
||||
et cela fonctionnera correctement, avec tous les autres *chemins d'accès* ajoutés avec `app.include_router()`.
|
||||
|
||||
/// note | Détails très techniques
|
||||
/// info | Détails très techniques
|
||||
|
||||
Note : c'est un détail très technique que vous pouvez probablement **simplement ignorer**.
|
||||
|
||||
@@ -482,7 +482,7 @@ from app.main import app
|
||||
|
||||
De cette façon, la commande `fastapi` saura où trouver votre app.
|
||||
|
||||
/// note | Remarque
|
||||
/// Note | Remarque
|
||||
|
||||
Vous pourriez aussi passer le chemin à la commande, comme :
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ Mais rappelez-vous que lorsque vous importez `Query`, `Path`, `Header` et d'autr
|
||||
|
||||
///
|
||||
|
||||
/// note | Remarque
|
||||
/// info
|
||||
|
||||
Pour déclarer des en-têtes, vous devez utiliser `Header`, sinon les paramètres seraient interprétés comme des paramètres de requête.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Lorsque vous travaillez sur des projets Python, vous devriez probablement utiliser un environnement virtuel (ou un mécanisme similaire) pour isoler les packages que vous installez pour chaque projet.
|
||||
|
||||
/// note | Remarque
|
||||
/// info
|
||||
|
||||
Si vous connaissez déjà les environnements virtuels, comment les créer et les utiliser, vous pouvez passer cette section. 🤓
|
||||
|
||||
@@ -18,7 +18,7 @@ Un environnement virtuel est un répertoire contenant certains fichiers.
|
||||
|
||||
///
|
||||
|
||||
/// note | Remarque
|
||||
/// info
|
||||
|
||||
Cette page vous apprendra à utiliser les environnements virtuels et à comprendre leur fonctionnement.
|
||||
|
||||
|
||||
1
docs/fr/mkdocs.yml
Normal file
1
docs/fr/mkdocs.yml
Normal file
@@ -0,0 +1 @@
|
||||
INHERIT: ../en/mkdocs.yml
|
||||
503
docs/hi/docs/_llm-test.md
Normal file
503
docs/hi/docs/_llm-test.md
Normal file
@@ -0,0 +1,503 @@
|
||||
# LLM परीक्षण फ़ाइल { #llm-test-file }
|
||||
|
||||
यह दस्तावेज़ यह परखता है कि <abbr title="Large Language Model - बड़ा भाषा मॉडल">LLM</abbr>, जो डॉक्यूमेंटेशन का अनुवाद करता है, `scripts/translate.py` में दिए गए `general_prompt` और `docs/{language code}/llm-prompt.md` में दिए गए भाषा-विशिष्ट प्रॉम्प्ट को समझता है या नहीं। भाषा-विशिष्ट प्रॉम्प्ट को `general_prompt` के साथ जोड़ा जाता है।
|
||||
|
||||
यहाँ जो परीक्षण जोड़े गए हैं, वे भाषा-विशिष्ट प्रॉम्प्ट के सभी डिज़ाइनर्स को दिखाई देंगे।
|
||||
|
||||
उपयोग इस प्रकार करें:
|
||||
|
||||
* एक भाषा-विशिष्ट प्रॉम्प्ट रखें - `docs/{language code}/llm-prompt.md`।
|
||||
* इस दस्तावेज़ का अपने इच्छित लक्ष्य-भाषा में नया अनुवाद करें (उदाहरण के लिए `translate.py` के `translate-page` कमांड को देखें)। यह अनुवाद `docs/{language code}/docs/_llm-test.md` के अंतर्गत बना देगा।
|
||||
* जाँचें कि अनुवाद में सब कुछ ठीक है।
|
||||
* आवश्यकता होने पर, अपने भाषा-विशिष्ट प्रॉम्प्ट, जनरल प्रॉम्प्ट या अंग्रेज़ी दस्तावेज़ में सुधार करें।
|
||||
* फिर अनुवाद में बचे हुए मुद्दों को हाथ से ठीक करें ताकि यह एक अच्छा अनुवाद बन जाए।
|
||||
* दुबारा अनुवाद करें, इस बार अच्छा अनुवाद जगह पर रहते हुए। आदर्श परिणाम होगा कि LLM अब अनुवाद में कोई परिवर्तन न करे। इसका मतलब है कि जनरल प्रॉम्प्ट और आपका भाषा-विशिष्ट प्रॉम्प्ट जितने अच्छे हो सकते हैं उतने अच्छे हैं (कभी-कभी यह कुछ यादृच्छिक-से परिवर्तन कर देगा, कारण यह है कि [LLM नियतात्मक एल्गोरिथ्म नहीं हैं](https://doublespeak.chat/#/handbook#deterministic-output))।
|
||||
|
||||
परीक्षण:
|
||||
|
||||
## कोड स्निपेट्स { #code-snippets }
|
||||
|
||||
//// tab | परीक्षण
|
||||
|
||||
यह एक कोड स्निपेट है: `foo`। और यह एक और कोड स्निपेट है: `bar`। और एक और: `baz quux`।
|
||||
|
||||
////
|
||||
|
||||
//// tab | जानकारी
|
||||
|
||||
कोड स्निपेट्स की सामग्री को ज्यों का त्यों छोड़ देना चाहिए।
|
||||
|
||||
`scripts/translate.py` में जनरल प्रॉम्प्ट के सेक्शन `### Content of code snippets` को देखें।
|
||||
|
||||
////
|
||||
|
||||
## उद्धरण { #quotes }
|
||||
|
||||
//// tab | परीक्षण
|
||||
|
||||
कल, मेरे दोस्त ने लिखा: "अगर आप 'गलत' को सही लिखते हैं, तो आपने उसे गलत लिखा है"। जिसके जवाब में मैंने कहा: "सही, लेकिन 'गलत' गलत है '"गलत"' नहीं"।
|
||||
|
||||
/// note | टिप्पणी
|
||||
|
||||
LLM संभवतः इसे गलत अनुवादित करेगा। दिलचस्प यह है कि पुनः-अनुवाद करने पर क्या यह ठीक किया हुआ अनुवाद बनाए रखता है।
|
||||
|
||||
///
|
||||
|
||||
////
|
||||
|
||||
//// tab | जानकारी
|
||||
|
||||
प्रॉम्प्ट डिज़ाइनर यह चुन सकते हैं कि वे साधारण कोट्स को टाइपोग्राफ़िक कोट्स में बदलना चाहते हैं या नहीं। उन्हें ज्यों का त्यों छोड़ना भी ठीक है।
|
||||
|
||||
उदाहरण के लिए `docs/de/llm-prompt.md` में सेक्शन `### Quotes` देखें।
|
||||
|
||||
////
|
||||
|
||||
## कोड स्निपेट्स में उद्धरण { #quotes-in-code-snippets }
|
||||
|
||||
//// tab | परीक्षण
|
||||
|
||||
`pip install "foo[bar]"`
|
||||
|
||||
कोड स्निपेट्स में स्ट्रिंग लिटरल्स के उदाहरण: `"this"`, `'that'`.
|
||||
|
||||
कोड स्निपेट्स में स्ट्रिंग लिटरल्स का एक कठिन उदाहरण: `f"I like {'oranges' if orange else "apples"}"`
|
||||
|
||||
हार्डकोर: `Yesterday, my friend wrote: "If you spell incorrectly correctly, you have spelled it incorrectly". To which I answered: "Correct, but 'incorrectly' is incorrectly not '"incorrectly"'"`
|
||||
|
||||
////
|
||||
|
||||
//// tab | जानकारी
|
||||
|
||||
... लेकिन, कोड स्निपेट्स के अंदर के उद्धरण ज्यों के त्यों रहने चाहिए।
|
||||
|
||||
////
|
||||
|
||||
## कोड ब्लॉक्स { #code-blocks }
|
||||
|
||||
//// tab | परीक्षण
|
||||
|
||||
एक Bash कोड उदाहरण...
|
||||
|
||||
```bash
|
||||
# ब्रह्मांड के लिए अभिवादन प्रिंट करें
|
||||
echo "Hello universe"
|
||||
```
|
||||
|
||||
...और एक कंसोल कोड उदाहरण...
|
||||
|
||||
```console
|
||||
$ <font color="#4E9A06">fastapi</font> run <u style="text-decoration-style:solid">main.py</u>
|
||||
<span style="background-color:#009485"><font color="#D3D7CF"> FastAPI </font></span> Starting server
|
||||
Searching for package file structure
|
||||
```
|
||||
|
||||
...और एक अन्य कंसोल कोड उदाहरण...
|
||||
|
||||
```console
|
||||
// "Code" नाम की डायरेक्टरी बनाएँ
|
||||
$ mkdir code
|
||||
// उस डायरेक्टरी में जाएँ
|
||||
$ cd code
|
||||
```
|
||||
|
||||
...और एक Python कोड उदाहरण...
|
||||
|
||||
```Python
|
||||
wont_work() # यह काम नहीं करेगा 😱
|
||||
works(foo="bar") # यह काम करता है 🎉
|
||||
```
|
||||
|
||||
...और बस इतना ही।
|
||||
|
||||
////
|
||||
|
||||
//// tab | जानकारी
|
||||
|
||||
कोड ब्लॉक्स के अंदर के कोड में बदलाव नहीं होना चाहिए, सिवाय टिप्पणियों (comments) के।
|
||||
|
||||
`scripts/translate.py` में जनरल प्रॉम्प्ट के सेक्शन `### Content of code blocks` को देखें।
|
||||
|
||||
////
|
||||
|
||||
## टैब और रंगीन बॉक्स { #tabs-and-colored-boxes }
|
||||
|
||||
//// tab | परीक्षण
|
||||
|
||||
/// info | जानकारी
|
||||
कुछ पाठ
|
||||
///
|
||||
|
||||
/// note | टिप्पणी
|
||||
कुछ पाठ
|
||||
///
|
||||
|
||||
/// note | तकनीकी विवरण
|
||||
कुछ पाठ
|
||||
///
|
||||
|
||||
/// check | जांच
|
||||
कुछ पाठ
|
||||
///
|
||||
|
||||
/// tip | सुझाव
|
||||
कुछ पाठ
|
||||
///
|
||||
|
||||
/// warning | चेतावनी
|
||||
कुछ पाठ
|
||||
///
|
||||
|
||||
/// danger | खतरा
|
||||
कुछ पाठ
|
||||
///
|
||||
|
||||
////
|
||||
|
||||
//// tab | जानकारी
|
||||
|
||||
टैब और `Info`/`Note`/`Warning`/आदि ब्लॉक्स में उनके शीर्षक का अनुवाद ऊर्ध्वाधर रेखा (`|`) के बाद जोड़ा जाना चाहिए।
|
||||
|
||||
`scripts/translate.py` में जनरल प्रॉम्प्ट के सेक्शन `### Special blocks` और `### Tab blocks` देखें।
|
||||
|
||||
////
|
||||
|
||||
## वेब और आंतरिक लिंक { #web-and-internal-links }
|
||||
|
||||
//// tab | परीक्षण
|
||||
|
||||
लिंक का टेक्स्ट अनुवादित होना चाहिए, लिंक का पता अपरिवर्तित रहे:
|
||||
|
||||
* [ऊपर दिए गए शीर्षक का लिंक](#code-snippets)
|
||||
* [आंतरिक लिंक](index.md#installation)
|
||||
* [बाहरी लिंक](https://sqlmodel.tiangolo.com/)
|
||||
* [एक स्टाइल का लिंक](https://fastapi.tiangolo.com/css/styles.css)
|
||||
* [एक स्क्रिप्ट का लिंक](https://fastapi.tiangolo.com/js/logic.js)
|
||||
* [एक छवि का लिंक](https://fastapi.tiangolo.com/img/foo.jpg)
|
||||
|
||||
लिंक का टेक्स्ट अनुवादित होना चाहिए, लिंक का पता अनुवाद की ओर इशारा करना चाहिए:
|
||||
|
||||
* [FastAPI लिंक](https://fastapi.tiangolo.com/hi/)
|
||||
|
||||
////
|
||||
|
||||
//// tab | जानकारी
|
||||
|
||||
लिंक अनुवादित होने चाहिए, लेकिन उनके पते अपरिवर्तित रहें। अपवाद है FastAPI डॉक्यूमेंटेशन के पेजों के पूर्ण (absolute) लिंक। उस स्थिति में लिंक अनुवाद की ओर इशारा करना चाहिए।
|
||||
|
||||
`scripts/translate.py` में जनरल प्रॉम्प्ट के सेक्शन `### Links` देखें।
|
||||
|
||||
////
|
||||
|
||||
## HTML "abbr" एलिमेंट्स { #html-abbr-elements }
|
||||
|
||||
//// tab | परीक्षण
|
||||
|
||||
यहाँ HTML "abbr" एलिमेंट्स में लिपटी कुछ चीज़ें हैं (कुछ गढ़ी हुई भी):
|
||||
|
||||
### abbr एक पूरा वाक्यांश देता है { #the-abbr-gives-a-full-phrase }
|
||||
|
||||
* <abbr title="Getting Things Done - काम पूरे करना">GTD</abbr>
|
||||
* <abbr title="less than - से कम"><code>lt</code></abbr>
|
||||
* <abbr title="XML Web Token - XML वेब टोकन">XWT</abbr>
|
||||
* <abbr title="Parallel Server Gateway Interface - समानांतर सर्वर गेटवे इंटरफ़ेस">PSGI</abbr>
|
||||
|
||||
### abbr एक पूरा वाक्यांश और उसका स्पष्टीकरण देता है { #the-abbr-gives-a-full-phrase-and-an-explanation }
|
||||
|
||||
* <abbr title="Mozilla Developer Network - मोज़िला डेवलपर नेटवर्क: डेवलपर्स के लिए प्रलेखन, फ़ायरफ़ॉक्स टीम द्वारा लिखा गया">MDN</abbr>
|
||||
* <abbr title="Input/Output - इनपुट/आउटपुट: डिस्क का पढ़ना या लिखना, नेटवर्क संचार।">I/O</abbr>.
|
||||
|
||||
////
|
||||
|
||||
//// tab | जानकारी
|
||||
|
||||
"abbr" एलिमेंट्स के "title" ऐट्रिब्यूट्स का अनुवाद कुछ विशिष्ट निर्देशों का पालन करते हुए किया जाता है।
|
||||
|
||||
अनुवाद अपने स्वयं के "abbr" एलिमेंट्स जोड़ सकते हैं जिन्हें LLM को हटाना नहीं चाहिए। जैसे अंग्रेज़ी शब्दों को समझाने के लिए।
|
||||
|
||||
`scripts/translate.py` में जनरल प्रॉम्प्ट के सेक्शन `### HTML abbr elements` देखें।
|
||||
|
||||
////
|
||||
|
||||
## HTML "dfn" एलिमेंट्स { #html-dfn-elements }
|
||||
|
||||
* <dfn title="ऐसी मशीनों का समूह जिन्हें किसी तरह से एक-दूसरे से जुड़ने और साथ काम करने के लिए कॉन्फ़िगर किया गया है।">क्लस्टर</dfn>
|
||||
* <dfn title="मशीन लर्निंग की एक विधि जो इनपुट और आउटपुट लेयर्स के बीच कई छुपी हुई लेयर्स वाले कृत्रिम न्यूरल नेटवर्क्स का उपयोग करती है, इस प्रकार एक व्यापक आंतरिक संरचना विकसित करती है">डीप लर्निंग</dfn>
|
||||
|
||||
## शीर्षक { #headings }
|
||||
|
||||
//// tab | परीक्षण
|
||||
|
||||
### एक वेबऐप विकसित करें - एक ट्यूटोरियल { #develop-a-webapp-a-tutorial }
|
||||
|
||||
नमस्ते।
|
||||
|
||||
### टाइप हिंट्स और -एनोटेशन्स { #type-hints-and-annotations }
|
||||
|
||||
फिर से नमस्ते।
|
||||
|
||||
### सुपर- और सबक्लासेज़ { #super-and-subclasses }
|
||||
|
||||
फिर से नमस्ते।
|
||||
|
||||
////
|
||||
|
||||
//// tab | जानकारी
|
||||
|
||||
शीर्षकों के लिए एकमात्र कड़ा नियम यह है कि LLM कर्ली ब्रैकेट्स के अंदर के हैश-पार्ट को अपरिवर्तित छोड़े, जिससे लिंक न टूटें।
|
||||
|
||||
`scripts/translate.py` में जनरल प्रॉम्प्ट के सेक्शन `### Headings` देखें।
|
||||
|
||||
कुछ भाषा-विशिष्ट निर्देशों के लिए, जैसे `docs/de/llm-prompt.md` में सेक्शन `### Headings` देखें।
|
||||
|
||||
////
|
||||
|
||||
## डॉक्स में प्रयुक्त शब्द { #terms-used-in-the-docs }
|
||||
|
||||
//// tab | परीक्षण
|
||||
|
||||
* आप
|
||||
* आपका
|
||||
|
||||
* उदा.
|
||||
* आदि
|
||||
|
||||
* `foo` एक `int` के रूप में
|
||||
* `bar` एक `str` के रूप में
|
||||
* `baz` एक `list` के रूप में
|
||||
|
||||
* ट्यूटोरियल - उपयोगकर्ता गाइड
|
||||
* उन्नत उपयोगकर्ता गाइड
|
||||
* SQLModel डॉक्स
|
||||
* API डॉक्स
|
||||
* स्वचालित डॉक्स
|
||||
|
||||
* डेटा साइंस
|
||||
* डीप लर्निंग
|
||||
* मशीन लर्निंग
|
||||
* डिपेंडेंसी इंजेक्शन
|
||||
* HTTP बेसिक ऑथेंटिकेशन
|
||||
* HTTP डाइजेस्ट
|
||||
* ISO फ़ॉरमैट
|
||||
* JSON Schema मानक
|
||||
* JSON स्कीमा
|
||||
* स्कीमा परिभाषा
|
||||
* पासवर्ड फ्लो
|
||||
* मोबाइल
|
||||
|
||||
* अप्रचलित
|
||||
* डिज़ाइन किया गया
|
||||
* अमान्य
|
||||
* तुरंत
|
||||
* मानक
|
||||
* डिफ़ॉल्ट
|
||||
* केस-संवेदी
|
||||
* केस-असंवेदी
|
||||
|
||||
* एप्लिकेशन को सर्व करना
|
||||
* पेज को सर्व करना
|
||||
|
||||
* ऐप
|
||||
* एप्लिकेशन
|
||||
|
||||
* रिक्वेस्ट
|
||||
* रिस्पांस
|
||||
* त्रुटि रिस्पांस
|
||||
|
||||
* पाथ ऑपरेशन
|
||||
* पाथ ऑपरेशन डेकोरेटर
|
||||
* पाथ ऑपरेशन फ़ंक्शन
|
||||
|
||||
* बॉडी
|
||||
* रिक्वेस्ट बॉडी
|
||||
* रिस्पांस बॉडी
|
||||
* JSON बॉडी
|
||||
* फॉर्म बॉडी
|
||||
* फ़ाइल बॉडी
|
||||
* फ़ंक्शन बॉडी
|
||||
|
||||
* पैरामीटर
|
||||
* बॉडी पैरामीटर
|
||||
* पाथ पैरामीटर
|
||||
* क्वेरी पैरामीटर
|
||||
* कुकी पैरामीटर
|
||||
* हेडर पैरामीटर
|
||||
* फॉर्म पैरामीटर
|
||||
* फ़ंक्शन पैरामीटर
|
||||
|
||||
* इवेंट
|
||||
* स्टार्टअप इवेंट
|
||||
* सर्वर का स्टार्टअप
|
||||
* शटडाउन इवेंट
|
||||
* लाइफस्पैन इवेंट
|
||||
|
||||
* हैंडलर
|
||||
* इवेंट हैंडलर
|
||||
* एक्सेप्शन हैंडलर
|
||||
* हैंडल करना
|
||||
|
||||
* मॉडल
|
||||
* Pydantic मॉडल
|
||||
* डेटा मॉडल
|
||||
* डेटाबेस मॉडल
|
||||
* फॉर्म मॉडल
|
||||
* मॉडल ऑब्जेक्ट
|
||||
|
||||
* क्लास
|
||||
* बेस क्लास
|
||||
* पैरेंट क्लास
|
||||
* सबक्लास
|
||||
* चाइल्ड क्लास
|
||||
* सिब्लिंग क्लास
|
||||
* क्लास मेथड
|
||||
|
||||
* हेडर
|
||||
* हेडर्स
|
||||
* ऑथराइज़ेशन हेडर
|
||||
* `Authorization` हेडर
|
||||
* फॉरवर्डेड हेडर
|
||||
|
||||
* डिपेंडेंसी इंजेक्शन सिस्टम
|
||||
* डिपेंडेंसी
|
||||
* डिपेंडेबल
|
||||
* डिपेन्डन्ट
|
||||
|
||||
* I/O बाउंड
|
||||
* CPU बाउंड
|
||||
* समकालिकता
|
||||
* समान्तरता
|
||||
* मल्टीप्रोसेसिंग
|
||||
|
||||
* env var
|
||||
* पर्यावरण चर
|
||||
* `PATH`
|
||||
* `PATH` वेरिएबल
|
||||
|
||||
* प्रमाणीकरण
|
||||
* प्रमाणीकरण प्रदाता
|
||||
* अधिकारीकरण
|
||||
* अधिकारीकरण फॉर्म
|
||||
* अधिकारीकरण प्रदाता
|
||||
* उपयोगकर्ता प्रमाणीकरण करता है
|
||||
* सिस्टम उपयोगकर्ता का प्रमाणीकरण करता है
|
||||
|
||||
* CLI
|
||||
* कमांड लाइन इंटरफेस
|
||||
|
||||
* सर्वर
|
||||
* क्लाइंट
|
||||
|
||||
* क्लाउड प्रदाता
|
||||
* क्लाउड सेवा
|
||||
|
||||
* विकास
|
||||
* विकास चरण
|
||||
|
||||
* dict
|
||||
* डिक्शनरी
|
||||
* एन्युमरेशन
|
||||
* एनम
|
||||
* एनम सदस्य
|
||||
|
||||
* एन्कोडर
|
||||
* डीकोडर
|
||||
* एन्कोड करना
|
||||
* डीकोड करना
|
||||
|
||||
* एक्सेप्शन
|
||||
* रेज़ करना
|
||||
|
||||
* एक्सप्रेशन
|
||||
* स्टेटमेंट
|
||||
|
||||
* फ्रंटएंड
|
||||
* बैकएंड
|
||||
|
||||
* GitHub चर्चा
|
||||
* GitHub इश्यू
|
||||
|
||||
* प्रदर्शन
|
||||
* प्रदर्शन अनुकूलन
|
||||
|
||||
* रिटर्न टाइप
|
||||
* रिटर्न वैल्यू
|
||||
|
||||
* सुरक्षा
|
||||
* सुरक्षा स्कीम
|
||||
|
||||
* टास्क
|
||||
* बैकग्राउंड टास्क
|
||||
* टास्क फ़ंक्शन
|
||||
|
||||
* टेम्पलेट
|
||||
* टेम्पलेट इंजन
|
||||
|
||||
* टाइप एनोटेशन
|
||||
* टाइप हिंट
|
||||
|
||||
* सर्वर वर्कर
|
||||
* Uvicorn वर्कर
|
||||
* Gunicorn Worker
|
||||
* वर्कर प्रोसेस
|
||||
* वर्कर क्लास
|
||||
* वर्कलोड
|
||||
|
||||
* डिप्लॉयमेंट
|
||||
* डिप्लॉय करना
|
||||
|
||||
* SDK
|
||||
* सॉफ़्टवेयर डेवलपमेंट किट
|
||||
|
||||
* `APIRouter`
|
||||
* `requirements.txt`
|
||||
* Bearer Token
|
||||
* ब्रेकिंग चेंज
|
||||
* बग
|
||||
* बटन
|
||||
* कॉल करने योग्य
|
||||
* कोड
|
||||
* कमिट
|
||||
* कॉन्टेक्स्ट मैनेजर
|
||||
* कोरूटीन
|
||||
* डेटाबेस सेशन
|
||||
* डिस्क
|
||||
* डोमेन
|
||||
* इंजन
|
||||
* नकली X
|
||||
* HTTP GET मेथड
|
||||
* आइटम
|
||||
* लाइब्रेरी
|
||||
* लाइफस्पैन
|
||||
* लॉक
|
||||
* मिडलवेयर
|
||||
* मोबाइल एप्लिकेशन
|
||||
* मॉड्यूल
|
||||
* माउंटिंग
|
||||
* नेटवर्क
|
||||
* ओरिजिन
|
||||
* ओवरराइड
|
||||
* पेलोड
|
||||
* प्रोसेसर
|
||||
* प्रॉपर्टी
|
||||
* प्रॉक्सी
|
||||
* पुल रिक्वेस्ट
|
||||
* क्वेरी
|
||||
* RAM
|
||||
* रिमोट मशीन
|
||||
* स्टेटस कोड
|
||||
* स्ट्रिंग
|
||||
* टैग
|
||||
* वेब फ़्रेमवर्क
|
||||
* वाइल्डकार्ड
|
||||
* वापस करना
|
||||
* सत्यापित करना
|
||||
|
||||
////
|
||||
|
||||
//// tab | जानकारी
|
||||
|
||||
यह डॉक्स में दिखने वाले (ज़्यादातर) तकनीकी शब्दों की न तो पूर्ण और न ही मानक सूची है। यह प्रॉम्प्ट डिज़ाइनर को यह समझने में मदद कर सकती है कि किन शब्दों के लिए LLM को सहायक निर्देशों की ज़रूरत है। उदाहरण के लिए जब यह एक अच्छे अनुवाद को कमतर अनुवाद में वापस बदल देता है। या जब इसे आपकी भाषा में किसी शब्द का रूपांतरण/विभक्ति करने में समस्या होती है।
|
||||
|
||||
उदाहरण के लिए `docs/de/llm-prompt.md` में सेक्शन `### List of English terms and their preferred German translations` देखें।
|
||||
|
||||
////
|
||||
580
docs/hi/docs/index.md
Normal file
580
docs/hi/docs/index.md
Normal file
@@ -0,0 +1,580 @@
|
||||
# FastAPI { #fastapi }
|
||||
|
||||
<style>
|
||||
.md-content .md-typeset h1 { display: none; }
|
||||
</style>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://fastapi.tiangolo.com/hi"><img src="https://fastapi.tiangolo.com/img/logo-margin/logo-teal.png" alt="FastAPI"></a>
|
||||
</p>
|
||||
<p align="center">
|
||||
<em>FastAPI फ़्रेमवर्क, उच्च प्रदर्शन, सीखने में आसान, कोड लिखने में तेज़, प्रोडक्शन के लिए तैयार</em>
|
||||
</p>
|
||||
<p align="center">
|
||||
<a href="https://github.com/fastapi/fastapi/actions?query=workflow%3ATest+event%3Apush+branch%3Amaster">
|
||||
<img src="https://github.com/fastapi/fastapi/actions/workflows/test.yml/badge.svg?event=push&branch=master" alt="टेस्ट">
|
||||
</a>
|
||||
<a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/fastapi">
|
||||
<img src="https://coverage-badge.samuelcolvin.workers.dev/fastapi/fastapi.svg" alt="कवरेज">
|
||||
</a>
|
||||
<a href="https://pypi.org/project/fastapi">
|
||||
<img src="https://img.shields.io/pypi/v/fastapi?color=%2334D058&label=pypi%20package" alt="पैकेज संस्करण">
|
||||
</a>
|
||||
<a href="https://pypi.org/project/fastapi">
|
||||
<img src="https://img.shields.io/pypi/pyversions/fastapi.svg?color=%2334D058" alt="समर्थित Python संस्करण">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
दस्तावेज़: [https://fastapi.tiangolo.com](https://fastapi.tiangolo.com/hi)
|
||||
|
||||
स्रोत कोड: [https://github.com/fastapi/fastapi](https://github.com/fastapi/fastapi)
|
||||
|
||||
---
|
||||
|
||||
FastAPI एक आधुनिक, तेज़ (उच्च-प्रदर्शन) वेब फ़्रेमवर्क है जो मानक Python type hints के आधार पर Python से APIs बनाने के लिए है।
|
||||
|
||||
मुख्य विशेषताएँ:
|
||||
|
||||
* तेज़: बहुत उच्च प्रदर्शन, **NodeJS** और **Go** के समकक्ष (Starlette और Pydantic की बदौलत)। [उपलब्ध सबसे तेज़ Python फ़्रेमवर्क्स में से एक](#performance)।
|
||||
* कोड लिखने में तेज़: फ़ीचर्स विकसित करने की गति लगभग 200% से 300% तक बढ़ाएँ। *
|
||||
* कम बग्स: मानवीय (डेवलपर) त्रुटियों में लगभग 40% की कमी। *
|
||||
* सहज: बेहतरीन एडिटर सपोर्ट। हर जगह <dfn title="उर्फ़: ऑटो-कम्प्लीट, ऑटोकम्प्लीशन, IntelliSense">ऑटो-कम्प्लीट</dfn>। डिबगिंग में कम समय।
|
||||
* आसान: इस्तेमाल और सीखने में आसान। दस्तावेज़ पढ़ने में कम समय।
|
||||
* संक्षिप्त: कोड डुप्लीकेशन को न्यूनतम करें। प्रत्येक parameter declaration से कई फ़ीचर्स। कम बग्स।
|
||||
* मजबूत: प्रोडक्शन-रेडी कोड प्राप्त करें। स्वतः इंटरैक्टिव दस्तावेज़ीकरण के साथ।
|
||||
* मानकों पर आधारित: APIs के खुले मानकों पर आधारित (और पूर्णतः अनुकूल): [OpenAPI](https://github.com/OAI/OpenAPI-Specification) (जिसे पहले Swagger कहा जाता था) और [JSON Schema](https://json-schema.org/)।
|
||||
|
||||
<small>* आंतरिक डेवलपमेंट टीम द्वारा प्रोडक्शन ऐप्स बनाते समय किए गए परीक्षणों के आधार पर अनुमान।</small>
|
||||
|
||||
## प्रायोजक { #sponsors }
|
||||
|
||||
<!-- sponsors -->
|
||||
|
||||
### कीस्टोन प्रायोजक { #keystone-sponsor }
|
||||
|
||||
<div class="fastapi-sponsors fastapi-sponsors--keystone">
|
||||
{% for sponsor in sponsors.keystone -%}
|
||||
<a class="fastapi-sponsors__card fastapi-sponsors__card--keystone" href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img class="fastapi-sponsors__banner" src="{{ sponsor.img }}" alt="{{ sponsor.title }}"></a>
|
||||
{% endfor -%}
|
||||
</div>
|
||||
|
||||
### गोल्ड प्रायोजक { #gold-sponsors }
|
||||
|
||||
<div class="fastapi-sponsors fastapi-sponsors--gold">
|
||||
{% for sponsor in sponsors.gold -%}
|
||||
<a class="fastapi-sponsors__card fastapi-sponsors__card--gold" href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img class="fastapi-sponsors__banner" src="{{ sponsor.img }}" alt="{{ sponsor.title }}" loading="lazy"></a>
|
||||
{% endfor -%}
|
||||
</div>
|
||||
|
||||
### सिल्वर प्रायोजक { #silver-sponsors }
|
||||
|
||||
<div class="fastapi-sponsors fastapi-sponsors--silver">
|
||||
{% for sponsor in sponsors.silver -%}
|
||||
<a class="fastapi-sponsors__card fastapi-sponsors__card--silver" href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img class="fastapi-sponsors__banner" src="{{ sponsor.img }}" alt="{{ sponsor.title }}" loading="lazy"></a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<!-- /sponsors -->
|
||||
|
||||
[अन्य प्रायोजक](https://fastapi.tiangolo.com/hi/fastapi-people/#sponsors)
|
||||
|
||||
## विचार { #opinions }
|
||||
|
||||
<!-- only-mkdocs -->
|
||||
<div class="fastapi-opinions" data-fastapi-opinions>
|
||||
<div class="fastapi-opinions__tabs" role="tablist" aria-label="Companies using FastAPI">
|
||||
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-microsoft" aria-controls="fo-panel-microsoft" aria-selected="true" tabindex="0">
|
||||
<span class="fastapi-opinions__mark"><img src="/img/logos/microsoft.svg" alt="Microsoft" loading="lazy"></span>
|
||||
</button>
|
||||
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-uber" aria-controls="fo-panel-uber" aria-selected="false" tabindex="-1">
|
||||
<span class="fastapi-opinions__mark"><img src="/img/logos/uber.svg" alt="Uber" loading="lazy"></span>
|
||||
</button>
|
||||
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-netflix" aria-controls="fo-panel-netflix" aria-selected="false" tabindex="-1">
|
||||
<span class="fastapi-opinions__mark"><img src="/img/logos/netflix.svg" alt="Netflix" loading="lazy"></span>
|
||||
</button>
|
||||
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-cisco" aria-controls="fo-panel-cisco" aria-selected="false" tabindex="-1">
|
||||
<span class="fastapi-opinions__mark"><img src="/img/logos/cisco.svg" alt="Cisco" loading="lazy"></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="fastapi-opinions__panel" id="fo-panel-microsoft" role="tabpanel" aria-labelledby="fo-tab-microsoft" tabindex="0">
|
||||
<blockquote class="fastapi-opinions__quote">"मैं इन दिनों <strong>FastAPI</strong> का बहुत उपयोग कर रहा/रही हूँ। वास्तव में मैं अपनी टीम की <strong>Microsoft में ML सेवाओं</strong> के लिए इसे उपयोग करने की योजना बना रहा/रही हूँ। इनमें से कुछ को मुख्य <strong>Windows</strong> प्रोडक्ट और कुछ <strong>Office</strong> प्रोडक्ट्स में इंटीग्रेट किया जा रहा है।"</blockquote>
|
||||
<div class="fastapi-opinions__attr">— कबीर खान, <strong>Microsoft</strong> <a href="https://github.com/fastapi/fastapi/pull/26">(संदर्भ)</a></div>
|
||||
</div>
|
||||
<div class="fastapi-opinions__panel" id="fo-panel-uber" role="tabpanel" aria-labelledby="fo-tab-uber" tabindex="0" hidden>
|
||||
<blockquote class="fastapi-opinions__quote">"हमने <strong>FastAPI</strong> लाइब्रेरी अपनाई ताकि एक <strong>REST</strong> सर्वर स्पॉन किया जा सके जिसे <strong>अन्दाज़ों/अनुमानों</strong> को प्राप्त करने के लिए क्वेरी किया जा सके।" <em>[Ludwig के लिए]</em></blockquote>
|
||||
<div class="fastapi-opinions__attr">— पिएरो मोलिनो, यारोस्लाव डुडिन, साई सुमंत मिर्याला, <strong>Uber</strong> <a href="https://eng.uber.com/ludwig-v0-2/">(संदर्भ)</a></div>
|
||||
</div>
|
||||
<div class="fastapi-opinions__panel" id="fo-panel-netflix" role="tabpanel" aria-labelledby="fo-tab-netflix" tabindex="0" hidden>
|
||||
<blockquote class="fastapi-opinions__quote">"<strong>Netflix</strong> हमारे <strong>संकट प्रबंधन</strong> ऑर्केस्ट्रेशन फ़्रेमवर्क: <strong>Dispatch</strong> के ओपन-सोर्स रिलीज़ की घोषणा करते हुए प्रसन्न है!" <em>[FastAPI के साथ बनाया गया]</em></blockquote>
|
||||
<div class="fastapi-opinions__attr">— केविन ग्लिसन, मार्क विलानोवा, फॉरेस्ट मॉन्सेन, <strong>Netflix</strong> <a href="https://netflixtechblog.com/introducing-dispatch-da4b8a2a8072">(संदर्भ)</a></div>
|
||||
</div>
|
||||
<div class="fastapi-opinions__panel" id="fo-panel-cisco" role="tabpanel" aria-labelledby="fo-tab-cisco" tabindex="0" hidden>
|
||||
<blockquote class="fastapi-opinions__quote">"यदि कोई प्रोडक्शन Python API बनाना चाहता है, तो मैं <strong>FastAPI</strong> की अत्यधिक अनुशंसा करूंगा/करूंगी। यह <strong>सुंदरता से डिज़ाइन</strong> किया गया है, <strong>उपयोग में सरल</strong> है और <strong>बेहद स्केलेबल</strong> है — यह हमारी API-फर्स्ट डेवलपमेंट रणनीति का <strong>मुख्य घटक</strong> बन गया है।"</blockquote>
|
||||
<div class="fastapi-opinions__attr">— डीयोन पिल्सबरी, <strong>Cisco</strong> <a href="https://www.linkedin.com/posts/deonpillsbury_cisco-cx-python-activity-6963242628536487936-trAp/">(संदर्भ)</a></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /only-mkdocs -->
|
||||
|
||||
<div class="only-github" markdown="1">
|
||||
|
||||
"_[...] मैं इन दिनों **FastAPI** का बहुत उपयोग कर रहा/रही हूँ। [...] वास्तव में मैं अपनी टीम की **Microsoft में ML सेवाओं** के लिए इसे उपयोग करने की योजना बना रहा/रही हूँ। इनमें से कुछ को मुख्य **Windows** प्रोडक्ट और कुछ **Office** प्रोडक्ट्स में इंटीग्रेट किया जा रहा है._"
|
||||
|
||||
<div style="text-align: right; margin-right: 10%;">कबीर खान - <strong>Microsoft</strong> <a href="https://github.com/fastapi/fastapi/pull/26"><small>(संदर्भ)</small></a></div>
|
||||
|
||||
---
|
||||
|
||||
"_हमने **FastAPI** लाइब्रेरी अपनाई ताकि एक **REST** सर्वर स्पॉन किया जा सके जिसे **अनुमानों** को प्राप्त करने के लिए क्वेरी किया जा सके। [Ludwig के लिए]_"
|
||||
|
||||
<div style="text-align: right; margin-right: 10%;">पिएरो मोलिनो, यारोस्लाव डुडिन, और साई सुमंत मिर्याला - <strong>Uber</strong> <a href="https://eng.uber.com/ludwig-v0-2/"><small>(संदर्भ)</small></a></div>
|
||||
|
||||
---
|
||||
|
||||
"_**Netflix** हमारे **संकट प्रबंधन** ऑर्केस्ट्रेशन फ़्रेमवर्क: **Dispatch** के ओपन-सोर्स रिलीज़ की घोषणा करते हुए प्रसन्न है! [**FastAPI** के साथ बनाया गया]_"
|
||||
|
||||
<div style="text-align: right; margin-right: 10%;">केविन ग्लिसन, मार्क विलानोवा, फॉरेस्ट मॉन्सेन - <strong>Netflix</strong> <a href="https://netflixtechblog.com/introducing-dispatch-da4b8a2a8072"><small>(संदर्भ)</small></a></div>
|
||||
|
||||
---
|
||||
|
||||
"_यदि कोई प्रोडक्शन Python API बनाना चाहता है, तो मैं **FastAPI** की अत्यधिक अनुशंसा करूंगा/करूंगी। यह **सुंदरता से डिज़ाइन** किया गया है, **उपयोग में सरल** है और **बेहद स्केलेबल** है, यह हमारी API-फ़र्स्ट डेवलपमेंट रणनीति का **मुख्य घटक** बन गया है और हमारे Virtual TAC Engineer जैसे कई ऑटोमेशन्स और सेवाओं को चला रहा है._"
|
||||
|
||||
<div style="text-align: right; margin-right: 10%;">डीयोन पिल्सबरी - <strong>Cisco</strong> <a href="https://www.linkedin.com/posts/deonpillsbury_cisco-cx-python-activity-6963242628536487936-trAp/"><small>(संदर्भ)</small></a></div>
|
||||
|
||||
---
|
||||
|
||||
</div>
|
||||
|
||||
## FastAPI कॉन्फ़ { #fastapi-conf }
|
||||
|
||||
[**FastAPI Conf '26**](https://fastapiconf.com) **28 अक्टूबर, 2026** को **एम्स्टर्डम, नीदरलैंड्स** में हो रही है। सब कुछ FastAPI के बारे में, सीधे स्रोत से। 🎤
|
||||
|
||||
<a class="fastapi-feature-banner" href="https://fastapiconf.com"><img src="https://fastapi.tiangolo.com/img/fastapi-conf.jpeg" alt="FastAPI Conf '26 - 28 अक्टूबर, 2026 - एम्स्टर्डम, NL"></a>
|
||||
|
||||
## FastAPI मिनी डॉक्यूमेंट्री { #fastapi-mini-documentary }
|
||||
|
||||
साल 2025 के अंत में एक [FastAPI मिनी डॉक्यूमेंट्री](https://www.youtube.com/watch?v=mpR8ngthqiE) रिलीज़ हुई, आप इसे ऑनलाइन देख सकते हैं:
|
||||
|
||||
<a class="fastapi-feature-banner" href="https://www.youtube.com/watch?v=mpR8ngthqiE"><img src="https://fastapi.tiangolo.com/img/fastapi-documentary.jpg" alt="FastAPI मिनी डॉक्यूमेंट्री"></a>
|
||||
|
||||
## Typer, CLIs का FastAPI { #typer-the-fastapi-of-clis }
|
||||
|
||||
<a href="https://typer.tiangolo.com"><img src="https://typer.tiangolo.com/img/logo-margin/logo-margin-vector.svg" style="width: 20%;"></a>
|
||||
|
||||
यदि आप वेब API के बजाय टर्मिनल में उपयोग होने वाला <abbr title="Command Line Interface - आदेश पंक्ति इंटरफ़ेस">CLI</abbr> ऐप बना रहे हैं, तो [**Typer**](https://typer.tiangolo.com/) देखें।
|
||||
|
||||
**Typer**, FastAPI का छोटा भाई/बहन है। और इसका उद्देश्य **CLIs का FastAPI** होना है। ⌨️ 🚀
|
||||
|
||||
## आवश्यकताएँ { #requirements }
|
||||
|
||||
FastAPI दिग्गजों के कंधों पर खड़ा है:
|
||||
|
||||
* वेब हिस्सों के लिए [Starlette](https://www.starlette.dev/)।
|
||||
* डेटा हिस्सों के लिए [Pydantic](https://docs.pydantic.dev/)।
|
||||
|
||||
## स्थापना { #installation }
|
||||
|
||||
एक [वर्चुअल एन्वायरनमेंट](https://fastapi.tiangolo.com/hi/virtual-environments/) बनाएँ और सक्रिय करें, और फिर FastAPI स्थापित करें:
|
||||
|
||||
<div class="termy">
|
||||
|
||||
```console
|
||||
$ pip install "fastapi[standard]"
|
||||
|
||||
---> 100%
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
नोट: सुनिश्चित करें कि आप सभी टर्मिनलों में काम करने के लिए `"fastapi[standard]"` को उद्धरण-चिह्नों में रखें।
|
||||
|
||||
## उदाहरण { #example }
|
||||
|
||||
### इसे बनाएँ { #create-it }
|
||||
|
||||
`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, q: str | None = None):
|
||||
return {"item_id": item_id, "q": q}
|
||||
```
|
||||
|
||||
<details markdown="1">
|
||||
<summary>या <code>async def</code> का उपयोग करें...</summary>
|
||||
|
||||
यदि आपका कोड `async` / `await` का उपयोग करता है, तो `async def` का उपयोग करें:
|
||||
|
||||
```Python hl_lines="7 12"
|
||||
from fastapi import FastAPI
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
|
||||
@app.get("/")
|
||||
async def read_root():
|
||||
return {"Hello": "World"}
|
||||
|
||||
|
||||
@app.get("/items/{item_id}")
|
||||
async def read_item(item_id: int, q: str | None = None):
|
||||
return {"item_id": item_id, "q": q}
|
||||
```
|
||||
|
||||
नोट:
|
||||
|
||||
यदि आप नहीं जानते, तो _"जल्दी में?"_ सेक्शन देखें: दस्तावेज़ में [`async` और `await`](https://fastapi.tiangolo.com/hi/async/#in-a-hurry) के बारे में।
|
||||
|
||||
</details>
|
||||
|
||||
### इसे चलाएँ { #run-it }
|
||||
|
||||
सर्वर को इस कमांड से चलाएँ:
|
||||
|
||||
<div class="termy">
|
||||
|
||||
```console
|
||||
$ fastapi dev
|
||||
|
||||
╭────────── FastAPI CLI - Development mode ───────────╮
|
||||
│ │
|
||||
│ Serving at: http://127.0.0.1:8000 │
|
||||
│ │
|
||||
│ API docs: http://127.0.0.1:8000/docs │
|
||||
│ │
|
||||
│ Running in development mode, for production use: │
|
||||
│ │
|
||||
│ fastapi run │
|
||||
│ │
|
||||
╰─────────────────────────────────────────────────────╯
|
||||
|
||||
INFO: Will watch for changes in these directories: ['/home/user/code/awesomeapp']
|
||||
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
|
||||
INFO: Started reloader process [2248755] using WatchFiles
|
||||
INFO: Started server process [2248757]
|
||||
INFO: Waiting for application startup.
|
||||
INFO: Application startup complete.
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
<details markdown="1">
|
||||
<summary><code>fastapi dev</code> कमांड के बारे में...</summary>
|
||||
|
||||
`fastapi dev` कमांड आपका `main.py` फ़ाइल स्वतः पढ़ता है, उसमें **FastAPI** ऐप का पता लगाता है, और [Uvicorn](https://www.uvicorn.dev) का उपयोग करके सर्वर शुरू करता है।
|
||||
|
||||
डिफ़ॉल्ट रूप से, `fastapi dev` लोकल डेवलपमेंट के लिए auto-reload सक्षम करके शुरू होगा।
|
||||
|
||||
आप इसके बारे में और पढ़ सकते हैं: [FastAPI CLI दस्तावेज़](https://fastapi.tiangolo.com/hi/fastapi-cli/) में।
|
||||
|
||||
</details>
|
||||
|
||||
### इसे जाँचें { #check-it }
|
||||
|
||||
अपने ब्राउज़र में [http://127.0.0.1:8000/items/5?q=somequery](http://127.0.0.1:8000/items/5?q=somequery) खोलें।
|
||||
|
||||
आपको JSON प्रतिक्रिया इस प्रकार दिखेगी:
|
||||
|
||||
```JSON
|
||||
{"item_id": 5, "q": "somequery"}
|
||||
```
|
||||
|
||||
आपने पहले ही एक API बना ली है जो:
|
||||
|
||||
* _paths_ `/` और `/items/{item_id}` पर HTTP अनुरोध स्वीकार करती है।
|
||||
* दोनों _paths_ `GET` <em>operations</em> लेती हैं (जिन्हें HTTP _methods_ भी कहा जाता है)।
|
||||
* _path_ `/items/{item_id}` में एक _path parameter_ `item_id` है जो `int` होना चाहिए।
|
||||
* _path_ `/items/{item_id}` में एक वैकल्पिक `str` _query parameter_ `q` है।
|
||||
|
||||
### इंटरैक्टिव API दस्तावेज़ { #interactive-api-docs }
|
||||
|
||||
अब [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs) पर जाएँ।
|
||||
|
||||
आपको स्वचालित इंटरैक्टिव API दस्तावेज़ीकरण दिखेगा (जो [Swagger UI](https://github.com/swagger-api/swagger-ui) द्वारा प्रदान किया जाता है):
|
||||
|
||||

|
||||
|
||||
### वैकल्पिक API दस्तावेज़ { #alternative-api-docs }
|
||||
|
||||
और अब, [http://127.0.0.1:8000/redoc](http://127.0.0.1:8000/redoc) पर जाएँ।
|
||||
|
||||
आपको वैकल्पिक स्वचालित दस्तावेज़ीकरण दिखेगा (जो [ReDoc](https://github.com/Rebilly/ReDoc) द्वारा प्रदान किया जाता है):
|
||||
|
||||

|
||||
|
||||
## उदाहरण उन्नयन { #example-upgrade }
|
||||
|
||||
अब `PUT` अनुरोध से body प्राप्त करने के लिए `main.py` फ़ाइल संशोधित करें।
|
||||
|
||||
Pydantic की बदौलत, body को मानक Python प्रकारों से घोषित करें।
|
||||
|
||||
```Python hl_lines="2 7-10 23-25"
|
||||
from fastapi import FastAPI
|
||||
from pydantic import BaseModel
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
|
||||
class Item(BaseModel):
|
||||
name: str
|
||||
price: float
|
||||
is_offer: bool | None = None
|
||||
|
||||
|
||||
@app.get("/")
|
||||
def read_root():
|
||||
return {"Hello": "World"}
|
||||
|
||||
|
||||
@app.get("/items/{item_id}")
|
||||
def read_item(item_id: int, q: str | None = None):
|
||||
return {"item_id": item_id, "q": q}
|
||||
|
||||
|
||||
@app.put("/items/{item_id}")
|
||||
def update_item(item_id: int, item: Item):
|
||||
return {"item_name": item.name, "item_id": item_id}
|
||||
```
|
||||
|
||||
`fastapi dev` सर्वर स्वतः रीलोड होना चाहिए।
|
||||
|
||||
### इंटरैक्टिव API दस्तावेज़ उन्नयन { #interactive-api-docs-upgrade }
|
||||
|
||||
अब [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs) पर जाएँ।
|
||||
|
||||
* इंटरैक्टिव API दस्तावेज़ स्वतः अपडेट हो जाएगा, नए body सहित:
|
||||
|
||||

|
||||
|
||||
* "Try it out" बटन पर क्लिक करें, यह आपको parameters भरने और सीधे API के साथ इंटरेक्ट करने की अनुमति देता है:
|
||||
|
||||

|
||||
|
||||
* फिर "Execute" बटन पर क्लिक करें, यूज़र इंटरफ़ेस आपकी API से संवाद करेगा, parameters भेजेगा, परिणाम प्राप्त करेगा और उन्हें स्क्रीन पर दिखाएगा:
|
||||
|
||||

|
||||
|
||||
### वैकल्पिक API दस्तावेज़ उन्नयन { #alternative-api-docs-upgrade }
|
||||
|
||||
और अब, [http://127.0.0.1:8000/redoc](http://127.0.0.1:8000/redoc) पर जाएँ।
|
||||
|
||||
* वैकल्पिक दस्तावेज़ भी नए query parameter और body को दर्शाएगा:
|
||||
|
||||

|
||||
|
||||
### पुनरावलोकन { #recap }
|
||||
|
||||
संक्षेप में, आप parameters, body, आदि के प्रकार फ़ंक्शन parameters के रूप में **एक बार** घोषित करते हैं।
|
||||
|
||||
आप यह मानक आधुनिक Python प्रकारों से करते हैं।
|
||||
|
||||
आपको किसी नई सिंटैक्स, किसी विशेष लाइब्रेरी के methods या classes, आदि सीखने की आवश्यकता नहीं है।
|
||||
|
||||
बस मानक **Python**।
|
||||
|
||||
उदाहरण के लिए, एक `int` के लिए:
|
||||
|
||||
```Python
|
||||
item_id: int
|
||||
```
|
||||
|
||||
या एक अधिक जटिल `Item` मॉडल के लिए:
|
||||
|
||||
```Python
|
||||
item: Item
|
||||
```
|
||||
|
||||
...और केवल उसी एक घोषणा के साथ आपको मिलता है:
|
||||
|
||||
* एडिटर सपोर्ट, जिसमें शामिल है:
|
||||
* कम्प्लीशन।
|
||||
* प्रकार जाँच।
|
||||
* डेटा का वैधीकरण:
|
||||
* जब डेटा अमान्य हो तो स्वतः और स्पष्ट त्रुटियाँ।
|
||||
* गहराई से nested JSON objects के लिए भी वैधीकरण।
|
||||
* इनपुट डेटा का <dfn title="उर्फ़: सीरियलाइज़ेशन, पार्सिंग, मार्शलिंग">रूपांतरण</dfn>: नेटवर्क से Python डेटा और प्रकारों में। इनमें से पढ़ना:
|
||||
* JSON।
|
||||
* Path parameters।
|
||||
* Query parameters।
|
||||
* Cookies।
|
||||
* Headers।
|
||||
* Forms।
|
||||
* Files।
|
||||
* आउटपुट डेटा का <dfn title="उर्फ़: सीरियलाइज़ेशन, पार्सिंग, मार्शलिंग">रूपांतरण</dfn>: Python डेटा और प्रकारों से नेटवर्क डेटा (JSON के रूप में) में:
|
||||
* Python प्रकारों का रूपांतरण (`str`, `int`, `float`, `bool`, `list`, आदि)।
|
||||
* `datetime` ऑब्जेक्ट्स।
|
||||
* `UUID` ऑब्जेक्ट्स।
|
||||
* डेटाबेस मॉडल्स।
|
||||
* ...और बहुत कुछ।
|
||||
* स्वचालित इंटरैक्टिव API दस्तावेज़ीकरण, जिनमें 2 वैकल्पिक यूज़र इंटरफ़ेस शामिल हैं:
|
||||
* Swagger UI।
|
||||
* ReDoc।
|
||||
|
||||
---
|
||||
|
||||
पिछले कोड उदाहरण पर लौटते हुए, **FastAPI** यह करेगा:
|
||||
|
||||
* `GET` और `PUT` अनुरोधों के लिए path में `item_id` है, यह सत्यापित करेगा।
|
||||
* `GET` और `PUT` अनुरोधों के लिए `item_id` का प्रकार `int` है, यह सत्यापित करेगा।
|
||||
* यदि नहीं है, तो क्लाइंट को एक उपयोगी, स्पष्ट त्रुटि दिखाई देगी।
|
||||
* `GET` अनुरोधों के लिए यह जाँच करेगा कि `q` नाम का एक वैकल्पिक query parameter है (जैसे `http://127.0.0.1:8000/items/foo?q=somequery`)।
|
||||
* क्योंकि `q` parameter `= None` के साथ घोषित है, यह वैकल्पिक है।
|
||||
* `None` के बिना यह आवश्यक होता (जैसे `PUT` के मामले में body आवश्यक है)।
|
||||
* `/items/{item_id}` पर `PUT` अनुरोधों के लिए, body को JSON के रूप में पढ़ेगा:
|
||||
* यह जाँचेगा कि एक आवश्यक attribute `name` है जो `str` होना चाहिए।
|
||||
* यह जाँचेगा कि एक आवश्यक attribute `price` है जो `float` होना चाहिए।
|
||||
* यह जाँचेगा कि एक वैकल्पिक attribute `is_offer` है, जो यदि मौजूद है तो `bool` होना चाहिए।
|
||||
* यह सब गहराई से nested JSON objects के लिए भी काम करेगा।
|
||||
* JSON से और JSON में स्वतः रूपांतरण।
|
||||
* हर चीज़ को OpenAPI के साथ दस्तावेज़ित करेगा, जिसे निम्न द्वारा उपयोग किया जा सकता है:
|
||||
* इंटरैक्टिव दस्तावेज़ीकरण प्रणालियाँ।
|
||||
* कई भाषाओं के लिए स्वचालित क्लाइंट कोड जनरेशन प्रणालियाँ।
|
||||
* सीधे 2 इंटरैक्टिव दस्तावेज़ीकरण वेब इंटरफेसेज़ प्रदान करेगा।
|
||||
|
||||
---
|
||||
|
||||
हमने केवल सतह को छुआ है, लेकिन आपको पहले ही समझ आ गया होगा कि यह सब कैसे काम करता है।
|
||||
|
||||
इस पंक्ति को बदलकर देखें:
|
||||
|
||||
```Python
|
||||
return {"item_name": item.name, "item_id": item_id}
|
||||
```
|
||||
|
||||
...यहाँ से:
|
||||
|
||||
```Python
|
||||
... "item_name": item.name ...
|
||||
```
|
||||
|
||||
...यहाँ तक:
|
||||
|
||||
```Python
|
||||
... "item_price": item.price ...
|
||||
```
|
||||
|
||||
...और देखें कि आपका एडिटर attributes को कैसे auto-complete करेगा और उनके प्रकार जानेगा:
|
||||
|
||||

|
||||
|
||||
अधिक फ़ीचर्स सहित एक अधिक सम्पूर्ण उदाहरण के लिए, <a href="https://fastapi.tiangolo.com/hi/tutorial/">ट्यूटोरियल - यूज़र गाइड</a> देखें।
|
||||
|
||||
चेतावनी: ट्यूटोरियल - यूज़र गाइड में शामिल है:
|
||||
|
||||
* विभिन्न स्थानों से **parameters** की घोषणा: **headers**, **cookies**, **form fields** और **files**।
|
||||
* `maximum_length` या `regex` जैसी **validation constraints** कैसे सेट करें।
|
||||
* एक बहुत शक्तिशाली और उपयोग में आसान **<dfn title="उर्फ़: कॉम्पोनेंट्स, रिसोर्सेज़, प्रोवाइडर्स, सर्विसेज़, इंजेक्टेबल्स">डिपेंडेंसी इंजेक्शन</dfn>** सिस्टम।
|
||||
* सुरक्षा और प्रमाणीकरण, जिसमें **OAuth2** के साथ **JWT tokens** और **HTTP Basic** auth का समर्थन शामिल है।
|
||||
* **गहराई से nested JSON मॉडल्स** घोषित करने की अधिक उन्नत (पर समान रूप से आसान) तकनीकें (Pydantic की बदौलत)।
|
||||
* [Strawberry](https://strawberry.rocks) और अन्य लाइब्रेरीज़ के साथ **GraphQL** एकीकरण।
|
||||
* कई अतिरिक्त फ़ीचर्स (Starlette की बदौलत) जैसे:
|
||||
* **WebSockets**
|
||||
* HTTPX और `pytest` पर आधारित अत्यंत आसान टेस्ट्स
|
||||
* **CORS**
|
||||
* **Cookie Sessions**
|
||||
* ...आदि।
|
||||
|
||||
### अपनी ऐप परिनियोजित करें (वैकल्पिक) { #deploy-your-app-optional }
|
||||
|
||||
आप वैकल्पिक रूप से अपनी FastAPI ऐप को [FastAPI Cloud](https://fastapicloud.com) पर डिप्लॉय कर सकते हैं, यदि अभी तक नहीं किया है तो वेटिंग लिस्ट में जुड़ें। 🚀
|
||||
|
||||
यदि आपके पास पहले से **FastAPI Cloud** अकाउंट है (हमने आपको वेटिंग लिस्ट से आमंत्रित किया 😉), तो आप एक कमांड से अपनी एप्लिकेशन डिप्लॉय कर सकते हैं।
|
||||
|
||||
<div class="termy">
|
||||
|
||||
```console
|
||||
$ fastapi deploy
|
||||
|
||||
Deploying to FastAPI Cloud...
|
||||
|
||||
✅ Deployment successful!
|
||||
|
||||
🐔 Ready the chicken! Your app is ready at https://myapp.fastapicloud.dev
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
बस इतना ही! अब आप उस URL पर अपनी ऐप एक्सेस कर सकते हैं। ✨
|
||||
|
||||
#### FastAPI Cloud के बारे में { #about-fastapi-cloud }
|
||||
|
||||
**[FastAPI Cloud](https://fastapicloud.com)** को **FastAPI** के ही लेखक और टीम ने बनाया है।
|
||||
|
||||
यह न्यूनतम प्रयास में किसी API को **बनाने**, **डिप्लॉय** करने और **एक्सेस** करने की प्रक्रिया को सरल बनाता है।
|
||||
|
||||
यह FastAPI के साथ ऐप्स बनाने के उसी **डेवलपर अनुभव** को उन्हें क्लाउड में **डिप्लॉय** करने तक लाता है। 🎉
|
||||
|
||||
FastAPI Cloud, *FastAPI and friends* ओपन सोर्स प्रोजेक्ट्स के लिए मुख्य प्रायोजक और फंडिंग प्रदाता है। ✨
|
||||
|
||||
#### अन्य क्लाउड प्रदाताओं पर डिप्लॉय करें { #deploy-to-other-cloud-providers }
|
||||
|
||||
FastAPI ओपन सोर्स है और मानकों पर आधारित है। आप FastAPI ऐप्स को किसी भी क्लाउड प्रदाता पर डिप्लॉय कर सकते हैं।
|
||||
|
||||
अपने क्लाउड प्रदाता के गाइड्स का पालन करें और उनके साथ FastAPI ऐप्स डिप्लॉय करें। 🤓
|
||||
|
||||
## प्रदर्शन { #performance }
|
||||
|
||||
स्वतंत्र TechEmpower बेंचमार्क दिखाते हैं कि Uvicorn के तहत चलने वाले **FastAPI** एप्लीकेशन्स [उपलब्ध सबसे तेज़ Python फ़्रेमवर्क्स में से एक](https://www.techempower.com/benchmarks/#section=test&runid=7464e520-0dc2-473d-bd34-dbdfd7e85911&hw=ph&test=query&l=zijzen-7) हैं, केवल Starlette और Uvicorn (जो FastAPI द्वारा आंतरिक रूप से उपयोग किए जाते हैं) से नीचे। (*)
|
||||
|
||||
इसके बारे में अधिक समझने के लिए, [बेंचमार्क्स](https://fastapi.tiangolo.com/hi/benchmarks/) सेक्शन देखें।
|
||||
|
||||
## निर्भरताएँ { #dependencies }
|
||||
|
||||
FastAPI, Pydantic और Starlette पर निर्भर करता है।
|
||||
|
||||
### `standard` निर्भरताएँ { #standard-dependencies }
|
||||
|
||||
जब आप `pip install "fastapi[standard]"` के साथ FastAPI स्थापित करते हैं, तो यह `standard` समूह की वैकल्पिक निर्भरताओं के साथ आता है:
|
||||
|
||||
Pydantic द्वारा उपयोग किया गया:
|
||||
|
||||
* [`email-validator`](https://github.com/JoshData/python-email-validator) - ईमेल वैधीकरण के लिए।
|
||||
|
||||
Starlette द्वारा उपयोग किया गया:
|
||||
|
||||
* [`httpx`](https://www.python-httpx.org) - यदि आप `TestClient` का उपयोग करना चाहते हैं तो आवश्यक।
|
||||
* [`jinja2`](https://jinja.palletsprojects.com) - यदि आप डिफ़ॉल्ट टेम्पलेट कॉन्फ़िगरेशन का उपयोग करना चाहते हैं तो आवश्यक।
|
||||
* [`python-multipart`](https://github.com/Kludex/python-multipart) - यदि आप फॉर्म <dfn title="HTTP अनुरोध से आने वाली स्ट्रिंग को Python डेटा में बदलना">"पार्सिंग"</dfn> का समर्थन करना चाहते हैं, `request.form()` के साथ, तो आवश्यक।
|
||||
|
||||
FastAPI द्वारा उपयोग किया गया:
|
||||
|
||||
* [`uvicorn`](https://www.uvicorn.dev) - वह सर्वर जो आपकी एप्लिकेशन को लोड और सर्व करता है। इसमें `uvicorn[standard]` शामिल है, जिसमें उच्च-प्रदर्शन सर्विंग के लिए कुछ निर्भरताएँ (जैसे `uvloop`) शामिल हैं।
|
||||
* `fastapi-cli[standard]` - `fastapi` कमांड प्रदान करने के लिए।
|
||||
* इसमें `fastapi-cloud-cli` शामिल है, जो आपको अपनी FastAPI एप्लिकेशन को [FastAPI Cloud](https://fastapicloud.com) पर डिप्लॉय करने की अनुमति देता है।
|
||||
|
||||
### `standard` निर्भरताओं के बिना { #without-standard-dependencies }
|
||||
|
||||
यदि आप `standard` वैकल्पिक निर्भरताओं को शामिल नहीं करना चाहते, तो आप `pip install fastapi` के साथ स्थापित कर सकते हैं, `pip install "fastapi[standard]"` के बजाय।
|
||||
|
||||
### `fastapi-cloud-cli` के बिना { #without-fastapi-cloud-cli }
|
||||
|
||||
यदि आप standard निर्भरताओं के साथ लेकिन `fastapi-cloud-cli` के बिना FastAPI स्थापित करना चाहते हैं, तो `pip install "fastapi[standard-no-fastapi-cloud-cli]"` के साथ स्थापित कर सकते हैं।
|
||||
|
||||
### अतिरिक्त वैकल्पिक निर्भरताएँ { #additional-optional-dependencies }
|
||||
|
||||
कुछ अतिरिक्त निर्भरताएँ हैं जिन्हें आप स्थापित करना चाहेंगे।
|
||||
|
||||
अतिरिक्त वैकल्पिक Pydantic निर्भरताएँ:
|
||||
|
||||
* [`pydantic-settings`](https://docs.pydantic.dev/latest/usage/pydantic_settings/) - सेटिंग्स प्रबंधन के लिए।
|
||||
* [`pydantic-extra-types`](https://docs.pydantic.dev/latest/usage/types/extra_types/extra_types/) - Pydantic के साथ उपयोग करने के लिए अतिरिक्त प्रकारों हेतु।
|
||||
|
||||
अतिरिक्त वैकल्पिक FastAPI निर्भरताएँ:
|
||||
|
||||
* [`orjson`](https://github.com/ijl/orjson) - यदि आप `ORJSONResponse` उपयोग करना चाहते हैं तो आवश्यक।
|
||||
* [`ujson`](https://github.com/esnme/ultrajson) - यदि आप `UJSONResponse` उपयोग करना चाहते हैं तो आवश्यक।
|
||||
|
||||
## लाइसेंस { #license }
|
||||
|
||||
यह प्रोजेक्ट MIT लाइसेंस की शर्तों के अंतर्गत लाइसेंस प्राप्त है।
|
||||
11
docs/hi/docs/translation-banner.md
Normal file
11
docs/hi/docs/translation-banner.md
Normal file
@@ -0,0 +1,11 @@
|
||||
/// details | 🌐 एआई और मनुष्यों द्वारा किया गया अनुवाद
|
||||
|
||||
यह अनुवाद मनुष्यों के मार्गदर्शन में एआई द्वारा किया गया है। 🤝
|
||||
|
||||
इसमें मूल अर्थ को गलत समझने या अप्राकृतिक लगने आदि जैसी गलतियाँ हो सकती हैं। 🤖
|
||||
|
||||
आप [हमें एआई LLM को बेहतर मार्गदर्शन करने में मदद करके](https://fastapi.tiangolo.com/hi/contributing/#translations) इस अनुवाद को बेहतर बना सकते हैं।
|
||||
|
||||
[अंग्रेज़ी संस्करण](ENGLISH_VERSION_URL)
|
||||
|
||||
///
|
||||
5
docs/hi/llm-prompt.md
Normal file
5
docs/hi/llm-prompt.md
Normal file
@@ -0,0 +1,5 @@
|
||||
### Target language
|
||||
|
||||
Translate to Hindi (हिन्दी).
|
||||
|
||||
Language code: hi.
|
||||
1
docs/hi/mkdocs.yml
Normal file
1
docs/hi/mkdocs.yml
Normal file
@@ -0,0 +1 @@
|
||||
INHERIT: ../en/mkdocs.yml
|
||||
@@ -124,6 +124,10 @@ works(foo="bar") # これは動作します 🎉
|
||||
|
||||
//// tab | テスト
|
||||
|
||||
/// info | 情報
|
||||
いくつかのテキスト
|
||||
///
|
||||
|
||||
/// note | 備考
|
||||
いくつかのテキスト
|
||||
///
|
||||
@@ -132,6 +136,10 @@ works(foo="bar") # これは動作します 🎉
|
||||
いくつかのテキスト
|
||||
///
|
||||
|
||||
/// check | 確認
|
||||
いくつかのテキスト
|
||||
///
|
||||
|
||||
/// tip | 豆知識
|
||||
いくつかのテキスト
|
||||
///
|
||||
|
||||
@@ -36,7 +36,7 @@ Django REST Framework は Tom Christie によって作成されました。Starl
|
||||
|
||||
///
|
||||
|
||||
/// tip | **FastAPI**へ与えたインスピレーション
|
||||
/// check | **FastAPI**へ与えたインスピレーション
|
||||
|
||||
自動でAPIドキュメントを生成するWebユーザーインターフェースを持っている点。
|
||||
|
||||
@@ -56,7 +56,7 @@ Flask は「マイクロフレームワーク」であり、データベース
|
||||
|
||||
Flaskのシンプルさを考えると、APIを構築するのに適しているように思えました。次に見つけるべきは、Flask 用の「Django REST Framework」でした。
|
||||
|
||||
/// tip | **FastAPI**へ与えたインスピレーション
|
||||
/// check | **FastAPI**へ与えたインスピレーション
|
||||
|
||||
マイクロフレームワークであること。ツールやパーツを目的に合うように簡単に組み合わせられる点。
|
||||
|
||||
@@ -98,7 +98,7 @@ def read_url():
|
||||
|
||||
`requests.get(...)` と`@app.get(...)` には類似点が見受けられます。
|
||||
|
||||
/// tip | **FastAPI**へ与えたインスピレーション
|
||||
/// check | **FastAPI**へ与えたインスピレーション
|
||||
|
||||
* シンプルで直感的なAPIを持っている点。
|
||||
* HTTPメソッド名を直接利用し、単純で直感的である。
|
||||
@@ -118,7 +118,7 @@ def read_url():
|
||||
|
||||
そのため、バージョン2.0では「Swagger」、バージョン3以上では「OpenAPI」と表記するのが一般的です。
|
||||
|
||||
/// tip | **FastAPI**へ与えたインスピレーション
|
||||
/// check | **FastAPI**へ与えたインスピレーション
|
||||
|
||||
独自のスキーマの代わりに、API仕様のオープンな標準を採用しました。
|
||||
|
||||
@@ -147,7 +147,7 @@ APIが必要とするもう一つの大きな機能はデータのバリデー
|
||||
|
||||
しかし、それはPythonの型ヒントが存在する前に作られたものです。そのため、すべての<dfn title="データがどのように構成されるべきかの定義">スキーマ</dfn>を定義するためには、Marshmallowが提供する特定のユーティリティやクラスを使用する必要があります。
|
||||
|
||||
/// tip | **FastAPI**へ与えたインスピレーション
|
||||
/// check | **FastAPI**へ与えたインスピレーション
|
||||
|
||||
コードで「スキーマ」を定義し、データの型やバリデーションを自動で提供する点。
|
||||
|
||||
@@ -163,13 +163,13 @@ WebargsはFlaskをはじめとするいくつかのフレームワークの上
|
||||
|
||||
素晴らしいツールで、私も**FastAPI**を持つ前はよく使っていました。
|
||||
|
||||
/// note | 備考
|
||||
/// info | 情報
|
||||
|
||||
Webargsは、Marshmallowと同じ開発者により作られました。
|
||||
|
||||
///
|
||||
|
||||
/// tip | **FastAPI**へ与えたインスピレーション
|
||||
/// check | **FastAPI**へ与えたインスピレーション
|
||||
|
||||
受信したデータに対する自動的なバリデーションを持っている点。
|
||||
|
||||
@@ -193,13 +193,13 @@ Flask, Starlette, Responderなどにおいてはそのように動作します
|
||||
|
||||
エディタでは、この問題を解決することはできません。また、パラメータやMarshmallowスキーマを変更したときに、YAMLのdocstringを変更するのを忘れてしまうと、生成されたスキーマが古くなってしまいます。
|
||||
|
||||
/// note | 備考
|
||||
/// info | 情報
|
||||
|
||||
APISpecは、Marshmallowと同じ開発者により作成されました。
|
||||
|
||||
///
|
||||
|
||||
/// tip | **FastAPI**へ与えたインスピレーション
|
||||
/// check | **FastAPI**へ与えたインスピレーション
|
||||
|
||||
OpenAPIという、APIについてのオープンな標準をサポートしている点。
|
||||
|
||||
@@ -225,13 +225,13 @@ Flask、Flask-apispec、Marshmallow、Webargsの組み合わせは、**FastAPI**
|
||||
|
||||
そして、これらのフルスタックジェネレーターは、[**FastAPI** Project Generators](project-generation.md)の元となっていました。
|
||||
|
||||
/// note | 備考
|
||||
/// info | 情報
|
||||
|
||||
Flask-apispecはMarshmallowと同じ開発者により作成されました。
|
||||
|
||||
///
|
||||
|
||||
/// tip | **FastAPI**へ与えたインスピレーション
|
||||
/// check | **FastAPI**へ与えたインスピレーション
|
||||
|
||||
シリアライゼーションとバリデーションを定義したコードから、OpenAPIスキーマを自動的に生成する点。
|
||||
|
||||
@@ -251,7 +251,7 @@ Angular 2にインスピレーションを受けた、統合された依存性
|
||||
|
||||
入れ子になったモデルをうまく扱えません。そのため、リクエストのJSONボディが内部フィールドを持つJSONオブジェクトで、それが順番にネストされたJSONオブジェクトになっている場合、適切にドキュメント化やバリデーションをすることができません。
|
||||
|
||||
/// tip | **FastAPI**へ与えたインスピレーション
|
||||
/// check | **FastAPI**へ与えたインスピレーション
|
||||
|
||||
素晴らしいエディターの補助を得るために、Pythonの型ヒントを利用している点。
|
||||
|
||||
@@ -271,7 +271,7 @@ Pythonの`asyncio`ループの代わりに、[`uvloop`](https://github.com/Magic
|
||||
|
||||
///
|
||||
|
||||
/// tip | **FastAPI**へ与えたインスピレーション
|
||||
/// check | **FastAPI**へ与えたインスピレーション
|
||||
|
||||
物凄い性能を出す方法を見つけた点。
|
||||
|
||||
@@ -287,7 +287,7 @@ Falconはもう一つの高性能Pythonフレームワークで、ミニマム
|
||||
|
||||
そのため、データのバリデーション、シリアライゼーション、ドキュメント化は、自動的にできずコードの中で行わなければなりません。あるいは、HugのようにFalconの上にフレームワークとして実装されなければなりません。このような分断は、パラメータとして1つのリクエストオブジェクトと1つのレスポンスオブジェクトを持つというFalconのデザインにインスピレーションを受けた他のフレームワークでも起こります。
|
||||
|
||||
/// tip | **FastAPI**へ与えたインスピレーション
|
||||
/// check | **FastAPI**へ与えたインスピレーション
|
||||
|
||||
素晴らしい性能を得るための方法を見つけた点。
|
||||
|
||||
@@ -313,11 +313,11 @@ Pydanticのようなデータのバリデーション、シリアライゼーシ
|
||||
|
||||
ルーティングは一つの場所で宣言され、他の場所で宣言された関数を使用します (エンドポイントを扱う関数のすぐ上に配置できるデコレータを使用するのではなく) 。これはFlask (やStarlette) よりも、Djangoに近いです。これは、比較的緊密に結合されているものをコードの中で分離しています。
|
||||
|
||||
/// tip | **FastAPI**へ与えたインスピレーション
|
||||
/// check | **FastAPI**へ与えたインスピレーション
|
||||
|
||||
モデルの属性の「デフォルト」値を使用したデータ型の追加バリデーションを定義します。これはエディタの補助を改善するもので、以前はPydanticでは利用できませんでした。
|
||||
|
||||
同様の方法でのバリデーションの宣言をサポートするよう、Pydanticを部分的にアップデートするインスピレーションを与えました。(現在はこれらの機能は全てPydanticで可能となっています。)
|
||||
同様の方法でのバリデーションの宣言をサポートするよう、Pydanticを部分的にアップデートするインスピーレションを与えました。(現在はこれらの機能は全てPydanticで可能となっています。)
|
||||
|
||||
///
|
||||
|
||||
@@ -335,13 +335,13 @@ OpenAPIやJSON Schemaのような標準に基づいたものではありませ
|
||||
|
||||
以前のPythonの同期型Webフレームワーク標準 (WSGI) をベースにしているため、Websocketなどは扱えませんが、それでも高性能です。
|
||||
|
||||
/// note | 備考
|
||||
/// info | 情報
|
||||
|
||||
HugはTimothy Crosleyにより作成されました。彼は[`isort`](https://github.com/timothycrosley/isort)など、Pythonのファイル内のインポートの並び替えを自動的におこうなう素晴らしいツールの開発者です。
|
||||
|
||||
///
|
||||
|
||||
/// tip | **FastAPI**へ与えたインスピレーション
|
||||
/// check | **FastAPI**へ与えたインスピレーション
|
||||
|
||||
HugはAPIStarに部分的なインスピレーションを与えており、私が発見した中ではAPIStarと同様に最も期待の持てるツールの一つでした。
|
||||
|
||||
@@ -375,7 +375,7 @@ Hugは、**FastAPI**がヘッダーやクッキーを設定するために関数
|
||||
|
||||
今ではAPIStarはOpenAPI仕様を検証するためのツールセットであり、ウェブフレームワークではありません。
|
||||
|
||||
/// note | 備考
|
||||
/// info | 情報
|
||||
|
||||
APIStarはTom Christieにより開発されました。以下の開発者でもあります:
|
||||
|
||||
@@ -385,7 +385,7 @@ APIStarはTom Christieにより開発されました。以下の開発者でも
|
||||
|
||||
///
|
||||
|
||||
/// tip | **FastAPI**へ与えたインスピレーション
|
||||
/// check | **FastAPI**へ与えたインスピレーション
|
||||
|
||||
存在そのもの。
|
||||
|
||||
@@ -409,7 +409,7 @@ Pydanticは、Pythonの型ヒントを元にデータのバリデーション、
|
||||
|
||||
Marshmallowに匹敵しますが、ベンチマークではMarshmallowよりも高速です。また、Pythonの型ヒントを元にしているので、エディタの補助が素晴らしいです。
|
||||
|
||||
/// tip | **FastAPI**での使用用途
|
||||
/// check | **FastAPI**での使用用途
|
||||
|
||||
データのバリデーション、データのシリアライゼーション、自動的なモデルの (JSON Schemaに基づいた) ドキュメント化の全てを扱えます。
|
||||
|
||||
@@ -452,7 +452,7 @@ ASGIはDjangoのコアチームメンバーにより開発された新しい「
|
||||
|
||||
///
|
||||
|
||||
/// tip | **FastAPI**での使用用途
|
||||
/// check | **FastAPI**での使用用途
|
||||
|
||||
webに関するコアな部分を全て扱います。その上に機能を追加します。
|
||||
|
||||
@@ -470,7 +470,7 @@ Uvicornは非常に高速なASGIサーバーで、uvloopとhttptoolsにより構
|
||||
|
||||
Starletteや**FastAPI**のサーバーとして推奨されています。
|
||||
|
||||
/// tip | **FastAPI**が推奨する理由
|
||||
/// check | **FastAPI**が推奨する理由
|
||||
|
||||
**FastAPI**アプリケーションを実行するメインのウェブサーバーである点。
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ def results():
|
||||
|
||||
<img src="/img/async/concurrent-burgers/concurrent-burgers-07.png" class="illustration">
|
||||
|
||||
/// note | 備考
|
||||
/// info | 情報
|
||||
|
||||
美しいイラストは [Ketrina Thompson](https://www.instagram.com/ketrinadrawsalot) によるものです。🎨
|
||||
|
||||
@@ -205,7 +205,7 @@ def results():
|
||||
|
||||
ほとんどの時間をカウンター前で待つ 🕙 のに費やしたため、あまり話したり、いちゃついたりできませんでした。😞
|
||||
|
||||
/// note | 備考
|
||||
/// info | 情報
|
||||
|
||||
美しいイラストは [Ketrina Thompson](https://www.instagram.com/ketrinadrawsalot) によるものです。🎨
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ entrypoint = "backend.main:app"
|
||||
from backend.main import app
|
||||
```
|
||||
|
||||
### パス指定または `--entrypoint` オプション付きの `fastapi dev` { #fastapi-dev-with-path-or-with-entrypoint-cli-option }
|
||||
### パス指定での `fastapi dev` { #fastapi-dev-with-path }
|
||||
|
||||
`fastapi dev` コマンドにファイルパスを渡すこともでき、使用する FastAPI アプリオブジェクトを推測します:
|
||||
|
||||
@@ -103,13 +103,7 @@ from backend.main import app
|
||||
$ fastapi dev main.py
|
||||
```
|
||||
|
||||
または、`fastapi dev` コマンドに `--entrypoint` オプションを渡すこともできます:
|
||||
|
||||
```console
|
||||
$ fastapi dev --entrypoint main:app
|
||||
```
|
||||
|
||||
ただし、そのたびに `fastapi` コマンドを呼び出す際に正しいパスや entrypoint を渡す必要があります。
|
||||
ただし、そのたびに `fastapi` コマンドを呼び出す際に正しいパスを渡す必要があります。
|
||||
|
||||
さらに、[VS Code 拡張機能](editor-support.md) や [FastAPI Cloud](https://fastapicloud.com) など、ほかのツールがそれを見つけられない場合があります。そのため、`pyproject.toml` の `entrypoint` を使用することを推奨します。
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user