Compare commits

...

4106 Commits

Author SHA1 Message Date
github-actions[bot] 9653034b8d 📝 Update release notes
[skip ci]
2026-04-13 12:43:51 +00:00
dependabot[bot] 6f9a102faf
⬆ Bump cryptography from 46.0.5 to 46.0.7 (#15314)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-13 14:43:26 +02:00
github-actions[bot] eba8942c81 📝 Update release notes
[skip ci]
2026-04-07 09:50:22 +00:00
dependabot[bot] 77d080caf8
⬆ Bump strawberry-graphql from 0.307.1 to 0.312.3 (#15309)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-07 11:49:52 +02:00
github-actions[bot] c3c9dd6b1a 📝 Update release notes
[skip ci]
2026-04-03 12:07:04 +00:00
Motov Yurii 180e81bb4b
🔨 Add pre-commit hook to ensure latest release header has date (#15293) 2026-04-03 14:06:36 +02:00
Sebastián Ramírez 1f442c454f 🔖 Release version 0.135.3 2026-04-01 18:21:01 +02:00
Sebastián Ramírez 8f5d1577b4 📝 Update release notes 2026-04-01 18:18:42 +02:00
github-actions[bot] 428452a710 📝 Update release notes
[skip ci]
2026-04-01 16:16:52 +00:00
Sebastián Ramírez 70580da818
Add support for `@app.vibe()` (#15280) 2026-04-01 18:16:24 +02:00
github-actions[bot] 6ee87478d8 📝 Update release notes
[skip ci]
2026-04-01 15:47:49 +00:00
Sebastián Ramírez 3e72c09a2a
👥 Update FastAPI People - Experts (#15279)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-01 17:47:21 +02:00
github-actions[bot] 96df35f7a4 📝 Update release notes
[skip ci]
2026-04-01 14:30:30 +00:00
dependabot[bot] 6c8112555b
⬆ Bump orjson from 3.11.7 to 3.11.8 (#15276)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-01 16:29:59 +02:00
github-actions[bot] 428f82c936 📝 Update release notes
[skip ci]
2026-04-01 14:27:53 +00:00
dependabot[bot] 5599c59b9e
⬆ Bump ruff from 0.15.0 to 0.15.8 (#15277)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-01 16:27:20 +02:00
github-actions[bot] cc47796509 📝 Update release notes
[skip ci]
2026-04-01 12:37:11 +00:00
Sebastián Ramírez 9274097c30
👥 Update FastAPI GitHub topic repositories (#15274)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-01 14:36:41 +02:00
github-actions[bot] 681146d90b 📝 Update release notes
[skip ci]
2026-04-01 07:33:52 +00:00
dependabot[bot] cb4fe1b453
⬆ Bump fastmcp from 2.14.5 to 3.2.0 (#15267)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-01 09:33:06 +02:00
github-actions[bot] a15609f56d 📝 Update release notes
[skip ci]
2026-04-01 07:32:21 +00:00
Sebastián Ramírez 81194139aa
👥 Update FastAPI People - Contributors and Translators (#15270)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-01 09:31:54 +02:00
github-actions[bot] d128a7089a 📝 Update release notes
[skip ci]
2026-03-26 21:53:12 +00:00
dependabot[bot] 3b9d8481c5
⬆ Bump requests from 2.32.5 to 2.33.0 (#15228)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-26 22:52:50 +01:00
github-actions[bot] 937d3075f9 📝 Update release notes
[skip ci]
2026-03-24 16:39:58 +00:00
Sofie Van Landeghem 8238446b1b
👷 Add ty check to `lint.sh` (#15136) 2026-03-24 17:39:32 +01:00
github-actions[bot] e2a0fd4ad8 📝 Update release notes
[skip ci]
2026-03-24 16:32:36 +00:00
Kadir Can Ozden fa3588c38c
✏️ Fix typo for `client_secret` in OAuth2 form docstrings (#14946) 2026-03-24 17:32:10 +01:00
Sebastián Ramírez 25a3697ced 🔖 Release version 0.135.2 2026-03-23 15:10:41 +01:00
github-actions[bot] ab125daa40 📝 Update release notes
[skip ci]
2026-03-23 14:08:35 +00:00
Sebastián Ramírez 122b6d490f
📝 Add missing last release notes dates (#15202) 2026-03-23 14:08:07 +00:00
github-actions[bot] 68ac0ab91e 📝 Update release notes
[skip ci]
2026-03-23 13:59:57 +00:00
Motov Yurii ea6e287eb3
📝 Update docs for contributors and team members regarding translation PRs (#15200) 2026-03-23 14:59:26 +01:00
github-actions[bot] d0a6f208c5 📝 Update release notes
[skip ci]
2026-03-23 13:57:14 +00:00
Motov Yurii fd9e192cf4
💄 Fix code blocks in reference docs overflowing table width (#15094) 2026-03-23 14:56:46 +01:00
github-actions[bot] fce9460f86 📝 Update release notes
[skip ci]
2026-03-23 13:51:55 +00:00
Motov Yurii 0227991a01
🔨 Exclude spam comments from statistics in `scripts/people.py` (#15088) 2026-03-23 14:51:24 +01:00
github-actions[bot] cbd64b09a3 📝 Update release notes
[skip ci]
2026-03-23 12:37:17 +00:00
Sofie Van Landeghem aeb9f4bb85
⬆️ Increase lower bound to `pydantic >=2.9.0.` and fix the test suite (#15139)
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2026-03-23 13:36:49 +01:00
github-actions[bot] 64feaec802 📝 Update release notes
[skip ci]
2026-03-20 17:07:25 +00:00
Sebastián Ramírez 12bbd9453f
🌐 Update translations for zh (update-outdated) (#15177)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
2026-03-20 18:06:37 +01:00
github-actions[bot] 453988f359 📝 Update release notes
[skip ci]
2026-03-20 17:06:04 +00:00
Sebastián Ramírez fe98ea307a
🌐 Update translations for zh-hant (update-outdated) (#15178)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
2026-03-20 18:05:38 +01:00
github-actions[bot] b7bd1874fe 📝 Update release notes
[skip ci]
2026-03-20 15:29:22 +00:00
dependabot[bot] 602ddc2e51
⬆ Bump authlib from 1.6.7 to 1.6.9 (#15128)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2026-03-20 16:28:53 +01:00
github-actions[bot] 30bd2d5878 📝 Update release notes
[skip ci]
2026-03-20 15:02:05 +00:00
github-actions[bot] a4e005c140 📝 Update release notes
[skip ci]
2026-03-20 15:00:28 +00:00
dependabot[bot] 6cd66ace1c
⬆ Bump pyasn1 from 0.6.2 to 0.6.3 (#15143)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-20 16:00:21 +01:00
dependabot[bot] 2fba244c3a
⬆ Bump ujson from 5.11.0 to 5.12.0 (#15150)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-20 15:59:48 +01:00
github-actions[bot] 6cd1a2c75d 📝 Update release notes
[skip ci]
2026-03-20 14:33:32 +00:00
Sebastián Ramírez df4417efa5
🌐 Update translations for zh-hant (add-missing) (#15176)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-20 14:33:04 +00:00
github-actions[bot] 1122d37676 📝 Update release notes
[skip ci]
2026-03-20 14:30:15 +00:00
Sebastián Ramírez 5ef5490bc4
🌐 Update translations for zh (add-missing) (#15175)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-20 15:29:48 +01:00
github-actions[bot] b4f81b40a8 📝 Update release notes
[skip ci]
2026-03-20 14:07:59 +00:00
Sebastián Ramírez 311ce1cfa5
🌐 Update translations for ja (update-outdated) (#15171)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
2026-03-20 15:07:17 +01:00
github-actions[bot] 92cc0bd9de 📝 Update release notes
[skip ci]
2026-03-20 14:07:04 +00:00
Sebastián Ramírez 7e63d4250a
🌐 Update translations for ko (update-outdated) (#15170)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
2026-03-20 15:06:26 +01:00
github-actions[bot] 9d6ee88e8f 📝 Update release notes
[skip ci]
2026-03-20 07:53:39 +00:00
Sebastián Ramírez d90c38572b
🌐 Update translations for tr (update-outdated) (#15172)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
2026-03-20 07:53:17 +00:00
github-actions[bot] a28b785ed7 📝 Update release notes
[skip ci]
2026-03-19 18:57:03 +00:00
Sebastián Ramírez 07dfa9a5ae
🌐 Update translations for ko (add-missing) (#15168)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-19 18:56:39 +00:00
github-actions[bot] 019471bc6c 📝 Update release notes
[skip ci]
2026-03-19 18:56:09 +00:00
Sebastián Ramírez bd1305c796
🌐 Update translations for ja (add-missing) (#15167)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-19 18:55:22 +00:00
github-actions[bot] bdb0b2d6dd 📝 Update release notes
[skip ci]
2026-03-19 18:52:00 +00:00
Sebastián Ramírez f00bd2be07
🌐 Update translations for tr (add-missing) (#15169)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-19 19:51:35 +01:00
github-actions[bot] aa62c2f8df 📝 Update release notes
[skip ci]
2026-03-19 18:37:43 +00:00
Sebastián Ramírez fdf31c110b
🌐 Update translations for fr (update-outdated) (#15165)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
2026-03-19 18:37:13 +00:00
github-actions[bot] c457177969 📝 Update release notes
[skip ci]
2026-03-19 18:34:13 +00:00
Sebastián Ramírez 98d3f9a2e8
🌐 Update translations for fr (add-missing) (#15163)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-19 18:33:45 +00:00
github-actions[bot] fe5332fbed 📝 Update release notes
[skip ci]
2026-03-19 18:28:21 +00:00
Sebastián Ramírez f97b72a754
🌐 Update translations for uk (update-outdated) (#15160)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
2026-03-19 18:27:41 +00:00
github-actions[bot] 7451444663 📝 Update release notes
[skip ci]
2026-03-19 18:26:21 +00:00
Sebastián Ramírez dc689a9ee3
🌐 Update translations for uk (add-missing) (#15158)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-19 18:25:54 +00:00
github-actions[bot] 9671f78d29 📝 Update release notes
[skip ci]
2026-03-19 18:21:16 +00:00
github-actions[bot] 9dc22c3f1d 📝 Update release notes
[skip ci]
2026-03-19 18:21:11 +00:00
Sebastián Ramírez 40301c86ee
🌐 Update translations for pt (update-outdated) (#15159)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
2026-03-19 18:20:43 +00:00
Sebastián Ramírez 06cdff4488
🌐 Update translations for pt (add-missing) (#15157)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-19 19:20:13 +01:00
github-actions[bot] 2742546af6 📝 Update release notes
[skip ci]
2026-03-19 18:16:23 +00:00
Sebastián Ramírez 869de156e8
🌐 Update translations for es (update-outdated) (#15155)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
2026-03-19 19:15:55 +01:00
github-actions[bot] 75e5fdfef8 📝 Update release notes
[skip ci]
2026-03-19 18:12:51 +00:00
Sebastián Ramírez cd5869b897
🌐 Update translations for es (add-missing) (#15154)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-19 19:12:26 +01:00
github-actions[bot] b61bdb79b8 📝 Update release notes
[skip ci]
2026-03-19 17:58:37 +00:00
Sebastián Ramírez 63f89410ed
🌐 Update translations for de (update-outdated) (#15156)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
2026-03-19 18:58:09 +01:00
github-actions[bot] ab1a792b70 📝 Update release notes
[skip ci]
2026-03-19 17:56:48 +00:00
Sebastián Ramírez 12cf2bd854
🌐 Update translations for ru (update-and-add) (#15152)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
2026-03-19 18:56:20 +01:00
github-actions[bot] 48f8e87691 📝 Update release notes
[skip ci]
2026-03-19 17:48:49 +00:00
Sebastián Ramírez 96beaeb167
🌐 Update translations for de (add-missing) (#15153)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-19 18:48:21 +01:00
github-actions[bot] 4889a9659c 📝 Update release notes
[skip ci]
2026-03-19 17:38:08 +00:00
Motov Yurii 9960db5abf
🔨 Tweak translation workflow and translation fixer tool (#15166) 2026-03-19 18:37:41 +01:00
github-actions[bot] b707bb8a70 📝 Update release notes
[skip ci]
2026-03-18 15:37:28 +00:00
Motov Yurii 6e5e94208e
🔨 Fix `commit_in_place` passed via env variable in `translate.yml` workflow (#15151) 2026-03-18 16:36:56 +01:00
github-actions[bot] 1438858737 📝 Update release notes
[skip ci]
2026-03-18 10:56:02 +00:00
Motov Yurii b0895003c5
🔨 Update translation general prompt to enforce link style in translation matches the original link style (#15148) 2026-03-18 11:55:36 +01:00
github-actions[bot] 074dd02915 📝 Update release notes
[skip ci]
2026-03-18 08:21:26 +00:00
Motov Yurii d75bc1b724
👷 Re-enable translation workflow run by cron in CI (twice a month) (#15145)
* Re-enable translation workflow in CI

* Run translation workflow twice a month
2026-03-18 09:21:01 +01:00
github-actions[bot] 0127069d47 📝 Update release notes
[skip ci]
2026-03-16 10:17:16 +00:00
Ahsan Sheraz 31bbb38074
📝 Fix duplicated words in docstrings (#15116)
Fix "to to" and "that that" word duplications in security module docstrings,
and "be be" in test data string.

Co-authored-by: ahsan.sheraz <ahsan.sheraz@bonial.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 11:16:48 +01:00
github-actions[bot] eb6851dd4b 📝 Update release notes
[skip ci]
2026-03-15 11:45:11 +00:00
Sofie Van Landeghem 98b269b51e
👷 Add `ty` to precommit (#15091)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2026-03-15 12:44:39 +01:00
github-actions[bot] 7e7c4d09ac 📝 Update release notes
[skip ci]
2026-03-14 15:02:03 +00:00
dependabot[bot] b4b76c811b
⬆ Bump dorny/paths-filter from 3 to 4 (#15106)
Bumps [dorny/paths-filter](https://github.com/dorny/paths-filter) from 3 to 4.
- [Release notes](https://github.com/dorny/paths-filter/releases)
- [Changelog](https://github.com/dorny/paths-filter/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dorny/paths-filter/compare/v3...v4)

---
updated-dependencies:
- dependency-name: dorny/paths-filter
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-14 16:01:34 +01:00
github-actions[bot] ae08a807a7 📝 Update release notes
[skip ci]
2026-03-14 15:01:19 +00:00
dependabot[bot] e4f19cd5c4
⬆ Bump cairosvg from 2.8.2 to 2.9.0 (#15108)
Bumps [cairosvg](https://github.com/Kozea/CairoSVG) from 2.8.2 to 2.9.0.
- [Release notes](https://github.com/Kozea/CairoSVG/releases)
- [Changelog](https://github.com/Kozea/CairoSVG/blob/main/NEWS.rst)
- [Commits](https://github.com/Kozea/CairoSVG/compare/2.8.2...2.9.0)

---
updated-dependencies:
- dependency-name: cairosvg
  dependency-version: 2.9.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-14 16:00:22 +01:00
github-actions[bot] 9d9d51e054 📝 Update release notes
[skip ci]
2026-03-14 15:00:03 +00:00
dependabot[bot] a007932885
⬆ Bump pyjwt from 2.11.0 to 2.12.0 (#15110)
Bumps [pyjwt](https://github.com/jpadilla/pyjwt) from 2.11.0 to 2.12.0.
- [Release notes](https://github.com/jpadilla/pyjwt/releases)
- [Changelog](https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/jpadilla/pyjwt/compare/2.11.0...2.12.0)

---
updated-dependencies:
- dependency-name: pyjwt
  dependency-version: 2.12.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-14 15:59:36 +01:00
github-actions[bot] 04b279fe77 📝 Update release notes
[skip ci]
2026-03-12 21:15:19 +00:00
dependabot[bot] 4b826022b1
⬆ Bump black from 26.1.0 to 26.3.1 (#15100)
Bumps [black](https://github.com/psf/black) from 26.1.0 to 26.3.1.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/26.1.0...26.3.1)

---
updated-dependencies:
- dependency-name: black
  dependency-version: 26.3.1
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-12 21:14:44 +00:00
github-actions[bot] 11614be902 📝 Update release notes
[skip ci]
2026-03-07 09:29:24 +00:00
Sebastián Ramírez edaf23943c
📝 Add docs for `pyproject.toml` with `entrypoint` (#15075) 2026-03-07 10:29:03 +01:00
github-actions[bot] 627c10a293 📝 Update release notes
[skip ci]
2026-03-05 18:14:11 +00:00
Sebastián Ramírez 5b485f0848
📝 Update links in docs to no longer use the classes external-link and internal-link (#15061) 2026-03-05 19:13:19 +01:00
github-actions[bot] b618ba2792 📝 Update release notes
[skip ci]
2026-03-05 18:08:06 +00:00
Sebastián Ramírez f552fd3254
🔨 Add JS and CSS handling for automatic `target=_blank` for links in docs (#15063) 2026-03-05 18:59:48 +01:00
github-actions[bot] d23918588e 📝 Update release notes
[skip ci]
2026-03-05 17:58:48 +00:00
Sebastián Ramírez 0c0be9429f
🔨 Update script to autofix permalinks to account for headers with Markdown links (#15062) 2026-03-05 17:46:10 +00:00
github-actions[bot] b27fe99c2f 📝 Update release notes
[skip ci]
2026-03-05 11:54:36 +00:00
Sebastián Ramírez 8d6fdc80e8
💄 Update styles for internal and external links in new tab (#15058) 2026-03-05 11:54:05 +00:00
github-actions[bot] 4d6a5470bc 📝 Update release notes
[skip ci]
2026-03-05 11:27:42 +00:00
Savannah Ostrowski 196cafa07a
📝 Add documentation for the FastAPI VS Code extension (#15008)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2026-03-05 12:27:12 +01:00
github-actions[bot] e26eb871f8 📝 Update release notes
[skip ci]
2026-03-05 10:35:51 +00:00
Sebastián Ramírez 9d475aae74
📌 Pin Click for MkDocs live reload (#15057) 2026-03-05 10:35:17 +00:00
github-actions[bot] 365fad3c7b 📝 Update release notes
[skip ci]
2026-03-04 12:53:13 +00:00
Motov Yurii 8b0090c39b
📝 Fix doctrings for `max_digits` and `decimal_places` (#14944)
Fix doctrings for `max_digits` and `decimal_places`
2026-03-04 13:52:48 +01:00
github-actions[bot] 2bb280667d 📝 Update release notes
[skip ci]
2026-03-04 10:57:54 +00:00
Motov Yurii 9cfd5d685a
📝 Add dates to release notes (#15001)
Add dates to release notes
2026-03-04 11:57:30 +01:00
github-actions[bot] 7a03018d6a 📝 Update release notes
[skip ci]
2026-03-03 12:40:40 +00:00
dependabot[bot] 3234e25368
⬆ Bump werkzeug from 3.1.5 to 3.1.6 (#14948)
Bumps [werkzeug](https://github.com/pallets/werkzeug) from 3.1.5 to 3.1.6.
- [Release notes](https://github.com/pallets/werkzeug/releases)
- [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/werkzeug/compare/3.1.5...3.1.6)

---
updated-dependencies:
- dependency-name: werkzeug
  dependency-version: 3.1.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-03 13:40:06 +01:00
github-actions[bot] b54aa52294 📝 Update release notes
[skip ci]
2026-03-03 00:15:45 +00:00
github-actions[bot] 0bc4d1be96 📝 Update release notes
[skip ci]
2026-03-03 00:15:28 +00:00
dependabot[bot] 800a1dbf5c
⬆ Bump pydantic-ai from 1.62.0 to 1.63.0 (#15035)
Bumps [pydantic-ai](https://github.com/pydantic/pydantic-ai) from 1.62.0 to 1.63.0.
- [Release notes](https://github.com/pydantic/pydantic-ai/releases)
- [Changelog](https://github.com/pydantic/pydantic-ai/blob/main/docs/changelog.md)
- [Commits](https://github.com/pydantic/pydantic-ai/compare/v1.62.0...v1.63.0)

---
updated-dependencies:
- dependency-name: pydantic-ai
  dependency-version: 1.63.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-03 01:15:05 +01:00
dependabot[bot] cac584c85d
⬆ Bump pytest-codspeed from 4.2.0 to 4.3.0 (#15034)
Bumps [pytest-codspeed](https://github.com/CodSpeedHQ/pytest-codspeed) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/CodSpeedHQ/pytest-codspeed/releases)
- [Changelog](https://github.com/CodSpeedHQ/pytest-codspeed/blob/master/CHANGELOG.md)
- [Commits](https://github.com/CodSpeedHQ/pytest-codspeed/compare/v4.2.0...v4.3.0)

---
updated-dependencies:
- dependency-name: pytest-codspeed
  dependency-version: 4.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-03 01:14:10 +01:00
github-actions[bot] 8469e19125 📝 Update release notes
[skip ci]
2026-03-03 00:14:05 +00:00
github-actions[bot] 107808931e 📝 Update release notes
[skip ci]
2026-03-03 00:13:32 +00:00
dependabot[bot] e1b271f566
⬆ Bump strawberry-graphql from 0.291.2 to 0.307.1 (#15033)
Bumps [strawberry-graphql](https://github.com/strawberry-graphql/strawberry) from 0.291.2 to 0.307.1.
- [Release notes](https://github.com/strawberry-graphql/strawberry/releases)
- [Changelog](https://github.com/strawberry-graphql/strawberry/blob/main/CHANGELOG.md)
- [Commits](https://github.com/strawberry-graphql/strawberry/compare/0.291.2...0.307.1)

---
updated-dependencies:
- dependency-name: strawberry-graphql
  dependency-version: 0.307.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-03 01:13:14 +01:00
github-actions[bot] d0ac80bccc 📝 Update release notes
[skip ci]
2026-03-03 00:13:05 +00:00
dependabot[bot] ce0a705066
⬆ Bump typer from 0.21.1 to 0.24.1 (#15032)
Bumps [typer](https://github.com/fastapi/typer) from 0.21.1 to 0.24.1.
- [Release notes](https://github.com/fastapi/typer/releases)
- [Changelog](https://github.com/fastapi/typer/blob/master/docs/release-notes.md)
- [Commits](https://github.com/fastapi/typer/compare/0.21.1...0.24.1)

---
updated-dependencies:
- dependency-name: typer
  dependency-version: 0.24.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-03 01:12:33 +01:00
github-actions[bot] a3e3903cfa 📝 Update release notes
[skip ci]
2026-03-03 00:12:12 +00:00
dependabot[bot] 80c5fb6b1c
⬆ Bump actions/download-artifact from 7 to 8 (#15020)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 7 to 8.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-03 01:12:02 +01:00
dependabot[bot] 2f098a3121
⬆ Bump actions/upload-artifact from 6 to 7 (#15019)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-03 01:11:44 +01:00
Sebastián Ramírez ca5f60ee72 🔖 Release version 0.135.1 2026-03-01 19:17:26 +01:00
github-actions[bot] 87f75aa62c 📝 Update release notes
[skip ci]
2026-03-01 18:16:24 +00:00
Sebastián Ramírez 8a9258b169
🐛 Fix, avoid yield from a TaskGroup, only as an async context manager, closed in the request async exit stack (#15038) 2026-03-01 19:16:03 +01:00
github-actions[bot] 6038507823 📝 Update release notes
[skip ci]
2026-03-01 17:22:02 +00:00
Sebastián Ramírez c796ba4f46
👥 Update FastAPI People - Experts (#15037)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-01 18:21:37 +01:00
github-actions[bot] b24aa03b88 📝 Update release notes
[skip ci]
2026-03-01 12:47:40 +00:00
Aditya Giri 2c6104752a
✏️ Fix typo in `docs/en/docs/_llm-test.md` (#15007) 2026-03-01 13:45:56 +01:00
github-actions[bot] e3bbeef8a2 📝 Update release notes
[skip ci]
2026-03-01 12:45:43 +00:00
github-actions[bot] d726c8cb2b 📝 Update release notes
[skip ci]
2026-03-01 12:45:41 +00:00
Sebastián Ramírez cf514e6d38
👥 Update FastAPI People - Contributors and Translators (#15029)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-01 13:45:21 +01:00
Sebastián Ramírez 1084d42c3e
👥 Update FastAPI GitHub topic repositories (#15036)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-01 13:45:14 +01:00
github-actions[bot] f5c7b20933 📝 Update release notes
[skip ci]
2026-03-01 10:06:23 +00:00
Sebastián Ramírez 924a535a4f
📝 Update Skill, optimize context, trim and refactor into references (#15031) 2026-03-01 10:05:57 +00:00
Sebastián Ramírez 12ea7be0be 🔖 Release version 0.135.0 2026-03-01 10:27:00 +01:00
github-actions[bot] 4cd76acafc 📝 Update release notes
[skip ci]
2026-03-01 09:22:17 +00:00
Sebastián Ramírez 2238155844
Add support for Server Sent Events (#15030) 2026-03-01 10:21:52 +01:00
Sebastián Ramírez 48d58ae3b6 📝 Update release notes 2026-02-27 22:16:48 +01:00
Sebastián Ramírez d3b1d6cbd4 📝 Update release notes 2026-02-27 22:15:40 +01:00
Sebastián Ramírez d98eb74da9 🔖 Release version 0.134.0 2026-02-27 22:12:57 +01:00
Sebastián Ramírez d33ad3f90f 📝 Update release notes 2026-02-27 22:10:34 +01:00
github-actions[bot] b7fefb147e 📝 Update release notes
[skip ci]
2026-02-27 21:04:15 +00:00
Sebastián Ramírez c01dc8b03c
📝 Update Library Agent Skill with streaming responses (#15024) 2026-02-27 21:03:51 +00:00
github-actions[bot] 8344d078e2 📝 Update release notes
[skip ci]
2026-02-27 20:52:04 +00:00
Sebastián Ramírez 1377052c6c
📝 Update docs for responses and new stream with `yield` (#15023) 2026-02-27 21:51:40 +01:00
github-actions[bot] c0836dc1b7 📝 Update release notes
[skip ci]
2026-02-27 19:13:13 +00:00
Casper da Costa-Luis c3f54a0794
📝 Add `await` in `StreamingResponse` code example to allow cancellation (#14681)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2026-02-27 19:12:46 +00:00
github-actions[bot] ea80e466db 📝 Update release notes
[skip ci]
2026-02-27 18:57:12 +00:00
Sebastián Ramírez 749cefdeb1
Add support for streaming JSON Lines and binary data with `yield` (#15022) 2026-02-27 19:56:47 +01:00
github-actions[bot] 5a4d3aa26e 📝 Update release notes
[skip ci]
2026-02-27 12:35:03 +00:00
Motov Yurii 0901b4092c
📝 Rename `docs_src/websockets` to `docs_src/websockets_` to avoid import errors (#14979) 2026-02-27 13:34:37 +01:00
github-actions[bot] 873e48fb15 📝 Update release notes
[skip ci]
2026-02-27 10:54:09 +00:00
Motov Yurii 5aacc7b6a0
🔨 Run tests with `pytest-xdist` and `pytest-cov` (#14992) 2026-02-27 11:53:47 +01:00
Sebastián Ramírez a4ad07b48a 📝 Update release notes 2026-02-25 19:14:58 +01:00
Sebastián Ramírez 728b097564 🔖 Release version 0.133.1 2026-02-25 19:13:57 +01:00
Sebastián Ramírez 84a8760a80 📝 Update release notes 2026-02-25 19:13:07 +01:00
github-actions[bot] 4d78ca6f95 📝 Update release notes
[skip ci]
2026-02-25 18:11:13 +00:00
Sebastián Ramírez 4fce9ce172
🔧 Add FastAPI Agents Skill (#14982)
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
2026-02-25 19:10:48 +01:00
github-actions[bot] 2b476737b8 📝 Update release notes
[skip ci]
2026-02-25 10:38:23 +00:00
Motov Yurii 1fa1065f9e
Fix all tests are skipped on Windows (#14994)
Fix all tests are skipped on Windows
2026-02-25 11:37:59 +01:00
Sebastián Ramírez daba0aa328 🔖 Release version 0.133.0 2026-02-24 10:51:43 +01:00
github-actions[bot] 0c3581d5c4 📝 Update release notes
[skip ci]
2026-02-24 09:50:02 +00:00
Sebastián Ramírez c73bc94537
⬆️ Add support for Starlette 1.0.0+ (#14987) 2026-02-24 09:49:32 +00:00
Sebastián Ramírez 6c68838615 🔖 Release version 0.132.1 2026-02-24 10:32:08 +01:00
github-actions[bot] 29d082ba24 📝 Update release notes
[skip ci]
2026-02-24 09:28:36 +00:00
Sebastián Ramírez 2686c7fbbf
♻️ Refactor logic to handle OpenAPI and Swagger UI escaping data (#14986) 2026-02-24 09:28:10 +00:00
github-actions[bot] 2f9c914d44 📝 Update release notes
[skip ci]
2026-02-23 18:48:43 +00:00
Sebastián Ramírez 0cf27ecf88
👥 Update FastAPI People - Experts (#14972)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2026-02-23 19:47:59 +01:00
github-actions[bot] 3f30ca1a5e 📝 Update release notes
[skip ci]
2026-02-23 18:32:32 +00:00
Motov Yurii 6af3832126
👷 Allow skipping `benchmark` job in `test` workflow (#14974) 2026-02-23 19:31:54 +01:00
Sebastián Ramírez acdf52e0c8 📝 Update release notes 2026-02-23 18:54:18 +01:00
Sebastián Ramírez 5c863d0718 🔖 Release version 0.132.0 2026-02-23 18:49:58 +01:00
github-actions[bot] ac8621a76e 📝 Update release notes
[skip ci]
2026-02-23 17:46:11 +00:00
Sebastián Ramírez 22354a2530
🔒️ Add `strict_content_type` checking for JSON requests (#14978) 2026-02-23 18:45:20 +01:00
github-actions[bot] 94a1ee749e 📝 Update release notes
[skip ci]
2026-02-23 16:50:41 +00:00
dependabot[bot] 248d7fb9f5
⬆ Bump flask from 3.1.2 to 3.1.3 (#14949)
Bumps [flask](https://github.com/pallets/flask) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/pallets/flask/releases)
- [Changelog](https://github.com/pallets/flask/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/flask/compare/3.1.2...3.1.3)

---
updated-dependencies:
- dependency-name: flask
  dependency-version: 3.1.3
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-23 17:49:53 +01:00
github-actions[bot] da1937443d 📝 Update release notes
[skip ci]
2026-02-23 15:04:55 +00:00
Sofie Van Landeghem 5161f7b42b
⬆ Update all dependencies to use `griffelib` instead of `griffe` (#14973)
* update to griffelib

* also update pydantic-ai

* move griffelib to get better GH diff

* restore accidental edit
2026-02-23 16:04:24 +01:00
github-actions[bot] fef2ce70d9 📝 Update release notes
[skip ci]
2026-02-23 11:45:11 +00:00
Motov Yurii a3c8c37272
🔨 Fix `FastAPI People` workflow (#14951) 2026-02-23 12:44:47 +01:00
github-actions[bot] 2826124378 📝 Update release notes
[skip ci]
2026-02-22 18:22:03 +00:00
Sebastián Ramírez 4da264f0f3
👷 Do not run codspeed with coverage as it's not tracked (#14966) 2026-02-22 19:21:38 +01:00
github-actions[bot] c5559a66dd 📝 Update release notes
[skip ci]
2026-02-22 18:14:11 +00:00
Sebastián Ramírez 1cea8f659c
👷 Do not include benchmark tests in coverage to speed up coverage processing (#14965) 2026-02-22 19:13:49 +01:00
Sebastián Ramírez b423b73c35 🔖 Release version 0.131.0 2026-02-22 17:36:21 +01:00
github-actions[bot] 70e8558352 📝 Update release notes
[skip ci]
2026-02-22 16:35:25 +00:00
Sebastián Ramírez 48e9835732
🗑️ Deprecate `ORJSONResponse` and `UJSONResponse` (#14964) 2026-02-22 17:34:59 +01:00
Sebastián Ramírez 2e62fb1513 📝 Update release notes 2026-02-22 17:18:26 +01:00
Sebastián Ramírez eb544e704c 🔖 Release version 0.130.0 2026-02-22 17:14:53 +01:00
github-actions[bot] bc06e4296d 📝 Update release notes
[skip ci]
2026-02-22 16:07:56 +00:00
Sebastián Ramírez 590a5e5355
Serialize JSON response with Pydantic (in Rust), when there's a Pydantic return type or response model (#14962) 2026-02-22 17:07:19 +01:00
Sebastián Ramírez 1e78a36b73 🔖 Release version 0.129.2 2026-02-21 18:24:59 +01:00
github-actions[bot] f921de6495 📝 Update release notes
[skip ci]
2026-02-21 17:23:22 +00:00
Sebastián Ramírez 4ab8138554
⬆️ Upgrade pytest (#14959) 2026-02-21 18:22:54 +01:00
github-actions[bot] 468d5173ed 📝 Update release notes
[skip ci]
2026-02-21 16:45:38 +00:00
Sebastián Ramírez c9455d5400
👷 Fix CI, do not attempt to publish `fastapi-slim` (#14958) 2026-02-21 16:45:15 +00:00
github-actions[bot] 69ae1d0f28 📝 Update release notes
[skip ci]
2026-02-21 16:27:01 +00:00
Sebastián Ramírez 083b6ebe9e
Drop support for `fastapi-slim`, no more versions will be released, use only `"fastapi[standard]"` or `fastapi` (#14957) 2026-02-21 16:26:38 +00:00
github-actions[bot] 1b9a351ee8 📝 Update release notes
[skip ci]
2026-02-21 16:16:27 +00:00
Sebastián Ramírez f55ab7e020
🔧 Update pyproject.toml, remove unneeded lines (#14956) 2026-02-21 16:16:03 +00:00
Sebastián Ramírez c91fed958e 🔖 Release version 0.129.1 2026-02-21 14:08:06 +01:00
Sebastián Ramírez 04ff07fecd 📝 Update release notes 2026-02-21 14:07:09 +01:00
github-actions[bot] 1bf99b9a11 📝 Update release notes
[skip ci]
2026-02-21 13:01:58 +00:00
Sebastián Ramírez e8b98d2187
🐛 Fix JSON Schema for files, use `contentMediaType` instead of `format: binary` (#14953) 2026-02-21 14:01:31 +01:00
github-actions[bot] d2c17b603d 📝 Update release notes
[skip ci]
2026-02-20 15:40:34 +00:00
Motov Yurii cf058239d1
👷 Always run tests on push to `master` branch and when run by scheduler (#14940) 2026-02-20 16:40:05 +01:00
github-actions[bot] c44158384c 📝 Update release notes
[skip ci]
2026-02-18 21:31:13 +00:00
argoarsiks 3bdf470622
✏️ Fix several typos in ru translations (#14934)
* docs: fix typos

* Apply suggestion from @YuriiMotov

---------

Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2026-02-18 22:30:43 +01:00
github-actions[bot] d178b95695 📝 Update release notes
[skip ci]
2026-02-18 21:19:34 +00:00
Sebastián Ramírez 339f702810
🔨 Add Kapa.ai widget (AI chatbot) (#14938)
Co-authored-by: Alejandra <alejsdev@gmail.com>
2026-02-18 16:26:13 +01:00
github-actions[bot] da4135ce1e 📝 Update release notes
[skip ci]
2026-02-17 09:59:37 +00:00
Sebastián Ramírez faee822574
🎨 Upgrade typing syntax for Python 3.10 (#14932)
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tiangolo <1326112+tiangolo@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-17 09:59:14 +00:00
github-actions[bot] 6e5680c7ea 📝 Update release notes
[skip ci]
2026-02-17 08:08:30 +00:00
Sebastián Ramírez bbb96d4a0a
🔥 Remove Python 3.9 specific files, no longer needed after updating translations (#14931) 2026-02-17 08:08:04 +00:00
github-actions[bot] ed12105cce 📝 Update release notes
[skip ci]
2026-02-14 08:57:26 +00:00
Motov Yurii 01e2e1088c
🌐 Update translations for ko (update-all and add-missing) (#14923)
* Update all and add missing

* 🎨 Auto format

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-14 09:57:01 +01:00
github-actions[bot] 82d90c51b4 📝 Update release notes
[skip ci]
2026-02-14 08:43:37 +00:00
Motov Yurii ec35d6d380
🌐 Update translations for uk (add-missing) (#14922)
* Add missing

* 🎨 Auto format

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-14 09:43:14 +01:00
github-actions[bot] 12f7e65670 📝 Update release notes
[skip ci]
2026-02-14 08:15:47 +00:00
Motov Yurii 9a082312f3
🌐 Update translations for zh-hant (update-all and add-missing) (#14921)
* Update all

* Add missing

* 🎨 Auto format

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-14 09:15:26 +01:00
github-actions[bot] dd97806864 📝 Update release notes
[skip ci]
2026-02-14 08:13:07 +00:00
Motov Yurii 7dc1be8b88
🌐 Update translations for fr (update-all and add-missing) (#14920)
* Update all

* Add missing

* 🎨 Auto format

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-14 09:12:41 +01:00
github-actions[bot] 417990fcb7 📝 Update release notes
[skip ci]
2026-02-14 07:57:54 +00:00
Motov Yurii dca874c58c
🌐 Update translations for de (update-all) (#14910)
* Update all

* 🎨 Auto format

* Apply suggestions from code review

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-14 08:57:30 +01:00
github-actions[bot] 5420847d9f 📝 Update release notes
[skip ci]
2026-02-13 15:24:56 +00:00
Motov Yurii 5ad9d258e4
🌐 Update translations for ja (update-all) (#14916)
* Update all

* 🎨 Auto format

* Add missing

* 🎨 Auto format

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-13 16:24:30 +01:00
github-actions[bot] d213dd363d 📝 Update release notes
[skip ci]
2026-02-13 13:49:19 +00:00
Motov Yurii 0d1f4d935b
🌐 Update translations for pt (update-all) (#14912)
* Update all

* 🎨 Auto format

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-13 14:48:53 +01:00
github-actions[bot] 9d42132e7a 📝 Update release notes
[skip ci]
2026-02-13 13:42:06 +00:00
Motov Yurii dd50de1205
🌐 Update translations for es (update-all and add-missing) (#14911)
* Update all

* 🎨 Auto format

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-13 14:41:41 +01:00
github-actions[bot] 7dbdb11fb0 📝 Update release notes
[skip ci]
2026-02-13 13:38:24 +00:00
Motov Yurii eada361fa2
🌐 Update translations for zh (update-all) (#14917)
* Update all

* 🎨 Auto format

* Add missing

* 🎨 Auto format

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-13 14:37:57 +01:00
github-actions[bot] 149ef6264e 📝 Update release notes
[skip ci]
2026-02-13 12:42:31 +00:00
github-actions[bot] 54e29fbad8 📝 Update release notes
[skip ci]
2026-02-13 12:42:05 +00:00
Motov Yurii 685cc0de17
🌐 Update translations for uk (update-all) (#14914)
* Update all

* 🎨 Auto format

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-13 13:42:01 +01:00
Motov Yurii ea8db708f1
🌐 Update translations for tr (update-all) (#14913)
* Update all

* 🎨 Auto format

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-13 13:41:38 +01:00
github-actions[bot] fdbbf74908 📝 Update release notes
[skip ci]
2026-02-13 07:05:05 +00:00
dependabot[bot] b93c964d7f
⬆ Bump cryptography from 46.0.4 to 46.0.5 (#14892)
Bumps [cryptography](https://github.com/pyca/cryptography) from 46.0.4 to 46.0.5.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/46.0.4...46.0.5)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-version: 46.0.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2026-02-13 08:04:40 +01:00
github-actions[bot] 7c4b134464 📝 Update release notes
[skip ci]
2026-02-13 06:56:53 +00:00
dependabot[bot] db328270aa
⬆ Bump pillow from 12.1.0 to 12.1.1 (#14899)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 12.1.0 to 12.1.1.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/12.1.0...12.1.1)

---
updated-dependencies:
- dependency-name: pillow
  dependency-version: 12.1.1
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-13 07:56:30 +01:00
github-actions[bot] 6fa573ce0b 📝 Update release notes
[skip ci]
2026-02-12 19:58:08 +00:00
Motov Yurii 55a9eee13a
🌐 Update translations for ru (update-outdated) (#14909)
* Update all

* Reflect latest changes in `docs/en/docs/tutorial/security/oauth2-jwt.md`
2026-02-12 20:57:34 +01:00
github-actions[bot] c206f19b5d 📝 Update release notes
[skip ci]
2026-02-12 18:10:57 +00:00
Sebastián Ramírez d11f820ac3
📝 Update docs for JWT to prevent timing attacks (#14908) 2026-02-12 19:10:35 +01:00
Sebastián Ramírez a2e51363c7 🔖 Release version 0.129.0 2026-02-12 14:52:27 +01:00
github-actions[bot] b7ce02ae86 📝 Update release notes
[skip ci]
2026-02-12 13:32:02 +00:00
Sebastián Ramírez 31d9750ace
🔨 Update docs.py scripts to migrate Python 3.9 to Python 3.10 (#14906) 2026-02-12 13:31:33 +00:00
github-actions[bot] 109cc8aff1 📝 Update release notes
[skip ci]
2026-02-12 13:24:54 +00:00
Sebastián Ramírez c82a3d8a13
📝 Update highlights in webhooks docs (#14905) 2026-02-12 14:24:28 +01:00
github-actions[bot] 0e460654af 📝 Update release notes
[skip ci]
2026-02-12 13:20:10 +00:00
Sebastián Ramírez c9e2277d8b
📝 Update source examples and docs from Python 3.9 to 3.10 (#14900) 2026-02-12 14:19:43 +01:00
github-actions[bot] d06ab3f5c7 📝 Update release notes
[skip ci]
2026-02-11 18:41:46 +00:00
Sebastián Ramírez 3da206c06d
🎨 Update internal types for Python 3.10 (#14898) 2026-02-11 18:41:21 +00:00
github-actions[bot] cc903bd440 📝 Update release notes
[skip ci]
2026-02-11 18:32:39 +00:00
Sebastián Ramírez ad4e8e0060
Drop support for Python 3.9 (#14897)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-11 19:32:12 +01:00
Sebastián Ramírez bdd20051c4 🔖 Release version 0.128.8 2026-02-11 16:16:34 +01:00
github-actions[bot] 1ed9bd4923 📝 Update release notes
[skip ci]
2026-02-11 13:37:37 +00:00
Sebastián Ramírez aac30fd707
🔨 Tweak PDM hook script (#14895) 2026-02-11 13:37:09 +00:00
github-actions[bot] 417f1ee078 📝 Update release notes
[skip ci]
2026-02-11 12:34:12 +00:00
Sebastián Ramírez ffb8965260
♻️ Update build setup for `fastapi-slim`, deprecate it, and make it only depend on `fastapi` (#14894) 2026-02-11 12:33:49 +00:00
github-actions[bot] 93fa935fb8 📝 Update release notes
[skip ci]
2026-02-10 12:26:38 +00:00
Sanjana S f0f3e7a113
📝 Fix grammar in `docs/en/docs/tutorial/first-steps.md` (#14708) 2026-02-10 13:26:10 +01:00
Sebastián Ramírez 8f82c94de0 🔖 Release version 0.128.7 2026-02-10 13:24:38 +01:00
github-actions[bot] 5bb3423205 📝 Update release notes
[skip ci]
2026-02-10 12:15:02 +00:00
Sebastián Ramírez 6ce5e3e961
Tweak comment in test to reference PR (#14885) 2026-02-10 12:14:38 +00:00
github-actions[bot] 65da3dde12 📝 Update release notes
[skip ci]
2026-02-10 11:56:45 +00:00
Motov Yurii 81f82fd955
🔧 Update LLM-prompt for `abbr` and `dfn` tags (#14747)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2026-02-10 11:56:20 +00:00
github-actions[bot] ff721017df 📝 Update release notes
[skip ci]
2026-02-10 11:49:54 +00:00
Motov Yurii ca76a4eba9
📝 Use `dfn` tag for definitions instead of `abbr` in docs (#14744)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2026-02-10 11:48:27 +00:00
github-actions[bot] 1133a4594d 📝 Update release notes
[skip ci]
2026-02-10 11:47:26 +00:00
Valentyn 38f965985e
Test order for the submitted byte Files (#14828)
Co-authored-by: Valentyn Druzhynin <v.druzhynin@zakaz.global>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2026-02-10 11:46:48 +00:00
github-actions[bot] 3f1cc8f8f5 📝 Update release notes
[skip ci]
2026-02-10 11:37:19 +00:00
Sebastián Ramírez 25270fcee0
♻️ Simplify reading files in memory, do it sequentially instead of (fake) parallel (#14884) 2026-02-10 12:36:53 +01:00
github-actions[bot] 8bdb0d2242 📝 Update release notes
[skip ci]
2026-02-10 10:59:10 +00:00
Javier Sánchez Castro df950111fe
Show a clear error on attempt to include router into itself (#14258)
Co-authored-by: Javier Sánchez <javier.sanchez.castro@bookline.ai>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2026-02-10 11:58:40 +01:00
github-actions[bot] 363aced75a 📝 Update release notes
[skip ci]
2026-02-10 10:52:51 +00:00
rijenkii 66dc695071
Replace `dict` by `Mapping` on `HTTPException.headers` (#12997)
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-02-10 11:52:24 +01:00
github-actions[bot] e94028ab60 📝 Update release notes
[skip ci]
2026-02-09 17:39:11 +00:00
Motov Yurii 8fd291465b
🔧 Configure `test` workflow to run tests with `inline-snapshot=review` (#14876) 2026-02-09 18:38:48 +01:00
Sebastián Ramírez fbca586c1d 📝 Update release notes 2026-02-09 18:25:04 +01:00
github-actions[bot] 4e879799dd 📝 Update release notes
[skip ci]
2026-02-09 17:21:32 +00:00
Sebastián Ramírez 0a4033aeee 🔖 Release version 0.128.6 2026-02-09 18:19:22 +01:00
Motov Yurii ed2512a5ec
🐛 Fix `on_startup` and `on_shutdown` parameters of `APIRouter` (#14873)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-09 17:31:57 +01:00
github-actions[bot] 0c0f6332e2 📝 Update release notes
[skip ci]
2026-02-09 15:36:09 +00:00
Motov Yurii 227cb85a03
Fix parameterized tests with snapshots (#14875) 2026-02-09 16:35:43 +01:00
github-actions[bot] cd31576d57 📝 Update release notes
[skip ci]
2026-02-08 10:40:08 +00:00
Sebastián Ramírez 376e108580
🌐 Update translations for zh (update-outdated) (#14843)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
2026-02-08 11:39:41 +01:00
Sebastián Ramírez dedf1409fe 🔖 Release version 0.128.5 2026-02-08 11:20:22 +01:00
github-actions[bot] 79d4dfb37f 📝 Update release notes
[skip ci]
2026-02-08 10:19:07 +00:00
Sebastián Ramírez 9f4ecf562c
Add inline snapshot tests for OpenAPI before changes from Pydantic v2 (#14864) 2026-02-08 10:18:38 +00:00
github-actions[bot] c48539f4c6 📝 Update release notes
[skip ci]
2026-02-07 08:34:59 +00:00
Sebastián Ramírez 2e7d3754cd
♻️ Refactor and simplify Pydantic v2 (and v1) compatibility internal utils (#14862) 2026-02-07 08:34:32 +00:00
Sebastián Ramírez 8eac94bd91 🔖 Release version 0.128.4 2026-02-07 09:12:54 +01:00
github-actions[bot] 58cdfc7f4b 📝 Update release notes
[skip ci]
2026-02-07 08:08:31 +00:00
Sebastián Ramírez d59fbc3494
♻️ Refactor internals, simplify Pydantic v2/v1 utils, `create_model_field`, better types for `lenient_issubclass` (#14860) 2026-02-07 08:08:07 +00:00
github-actions[bot] cc6ced6345 📝 Update release notes
[skip ci]
2026-02-06 19:04:48 +00:00
Sebastián Ramírez cf55bade7e
♻️ Simplify internals, remove Pydantic v1 only logic, no longer needed (#14857) 2026-02-06 19:04:24 +00:00
github-actions[bot] ac8362c447 📝 Update release notes
[skip ci]
2026-02-06 18:01:30 +00:00
Sebastián Ramírez 3c49346238
♻️ Refactor internals, cleanup unneeded Pydantic v1 specific logic (#14856) 2026-02-06 19:01:05 +01:00
github-actions[bot] 512c3ad88c 📝 Update release notes
[skip ci]
2026-02-06 17:24:56 +00:00
Motov Yurii cba537ab71
🌐 Update translations for fr (outdated pages) (#14839) 2026-02-06 18:24:25 +01:00
github-actions[bot] 2eb454ab04 📝 Update release notes
[skip ci]
2026-02-06 17:24:15 +00:00
Motov Yurii 0f5987b560
🌐 Update translations for tr (outdated and missing) (#14838) 2026-02-06 18:23:48 +01:00
github-actions[bot] 266a3138b5 📝 Update release notes
[skip ci]
2026-02-06 17:18:53 +00:00
Sebastián Ramírez 5a31b37cc7
⬆️ Upgrade development dependencies (#14854) 2026-02-06 17:18:30 +00:00
Sebastián Ramírez 36985f5f25 🔖 Release version 0.128.3 2026-02-06 17:44:11 +01:00
github-actions[bot] 661cdfb8a4 📝 Update release notes
[skip ci]
2026-02-06 16:38:15 +00:00
Sebastián Ramírez f6cc650a12
⬆️ Upgrade Starlette supported version range to `starlette>=0.40.0,<1.0.0` (#14853) 2026-02-06 16:37:37 +00:00
github-actions[bot] 201feedd68 📝 Update release notes
[skip ci]
2026-02-06 15:31:16 +00:00
Sebastián Ramírez 19f13ead4c
👷 Run tests with Starlette from git (#14849) 2026-02-06 16:30:48 +01:00
github-actions[bot] 01e85c03bd 📝 Update release notes
[skip ci]
2026-02-06 15:29:27 +00:00
Sebastián Ramírez 08233d7ffc
🌐 Update translations for ru (update-outdated) (#14834)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-06 16:28:59 +01:00
github-actions[bot] fe8c33ea64 📝 Update release notes
[skip ci]
2026-02-06 15:18:55 +00:00
Sebastián Ramírez f9f7992604
♻️ Re-implement `on_event` in FastAPI for compatibility with the next Starlette, while keeping backwards compatibility (#14851) 2026-02-06 16:18:30 +01:00
github-actions[bot] 8e50c55fd9 📝 Update release notes
[skip ci]
2026-02-06 13:45:47 +00:00
Sebastián Ramírez 3b8b310eda
👷 Run tests with lower bound uv sync, upgrade `fastapi[all]` minimum dependencies: `ujson >=5.8.0`, `orjson >=3.9.3` (#14846) 2026-02-06 14:45:18 +01:00
Sebastián Ramírez 79406a4b04 🔖 Release version 0.128.2 2026-02-05 20:46:37 +01:00
github-actions[bot] de56c96c64 📝 Update release notes
[skip ci]
2026-02-05 19:42:42 +00:00
Sebastián Ramírez 570e592a03
🌐 Enable Traditional Chinese translations (#14842) 2026-02-05 19:42:18 +00:00
github-actions[bot] 110b45d9b2 📝 Update release notes
[skip ci]
2026-02-05 19:28:17 +00:00
Sebastián Ramírez 72325f698f
🌐 Enable French docs translations (#14841) 2026-02-05 19:27:51 +00:00
github-actions[bot] 8bdbd3725f 📝 Update release notes
[skip ci]
2026-02-05 19:26:13 +00:00
Sebastián Ramírez 23ddf09dd1
🔨 Add max pages to translate to configs (#14840) 2026-02-05 19:25:49 +00:00
github-actions[bot] 6646e2b94f 📝 Update release notes
[skip ci]
2026-02-05 18:42:10 +00:00
Kanetsuna Masaya c5fd75a321
🐛 Fix using `Json[list[str]]` type (issue #10997) (#14616)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2026-02-05 18:41:43 +00:00
github-actions[bot] 54f8aeeb9a 📝 Update release notes
[skip ci]
2026-02-05 18:34:59 +00:00
Albin Skott 97145588f5
Add support for PEP695 `TypeAliasType` (#13920)
Co-authored-by: lokidev <torsten.zielke@protonmail.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2026-02-05 18:34:34 +00:00
github-actions[bot] 0dd42b746e 📝 Update release notes
[skip ci]
2026-02-05 18:23:44 +00:00
Jonathan Fulton b49435becd
Allow `Response` type hint as dependency annotation (#14794)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2026-02-05 18:23:16 +00:00
github-actions[bot] 464c359bb0 📝 Update release notes
[skip ci]
2026-02-05 16:11:33 +00:00
Sebastián Ramírez 457cd75c23
🌐 Update translations for fr (translate-page) (#14837)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-05 16:11:07 +00:00
github-actions[bot] 2838dcb4a8 📝 Update release notes
[skip ci]
2026-02-05 16:06:44 +00:00
github-actions[bot] b82993643e 📝 Update release notes
[skip ci]
2026-02-05 16:06:09 +00:00
Sebastián Ramírez b892c3126c
🌐 Update translations for de (update-outdated) (#14836)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-05 16:06:07 +00:00
github-actions[bot] 3578270af4 📝 Update release notes
[skip ci]
2026-02-05 16:05:18 +00:00
Sebastián Ramírez 2224b4e63b
🌐 Update translations for pt (update-outdated) (#14833)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-05 16:05:03 +00:00
Sebastián Ramírez 136d5f0a56
🌐 Update translations for ko (update-outdated) (#14835)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-05 16:04:47 +00:00
github-actions[bot] afb44f0ff8 📝 Update release notes
[skip ci]
2026-02-05 16:03:19 +00:00
Sebastián Ramírez 4fe06cc24a
🌐 Update translations for es (update-outdated) (#14832)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-05 17:02:22 +01:00
github-actions[bot] cae2659678 📝 Update release notes
[skip ci]
2026-02-05 15:57:15 +00:00
Sebastián Ramírez da9e101d50
🌐 Update translations for tr (update-outdated) (#14831)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-05 16:56:49 +01:00
github-actions[bot] 8488d31aff 📝 Update release notes
[skip ci]
2026-02-05 15:48:06 +00:00
Sebastián Ramírez dcfd432c36
📝 Update docs for translations (#14830) 2026-02-05 16:47:42 +01:00
github-actions[bot] c7682a198a 📝 Update release notes
[skip ci]
2026-02-05 15:44:05 +00:00
Sebastián Ramírez b5d276bda8
🌐 Update translations for tr (add-missing) (#14790)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-05 16:43:38 +01:00
github-actions[bot] 2c5a844c44 📝 Update release notes
[skip ci]
2026-02-05 15:34:47 +00:00
Sebastián Ramírez 6ff8ff5b57
🌐 Update translations for fr (update-outdated) (#14826)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-05 16:34:19 +01:00
github-actions[bot] f23ea3bd95 📝 Update release notes
[skip ci]
2026-02-05 15:33:24 +00:00
Sebastián Ramírez b4ed7e5b06
🌐 Update translations for zh-hant (update-outdated) (#14825)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-05 16:32:56 +01:00
github-actions[bot] c00cebc5c6 📝 Update release notes
[skip ci]
2026-02-05 15:31:55 +00:00
Sebastián Ramírez 31faba8e41
🌐 Update translations for uk (update-outdated) (#14822)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Co-authored-by: Maksym Zavalniuk <maksym.z@jome.com>
Co-authored-by: Roman Mashevskyi <romanmashevskyi@proton.me>
2026-02-05 16:31:31 +01:00
github-actions[bot] 64d0ee9104 📝 Update release notes
[skip ci]
2026-02-05 12:49:18 +00:00
Rayyan oumlil 2e170b9585
📝 Fix duplicate word in `advanced-dependencies.md` (#14815) 2026-02-05 13:48:51 +01:00
github-actions[bot] 5ca11c59e3 📝 Update release notes
[skip ci]
2026-02-04 17:36:12 +00:00
Sebastián Ramírez 0e68d36cd5
🔨 Update docs and translations scripts, enable Turkish (#14824) 2026-02-04 17:35:21 +00:00
Sebastián Ramírez 1de0de56c8 🔖 Release version 0.128.1 2026-02-04 18:33:29 +01:00
github-actions[bot] 734c95b05a 📝 Update release notes
[skip ci]
2026-02-04 17:01:08 +00:00
Sebastián Ramírez 84a5bcf82d
⬇️ Downgrade LLM translations model to GPT-5 to reduce mistakes (#14823) 2026-02-04 18:00:40 +01:00
github-actions[bot] 0e064009fb 📝 Update release notes
[skip ci]
2026-02-04 16:48:16 +00:00
Roman Mashevskyi ad29e44c81
🌐 Improve LLM prompt of `uk` documentation (#14795) 2026-02-04 17:47:51 +01:00
github-actions[bot] 71ceac20da 📝 Update release notes
[skip ci]
2026-02-04 16:44:48 +00:00
Sebastián Ramírez b0e99d66e8
🌐 Update translations for ja (update-outdated) (#14588)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Co-authored-by: Maruo.S <raspi-maru2004@outlook.jp>
2026-02-04 17:44:21 +01:00
github-actions[bot] cec4be00ba 📝 Update release notes
[skip ci]
2026-02-04 14:49:41 +00:00
Sebastián Ramírez aea61373ae
🐛 Fix translation script commit in place (#14818) 2026-02-04 15:49:18 +01:00
github-actions[bot] fe5b617aec 📝 Update release notes
[skip ci]
2026-02-04 14:36:09 +00:00
Sebastián Ramírez ee0c12521f
📝 Update docs for contributing translations, simplify title (#14817) 2026-02-04 15:35:17 +01:00
github-actions[bot] 4a3a71f1c1 📝 Update release notes
[skip ci]
2026-02-04 14:34:39 +00:00
Jonathan Fulton 75c47187f3
🐛 Update `ValidationError` schema to include `input` and `ctx` (#14791)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-02-04 15:34:02 +01:00
github-actions[bot] 1e5e8b44cb 📝 Update release notes
[skip ci]
2026-02-04 14:21:00 +00:00
Sebastián Ramírez 440bfd70a9
🎨 Tweak types for mypy (#14816) 2026-02-04 14:20:36 +00:00
github-actions[bot] 5d50b74915 📝 Update release notes
[skip ci]
2026-02-04 13:51:56 +00:00
Mickaël Guérin 09f5941f0e
🐛 Fix TYPE_CHECKING annotations for Python 3.14 (PEP 649) (#14789) 2026-02-04 14:49:44 +01:00
github-actions[bot] c944add5a9 📝 Update release notes
[skip ci]
2026-02-04 13:47:09 +00:00
Cecilia Madrid 1d96b3e3f1
🐛 Strip whitespaces from `Authorization` header credentials (#14786) 2026-02-04 14:46:46 +01:00
github-actions[bot] 3675e284ab 📝 Update release notes
[skip ci]
2026-02-04 13:36:24 +00:00
Joab 741f77d571
Add `viewport` meta tag to improve Swagger UI on mobile devices (#14777) 2026-02-04 14:35:58 +01:00
github-actions[bot] 9656e925a9 📝 Update release notes
[skip ci]
2026-02-04 13:34:29 +00:00
mvanderlee 0748214c43
🏷️ Re-export `IncEx` type from Pydantic instead of duplicating it (#14641) 2026-02-04 14:34:01 +01:00
github-actions[bot] a1bb70e5a5 📝 Update release notes
[skip ci]
2026-02-04 13:32:48 +00:00
Tima 9df1f8293d
📝 Fix typing issue in `docs_src/app_testing/app_b` code example (#14573)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2026-02-04 14:32:24 +01:00
github-actions[bot] b134f406d1 📝 Update release notes
[skip ci]
2026-02-04 13:29:24 +00:00
johnson-earls 3ee652dd0c
📝 Fix example of license identifier in documentation (#14492)
Co-authored-by: svlandeg <svlandeg@github.com>
2026-02-04 14:29:02 +01:00
github-actions[bot] a4297066c2 📝 Update release notes
[skip ci]
2026-02-04 13:26:29 +00:00
Motov Yurii 61f95c9606
📝 Add banner to translated pages (#14809)
* Add banner to translated pages

* Add link to English version. Use modern syntax for details block

* 🎨 Auto format

* Move `translation-banner.md` inside `docs` directory

* 🎨 Auto format

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-04 14:26:02 +01:00
github-actions[bot] 9e0f4ca77a 📝 Update release notes
[skip ci]
2026-02-04 13:25:27 +00:00
Anton 41352de24c
🚸 Improve error message for invalid query parameter type annotations (#14479)
Co-authored-by: Anton.D <anton.dehtiarenko@chdp-tech.net>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2026-02-04 14:24:59 +01:00
github-actions[bot] ca4692a8c6 📝 Update release notes
[skip ci]
2026-02-04 13:23:34 +00:00
DJ Melisso 08dad5c69f
🐛 Fix OpenAPI duplication of `anyOf` refs for app-level responses with specified `content` and `model` as `Union` (#14463)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2026-02-04 14:23:08 +01:00
github-actions[bot] 6ab68c62b8 📝 Update release notes
[skip ci]
2026-02-04 12:42:18 +00:00
Motov Yurii 3a41403ccd
📝 Add links to related sections of docs to docstrings (#14776)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-04 13:41:54 +01:00
github-actions[bot] c9e512d808 📝 Update release notes
[skip ci]
2026-02-04 12:33:37 +00:00
Motov Yurii 4414286f2c
📝 Update embedded code examples to Python 3.10 syntax (#14758) 2026-02-04 13:33:07 +01:00
github-actions[bot] 938c5f3500 📝 Update release notes
[skip ci]
2026-02-04 12:31:13 +00:00
Motov Yurii 21b7b0893b
📝 Fix dependency installation command in `docs/en/docs/contributing.md` (#14757) 2026-02-04 13:30:47 +01:00
github-actions[bot] 5083f27e03 📝 Update release notes
[skip ci]
2026-02-04 12:07:48 +00:00
Motov Yurii 741c7345ea
📝 Use return type annotation instead of `response_model` when possible (#14753) 2026-02-04 13:07:26 +01:00
github-actions[bot] f6ba0141f4 📝 Update release notes
[skip ci]
2026-02-04 12:05:41 +00:00
Motov Yurii 27b91d4ad6
🔨 Update translation script to retry if LLM-response doesn't pass validation with Translation Fixer tool (#14749)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-04 13:05:19 +01:00
github-actions[bot] e3a66494c9 📝 Update release notes
[skip ci]
2026-02-04 11:54:46 +00:00
Motov Yurii dc3278654f
📝 Use `WSGIMiddleware` from `a2wsgi` instead of deprecated `fastapi.middleware.wsgi.WSGIMiddleware` (#14756)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-04 12:54:23 +01:00
github-actions[bot] 573c593dd0 📝 Update release notes
[skip ci]
2026-02-04 11:49:22 +00:00
Sebastián Ramírez 261736ab4c
💡 Update comment for Pydantic internals (#14814) 2026-02-04 11:49:00 +00:00
github-actions[bot] dd780f8caa 📝 Update release notes
[skip ci]
2026-02-04 11:46:55 +00:00
Sebastián Ramírez 7621a3aa4b
👷 Run tests only on relevant code changes (not on docs) (#14813) 2026-02-04 11:46:32 +00:00
github-actions[bot] eacbce24c9 📝 Update release notes
[skip ci]
2026-02-03 18:08:36 +00:00
Motov Yurii f3f498100f
👷 Run mypy by pre-commit (#14806)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2026-02-03 19:08:08 +01:00
github-actions[bot] 2247750d74 📝 Update release notes
[skip ci]
2026-02-02 16:34:52 +00:00
dependabot[bot] ec07e62e1c
⬆ Bump ruff from 0.14.3 to 0.14.14 (#14798)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.3 to 0.14.14.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.14.3...0.14.14)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.14.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2026-02-02 17:34:26 +01:00
github-actions[bot] 82959de14c 📝 Update release notes
[skip ci]
2026-02-02 15:09:37 +00:00
dependabot[bot] bc9ad6b134
⬆ Bump pyasn1 from 0.6.1 to 0.6.2 (#14804)
Bumps [pyasn1](https://github.com/pyasn1/pyasn1) from 0.6.1 to 0.6.2.
- [Release notes](https://github.com/pyasn1/pyasn1/releases)
- [Changelog](https://github.com/pyasn1/pyasn1/blob/main/CHANGES.rst)
- [Commits](https://github.com/pyasn1/pyasn1/compare/v0.6.1...v0.6.2)

---
updated-dependencies:
- dependency-name: pyasn1
  dependency-version: 0.6.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2026-02-02 15:09:12 +00:00
github-actions[bot] 608ff552ba 📝 Update release notes
[skip ci]
2026-02-02 15:00:28 +00:00
github-actions[bot] 87b5333e8a 📝 Update release notes
[skip ci]
2026-02-02 15:00:26 +00:00
github-actions[bot] ecb1444738 📝 Update release notes
[skip ci]
2026-02-02 14:57:46 +00:00
dependabot[bot] 5c3f0307ae
⬆ Bump sqlmodel from 0.0.27 to 0.0.31 (#14802)
Bumps [sqlmodel](https://github.com/fastapi/sqlmodel) from 0.0.27 to 0.0.31.
- [Release notes](https://github.com/fastapi/sqlmodel/releases)
- [Changelog](https://github.com/fastapi/sqlmodel/blob/main/docs/release-notes.md)
- [Commits](https://github.com/fastapi/sqlmodel/compare/0.0.27...0.0.31)

---
updated-dependencies:
- dependency-name: sqlmodel
  dependency-version: 0.0.31
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2026-02-02 15:57:43 +01:00
dependabot[bot] f2487ce88c
⬆ Bump mkdocs-macros-plugin from 1.4.1 to 1.5.0 (#14801)
Bumps [mkdocs-macros-plugin](https://github.com/fralau/mkdocs_macros_plugin) from 1.4.1 to 1.5.0.
- [Release notes](https://github.com/fralau/mkdocs_macros_plugin/releases)
- [Changelog](https://github.com/fralau/mkdocs-macros-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fralau/mkdocs_macros_plugin/compare/v1.4.1...v1.5.0)

---
updated-dependencies:
- dependency-name: mkdocs-macros-plugin
  dependency-version: 1.5.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2026-02-02 15:57:22 +01:00
dependabot[bot] a0e34c7473
⬆ Bump gitpython from 3.1.45 to 3.1.46 (#14800)
Bumps [gitpython](https://github.com/gitpython-developers/GitPython) from 3.1.45 to 3.1.46.
- [Release notes](https://github.com/gitpython-developers/GitPython/releases)
- [Changelog](https://github.com/gitpython-developers/GitPython/blob/main/CHANGES)
- [Commits](https://github.com/gitpython-developers/GitPython/compare/3.1.45...3.1.46)

---
updated-dependencies:
- dependency-name: gitpython
  dependency-version: 3.1.46
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2026-02-02 15:56:33 +01:00
github-actions[bot] da4083c30f 📝 Update release notes
[skip ci]
2026-02-02 14:55:12 +00:00
dependabot[bot] b833e53ade
⬆ Bump typer from 0.16.0 to 0.21.1 (#14799)
Bumps [typer](https://github.com/fastapi/typer) from 0.16.0 to 0.21.1.
- [Release notes](https://github.com/fastapi/typer/releases)
- [Changelog](https://github.com/fastapi/typer/blob/master/docs/release-notes.md)
- [Commits](https://github.com/fastapi/typer/compare/0.16.0...0.21.1)

---
updated-dependencies:
- dependency-name: typer
  dependency-version: 0.21.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2026-02-02 15:54:49 +01:00
github-actions[bot] 6173733200 📝 Update release notes
[skip ci]
2026-02-02 10:27:24 +00:00
Sebastián Ramírez 20ff394d75
👥 Update FastAPI GitHub topic repositories (#14803)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-02 11:26:58 +01:00
github-actions[bot] 779f7ddc37 📝 Update release notes
[skip ci]
2026-02-02 10:24:48 +00:00
Sebastián Ramírez 3626d764c1
👥 Update FastAPI People - Contributors and Translators (#14796)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-02 11:24:23 +01:00
github-actions[bot] 07f08fc79a 📝 Update release notes
[skip ci]
2026-02-01 09:44:59 +00:00
Motov Yurii df6530e002
🌐 Update translations for uk (update outdated, found by fixer tool) (#14739) 2026-02-01 10:44:39 +01:00
github-actions[bot] 08924400c2 📝 Update release notes
[skip ci]
2026-01-31 18:32:52 +00:00
Sebastián Ramírez c9629e0eb2
🌐 Update translations for tr (update-outdated) (#14745)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-31 18:32:27 +00:00
github-actions[bot] 9348a5e2cf 📝 Update release notes
[skip ci]
2026-01-29 08:23:48 +00:00
Vineet Kumar a3dccaeb14
📝 Fix minor typos in release notes (#14780)
📝 Fix typos in release notes
2026-01-29 09:23:25 +01:00
github-actions[bot] 8c32e91c10 📝 Update release notes
[skip ci]
2026-01-24 21:18:15 +00:00
JUNG SEUNGHOON 7a0589466c
🌐 Update `llm-prompt.md` for Korean language (#14763)
* docs(ko): refine 'burger' to '햄버거' and update glossary

* Update docs/ko/llm-prompt.md

Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>

* Add app and command to glossary

Update glossary: add 애플리케이션 (app) and 명령어 (command)

---------

Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2026-01-24 22:17:54 +01:00
github-actions[bot] 442d007e76 📝 Update release notes
[skip ci]
2026-01-24 21:16:33 +00:00
Motov Yurii eaf07c5d84
🌐 Update translations for ko (update outdated, found by fixer tool) (#14738)
* Update outdated pages found by fixer tool

* Re-translate with updated prompt (fixed translation for `you`)

* Re-translate with `gtpt-5` model

* Re-translate with new preferred translation for `burger`

* Re-translate with new preferred translations for `app` and `command`
2026-01-24 22:16:10 +01:00
github-actions[bot] 597b435ae7 📝 Update release notes
[skip ci]
2026-01-22 16:33:00 +00:00
Sofie Van Landeghem 74cc27fd5a
🔧 Ensure that an edit to `uv.lock` gets the `internal` label (#14759)
add uv.lock to files for labeling the PR with 'internal'
2026-01-22 17:32:34 +01:00
github-actions[bot] f1a39cab12 📝 Update release notes
[skip ci]
2026-01-22 09:27:58 +00:00
Sebastián Ramírez 509afeb475
🌐 Update translations for de (update-outdated) (#14690)
* 🌐 Update translations for de (update-outdated)

* Apply suggestions from code review

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2026-01-22 10:27:31 +01:00
github-actions[bot] 6e47171e9c 📝 Update release notes
[skip ci]
2026-01-22 07:07:28 +00:00
Motov Yurii b9b75ba5f1
🌐 Update LLM prompt for Russian translations (#14733)
Add some specific translations
2026-01-22 08:07:05 +01:00
github-actions[bot] e0abd210f6 📝 Update release notes
[skip ci]
2026-01-20 23:03:31 +00:00
Sebastián Ramírez 2eb978b87a
🌐 Update translations for ru (update-outdated) (#14693)
* 🌐 Update translations for ru (update-outdated)

* 🎨 Auto format

* Apply suggestions from code review

* Apply suggestions from code review 2

* Apply suggestions from code review 3

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2026-01-21 00:03:07 +01:00
github-actions[bot] 50a78bf840 📝 Update release notes
[skip ci]
2026-01-20 20:40:39 +00:00
Sebastián Ramírez 2d459e4845
🌐 Update translations for pt (update-outdated) (#14724)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-20 21:40:17 +01:00
github-actions[bot] 7faa7089d6 📝 Update release notes
[skip ci]
2026-01-20 20:37:28 +00:00
hy.lee 0ab68a762f
🌐 Update Korean LLM prompt (#14740) 2026-01-20 21:37:04 +01:00
github-actions[bot] 7443bc7a46 📝 Update release notes
[skip ci]
2026-01-20 20:34:36 +00:00
Kader Miyanyedi 6afb15c518
🌐 Improve LLM prompt for Turkish translations (#14728) 2026-01-20 21:34:03 +01:00
github-actions[bot] ad6b2901a6 📝 Update release notes
[skip ci]
2026-01-19 20:56:10 +00:00
Sebastián Ramírez 463a3a24d7
🔧 Update sponsors: remove Requestly (#14735) 2026-01-19 20:55:32 +00:00
github-actions[bot] db5441eba1 📝 Update release notes
[skip ci]
2026-01-19 20:40:38 +00:00
Sebastián Ramírez 536a5bafe7
🔧 Update sponsors, LambdaTest changes to TestMu AI (#14734) 2026-01-19 21:40:17 +01:00
github-actions[bot] 0c7f2b66d7 📝 Update release notes
[skip ci]
2026-01-16 12:27:29 +00:00
Rafael de Oliveira Marques 9fec72687f
🌐 Update portuguese llm-prompt.md (#14702)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2026-01-16 13:27:02 +01:00
github-actions[bot] 8fa635c718 📝 Update release notes
[skip ci]
2026-01-16 11:57:32 +00:00
Sebastián Ramírez fb15bba819
🌐 Update LLM prompt instructions file for French (#14618) 2026-01-16 12:57:08 +01:00
github-actions[bot] 23bcfa094d 📝 Update release notes
[skip ci]
2026-01-16 11:54:26 +00:00
Sebastián Ramírez f317ede223
🌐 Update translations for ko (add-missing) (#14699)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-16 12:54:01 +01:00
github-actions[bot] c597d9cb53 📝 Update release notes
[skip ci]
2026-01-16 10:54:08 +00:00
fcharrier a96dd013a4
🐛 Fix copy button in custom.js (#14722) 2026-01-16 10:53:45 +00:00
github-actions[bot] a456e92a21 📝 Update release notes
[skip ci]
2026-01-11 22:23:21 +00:00
Sebastián Ramírez 1be80f4885
📝 Add contribution instructions about LLM generated code and comments and automated tools for PRs (#14706) 2026-01-11 23:22:58 +01:00
github-actions[bot] e63f382b0f 📝 Update release notes
[skip ci]
2026-01-11 21:19:50 +00:00
Sebastián Ramírez 7b864acf37
📝 Update docs for management tasks (#14705) 2026-01-11 21:19:26 +00:00
github-actions[bot] e9e0419ed0 📝 Update release notes
[skip ci]
2026-01-11 19:19:29 +00:00
Sebastián Ramírez 249a776b70
📝 Update docs about managing translations (#14704) 2026-01-11 19:19:05 +00:00
github-actions[bot] 97aa825422 📝 Update release notes
[skip ci]
2026-01-11 18:18:58 +00:00
Sebastián Ramírez 1054fbd256
📝 Update docs for contributing with translations (#14701) 2026-01-11 18:18:38 +00:00
github-actions[bot] effe493ae0 📝 Update release notes
[skip ci]
2026-01-11 16:43:35 +00:00
github-actions[bot] 612a2d20bc 📝 Update release notes
[skip ci]
2026-01-11 16:43:25 +00:00
dependabot[bot] 14f3068762
⬆ Bump actions/cache from 4 to 5 (#14511)
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-11 17:42:51 +01:00
dependabot[bot] d05b18ec40
⬆ Bump actions/upload-artifact from 5 to 6 (#14525)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-11 17:42:37 +01:00
github-actions[bot] 9a76f2fec9 📝 Update release notes
[skip ci]
2026-01-11 16:42:08 +00:00
dependabot[bot] 0383fb3ab9
⬆ Bump actions/download-artifact from 6 to 7 (#14526)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-11 17:41:45 +01:00
github-actions[bot] 50fa3f7c88 📝 Update release notes
[skip ci]
2026-01-11 00:21:31 +00:00
Sebastián Ramírez 5ec2615b1a
👷 Tweak CI input names (#14688) 2026-01-11 01:21:07 +01:00
github-actions[bot] 16e583413c 📝 Update release notes
[skip ci]
2026-01-11 00:16:33 +00:00
github-actions[bot] 1fedd1c73b 📝 Update release notes
[skip ci]
2026-01-11 00:15:31 +00:00
Sebastián Ramírez cf8dc98aad
🌐 Update translations for ko (update-outdated) (#14589)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
2026-01-11 00:15:26 +00:00
Sebastián Ramírez 6f977366a4
🌐 Update translations for uk (update-outdated) (#14587)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
2026-01-11 01:15:06 +01:00
github-actions[bot] 154ce03ff0 📝 Update release notes
[skip ci]
2026-01-11 00:04:10 +00:00
Sebastián Ramírez 49653aa295
🔨 Refactor translation script to allow committing in place (#14687) 2026-01-11 00:03:50 +00:00
github-actions[bot] f03a1502a0 📝 Update release notes
[skip ci]
2026-01-10 23:41:44 +00:00
Sebastián Ramírez a2912ffa26
🌐 Update translations for es (update-outdated) (#14686)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-11 00:41:20 +01:00
github-actions[bot] 8183e748ee 📝 Update release notes
[skip ci]
2026-01-10 23:06:59 +00:00
Sebastián Ramírez cefd50702a
🐛 Fix translation script path (#14685) 2026-01-10 23:06:37 +00:00
github-actions[bot] 3d1f9268fc 📝 Update release notes
[skip ci]
2026-01-10 22:44:05 +00:00
Sebastián Ramírez 7eac6e3169
Enable tests in CI for scripts (#14684) 2026-01-10 23:43:44 +01:00
github-actions[bot] 21d2c5cea0 📝 Update release notes
[skip ci]
2026-01-10 22:18:13 +00:00
Sebastián Ramírez c75ae058e4
🔧 Add pre-commit local script to fix language translations (#14683) 2026-01-10 22:17:46 +00:00
github-actions[bot] 961b2e844a 📝 Update release notes
[skip ci]
2026-01-10 22:03:19 +00:00
Jonathan Ehwald b4ba7f4652
⬆️ Migrate to uv (#14676) 2026-01-10 23:02:57 +01:00
github-actions[bot] c35e1fd4b4 📝 Update release notes
[skip ci]
2026-01-10 21:48:32 +00:00
Motov Yurii d1c67c0055
🔨 Add LLM translations tool fixer (#14652)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2026-01-10 21:48:08 +00:00
github-actions[bot] 18762e38a9 📝 Update release notes
[skip ci]
2026-01-10 21:35:32 +00:00
Motov Yurii b1db1395b6
📝 Specify language code for code block (#14656) 2026-01-10 22:35:09 +01:00
github-actions[bot] f2687dc1bb 📝 Update release notes
[skip ci]
2026-01-02 06:47:25 +00:00
github-actions[bot] 862c3f4f94 📝 Update release notes
[skip ci]
2026-01-02 06:46:59 +00:00
Sebastián Ramírez 052d6e86c2
👥 Update FastAPI People - Sponsors (#14626)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-02 07:46:57 +01:00
Sebastián Ramírez 31c7ffcdfe
👥 Update FastAPI GitHub topic repositories (#14630)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-02 07:46:34 +01:00
github-actions[bot] 6854be9ebc 📝 Update release notes
[skip ci]
2026-01-02 06:40:39 +00:00
Sebastián Ramírez 258deb925d
👥 Update FastAPI People - Contributors and Translators (#14625)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-02 07:40:15 +01:00
github-actions[bot] 53d2453d1a 📝 Update release notes
[skip ci]
2025-12-29 18:54:43 +00:00
Sebastián Ramírez d9b7b65b81
🌐 Update translation prompts (#14619) 2025-12-29 18:54:20 +00:00
github-actions[bot] 9ed5f246ed 📝 Update release notes
[skip ci]
2025-12-29 12:38:35 +00:00
Sebastián Ramírez edf7995775
🔧 Add LLM prompt file for Turkish, generated from the existing translations (#14547) 2025-12-29 13:38:11 +01:00
github-actions[bot] 47391ea8fb 📝 Update release notes
[skip ci]
2025-12-27 19:06:15 +00:00
Sebastián Ramírez 3b1b4f034b
🔨 Update LLM translation script to guide reviewers to change the prompt (#14614) 2025-12-27 19:05:53 +00:00
github-actions[bot] f362fdc234 📝 Update release notes
[skip ci]
2025-12-27 18:51:39 +00:00
github-actions[bot] 4ce34686d9 📝 Update release notes
[skip ci]
2025-12-27 18:51:18 +00:00
Sebastián Ramírez dbe83f3919
🔧 Add LLM prompt file for Traditional Chinese, generated from the existing translations (#14550)
Co-authored-by: W. H. Wang <mattwang44@gmail.com>
2025-12-27 19:49:46 +01:00
github-actions[bot] 13743e115a 📝 Update release notes
[skip ci]
2025-12-27 18:49:09 +00:00
Sebastián Ramírez 52842fb8d3
🔧 Add LLM prompt file for Simplified Chinese, generated from the existing translations (#14549)
Co-authored-by: 史雲昔 (Vincy SHI) <vincy@vincy1230.net>
2025-12-27 19:49:08 +01:00
Sebastián Ramírez 4d4fb28f9f
👷 Do not run translations on cron while finishing updating existing languages (#14613) 2025-12-27 18:48:45 +00:00
github-actions[bot] a1735d6d11 📝 Update release notes
[skip ci]
2025-12-27 18:31:59 +00:00
Sebastián Ramírez 1b42639296
🔥 Remove test variants for Pydantic v1 in test_request_params (#14612) 2025-12-27 19:31:34 +01:00
github-actions[bot] ded035a421 📝 Update release notes
[skip ci]
2025-12-27 18:19:33 +00:00
Sebastián Ramírez 44c849c4fc
🔥 Remove Pydantic v1 specific test variants (#14611) 2025-12-27 19:19:10 +01:00
Sebastián Ramírez 8322a4445a 🔖 Release version 0.128.0 2025-12-27 16:19:50 +01:00
github-actions[bot] 4b2cfcfd34 📝 Update release notes
[skip ci]
2025-12-27 12:55:22 +00:00
Sebastián Ramírez e300630551
Drop support for `pydantic.v1` (#14609) 2025-12-27 13:54:56 +01:00
github-actions[bot] 1b3bea8b6b 📝 Update release notes
[skip ci]
2025-12-26 20:40:51 +00:00
Sebastián Ramírez 34e884156f
Run performance tests only on Pydantic v2 (#14608) 2025-12-26 20:40:26 +00:00
Sebastián Ramírez cd90c78391 🔖 Release version 0.127.1 2025-12-26 14:02:41 +01:00
github-actions[bot] 93f4dfd88b 📝 Update release notes
[skip ci]
2025-12-26 12:46:00 +00:00
Sebastián Ramírez 535b5daa31
🔊 Add a custom `FastAPIDeprecationWarning` (#14605) 2025-12-26 12:45:20 +00:00
github-actions[bot] 6b53786f62 📝 Update release notes
[skip ci]
2025-12-26 11:37:18 +00:00
Sebastián Ramírez d98f4eb56e
🔧 Update pre-commit to use local Ruff instead of hook (#14604) 2025-12-26 11:36:58 +00:00
github-actions[bot] 8cefc4b7cc 📝 Update release notes
[skip ci]
2025-12-26 10:43:27 +00:00
Motov Yurii 3063ada72f
Add missing tests for code examples (#14569)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Nils-Hero Lindemann <nilsherolindemann@proton.me>
2025-12-26 11:43:02 +01:00
github-actions[bot] 5eb8d6ed8a 📝 Update release notes
[skip ci]
2025-12-26 09:40:18 +00:00
Nils-Hero Lindemann 7c751a2e1c
🌐 Update translations for de (update-outdated) (#14602)
* Sync with #14600

* A few changes

The LLM suggested a few changes when retranslating the document, these are the good ones.

I also added a term to the llm prompt, the LLM instead used just "Abdeckung", which is too broad in this context.
2025-12-26 10:39:53 +01:00
github-actions[bot] 55b556a7d1 📝 Update release notes
[skip ci]
2025-12-26 08:54:23 +00:00
Motov Yurii a4d04c9b7e
👷 Remove `lint` job from `test` CI workflow (#14593)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2025-12-26 09:53:59 +01:00
github-actions[bot] 23caa2709b 📝 Update release notes
[skip ci]
2025-12-25 11:02:01 +00:00
Sebastián Ramírez c264467efe
📝 Add documentary to website (#14600) 2025-12-25 11:01:37 +00:00
github-actions[bot] 2b212ddd76 📝 Update release notes
[skip ci]
2025-12-24 10:28:45 +00:00
Nils-Hero Lindemann 7203e860b3
🌐 Update translations for de (update-outdated) (#14581)
* Sync with #14575 (Drop support for Pydantic v1)

* Add a word and fix a typo

Found while syncing.
2025-12-24 11:28:19 +01:00
github-actions[bot] e55f223b46 📝 Update release notes
[skip ci]
2025-12-23 11:17:37 +00:00
Sebastián Ramírez a329baaa54
👷 Update secrets check (#14592) 2025-12-23 11:17:16 +00:00
github-actions[bot] a7a0aee984 📝 Update release notes
[skip ci]
2025-12-21 17:52:08 +00:00
Sebastián Ramírez 6539b80d9f
👷 Run CodSpeed tests in parallel to other tests to speed up CI (#14586) 2025-12-21 18:51:45 +01:00
github-actions[bot] e1bd9f3e33 📝 Update release notes
[skip ci]
2025-12-21 17:40:41 +00:00
Sebastián Ramírez b9b2793bda
🔨 Update scripts and pre-commit to autofix files (#14585) 2025-12-21 17:40:17 +00:00
Sebastián Ramírez c4a1ab5036 🔖 Release version 0.127.0 2025-12-21 17:45:43 +01:00
github-actions[bot] 22c7200ebb 📝 Update release notes
[skip ci]
2025-12-21 16:44:32 +00:00
Sebastián Ramírez 6e42bcd8ce
🔊 Add deprecation warnings when using `pydantic.v1` (#14583) 2025-12-21 17:44:10 +01:00
github-actions[bot] 6513d4daa1 📝 Update release notes
[skip ci]
2025-12-21 08:06:42 +00:00
Sebastián Ramírez 1d93d531bc
⬆️ Upgrade OpenAI model for translations to gpt-5.2 (#14579) 2025-12-21 08:06:22 +00:00
github-actions[bot] c2c1cc8aec 📝 Update release notes
[skip ci]
2025-12-20 17:32:31 +00:00
Sebastián Ramírez 5289259275
🔧 Add LLM prompt file for Korean, generated from the existing translations (#14546)
Co-authored-by: hy.lee <rurouni24@gmail.com>
2025-12-20 18:32:05 +01:00
github-actions[bot] 5783910d0c 📝 Update release notes
[skip ci]
2025-12-20 17:31:11 +00:00
Sebastián Ramírez 026b43e5d3
🔧 Add LLM prompt file for Japanese, generated from the existing translations (#14545)
Co-authored-by: Maruo.S <raspi-maru2004@outlook.jp>
2025-12-20 18:30:52 +01:00
Sebastián Ramírez 6b591ddd7e 📝 Update release notes 2025-12-20 17:15:42 +01:00
Sebastián Ramírez 10252b1937 🔖 Release version 0.126.0 2025-12-20 17:11:50 +01:00
github-actions[bot] 55ec28b81b 📝 Update release notes
[skip ci]
2025-12-20 16:09:21 +00:00
Sebastián Ramírez 1cb4e25651
🔧 Tweak pre-commit to allow committing release-notes (#14577) 2025-12-20 17:08:57 +01:00
github-actions[bot] eac57f6908 📝 Update release notes
[skip ci]
2025-12-20 15:56:04 +00:00
Sebastián Ramírez e2cd8a4201
Drop support for Pydantic v1, keeping short temporary support for Pydantic v2's `pydantic.v1` (#14575)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-20 16:55:38 +01:00
github-actions[bot] 5c7dceb80f 📝 Update release notes
[skip ci]
2025-12-20 06:40:44 +00:00
Paras Verma d70ed5eceb
📝 Fix duplicated variable in `docs_src/python_types/tutorial005_py39.py` (#14565)
Fix duplicated variable in python types example
2025-12-20 07:40:21 +01:00
github-actions[bot] 261c11b218 📝 Update release notes
[skip ci]
2025-12-19 12:52:40 +00:00
Sebastián Ramírez 75d4f9c098
🔧 Add LLM prompt file for Ukrainian, generated from the existing translations (#14548) 2025-12-19 13:51:53 +01:00
github-actions[bot] 19abc42efe 📝 Update release notes
[skip ci]
2025-12-19 12:45:20 +00:00
Sebastián Ramírez 09ab90ed35
⬆️ Use prek as a pre-commit alternative (#14572)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-19 12:44:55 +00:00
github-actions[bot] f58d846015 📝 Update release notes
[skip ci]
2025-12-18 13:24:47 +00:00
Sebastián Ramírez caee1d3123
👷 Add performance tests with CodSpeed (#14558)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-18 14:24:09 +01:00
Sebastián Ramírez c75f17d483 🔖 Release version 0.125.0 2025-12-17 22:37:19 +01:00
Sebastián Ramírez 241ca9a533 📝 Update release notes 2025-12-17 22:35:20 +01:00
github-actions[bot] 3f75f51255 📝 Update release notes
[skip ci]
2025-12-17 21:26:22 +00:00
Sebastián Ramírez 1c4fc96c91
♻️ Upgrade internal syntax to Python 3.9+ 🎉 (#14564) 2025-12-17 21:25:59 +00:00
github-actions[bot] 7f9709d75e 📝 Update release notes
[skip ci]
2025-12-17 20:47:44 +00:00
Sebastián Ramírez 84668c2acc
🔧 Drop support for Python 3.8 (#14563) 2025-12-17 20:47:16 +00:00
github-actions[bot] e0fd79139e 📝 Update release notes
[skip ci]
2025-12-17 20:42:17 +00:00
Sebastián Ramírez ed97d9dc0c
⚰️ Remove Python 3.8 from CI and remove Python 3.8 examples from source docs (#14559)
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2025-12-17 21:41:43 +01:00
github-actions[bot] 99ef383398 📝 Update release notes
[skip ci]
2025-12-17 19:59:35 +00:00
Sebastián Ramírez 56a549b4d5
🌐 Update translations for pt (add-missing) (#14539)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-17 20:59:04 +01:00
github-actions[bot] 330f0ba571 📝 Update release notes
[skip ci]
2025-12-17 14:39:37 +00:00
Motov Yurii 06273e48c8
⬆ Bump `markdown-include-variants` from 0.0.7 to 0.0.8 (#14556) 2025-12-17 15:39:10 +01:00
github-actions[bot] a2997a8f7d 📝 Update release notes
[skip ci]
2025-12-17 10:45:18 +00:00
Motov Yurii ed5c5bef5e
🔧 Temporarily disable translations still in progress, being migrated to the new LLM setup (#14555)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-17 11:44:55 +01:00
github-actions[bot] 493ff37fc0 📝 Update release notes
[skip ci]
2025-12-17 10:42:14 +00:00
Sebastián Ramírez 1a1c29e57d
🔧 Add LLM prompt file for French, generated from the existing French docs (#14544) 2025-12-17 11:41:43 +01:00
github-actions[bot] e32eed7599 📝 Update release notes
[skip ci]
2025-12-17 10:17:30 +00:00
Motov Yurii 6400e5ee29
🌐 Sync Portuguese docs (pages found with script) (#14554) 2025-12-17 11:17:03 +01:00
github-actions[bot] d68892ab02 📝 Update release notes
[skip ci]
2025-12-17 10:15:27 +00:00
Motov Yurii 6a8a2d62c4
🌐 Sync Spanish docs (outdated pages found with script) (#14553)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-12-17 11:15:01 +01:00
github-actions[bot] e675b25c60 📝 Update release notes
[skip ci]
2025-12-17 07:17:24 +00:00
Nils-Hero Lindemann 353b8b29fa
🌐 Sync German docs (#14519)
Sync with #14505 (plus some more)

I actually searched for those patterns in VS Code.

Always:
    files to exclude: README.md, SECURITY.md, llm-prompt.md

This search & replace cleans up the hash parts everywhere under docs/.
It only finds the four occurences in the two _llm-test.md under docs/de/ and docs/pt/

    files to include: docs/**
        Search regex: \{[^\S\n]*#([^\S\n]*[a-z0-9]+(?:-[a-z0-9]+)*)[^\S\n]*\}
        Replace with: { #$1 }

This search finds headings without hash parts. It finds two headings in docs\de\docs\index.md (those which #14505 fixes) and all headings in docs\pt\docs\tutorial\security\index.md, which I also fixed on the way as that document seems to be in sync. docs\pt\docs\index.md is not in Sync, so I didnt touch it.

    files to include: docs/de/**, docs/pt/**
        Search regex: ^(#+)[^\S\n]*([^{}#\s]+(?:[^\S\n]+[^{}\s]+)*)[^\S\n]*(?=\n)
        (added the missing hash parts)
2025-12-17 08:17:04 +01:00
github-actions[bot] 272204c0c7 📝 Update release notes
[skip ci]
2025-12-16 21:05:45 +00:00
Sebastián Ramírez 818ce0fa2f
🔥 Remove inactive/scarce translations to Vietnamese (#14543) 2025-12-16 21:05:18 +00:00
github-actions[bot] ed20bf6bf3 📝 Update release notes
[skip ci]
2025-12-16 20:59:17 +00:00
Sebastián Ramírez 58bc4a15ac
🔥 Remove inactive/scarce translations to Persian (#14542) 2025-12-16 20:58:53 +00:00
github-actions[bot] 9be5063396 📝 Update release notes
[skip ci]
2025-12-16 20:44:35 +00:00
Sebastián Ramírez 4a6a87674a
🔥 Remove translation to emoji to simplify the new setup with LLM autotranslations (#14541) 2025-12-16 21:44:10 +01:00
github-actions[bot] 01bb87275b 📝 Update release notes
[skip ci]
2025-12-16 20:33:42 +00:00
Sebastián Ramírez 9a03503542
🌐 Update translations for pt (update-outdated) (#14537)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-16 21:32:40 +01:00
github-actions[bot] e5d0e78bd4 📝 Update release notes
[skip ci]
2025-12-16 20:32:33 +00:00
Sebastián Ramírez c4fb93f9c2
🔧 Update test workflow config, remove commented code (#14540) 2025-12-16 20:32:09 +00:00
github-actions[bot] 98bee09a6a 📝 Update release notes
[skip ci]
2025-12-16 17:52:40 +00:00
Sebastián Ramírez c68dc2d419
👷 Configure coverage, error on main tests, don't wait for Smokeshow (#14536) 2025-12-16 17:52:17 +00:00
github-actions[bot] ec287a329b 📝 Update release notes
[skip ci]
2025-12-16 17:37:09 +00:00
Sebastián Ramírez c0e4b9cd67
👷 Run Smokeshow always, even on test failures (#14538) 2025-12-16 17:36:42 +00:00
github-actions[bot] c98485514c 📝 Update release notes
[skip ci]
2025-12-16 17:00:34 +00:00
Sebastián Ramírez 6281f8721a
👷 Make Pydantic versions customizable in CI (#14535) 2025-12-16 18:00:12 +01:00
github-actions[bot] 75ad0a0f8c 📝 Update release notes
[skip ci]
2025-12-16 16:34:08 +00:00
Sebastián Ramírez da83d79546
🌐 Update translations for es (update-outdated) (#14532)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-16 17:33:45 +01:00
github-actions[bot] f43cba7e78 📝 Update release notes
[skip ci]
2025-12-16 16:16:56 +00:00
Sebastián Ramírez cbbb11f4df
🌐 Update translations for es (add-missing) (#14533)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-16 16:16:35 +00:00
github-actions[bot] 532ba725a5 📝 Update release notes
[skip ci]
2025-12-16 15:35:03 +00:00
Sebastián Ramírez 886b367a8c
👷 Fix checkout GitHub Action fetch-depth for LLM translations, enable cron monthly (#14531) 2025-12-16 15:34:37 +00:00
github-actions[bot] 41d1b84bd5 📝 Update release notes
[skip ci]
2025-12-16 12:53:54 +00:00
Sebastián Ramírez 5da1cb0792
👷 Fix Typer command for CI LLM translations (#14530) 2025-12-16 12:53:28 +00:00
github-actions[bot] f9397e93b5 📝 Update release notes
[skip ci]
2025-12-16 12:41:12 +00:00
Sebastián Ramírez 2e7aaea524
👷 Update LLM translation CI, add language matrix and extra commands, prepare for scheduled run (#14529) 2025-12-16 12:40:50 +00:00
github-actions[bot] 4414cd849d 📝 Update release notes
[skip ci]
2025-12-16 12:34:25 +00:00
Sebastián Ramírez c548348386
👷 Update github-actions user for GitHub Actions workflows (#14528) 2025-12-16 12:34:01 +00:00
github-actions[bot] 61ffa3eb82 📝 Update release notes
[skip ci]
2025-12-12 16:57:03 +00:00
Sebastián Ramírez 59917ab679
🌐 Remove translations for removed docs (#14516) 2025-12-12 16:56:39 +00:00
github-actions[bot] 1163dbd17f 📝 Update release notes
[skip ci]
2025-12-12 16:54:50 +00:00
Sebastián Ramírez 435d839c72
Add requirements for translations (#14515) 2025-12-12 16:54:13 +00:00
Sebastián Ramírez b1d9769f97 🔖 Release version 0.124.4 2025-12-12 15:59:12 +01:00
github-actions[bot] 89157a803c 📝 Update release notes
[skip ci]
2025-12-12 14:57:20 +00:00
Motov Yurii d86c47477e
🐛 Fix parameter aliases (#14371)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-12-12 15:56:57 +01:00
Sebastián Ramírez 3fe6522aae 🔖 Release version 0.124.3 2025-12-12 15:32:58 +01:00
github-actions[bot] 80d1f732e5 📝 Update release notes
[skip ci]
2025-12-12 14:31:45 +00:00
Sebastián Ramírez c0556ac3a5
🐛 Fix support for tagged union with discriminator inside of `Annotated` with `Body()` (#14512) 2025-12-12 15:31:21 +01:00
github-actions[bot] 1fcec88ad2 📝 Update release notes
[skip ci]
2025-12-11 21:25:27 +00:00
Motov Yurii f8b216df30
🌐 Sync Russian docs (#14509)
* Translate missing pages

* Update outdated translations
2025-12-11 22:25:03 +01:00
github-actions[bot] 4b905b614c 📝 Update release notes
[skip ci]
2025-12-11 16:16:13 +00:00
Motov Yurii 6c54bcefd3
Add set of tests for request parameters and alias (#14358)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-12-11 17:15:36 +01:00
github-actions[bot] 475ce41268 📝 Update release notes
[skip ci]
2025-12-11 16:02:50 +00:00
Sebastián Ramírez 564a4ac1b8
👷 Tweak coverage to not pass Smokeshow max file size limit (#14507) 2025-12-11 16:02:26 +00:00
github-actions[bot] 931e80f20c 📝 Update release notes
[skip ci]
2025-12-11 15:28:47 +00:00
Sofie Van Landeghem a7ba9932ba
Expand test matrix to include Windows and MacOS (#14171)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-11 16:28:21 +01:00
github-actions[bot] 009c8af7fe 📝 Update release notes
[skip ci]
2025-12-11 14:49:09 +00:00
Sebastián Ramírez 4c4d520198
📝 Tweak links format (#14505) 2025-12-11 14:48:47 +00:00
github-actions[bot] 1cf7cd8af0 📝 Update release notes
[skip ci]
2025-12-10 13:54:57 +00:00
Nils-Hero Lindemann 4a9f13763d
🌐 Sync German docs (#14488)
* Sync with #14472

* Sync with #14413

* Sync with #14486

* Sync with #14487
2025-12-10 14:54:34 +01:00
github-actions[bot] 30747a69c8 📝 Update release notes
[skip ci]
2025-12-10 12:57:18 +00:00
Sebastián Ramírez cd9d093f60
📝 Update docs about re-raising validation errors, do not include string as is to not leak information (#14487) 2025-12-10 12:56:50 +00:00
github-actions[bot] 4a98a66778 📝 Update release notes
[skip ci]
2025-12-10 12:29:04 +00:00
Sebastián Ramírez 442cb306f6
🔥 Remove external links section (#14486) 2025-12-10 12:28:40 +00:00
Sebastián Ramírez 7b0b915749 🔖 Release version 0.124.2 2025-12-10 13:07:53 +01:00
github-actions[bot] 96bdde376f 📝 Update release notes
[skip ci]
2025-12-10 12:06:32 +00:00
Sebastián Ramírez 7ba042e069
🐛 Fix support for `if TYPE_CHECKING`, non-evaluated stringified annotations (#14485) 2025-12-10 13:06:05 +01:00
Sebastián Ramírez 60699f306b 🔖 Release version 0.124.1 2025-12-10 11:38:41 +01:00
github-actions[bot] ae7af59c6d 📝 Update release notes
[skip ci]
2025-12-10 10:36:56 +00:00
Sebastián Ramírez 42b250d14d
🐛 Fix handling arbitrary types when using `arbitrary_types_allowed=True` (#14482) 2025-12-10 11:36:29 +01:00
github-actions[bot] 71a17b5932 📝 Update release notes
[skip ci]
2025-12-10 08:55:57 +00:00
Motov Yurii 9475024640
📝 Add variants for code examples in "Advanced User Guide" (#14413) 2025-12-10 09:55:32 +01:00
github-actions[bot] 5b28a04d55 📝 Update release notes
[skip ci]
2025-12-09 11:12:49 +00:00
Sebastián Ramírez 8cedb742cb
Add test for Pydantic v2, dataclasses, UUID, and `__annotations__` (#14477) 2025-12-09 12:12:24 +01:00
github-actions[bot] 320e7ce8fd 📝 Update release notes
[skip ci]
2025-12-08 13:05:20 +00:00
Alejandra 81517f66cc
📝 Update tech stack in project generation docs (#14472) 2025-12-08 13:04:54 +00:00
Sebastián Ramírez b5ca13249e 🔖 Release version 0.124.0 2025-12-06 14:09:51 +01:00
github-actions[bot] a2cef707e3 📝 Update release notes
[skip ci]
2025-12-06 12:23:23 +00:00
Yuji Teshima 5b6245666b
✏️ Fix typo in `scripts/mkdocs_hooks.py` (#14457) 2025-12-06 13:23:01 +01:00
github-actions[bot] dbd34f1578 📝 Update release notes
[skip ci]
2025-12-06 12:22:24 +00:00
Savannah Ostrowski e1117f7550
🚸 Improve tracebacks by adding endpoint metadata (#14306)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-12-06 12:21:57 +00:00
Sebastián Ramírez 08b09e5236 🔖 Release version 0.123.10 2025-12-05 22:26:36 +01:00
github-actions[bot] e7d7038dfa 📝 Update release notes
[skip ci]
2025-12-05 21:21:29 +00:00
Motov Yurii da0ffab0b2
🐛 Fix using class (not instance) dependency that has `__call__` method (#14458)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-12-05 21:21:05 +00:00
github-actions[bot] 516169428d 📝 Update release notes
[skip ci]
2025-12-05 20:19:54 +00:00
Motov Yurii 812a1926f0
🐛 Fix `separate_input_output_schemas=False` with `computed_field` (#14453) 2025-12-05 21:19:30 +01:00
Sebastián Ramírez f0dd1046a6 🔖 Release version 0.123.9 2025-12-04 23:23:21 +01:00
github-actions[bot] 188d631011 📝 Update release notes
[skip ci]
2025-12-04 22:22:25 +00:00
Sebastián Ramírez 0b5fa563cd
🐛 Fix OAuth2 scopes in OpenAPI in extra corner cases, parent dependency with scopes, sub-dependency security scheme without scopes (#14459) 2025-12-04 23:22:01 +01:00
Sebastián Ramírez eb1d50479b 🔖 Release version 0.123.8 2025-12-04 14:01:00 +01:00
github-actions[bot] e248a4d22b 📝 Update release notes
[skip ci]
2025-12-04 12:59:45 +00:00
Sebastián Ramírez 0ec4bafca2
🐛 Fix OpenAPI security scheme OAuth2 scopes declaration, deduplicate security schemes with different scopes (#14455) 2025-12-04 13:59:24 +01:00
Sebastián Ramírez 603df6e36f 🔖 Release version 0.123.7 2025-12-04 09:27:38 +01:00
github-actions[bot] 6c565482cf 📝 Update release notes
[skip ci]
2025-12-04 08:18:55 +00:00
chaen 861598b4e3
🐛 Fix evaluating stringified annotations in Python 3.10 (#11355)
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
Co-authored-by: svlandeg <svlandeg@github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-12-04 09:18:32 +01:00
Sebastián Ramírez 811fa89875 🔖 Release version 0.123.6 2025-12-04 08:33:11 +01:00
github-actions[bot] 6c6b9d7a2b 📝 Update release notes
[skip ci]
2025-12-04 07:29:53 +00:00
Sebastián Ramírez bba4d4c95e
🐛 Fix support for functools wraps and partial combined, for async and regular functions and classes in path operations and dependencies (#14448)
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
2025-12-04 08:29:28 +01:00
Sebastián Ramírez c57ac7bdf3 🔖 Release version 0.123.5 2025-12-02 22:06:25 +01:00
github-actions[bot] 3c440c762a 📝 Update release notes
[skip ci]
2025-12-02 20:58:53 +00:00
Lie Ryan 9824486616
Allow using dependables with `functools.partial()` (#9753)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-12-02 20:58:30 +00:00
github-actions[bot] aee8e78078 📝 Update release notes
[skip ci]
2025-12-02 17:33:22 +00:00
Nils-Hero Lindemann f4a17b7568
🌐 Sync German docs (#14367)
* Sync with #14217

* Sync with #14359

* Sync with #13786

* Sync with #14070

* Sync with #14120

* Sync with #14211

* Sync with #14405

* "to deploy" -> "deployen"

The LLM used that translation a lot ithis convinced me that "deployen" it is the better word. "bereitstellen" (or "ausliefern") is still used for "to serve".

---------

Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
2025-12-02 18:32:56 +01:00
github-actions[bot] 4ade6d62e2 📝 Update release notes
[skip ci]
2025-12-02 17:23:36 +00:00
[object Object] 1c1e584abd
Add support for wrapped functions (e.g. `@functools.wraps()`) used with forward references (#5077)
Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-12-02 18:23:14 +01:00
github-actions[bot] 930b27e5fa 📝 Update release notes
[skip ci]
2025-12-02 17:00:02 +00:00
Victorien 80d69ae0bb
🐛 Fix optional sequence handling with new union syntax from Python 3.10 (#14430)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-12-02 16:59:38 +00:00
github-actions[bot] cff2236dac 📝 Update release notes
[skip ci]
2025-12-02 16:49:12 +00:00
Sebastián Ramírez a79ae3d66f
🔥 Remove dangling extra condiitonal no longer needed (#14435) 2025-12-02 16:48:46 +00:00
github-actions[bot] f636513390 📝 Update release notes
[skip ci]
2025-12-02 13:43:52 +00:00
Sebastián Ramírez 247ef32e79
♻️ Refactor internals, update `is_coroutine` check to reuse internal supported variants (unwrap, check class) (#14434) 2025-12-02 13:43:31 +00:00
github-actions[bot] 13a98c9988 📝 Update release notes
[skip ci]
2025-12-02 13:34:45 +00:00
Matthew Martin 73c411e1b9
Handle wrapped dependencies (#9555)
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-12-02 14:34:19 +01:00
Sebastián Ramírez 4976568fc7 🔖 Release version 0.123.4 2025-12-02 11:47:05 +01:00
github-actions[bot] fb30cc2f50 📝 Update release notes
[skip ci]
2025-12-02 09:22:35 +00:00
Vincent Grafé f95a174288
🐛 Fix OpenAPI schema support for computed fields when using `separate_input_output_schemas=False` (#13207)
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
Co-authored-by: svlandeg <svlandeg@github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: svlandeg <sofie.vanlandeghem@gmail.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-12-02 09:22:08 +00:00
github-actions[bot] 5126e099bd 📝 Update release notes
[skip ci]
2025-12-02 09:11:52 +00:00
Motov Yurii dcf0299195
📝 Fix docstring of `servers` parameter (#14405)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-12-02 09:11:29 +00:00
Sebastián Ramírez c516c9904b 🔖 Release version 0.123.3 2025-12-02 08:42:22 +01:00
github-actions[bot] b49c05ec22 📝 Update release notes
[skip ci]
2025-12-02 07:24:31 +00:00
Motov Yurii 015b4fae9c
🐛 Fix Query\Header\Cookie parameter model alias (#14360)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-12-02 07:24:09 +00:00
github-actions[bot] eead41bf4c 📝 Update release notes
[skip ci]
2025-12-02 07:10:50 +00:00
Motov Yurii 0f613d9051
🐛 Fix optional sequence handling in `serialize sequence value` with Pydantic V2 (#14297)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-12-02 08:10:27 +01:00
Sebastián Ramírez 3c54a8f07b 🔖 Release version 0.123.2 2025-12-02 06:31:27 +01:00
github-actions[bot] e1a2933739 📝 Update release notes
[skip ci]
2025-12-02 05:09:48 +00:00
zadevhub 00b97526e7
📝 Add tip on how to install `pip` in case of `No module named pip` error in `virtual-environments.md` (#14211) 2025-12-02 06:09:25 +01:00
github-actions[bot] 2ca7709c24 📝 Update release notes
[skip ci]
2025-12-02 05:07:29 +00:00
Flavius bb05007f55
📝 Update Primary Key notes for the SQL databases tutorial to avoid confusion (#14120) 2025-12-02 06:06:56 +01:00
github-actions[bot] 0f7ce0b78a 📝 Update release notes
[skip ci]
2025-12-02 05:04:09 +00:00
SaisakthiM cdafd64c15
📝 Clarify estimation note in documentation (#14070) 2025-12-02 06:03:46 +01:00
github-actions[bot] c6c7b72096 📝 Update release notes
[skip ci]
2025-12-02 05:01:37 +00:00
Alex Colby cb3792d39e
🐛 Fix unformatted `{type_}` in FastAPIError (#14416)
Co-authored-by: Alex Colby <alex.colby@intellisense.io>
2025-12-02 06:01:11 +01:00
github-actions[bot] 10eed3806a 📝 Update release notes
[skip ci]
2025-12-02 04:57:45 +00:00
Motov Yurii de5bec637c
🐛 Fix parsing extra non-body parameter list (#14356)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-12-02 05:57:19 +01:00
github-actions[bot] 2330e2de75 📝 Update release notes
[skip ci]
2025-12-02 04:49:52 +00:00
Motov Yurii 6cf40df24d
🐛 Fix parsing extra `Form` parameter list (#14303)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-12-02 05:49:32 +01:00
github-actions[bot] 740ec2787b 📝 Update release notes
[skip ci]
2025-12-02 04:40:16 +00:00
ad hoc d68c066246
🐛 Fix support for form values with empty strings interpreted as missing (`None` if that's the default), for compatibility with HTML forms (#13537)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-12-02 05:39:55 +01:00
Sebastián Ramírez c3373205d0 🔖 Release version 0.123.1 2025-12-02 05:30:18 +01:00
github-actions[bot] 3b4b5ab8c8 📝 Update release notes
[skip ci]
2025-12-02 04:04:37 +00:00
Sofie Van Landeghem 8f99a2b734
🐛 Avoid accessing non-existing "$ref" key for Pydantic v2 compat remapping (#14361)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-12-02 05:04:13 +01:00
github-actions[bot] 74b4c3c9a1 📝 Update release notes
[skip ci]
2025-12-02 04:03:00 +00:00
Hemanth U bf322d0e94
🐛 Fix Windows UnicodeEncodeError in CLI test (#14295)
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-12-02 04:02:38 +00:00
github-actions[bot] 327bad18aa 📝 Update release notes
[skip ci]
2025-12-02 03:32:40 +00:00
Kent Huang 20f40b29c0
🐛 Fix `TypeError` when encoding a decimal with a `NaN` or `Infinity` value (#12935)
Signed-off-by: Kent Huang <kent@infuseai.io>
2025-12-02 04:31:59 +01:00
github-actions[bot] ee490906d8 📝 Update release notes
[skip ci]
2025-12-01 20:07:18 +00:00
Sebastián Ramírez 6e82df816d
🔧 Update sponsors: add Greptile (#14429) 2025-12-01 21:06:57 +01:00
github-actions[bot] e752224bce 📝 Update release notes
[skip ci]
2025-12-01 13:17:51 +00:00
Sebastián Ramírez 0dee714026
👥 Update FastAPI GitHub topic repositories (#14426)
Co-authored-by: github-actions <github-actions@github.com>
2025-12-01 14:17:29 +01:00
github-actions[bot] 938f471079 📝 Update release notes
[skip ci]
2025-12-01 06:33:00 +00:00
Motov Yurii 6400d8a623
⬆ Bump markdown-include-variants from 0.0.6 to 0.0.7 (#14423) 2025-12-01 07:32:32 +01:00
github-actions[bot] f8e46d98a0 📝 Update release notes
[skip ci]
2025-12-01 06:31:20 +00:00
Sebastián Ramírez 8a7ad3d255
👥 Update FastAPI People - Sponsors (#14422)
Co-authored-by: github-actions <github-actions@github.com>
2025-12-01 07:30:56 +01:00
github-actions[bot] d661bb1324 📝 Update release notes
[skip ci]
2025-12-01 06:28:06 +00:00
Sebastián Ramírez 32aba57b49
👥 Update FastAPI People - Contributors and Translators (#14420)
Co-authored-by: github-actions <github-actions@github.com>
2025-12-01 07:27:43 +01:00
Sebastián Ramírez f2bab95267 🔖 Release version 0.123.0 2025-11-30 15:47:35 +01:00
github-actions[bot] c38e3e0108 📝 Update release notes
[skip ci]
2025-11-30 14:46:13 +00:00
Sebastián Ramírez 7fbd30460f
🐛 Cache dependencies that don't use scopes and don't have sub-dependencies with scopes (#14419)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-11-30 15:45:49 +01:00
Sebastián Ramírez 63d7a2b997 🔖 Release version 0.122.1 2025-11-30 13:00:20 +01:00
github-actions[bot] 7681f2904d 📝 Update release notes
[skip ci]
2025-11-30 11:57:24 +00:00
Kristján Valur Jónsson 378ad688b7
🐛 Fix hierarchical security scope propagation (#5624)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Co-authored-by: svlandeg <svlandeg@github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2025-11-30 12:57:01 +01:00
github-actions[bot] c6487ed632 📝 Update release notes
[skip ci]
2025-11-29 12:09:26 +00:00
Motov Yurii 62a6974004
⬆ Bump markdown-include-variants from 0.0.5 to 0.0.6 (#14418) 2025-11-29 13:08:57 +01:00
github-actions[bot] 998288261a 📝 Update release notes
[skip ci]
2025-11-28 15:55:40 +00:00
Sebastián Ramírez 8ab7167eaf
💅 Update CSS to explicitly use emoji font (#14415) 2025-11-28 15:55:15 +00:00
Sebastián Ramírez 5b0625df96 🔖 Release version 0.122.0 2025-11-24 20:14:34 +01:00
Sebastián Ramírez 8732c53478 📝 Updates release notes 2025-11-24 20:12:28 +01:00
github-actions[bot] a4ef97afd9 📝 Update release notes
[skip ci]
2025-11-24 19:03:33 +00:00
Motov Yurii 51ad909ffe
🐛 Use `401` status code in security classes when credentials are missing (#13786)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-11-24 20:03:06 +01:00
github-actions[bot] e2354a0a06 📝 Update release notes
[skip ci]
2025-11-24 15:00:36 +00:00
github-actions[bot] cc66dee55c 📝 Update release notes
[skip ci]
2025-11-24 15:00:29 +00:00
github-actions[bot] ecfb752487 📝 Update release notes
[skip ci]
2025-11-24 15:00:13 +00:00
github-actions[bot] 8b18522205 📝 Update release notes
[skip ci]
2025-11-24 15:00:12 +00:00
github-actions[bot] a2395e0243 📝 Update release notes
[skip ci]
2025-11-24 14:59:55 +00:00
github-actions[bot] c7d05a903c 📝 Update release notes
[skip ci]
2025-11-24 14:58:56 +00:00
Sofie Van Landeghem ab33b45718
👷 Upgrade `latest-changes` GitHub Action and pin `actions/checkout@v5` (#14403)
👷 Upgrade latest-changes and pin actions/checkout@v5
2025-11-24 15:58:32 +01:00
Motov Yurii 5265c4f5cb
🔧 Configure labeler to exclude files that start from underscore for `lang-all` label (#14213) 2025-11-23 21:10:04 +01:00
Sebastián Ramírez 4f3ff79736
👷 Add pre-commit config with local script for permalinks (#14398)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-11-23 18:41:43 +01:00
Sebastián Ramírez 79bc4b9ca0
👷 Add custom pre-commit CI (#14397) 2025-11-23 17:36:34 +01:00
Sebastián Ramírez ae951f6981
💄 Use font Fira Code to fix display of Rich panels in docs in Windows (#14387) 2025-11-23 10:27:40 +01:00
dependabot[bot] cbe5bdb85f
⬆ Bump actions/checkout from 5 to 6 (#14381)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-21 14:03:21 +01:00
github-actions[bot] 2909f8a628 📝 Update release notes
[skip ci]
2025-11-21 12:49:34 +00:00
Motov Yurii 32b375c5e4
🛠️ Add `add-permalinks` and `add-permalinks-page` to `scripts/docs.py` (#14033)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-11-21 13:49:11 +01:00
github-actions[bot] 456008a52b 📝 Update release notes
[skip ci]
2025-11-20 10:45:39 +00:00
Sebastián Ramírez be5a6311f5
🔧 Upgrade Material for MkDocs and remove insiders (#14375) 2025-11-20 11:45:16 +01:00
Sebastián Ramírez 325fd16d32 🔖 Release version 0.121.3 2025-11-19 17:51:59 +01:00
github-actions[bot] 7659b70da0 📝 Update release notes
[skip ci]
2025-11-19 16:50:42 +00:00
Sebastián Ramírez 85701631a0
♻️ Make the result of `Depends()` and `Security()` hashable, as a workaround for other tools interacting with these internal parts (#14372) 2025-11-19 17:50:18 +01:00
github-actions[bot] 566e3157a5 📝 Update release notes
[skip ci]
2025-11-19 11:55:32 +00:00
Ben Beasley 569226e753
⬆️ Bump Starlette to <`0.51.0` (#14282) 2025-11-19 12:55:05 +01:00
github-actions[bot] 33a75f4817 📝 Update release notes
[skip ci]
2025-11-19 10:12:24 +00:00
Nils-Hero Lindemann 89baa704a9
📝 Add missing hash part (#14369)
Add missing hash part

Was forgotten in #14359. I already added it in #14367
2025-11-19 11:12:00 +01:00
github-actions[bot] 827ed1e6a2 📝 Update release notes
[skip ci]
2025-11-18 08:30:46 +00:00
Edge-Seven df83eb7278
📝 Fix typos in code comments (#14364)
Fix typos in some files

Co-authored-by: khanhkhanhlele <namkhanh20xx@gmail.com>
2025-11-18 09:30:20 +01:00
github-actions[bot] 4e84f31694 📝 Update release notes
[skip ci]
2025-11-17 19:34:16 +00:00
Sebastián Ramírez 994d6cc912
📝 Add docs for using FastAPI Cloud (#14359) 2025-11-17 20:33:53 +01:00
Sebastián Ramírez 02e108d166 🔖 Release version 0.121.2 2025-11-13 18:03:55 +01:00
github-actions[bot] d3b75974f4 📝 Update release notes
[skip ci]
2025-11-13 13:59:34 +00:00
Sebastián Ramírez 5d40dfbc9b
🐛 Fix handling of JSON Schema attributes named "$ref" (#14349) 2025-11-13 14:59:07 +01:00
github-actions[bot] eaf611f9ee 📝 Update release notes
[skip ci]
2025-11-13 09:22:06 +00:00
Mia Bajić 004ab1a9d1
📝 Add EuroPython talk & podcast episode with Sebastián Ramírez (#14260)
Add EuroPython & podcast episode with Sebastián Ramírez
2025-11-13 10:21:43 +01:00
github-actions[bot] d1be85c728 📝 Update release notes
[skip ci]
2025-11-13 07:37:43 +00:00
Motov Yurii 42930fe600
✏️ Fix links and add missing permalink in docs (#14217)
* Fix link url to match link text

* Add missing permalink in `behind-a-proxy.md`

* Fix link in `advanced-dependencies.md`
2025-11-13 08:37:15 +01:00
github-actions[bot] 9e362d9f6e 📝 Update release notes
[skip ci]
2025-11-12 16:24:24 +00:00
Rafael de Oliveira Marques 540a83da65
🌐 Update Portuguese translations with LLM prompt (#14228)
* validated llm translation

* validated llm translation

* validated llm translation

* validated llm translation

* validated llm translation

* validated llm translation

* validated llm translation

* validated llm translation

* validated llm translation

* validated llm translation

* validated llm translation

* validated llm translation

* validated llm translation

* validated llm translation

* validated llm translation

* validated llm translation

* validated llm translation

* fix non-Annotated in llm-prompt

* rerun after a few changes in llm-prompt

* fix non-Annotated

* validated llm translation

* fix llm translation

* update outdated translations

* fix translation for operation IDs

* add header link

* add missing link

* fix line break

* fix diff

* fix llm translation

* fix 'Atualize' to 'Atualizar'

* update alternatives.md

* update async.md

* update fastapi-cli.md

* update features.md

* update help-fastapi.md

* update history-design-future.md

* update index.md

* update advanced/events.md

* update advanced/middleware.md

* update advanced/response-cookies.md

* update advanced/response-headers.md

* update advanced/templates.md

* update advanced/testing-websockets.md

* update advanced/using-request-directly.md

* update advanced/websockets.md

* update advanced/security/oauth2-scopes.md

* update deployment/cloud.md

* update deployment/manually.md

* update how-to/custom-request-and-route.md

* update how-to/migrate-from-pydantic-v1-to-pydantic-v2.md

* update tutorial/background-tasks.md

* update tutorial/first-steps.md

* update tutorial/handling-errors.md

* update tutorial/middleware.md

* update tutorial/request-files.md

* update tutorial/sql-databases.md

* update tutorial/static-files.md

* update tutorial/testing.md

* update tutorial/dependencies/dependencies-with-yield.md

* update advanced/advanced-dependencies.md

---------

Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2025-11-12 17:23:57 +01:00
github-actions[bot] 1a2e4152ed 📝 Update release notes
[skip ci]
2025-11-12 15:23:24 +00:00
Rafael de Oliveira Marques 0878361f6b
🔨 Add Portuguese translations LLM prompt (#14208)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-12 16:22:59 +01:00
github-actions[bot] 6fae64ff49 📝 Update release notes
[skip ci]
2025-11-10 20:55:20 +00:00
Motov Yurii c09ba719ba
🌐 Sync Russian docs (#14331)
Update outdated\missing pages in Rus translations
2025-11-10 21:54:56 +01:00
github-actions[bot] 409e7b503c 📝 Update release notes
[skip ci]
2025-11-10 08:34:48 +00:00
Nils-Hero Lindemann db488f3220
🌐 Sync German docs (#14317)
* Sync with #14262

* Sync with #14287

* Two improvements

* "Frühzeitig beenden" -> "Frühes Beenden"
* "Make herum" bold too
2025-11-10 09:34:25 +01:00
Sebastián Ramírez 1c7e2540c2 🔖 Release version 0.121.1 2025-11-08 22:47:00 +01:00
github-actions[bot] 9e5439959a 📝 Update release notes
[skip ci]
2025-11-08 21:43:59 +00:00
luzzodev 282f372eda
🐛 Fix `Depends(func, scope='function')` for top level (parameterless) dependencies (#14301) 2025-11-08 22:43:30 +01:00
github-actions[bot] 972a967d5d 📝 Update release notes
[skip ci]
2025-11-04 08:39:30 +00:00
github-actions[bot] 4170f621a5 📝 Update release notes
[skip ci]
2025-11-04 08:38:34 +00:00
dependabot[bot] 67c8dfaf0f
⬆ Bump ruff from 0.13.2 to 0.14.3 (#14276)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.13.2 to 0.14.3.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.13.2...0.14.3)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.14.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-04 09:38:16 +01:00
pre-commit-ci[bot] 34db1e2e2c
⬆ [pre-commit.ci] pre-commit autoupdate (#14289)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.14.2 → v0.14.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.2...v0.14.3)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-04 09:38:05 +01:00
github-actions[bot] b787103226 📝 Update release notes
[skip ci]
2025-11-03 13:20:34 +00:00
Sebastián Ramírez 289b4aa2fa
📝 Upate docs for advanced dependencies with `yield`, noting the changes in 0.121.0, adding `scope` (#14287) 2025-11-03 14:19:58 +01:00
Sebastián Ramírez 4efae81a76 🔖 Release version 0.121.0 2025-11-03 11:21:36 +01:00
Sebastián Ramírez 3690140555 📝 Update release notes 2025-11-03 11:19:56 +01:00
github-actions[bot] ad4d8f24ca 📝 Update release notes
[skip ci]
2025-11-03 10:13:13 +00:00
Sebastián Ramírez ac438b9934
Add support for dependencies with scopes, support `scope="request"` for dependencies with `yield` that exit before the response is sent (#14262)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-03 11:12:49 +01:00
github-actions[bot] 425a4c5bb1 📝 Update release notes
[skip ci]
2025-11-03 09:25:02 +00:00
github-actions[bot] 3a223b9073 📝 Update release notes
[skip ci]
2025-11-03 09:24:57 +00:00
Sebastián Ramírez 566e0d60b2
👥 Update FastAPI People - Contributors and Translators (#14273)
Co-authored-by: github-actions <github-actions@github.com>
2025-11-03 10:24:36 +01:00
github-actions[bot] 940ee0c9c3 📝 Update release notes
[skip ci]
2025-11-03 09:24:17 +00:00
Sebastián Ramírez f8df43d734
👥 Update FastAPI People - Sponsors (#14274)
Co-authored-by: github-actions <github-actions@github.com>
2025-11-03 10:24:09 +01:00
Sebastián Ramírez dbb7020a4d
👥 Update FastAPI GitHub topic repositories (#14280)
Co-authored-by: github-actions <github-actions@github.com>
2025-11-03 10:23:52 +01:00
github-actions[bot] 32da8ca78b 📝 Update release notes
[skip ci]
2025-11-02 17:15:57 +00:00
dependabot[bot] 8c42d0ce16
⬆ Bump mkdocs-macros-plugin from 1.4.0 to 1.4.1 (#14277)
Bumps [mkdocs-macros-plugin](https://github.com/fralau/mkdocs_macros_plugin) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/fralau/mkdocs_macros_plugin/releases)
- [Changelog](https://github.com/fralau/mkdocs-macros-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fralau/mkdocs_macros_plugin/compare/v1.4.0...v1.4.1)

---
updated-dependencies:
- dependency-name: mkdocs-macros-plugin
  dependency-version: 1.4.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-02 18:15:19 +01:00
github-actions[bot] 2a25f6d3a3 📝 Update release notes
[skip ci]
2025-11-02 17:15:00 +00:00
dependabot[bot] 8be5867de7
⬆ Bump mkdocstrings[python] from 0.26.1 to 0.30.1 (#14279)
Bumps [mkdocstrings[python]](https://github.com/mkdocstrings/mkdocstrings) from 0.26.1 to 0.30.1.
- [Release notes](https://github.com/mkdocstrings/mkdocstrings/releases)
- [Changelog](https://github.com/mkdocstrings/mkdocstrings/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mkdocstrings/mkdocstrings/compare/0.26.1...0.30.1)

---
updated-dependencies:
- dependency-name: mkdocstrings[python]
  dependency-version: 0.30.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-02 18:14:31 +01:00
Sebastián Ramírez fad35ef43f 🔖 Release version 0.120.4 2025-10-31 19:35:33 +01:00
github-actions[bot] 4d57c13055 📝 Update release notes
[skip ci]
2025-10-31 18:35:03 +00:00
Motov Yurii 496de1816a
🐛 Fix security schemes in OpenAPI when added at the top level app (#14266)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-10-31 19:34:30 +01:00
Sebastián Ramírez 2cf04ee30d 🔖 Release version 0.120.3 2025-10-30 21:40:08 +01:00
github-actions[bot] ec00f5a90f 📝 Update release notes
[skip ci]
2025-10-30 19:51:03 +00:00
Motov Yurii 8b46d8821b
📝 Update note for untranslated pages (#14257)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-30 20:50:37 +01:00
github-actions[bot] 17fcbbe910 📝 Update release notes
[skip ci]
2025-10-30 19:35:31 +00:00
Sebastián Ramírez dcfb8b9dda
♻️ Reduce internal cyclic recursion in dependencies, from 2 functions calling each other to 1 calling itself (#14256) 2025-10-30 20:35:04 +01:00
github-actions[bot] 1fc586c3a5 📝 Update release notes
[skip ci]
2025-10-30 04:59:14 +00:00
Sebastián Ramírez bb88a0f94a
♻️ Refactor internals of dependencies, simplify code and remove `get_param_sub_dependant` (#14255) 2025-10-30 05:58:49 +01:00
github-actions[bot] 9d1a384f4f 📝 Update release notes
[skip ci]
2025-10-30 04:52:12 +00:00
Sebastián Ramírez c144f9fbd3
♻️ Refactor internals of dependencies, simplify using dataclasses (#14254) 2025-10-30 05:51:50 +01:00
Sebastián Ramírez 22ccca21fc 🔖 Release version 0.120.2 2025-10-29 14:44:41 +01:00
github-actions[bot] d2a703d5cc 📝 Update release notes
[skip ci]
2025-10-29 13:43:35 +00:00
Sebastián Ramírez 35aa12b9bd
🔧 Add sponsor: SerpApi (#14248) 2025-10-29 14:43:11 +01:00
github-actions[bot] c01b5dd96f 📝 Update release notes
[skip ci]
2025-10-29 13:09:57 +00:00
Sebastián Ramírez 6a657f360d
🐛 Fix separation of schemas with nested models introduced in 0.119.0 (#14246) 2025-10-29 14:09:30 +01:00
github-actions[bot] 7132a69046 📝 Update release notes
[skip ci]
2025-10-28 07:50:28 +00:00
github-actions[bot] db7feb5a3e 📝 Update release notes
[skip ci]
2025-10-28 07:50:26 +00:00
github-actions[bot] 448ea5ec82 📝 Update release notes
[skip ci]
2025-10-28 07:48:51 +00:00
pre-commit-ci[bot] b618e0f9d4
⬆ [pre-commit.ci] pre-commit autoupdate (#14237)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.14.1 → v0.14.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.1...v0.14.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-28 08:48:46 +01:00
dependabot[bot] ccf50ca477
⬆ Bump actions/download-artifact from 5 to 6 (#14236)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-28 08:48:36 +01:00
dependabot[bot] a0ef245067
⬆ Bump actions/upload-artifact from 4 to 5 (#14235)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-28 08:48:28 +01:00
Sebastián Ramírez 78c94c3f56 🔖 Release version 0.120.1 2025-10-27 18:51:46 +01:00
github-actions[bot] 4b0301b280 📝 Update release notes
[skip ci]
2025-10-27 17:50:15 +00:00
Motov Yurii 436932aef5
⬆️ Bump Starlette to <`0.50.0` (#14234) 2025-10-27 18:49:54 +01:00
github-actions[bot] 3ea6a4a0b1 📝 Update release notes
[skip ci]
2025-10-27 14:47:51 +00:00
Motov Yurii 96dd32718b
🔧 Add `license` and `license-files` to `pyproject.toml`, remove `License` from `classifiers` (#14230) 2025-10-27 15:45:14 +01:00
Sebastián Ramírez cd40c5b40f 🔖 Release version 0.120.0 2025-10-23 22:54:45 +02:00
Sebastián Ramírez 1c6ee57bbf 📝 Update release notes 2025-10-23 22:54:19 +02:00
github-actions[bot] 09f40968cb 📝 Update release notes
[skip ci]
2025-10-23 20:32:06 +00:00
Sebastián Ramírez d390f2e41f
Migrate internal reference documentation from `typing_extensions.Doc` to `annotated_doc.Doc` (#14222) 2025-10-23 22:31:35 +02:00
github-actions[bot] cb7018d782 📝 Update release notes
[skip ci]
2025-10-21 20:32:57 +00:00
Nils-Hero Lindemann a578ea1fd3
🛠️ Update German LLM prompt and test file (#14189)
Minor fixes in German LLM prompt and test file

Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2025-10-21 22:32:28 +02:00
github-actions[bot] 9c912d1dd6 📝 Update release notes
[skip ci]
2025-10-21 07:53:59 +00:00
pre-commit-ci[bot] da011f212a
⬆ [pre-commit.ci] pre-commit autoupdate (#14181)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.13.3 → v0.14.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.13.3...v0.14.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-21 09:53:27 +02:00
github-actions[bot] 046d49b5a9 📝 Update release notes
[skip ci]
2025-10-20 14:00:33 +00:00
Nils-Hero Lindemann 847280450a
🌐 Sync German docs (#14188)
Sync German docs with #14168

Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2025-10-20 16:00:08 +02:00
Sebastián Ramírez 864b569cf8 🔖 Release version 0.119.1 2025-10-20 13:28:38 +02:00
github-actions[bot] 43f15d3b43 📝 Update release notes
[skip ci]
2025-10-20 11:27:39 +00:00
Sofie Van Landeghem d8c691f7f0
🐛 Fix internal Pydantic v1 compatibility (warnings) for Python 3.14 and Pydantic 2.12.1 (#14186)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-10-20 13:26:49 +02:00
github-actions[bot] 6e49dc0295 📝 Update release notes
[skip ci]
2025-10-19 19:12:47 +00:00
Sebastián Ramírez 7df594d284
🔧 Add sponsor Requestly (#14205) 2025-10-19 21:12:22 +02:00
github-actions[bot] 81f85831f5 📝 Update release notes
[skip ci]
2025-10-11 19:36:56 +00:00
Motov Yurii 7f810ca93b
🔧 Configure reminder for `waiting` label in `issue-manager` (#14156) 2025-10-11 21:36:25 +02:00
github-actions[bot] 414f961f1f 📝 Update release notes
[skip ci]
2025-10-11 17:49:15 +00:00
Marcelo Trylesinski dde7bd1ceb
📝 Replace `starlette.io` by `starlette.dev` and `uvicorn.org` by `uvicorn.dev` (#14176)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-11 17:48:49 +00:00
Sebastián Ramírez 2e721e1b02 🔖 Release version 0.119.0 2025-10-11 19:09:01 +02:00
Sebastián Ramírez fc7a0686af 📝 Update release notes 2025-10-11 19:07:40 +02:00
github-actions[bot] 3a3879b2c3 📝 Update release notes
[skip ci]
2025-10-11 16:46:19 +00:00
Sebastián Ramírez d34918abf0
Add support for `from pydantic.v1 import BaseModel`, mixed Pydantic v1 and v2 models in the same app (#14168)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-11 18:45:54 +02:00
Sebastián Ramírez 352dbefc63 🔖 Release version 0.118.3 2025-10-10 12:34:39 +02:00
github-actions[bot] 96e7d6eaa4 📝 Update release notes
[skip ci]
2025-10-10 09:45:05 +00:00
Sofie Van Landeghem 3611c3fc5b
⬆️ Add support for Python 3.14 (#14165) 2025-10-10 11:44:39 +02:00
Sebastián Ramírez 942fce394b 🔖 Release version 0.118.2 2025-10-08 16:49:59 +02:00
github-actions[bot] 13b067c9b6 📝 Update release notes
[skip ci]
2025-10-08 14:48:57 +00:00
François Voron 185cecd891
🐛 Fix tagged discriminated union not recognized as body field (#12942)
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Co-authored-by: Patrick Arminio <patrick.arminio@gmail.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-10-08 14:48:30 +00:00
github-actions[bot] 27c0f7e75f 📝 Update release notes
[skip ci]
2025-10-08 14:37:16 +00:00
dependabot[bot] 05dbfebce5
⬆ Bump astral-sh/setup-uv from 6 to 7 (#14167)
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 6 to 7.
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](https://github.com/astral-sh/setup-uv/compare/v6...v7)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-08 16:36:25 +02:00
Sebastián Ramírez 01be148429 🔖 Release version 0.118.1 2025-10-08 11:05:44 +02:00
github-actions[bot] fca8564ea0 📝 Update release notes
[skip ci]
2025-10-08 09:03:50 +00:00
Sebastián Ramírez 485bfedf5d
🔨 Move local coverage logic to its own script (#14166) 2025-10-08 09:03:21 +00:00
github-actions[bot] 32b93b53fc 📝 Update release notes
[skip ci]
2025-10-08 08:58:49 +00:00
Colin Watson c970d8a735
👽️ Ensure compatibility with Pydantic 2.12.0 (#14036)
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
Co-authored-by: svlandeg <svlandeg@github.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Co-authored-by: Patrick Arminio <patrick.arminio@gmail.com>
2025-10-08 10:57:37 +02:00
github-actions[bot] 22b38099ce 📝 Update release notes
[skip ci]
2025-10-07 15:05:44 +00:00
pre-commit-ci[bot] bc5e877c9c
⬆ [pre-commit.ci] pre-commit autoupdate (#14161)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.13.2 → v0.13.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.13.2...v0.13.3)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-07 17:05:17 +02:00
github-actions[bot] 1cd8717818 📝 Update release notes
[skip ci]
2025-10-06 19:08:44 +00:00
Simon Gurcke 6df0358b80
📝 Add External Link: Getting started with logging in FastAPI (#14152)
Add logging article to External links
2025-10-06 21:08:20 +02:00
github-actions[bot] 56c0632f86 📝 Update release notes
[skip ci]
2025-10-06 11:10:19 +00:00
Sebastián Ramírez 61596ebe5b
🔨 Add Russian translations LLM prompt (#13936)
* 🔨 Add Russian translations LLM prompt

* 🔨 Tweak prompt with input from Yurii

* 📝 Update LLM prompt

* Update llm-prompt.md

* Update llm-prompt.md

* Update llm-prompt.md

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

* Update llm-prompt.md

* Update llm-prompt.md

* Update llm-prompt.md

* Update ru `llm-prompt.md`

---------

Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
2025-10-06 13:09:58 +02:00
github-actions[bot] e820049caa 📝 Update release notes
[skip ci]
2025-10-02 06:56:51 +00:00
dependabot[bot] 3e97c96b60
⬆ Bump griffe-typingdoc from 0.2.8 to 0.2.9 (#14144)
Bumps [griffe-typingdoc](https://github.com/mkdocstrings/griffe-typingdoc) from 0.2.8 to 0.2.9.
- [Release notes](https://github.com/mkdocstrings/griffe-typingdoc/releases)
- [Changelog](https://github.com/mkdocstrings/griffe-typingdoc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mkdocstrings/griffe-typingdoc/compare/0.2.8...0.2.9)

---
updated-dependencies:
- dependency-name: griffe-typingdoc
  dependency-version: 0.2.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-02 08:56:32 +02:00
github-actions[bot] beef83d871 📝 Update release notes
[skip ci]
2025-10-02 06:46:36 +00:00
dependabot[bot] d421feadf2
⬆ Bump mkdocs-macros-plugin from 1.3.9 to 1.4.0 (#14145)
Bumps [mkdocs-macros-plugin](https://github.com/fralau/mkdocs_macros_plugin) from 1.3.9 to 1.4.0.
- [Release notes](https://github.com/fralau/mkdocs_macros_plugin/releases)
- [Changelog](https://github.com/fralau/mkdocs-macros-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fralau/mkdocs_macros_plugin/compare/v1.3.9...v1.4.0)

---
updated-dependencies:
- dependency-name: mkdocs-macros-plugin
  dependency-version: 1.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-02 08:46:14 +02:00
github-actions[bot] 407a6a4a7c 📝 Update release notes
[skip ci]
2025-10-02 06:27:51 +00:00
dependabot[bot] ece783d217
⬆ Bump markdown-include-variants from 0.0.4 to 0.0.5 (#14146)
Bumps [markdown-include-variants](https://github.com/tiangolo/markdown-include-variants) from 0.0.4 to 0.0.5.
- [Release notes](https://github.com/tiangolo/markdown-include-variants/releases)
- [Changelog](https://github.com/tiangolo/markdown-include-variants/blob/main/release-notes.md)
- [Commits](https://github.com/tiangolo/markdown-include-variants/compare/0.0.4...0.0.5)

---
updated-dependencies:
- dependency-name: markdown-include-variants
  dependency-version: 0.0.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-02 08:27:21 +02:00
github-actions[bot] 45bfb89ea2 📝 Update release notes
[skip ci]
2025-10-01 16:44:12 +00:00
github-actions[bot] 6046849249 📝 Update release notes
[skip ci]
2025-10-01 16:43:50 +00:00
pre-commit-ci[bot] 597c2f42c6
⬆ [pre-commit.ci] pre-commit autoupdate (#14126)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.13.1 → v0.13.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.13.1...v0.13.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-01 18:43:21 +02:00
Sebastián Ramírez 975e7190e4
👥 Update FastAPI GitHub topic repositories (#14150)
Co-authored-by: github-actions <github-actions@github.com>
2025-10-01 18:43:11 +02:00
github-actions[bot] 65b9bc24ef 📝 Update release notes
[skip ci]
2025-10-01 16:43:01 +00:00
github-actions[bot] 46b7bfc478 📝 Update release notes
[skip ci]
2025-10-01 16:42:56 +00:00
Sebastián Ramírez 28f910a10b
👥 Update FastAPI People - Sponsors (#14139)
Co-authored-by: github-actions <github-actions@github.com>
2025-10-01 18:42:38 +02:00
Sebastián Ramírez 9d920d616f
👥 Update FastAPI People - Contributors and Translators (#14138)
Co-authored-by: github-actions <github-actions@github.com>
2025-10-01 18:42:31 +02:00
github-actions[bot] a2bde2b297 📝 Update release notes
[skip ci]
2025-10-01 15:50:23 +00:00
dependabot[bot] 69a69cc828
⬆ Bump ruff from 0.12.7 to 0.13.2 (#14147)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.12.7 to 0.13.2.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.12.7...0.13.2)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.13.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-01 17:50:01 +02:00
github-actions[bot] 4f0d9d0cf1 📝 Update release notes
[skip ci]
2025-10-01 15:48:14 +00:00
dependabot[bot] 796601bddb
⬆ Bump sqlmodel from 0.0.24 to 0.0.25 (#14143)
Bumps [sqlmodel](https://github.com/fastapi/sqlmodel) from 0.0.24 to 0.0.25.
- [Release notes](https://github.com/fastapi/sqlmodel/releases)
- [Changelog](https://github.com/fastapi/sqlmodel/blob/main/docs/release-notes.md)
- [Commits](https://github.com/fastapi/sqlmodel/compare/0.0.24...0.0.25)

---
updated-dependencies:
- dependency-name: sqlmodel
  dependency-version: 0.0.25
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-01 17:47:48 +02:00
github-actions[bot] ef24ee4c39 📝 Update release notes
[skip ci]
2025-10-01 15:20:18 +00:00
Nils-Hero Lindemann c623291929
🌐 Sync German docs (#14149)
* Sync German docs with #13917

Plus a typo fix in tutorial/security/oauth2-jwt.md line 89.

* Sync german docs with #14099

---------

Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2025-10-01 17:19:54 +02:00
github-actions[bot] 3a18a6d620 📝 Update release notes
[skip ci]
2025-10-01 13:26:33 +00:00
dependabot[bot] 90e567a6d9
⬆ Bump tiangolo/issue-manager from 0.5.1 to 0.6.0 (#14148)
Bumps [tiangolo/issue-manager](https://github.com/tiangolo/issue-manager) from 0.5.1 to 0.6.0.
- [Release notes](https://github.com/tiangolo/issue-manager/releases)
- [Commits](https://github.com/tiangolo/issue-manager/compare/0.5.1...0.6.0)

---
updated-dependencies:
- dependency-name: tiangolo/issue-manager
  dependency-version: 0.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-01 15:26:11 +02:00
github-actions[bot] a83a8e7a45 📝 Update release notes
[skip ci]
2025-09-30 11:37:34 +00:00
Motov Yurii 04d5e659bc
🌐 Add Russian translations for missing pages (LLM-generated) (#14135)
* Copy En pages

* Translate pages (reviewed and corrected)

* Apply changes from latest PRs: 13917 and 14099
2025-09-30 13:37:11 +02:00
github-actions[bot] 88a5554a44 📝 Update release notes
[skip ci]
2025-09-30 11:25:02 +00:00
Motov Yurii 977abe2396
🌐 Update Russian translations for existing pages (LLM-generated) (#14123)
* Update Russian translations for modified pages

* docs: fix translation for multiprocessing

* Update Russian translations for other existing pages

* Apply changes from latest PRs: 13917 and 14099

---------

Co-authored-by: vldmrdev <70532790+vldmrdev@users.noreply.github.com>
2025-09-30 13:24:39 +02:00
github-actions[bot] 3d70b26788 📝 Update release notes
[skip ci]
2025-09-30 06:26:25 +00:00
Sebastián Ramírez e7fc394e15
🌐 Remove configuration files for inactive translations (#14130) 2025-09-30 08:25:57 +02:00
github-actions[bot] 3481aad827 📝 Update release notes
[skip ci]
2025-09-30 05:57:45 +00:00
Sebastián Ramírez 2f6fb12258
👷 Update docs previews comment, single comment, add failure status (#14129)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-30 07:56:53 +02:00
github-actions[bot] 36a3830ba2 📝 Update release notes
[skip ci]
2025-09-30 04:07:18 +00:00
Motov Yurii 06367347e6
🔨 Modify `mkdocs_hooks.py` to add `title` to page's metadata (remove permalinks in social cards) (#14125) 2025-09-30 06:06:57 +02:00
Sebastián Ramírez 333f1ba737 🔖 Release version 0.118.0 2025-09-29 05:34:21 +02:00
Sebastián Ramírez 1d5168a4a1 📝 Update release notes 2025-09-29 05:33:39 +02:00
github-actions[bot] bfa54b406d 📝 Update release notes
[skip ci]
2025-09-29 03:31:17 +00:00
Sebastián Ramírez e329d78f86
🐛 Fix support for `StreamingResponse`s with dependencies with `yield` or `UploadFile`s, close after the response is done (#14099)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-29 05:29:38 +02:00
github-actions[bot] 861b22c408 📝 Update release notes
[skip ci]
2025-09-29 02:58:20 +00:00
Neizvestnyj efdafa4361
📝 Update `tutorial/security/oauth2-jwt/` to use `pwdlib` with Argon2 instead of `passlib` (#13917)
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-09-29 04:57:38 +02:00
github-actions[bot] 450a334253 📝 Update release notes
[skip ci]
2025-09-25 06:45:53 +00:00
alv2017 3eb2ee7510
✏️ Fix typos in OAuth2 password request forms (#14112)
Fixed typos in OAuth2PasswordRequestForm and in OAuth2PasswordRequestFormStrict
2025-09-25 08:45:24 +02:00
github-actions[bot] 287eb316df 📝 Update release notes
[skip ci]
2025-09-24 08:10:57 +00:00
Nils-Hero Lindemann cca3341cb9
🌐 Sync German docs (#14098)
* Sync German docs with #13510

* Sync German docs with #14059

---------

Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2025-09-24 10:10:28 +02:00
github-actions[bot] f235502234 📝 Update release notes
[skip ci]
2025-09-22 19:30:48 +00:00
pre-commit-ci[bot] b40da4f0d5
⬆ [pre-commit.ci] pre-commit autoupdate (#14103)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.13.0 → v0.13.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.13.0...v0.13.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-22 21:30:27 +02:00
github-actions[bot] 9aa25fd682 📝 Update release notes
[skip ci]
2025-09-22 15:12:21 +00:00
Alejandra 8170860322
♻️ Refactor sponsor image handling (#14102)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-22 17:11:52 +02:00
github-actions[bot] f0da082dd3 📝 Update release notes
[skip ci]
2025-09-21 14:11:44 +00:00
Alejandra f97524429d
🐛 Fix sponsor display issue by hiding element on image error (#14097) 2025-09-21 14:11:11 +00:00
github-actions[bot] 6b1e6c5efd 📝 Update release notes
[skip ci]
2025-09-21 12:54:37 +00:00
Alejandra 40f3ab18e0
🐛 Hide sponsor badge when sponsor image is not displayed (#14096) 2025-09-21 14:54:15 +02:00
github-actions[bot] 8dfc651e1a 📝 Update release notes
[skip ci]
2025-09-21 11:29:24 +00:00
Alejandra 2eca83fbda
📝 Update contributing guidelines for installing requirements (#14095) 2025-09-21 13:29:04 +02:00
Sebastián Ramírez 784f06cb9b 🔖 Release version 0.117.1 2025-09-20 22:15:41 +02:00
github-actions[bot] b5c05893b4 📝 Update release notes
[skip ci]
2025-09-20 19:56:30 +00:00
Thomas LÉVEIL 44fc67632b
🐛 Fix validation error when `File` is declared after `Form` parameter (#11194)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-09-20 21:55:59 +02:00
Sebastián Ramírez a84001000e 📝 Update release notes 2025-09-20 21:35:43 +02:00
Sebastián Ramírez 382d083e26 🔖 Release version 0.117.0 2025-09-20 21:34:05 +02:00
github-actions[bot] a7f2dbe976 📝 Update release notes
[skip ci]
2025-09-20 18:52:02 +00:00
vvanglro f1e6f978ce
️ Fix `default_factory` for response model field with Pydantic V1 (#9704)
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2025-09-20 20:51:40 +02:00
github-actions[bot] b01d5c97a0 📝 Update release notes
[skip ci]
2025-09-20 18:45:09 +00:00
Robert Hofer b51ec36f2e
Allow `None` as return type for bodiless responses (#9425)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-09-20 18:44:43 +00:00
github-actions[bot] 0bdc3ca373 📝 Update release notes
[skip ci]
2025-09-20 18:10:57 +00:00
Max McLennan 86e515784d
🐛 Fix inconsistent processing of model docstring formfeed char with Pydantic V1 (#6039)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-09-20 20:10:37 +02:00
github-actions[bot] 03123c00f1 📝 Update release notes
[skip ci]
2025-09-20 17:57:42 +00:00
Salim Aboubacar 2dc769b121
🐛 Fix `jsonable_encoder` alters `json_encoders` of Pydantic v1 objects (#4972)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
2025-09-20 19:57:18 +02:00
github-actions[bot] 606a6828e7 📝 Update release notes
[skip ci]
2025-09-20 17:49:50 +00:00
Marcelo Trylesinski cd2e1e43bd
📝 Add note about Cookies and JavaScript on `tutorial/cookie-params.md` (#13510)
Co-authored-by: svlandeg <svlandeg@github.com>
2025-09-20 19:49:27 +02:00
github-actions[bot] 60213f5a31 📝 Update release notes
[skip ci]
2025-09-20 17:47:45 +00:00
sammasak 8ede27223e
Allow array values for OpenAPI schema `type` field (#13639)
Co-authored-by: Lukas Rajala <lukas.rajala@klarna.com>
Co-authored-by: dlax <denis@laxalde.org>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-09-20 17:47:24 +00:00
github-actions[bot] 0358d3eab5 📝 Update release notes
[skip ci]
2025-09-20 17:37:45 +00:00
Evgeny Bokshitsky c2c6049b8f
♻️ Create `dependency-cache` dict in `solve_dependencies` only if `None` (don't re-create if empty) (#13689) 2025-09-20 19:37:18 +02:00
github-actions[bot] 21aa9d3719 📝 Update release notes
[skip ci]
2025-09-20 17:26:18 +00:00
rmawatson 9ac56c70f2
🐛 Reenable `allow_arbitrary_types` when only 1 argument is used on the API endpoint (#13694)
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2025-09-20 19:25:53 +02:00
github-actions[bot] 243f012fd0 📝 Update release notes
[skip ci]
2025-09-20 17:12:09 +00:00
Carlos Mario Toro bc5013cd56
Add OpenAPI `external_docs` parameter to `FastAPI` (#13713)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2025-09-20 19:11:46 +02:00
github-actions[bot] 14168b43eb 📝 Update release notes
[skip ci]
2025-09-20 16:58:15 +00:00
Amogha Rao 5fef4d199b
Enable test case for duplicated headers in `test_tutorial/test_header_params/test_tutorial003.py` (#13864)
Co-authored-by: amogha-rao <amogha.rao@cloudera.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-20 18:57:53 +02:00
github-actions[bot] d2f6b92a83 📝 Update release notes
[skip ci]
2025-09-20 16:31:01 +00:00
secrett2633 c831cdbde2
🐛 Fix `inspect.getcoroutinefunction()` can break testing with `unittest.mock.patch()` (#14022) 2025-09-20 18:30:34 +02:00
github-actions[bot] 73841b9976 📝 Update release notes
[skip ci]
2025-09-20 16:28:18 +00:00
Sofie Van Landeghem 744736af9c
📝 Remove outdated formatting from `path-params-numeric-validations.md` for languages `en`, `es` and `uk`. (#14059) 2025-09-20 18:27:21 +02:00
github-actions[bot] 651603cb37 📝 Update release notes
[skip ci]
2025-09-20 16:27:07 +00:00
山崎ヒカル 11d424c3dc
Simplify tests for response_model (#14062) 2025-09-20 18:26:21 +02:00
github-actions[bot] c8a29944f4 📝 Update release notes
[skip ci]
2025-09-20 16:23:31 +00:00
Sofie Van Landeghem fe4542279d
🚨 Install pydantic.mypy plugin (#14081) 2025-09-20 18:23:06 +02:00
github-actions[bot] d2da9e8e46 📝 Update release notes
[skip ci]
2025-09-20 15:10:36 +00:00
Nils-Hero Lindemann 9b1234d7d0
📝 Update prompts and German translation (#14015)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-09-20 17:10:09 +02:00
github-actions[bot] 4c175319f5 📝 Update release notes
[skip ci]
2025-09-20 12:58:37 +00:00
Nils-Hero Lindemann 7095a11056
📝 Fix and Improve English Documentation (#14048)
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2025-09-20 14:58:04 +02:00
github-actions[bot] 9d7388d9f1 📝 Update release notes
[skip ci]
2025-09-20 12:55:53 +00:00
Nils-Hero Lindemann f10ed69b97
Add LLM test file (#14049)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-20 12:55:29 +00:00
github-actions[bot] 111431295c 📝 Update release notes
[skip ci]
2025-09-20 12:22:28 +00:00
Motov Yurii 4c9c3b5942
🔨 Update translations script (#13968)
Co-authored-by: Nils Lindemann <nilsherolindemann@proton.me>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-20 14:22:04 +02:00
github-actions[bot] ccfca4cb06 📝 Update release notes
[skip ci]
2025-09-20 12:06:14 +00:00
Tamir Duberstein a95e91e46e
⬆️ Update mypy to 1.14.1 (#12970)
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
Co-authored-by: svlandeg <svlandeg@github.com>
Co-authored-by: svlandeg <sofie.vanlandeghem@gmail.com>
2025-09-20 14:05:51 +02:00
github-actions[bot] ee46b851bc 📝 Update release notes
[skip ci]
2025-09-20 11:44:16 +00:00
Motov Yurii 47acc62e54
🛠️ Update `docs.py generate-readme` command to remove permalinks from headers (#14055) 2025-09-20 13:43:51 +02:00
github-actions[bot] 5c1f87c563 📝 Update release notes
[skip ci]
2025-09-18 08:09:56 +00:00
Motov Yurii 805ab1be5b
📌 Pin `httpx` to `>=0.23.0,<1.0.0` (#14086) 2025-09-18 10:09:33 +02:00
Sebastián Ramírez a372edf7e8 🔖 Release version 0.116.2 2025-09-16 20:23:54 +02:00
github-actions[bot] bc1aba7322 📝 Update release notes
[skip ci]
2025-09-16 17:22:39 +00:00
Ben Beasley 7563579dc8
⬆️ Upgrade Starlette supported version range to >=0.40.0,<0.49.0 (#14077)
Co-authored-by: svlandeg <svlandeg@github.com>
2025-09-16 19:21:48 +02:00
github-actions[bot] 938dd045fd 📝 Update release notes
[skip ci]
2025-09-16 09:44:33 +00:00
dependabot[bot] 2a446f7151
⬆ Bump pyjwt from 2.8.0 to 2.9.0 (#13960)
* ⬆ Bump pyjwt from 2.8.0 to 2.10.1

Bumps [pyjwt](https://github.com/jpadilla/pyjwt) from 2.8.0 to 2.10.1.
- [Release notes](https://github.com/jpadilla/pyjwt/releases)
- [Changelog](https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/jpadilla/pyjwt/compare/2.8.0...2.10.1)

---
updated-dependencies:
- dependency-name: pyjwt
  dependency-version: 2.10.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* update to 2.9.0 instead

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2025-09-16 11:44:09 +02:00
github-actions[bot] ed45b074b9 📝 Update release notes
[skip ci]
2025-09-16 08:23:33 +00:00
pre-commit-ci[bot] 480cd8f4f9
⬆ [pre-commit.ci] pre-commit autoupdate (#14080)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.12.12 → v0.13.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.12...v0.13.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-16 10:23:14 +02:00
github-actions[bot] 16d75d90eb 📝 Update release notes
[skip ci]
2025-09-09 09:14:40 +00:00
dependabot[bot] a4841de65e
⬆ Bump actions/setup-python from 5 to 6 (#14042)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-09 11:14:16 +02:00
github-actions[bot] 984d646705 📝 Update release notes
[skip ci]
2025-09-09 09:12:07 +00:00
dependabot[bot] ec087cfa24
⬆ Bump actions/labeler from 5 to 6 (#14046)
Bumps [actions/labeler](https://github.com/actions/labeler) from 5 to 6.
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/labeler
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-09 11:11:44 +02:00
github-actions[bot] 1fe23335ce 📝 Update release notes
[skip ci]
2025-09-08 19:12:46 +00:00
pre-commit-ci[bot] d48144a3e7
⬆ [pre-commit.ci] pre-commit autoupdate (#14056)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.12.11 → v0.12.12](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.11...v0.12.12)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-08 21:12:20 +02:00
github-actions[bot] 3d08a4f3a8 📝 Update release notes
[skip ci]
2025-09-08 07:12:46 +00:00
pre-commit-ci[bot] caa3ccf638
⬆ [pre-commit.ci] pre-commit autoupdate (#14035)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.12.10 → v0.12.11](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.10...v0.12.11)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-08 09:12:23 +02:00
github-actions[bot] 5226ff90d7 📝 Update release notes
[skip ci]
2025-09-05 12:48:45 +00:00
dependabot[bot] d597f92482
⬆ Bump pypa/gh-action-pypi-publish from 1.12.4 to 1.13.0 (#14041)
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.12.4 to 1.13.0.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.12.4...v1.13.0)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-version: 1.13.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-05 14:48:16 +02:00
github-actions[bot] 43f6115096 📝 Update release notes
[skip ci]
2025-09-05 08:59:54 +00:00
github-actions[bot] 3112e05b77 📝 Update release notes
[skip ci]
2025-09-05 08:59:48 +00:00
Sebastián Ramírez 4560158502
👥 Update FastAPI People - Contributors and Translators (#14029)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-05 10:58:29 +02:00
Sebastián Ramírez 2ad28d436f
👥 Update FastAPI People - Sponsors (#14030)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-05 10:58:22 +02:00
github-actions[bot] d7604d16a3 📝 Update release notes
[skip ci]
2025-09-05 08:58:10 +00:00
github-actions[bot] 79c51ad542 📝 Update release notes
[skip ci]
2025-09-05 08:57:43 +00:00
Sebastián Ramírez 7cf567010d
👥 Update FastAPI GitHub topic repositories (#14031)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-05 10:57:41 +02:00
Sebastián Ramírez 3d763c8d38
👥 Update FastAPI People - Experts (#14034)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-05 10:57:16 +02:00
github-actions[bot] 30a07155fb 📝 Update release notes
[skip ci]
2025-09-05 08:34:10 +00:00
Sofie Van Landeghem bb4772c5aa
👷 Detect and label merge conflicts on PRs automatically (#14045) 2025-09-05 10:33:44 +02:00
github-actions[bot] 3e2dbf9169 📝 Update release notes
[skip ci]
2025-08-31 19:34:37 +00:00
Sebastián Ramírez f5b77ff0fc
📝 Add documentation for Behind a Proxy - Proxy Forwarded Headers, using `--forwarded-allow-ips="*"` (#14028)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-08-31 21:34:08 +02:00
github-actions[bot] 176cd8c9ef 📝 Update release notes
[skip ci]
2025-08-31 15:20:12 +00:00
Sebastián Ramírez 1884d76f61
🔧 Update sponsors: remove Platform.sh (#14027) 2025-08-31 15:19:49 +00:00
github-actions[bot] 8062aabdaa 📝 Update release notes
[skip ci]
2025-08-31 15:02:29 +00:00
Sebastián Ramírez ee9ccac1e5
🔧 Update sponsors: remove Mobb (#14026) 2025-08-31 15:02:08 +00:00
github-actions[bot] 5cd4c3b6bd 📝 Update release notes
[skip ci]
2025-08-31 10:59:17 +00:00
Jom Karlo Verzosa 4584f706bd
📝 Add deprecation info block about `dict()` in `docs/tutorial/body.md` (#13906)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-08-31 10:58:56 +00:00
github-actions[bot] ba9c8fba0b 📝 Update release notes
[skip ci]
2025-08-31 10:50:12 +00:00
Valentyn d9249c1949
📝 Fix Twitter to be X (Twitter) everywhere in documentation (#13809)
Co-authored-by: Valentyn Druzhynin <v.druzhynin@zakaz.global>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-08-31 12:49:48 +02:00
github-actions[bot] a973e787af 📝 Update release notes
[skip ci]
2025-08-31 10:33:32 +00:00
Ashish Pandey 1088d2abd9
🐛 Prevent scroll-to-top on restart/fast buttons in `termynal.js` (#13714)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-08-31 12:32:57 +02:00
github-actions[bot] 98ec6a6079 📝 Update release notes
[skip ci]
2025-08-31 10:29:48 +00:00
github-actions[bot] 6b4d292f3a 📝 Update release notes
[skip ci]
2025-08-31 10:29:27 +00:00
z0z0r4 d4ddcc5878
📝 Update testing events documentation (#13259)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-08-31 10:29:21 +00:00
Hotah Ma 0e5832aa6d
📝 Remove obsolete `url` field in error responses in docs (#13655)
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2025-08-31 12:29:01 +02:00
github-actions[bot] ee2acd8abc 📝 Update release notes
[skip ci]
2025-08-31 10:03:35 +00:00
Arnaud Durand e902ed5fc6
📝 Bring the `scope` claim in line with the standard in `docs_src/security/tutorial005.py` (#11189)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
2025-08-31 12:03:10 +02:00
github-actions[bot] cef1f166df 📝 Update release notes
[skip ci]
2025-08-31 09:59:28 +00:00
Soul Lee 8e63f75919
📝 Update TrustedHostMiddleware Documentation (#11441)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2025-08-31 11:59:07 +02:00
github-actions[bot] e1b9cc00ca 📝 Update release notes
[skip ci]
2025-08-31 09:56:48 +00:00
Denny Biasiolli 408b8a9beb
📝 Remove links to site callbackhell.com that doesn't exist anymore (#14006) 2025-08-31 11:56:21 +02:00
github-actions[bot] 0817c955ec 📝 Update release notes
[skip ci]
2025-08-31 09:16:03 +00:00
Motov Yurii c55f7138a1
📝 Add permalinks to headers in English docs (#13993)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-08-31 09:15:41 +00:00
github-actions[bot] 7653de2715 📝 Update release notes
[skip ci]
2025-08-31 09:11:36 +00:00
Sebastián Ramírez 784f068aba
🛠️ Update `mkdocs_hooks` to handle headers with permalinks when building docs (#14025)
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
2025-08-31 11:11:15 +02:00
github-actions[bot] 6db05770f6 📝 Update release notes
[skip ci]
2025-08-25 20:03:24 +00:00
pre-commit-ci[bot] 6be02e3d52
⬆ [pre-commit.ci] pre-commit autoupdate (#14016)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.12.9 → v0.12.10](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.9...v0.12.10)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-08-25 22:03:02 +02:00
github-actions[bot] 9cf7b70d7b 📝 Update release notes
[skip ci]
2025-08-20 09:11:20 +00:00
Motov Yurii f75c1532f6
⬆ Bump `mkdocs-macros-plugin` from 1.3.7 to 1.3.9 (#14003)
Bump mkdocs-macros-plugin from 1.3.7 to 1.3.9
2025-08-20 11:10:51 +02:00
github-actions[bot] 5c3a70d5b6 📝 Update release notes
[skip ci]
2025-08-18 21:07:25 +00:00
pre-commit-ci[bot] 6a45249303
⬆ [pre-commit.ci] pre-commit autoupdate (#13999)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.12.8 → v0.12.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.8...v0.12.9)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-08-18 23:07:04 +02:00
github-actions[bot] c23051682b 📝 Update release notes
[skip ci]
2025-08-18 06:35:06 +00:00
Mika df779885fa
📝 Fix code include for Pydantic models example in `docs/zh/docs/python-types.md` (#13997)
Updated the Pydantic expiration example in the Chinese documentation
2025-08-18 08:34:40 +02:00
github-actions[bot] 9c7abbff43 📝 Update release notes
[skip ci]
2025-08-15 22:01:21 +00:00
pre-commit-ci[bot] d12c1ac82c
⬆ [pre-commit.ci] pre-commit autoupdate (#13983)
updates:
- [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v5.0.0...v6.0.0)
- [github.com/astral-sh/ruff-pre-commit: v0.12.7 → v0.12.8](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.7...v0.12.8)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-08-16 00:00:47 +02:00
github-actions[bot] dbc9d3a0ce 📝 Update release notes
[skip ci]
2025-08-15 22:00:13 +00:00
Lubos f1b1449958
📝 Update `docs/en/docs/advanced/generate-clients.md` (#13793) 2025-08-15 23:59:47 +02:00
github-actions[bot] 078324583c 📝 Update release notes
[skip ci]
2025-08-15 21:44:33 +00:00
dependabot[bot] 7df361eb41
⬆ Bump actions/checkout from 4 to 5 (#13986)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-15 23:44:06 +02:00
github-actions[bot] 753bb9fb9f 📝 Update release notes
[skip ci]
2025-08-08 05:48:47 +00:00
Chai Landau ba0f6121b9
🔧 Update Speakeasy sponsor graphic (#13971) 2025-08-08 07:48:21 +02:00
github-actions[bot] 12b36a048c 📝 Update release notes
[skip ci]
2025-08-08 05:44:22 +00:00
pre-commit-ci[bot] 6ccad06081
⬆ [pre-commit.ci] pre-commit autoupdate (#13969)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.12.5 → v0.12.7](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.5...v0.12.7)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-08-08 07:44:02 +02:00
github-actions[bot] 6cee687a79 📝 Update release notes
[skip ci]
2025-08-08 05:43:40 +00:00
dependabot[bot] 5c8d5214ff
⬆ Bump actions/download-artifact from 4 to 5 (#13975)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-08 07:43:20 +02:00
github-actions[bot] 6df50d40fe 📝 Update release notes
[skip ci]
2025-08-01 14:32:59 +00:00
Sebastián Ramírez f736e48ab3
👥 Update FastAPI People - Experts (#13963)
Co-authored-by: github-actions <github-actions@github.com>
2025-08-01 16:32:33 +02:00
github-actions[bot] c40bd0e426 📝 Update release notes
[skip ci]
2025-08-01 14:09:56 +00:00
dependabot[bot] 11893d9cea
⬆ Bump ruff from 0.11.2 to 0.12.7 (#13957)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.11.2 to 0.12.7.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.11.2...0.12.7)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.12.7
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-01 16:09:11 +02:00
github-actions[bot] 37dd99ffe3 📝 Update release notes
[skip ci]
2025-08-01 14:06:58 +00:00
dependabot[bot] f8013621cc
⬆ Bump cairosvg from 2.7.1 to 2.8.2 (#13959)
Bumps [cairosvg](https://github.com/Kozea/CairoSVG) from 2.7.1 to 2.8.2.
- [Release notes](https://github.com/Kozea/CairoSVG/releases)
- [Changelog](https://github.com/Kozea/CairoSVG/blob/main/NEWS.rst)
- [Commits](https://github.com/Kozea/CairoSVG/compare/2.7.1...2.8.2)

---
updated-dependencies:
- dependency-name: cairosvg
  dependency-version: 2.8.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-01 16:06:33 +02:00
github-actions[bot] 391887db91 📝 Update release notes
[skip ci]
2025-08-01 13:50:42 +00:00
dependabot[bot] b42e28753e
⬆ Bump pydantic-ai from 0.0.30 to 0.4.10 (#13958)
Bumps [pydantic-ai](https://github.com/pydantic/pydantic-ai) from 0.0.30 to 0.4.10.
- [Release notes](https://github.com/pydantic/pydantic-ai/releases)
- [Changelog](https://github.com/pydantic/pydantic-ai/blob/main/docs/changelog.md)
- [Commits](https://github.com/pydantic/pydantic-ai/compare/v0.0.30...v0.4.10)

---
updated-dependencies:
- dependency-name: pydantic-ai
  dependency-version: 0.4.10
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-01 15:50:16 +02:00
github-actions[bot] 92ea53baca 📝 Update release notes
[skip ci]
2025-08-01 13:19:48 +00:00
Sebastián Ramírez 2e16e105c9
👥 Update FastAPI GitHub topic repositories (#13962)
Co-authored-by: github-actions <github-actions@github.com>
2025-08-01 15:19:22 +02:00
github-actions[bot] d07159797b 📝 Update release notes
[skip ci]
2025-08-01 13:09:46 +00:00
dependabot[bot] e7401d2e42
⬆ Bump mkdocs-material from 9.6.15 to 9.6.16 (#13961)
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.6.15 to 9.6.16.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.6.15...9.6.16)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-version: 9.6.16
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-01 15:09:18 +02:00
github-actions[bot] 6e69d62bfe 📝 Update release notes
[skip ci]
2025-08-01 06:22:46 +00:00
dependabot[bot] 79d2576508
⬆ Bump tiangolo/latest-changes from 0.3.2 to 0.4.0 (#13952)
Bumps [tiangolo/latest-changes](https://github.com/tiangolo/latest-changes) from 0.3.2 to 0.4.0.
- [Release notes](https://github.com/tiangolo/latest-changes/releases)
- [Commits](https://github.com/tiangolo/latest-changes/compare/0.3.2...0.4.0)

---
updated-dependencies:
- dependency-name: tiangolo/latest-changes
  dependency-version: 0.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-01 08:22:27 +02:00
github-actions 1c1c2e8ab9 📝 Update release notes
[skip ci]
2025-08-01 06:20:13 +00:00
Sebastián Ramírez 3ad01a1247
👥 Update FastAPI People - Sponsors (#13956)
Co-authored-by: github-actions <github-actions@github.com>
2025-08-01 08:19:53 +02:00
github-actions a0ede1839a 📝 Update release notes
[skip ci]
2025-08-01 06:17:21 +00:00
Sebastián Ramírez a9fbc4b8f5
👥 Update FastAPI People - Contributors and Translators (#13955)
Co-authored-by: github-actions <github-actions@github.com>
2025-08-01 08:16:58 +02:00
github-actions 1e4f123eb0 📝 Update release notes
[skip ci]
2025-07-31 18:21:09 +00:00
Sebastián Ramírez 8abfa0f106
🔧 Update sponsors: Databento link and sponsors_badge data (#13954) 2025-07-31 18:20:49 +00:00
github-actions cf726c93d9 📝 Update release notes
[skip ci]
2025-07-31 17:47:55 +00:00
Sebastián Ramírez e326cec10e
🔧 Update sponsors: Add Railway (#13953) 2025-07-31 17:47:31 +00:00
github-actions 8af92a6139 📝 Update release notes
[skip ci]
2025-07-30 16:38:11 +00:00
Motov Yurii b40acb83c9
⚒️ Update translate script, update prompt to minimize generated diff (#13947) 2025-07-30 18:37:49 +02:00
github-actions 7b2631a88d 📝 Update release notes
[skip ci]
2025-07-28 20:18:19 +00:00
pre-commit-ci[bot] 616106ca76
⬆ [pre-commit.ci] pre-commit autoupdate (#13943)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.12.4 → v0.12.5](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.4...v0.12.5)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-07-28 22:17:52 +02:00
github-actions c656671609 📝 Update release notes
[skip ci]
2025-07-27 23:52:18 +00:00
Sebastián Ramírez 9aab3d9e22
⚒️ Tweak translate script and CI (#13939) 2025-07-28 01:51:53 +02:00
github-actions c74e7d1ce4 📝 Update release notes
[skip ci]
2025-07-27 19:12:39 +00:00
Sebastián Ramírez 6516a6c4a6
👷 Add CI to translate with LLMs (#13937)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-07-27 21:12:19 +02:00
github-actions d5d302c3da 📝 Update release notes
[skip ci]
2025-07-26 21:27:58 +00:00
Sebastián Ramírez 273b06adab
⚒️ Update translate script, show and update outdated translations (#13933)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-07-26 21:27:35 +00:00
github-actions 4c40b484f1 📝 Update release notes
[skip ci]
2025-07-26 21:19:29 +00:00
Sebastián Ramírez adc328e258
🔨 Refactor translate script with extra feedback (prints) (#13932) 2025-07-26 23:19:05 +02:00
github-actions 4f0aae9d23 📝 Update release notes
[skip ci]
2025-07-26 18:58:14 +00:00
Sebastián Ramírez ae02be90b6
🔨 Update translations script to remove old (removed) files (#13928)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-07-26 20:57:50 +02:00
github-actions d67f092db8 📝 Update release notes
[skip ci]
2025-07-26 11:36:02 +00:00
Alejandra 3d60b5e23e
📝 Add discussion template for new language translation requests (#13535)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-07-26 11:35:42 +00:00
github-actions 89b4d1f076 📝 Update release notes
[skip ci]
2025-07-26 11:17:02 +00:00
Edmilson Monteiro Rodrigues Neto 2013336d65
🌐 Update Portuguese Translation for `docs/pt/docs/async.md` (#13863) 2025-07-26 13:16:39 +02:00
github-actions 8bfc783194 📝 Update release notes
[skip ci]
2025-07-26 10:51:53 +00:00
pre-commit-ci[bot] fcdd5031e1
⬆ [pre-commit.ci] pre-commit autoupdate (#13894)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.12.2 → v0.12.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.2...v0.12.4)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-07-26 12:51:31 +02:00
github-actions bfbed30869 📝 Update release notes
[skip ci]
2025-07-26 10:49:51 +00:00
Chih-Hsuan Yen 54c7c34b25
⬆ Update httpx requirement to >=0.23.0,<0.29.0 (#13114)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-07-26 12:49:23 +02:00
github-actions 106a4338db 📝 Update release notes
[skip ci]
2025-07-26 10:48:36 +00:00
Koyo Miyazaki e4453a850d
📝 Fix highlight line in `docs/ja/docs/tutorial/body.md` (#13927)
fix highlight line in docs/ja/docs/tutorial/body.md
2025-07-26 12:48:11 +02:00
github-actions 4ca93aea04 📝 Update release notes
[skip ci]
2025-07-25 09:27:24 +00:00
Mohammad da508e9dce
🌐 Add Persian translation for `docs/fa/docs/environment-variables.md` (#13923)
🌐 Add Persian translation for docs/fa/docs/environment-variables.md
2025-07-25 11:27:03 +02:00
github-actions ed48cc457f 📝 Update release notes
[skip ci]
2025-07-23 13:02:50 +00:00
Sebastián Ramírez a5a4daa705
🔧 Update sponsors: Add Mobb (#13916) 2025-07-23 15:02:20 +02:00
github-actions 6bc29cc5ba 📝 Update release notes
[skip ci]
2025-07-21 12:21:22 +00:00
Mohammad c8f330314e
🌐 Add Persian translation for `docs/fa/docs/python-types.md` (#13524)
* 🌐 Add Persian translation for docs/fa/docs/python-types.md

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-07-21 14:20:57 +02:00
github-actions d9e2aa8678 📝 Update release notes
[skip ci]
2025-07-21 09:57:51 +00:00
Edmilson Monteiro Rodrigues Neto cf0c3cf2c4
🌐 Update Portuguese Translation for `docs/pt/docs/project-generation.md` (#13875)
* docs: update pt-docs project_generation.md

* fix: fix typo
2025-07-21 11:57:31 +02:00
github-actions 4ec2c0bb5b 📝 Update release notes
[skip ci]
2025-07-21 09:43:19 +00:00
Mohammad 5c74eeba5b
🌐 Add Persian translation for `docs/fa/docs/async.md` (#13541)
* 🌐 Add Persian translation for docs/fa/docs/async.md

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-07-21 11:42:59 +02:00
github-actions 27f4240750 📝 Update release notes
[skip ci]
2025-07-14 12:59:10 +00:00
sajjad rahman 679a97603a
🌐 Add Bangali translation for `docs/bn/about/index.md` (#13882)
* add translation for docs/about/index.md

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2025-07-14 14:58:49 +02:00
github-actions e6d09027e5 📝 Update release notes
[skip ci]
2025-07-12 19:32:45 +00:00
Sebastián Ramírez 6726bf8559
👥 Update FastAPI People - Experts (#13889)
Co-authored-by: github-actions <github-actions@github.com>
2025-07-12 19:32:26 +00:00
github-actions 3063c7c57d 📝 Update release notes
[skip ci]
2025-07-12 19:10:12 +00:00
Sebastián Ramírez ce26b8e1ca
🔨 Update FastAPI People sleep interval, use external settings (#13888) 2025-07-12 19:09:49 +00:00
Sebastián Ramírez 313723494b 🔖 Release version 0.116.1 2025-07-11 18:17:57 +02:00
github-actions 095dab00c7 📝 Update release notes
[skip ci]
2025-07-11 16:16:48 +00:00
Sebastián Ramírez cad6880fd9
⬆️ Upgrade Starlette supported version range to `>=0.40.0,<0.48.0` (#13884) 2025-07-11 18:15:27 +02:00
github-actions a6e79e68a4 📝 Update release notes
[skip ci]
2025-07-11 16:14:42 +00:00
Motov Yurii 2c13b1ba4b
📝 Add notification about impending changes in Translations to `docs/en/docs/contributing.md` (#13886) 2025-07-11 18:14:15 +02:00
github-actions 7179d48fd7 📝 Update release notes
[skip ci]
2025-07-11 06:49:39 +00:00
pre-commit-ci[bot] 07bcb18a5a
⬆ [pre-commit.ci] pre-commit autoupdate (#13871)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.12.1 → v0.12.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.1...v0.12.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-07-11 08:49:17 +02:00
Sebastián Ramírez bd8f358fd9 🔖 Release version 0.116.0 2025-07-07 17:07:03 +02:00
Sebastián Ramírez 18eb7a7080 📝 Update release notes 2025-07-07 17:05:38 +02:00
github-actions dd906a998e 📝 Update release notes
[skip ci]
2025-07-07 15:00:58 +00:00
Sebastián Ramírez b083ccd250
Add support for deploying to FastAPI Cloud with `fastapi deploy` (#13870) 2025-07-07 17:00:35 +02:00
github-actions af64e9d196 📝 Update release notes
[skip ci]
2025-07-04 05:22:22 +00:00
Naves 0d5dc7ee7b
🌐 Add Russian translation for `docs/ru/docs/advanced/response-directly.md` (#13801)
* 🌐 Add Russian translation for `docs/ru/docs/advanced/response-directly.md`

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

* Update response-directly.md

fixed `Response-классов`

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-07-04 07:21:55 +02:00
github-actions 8068a404c7 📝 Update release notes
[skip ci]
2025-07-04 05:17:43 +00:00
Naves 6682295c73
🌐 Add Russian translation for `docs/ru/docs/advanced/additional-status-codes.md` (#13799)
* 🌐 Add Russian translation for `docs/ru/docs/advanced/additional-status-codes.md`

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

* Update additional-status-codes.md

fixed `Response-классов`

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-07-04 07:17:17 +02:00
github-actions 2915e31dab 📝 Update release notes
[skip ci]
2025-07-02 19:07:32 +00:00
dependabot[bot] 4f4d47baf4
⬆ Bump pillow from 11.1.0 to 11.3.0 (#13852)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 11.1.0 to 11.3.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/11.1.0...11.3.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-version: 11.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-02 21:07:09 +02:00
github-actions 8f336c5fd3 📝 Update release notes
[skip ci]
2025-07-01 13:20:56 +00:00
github-actions 3e666dfdd7 📝 Update release notes
[skip ci]
2025-07-01 13:20:35 +00:00
Sebastián Ramírez be91d0c1bd
👥 Update FastAPI People - Sponsors (#13846)
Co-authored-by: github-actions <github-actions@github.com>
2025-07-01 15:20:19 +02:00
Sebastián Ramírez f4bacfe1b5
👥 Update FastAPI GitHub topic repositories (#13848)
Co-authored-by: github-actions <github-actions@github.com>
2025-07-01 15:20:03 +02:00
github-actions 943faf237c 📝 Update release notes
[skip ci]
2025-07-01 13:19:35 +00:00
dependabot[bot] b0e09640e1
⬆ Bump mkdocs-material from 9.6.1 to 9.6.15 (#13849)
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.6.1 to 9.6.15.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.6.1...9.6.15)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-version: 9.6.15
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-01 15:19:03 +02:00
github-actions 638b4355d8 📝 Update release notes
[skip ci]
2025-07-01 13:18:41 +00:00
pre-commit-ci[bot] 21c8a32fa7
⬆ [pre-commit.ci] pre-commit autoupdate (#13843)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.12.0 → v0.12.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.0...v0.12.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-07-01 15:18:16 +02:00
github-actions a86b9a5b03 📝 Update release notes
[skip ci]
2025-07-01 05:14:52 +00:00
Sebastián Ramírez c6037fc96f
👥 Update FastAPI People - Contributors and Translators (#13845)
Co-authored-by: github-actions <github-actions@github.com>
2025-07-01 07:14:26 +02:00
github-actions 5e7c3ee1f3 📝 Update release notes
[skip ci]
2025-06-30 06:00:29 +00:00
Valentyn 6c1432801f
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/body-updates.md` (#13804)
* 🌐 Add Ukrainian translation for docs/uk/docs/tutorial/body-updates.md

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

---------

Co-authored-by: Valentyn Druzhynin <v.druzhynin@zakaz.global>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-06-30 08:00:04 +02:00
Sebastián Ramírez ebdeda2de6 🔖 Release version 0.115.14 2025-06-26 17:26:32 +02:00
Sebastián Ramírez 8fa19a6faa 📝 Update release notes 2025-06-26 17:24:56 +02:00
github-actions 3ecb4c5389 📝 Update release notes
[skip ci]
2025-06-26 15:23:20 +00:00
Patrick Arminio 9d0d8828cc
🐛 Fix support for unions when using `Form` (#13827) 2025-06-26 17:22:53 +02:00
github-actions df35896a0e 📝 Update release notes
[skip ci]
2025-06-25 09:13:15 +00:00
pre-commit-ci[bot] 8f64d09ee0
⬆ [pre-commit.ci] pre-commit autoupdate (#13823)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.11.13 → v0.12.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.13...v0.12.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-06-25 11:12:53 +02:00
github-actions 3b09dd8e01 📝 Update release notes
[skip ci]
2025-06-24 19:14:26 +00:00
Valentyn c30821ff6e
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/response-model.md` (#13792)
* 🌐 Add Ukrainian translation for docs/uk/docs/tutorial/response-model.md

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

* Fix review comments

---------

Co-authored-by: Valentyn Druzhynin <v.druzhynin@zakaz.global>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-06-24 21:14:01 +02:00
github-actions 666890ac7f 📝 Update release notes
[skip ci]
2025-06-24 18:58:10 +00:00
Valentyn 937af92ba7
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/security/index.md` (#13805)
Fixes after review

Co-authored-by: Valentyn Druzhynin <v.druzhynin@zakaz.global>
2025-06-24 20:57:48 +02:00
github-actions 1cf4b8c2de 📝 Update release notes
[skip ci]
2025-06-22 14:37:15 +00:00
Hirokatsu Endo dcb223d850
✏️ Fix typo in `docs/ja/docs/tutorial/encoder.md` (#13815) 2025-06-22 16:36:05 +02:00
github-actions baeeafa1e1 📝 Update release notes
[skip ci]
2025-06-22 14:35:47 +00:00
Hirokatsu Endo 487f940e91
✏️ Fix typo in `docs/ja/docs/tutorial/handling-errors.md` (#13814) 2025-06-22 16:35:27 +02:00
github-actions e9c33debaa 📝 Update release notes
[skip ci]
2025-06-22 14:35:16 +00:00
Hirokatsu Endo 041a37bb1f
✏️ Fix typo in `docs/ja/docs/tutorial/body-fields.md` (#13802) 2025-06-22 16:34:53 +02:00
github-actions 28038f19cf 📝 Update release notes
[skip ci]
2025-06-18 18:22:42 +00:00
Naves 9026f3b1bd
Misprint (#13800) 2025-06-18 20:22:18 +02:00
github-actions 8d9ef5d343 📝 Update release notes
[skip ci]
2025-06-18 08:41:19 +00:00
Naves b2923282ca
🌐 Add Russian translation for `docs/ru/docs/advanced/index.md` (#13797)
* Add Russian Translation for `docs/ru/docs/advanced/index.md`

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-06-18 10:40:59 +02:00
github-actions ac160885e1 📝 Update release notes
[skip ci]
2025-06-17 11:54:19 +00:00
Nolan Di Mare Sullivan 7d9195a248
📝 Update Speakeasy URL to Speakeasy Sandbox (#13697) 2025-06-17 13:53:56 +02:00
Sebastián Ramírez 4734df1db8 🔖 Release version 0.115.13 2025-06-17 13:41:24 +02:00
github-actions cdf6b31505 📝 Update release notes
[skip ci]
2025-06-17 10:48:39 +00:00
Gabriel dfe9dde982
📝 Add annotations to HTTP middleware example (#11530)
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-06-17 12:48:10 +02:00
github-actions 9957956ef8 📝 Update release notes
[skip ci]
2025-06-17 10:47:13 +00:00
Salar Nosrati-Ershad aebff5006f
Add `refreshUrl` parameter in `OAuth2PasswordBearer` (#11460)
Co-authored-by: Salar Nosrati-Ershad <s3r@tutamail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2025-06-17 12:46:49 +02:00
github-actions 64834d4a60 📝 Update release notes
[skip ci]
2025-06-17 10:42:46 +00:00
oogee 30b9dfb11c
🚸 Set format to password for fields `password` and `client_secret` in `OAuth2PasswordRequestForm`, make docs show password fields for passwords (#11032)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-06-17 12:41:59 +02:00
github-actions 6b5b26fa61 📝 Update release notes
[skip ci]
2025-06-17 10:37:30 +00:00
Diego Fioravanti 3f908a47d9
📝 Clarify in CORS docs that wildcards and credentials are mutually exclusive (#9829)
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
Co-authored-by: Michael Jones <mike.ed.jones@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: User <alejsdev@gmail.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-06-17 12:36:59 +02:00
github-actions 01c3ad2eb2 📝 Update release notes
[skip ci]
2025-06-17 10:25:45 +00:00
Valentyn 85a2eed888
Simplify tests for `settings` (#13505)
Co-authored-by: Valentyn Druzhynin <v.druzhynin@zakaz.global>
2025-06-17 12:25:20 +02:00
github-actions 45fefe88cf 📝 Update release notes
[skip ci]
2025-06-17 10:25:13 +00:00
Valentyn da4605b039
Simplify tests for `validate_response_recursive` (#13507)
Co-authored-by: Valentyn Druzhynin <v.druzhynin@zakaz.global>
2025-06-17 12:24:10 +02:00
github-actions 4e4715b131 📝 Update release notes
[skip ci]
2025-06-17 10:18:31 +00:00
Peter b4524145e6
✏️ Fix typo in docstring (#13532) 2025-06-17 12:18:00 +02:00
github-actions 1daf9fddfd 📝 Update release notes
[skip ci]
2025-06-17 10:17:31 +00:00
Swastik Pradhan 6d78b228d8
📝 Clarify guidance on using `async def` without `await` (#13642)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-06-17 10:17:08 +00:00
github-actions 10bf65f272 📝 Update release notes
[skip ci]
2025-06-17 08:05:54 +00:00
Timon 97fdbdd0d8
📝 Update exclude-parameters-from-openapi documentation links (#13600) 2025-06-17 10:05:34 +02:00
github-actions 7dc9901f35 📝 Update release notes
[skip ci]
2025-06-17 07:50:39 +00:00
Emmanuel Ferdman 7c04182724
🔨 Resolve Pydantic deprecation warnings in internal script (#13696)
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2025-06-17 09:50:19 +02:00
github-actions 6e11a2d1c4 📝 Update release notes
[skip ci]
2025-06-17 07:46:49 +00:00
Motov Yurii 535d5b3f9f
🐛 Fix truncating the model's description with form feed (`\f`) character for Pydantic V2 (#13698)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-06-17 09:46:27 +02:00
github-actions 7565f580ce 📝 Update release notes
[skip ci]
2025-06-17 07:43:06 +00:00
Motov Yurii 590abc4b96
📝 Clarify the middleware execution order in docs (#13699) 2025-06-17 09:42:41 +02:00
github-actions 3ac38eb195 📝 Update release notes
[skip ci]
2025-06-16 11:11:36 +00:00
Naves 6cbdcd3961
🌐 Add Russian Translation for `docs/ru/docs/advanced/response-change-status-code.md` (#13791)
🌐 Add Russian Translation for docs/ru/docs/advanced/response-change-status-code.md
2025-06-16 13:11:10 +02:00
github-actions c7302ea99e 📝 Update release notes
[skip ci]
2025-06-16 10:43:29 +00:00
Mohammad 49fe5bac2e
🌐 Add Persian translation for `docs/fa/docs/learn/index.md` (#13518)
* 🌐 Add Persian translation for docs/fa/docs/learn/index.md

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-06-16 12:43:07 +02:00
github-actions 1f79531a5b 📝 Update release notes
[skip ci]
2025-06-12 07:32:29 +00:00
ChaeYeong Hwang 095dcc8a63
🌐 Add Korean translation for `docs/ko/docs/advanced/sub-applications.md` (#4543)
* This PR translates advanced/sub-applications.md in Korean.

    Test complete

    related: #2017

* Update sub-applications.md

* Update sub-applications.md

* Update sub-applications.md

* remove .DS_Store

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

* Update docs/ko/docs/advanced/sub-applications.md

* Update docs/ko/docs/advanced/sub-applications.md

* Update docs/ko/docs/advanced/sub-applications.md

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2025-06-12 09:32:09 +02:00
github-actions 5ba94612c1 📝 Update release notes
[skip ci]
2025-06-10 16:52:55 +00:00
Sebastián Ramírez 44d5abffc1
🔧 Update sponsors: remove Porter (#13783) 2025-06-10 18:52:33 +02:00
github-actions 98fa4bd437 📝 Update release notes
[skip ci]
2025-06-09 19:41:14 +00:00
pre-commit-ci[bot] cdd5d6ce70
⬆ [pre-commit.ci] pre-commit autoupdate (#13781)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.11.12 → v0.11.13](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.12...v0.11.13)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-06-09 21:40:54 +02:00
github-actions b8a3cccb75 📝 Update release notes
[skip ci]
2025-06-09 19:36:09 +00:00
Valentyn 14a55d864d
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/schema-extra-example.md` (#13769)
* 🌐 Add Ukrainian translation for docs/uk/docs/tutorial/schema-extra-example.md page

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

---------

Co-authored-by: Valentyn Druzhynin <v.druzhynin@zakaz.global>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-06-09 21:35:48 +02:00
github-actions 37c8e7d76b 📝 Update release notes
[skip ci]
2025-06-09 04:15:43 +00:00
Charlie ✨ 4b12a2818a
✏️ Remove redundant words in docs/zh/docs/python-types.md (#13774) 2025-06-09 06:15:17 +02:00
github-actions 9ab43cc5ed 📝 Update release notes
[skip ci]
2025-06-06 14:08:55 +00:00
pre-commit-ci[bot] 7b3463de32
⬆ [pre-commit.ci] pre-commit autoupdate (#13757)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.11.11 → v0.11.12](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.11...v0.11.12)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-06-06 16:08:32 +02:00
github-actions f7ab09884d 📝 Update release notes
[skip ci]
2025-06-05 16:10:42 +00:00
dependabot[bot] 9c4a1d2105
⬆ Bump griffe-typingdoc from 0.2.7 to 0.2.8 (#13751)
Bumps [griffe-typingdoc](https://github.com/mkdocstrings/griffe-typingdoc) from 0.2.7 to 0.2.8.
- [Release notes](https://github.com/mkdocstrings/griffe-typingdoc/releases)
- [Changelog](https://github.com/mkdocstrings/griffe-typingdoc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mkdocstrings/griffe-typingdoc/compare/0.2.7...0.2.8)

---
updated-dependencies:
- dependency-name: griffe-typingdoc
  dependency-version: 0.2.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-05 18:10:20 +02:00
github-actions 066c249bad 📝 Update release notes
[skip ci]
2025-06-05 12:27:46 +00:00
Sebastián Ramírez 2116d8aa56
🍱 Update sponsors: Dribia badge size (#13773) 2025-06-05 12:27:20 +00:00
github-actions 2e21808094 📝 Update release notes
[skip ci]
2025-06-05 12:12:28 +00:00
Valentyn 736cce8329
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/query-param-models.md` (#13748)
* 🌐 Add Ukrainian translation for docs/uk/docs/tutorial/query-param-models.md page

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

* Update docs/uk/docs/tutorial/query-param-models.md

Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>

---------

Co-authored-by: Valentyn Druzhynin <v.druzhynin@zakaz.global>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2025-06-05 14:12:04 +02:00
github-actions f78aa8848b 📝 Update release notes
[skip ci]
2025-06-05 11:52:34 +00:00
Sebastián Ramírez 38c282039a
🔧 Update sponsors: add Dribia (#13771) 2025-06-05 13:51:48 +02:00
github-actions b7a8850660 📝 Update release notes
[skip ci]
2025-06-05 10:01:12 +00:00
dependabot[bot] eae3025ed2
⬆ Bump typer from 0.15.3 to 0.16.0 (#13752)
Bumps [typer](https://github.com/fastapi/typer) from 0.15.3 to 0.16.0.
- [Release notes](https://github.com/fastapi/typer/releases)
- [Changelog](https://github.com/fastapi/typer/blob/master/docs/release-notes.md)
- [Commits](https://github.com/fastapi/typer/compare/0.15.3...0.16.0)

---
updated-dependencies:
- dependency-name: typer
  dependency-version: 0.16.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-05 12:00:47 +02:00
github-actions 37e596599e 📝 Update release notes
[skip ci]
2025-06-05 08:16:18 +00:00
Nazmus Sakib Sibly 37c6913ce5
🌐 Add Bengali translation for `docs/bn/docs/environment-variables.md` (#13629)
Add Bengali translation for docs/bn/docs/environment-variables.md

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2025-06-05 10:15:56 +02:00
github-actions 7421a19b7f 📝 Update release notes
[skip ci]
2025-06-05 07:29:36 +00:00
Sebastián Ramírez e71d87d8ef
👥 Update FastAPI GitHub topic repositories (#13754)
Co-authored-by: github-actions <github-actions@github.com>
2025-06-05 09:29:13 +02:00
github-actions c3de47858c 📝 Update release notes
[skip ci]
2025-06-05 06:58:39 +00:00
Sebastián Ramírez c430ef1ac1
👥 Update FastAPI People - Sponsors (#13750)
Co-authored-by: github-actions <github-actions@github.com>
2025-06-05 08:58:14 +02:00
github-actions 54f255ecc8 📝 Update release notes
[skip ci]
2025-06-05 06:49:21 +00:00
Sebastián Ramírez 751c7dc179
👥 Update FastAPI People - Contributors and Translators (#13749)
Co-authored-by: github-actions <github-actions@github.com>
2025-06-05 08:48:55 +02:00
github-actions b2d742074c 📝 Update release notes
[skip ci]
2025-05-30 14:17:45 +00:00
Valentyn e48c526b62
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/query-params-str-validations.md` page (#13546) 2025-05-30 16:17:24 +02:00
github-actions be6cfd6cf5 📝 Update release notes
[skip ci]
2025-05-30 14:15:08 +00:00
Егор Онищук 02ca761365
🌐 Add Russian translation for `docs/ru/docs/tutorial/cookie-param-models.md` (#13616) 2025-05-30 16:14:42 +02:00
github-actions cadb7f5c3a 📝 Update release notes
[skip ci]
2025-05-30 13:38:55 +00:00
timothy 645d645737
🌐 Add Korean translation for `docs/ko/docs/tutorial/extra-models.md` (#13063) 2025-05-30 15:38:33 +02:00
github-actions bb05a68530 📝 Update release notes
[skip ci]
2025-05-30 13:37:55 +00:00
pre-commit-ci[bot] 7ebcd8761c
⬆ [pre-commit.ci] pre-commit autoupdate (#13736)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.11.10 → v0.11.11](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.10...v0.11.11)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-05-30 15:36:54 +02:00
github-actions 57ed433bef 📝 Update release notes
[skip ci]
2025-05-30 13:36:31 +00:00
github-actions 3855d808b0 📝 Update release notes
[skip ci]
2025-05-30 13:36:27 +00:00
Valentyn d6b8b8f590
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/path-params-numeric-validations.md` page (#13548) 2025-05-30 15:35:49 +02:00
Valentyn 3337c3b9be
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/middleware.md` page (#13520) 2025-05-30 15:35:33 +02:00
github-actions 950fb3f02d 📝 Update release notes
[skip ci]
2025-05-30 13:35:25 +00:00
github-actions c83a5bf149 📝 Update release notes
[skip ci]
2025-05-30 13:35:17 +00:00
Valentyn 45a40f8b1c
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/background-tasks.md` page (#13502) 2025-05-30 15:34:53 +02:00
Valentyn 44c83dda0b
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/cors.md` page (#13519) 2025-05-30 15:34:34 +02:00
github-actions 57a7a706f3 📝 Update release notes
[skip ci]
2025-05-30 13:34:17 +00:00
Junbeom Lee aa2bb3e569
🌐 Update Korean translation for `docs/ko/docs/advanced/events.md` (#13487) 2025-05-30 15:33:53 +02:00
github-actions f0b3ebdf03 📝 Update release notes
[skip ci]
2025-05-30 13:31:35 +00:00
Valentyn 4f9b737548
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/handling-errors.md` page (#13420) 2025-05-30 15:31:13 +02:00
github-actions 2e9e5dfeec 📝 Update release notes
[skip ci]
2025-05-30 13:18:34 +00:00
Егор Онищук 374626e036
🌐 Add Russian translation for `docs/ru/docs/tutorial/request-form-models.md` (#13552) 2025-05-30 15:17:36 +02:00
github-actions 6c1e7fb4de 📝 Update release notes
[skip ci]
2025-05-30 13:16:17 +00:00
Fabián Falón 5f84703bea
📝 Fix internal anchor link in Spanish deployment docs (#13737) 2025-05-30 15:15:52 +02:00
github-actions 34856a2738 📝 Update release notes
[skip ci]
2025-05-30 13:11:03 +00:00
sungchan Yeo 61cc7014cc
🌐 Update Korean translation for `docs/ko/docs/virtual-environments.md` (#13630) 2025-05-30 15:10:41 +02:00
github-actions e31f35ec65 📝 Update release notes
[skip ci]
2025-05-22 09:45:56 +00:00
Sebastián Ramírez 29ed7d052b
🔧 Update sponsors: Add InterviewPal (#13728) 2025-05-22 09:45:32 +00:00
github-actions bcb7935ab7 📝 Update release notes
[skip ci]
2025-05-22 09:19:16 +00:00
Sebastián Ramírez a01a665b57
🔧 Remove Google Analytics (#13727) 2025-05-22 09:18:52 +00:00
github-actions 0e1ec48885 📝 Update release notes
[skip ci]
2025-05-21 15:17:32 +00:00
Sebastián Ramírez 7382ceda57
🔧 Update sponsors: remove MongoDB (#13725) 2025-05-21 17:17:03 +02:00
github-actions 4d1c69751e 📝 Update release notes
[skip ci]
2025-05-20 16:02:48 +00:00
pre-commit-ci[bot] be0cf41d38
⬆ [pre-commit.ci] pre-commit autoupdate (#13711)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.11.8 → v0.11.10](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.8...v0.11.10)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-05-20 18:02:28 +02:00
github-actions ea7b105476 📝 Update release notes
[skip ci]
2025-05-11 13:37:47 +00:00
Sebastián Ramírez 214e0740c8
🍱 Update Drawio diagrams SVGs, single file per diagram, sans-serif font (#13706)
---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-05-11 15:37:26 +02:00
github-actions f3bfa3b8a5 📝 Update release notes
[skip ci]
2025-05-09 16:37:03 +00:00
Sebastián Ramírez a9a2782f95
🔧 Update sponsors: add Subtotal (#13701)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-05-09 18:36:42 +02:00
github-actions acbf27c971 📝 Update release notes
[skip ci]
2025-05-09 13:49:14 +00:00
Sebastián Ramírez f61fe35178
🔧 Update sponsors: remove deepset / Haystack (#13700) 2025-05-09 13:48:50 +00:00
github-actions 9a33ba46ac 📝 Update release notes
[skip ci]
2025-05-06 08:23:30 +00:00
pre-commit-ci[bot] 1d63896c35
⬆ [pre-commit.ci] pre-commit autoupdate (#13688)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.11.7 → v0.11.8](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.7...v0.11.8)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-05-06 10:23:09 +02:00
github-actions ea839df09e 📝 Update release notes
[skip ci]
2025-05-01 14:43:04 +00:00
Sebastián Ramírez 3620a2b213
👥 Update FastAPI People - Experts (#13671)
Co-authored-by: github-actions <github-actions@github.com>
2025-05-01 14:42:39 +00:00
github-actions 6df106b877 📝 Update release notes
[skip ci]
2025-05-01 13:16:47 +00:00
github-actions fb1affca1b 📝 Update release notes
[skip ci]
2025-05-01 13:16:45 +00:00
github-actions 581e3a0051 📝 Update release notes
[skip ci]
2025-05-01 13:16:30 +00:00
dependabot[bot] b57b8e7ad2
⬆ Bump sqlmodel from 0.0.23 to 0.0.24 (#13665)
Bumps [sqlmodel](https://github.com/fastapi/sqlmodel) from 0.0.23 to 0.0.24.
- [Release notes](https://github.com/fastapi/sqlmodel/releases)
- [Changelog](https://github.com/fastapi/sqlmodel/blob/main/docs/release-notes.md)
- [Commits](https://github.com/fastapi/sqlmodel/compare/0.0.23...0.0.24)

---
updated-dependencies:
- dependency-name: sqlmodel
  dependency-version: 0.0.24
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-01 15:15:54 +02:00
dependabot[bot] 4bef866495
⬆ Bump typer from 0.12.5 to 0.15.3 (#13666)
Bumps [typer](https://github.com/fastapi/typer) from 0.12.5 to 0.15.3.
- [Release notes](https://github.com/fastapi/typer/releases)
- [Changelog](https://github.com/fastapi/typer/blob/master/docs/release-notes.md)
- [Commits](https://github.com/fastapi/typer/compare/0.12.5...0.15.3)

---
updated-dependencies:
- dependency-name: typer
  dependency-version: 0.15.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-01 15:15:45 +02:00
Martyn Davies bc56c74d6b
🔧 Update Sponsors: Zuplo logo and alt text (#13645)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-05-01 13:15:38 +00:00
github-actions 7fdc4952bd 📝 Update release notes
[skip ci]
2025-05-01 13:14:19 +00:00
Sebastián Ramírez 16234a3f4f
📝 Update docs for "Help FastAPI", simplify and reduce "sponsor" section (#13670) 2025-05-01 13:13:51 +00:00
github-actions 6eb31132e5 📝 Update release notes
[skip ci]
2025-05-01 13:00:17 +00:00
Sebastián Ramírez f512b17992
👥 Update FastAPI GitHub topic repositories (#13667)
Co-authored-by: github-actions <github-actions@github.com>
2025-05-01 14:59:46 +02:00
github-actions cae8f976d8 📝 Update release notes
[skip ci]
2025-05-01 12:59:02 +00:00
github-actions 48c0d3405d 📝 Update release notes
[skip ci]
2025-05-01 12:58:22 +00:00
Sebastián Ramírez 3da3f3ab82
🔧 Update links for LinkedIn and bottom (#13669) 2025-05-01 14:58:12 +02:00
Sebastián Ramírez 418c3c8d2b
🔧 Update sponsors: remove Bump.sh and Coherence (#13668) 2025-05-01 12:58:00 +00:00
github-actions 663aae13b2 📝 Update release notes
[skip ci]
2025-05-01 11:33:13 +00:00
github-actions ed88e25098 📝 Update release notes
[skip ci]
2025-05-01 11:32:57 +00:00
Sebastián Ramírez a748e7336b
👥 Update FastAPI People - Sponsors (#13664)
Co-authored-by: github-actions <github-actions@github.com>
2025-05-01 11:32:46 +00:00
Sebastián Ramírez 9b5b2dd7a2
👥 Update FastAPI People - Contributors and Translators (#13662)
Co-authored-by: github-actions <github-actions@github.com>
2025-05-01 11:32:33 +00:00
github-actions 699717cf7f 📝 Update release notes
[skip ci]
2025-04-28 18:37:55 +00:00
pre-commit-ci[bot] 26dc148cb9
⬆ [pre-commit.ci] pre-commit autoupdate (#13656)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.11.6 → v0.11.7](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.6...v0.11.7)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-04-28 20:37:31 +02:00
github-actions 4025751afb 📝 Update release notes
[skip ci]
2025-04-28 18:32:06 +00:00
Joakim Nordling 8fa56b46a1
⬆️ Update ReDoc to version 2.x (#9700)
Co-authored-by: svlandeg <svlandeg@github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2025-04-28 20:31:44 +02:00
github-actions 4199172977 📝 Update release notes
[skip ci]
2025-04-28 07:14:30 +00:00
Frank Hoffmann ea42ebda80
Use `inline-snapshot` to support different Pydantic versions in the test suite (#12534)
Co-authored-by: svlandeg <svlandeg@github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2025-04-28 09:13:56 +02:00
github-actions 79bc96647b 📝 Update release notes
[skip ci]
2025-04-26 16:01:11 +00:00
github-actions 9fa8050e01 📝 Update release notes
[skip ci]
2025-04-26 16:00:54 +00:00
dependabot[bot] ba8d85fbe8
⬆ Bump astral-sh/setup-uv from 5 to 6 (#13648)
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 5 to 6.
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](https://github.com/astral-sh/setup-uv/compare/v5...v6)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-26 18:00:46 +02:00
OA c2fb5cc109
📝 Remove unnecessary bullet from docs (#13641) 2025-04-26 18:00:32 +02:00
github-actions fe0c643e90 📝 Update release notes
[skip ci]
2025-04-21 18:09:43 +00:00
pre-commit-ci[bot] 9c03b8fd64
⬆ [pre-commit.ci] pre-commit autoupdate (#13634)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.11.5 → v0.11.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.5...v0.11.6)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-04-21 20:09:18 +02:00
github-actions 601d678e07 📝 Update release notes
[skip ci]
2025-04-21 13:30:58 +00:00
Gaurav Sheni 1d21c7f748
✏️ Fix syntax error in `docs/en/docs/tutorial/handling-errors.md` (#13623) 2025-04-21 15:30:38 +02:00
github-actions 7c75b55580 📝 Update release notes
[skip ci]
2025-04-15 08:04:06 +00:00
pre-commit-ci[bot] 9d937964ba
⬆ [pre-commit.ci] pre-commit autoupdate (#13619)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.11.4 → v0.11.5](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.4...v0.11.5)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-04-15 10:03:45 +02:00
github-actions 4ec5e0a90a 📝 Update release notes
[skip ci]
2025-04-11 16:03:08 +00:00
pre-commit-ci[bot] 024d5d3318
⬆ [pre-commit.ci] pre-commit autoupdate (#13594)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.11.2 → v0.11.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.2...v0.11.4)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-04-11 18:02:43 +02:00
github-actions a8c1333b4d 📝 Update release notes
[skip ci]
2025-04-11 15:59:09 +00:00
Hotah Ma d1962bb22f
📝 Fix typo in documentation (#13599) 2025-04-11 17:58:47 +02:00
github-actions bd3e47ec59 📝 Update release notes
[skip ci]
2025-04-06 16:33:45 +00:00
Elliot Ford 5f9c7a3185
📝 Fix liblab client generation doc link (#13571) 2025-04-06 18:33:24 +02:00
github-actions 76b324d95b 📝 Update release notes
[skip ci]
2025-04-03 19:48:31 +00:00
Sebastián Ramírez 7b7ec90308
👥 Update FastAPI People - Experts (#13568)
Co-authored-by: github-actions <github-actions@github.com>
2025-04-03 21:48:09 +02:00
github-actions 8032e21418 📝 Update release notes
[skip ci]
2025-04-02 19:48:32 +00:00
github-actions 8bf01245b1 📝 Update release notes
[skip ci]
2025-04-02 19:48:09 +00:00
github-actions f4583c58b9 📝 Update release notes
[skip ci]
2025-04-02 19:48:02 +00:00
Sebastián Ramírez f0576e8ffd
👥 Update FastAPI GitHub topic repositories (#13565)
Co-authored-by: github-actions <github-actions@github.com>
2025-04-02 21:47:54 +02:00
Sebastián Ramírez 1abef20dbd
👥 Update FastAPI People - Sponsors (#13559)
Co-authored-by: github-actions <github-actions@github.com>
2025-04-02 21:47:46 +02:00
Sebastián Ramírez 286f5a0c42
👥 Update FastAPI People - Contributors and Translators (#13558) 2025-04-02 21:47:36 +02:00
github-actions 77c8b5b3b9 📝 Update release notes
[skip ci]
2025-04-02 19:33:56 +00:00
dependabot[bot] 6fefc17a84
⬆ Bump dirty-equals from 0.8.0 to 0.9.0 (#13561)
Bumps [dirty-equals](https://github.com/samuelcolvin/dirty-equals) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/samuelcolvin/dirty-equals/releases)
- [Commits](https://github.com/samuelcolvin/dirty-equals/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: dirty-equals
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-02 21:33:35 +02:00
github-actions 1d434dec47 📝 Update release notes
[skip ci]
2025-03-31 08:21:02 +00:00
Константин Рощупкин cfdcad1dd2
🌐 Add Russian translation for `docs/ru/docs/tutorial/header-param-models.md` (#13526) 2025-03-31 10:20:29 +02:00
github-actions 921e2e5881 📝 Update release notes
[skip ci]
2025-03-31 08:16:36 +00:00
github-actions 4749ff586c 📝 Update release notes
[skip ci]
2025-03-31 08:16:12 +00:00
Zhongheng Cheng 94ae778082
🌐 Update Chinese translation for `docs/zh/docs/tutorial/index.md` (#13374) 2025-03-31 10:15:11 +02:00
Zhongheng Cheng d0a247fc5a
🌐 Update Chinese translation for `docs/zh/docs/deployment/manually.md` (#13324) 2025-03-31 10:14:47 +02:00
github-actions c5e2837e46 📝 Update release notes
[skip ci]
2025-03-31 08:13:40 +00:00
Zhongheng Cheng 396ca69603
🌐 Update Chinese translation for `docs/zh/docs/deployment/server-workers.md` (#13292) 2025-03-31 10:13:15 +02:00
github-actions 4db37fdf95 📝 Update release notes
[skip ci]
2025-03-30 19:23:55 +00:00
Blueswen a49f69f074
✏️ Fix talk information typo (#13544) 2025-03-30 21:23:32 +02:00
github-actions b5bdc153a1 📝 Update release notes
[skip ci]
2025-03-26 14:39:00 +00:00
Sofie Van Landeghem 031622a989
🔧 Clean up `docs/en/mkdocs.yml` configuration file (#13542) 2025-03-26 15:38:36 +01:00
github-actions c8a7552e29 📝 Update release notes
[skip ci]
2025-03-26 13:19:03 +00:00
pre-commit-ci[bot] c12652b785
⬆ [pre-commit.ci] pre-commit autoupdate (#12986)
* ⬆ [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.9.4 → v0.11.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.4...v0.11.2)

* also bump in doc requirements

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: svlandeg <svlandeg@github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2025-03-26 14:18:42 +01:00
github-actions b58c2a31ed 📝 Update release notes
[skip ci]
2025-03-24 21:10:05 +00:00
Zhongheng Cheng f0d59e57f1
🌐 Update Chinese translation for `docs/zh/docs/tutorial/first-steps.md` (#13348) 2025-03-24 22:09:43 +01:00
github-actions cbd7d4895b 📝 Update release notes
[skip ci]
2025-03-24 11:13:09 +00:00
Blueswen d70f0ecec3
📝 Add External Link: Taiwanese talk on FastAPI with observability (#13527) 2025-03-24 12:12:43 +01:00
Sebastián Ramírez 628c34e0ca 🔖 Release version 0.115.12 2025-03-23 23:54:13 +01:00
github-actions 8e76d4e5f4 📝 Update release notes
[skip ci]
2025-03-23 20:49:19 +00:00
Sebastián Ramírez 2537d9d1c2
🐛 Fix `convert_underscores=False` for header Pydantic models (#13515) 2025-03-23 21:48:54 +01:00
github-actions c08a3e8f22 📝 Update release notes
[skip ci]
2025-03-20 12:30:17 +00:00
Rishat-F 241de23b68
📝 Update `docs/en/docs/tutorial/middleware.md` (#13444)
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
2025-03-20 13:29:48 +01:00
github-actions 4e40e1e85d 📝 Update release notes
[skip ci]
2025-03-19 17:10:19 +00:00
Valentyn ecf6e7eec2
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/metadata.md` page (#13459) 2025-03-19 18:09:57 +01:00
github-actions 3afd733753 📝 Update release notes
[skip ci]
2025-03-19 17:04:51 +00:00
Valentyn 8557a88d16
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/response-status-code.md` page (#13462) 2025-03-19 18:04:17 +01:00
github-actions e4c1dd799d 📝 Update release notes
[skip ci]
2025-03-19 17:04:06 +00:00
github-actions f977da6ae0 📝 Update release notes
[skip ci]
2025-03-19 17:03:40 +00:00
Valentyn f077c17e1e
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/cookie-param-models.md` page (#13460) 2025-03-19 18:03:38 +01:00
Valentyn f9f1d93c58
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/header-param-models.md` page (#13461) 2025-03-19 18:03:13 +01:00
github-actions 7e33df505a 📝 Update release notes
[skip ci]
2025-03-19 12:22:56 +00:00
k94-ishi f806e03807
🌐 Add Japanese translation for `docs/ja/docs/virtual-environments.md` (#13304) 2025-03-19 13:22:33 +01:00
github-actions 90d52cfa16 📝 Update release notes
[skip ci]
2025-03-19 11:54:58 +00:00
dependabot[bot] 7ab1b9edcc
⬆ Bump pydantic-ai from 0.0.15 to 0.0.30 (#13438)
Bumps [pydantic-ai](https://github.com/pydantic/pydantic-ai) from 0.0.15 to 0.0.30.
- [Release notes](https://github.com/pydantic/pydantic-ai/releases)
- [Changelog](https://github.com/pydantic/pydantic-ai/blob/main/docs/message-history.md)
- [Commits](https://github.com/pydantic/pydantic-ai/compare/v0.0.15...v0.0.30)

---
updated-dependencies:
- dependency-name: pydantic-ai
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-19 12:54:33 +01:00
github-actions 6859691419 📝 Update release notes
[skip ci]
2025-03-19 11:34:07 +00:00
Sebastián Ramírez d3cfe72cd7
👥 Update FastAPI People - Experts (#13493)
Co-authored-by: github-actions <github-actions@github.com>
2025-03-19 12:33:41 +01:00
github-actions e988050f79 📝 Update release notes
[skip ci]
2025-03-10 12:29:25 +00:00
Lee Yesong 3565ea00b6
🌐 Add Korean translation for `docs/ko/docs/tutorial/security/oauth2-jwt.md` (#13333) 2025-03-10 13:29:03 +01:00
github-actions 643d2845de 📝 Update release notes
[skip ci]
2025-03-07 03:25:46 +00:00
dependabot[bot] c46e4a1b14
⬆ Bump sqlmodel from 0.0.22 to 0.0.23 (#13437)
Bumps [sqlmodel](https://github.com/fastapi/sqlmodel) from 0.0.22 to 0.0.23.
- [Release notes](https://github.com/fastapi/sqlmodel/releases)
- [Changelog](https://github.com/fastapi/sqlmodel/blob/main/docs/release-notes.md)
- [Commits](https://github.com/fastapi/sqlmodel/compare/0.0.22...0.0.23)

---
updated-dependencies:
- dependency-name: sqlmodel
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-07 04:25:10 +01:00
github-actions 79bc28fab4 📝 Update release notes
[skip ci]
2025-03-07 03:25:02 +00:00
dependabot[bot] a88a6050a6
⬆ Bump black from 24.10.0 to 25.1.0 (#13436)
Bumps [black](https://github.com/psf/black) from 24.10.0 to 25.1.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/24.10.0...25.1.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-07 04:24:42 +01:00
github-actions 0c36a7ac05 📝 Update release notes
[skip ci]
2025-03-07 03:24:33 +00:00
Phương Tấn Thành a592e8ad4d
🌐 Add Vietnamese translation for `docs/vi/docs/deployment/cloud.md` (#13407)
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
Co-authored-by: Dinh Van Luc <39489075+MrL8199@users.noreply.github.com>
2025-03-07 04:24:13 +01:00
github-actions daf6820307 📝 Update release notes
[skip ci]
2025-03-06 12:19:24 +00:00
dependabot[bot] 8c94e97c89
⬆ Bump ruff to 0.9.4 (#13299)
* ⬆ Bump ruff from 0.6.4 to 0.9.4

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.4 to 0.9.4.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.6.4...0.9.4)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* update pre-commit accordingly and make formatting changes

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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
Co-authored-by: svlandeg <sofie.vanlandeghem@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-03-06 13:18:57 +01:00
github-actions ab22979dc5 📝 Update release notes
[skip ci]
2025-03-03 14:33:58 +00:00
Sebastián Ramírez 316566e40e
🔧 Update sponsors: pause TestDriven (#13446) 2025-03-03 15:33:33 +01:00
Sebastián Ramírez 3824664620 🔖 Release version 0.115.11 2025-03-01 23:14:01 +01:00
Sebastián Ramírez a01ed2f6a7 📝 Update release notes 2025-03-01 23:13:11 +01:00
github-actions a2c2e332a0 📝 Update release notes
[skip ci]
2025-03-01 22:02:59 +00:00
Sebastián Ramírez 74fe89bf35
🐛 Add docs examples and tests (support) for `Annotated` custom validations, like `AfterValidator`, revert #13440 (#13442)
This reverts commit 15dd2b67d3.
2025-03-01 22:02:35 +00:00
github-actions f5056f84b6 📝 Update release notes
[skip ci]
2025-03-01 17:21:19 +00:00
github-actions 60f05868b7 📝 Update release notes
[skip ci]
2025-03-01 17:20:07 +00:00
github-actions b7d3f2a96e 📝 Update release notes
[skip ci]
2025-03-01 17:19:45 +00:00
Sebastián Ramírez ea57612d69
👥 Update FastAPI GitHub topic repositories (#13439)
Co-authored-by: github-actions <github-actions@github.com>
2025-03-01 18:19:34 +01:00
Sebastián Ramírez 186544760a
👥 Update FastAPI People - Contributors and Translators (#13432)
Co-authored-by: github-actions <github-actions@github.com>
2025-03-01 18:19:24 +01:00
Sebastián Ramírez 89e0c10547
👥 Update FastAPI People - Sponsors (#13433)
Co-authored-by: github-actions <github-actions@github.com>
2025-03-01 18:19:17 +01:00
github-actions 3fca8b2be8 📝 Update release notes
[skip ci]
2025-02-28 17:10:10 +00:00
alv2017 bb98f7df6d
🌐 Add Russian translation for `docs/ru/docs/tutorial/middleware.md` (#13412) 2025-02-28 18:09:29 +01:00
Sebastián Ramírez a2644728f6 📝 Update release notes 2025-02-28 17:46:04 +01:00
Sebastián Ramírez 433837d9ca 🔖 Release version 0.115.10 2025-02-28 17:43:04 +01:00
github-actions 68074badcc 📝 Update release notes
[skip ci]
2025-02-28 15:15:29 +00:00
Victorien 15dd2b67d3
♻️ Update internal annotation usage for compatibilty with Pydantic 2.11 (#13314)
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
Co-authored-by: svlandeg <svlandeg@github.com>
2025-02-28 16:15:02 +01:00
github-actions 45e018517b 📝 Update release notes
[skip ci]
2025-02-28 14:26:01 +00:00
github-actions 74954352ed 📝 Update release notes
[skip ci]
2025-02-28 14:24:48 +00:00
Valentyn 7c4d1fe13d
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/debugging.md` (#13370)
Co-authored-by: Valentyn Druzhynin <v.druzhynin@zakaz.global>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Rostyslav <rostik1410@users.noreply.github.com>
2025-02-28 15:24:45 +01:00
Valentyn 23821e916b
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/query-params.md` (#13362)
Co-authored-by: Valentyn Druzhynin <v.druzhynin@zakaz.global>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2025-02-28 15:23:55 +01:00
github-actions 8bfec9fb6b 📝 Update release notes
[skip ci]
2025-02-28 14:23:04 +00:00
github-actions 5fbaf6d28c 📝 Update release notes
[skip ci]
2025-02-28 14:22:42 +00:00
Valentyn ee729d4522
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/path-params.md` (#13354)
Co-authored-by: Valentyn Druzhynin <v.druzhynin@zakaz.global>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2025-02-28 15:21:46 +01:00
k94-ishi 344d765796
🌐 Add Japanese translation for `docs/ja/docs/tutorial/cookie-param-models.md` (#13330) 2025-02-28 15:21:27 +01:00
github-actions 720dcc0990 📝 Update release notes
[skip ci]
2025-02-28 14:19:54 +00:00
github-actions f9c8726a1a 📝 Update release notes
[skip ci]
2025-02-28 14:19:27 +00:00
Valentyn c42c0d31b0
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/body-multiple-params.md` (#13408)
Co-authored-by: Valentyn Druzhynin <v.druzhynin@zakaz.global>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2025-02-28 15:19:00 +01:00
k94-ishi 2cf2fee588
🌐 Add Japanese translation for `docs/ja/docs/tutorial/query-param-models.md` (#13323) 2025-02-28 15:18:46 +01:00
github-actions 7047e59f29 📝 Update release notes
[skip ci]
2025-02-28 14:18:36 +00:00
Valentyn 99ea5bb641
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/body-nested-models.md` (#13409)
Co-authored-by: Valentyn Druzhynin <v.druzhynin@zakaz.global>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2025-02-28 15:18:01 +01:00
github-actions 34e03db068 📝 Update release notes
[skip ci]
2025-02-28 14:16:22 +00:00
github-actions 67e7c15701 📝 Update release notes
[skip ci]
2025-02-28 14:15:51 +00:00
Phương Tấn Thành d5324fb5c3
🌐 Add Vietnamese translation for `docs/vi/docs/deployment/versions.md` (#13406)
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2025-02-28 15:15:38 +01:00
Phương Tấn Thành 2d60add4e2
🌐 Add Vietnamese translation for `docs/vi/docs/deployment/index.md` (#13405)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-02-28 15:14:58 +01:00
github-actions eb7cd4f693 📝 Update release notes
[skip ci]
2025-02-28 14:14:34 +00:00
Valentyn f4b4b0b0f5
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/request-forms.md` (#13383)
Co-authored-by: Valentyn Druzhynin <v.druzhynin@zakaz.global>
Co-authored-by: Rostyslav <rostik1410@users.noreply.github.com>
2025-02-28 15:13:50 +01:00
github-actions e992a2ec8b 📝 Update release notes
[skip ci]
2025-02-28 14:12:41 +00:00
Valentyn 29d3739bcf
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/testing.md` (#13371)
Co-authored-by: Valentyn Druzhynin <v.druzhynin@zakaz.global>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Rostyslav <rostik1410@users.noreply.github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2025-02-28 15:12:19 +01:00
github-actions b78887f3d3 📝 Update release notes
[skip ci]
2025-02-28 14:08:09 +00:00
Ben Beasley cc1f5de03c
⬆️ Bump Starlette to allow up to 0.46.0: `>=0.40.0,<0.47.0` (#13426)
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2025-02-28 15:07:47 +01:00
Sebastián Ramírez d90030c1e2 🔖 Release version 0.115.9 2025-02-27 17:40:41 +01:00
github-actions 3639fb00be 📝 Update release notes
[skip ci]
2025-02-27 14:43:04 +00:00
alv2017 7eabff43de
Fix a minor bug in the test `tests/test_modules_same_name_body/test_main.py` (#13411) 2025-02-27 15:42:41 +01:00
github-actions a27fb4764b 📝 Update release notes
[skip ci]
2025-02-27 14:40:09 +00:00
Sebastián Ramírez 7710a34800
🍱 Update sponsors: CodeRabbit logo (#13424) 2025-02-27 15:39:48 +01:00
github-actions 6320832178 📝 Update release notes
[skip ci]
2025-02-27 13:06:50 +00:00
Joakim Nordling 26f27982ac
👷 Use `wrangler-action` v3 (#13415) 2025-02-27 14:06:27 +01:00
github-actions d974fbdda0 📝 Update release notes
[skip ci]
2025-02-27 12:29:47 +00:00
Arthur Rio ccc7c8fef9
🐛 Ensure that `HTTPDigest` only raises an exception when `auto_error is True` (#2939)
Co-authored-by: svlandeg <sofie.vanlandeghem@gmail.com>
2025-02-27 13:29:20 +01:00
github-actions b021569913 📝 Update release notes
[skip ci]
2025-02-22 22:03:09 +00:00
Valentyn 48676b4f11
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/header-params.md` (#13381) 2025-02-22 22:02:19 +00:00
github-actions b1102e2388 📝 Update release notes
[skip ci]
2025-02-22 22:02:06 +00:00
Valentyn 31920eff62
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/request-files.md` (#13395) 2025-02-22 22:01:44 +00:00
github-actions 4516a48c7c 📝 Update release notes
[skip ci]
2025-02-21 11:36:43 +00:00
Sofie Van Landeghem f8878f3a98
🩺 Unify the badges across all tutorial translations (#13329)
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
2025-02-20 21:53:18 +01:00
github-actions 5c8fa58fd0 📝 Update release notes
[skip ci]
2025-02-20 17:49:39 +00:00
Sebastián Ramírez 987d2f9a92
🔧 Update sponsors: add CodeRabbit (#13402) 2025-02-20 18:49:13 +01:00
github-actions 920110276a 📝 Update release notes
[skip ci]
2025-02-20 14:16:32 +00:00
Valentyn b397ad9e52
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/request-form-models.md` (#13384) 2025-02-20 14:16:09 +00:00
github-actions 498ba94bfc 📝 Update release notes
[skip ci]
2025-02-20 14:14:07 +00:00
Valentyn 6ebe753908
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/request-forms-and-files.md` (#13386) 2025-02-20 14:13:44 +00:00
github-actions 3aee64b94f 📝 Update release notes
[skip ci]
2025-02-20 14:09:37 +00:00
Aman Kumar 001473ab66
📝 Fix typos in virtual environments documentation (#13396) 2025-02-20 14:09:14 +00:00
github-actions 8c9c536c0a 📝 Update release notes
[skip ci]
2025-02-18 18:44:23 +00:00
Sebastián Ramírez 70137c0f7d
🔧 Update team: Add Ludovico (#13390) 2025-02-18 19:44:00 +01:00
github-actions 286fd694ea 📝 Update release notes
[skip ci]
2025-02-18 16:52:41 +00:00
Hyogeun Oh (오효근) e157cf4b96
🐛 Fix issue with Swagger theme change example in the official tutorial (#13289) 2025-02-18 17:52:15 +01:00
github-actions 235300c1d2 📝 Update release notes
[skip ci]
2025-02-18 15:18:42 +00:00
Sebastián Ramírez c868581ce7
🔧 Update sponsors: Add LambdaTest (#13389) 2025-02-18 15:18:14 +00:00
github-actions 7e67a91b08 📝 Update release notes
[skip ci]
2025-02-15 16:33:58 +00:00
Haoyu (Daniel) YANG 杨浩宇 e24299b2ff
📝 Add more precise description of HTTP status code range in docs (#13347) 2025-02-15 17:33:33 +01:00
github-actions e24a500292 📝 Update release notes
[skip ci]
2025-02-15 16:32:36 +00:00
alv2017 5451d05bc8
Simplify tests for `query_params_str_validations` (#13218)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
2025-02-15 17:31:57 +01:00
github-actions 2b3b416122 📝 Update release notes
[skip ci]
2025-02-15 16:28:29 +00:00
Sebastián Ramírez 08b817a842
🔥 Remove manual type annotations in JWT tutorial to avoid typing expectations (JWT doesn't provide more types) (#13378) 2025-02-15 17:28:09 +01:00
github-actions 2e788bbbdc 📝 Update release notes
[skip ci]
2025-02-15 16:24:24 +00:00
Sebastián Ramírez 9ec452a154
📝 Update docs for Query Params and String Validations, remove obsolete Ellipsis docs (`...`) (#13377) 2025-02-15 17:23:59 +01:00
github-actions 2c937aabef 📝 Update release notes
[skip ci]
2025-02-15 14:43:05 +00:00
alv2017 f6872dd298
Simplify tests for `app_testing` (#13220)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
2025-02-15 15:42:41 +01:00
github-actions cbd7b986e7 📝 Update release notes
[skip ci]
2025-02-15 14:38:14 +00:00
alv2017 1e6d95ce6d
Simplify tests for `dependency_testing` (#13223)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
2025-02-15 14:37:48 +00:00
github-actions 540d8ff398 📝 Update release notes
[skip ci]
2025-02-15 11:43:16 +00:00
Haoyu (Daniel) YANG 杨浩宇 261bc2d387
✏️ Remove duplicate title in docs `body-multiple-params` (#13345) 2025-02-15 11:42:54 +00:00
github-actions db554ca094 📝 Update release notes
[skip ci]
2025-02-15 11:38:21 +00:00
Hyogeun Oh (오효근) ac893a4446
🌐 Update Korean translation for `docs/ko/docs/help-fastapi.md` (#13262) 2025-02-15 11:37:58 +00:00
github-actions b81d29fc00 📝 Update release notes
[skip ci]
2025-02-15 11:23:13 +00:00
dependabot[bot] 10a13d05c4
⬆ Bump cloudflare/wrangler-action from 3.13 to 3.14 (#13350)
Bumps [cloudflare/wrangler-action](https://github.com/cloudflare/wrangler-action) from 3.13 to 3.14.
- [Release notes](https://github.com/cloudflare/wrangler-action/releases)
- [Changelog](https://github.com/cloudflare/wrangler-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/cloudflare/wrangler-action/compare/v3.13...v3.14)

---
updated-dependencies:
- dependency-name: cloudflare/wrangler-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-15 11:22:43 +00:00
github-actions d51936754d 📝 Update release notes
[skip ci]
2025-02-15 11:21:51 +00:00
11kkw 030012bf4c
🌐 Add Korean translation for `docs/ko/docs/advanced/custom-response.md` (#13265) 2025-02-15 11:21:20 +00:00
github-actions fc94d904c9 📝 Update release notes
[skip ci]
2025-02-15 11:19:48 +00:00
Lee Yesong (이예송) 39b4692525
🌐 Update Korean translation for `docs/ko/docs/tutorial/security/simple-oauth2.md` (#13335) 2025-02-15 11:19:12 +00:00
github-actions 15afe2e301 📝 Update release notes
[skip ci]
2025-02-15 11:15:45 +00:00
ScrollDude 03b24b5a52
🌐 Add Russian translation for `docs/ru/docs/advanced/response-cookies.md` (#13327) 2025-02-15 11:15:23 +00:00
github-actions 3aeaa0a6a8 📝 Update release notes
[skip ci]
2025-02-15 11:08:48 +00:00
Phương Tấn Thành 5cbb81cc26
🌐 Add Vietnamese translation for `docs/vi/docs/tutorial/static-files.md` (#11291) 2025-02-15 11:08:22 +00:00
github-actions eea196f4a5 📝 Update release notes
[skip ci]
2025-02-10 11:19:36 +00:00
Emil Sadek 126a9b33c9
📝 Fix test badge (#13313)
* Fix test badge

* Fix test badge in docs

---------

Co-authored-by: Emil Sadek <esadek@users.noreply.github.com>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
2025-02-10 12:18:47 +01:00
github-actions 57a9a64435 📝 Update release notes
[skip ci]
2025-02-09 14:54:33 +00:00
11kkw ad33193f2c
🌐 Add Korean translation for `docs/ko/docs/tutorial/dependencies/dependencies-with-yield.md` (#13257) 2025-02-09 14:54:09 +00:00
github-actions c6c45ae488 📝 Update release notes
[skip ci]
2025-02-07 22:27:05 +00:00
github-actions 828079cb6e 📝 Update release notes
[skip ci]
2025-02-07 22:25:56 +00:00
github-actions 4740ccdcce 📝 Update release notes
[skip ci]
2025-02-07 22:25:02 +00:00
github-actions 49b18c87a0 📝 Update release notes
[skip ci]
2025-02-07 22:24:04 +00:00
github-actions 42a3b1526e 📝 Update release notes
[skip ci]
2025-02-07 22:23:11 +00:00
dependabot[bot] 83332ff9b2
⬆ Bump mkdocs-material from 9.5.18 to 9.6.1 (#13301)
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.5.18 to 9.6.1.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.18...9.6.1)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
2025-02-07 22:22:54 +00:00
dependabot[bot] 8cde8dc2a9
⬆ Bump pillow from 11.0.0 to 11.1.0 (#13300)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 11.0.0 to 11.1.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/11.0.0...11.1.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
2025-02-07 22:22:35 +00:00
Phương Tấn Thành e86ef5e57d
🌐 Add Vietnamese translation for `docs/vi/docs/virtual-environments.md` (#13282) 2025-02-07 22:19:18 +00:00
github-actions 8a6d81afad 📝 Update release notes
[skip ci]
2025-02-07 22:17:59 +00:00
Valentyn f9352c18de
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/static-files.md` (#13285) 2025-02-07 22:17:53 +00:00
Phương Tấn Thành 38d409dd67
🌐 Add Vietnamese translation for `docs/vi/docs/environment-variables.md` (#13287) 2025-02-07 22:17:13 +00:00
Sebastián Ramírez e814707cd1
👥 Update FastAPI People - Sponsors (#13295)
Co-authored-by: github-actions <github-actions@github.com>
2025-02-07 22:15:49 +00:00
github-actions 640a5b6fc3 📝 Update release notes
[skip ci]
2025-02-07 22:14:11 +00:00
github-actions 6e8da9d00a 📝 Update release notes
[skip ci]
2025-02-07 22:13:23 +00:00
github-actions 25ee2357d7 📝 Update release notes
[skip ci]
2025-02-07 22:12:00 +00:00
github-actions 27d0ccc11c 📝 Update release notes
[skip ci]
2025-02-07 22:11:28 +00:00
Sebastián Ramírez b6b031b456
👥 Update FastAPI People - Experts (#13303)
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
2025-02-07 22:10:51 +00:00
Sebastián Ramírez 495ff5baa9
👥 Update FastAPI GitHub topic repositories (#13302)
Co-authored-by: github-actions <github-actions@github.com>
2025-02-07 22:10:37 +00:00
Sebastián Ramírez 50b307c9f6
👥 Update FastAPI People - Contributors and Translators (#13293)
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
2025-02-07 22:10:25 +00:00
github-actions 2bb94fb90b 📝 Update release notes
[skip ci]
2025-02-07 22:09:51 +00:00
Phương Tấn Thành 2d7d5dafb0
🌐 Add Vietnamese translation for `docs/vi/docs/fastapi-cli.md` (#13294) 2025-02-07 22:09:16 +00:00
Valentyn 701f5791d3
🌐 Add Ukrainian translation for `docs/uk/docs/features.md` (#13308) 2025-02-07 22:08:49 +00:00
github-actions eee8d4c58a 📝 Update release notes
[skip ci]
2025-02-07 22:07:12 +00:00
Valentyn 0c24d0607b
🌐 Add Ukrainian translation for `docs/uk/docs/learn/index.md` (#13306) 2025-02-07 22:06:37 +00:00
github-actions f97c8de41a 📝 Update release notes
[skip ci]
2025-02-07 22:04:25 +00:00
João Pedro 52c1488a37
🌐 Update Portuguese Translation for `docs/pt/docs/deployment/https.md` (#13317) 2025-02-07 22:02:59 +00:00
github-actions 3958e5a113 📝 Update release notes
[skip ci]
2025-02-07 22:02:19 +00:00
Rafael de Oliveira Marques fb19d9895d
🌐 Update Portuguese Translation for `docs/pt/docs/index.md` (#13328) 2025-02-07 22:01:55 +00:00
github-actions ae724b05ce 📝 Update release notes
[skip ci]
2025-02-03 13:51:28 +00:00
dependabot[bot] c73e895b86
⬆ Bump inline-snapshot from 0.18.1 to 0.19.3 (#13298)
Bumps [inline-snapshot](https://github.com/15r10nk/inline-snapshot) from 0.18.1 to 0.19.3.
- [Release notes](https://github.com/15r10nk/inline-snapshot/releases)
- [Changelog](https://github.com/15r10nk/inline-snapshot/blob/main/CHANGELOG.md)
- [Commits](https://github.com/15r10nk/inline-snapshot/compare/0.18.1...0.19.3)

---
updated-dependencies:
- dependency-name: inline-snapshot
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-03 13:51:01 +00:00
github-actions 0310af3557 📝 Update release notes
[skip ci]
2025-02-03 13:34:01 +00:00
Rishat-F 633ed1d8af
🌐 Add Russian translation for `docs/ru/docs/advanced/websockets.md` (#13279) 2025-02-03 13:33:39 +00:00
github-actions 133fe8170a 📝 Update release notes
[skip ci]
2025-01-31 17:02:11 +00:00
Sebastián Ramírez df8f281674
🔧 Update sponsors, add Permit (#13288) 2025-01-31 17:01:48 +00:00
Sebastián Ramírez 7128971f1d 🔖 Release version 0.115.8 2025-01-30 13:58:14 +00:00
github-actions 55f8a446c7 📝 Update release notes
[skip ci]
2025-01-30 12:23:00 +00:00
timothy 83ab6ac957
📝 Change the word "unwrap" to "unpack" in `docs/en/docs/tutorial/extra-models.md` (#13061)
Co-authored-by: timothy <53824764+jts8257@users.noreply.github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2025-01-30 12:21:44 +00:00
github-actions 3d02a920ab 📝 Update release notes
[skip ci]
2025-01-30 12:20:24 +00:00
Alejandra 1b00f8ae78
Simplify tests for body_multiple_params (#13237)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-30 12:20:01 +00:00
github-actions d97647fd57 📝 Update release notes
[skip ci]
2025-01-30 12:19:41 +00:00
Ysabel 9667ce87a9
📝 Update Request Body's `tutorial002` to deal with `tax=0` case (#13230)
Co-authored-by: svlandeg <svlandeg@github.com>
2025-01-30 12:19:10 +00:00
github-actions 0541693bc7 📝 Update release notes
[skip ci]
2025-01-30 12:17:52 +00:00
github-actions 041b2e1c46 📝 Update release notes
[skip ci]
2025-01-30 12:17:34 +00:00
Shahriyar Rzayev 30b270be9a
♻️ Move duplicated code portion to a static method in the `APIKeyBase` super class (#3142)
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
Co-authored-by: svlandeg <svlandeg@github.com>
2025-01-30 12:17:20 +00:00
Rahul Pai d5ecbaceae
🐛 Fix `OAuth2PasswordRequestForm` and `OAuth2PasswordRequestFormStrict` fixed `grant_type` "password" RegEx (#9783)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
Co-authored-by: svlandeg <svlandeg@github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-01-30 12:17:09 +00:00
github-actions 43d9a4d2b1 📝 Update release notes
[skip ci]
2025-01-30 12:04:59 +00:00
Alejandra c5b5af7c53
Simplify tests for request_files (#13182)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-30 12:04:34 +00:00
github-actions 887270ff8a 📝 Update release notes
[skip ci]
2025-01-29 18:02:50 +00:00
Sebastián Ramírez bd106fc750
⬆️ Add support for Python 3.13 (#13274)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-29 18:02:27 +00:00
github-actions eab0653a34 📝 Update release notes
[skip ci]
2025-01-28 23:35:44 +00:00
Sebastián Ramírez 8c6f10b64a
⬆️ Upgrade AnyIO max version for tests, new range: `>=3.2.1,<5.0.0` (#13273) 2025-01-28 23:35:19 +00:00
github-actions 93e9fed2e8 📝 Update release notes
[skip ci]
2025-01-28 22:36:38 +00:00
Sebastián Ramírez e747f1938a
🔧 Update Sponsors badges (#13271) 2025-01-28 22:36:15 +00:00
github-actions 92b745461c 📝 Update release notes
[skip ci]
2025-01-28 22:30:38 +00:00
Sebastián Ramírez 0a2b24653b
♻️ Fix `notify_translations.py` empty env var handling for PR label events vs workflow_dispatch (#13272) 2025-01-28 22:30:15 +00:00
github-actions a058d8ecbc 📝 Update release notes
[skip ci]
2025-01-28 21:47:55 +00:00
Sebastián Ramírez 326fec16b9
♻️ Refactor and move `scripts/notify_translations.py`, no need for a custom GitHub Action (#13270)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-28 21:47:33 +00:00
github-actions 8525b879ed 📝 Update release notes
[skip ci]
2025-01-28 20:41:36 +00:00
Sebastián Ramírez 3da797aeb8
👥 Update FastAPI People - Experts (#13269)
Co-authored-by: github-actions <github-actions@github.com>
2025-01-28 20:41:08 +00:00
github-actions e925c0ec8e 📝 Update release notes
[skip ci]
2025-01-28 20:35:19 +00:00
Sebastián Ramírez ff68d0894a
🔨 Update FastAPI People Experts script, refactor and optimize data fetching to handle rate limits (#13267) 2025-01-28 20:34:56 +00:00
github-actions d2f5097ded 📝 Update release notes
[skip ci]
2025-01-27 15:39:30 +00:00
k94-ishi 8f359273b5
🌐 Add Japanese translation for `docs/ja/docs/environment-variables.md` (#13226) 2025-01-27 15:39:04 +00:00
github-actions 18127b7907 📝 Update release notes
[skip ci]
2025-01-27 15:36:36 +00:00
Rishat-F 24eb8eeeba
🌐 Add Russian translation for `docs/ru/docs/advanced/async-tests.md` (#13227) 2025-01-27 15:36:13 +00:00
github-actions 1e44825ef2 📝 Update release notes
[skip ci]
2025-01-24 19:44:54 +00:00
Rishat-F 998a9139d3
🌐 Update Russian translation for `docs/ru/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md` (#13252) 2025-01-24 19:44:31 +00:00
github-actions 6bbd315f3e 📝 Update release notes
[skip ci]
2025-01-24 17:05:37 +00:00
dependabot[bot] 0e2d8d64a4
⬆ Bump pypa/gh-action-pypi-publish from 1.12.3 to 1.12.4 (#13251)
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.12.3 to 1.12.4.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.12.3...v1.12.4)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-24 17:05:11 +00:00
github-actions b6f6818d76 📝 Update release notes
[skip ci]
2025-01-23 09:47:05 +00:00
alv2017 4d60022c88
🌐 Add Russian translation for `docs/ru/docs/tutorial/bigger-applications.md` (#13154) 2025-01-23 09:46:41 +00:00
Sebastián Ramírez fe513719ea 🔖 Release version 0.115.7 2025-01-22 22:50:29 +00:00
Sebastián Ramírez 7183f0d683 📝 Update release notes 2025-01-22 22:48:57 +00:00
github-actions 2b6f63df71 📝 Update release notes
[skip ci]
2025-01-22 18:25:24 +00:00
johnthagen abd05a6d30
🔧 Add Pydantic 2 trove classifier (#13199) 2025-01-22 18:24:58 +00:00
github-actions e39143d56d 📝 Update release notes
[skip ci]
2025-01-22 18:24:12 +00:00
Daniel Kusy 49e82ed2ac
⬆️ Upgrade `python-multipart` to >=0.0.18 (#13219) 2025-01-22 18:23:13 +00:00
github-actions 91c05b9245 📝 Update release notes
[skip ci]
2025-01-22 18:22:02 +00:00
Marcelo Trylesinski 82c74789e8
⬆️ Bump Starlette to allow up to 0.45.0: `>=0.40.0,<0.46.0` (#13117) 2025-01-22 18:21:40 +00:00
github-actions 1a38cc506e 📝 Update release notes
[skip ci]
2025-01-22 18:03:00 +00:00
Daniel Kusy 548f67d465
⬆️ Upgrade `jinja2` to >=3.1.5 (#13194) 2025-01-22 18:02:36 +00:00
github-actions a215687c98 📝 Update release notes
[skip ci]
2025-01-22 13:42:19 +00:00
João Pedro 8fa18e5e6f
🌐 Update Portuguese Translation for `docs/pt/docs/tutorial/request-forms.md` (#13216) 2025-01-22 13:41:56 +00:00
github-actions 6ba09082a0 📝 Update release notes
[skip ci]
2025-01-19 22:41:00 +00:00
Alejandra 280fe73c03
Simplify tests for websockets (#13202) 2025-01-19 22:40:39 +00:00
github-actions 9f3edbf537 📝 Update release notes
[skip ci]
2025-01-19 22:39:42 +00:00
Alejandra 182c28e57a
Simplify tests for request_form_models (#13183)
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2025-01-19 22:39:18 +00:00
github-actions b5e40a6233 📝 Update release notes
[skip ci]
2025-01-19 22:37:13 +00:00
Alejandra 39698df806
Simplify tests for separate_openapi_schemas (#13201)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-19 22:36:49 +00:00
github-actions 6d51389f75 📝 Update release notes
[skip ci]
2025-01-19 22:36:07 +00:00
Alejandra 2007993433
Simplify tests for security (#13200) 2025-01-19 22:35:40 +00:00
github-actions 818eb1f365 📝 Update release notes
[skip ci]
2025-01-19 22:31:13 +00:00
Alejandra 3e12918325
Simplify tests for schema_extra_example (#13197)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-19 22:30:50 +00:00
github-actions 2c83a11a7d 📝 Update release notes
[skip ci]
2025-01-19 06:58:12 +00:00
Alejandra 081901cc99
Simplify tests for request_model (#13195) 2025-01-19 06:57:50 +00:00
github-actions 0069963bba 📝 Update release notes
[skip ci]
2025-01-19 06:43:44 +00:00
Alejandra d309c9e140
Simplify tests for request_forms_and_files (#13185)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-19 06:43:21 +00:00
github-actions 9847cecf6f 📝 Update release notes
[skip ci]
2025-01-19 06:42:49 +00:00
Alejandra c7d888a15f
Simplify tests for request_forms (#13184) 2025-01-19 06:42:25 +00:00
github-actions 96808fd44f 📝 Update release notes
[skip ci]
2025-01-19 06:35:11 +00:00
Alejandra 09ccfce228
Simplify tests for path_query_params (#13181) 2025-01-19 06:34:48 +00:00
github-actions ec46247595 📝 Update release notes
[skip ci]
2025-01-19 06:33:35 +00:00
Alejandra 2e8db846b4
Simplify tests for path_operation_configurations (#13180)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-19 06:33:10 +00:00
github-actions b123c5c489 📝 Update release notes
[skip ci]
2025-01-19 06:32:34 +00:00
Alejandra aa60185781
Simplify tests for header_params (#13179) 2025-01-19 06:32:11 +00:00
github-actions d704f94cf0 📝 Update release notes
[skip ci]
2025-01-19 06:29:54 +00:00
Alejandra 3d017824ba
Simplify tests for extra_models (#13178) 2025-01-19 06:29:33 +00:00
github-actions ae93ec140a 📝 Update release notes
[skip ci]
2025-01-19 06:28:31 +00:00
Alejandra 8015f832d4
Simplify tests for extra_data_types (#13177) 2025-01-19 06:28:09 +00:00
github-actions cd521dff74 📝 Update release notes
[skip ci]
2025-01-19 06:27:16 +00:00
Alejandra 736712173a
Simplify tests for cookie_params (#13176) 2025-01-19 06:26:50 +00:00
github-actions 409a850c6c 📝 Update release notes
[skip ci]
2025-01-19 06:26:10 +00:00
Alejandra 920df4d1ac
Simplify tests for dependencies (#13174) 2025-01-19 06:25:51 +00:00
github-actions c0fddaa9a9 📝 Update release notes
[skip ci]
2025-01-19 06:21:52 +00:00
Alejandra 0a882e926e
Simplify tests for body_updates (#13172) 2025-01-19 06:21:30 +00:00
github-actions f30dd4fe40 📝 Update release notes
[skip ci]
2025-01-19 06:21:05 +00:00
Alejandra 55ef9270b8
Simplify tests for body_nested_models (#13171) 2025-01-19 06:20:41 +00:00
github-actions 4191f4d33a 📝 Update release notes
[skip ci]
2025-01-19 06:20:23 +00:00
Alejandra 1cedd8becf
Simplify tests for body_multiple_params (#13170) 2025-01-19 06:19:58 +00:00
github-actions 7e06c4c97f 📝 Update release notes
[skip ci]
2025-01-18 13:10:40 +00:00
Sebastián Ramírez af599c92ac
👥 Update FastAPI People - Sponsors (#13231)
Co-authored-by: github-actions <github-actions@github.com>
2025-01-18 13:10:13 +00:00
github-actions 2acdc13608 📝 Update release notes
[skip ci]
2025-01-18 12:58:57 +00:00
Sebastián Ramírez 2ee101fb81
👷 Refactor FastAPI People Sponsors to use 2 tokens (#13228) 2025-01-18 12:58:36 +00:00
github-actions ea0cdd120c 📝 Update release notes
[skip ci]
2025-01-17 22:34:04 +00:00
Sebastián Ramírez 35b24deef3
👷 Update token for FastAPI People - Sponsors (#13225) 2025-01-17 22:33:38 +00:00
github-actions db48d9cf09 📝 Update release notes
[skip ci]
2025-01-17 17:53:06 +00:00
Sebastián Ramírez 9e0d4fa0ef
👷 Add independent CI automation for FastAPI People - Sponsors (#13221) 2025-01-17 17:51:19 +00:00
github-actions e773d7e919 📝 Update release notes
[skip ci]
2025-01-15 20:18:49 +00:00
Rafael de Oliveira Marques d9a640e06c
🌐 Update Portuguese translation for `docs/pt/docs/advanced/settings.md` (#13209) 2025-01-15 20:17:23 +00:00
github-actions 5f49397d19 📝 Update release notes
[skip ci]
2025-01-15 20:16:38 +00:00
Rafael de Oliveira Marques 16199c4a13
🌐 Add Portuguese translation for `docs/pt/docs/tutorial/security/oauth2-jwt.md` (#13205) 2025-01-15 20:16:13 +00:00
github-actions 2612fa3e9d 📝 Update release notes
[skip ci]
2025-01-13 13:36:46 +00:00
Gerry Sabar 5d18ae0d90
🌐 Add Indonesian translation for `docs/id/docs/index.md` (#13191) 2025-01-13 13:36:23 +00:00
github-actions 09a0295bf3 📝 Update release notes
[skip ci]
2025-01-10 20:31:39 +00:00
Guspan Tanadi cda85623fb
🌐 Add Indonesian translation for `docs/id/docs/tutorial/static-files.md` (#13092) 2025-01-10 20:31:13 +00:00
github-actions 62be4a1600 📝 Update release notes
[skip ci]
2025-01-10 13:33:58 +00:00
Rafael de Oliveira Marques e69182940e
🌐 Add Portuguese translation for `docs/pt/docs/tutorial/security/get-current-user.md` (#13188) 2025-01-10 13:33:35 +00:00
github-actions f36927d0a6 📝 Update release notes
[skip ci]
2025-01-10 13:33:14 +00:00
Rafael de Oliveira Marques e54cc8ffa3
🌐 Remove Wrong Portuguese translations location for `docs/pt/docs/advanced/benchmarks.md` (#13187) 2025-01-10 13:32:37 +00:00
github-actions 837e94573d 📝 Update release notes
[skip ci]
2025-01-09 20:41:29 +00:00
nillvitor 9d293b7086
🌐 Update Portuguese translations (#13156) 2025-01-09 20:41:07 +00:00
github-actions 3d2ef237ed 📝 Update release notes
[skip ci]
2025-01-08 19:29:11 +00:00
Alejandra 9b88c7c18a
Simplify tests for body_fields (#13169) 2025-01-08 20:28:44 +01:00
github-actions fe4b25e2d7 📝 Update release notes
[skip ci]
2025-01-08 19:26:39 +00:00
Alejandra 0cc031f477
Simplify tests for body (#13168) 2025-01-08 20:26:16 +01:00
github-actions a8447c15e5 📝 Update release notes
[skip ci]
2025-01-08 19:25:29 +00:00
Alejandra 5d3f45c2d4
Simplify tests for bigger_applications (#13167) 2025-01-08 20:25:01 +01:00
github-actions afd1502283 📝 Update release notes
[skip ci]
2025-01-08 19:24:05 +00:00
Alejandra 44adb29ce1
Simplify tests for background_tasks (#13166) 2025-01-08 20:23:42 +01:00
github-actions 144f09ea14 📝 Update release notes
[skip ci]
2025-01-06 18:27:10 +00:00
Yaroslav Luchinsky 4cd5a7ac1c
🌐 Update Russian translation for `docs/ru/docs/tutorial/security/first-steps.md` (#13159) 2025-01-06 18:26:39 +00:00
github-actions d7bd68979f 📝 Update release notes
[skip ci]
2025-01-06 11:24:40 +00:00
Kinuax b0e70cb37e
✏️ Update Strawberry integration docs (#13155) 2025-01-06 11:24:17 +00:00
github-actions 6e60d0a056 📝 Update release notes
[skip ci]
2025-01-05 14:45:08 +00:00
Alejandra d784a90207
🔥 Remove unused Peewee tutorial files (#13158) 2025-01-05 14:44:44 +00:00
github-actions 924c96bf90 📝 Update release notes
[skip ci]
2025-01-04 10:54:27 +00:00
FakeDocument dace29835c
✏️ Delete unnecessary backspace in `docs/ja/docs/tutorial/path-params-numeric-validations.md` (#12238) 2025-01-04 10:53:58 +00:00
github-actions c99b945d87 📝 Update release notes
[skip ci]
2025-01-04 00:26:56 +00:00
Sebastián Ramírez f229dd97c0
👷 Add retries to Smokeshow (#13151) 2025-01-04 00:26:30 +00:00
github-actions 023bc01967 📝 Update release notes
[skip ci]
2025-01-03 21:29:28 +00:00
Chai Landau 083c6dd481
🔧 Update Speakeasy sponsor graphic (#13147) 2025-01-03 21:29:07 +00:00
github-actions cf4dfcbd59 📝 Update release notes
[skip ci]
2025-01-03 18:29:01 +00:00
Hamza Kyamanywa 8416e3ee23
📝 Update image in body-nested-model docs (#11063) 2025-01-03 18:28:35 +00:00
github-actions 01a1fc8d15 📝 Update release notes
[skip ci]
2025-01-03 16:26:28 +00:00
Zhongheng Cheng 87fb46bcac
📝 Update `fastapi-cli` UI examples in docs (#13107) 2025-01-03 16:26:01 +00:00
github-actions 91738b5ae7 📝 Update release notes
[skip ci]
2025-01-03 16:17:14 +00:00
Zhongheng Cheng 27c700a6d3
🌐 Update Chinese translation for `docs/zh/docs/fastapi-cli.md` (#13102) 2025-01-03 16:16:52 +00:00
github-actions 9eb712802e 📝 Update release notes
[skip ci]
2025-01-03 09:48:22 +00:00
Sebastián Ramírez 994340f839
Simplify tests for additional_status_codes (#13149) 2025-01-03 09:47:55 +00:00
github-actions 4f04377270 📝 Update release notes
[skip ci]
2025-01-02 21:01:23 +00:00
Sebastián Ramírez ccae0c0cb9
👥 Update FastAPI GitHub topic repositories (#13146)
Co-authored-by: github-actions <github-actions@github.com>
2025-01-02 21:00:17 +00:00
github-actions aa27afdb24 📝 Update release notes
[skip ci]
2025-01-02 20:45:12 +00:00
Alejandra 1b8f823a05
👷‍♀️ Add script for GitHub Topic Repositories and update External Links (#13135)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-01-02 20:44:50 +00:00
github-actions 548dd233c3 📝 Update release notes
[skip ci]
2025-01-02 17:22:51 +00:00
Sebastián Ramírez 2d210f7313
👥 Update FastAPI People - Contributors and Translators (#13145)
Co-authored-by: github-actions <github-actions@github.com>
2025-01-02 17:22:30 +00:00
github-actions af7db9b95d 📝 Update release notes
[skip ci]
2025-01-02 17:03:46 +00:00
Sebastián Ramírez b59885c9d5
👷 Add new GitHub Action to update contributors, translators, and translation reviewers (#13136) 2025-01-02 17:03:21 +00:00
github-actions dd649ff814 📝 Update release notes
[skip ci]
2025-01-01 17:27:23 +00:00
dependabot[bot] 274d3d9bd0
⬆ Bump markdown-include-variants from 0.0.3 to 0.0.4 (#13129)
Bumps [markdown-include-variants](https://github.com/tiangolo/markdown-include-variants) from 0.0.3 to 0.0.4.
- [Release notes](https://github.com/tiangolo/markdown-include-variants/releases)
- [Changelog](https://github.com/tiangolo/markdown-include-variants/blob/main/release-notes.md)
- [Commits](https://github.com/tiangolo/markdown-include-variants/compare/0.0.3...0.0.4)

---
updated-dependencies:
- dependency-name: markdown-include-variants
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-01 17:26:52 +00:00
github-actions ad294d4d1e 📝 Update release notes
[skip ci]
2025-01-01 17:19:34 +00:00
dependabot[bot] 55ba3220f8
⬆ Bump inline-snapshot from 0.14.0 to 0.18.1 (#13132)
Bumps [inline-snapshot](https://github.com/15r10nk/inline-snapshot) from 0.14.0 to 0.18.1.
- [Release notes](https://github.com/15r10nk/inline-snapshot/releases)
- [Changelog](https://github.com/15r10nk/inline-snapshot/blob/main/CHANGELOG.md)
- [Commits](https://github.com/15r10nk/inline-snapshot/compare/v0.14.0...0.18.1)

---
updated-dependencies:
- dependency-name: inline-snapshot
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-01 17:19:08 +00:00
github-actions 05b62724e0 📝 Update release notes
[skip ci]
2025-01-01 17:18:48 +00:00
dependabot[bot] 324c3ba095
⬆ Bump mkdocs-macros-plugin from 1.0.5 to 1.3.7 (#13133)
Bumps [mkdocs-macros-plugin](https://github.com/fralau/mkdocs_macros_plugin) from 1.0.5 to 1.3.7.
- [Release notes](https://github.com/fralau/mkdocs_macros_plugin/releases)
- [Changelog](https://github.com/fralau/mkdocs-macros-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fralau/mkdocs_macros_plugin/compare/v1.0.5...v1.3.7)

---
updated-dependencies:
- dependency-name: mkdocs-macros-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-01 17:18:26 +00:00
github-actions 1d50bad455 📝 Update release notes
[skip ci]
2024-12-30 19:00:23 +00:00
Sebastián Ramírez db9da09f72
✏️ Fix typo in `docs/en/docs/virtual-environments.md` (#13124) 2024-12-30 18:59:59 +00:00
github-actions d4b6f1d1f6 📝 Update release notes
[skip ci]
2024-12-30 18:47:07 +00:00
Sebastián Ramírez acd9c4e1aa
🔨 Add internal scripts to generate language translations with PydanticAI, include Spanish prompt (#13123) 2024-12-30 18:46:43 +00:00
github-actions e2f6e5f6fc 📝 Update release notes
[skip ci]
2024-12-30 18:28:14 +00:00
Sebastián Ramírez fe5b2e491e
🌐 Add new Spanish translations for all docs with new LLM-assisted system using PydanticAI (#13122)
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: User <alejsdev@gmail.com>
2024-12-30 18:26:57 +00:00
github-actions a6afa805cd 📝 Update release notes
[skip ci]
2024-12-30 17:47:07 +00:00
Sebastián Ramírez 495460d3ed
🌐 Update existing Spanish translations using the new LLM-assisted system using PydanticAI (#13118)
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
2024-12-30 17:46:44 +00:00
github-actions d88473b739 📝 Update release notes
[skip ci]
2024-12-29 20:41:26 +00:00
Chen Pu 13a5b3f9b9
🌐 Update Chinese translation for `docs/zh/docs/advanced/security/oauth2-scopes.md` (#13110) 2024-12-29 20:41:04 +00:00
github-actions 741b95a454 📝 Update release notes
[skip ci]
2024-12-25 20:33:17 +00:00
Subin Lee abac475407
✏️ Fix error in `docs/en/docs/contributing.md` (#12899) 2024-12-25 20:32:56 +00:00
github-actions d5a11b6cdc 📝 Update release notes
[skip ci]
2024-12-25 20:10:38 +00:00
alv2017 b7367f2564
📝 Minor corrections in `docs/en/docs/tutorial/sql-databases.md` (#13081) 2024-12-25 20:10:12 +00:00
github-actions 0370958171 📝 Update release notes
[skip ci]
2024-12-24 16:17:09 +00:00
Gerry Sabar d529449241
🌐 Add Indonesian translation for `docs/id/docs/tutorial/path-params.md` (#13086) 2024-12-24 16:16:02 +00:00
github-actions 59401a7829 📝 Update release notes
[skip ci]
2024-12-24 16:14:57 +00:00
Geumbin eece6344f5
🌐 Add Korean translation for `docs/ko/docs/tutorial/sql-databases.md` (#13093) 2024-12-24 16:14:29 +00:00
github-actions b9a27be0d4 📝 Update release notes
[skip ci]
2024-12-23 21:53:32 +00:00
Zhongheng Cheng f2986a1d53
🌐 Update Chinese translation for `docs/zh/docs/async.md` (#13095) 2024-12-23 21:53:06 +00:00
github-actions dd0b335052 📝 Update release notes
[skip ci]
2024-12-20 21:16:17 +00:00
dependabot[bot] e779069c92
⬆ Bump astral-sh/setup-uv from 4 to 5 (#13096)
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 4 to 5.
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](https://github.com/astral-sh/setup-uv/compare/v4...v5)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-20 21:15:54 +00:00
github-actions d041f12331 📝 Update release notes
[skip ci]
2024-12-19 15:31:03 +00:00
Zhongheng Cheng c015245676
🌐 Add Chinese translation for `docs/zh/docs/advanced/openapi-webhooks.md` (#13091) 2024-12-19 15:30:38 +00:00
github-actions 986d363a38 📝 Update release notes
[skip ci]
2024-12-17 21:49:28 +00:00
Zhongheng Cheng a9f63e5d22
🌐 Add Chinese translation for `docs/zh/docs/advanced/async-tests.md` (#13074) 2024-12-17 21:49:06 +00:00
github-actions 3ca5fe1709 📝 Update release notes
[skip ci]
2024-12-17 21:34:01 +00:00
Yarema Kertytsky 2b78866662
🌐 Add Ukrainian translation for `docs/uk/docs/fastapi-cli.md` (#13020) 2024-12-17 21:33:34 +00:00
github-actions 334c9bc7ad 📝 Update release notes
[skip ci]
2024-12-17 21:29:01 +00:00
Zhibang Yue a559f8f397
🌐 Add Chinese translation for `docs/zh/docs/advanced/events.md` (#12512) 2024-12-17 21:28:37 +00:00
github-actions 0d8e9663d8 📝 Update release notes
[skip ci]
2024-12-17 21:21:39 +00:00
github-actions 52d8ad8bfa 📝 Update release notes
[skip ci]
2024-12-17 21:21:10 +00:00
alv2017 dae2b957ba
🌐 Add Russian translation for `/docs/ru/docs/tutorial/sql-databases.md` (#13079) 2024-12-17 21:20:20 +00:00
Zhongheng Cheng a0f6494803
🌐 Update Chinese translation for `docs/zh/docs/advanced/testing-dependencies.md` (#13066) 2024-12-17 21:18:42 +00:00
github-actions b19af36826 📝 Update release notes
[skip ci]
2024-12-17 21:18:25 +00:00
YungYueh ChanLee d03ef24c92
🌐 Update Traditional Chinese translation for `docs/zh-hant/docs/tutorial/index.md` (#13075) 2024-12-17 21:16:46 +00:00
github-actions 5fc3e91020 📝 Update release notes
[skip ci]
2024-12-15 17:12:47 +00:00
Zhongheng Cheng 929e844754
🌐 Add Chinese translation for `docs/zh/docs/tutorial/sql-databases.md` (#13051) 2024-12-15 17:11:14 +00:00
github-actions cfc17e5510 📝 Update release notes
[skip ci]
2024-12-15 17:10:40 +00:00
史雲昔 (Vincy SHI) d3360406c4
🌐 Update Chinese translation for `docs/zh/docs/tutorial/query-params-str-validations.md` (#12928) 2024-12-15 17:10:14 +00:00
github-actions 940c0fb9fb 📝 Update release notes
[skip ci]
2024-12-15 16:45:42 +00:00
Zhongheng Cheng c1220535cc
🌐 Add Chinese translation for `docs/zh/docs/tutorial/header-param-models.md` (#13040) 2024-12-15 16:44:11 +00:00
github-actions 488763e9f7 📝 Update release notes
[skip ci]
2024-12-15 16:43:41 +00:00
史雲昔 (Vincy SHI) 0e5f5d2e93
🌐 Update Chinese translation for `docs/zh/docs/tutorial/path-params.md` (#12926) 2024-12-15 16:43:19 +00:00
github-actions f5f0d20af0 📝 Update release notes
[skip ci]
2024-12-15 16:39:45 +00:00
史雲昔 (Vincy SHI) 97206ee28f
🌐 Update Chinese translation for `docs/zh/docs/tutorial/first-steps.md` (#12923) 2024-12-15 16:39:22 +00:00
github-actions d7f88623e1 📝 Update release notes
[skip ci]
2024-12-15 13:35:39 +00:00
Sebastián Ramírez 0f5146fa5d
🔧 Update sponsors: rename CryptAPI to BlockBee (#13078) 2024-12-15 14:35:18 +01:00
github-actions 6ae85b4742 📝 Update release notes
[skip ci]
2024-12-12 22:49:43 +00:00
Aleksandr Lobanov 627242b8ae
🌐 Update Russian translation for `docs/ru/docs/deployment/docker.md` (#13048) 2024-12-12 22:48:28 +00:00
github-actions fbd3ff4a6f 📝 Update release notes
[skip ci]
2024-12-12 22:47:34 +00:00
Victor Menezes a277942a52
🌐 Add Portuguese translation for `docs/pt/docs/advanced/generate-clients.md` (#13030) 2024-12-12 22:47:10 +00:00
github-actions a862acb877 📝 Update release notes
[skip ci]
2024-12-12 21:47:03 +00:00
Gerry Sabar 974284be90
🌐 Add Indonesian translation for `docs/id/docs/tutorial/first-steps.md` (#13042) 2024-12-12 21:46:36 +00:00
github-actions e90af0c0f9 📝 Update release notes
[skip ci]
2024-12-10 20:39:15 +00:00
Zhongheng Cheng 9802b90b66
🌐 Add Chinese translation for `docs/zh/docs/tutorial/cookie-param-models.md` (#13038) 2024-12-10 20:38:03 +00:00
github-actions 6c8deb5a4f 📝 Update release notes
[skip ci]
2024-12-10 20:36:33 +00:00
Zhongheng Cheng 0d49633776
🌐 Add Chinese translation for `docs/zh/docs/tutorial/request-form-models.md` (#13045) 2024-12-10 20:36:08 +00:00
github-actions 727ce82e9b 📝 Update release notes
[skip ci]
2024-12-10 20:35:10 +00:00
dependabot[bot] 6455f4bb01
⬆ Bump pypa/gh-action-pypi-publish from 1.12.2 to 1.12.3 (#13055)
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.12.2 to 1.12.3.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.12.2...v1.12.3)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-10 20:34:48 +00:00
github-actions fed6fab8f9 📝 Update release notes
[skip ci]
2024-12-10 11:35:32 +00:00
alv2017 5cc1b065ba
🌐 Add Russian translation for `docs/ru/docs/virtual-environments.md` (#13026) 2024-12-10 11:34:19 +00:00
github-actions bacf9e5af6 📝 Update release notes
[skip ci]
2024-12-10 11:25:14 +00:00
timothy 230f2077b9
🌐 Add Korean translation for `docs/ko/docs/tutorial/testing.md` (#12968) 2024-12-10 11:24:48 +00:00
github-actions c9470e7aec 📝 Update release notes
[skip ci]
2024-12-10 11:03:42 +00:00
viva-douner f7ba75e3f7
🌐 Add Korean translation for `docs/ko/docs/advanced/async-test.md` (#12918) 2024-12-10 11:03:16 +00:00
github-actions 52cdbebbad 📝 Update release notes
[skip ci]
2024-12-10 10:58:06 +00:00
Aleksandr Andrukhov d8e7edba80
🌐 Add Russian translation for `docs/ru/docs/tutorial/security/oauth2-jwt.md` (#10601) 2024-12-10 10:56:08 +00:00
github-actions c355ae1416 📝 Update release notes
[skip ci]
2024-12-10 10:54:21 +00:00
github-actions bc958ac3da 📝 Update release notes
[skip ci]
2024-12-10 10:53:56 +00:00
Aleksandr Andrukhov a54e336b22
🌐 Add Russian translation for `docs/ru/docs/tutorial/security/simple-oauth2.md` (#10599) 2024-12-10 10:53:40 +00:00
Aleksandr Andrukhov b667e6ff12
🌐 Add Russian translation for `docs/ru/docs/tutorial/security/get-current-user.md` (#10594) 2024-12-10 10:52:27 +00:00
github-actions d05d970c4d 📝 Update release notes
[skip ci]
2024-12-10 10:49:09 +00:00
YungYueh ChanLee 365d9b93c3
🌐 Add Traditional Chinese translation for `docs/zh-hant/docs/features.md` (#12441) 2024-12-10 10:48:41 +00:00
github-actions f7bff17f98 📝 Update release notes
[skip ci]
2024-12-09 22:53:53 +00:00
dependabot[bot] 889005d07d
⬆ Bump types-ujson from 5.7.0.1 to 5.10.0.20240515 (#13018)
Bumps [types-ujson](https://github.com/python/typeshed) from 5.7.0.1 to 5.10.0.20240515.
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-ujson
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-09 22:53:31 +00:00
github-actions dfb6a6b74a 📝 Update release notes
[skip ci]
2024-12-09 22:50:51 +00:00
github-actions b4155f7a76 📝 Update release notes
[skip ci]
2024-12-09 22:46:35 +00:00
dependabot[bot] 329a81777b
⬆ Bump black from 24.3.0 to 24.10.0 (#13014)
Bumps [black](https://github.com/psf/black) from 24.3.0 to 24.10.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/24.3.0...24.10.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-09 22:45:45 +00:00
github-actions cb6edde2e5 📝 Update release notes
[skip ci]
2024-12-09 22:45:09 +00:00
dependabot[bot] fe604f360f
⬆ Bump inline-snapshot from 0.13.0 to 0.14.0 (#13017)
Bumps [inline-snapshot](https://github.com/15r10nk/inline-snapshot) from 0.13.0 to 0.14.0.
- [Release notes](https://github.com/15r10nk/inline-snapshot/releases)
- [Changelog](https://github.com/15r10nk/inline-snapshot/blob/main/CHANGELOG.md)
- [Commits](https://github.com/15r10nk/inline-snapshot/compare/v0.13.0...v0.14.0)

---
updated-dependencies:
- dependency-name: inline-snapshot
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-09 22:44:46 +00:00
dependabot[bot] ce843bb8e1
⬆ Bump dirty-equals from 0.6.0 to 0.8.0 (#13015)
Bumps [dirty-equals](https://github.com/samuelcolvin/dirty-equals) from 0.6.0 to 0.8.0.
- [Release notes](https://github.com/samuelcolvin/dirty-equals/releases)
- [Commits](https://github.com/samuelcolvin/dirty-equals/compare/v0.6.0...v0.8.0)

---
updated-dependencies:
- dependency-name: dirty-equals
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-09 22:44:36 +00:00
github-actions 28f22e326c 📝 Update release notes
[skip ci]
2024-12-09 22:43:46 +00:00
github-actions f6cf06c864 📝 Update release notes
[skip ci]
2024-12-09 22:43:37 +00:00
dependabot[bot] d2891b651d
⬆ Bump cloudflare/wrangler-action from 3.12 to 3.13 (#12996)
Bumps [cloudflare/wrangler-action](https://github.com/cloudflare/wrangler-action) from 3.12 to 3.13.
- [Release notes](https://github.com/cloudflare/wrangler-action/releases)
- [Changelog](https://github.com/cloudflare/wrangler-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/cloudflare/wrangler-action/compare/v3.12...v3.13)

---
updated-dependencies:
- dependency-name: cloudflare/wrangler-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-09 22:43:24 +00:00
dependabot[bot] 2fe5ee4151
⬆ Bump astral-sh/setup-uv from 3 to 4 (#12982)
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 3 to 4.
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](https://github.com/astral-sh/setup-uv/compare/v3...v4)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-09 22:43:15 +00:00
github-actions 502c928ab1 📝 Update release notes
[skip ci]
2024-12-09 22:40:00 +00:00
史雲昔 (Vincy SHI) 671eba1de6
🌐 Add Traditional Chinese translation for `docs/zh-hant/docs/virtual-environments.md` (#12791) 2024-12-09 22:39:33 +00:00
github-actions 2bbd7ce821 📝 Update release notes
[skip ci]
2024-12-09 19:51:20 +00:00
tinyboxvk de1fe4d388
🔧 Remove duplicate actions/checkout in `notify-translations.yml` (#12915) 2024-12-09 19:50:56 +00:00
github-actions bb3cf8b902 📝 Update release notes
[skip ci]
2024-12-09 13:07:47 +00:00
heum d24a334923
🌐 Add Korean translation for `docs/ko/docs/advanced/templates.md` (#12726) 2024-12-09 13:07:23 +00:00
github-actions 87accca03e 📝 Update release notes
[skip ci]
2024-12-09 13:01:17 +00:00
Alejandra d0626aa565
📝 Update includes in `docs/ru/docs/tutorial/query-param-models.md` (#12994) 2024-12-09 14:00:54 +01:00
github-actions eed1496b0e 📝 Update release notes
[skip ci]
2024-12-09 12:57:32 +00:00
Dave Hay 9e19613311
✏️ Fix typo in README installation instructions (#13011) 2024-12-09 12:57:05 +00:00
github-actions 40f90b3a94 📝 Update release notes
[skip ci]
2024-12-09 12:51:00 +00:00
github-actions cbfb27ca91 📝 Update release notes
[skip ci]
2024-12-09 12:50:03 +00:00
alv2017 b0f0abda0d
🌐 Add Russian translation for `docs/ru/docs/fastapi-cli.md` (#13041) 2024-12-09 12:49:43 +00:00
github-actions c62fa0bd3b 📝 Update release notes
[skip ci]
2024-12-09 12:47:45 +00:00
hy.lee 95267e58de
🌐 Add Korean translation for `docs/ko/docs/tutorial/cookie-param-models.md` (#13000) 2024-12-09 12:47:02 +00:00
hy.lee f4a023451d
🌐 Add Korean translation for `docs/ko/docs/tutorial/header-param-models.md` (#13001) 2024-12-09 12:45:39 +00:00
github-actions 28f820065f 📝 Update release notes
[skip ci]
2024-12-09 12:45:10 +00:00
github-actions 199803085f 📝 Update release notes
[skip ci]
2024-12-09 12:44:32 +00:00
hy.lee 5e8fa0e842
🌐 Add Korean translation for `docs/ko/docs/tutorial/request-form-models.md` (#13002) 2024-12-09 12:44:27 +00:00
hy.lee 5480386e39
🌐 Add Korean translation for `docs/ko/docs/tutorial/request-forms.md` (#13003) 2024-12-09 12:42:55 +00:00
github-actions 92236cf6a4 📝 Update release notes
[skip ci]
2024-12-09 12:42:19 +00:00
hy.lee 30f00ace9a
🌐 Add Korean translation for `docs/ko/docs/resources/index.md` (#13004) 2024-12-09 12:41:56 +00:00
github-actions cb33e0aed2 📝 Update release notes
[skip ci]
2024-12-09 12:28:42 +00:00
nahyunkeem 49efaa5b7e
🌐 Add Korean translation for `docs/ko/docs/how-to/configure-swagger-ui.md` (#12898) 2024-12-09 12:25:19 +00:00
github-actions d43fe2d2e1 📝 Update release notes
[skip ci]
2024-12-09 12:23:36 +00:00
nahyunkeem 8040927208
🌐 Add Korean translation to `docs/ko/docs/advanced/additional-status-codes.md` (#12715) 2024-12-09 12:22:47 +00:00
github-actions 131b6dc21f 📝 Update release notes
[skip ci]
2024-12-09 12:21:23 +00:00
YungYueh ChanLee 01c6b41c52
🌐 Add Traditional Chinese translation for `docs/zh-hant/docs/tutorial/first-steps.md` (#12467) 2024-12-09 12:20:58 +00:00
github-actions f9514ac4b2 📝 Update release notes
[skip ci]
2024-12-04 15:10:29 +00:00
Sebastián Ramírez cc4db3294a
🔧 Update team members (#13033) 2024-12-04 16:10:05 +01:00
github-actions d4e29ea3fe 📝 Update release notes
[skip ci]
2024-12-04 15:00:32 +00:00
Sebastián Ramírez 0b7b222e49
📝 Update sponsors: remove Codacy (#13032) 2024-12-04 15:00:08 +00:00
github-actions 551c5613a9 📝 Update release notes
[skip ci]
2024-12-04 14:39:05 +00:00
Sebastián Ramírez 4881d1e225
📝 Update docs for `fastapi-cli` (#13031)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-04 15:38:39 +01:00
Sebastián Ramírez 293d7c3bf8 📝 Update release notes 2024-12-03 23:45:53 +01:00
Sebastián Ramírez bb8c2a6498 🔖 Release version 0.115.6 2024-12-03 23:40:01 +01:00
github-actions 905ec1edde 📝 Update release notes
[skip ci]
2024-12-03 22:37:38 +00:00
Abdullah Hashim 4f8157588e
🐛 Preserve traceback when exception is raised in sync dependency with `yield` (#5823)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2024-12-03 23:37:12 +01:00
github-actions 8255edfecf 📝 Update release notes
[skip ci]
2024-11-27 23:10:31 +00:00
ILoveTakanashiHoshino 53c87842b0
🌐 Add Traditional Chinese translation for `docs/zh-hant/docs/async.md` (#12990) 2024-11-27 23:10:08 +00:00
github-actions 297135244d 📝 Update release notes
[skip ci]
2024-11-27 22:14:38 +00:00
史雲昔 (Vincy SHI) 8376228a49
🌐 Add Traditional Chinese translation for `docs/zh-hant/docs/tutorial/query-param-models.md` (#12932) 2024-11-27 22:14:10 +00:00
github-actions 6c7873c77e 📝 Update release notes
[skip ci]
2024-11-27 22:12:28 +00:00
Chol_rang d75b81ce3f
🌐 Add Korean translation for `docs/ko/docs/advanced/testing-dependencies.md` (#12992) 2024-11-27 22:12:04 +00:00
github-actions 206037c292 📝 Update release notes
[skip ci]
2024-11-27 20:03:52 +00:00
LKY 478644086e
🌐 Add Korean translation for `docs/ko/docs/advanced/websockets.md` (#12991) 2024-11-27 20:03:29 +00:00
github-actions a96dddb6fd 📝 Update release notes
[skip ci]
2024-11-26 22:51:31 +00:00
André Melo 66cadd9fdb
🌐 Add Portuguese translation for `docs/pt/docs/tutorial/response-model.md` (#12933) 2024-11-26 22:51:05 +00:00
github-actions 572180348d 📝 Update release notes
[skip ci]
2024-11-26 22:35:34 +00:00
nahyunkeem 4eefb2616a
🌐 Add Korean translation for `docs/ko/docs/advanced/middlewares.md` (#12753) 2024-11-26 22:35:09 +00:00
github-actions b9be1dde4b 📝 Update release notes
[skip ci]
2024-11-26 22:09:23 +00:00
Saeye Lee 6d7b983cd4
🌐 Add Korean translation for `docs/ko/docs/advanced/openapi-webhooks.md` (#12752) 2024-11-26 22:08:57 +00:00
github-actions e67120a116 📝 Update release notes
[skip ci]
2024-11-26 22:06:54 +00:00
史雲昔 (Vincy SHI) b65ed450b3
🌐 Add Chinese translation for `docs/zh/docs/tutorial/query-param-models.md` (#12931) 2024-11-26 22:06:31 +00:00
github-actions 13383e8333 📝 Update release notes
[skip ci]
2024-11-26 21:37:16 +00:00
doas root c32cfc5c4d
🌐 Add Russian translation for `docs/ru/docs/tutorial/query-param-models.md` (#12445) 2024-11-26 21:36:50 +00:00
github-actions bffb4115a9 📝 Update release notes
[skip ci]
2024-11-22 17:10:36 +00:00
Tamir Duberstein bf4fad1fda
♻️ Update tests and internals for compatibility with Pydantic >=2.10 (#12971)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-11-22 18:09:25 +01:00
github-actions 8c29eaec25 📝 Update release notes
[skip ci]
2024-11-20 19:24:32 +00:00
timothy 835b6465d9
🌐 Add Korean translation for `docs/ko/docs/tutorial/query-param-models.md` (#12940) 2024-11-20 19:24:08 +00:00
github-actions 1f7629d3e4 📝 Update release notes
[skip ci]
2024-11-18 22:21:58 +00:00
pre-commit-ci[bot] d3a4234e82
⬆ [pre-commit.ci] pre-commit autoupdate (#12954)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.7.3 → v0.7.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.3...v0.7.4)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-11-18 22:21:33 +00:00
github-actions 4a4c8c3bb2 📝 Update release notes
[skip ci]
2024-11-18 02:26:08 +00:00
Sebastián Ramírez 1c711e7147
📝 Update includes format in docs with an automated script (#12950) 2024-11-18 03:25:44 +01:00
github-actions a0c3282af0 📝 Update release notes
[skip ci]
2024-11-17 22:32:05 +00:00
Sebastián Ramírez 602e953158
🔥 Remove obsolete tutorial translation to Chinese for `docs/zh/docs/tutorial/sql-databases.md`, it references files that are no longer on the repo (#12949) 2024-11-17 22:31:41 +00:00
github-actions 1cfea408c0 📝 Update release notes
[skip ci]
2024-11-12 19:58:49 +00:00
Alissa 1f27f41499
📝 Update includes for `docs/de/docs/advanced/using-request-directly.md` (#12685)
Co-authored-by: alissa-debruijn <alissa.debruijn@justeattakeaway.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-11-12 20:57:07 +01:00
github-actions 75aa13d007 📝 Update release notes
[skip ci]
2024-11-12 19:56:38 +00:00
Alissa b81c635a11
📝 Update includes for `docs/de/docs/how-to/conditional-openapi.md` (#12689)
Co-authored-by: alissa-debruijn <alissa.debruijn@justeattakeaway.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-11-12 20:56:10 +01:00
Sebastián Ramírez f057f4a067 🔖 Release version 0.115.5 2024-11-12 17:14:23 +01:00
github-actions c6f021ecc2 📝 Update release notes
[skip ci]
2024-11-12 16:12:19 +00:00
Sebastián Ramírez 91a929319c
♻️ Update internal checks to support Pydantic 2.10 (#12914) 2024-11-12 17:10:42 +01:00
github-actions f716490823 📝 Update release notes
[skip ci]
2024-11-12 16:09:58 +00:00
Gaurav Sheni c1781066be
📝 Update includes for `docs/en/docs/tutorial/body.md` (#12757)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-11-12 17:09:34 +01:00
github-actions 88cc900c83 📝 Update release notes
[skip ci]
2024-11-11 18:30:19 +00:00
pre-commit-ci[bot] 20809a175a
⬆ [pre-commit.ci] pre-commit autoupdate (#12907) 2024-11-11 18:29:56 +00:00
github-actions 5a48c37056 📝 Update release notes
[skip ci]
2024-11-10 17:41:44 +00:00
AyushSinghal1794 13892a39cd
📝 Update includes in `docs/en/docs/advanced/testing-dependencies.md` (#12647)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-11-10 17:40:22 +00:00
github-actions 9467000ad2 📝 Update release notes
[skip ci]
2024-11-10 17:39:14 +00:00
Nimitha J 694f6ccf0d
📝 Update includes for `docs/en/docs/tutorial/metadata.md` (#12773)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-11-10 17:38:49 +00:00
github-actions f93a29542c 📝 Update release notes
[skip ci]
2024-11-10 17:37:08 +00:00
xuvjso 9aaeb8b057
📝 Update `docs/en/docs/tutorial/dependencies/dependencies-with-yield.md` (#12045)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-11-10 17:36:46 +00:00
github-actions b32f612162 📝 Update release notes
[skip ci]
2024-11-10 17:28:13 +00:00
VISHNU V S 3829bdc4a5
📝 Update includes for `docs/en/docs/tutorial/dependencies/global-dependencies.md` (#12653)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-11-10 17:27:25 +00:00
github-actions 725fd16334 📝 Update release notes
[skip ci]
2024-11-10 17:26:22 +00:00
davioc be516b0d2c
📝 Update includes for `docs/en/docs/tutorial/body-updates.md` (#12712)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-11-10 17:26:01 +00:00
github-actions bfeecfc8c1 📝 Update release notes
[skip ci]
2024-11-10 17:23:59 +00:00
David Caro bfaf4c303f
📝 Remove mention of Celery in the project generators (#12742)
Signed-off-by: David Caro <me@dcaro.es>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-11-10 17:23:38 +00:00
github-actions cb53c5b918 📝 Update release notes
[skip ci]
2024-11-10 17:19:41 +00:00
Zhaohan Dong 8f5ec897f7
📝 Update includes in `docs/en/docs/tutorial/header-param-models.md` (#12814)
Signed-off-by: Zhaohan Dong <65422392+zhaohan-dong@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-11-10 17:19:19 +00:00
github-actions 6cd050ceb6 📝 Update release notes
[skip ci]
2024-11-10 17:12:44 +00:00
Sebastián Ramírez 8767a31c80
📝 Update `contributing.md` docs, include note to not translate this page (#12841) 2024-11-10 17:11:56 +00:00
github-actions 290e1060ca 📝 Update release notes
[skip ci]
2024-11-10 17:11:35 +00:00
VISHNU V S 9fa2474be0
📝 Update includes in `docs/en/docs/tutorial/request-forms.md` (#12648)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-11-10 17:10:49 +00:00
github-actions 9e441510ba 📝 Update release notes
[skip ci]
2024-11-10 17:09:31 +00:00
VISHNU V S 821b32f8b3
📝 Update includes in `docs/en/docs/tutorial/request-form-models.md` (#12649)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-11-10 17:09:09 +00:00
github-actions 1d9d189b85 📝 Update release notes
[skip ci]
2024-11-10 17:03:36 +00:00
Okeke Chukwuemeka Christian 1fc9a9ad3a
📝 Update includes in `docs/en/docs/tutorial/security/oauth2-jwt.md` (#12650)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-11-10 17:02:51 +00:00
github-actions 65f512052c 📝 Update release notes
[skip ci]
2024-11-10 16:59:09 +00:00
Max Patalas ba734c2312
📝 Update includes in `docs/vi/docs/tutorial/first-steps.md` (#12754)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-11-10 16:58:43 +00:00
github-actions 37a557a0a3 📝 Update release notes
[skip ci]
2024-11-10 16:56:41 +00:00
Nimitha J be67605728
📝 Update includes for `docs/pt/docs/advanced/wsgi.md` (#12769)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-11-10 16:56:13 +00:00
github-actions 2d524cca14 📝 Update release notes
[skip ci]
2024-11-10 16:45:50 +00:00
Baldeep Singh Handa b2236d080a
📝 Update includes for `docs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md` (#12815)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-11-10 16:45:28 +00:00
github-actions 370f4f9980 📝 Update release notes
[skip ci]
2024-11-10 01:25:37 +00:00
Baldeep Singh Handa a01f9f298e
📝 Update includes for `docs/en/docs/tutorial/dependencies/classes-as-dependencies.md` (#12813) 2024-11-10 01:11:07 +00:00
github-actions df6d1de3e6 📝 Update release notes
[skip ci]
2024-11-09 20:14:12 +00:00
Sebastián Ramírez 98182d02ce
🔨 Update docs preview script to show previous version and English version (#12856) 2024-11-09 20:13:48 +00:00
github-actions 5d03558363 📝 Update release notes
[skip ci]
2024-11-09 17:07:31 +00:00
Alejandra 40912999d1
✏️ Fix error in `docs/en/docs/tutorial/middleware.md` (#12819) 2024-11-09 17:07:05 +00:00
github-actions 5df1415fee 📝 Update release notes
[skip ci]
2024-11-09 17:04:00 +00:00
Okeke Chukwuemeka Christian f26a1b6385
📝 Update includes for `docs/en/docs/tutorial/security/get-current-user.md` (#12645) 2024-11-09 17:03:01 +00:00
github-actions f5b8f39ed7 📝 Update release notes
[skip ci]
2024-11-09 17:01:51 +00:00
Okeke Chukwuemeka Christian 6e7e6f6c55
📝 Update includes for `docs/en/docs/tutorial/security/first-steps.md` (#12643) 2024-11-09 16:59:54 +00:00
github-actions a81662b3c1 📝 Update release notes
[skip ci]
2024-11-09 16:56:02 +00:00
Zhaohan Dong aaab24205f
📝 Update includes in `docs/de/docs/advanced/additional-responses.md` (#12821) 2024-11-09 16:53:31 +00:00
github-actions 5d1cb40c5e 📝 Update release notes
[skip ci]
2024-11-09 16:52:39 +00:00
AyushSinghal1794 ac4956d3a3
📝 Update includes in `docs/en/docs/advanced/generate-clients.md` (#12642) 2024-11-09 16:52:15 +00:00
github-actions d9119528ea 📝 Update release notes
[skip ci]
2024-11-09 16:41:55 +00:00
Sebastián Ramírez 7fb9c5922d
📝 Fix admonition double quotes with new syntax (#12835)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-11-09 16:39:20 +00:00
github-actions d08c4cffab 📝 Update release notes
[skip ci]
2024-11-09 16:34:56 +00:00
Zhaohan Dong e812f87276
📝 Update includes in `docs/zh/docs/advanced/additional-responses.md` (#12828) 2024-11-09 16:29:26 +00:00
github-actions e5d00910d6 📝 Update release notes
[skip ci]
2024-11-09 16:28:06 +00:00
Zhaohan Dong ac9f4517f0
📝 Update includes in `docs/en/docs/tutorial/path-params-numeric-validations.md` (#12825) 2024-11-09 16:25:01 +00:00
github-actions 5e21dddb93 📝 Update release notes
[skip ci]
2024-11-09 16:21:37 +00:00
Hamid Rasti 52e8ea4c97
📝 Update includes for `docs/en/docs/advanced/testing-websockets.md` (#12761) 2024-11-09 16:19:46 +00:00
github-actions 18ca10cee4 📝 Update release notes
[skip ci]
2024-11-09 16:19:17 +00:00
Hamid Rasti 2d45b54f10
📝 Update includes for `docs/en/docs/advanced/using-request-directly.md` (#12760) 2024-11-09 16:18:55 +00:00
github-actions 8a560758f8 📝 Update release notes
[skip ci]
2024-11-09 16:18:19 +00:00
Hamid Rasti a86d2bbf4f
📝 Update includes for `docs/advanced/wsgi.md` (#12758) 2024-11-09 16:17:10 +00:00
github-actions 5a7bd20316 📝 Update release notes
[skip ci]
2024-11-09 16:16:22 +00:00
paintdog 5eec59fa4d
📝 Update includes in `docs/de/docs/tutorial/middleware.md` (#12729) 2024-11-09 16:15:51 +00:00
github-actions aac7bbb51e 📝 Update release notes
[skip ci]
2024-11-09 16:00:40 +00:00
Sebastián Ramírez 5c080d81ae
📝 Update includes for `docs/en/docs/tutorial/schema-extra-example.md` (#12822) 2024-11-09 16:00:17 +00:00
github-actions 636171ce31 📝 Update release notes
[skip ci]
2024-11-09 15:49:07 +00:00
Fred 9a8a1adad3
📝 Update includes in `docs/fr/docs/advanced/additional-responses.md` (#12634) 2024-11-09 15:48:46 +00:00
github-actions 712c57393c 📝 Update release notes
[skip ci]
2024-11-09 15:43:28 +00:00
Quentin Takeda 2cfd018446
📝 Update includes in `docs/fr/docs/advanced/path-operation-advanced-configuration.md` (#12633) 2024-11-09 15:43:03 +00:00
github-actions 2e35557254 📝 Update release notes
[skip ci]
2024-11-09 15:39:04 +00:00
Quentin Takeda 5cf323d93c
📝 Update includes in `docs/fr/docs/advanced/response-directly.md` (#12632) 2024-11-09 15:38:03 +00:00
github-actions 911d24bede 📝 Update release notes
[skip ci]
2024-11-09 15:33:00 +00:00
VISHNU V S 438343c376
📝 Update includes for `docs/en/docs/tutorial/header-params.md` (#12640) 2024-11-09 15:32:39 +00:00
github-actions 182cc4439e 📝 Update release notes
[skip ci]
2024-11-09 15:30:31 +00:00
VISHNU V S 35506c1f59
📝 Update includes in `docs/en/docs/tutorial/cookie-param-models.md` (#12639) 2024-11-09 15:29:53 +00:00
github-actions 0c449748ff 📝 Update release notes
[skip ci]
2024-11-09 15:29:42 +00:00
VISHNU V S 480ba19e9f
📝 Update includes for `docs/en/docs/tutorial/extra-models.md` (#12638) 2024-11-09 15:28:48 +00:00
github-actions 825419ecc4 📝 Update release notes
[skip ci]
2024-11-09 15:27:18 +00:00
VISHNU V S 85e0a95bde
📝 Update includes for `docs/en/docs/tutorial/cors.md` (#12637) 2024-11-09 15:26:44 +00:00
github-actions 48c66e30db 📝 Update release notes
[skip ci]
2024-11-09 15:21:54 +00:00
Baldeep Singh Handa 747534334a
📝 Update includes for `docs/en/docs/tutorial/dependencies/sub-dependencies.md` (#12810) 2024-11-09 15:21:30 +00:00
github-actions 76b13045fe 📝 Update release notes
[skip ci]
2024-11-09 15:10:34 +00:00
Zhaohan Dong 069e9bdea8
📝 Update includes in `docs/en/docs/tutorial/body-nested-models.md` (#12812) 2024-11-09 15:10:11 +00:00
github-actions 4dcdb20151 📝 Update release notes
[skip ci]
2024-11-09 14:54:50 +00:00
Alex Wendland f6819ba5d2
📝 Update includes in `docs/en/docs/tutorial/path-operation-configuration.md` (#12809) 2024-11-09 14:54:23 +00:00
github-actions e474d042d3 📝 Update release notes
[skip ci]
2024-11-09 14:50:19 +00:00
Zhaohan Dong 170826c911
📝 Update includes in `docs/en/docs/tutorial/request-files.md` (#12818) 2024-11-09 14:49:21 +00:00
github-actions 9628d38d24 📝 Update release notes
[skip ci]
2024-11-09 14:47:48 +00:00
Baldeep Singh Handa f6ba3a3c46
📝 Update includes for `docs/en/docs/tutorial/query-param-models.md` (#12817) 2024-11-09 14:47:24 +00:00
github-actions e6b48c6451 📝 Update release notes
[skip ci]
2024-11-09 14:19:51 +00:00
Alex Wendland 6f671b8b5a
📝 Update includes in `docs/en/docs/tutorial/path-params.md` (#12811) 2024-11-09 14:19:27 +00:00
github-actions 23cb1f8334 📝 Update release notes
[skip ci]
2024-11-09 14:14:59 +00:00
Quentin Takeda abd6ad2187
📝 Update includes in `docs/en/docs/tutorial/response-model.md` (#12621) 2024-11-09 14:13:47 +00:00
github-actions f2b100900a 📝 Update release notes
[skip ci]
2024-11-09 13:25:30 +00:00
VISHNU V S ffcb635c2a
📝 Update includes in `docs/en/docs/advanced/websockets.md` (#12606) 2024-11-09 13:25:07 +00:00
github-actions 64204dc2b1 📝 Update release notes
[skip ci]
2024-11-09 12:35:47 +00:00
Baldeep Singh Handa 5d62d85095
📝 Updates include for `docs/en/docs/tutorial/cookie-params.md` (#12808) 2024-11-09 12:32:45 +00:00
github-actions 3f2b4339aa 📝 Update release notes
[skip ci]
2024-11-09 12:27:28 +00:00
github-actions 3c914aa610 📝 Update release notes
[skip ci]
2024-11-09 12:25:28 +00:00
Alex Wendland f0a8f00b41
📝 Update includes in `docs/en/docs/tutorial/middleware.md` (#12807) 2024-11-09 12:24:09 +00:00
github-actions e364f941be 📝 Update release notes
[skip ci]
2024-11-09 12:23:03 +00:00
Zhaohan Dong 334d8326d0
📝 Update includes in `docs/en/docs/advanced/sub-applications.md` (#12806) 2024-11-09 12:21:25 +00:00
github-actions 589f3c0e59 📝 Update release notes
[skip ci]
2024-11-09 12:21:07 +00:00
Chol_rang 2abde61372
🌐 Add Korean translation for `docs/ko/docs/advanced/testing-websockets.md` (#12739) 2024-11-09 12:18:47 +00:00
史云昔 (Vincy SHI) 8b183f18f7
🌐 Add Traditional Chinese translation for `docs/zh-hant/docs/environment-variables.md` (#12785) 2024-11-09 12:17:55 +00:00
github-actions b458d0acb5 📝 Update release notes
[skip ci]
2024-11-09 12:17:39 +00:00
史云昔 (Vincy SHI) 58eb4e4fc5
🌐 Add Chinese translation for `docs/zh/docs/environment-variables.md` (#12784) 2024-11-09 12:17:15 +00:00
github-actions 35c37be540 📝 Update release notes
[skip ci]
2024-11-09 12:15:34 +00:00
Zhaohan Dong 58975aa3ed
📝 Update includes in `docs/en/docs/advanced/response-headers.md` (#12805) 2024-11-09 12:14:09 +00:00
github-actions 62b318e585 📝 Update release notes
[skip ci]
2024-11-09 12:12:02 +00:00
Quentin Takeda f55f93c181
📝 Update includes in `docs/fr/docs/tutorial/first-steps.md` (#12594)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-11-09 12:10:11 +00:00
github-actions 75cde1fb5c 📝 Update release notes
[skip ci]
2024-11-09 12:06:57 +00:00
Zhaohan Dong 854cddf1a8
📝 Update includes in `docs/en/docs/advanced/response-cookies.md` (#12804) 2024-11-09 12:06:35 +00:00
github-actions f91d193d63 📝 Update release notes
[skip ci]
2024-11-09 11:58:33 +00:00
Zhaohan Dong b5036db18c
📝 Update includes in `docs/en/docs/advanced/path-operation-advanced-configuration.md` (#12802) 2024-11-09 11:58:07 +00:00
github-actions 8fb3348889 📝 Update release notes
[skip ci]
2024-11-09 11:54:43 +00:00
Baldeep Singh Handa 22eafff2d8
📝 Update includes for `docs/en/docs/advanced/response-directly.md` (#12803) 2024-11-09 11:54:19 +00:00
github-actions 835123ee28 📝 Update release notes
[skip ci]
2024-11-09 11:50:20 +00:00
Zhaohan Dong 5e0722276a
📝 Update includes in `docs/zh/docs/tutorial/background-tasks.md` (#12798) 2024-11-09 11:49:55 +00:00
github-actions a36454a7e6 📝 Update release notes
[skip ci]
2024-11-09 11:34:42 +00:00
Alissa c88e82d6ec
📝 Update includes for `docs/de/docs/tutorial/body-multiple-params.md` (#12699) 2024-11-09 11:32:51 +00:00
github-actions 6b965b576e 📝 Update release notes
[skip ci]
2024-11-09 11:31:19 +00:00
Alex Wendland 34ed88394c
📝 Update includes in `docs/em/docs/tutorial/body-updates.md` (#12799) 2024-11-09 11:27:35 +00:00
github-actions b2ec345e67 📝 Update release notes
[skip ci]
2024-11-09 11:25:26 +00:00
Baldeep Singh Handa 7517aa9f8f
📝 Update includes `docs/en/docs/advanced/response-change-status-code.md` (#12801) 2024-11-09 11:23:58 +00:00
github-actions c0f56ce0b2 📝 Update release notes
[skip ci]
2024-11-09 11:23:32 +00:00
Baldeep Singh Handa 2d4e9d46c0
📝 Update includes `docs/en/docs/advanced/openapi-callbacks.md` (#12800) 2024-11-09 11:23:09 +00:00
github-actions 38141dbc9f 📝 Update release notes
[skip ci]
2024-11-09 11:12:50 +00:00
Quentin Takeda 150f8225b2
📝 Update includes in `docs/fr/docs/tutorial/body-multiple-params.md` (#12598) 2024-11-09 11:10:17 +00:00
github-actions c1110d529e 📝 Update release notes
[skip ci]
2024-11-09 11:08:32 +00:00
Tashanam Shahbaz 83d7f11405
📝 Update includes in `docs/en/docs/tutorial/body-multiple-params.md` (#12593) 2024-11-09 11:08:12 +00:00
github-actions 6d066c0d62 📝 Update release notes
[skip ci]
2024-11-09 10:56:01 +00:00
Félix 5b2bd906d7
📝 Update includes in `docs/pt/docs/tutorial/background-tasks.md` (#12736) 2024-11-09 10:55:35 +00:00
github-actions 4733cc7486 📝 Update release notes
[skip ci]
2024-11-09 10:44:54 +00:00
Baldeep Singh Handa 1cfd9a70ac
📝 Update includes for `docs/en/docs/advanced/custom-response.md` (#12797) 2024-11-09 10:44:28 +00:00
github-actions 92a5f68e4d 📝 Update release notes
[skip ci]
2024-11-09 10:33:21 +00:00
Rafael de Oliveira Marques 51fe0e437b
📝 Update includes for `docs/pt/docs/python-types.md` (#12671) 2024-11-09 10:32:53 +00:00
github-actions ce97de97d9 📝 Update release notes
[skip ci]
2024-11-09 10:16:07 +00:00
Alissa 890a61fb67
📝 Update includes for `docs/de/docs/python-types.md` (#12660) 2024-11-09 10:15:47 +00:00
github-actions 546bb50e09 📝 Update release notes
[skip ci]
2024-11-09 10:12:55 +00:00
Alissa af280dbde9
📝 Update includes for `docs/de/docs/advanced/dataclasses.md` (#12658) 2024-11-09 10:12:35 +00:00
github-actions ee260368d0 📝 Update release notes
[skip ci]
2024-11-09 10:08:49 +00:00
Quentin Takeda 1e9ea61cbd
📝 Update includes in `docs/fr/docs/tutorial/path-params.md` (#12592) 2024-11-09 10:08:25 +00:00
github-actions 5618035203 📝 Update release notes
[skip ci]
2024-11-09 10:02:55 +00:00
Alissa 855b4f66f5
📝 Update includes for `docs/de/docs/how-to/configure-swagger-ui.md` (#12690) 2024-11-09 10:02:30 +00:00
github-actions 858912e6e4 📝 Update release notes
[skip ci]
2024-11-08 22:06:00 +00:00
dependabot[bot] 8cd47a3551
⬆ Bump tiangolo/latest-changes from 0.3.1 to 0.3.2 (#12794)
Bumps [tiangolo/latest-changes](https://github.com/tiangolo/latest-changes) from 0.3.1 to 0.3.2.
- [Release notes](https://github.com/tiangolo/latest-changes/releases)
- [Commits](https://github.com/tiangolo/latest-changes/compare/0.3.1...0.3.2)

---
updated-dependencies:
- dependency-name: tiangolo/latest-changes
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-08 22:05:33 +00:00
github-actions b0fe5ebbf0 📝 Update release notes 2024-11-08 19:42:52 +00:00
LKY 075f41bad9
🌐 Add Korean translation for `ko/docs/advanced/response-headers.md` (#12740) 2024-11-08 19:42:29 +00:00
github-actions 4f430f49ac 📝 Update release notes 2024-11-08 19:23:51 +00:00
史云昔 (Vincy SHI) 45d9fabbdd
🌐 Add Chinese translation for `docs/zh/docs/virtual-environments.md` (#12790) 2024-11-08 19:23:26 +00:00
github-actions 2809c08a70 📝 Update release notes 2024-11-07 21:05:45 +00:00
Hyunjun KIM d28bae06e4
🌐 Add Korean translation for `/docs/ko/docs/environment-variables.md` (#12526) 2024-11-07 20:57:27 +00:00
github-actions 647a0dcad3 📝 Update release notes 2024-11-07 20:52:31 +00:00
github-actions 3ff6cfd544 📝 Update release notes 2024-11-07 20:48:35 +00:00
Saeye Lee 745c073a6b
🌐 Add Korean translation for `docs/ko/docs/history-design-future.md` (#12646) 2024-11-07 20:46:14 +00:00
github-actions 1b8030945f 📝 Update release notes 2024-11-07 20:45:49 +00:00
kim-sangah 321053bdef
🌐 Add Korean translation for `docs/ko/docs/advanced/advanced-dependencies.md` (#12675) 2024-11-07 20:43:46 +00:00
github-actions 4565466f34 📝 Update release notes 2024-11-07 20:43:27 +00:00
sptcnl 2fcae5f108
🌐 Add Korean translation for `docs/ko/docs/how-to/conditional-openapi.md` (#12731) 2024-11-07 20:41:38 +00:00
LKY c5ff950dfc
🌐 Add Korean translation for `docs/ko/docs/advanced/using_request_directly.md` (#12738) 2024-11-07 20:40:19 +00:00
github-actions b3d3f0e723 📝 Update release notes 2024-11-07 20:39:11 +00:00
github-actions 3a2ec11e80 📝 Update release notes 2024-11-07 20:38:47 +00:00
namjimin_43 569c54cb9a
🌐 Add Korean translation for `docs/ko/docs/advanced/testing-events.md` (#12741) 2024-11-07 20:38:31 +00:00
kim-sangah 23c3522467
🌐 Add Korean translation for `docs/ko/docs/security/index.md` (#12743) 2024-11-07 20:38:25 +00:00
github-actions f2c7b87721 📝 Update release notes 2024-11-07 20:32:59 +00:00
dependabot[bot] 731c85a876
⬆ Bump pypa/gh-action-pypi-publish from 1.12.0 to 1.12.2 (#12788)
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.12.0 to 1.12.2.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.12.0...v1.12.2)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-07 20:32:35 +00:00
github-actions 0c7296b19e 📝 Update release notes 2024-11-06 18:24:11 +00:00
João Pedro Pereira Holanda d0e0b27f73
🌐 Add Portuguese translation for `docs/pt/docs/advanced/path-operation-advanced-configuration.md` (#12762) 2024-11-06 18:21:50 +00:00
github-actions 845a2ecd39 📝 Update release notes 2024-11-06 18:17:40 +00:00
github-actions 45579ad78c 📝 Update release notes 2024-11-06 18:15:59 +00:00
dependabot[bot] c8bcb633cc
⬆ Bump pypa/gh-action-pypi-publish from 1.11.0 to 1.12.0 (#12781)
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.11.0...v1.12.0)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-06 18:15:30 +00:00
github-actions 4d3e1cd22a 📝 Update release notes 2024-11-06 18:15:17 +00:00
dependabot[bot] 7eda7e28a6
⬆ Bump cloudflare/wrangler-action from 3.11 to 3.12 (#12777)
Bumps [cloudflare/wrangler-action](https://github.com/cloudflare/wrangler-action) from 3.11 to 3.12.
- [Release notes](https://github.com/cloudflare/wrangler-action/releases)
- [Changelog](https://github.com/cloudflare/wrangler-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/cloudflare/wrangler-action/compare/v3.11...v3.12)

---
updated-dependencies:
- dependency-name: cloudflare/wrangler-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-06 18:15:12 +00:00
pre-commit-ci[bot] 3ff4da5387
⬆ [pre-commit.ci] pre-commit autoupdate (#12766)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.7.1 → v0.7.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.1...v0.7.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-11-06 18:14:55 +00:00
github-actions d4ab06a2b6 📝 Update release notes 2024-11-01 11:25:57 +00:00
github-actions 3739999b76 📝 Update release notes 2024-11-01 11:21:54 +00:00
github-actions eba967c65a 📝 Update release notes 2024-11-01 11:20:24 +00:00
dependabot[bot] 1f15034638
⬆ Bump pypa/gh-action-pypi-publish from 1.10.3 to 1.11.0 (#12721)
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.10.3 to 1.11.0.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.10.3...v1.11.0)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-01 11:19:50 +00:00
github-actions 6670e8af68 📝 Update release notes 2024-11-01 11:18:59 +00:00
dependabot[bot] fd40d00748
⬆ Update pre-commit requirement from <4.0.0,>=2.17.0 to >=2.17.0,<5.0.0 (#12749)
Updates the requirements on [pre-commit](https://github.com/pre-commit/pre-commit) to permit the latest version.
- [Release notes](https://github.com/pre-commit/pre-commit/releases)
- [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pre-commit/pre-commit/compare/v2.17.0...v4.0.1)

---
updated-dependencies:
- dependency-name: pre-commit
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-01 11:17:36 +00:00
github-actions 70f50442d9 📝 Update release notes 2024-11-01 11:17:26 +00:00
dependabot[bot] 54fa592dac
⬆ Bump typer from 0.12.3 to 0.12.5 (#12748)
Bumps [typer](https://github.com/fastapi/typer) from 0.12.3 to 0.12.5.
- [Release notes](https://github.com/fastapi/typer/releases)
- [Changelog](https://github.com/fastapi/typer/blob/master/docs/release-notes.md)
- [Commits](https://github.com/fastapi/typer/compare/0.12.3...0.12.5)

---
updated-dependencies:
- dependency-name: typer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-01 11:17:22 +00:00
dependabot[bot] fd98edcdd5
⬆ Update flask requirement from <3.0.0,>=1.1.2 to >=1.1.2,<4.0.0 (#12747)
Updates the requirements on [flask](https://github.com/pallets/flask) to permit the latest version.
- [Release notes](https://github.com/pallets/flask/releases)
- [Changelog](https://github.com/pallets/flask/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/flask/compare/1.1.2...3.0.3)

---
updated-dependencies:
- dependency-name: flask
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-01 11:17:12 +00:00
github-actions c4a2201a6b 📝 Update release notes 2024-11-01 11:16:58 +00:00
dependabot[bot] 4695b8d07f
⬆ Bump pillow from 10.4.0 to 11.0.0 (#12746)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.4.0 to 11.0.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.4.0...11.0.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-01 11:16:55 +00:00
dependabot[bot] 808196f2a3
⬆ Update pytest requirement from <8.0.0,>=7.1.3 to >=7.1.3,<9.0.0 (#12745)
Updates the requirements on [pytest](https://github.com/pytest-dev/pytest) to permit the latest version.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.1.3...8.3.3)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-01 11:16:34 +00:00
github-actions a18ab76322 📝 Update release notes 2024-10-31 18:56:59 +00:00
Chol_rang 14b087cd36
🌐 Add Korean translation for `docs/ko/docs/advanced/wsgi.md` (#12659) 2024-10-31 18:56:37 +00:00
github-actions 42c002e4ec 📝 Update release notes 2024-10-31 12:21:22 +00:00
Fernando Alzueta b7102a2675
🌐 Add Portuguese translation for `docs/pt/docs/advanced/websockets.md` (#12703) 2024-10-31 12:20:59 +00:00
github-actions 868720a798 📝 Update release notes 2024-10-31 12:18:10 +00:00
Lídia bb7921be25
🌐 Add Portuguese translation for `docs/pt/docs/tutorial/security/simple-oauth2.md` (#12520) 2024-10-31 12:17:45 +00:00
github-actions 086e3ca54b 📝 Update release notes 2024-10-31 09:13:53 +00:00
Sebastián Ramírez 05c8ed3312
🔧 Update sponsors: add Render (#12733) 2024-10-31 09:13:26 +00:00
github-actions bf83889844 📝 Update release notes 2024-10-30 20:02:57 +00:00
github-actions 2f7a860ee0 📝 Update release notes 2024-10-30 20:02:34 +00:00
namjimin_43 e93b27452b
🌐 Add Korean translation for `docs/ko/docs/advanced/response-directly.md` (#12674) 2024-10-30 20:00:57 +00:00
Luis Rodrigues 3184b5c701
🌐 Add Portuguese translation for `docs/pt/docs/advanced/middleware.md` (#12704) 2024-10-30 20:00:22 +00:00
github-actions 067ec21580 📝 Update release notes 2024-10-30 19:54:20 +00:00
Fernando Alzueta 5be5ea92c0
🌐 Add Portuguese translation for `docs/pt/docs/advanced/openapi-callbacks.md` (#12705) 2024-10-30 19:53:03 +00:00
github-actions 872feaccbe 📝 Update release notes 2024-10-30 19:52:53 +00:00
Luis Rodrigues ece28bc8db
🌐 Add Portuguese translation for `docs/pt/docs/tutorial/request-files.md` (#12706) 2024-10-30 19:52:32 +00:00
github-actions 8dc523b1ef 📝 Update release notes 2024-10-29 11:47:36 +00:00
João Pedro Pereira Holanda c5a9d3ac28
🌐 Add Portuguese Translation for `docs/pt/docs/advanced/custom-response.md` (#12631) 2024-10-29 11:47:10 +00:00
github-actions 25c63800f6 📝 Update release notes 2024-10-29 11:02:39 +00:00
Krishna Madhavan 268eac9e16
📝 Update includes in `docs/en/docs/advanced/security/oauth2-scopes.md` (#12572) 2024-10-29 11:02:16 +00:00
github-actions c8f5755d0a 📝 Update release notes 2024-10-29 10:39:18 +00:00
github-actions 8cae611101 📝 Update release notes 2024-10-29 10:36:58 +00:00
Lincoln Melo 6e07910cc4
🌐 Add Portuguese translation for `docs/pt/docs/tutorial/metadata.md` (#12538) 2024-10-29 10:36:14 +00:00
LKY 46a085ebe7
🌐 Add Korean translation for `docs/ko/docs/tutorial/metadata.md` (#12541) 2024-10-29 10:36:06 +00:00
github-actions 3f3637ba73 📝 Update release notes 2024-10-29 10:33:16 +00:00
kim-sangah 3f822818b2
🌐 Add Korean Translation for `docs/ko/docs/advanced/response-cookies.md` (#12546) 2024-10-29 10:32:45 +00:00
github-actions e1d724ab92 📝 Update release notes 2024-10-28 20:32:12 +00:00
pre-commit-ci[bot] 93bf4c9c2d
⬆ [pre-commit.ci] pre-commit autoupdate (#12707)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.7.0 → v0.7.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.0...v0.7.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-10-28 20:31:44 +00:00
github-actions 8669a92dac 📝 Update release notes 2024-10-28 11:31:18 +00:00
김소연 5c33269419
🌐 Add Korean translation for `docs/ko/docs/fastapi-cli.md` (#12515) 2024-10-28 11:29:32 +00:00
github-actions f2b633ebee 📝 Update release notes 2024-10-28 11:24:36 +00:00
Rabin Lama Dong ec9976f7a6
📝 Update includes for `docs/en/docs/how-to/conditional-openapi.md` (#12624) 2024-10-28 11:21:54 +00:00
github-actions 38bb9f934b 📝 Update release notes 2024-10-28 11:19:26 +00:00
Abdul Hadi Bharara cb2c56008d
📝 Update includes in `docs/en/docs/tutorial/dependencies/index.md` (#12615) 2024-10-28 11:18:17 +00:00
github-actions efb99a2bb4 📝 Update release notes 2024-10-28 11:13:38 +00:00
Quentin Takeda 26702a6525
📝 Update includes in `docs/en/docs/tutorial/response-status-code.md` (#12620) 2024-10-28 11:13:18 +00:00
github-actions f6a6366e42 📝 Update release notes 2024-10-28 10:50:28 +00:00
github-actions 70869200bd 📝 Update release notes 2024-10-28 10:42:48 +00:00
Rabin Lama Dong 86d8e729c8
📝 Update includes for `docs/en/docs/how-to/custom-docs-ui-assets.md` (#12623) 2024-10-28 10:42:34 +00:00
github-actions 794d4b3a9b 📝 Update release notes 2024-10-28 10:39:28 +00:00
Mohamed Salman 8a4652d8b4
📝 Update includes in `docs/en/docs/advanced/openapi-webhooks.md` (#12605) 2024-10-28 10:38:23 +00:00
github-actions 3ea198f23c 📝 Update release notes 2024-10-28 10:37:16 +00:00
Mohamed Salman 2bd2ccbd19
📝 Update includes in `docs/en/docs/advanced/events.md` (#12604) 2024-10-28 10:36:22 +00:00
github-actions bcd55f8c09 📝 Update release notes 2024-10-28 10:35:33 +00:00
Mohamed Salman 76126c45e7
📝 Update includes in `docs/en/docs/advanced/dataclasses.md` (#12603) 2024-10-28 10:35:06 +00:00
github-actions fe3922311f 📝 Update release notes 2024-10-28 10:34:51 +00:00
Antony Arévalo 96c5566a5b
📝 Update includes in `docs/es/docs/tutorial/cookie-params.md` (#12602) 2024-10-28 10:33:43 +00:00
Quentin Takeda 218d3c3524
📝 Update includes in `docs/fr/docs/tutorial/path-params-numeric-validations.md` (#12601) 2024-10-28 10:32:37 +00:00
github-actions 0279f6dd5f 📝 Update release notes 2024-10-28 10:30:19 +00:00
Quentin Takeda 269a224544
📝 Update includes in `docs/fr/docs/tutorial/background-tasks.md` (#12600) 2024-10-28 10:29:51 +00:00
github-actions adf89d1d9f 📝 Update release notes 2024-10-27 23:31:38 +00:00
Tony Ly 96a6d469e9
📝 Update includes in `docs/en/docs/tutorial/encoder.md` (#12597) 2024-10-27 23:31:16 +00:00
github-actions dbc3008f5a 📝 Update release notes 2024-10-27 22:54:10 +00:00
Philip Okiokio 95ebac1a89
📝 Update includes in `docs/en/docs/how-to/custom-docs-ui-assets.md` (#12557) 2024-10-27 22:53:46 +00:00
github-actions 04194dc191 📝 Update release notes 2024-10-27 22:39:58 +00:00
Alejandra eea2d8e67c
🎨 Adjust spacing (#12635) 2024-10-27 22:39:38 +00:00
github-actions 5db8b491db 📝 Update release notes 2024-10-27 22:12:53 +00:00
Philip Okiokio 78f295609f
📝 Update includes in `docs/en/docs/how-to/custom-request-and-route.md` (#12560) 2024-10-27 22:12:32 +00:00
github-actions d92fc89eb8 📝 Update release notes 2024-10-27 22:02:27 +00:00
namjimin_43 2c27cae742
🌐 Add Korean Translation for `docs/ko/docs/advanced/response-change-status-code.md` (#12547) 2024-10-27 22:01:39 +00:00
Sebastián Ramírez 31887b1cc6 🔖 Release version 0.115.4 2024-10-27 21:51:55 +00:00
github-actions b270ff1e5e 📝 Update release notes 2024-10-27 21:46:51 +00:00
Sebastián Ramírez b31cbbf5f5
♻️ Update logic to import and check `python-multipart` for compatibility with newer version (#12627) 2024-10-27 21:46:26 +00:00
github-actions aee7674ed2 📝 Update release notes 2024-10-27 17:35:05 +00:00
Quentin Takeda 4e6b1acccd
📝 Update includes in `docs/fr/docs/tutorial/body.md` (#12596) 2024-10-27 17:34:41 +00:00
github-actions 9b1e5f29e6 📝 Update release notes 2024-10-27 17:31:38 +00:00
Quentin Takeda 60aba0261c
📝 Update includes in `docs/fr/docs/tutorial/debugging.md` (#12595) 2024-10-27 17:31:14 +00:00
github-actions 2a4cf1736d 📝 Update release notes 2024-10-27 17:16:01 +00:00
Quentin Takeda 453f559934
📝 Update includes in `docs/fr/docs/tutorial/query-params-str-validations.md` (#12591) 2024-10-27 17:14:38 +00:00
github-actions af269cd131 📝 Update release notes 2024-10-27 17:09:22 +00:00
Quentin Takeda 5e8f1f96eb
📝 Update includes in `docs/fr/docs/tutorial/query-params.md` (#12589) 2024-10-27 17:06:01 +00:00
github-actions 9f44a5dd36 📝 Update release notes 2024-10-27 17:02:42 +00:00
github-actions ba77d114f6 📝 Update release notes 2024-10-27 17:02:19 +00:00
github-actions cd37dfe533 📝 Update release notes 2024-10-27 17:01:22 +00:00
Nomad Monad 47b4e1a517
📝 Update includes in `docs/en/tutorial/body-fields.md` (#12588) 2024-10-27 17:01:18 +00:00
Alexander Bejarano 503ece76d6
📝 Update includes in `docs/de/docs/tutorial/response-status-code.md` (#12585) 2024-10-27 16:59:43 +00:00
Nomad Monad 5a0e13794b
📝 Update includes in `docs/en/docs/tutorial/body.md` (#12586) 2024-10-27 16:58:19 +00:00
github-actions 75af54babd 📝 Update release notes 2024-10-27 16:52:29 +00:00
github-actions 083fbc8a73 📝 Update release notes 2024-10-27 16:52:28 +00:00
Sebastian Kozłowski 3783341eb8
📝 Update includes syntax for `docs/pl/docs/tutorial/first-steps.md` (#12584) 2024-10-27 16:51:30 +00:00
Julio Anthony Leonard f0ad433e01
📝 Update includes in `docs/en/docs/advanced/behind-a-proxy.md` (#12583) 2024-10-27 16:49:49 +00:00
github-actions 5b1963db49 📝 Update release notes 2024-10-27 16:46:14 +00:00
Graziano Montanaro 5d99a42688
📝 Update includes in `docs/en/docs/advanced/middleware.md` (#12582) 2024-10-27 16:45:50 +00:00
github-actions f5a10c1c7d 📝 Update release notes 2024-10-27 16:17:51 +00:00
github-actions fe60afff0e 📝 Update release notes 2024-10-27 16:13:50 +00:00
Krishna Madhavan dc7cf0f14f
📝 Update includes in `docs/en/docs/advanced/additional-status-codes.md` (#12577) 2024-10-27 16:12:23 +00:00
Krishna Madhavan 9106cae8a8
📝 Update includes in `docs/en/docs/advanced/advanced-dependencies.md` (#12578) 2024-10-27 16:10:15 +00:00
github-actions dc22bdf5a4 📝 Update release notes 2024-10-27 16:08:49 +00:00
Krishna Madhavan 0f8d03ef85
📝 Update includes in `docs/en/docs/advanced/additional-responses.md` (#12576) 2024-10-27 16:07:07 +00:00
github-actions 55aa76faad 📝 Update release notes 2024-10-27 15:51:51 +00:00
github-actions ed45eca1a8 📝 Update release notes 2024-10-27 15:50:02 +00:00
Nomad Monad b24b4fd6a8
📝 Update includes in `docs/en/docs/tutorial/static-files.md` (#12575) 2024-10-27 15:45:40 +00:00
Krishna Madhavan dfdecfd9c9
📝 Update includes in `docs/en/docs/advanced/async-tests.md` (#12568) 2024-10-27 15:43:29 +00:00
github-actions 4b9e76bde2 📝 Update release notes 2024-10-27 15:39:25 +00:00
Julio Anthony Leonard 27e7fcefe8
📝 Update includes in `docs/de/docs/advanced/async-tests.md` (#12567) 2024-10-27 15:34:47 +00:00
github-actions 48f88edf0d 📝 Update release notes 2024-10-27 15:33:12 +00:00
github-actions 91eb00854b 📝 Update release notes 2024-10-27 15:30:02 +00:00
github-actions e00efb5569 📝 Update release notes 2024-10-27 15:29:12 +00:00
Alexandros Mioglou 909204ec54
📝 Update includes in `docs/pt/docs/advanced/behind-a-proxy.md` (#12563) 2024-10-27 15:28:18 +00:00
Nimitha J b87eb8a0e1
📝 Update includes in `docs/de/docs/advanced/security/http-basic-auth.md` (#12561) 2024-10-27 15:25:54 +00:00
ilacftemp 92bc3d7e0c
🌐 Add Portuguese translation for `docs/pt/docs/tutorial/sql-databases.md` (#12530) 2024-10-27 15:25:29 +00:00
github-actions 13f3dd2111 📝 Update release notes 2024-10-27 15:24:07 +00:00
github-actions 4f5349445d 📝 Update release notes 2024-10-27 15:24:00 +00:00
Farhan Ali Raza 4ae5fab050
📝 Update includes in `docs/en/docs/tutorial/background-tasks.md` (#12559) 2024-10-27 15:22:48 +00:00
Ismail Tlemcani 1fbbf9ca6c
📝 Update includes in `docs/fr/docs/python-types.md` (#12558) 2024-10-27 15:21:34 +00:00
github-actions a1572b52de 📝 Update release notes 2024-10-27 15:19:49 +00:00
Philip Okiokio 50c6f80117
📝 Update includes in `docs/en/docs/how-to/graphql.md` (#12564) 2024-10-27 15:18:53 +00:00
github-actions aec5219fe0 📝 Update release notes 2024-10-27 15:15:30 +00:00
Philip Okiokio 092da9a8a3
📝 Update includes in `docs/en/docs/how-to/extending-openapi.md` (#12562) 2024-10-27 15:15:05 +00:00
github-actions 128c96dc9a 📝 Update release notes 2024-10-27 15:02:00 +00:00
임선오 8d928def2e
🌐 Add Korean translation for `docs/ko/docs/benchmarks.md` (#12540) 2024-10-27 15:01:38 +00:00
github-actions 44cfb2f4f5 📝 Update release notes 2024-10-26 16:51:17 +00:00
Sebastián Ramírez 162a32cc2f
📝 Update includes for `docs/en/docs/how-to/configure-swagger-ui.md` (#12556) 2024-10-26 16:50:52 +00:00
github-actions d93e431505 📝 Update release notes 2024-10-26 16:44:15 +00:00
Sebastián Ramírez 28e97b2651
📝 Update includes for `docs/en/docs/how-to/separate-openapi-schemas.md` (#12555) 2024-10-26 17:43:54 +01:00
github-actions 6e85909311 📝 Update release notes 2024-10-26 16:01:48 +00:00
Sebastián Ramírez 68d0a0412e
📝 Update includes for `docs/en/docs/advanced/security/http-basic-auth.md` (#12553) 2024-10-26 17:01:27 +01:00
github-actions 63c3eacf43 📝 Update release notes 2024-10-26 11:51:54 +00:00
github-actions 442692fef4 📝 Update release notes 2024-10-26 11:49:36 +00:00
Sebastián Ramírez 56bc9a5eb4
📝 Update includes in `docs/en/docs/tutorial/first-steps.md` (#12552) 2024-10-26 11:48:16 +00:00
Sebastián Ramírez 71fcafd13c
📝 Update includes in `docs/en/docs/python-types.md` (#12551) 2024-10-26 11:47:53 +00:00
github-actions ea88ab6cf1 📝 Update release notes 2024-10-26 11:46:28 +00:00
Sebastián Ramírez 89f06da526
📝 Fix link in OAuth2 docs (#12550) 2024-10-26 11:45:10 +00:00
github-actions d60c52bc32 📝 Update release notes 2024-10-26 09:38:20 +00:00
dependabot[bot] fd95b4ae65
⬆ Bump cloudflare/wrangler-action from 3.9 to 3.11 (#12544)
Bumps [cloudflare/wrangler-action](https://github.com/cloudflare/wrangler-action) from 3.9 to 3.11.
- [Release notes](https://github.com/cloudflare/wrangler-action/releases)
- [Changelog](https://github.com/cloudflare/wrangler-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/cloudflare/wrangler-action/compare/v3.9...v3.11)

---
updated-dependencies:
- dependency-name: cloudflare/wrangler-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-26 10:37:59 +01:00
github-actions a498582bb4 📝 Update release notes 2024-10-24 18:54:28 +00:00
ilacftemp 55bcab6d75
🌐 Add Portuguese translation for `docs/pt/docs/how-to/separate-openapi-schemas.md` (#12518) 2024-10-24 18:52:36 +00:00
github-actions 548f938280 📝 Update release notes 2024-10-24 18:43:50 +00:00
Renne Rocha ec9b066e0b
📝 Add External Link: FastAPI do Zero (#12533) 2024-10-24 18:39:34 +00:00
github-actions cf65c423d1 📝 Update release notes 2024-10-24 18:35:26 +00:00
github-actions e2d77a9e42 📝 Update release notes 2024-10-24 18:32:39 +00:00
YungYueh ChanLee 86fe251507
🌐 Update Traditional Chinese translation for `docs/zh-hant/docs/deployment/index.md` (#12521) 2024-10-24 19:30:54 +01:00
github-actions b5021a4c84 📝 Update release notes 2024-10-24 18:29:27 +00:00
YungYueh ChanLee ff5f076011
🌐 Update Traditional Chinese translation for `docs/zh-hant/docs/deployment/cloud.md` (#12522) 2024-10-24 19:28:55 +01:00
github-actions b144221ad5 📝 Update release notes 2024-10-24 18:28:22 +00:00
YungYueh ChanLee 7b03fa7e0c
🌐 Update Traditional Chinese translation for `docs/zh-hant/docs/how-to/index.md` (#12523) 2024-10-24 19:28:16 +01:00
YungYueh ChanLee 2f2c877d51
🌐 Update Traditional Chinese translation for `docs/zh-hant/docs/tutorial/index.md` (#12524) 2024-10-24 19:28:00 +01:00
github-actions 6ede04f876 📝 Update release notes 2024-10-24 12:39:00 +00:00
Sebastián Ramírez e7533b92b3
👷 Update GitHub Action to deploy docs previews to handle missing deploy comments (#12527) 2024-10-24 12:38:34 +00:00
github-actions 593385d1c3 📝 Update release notes 2024-10-23 18:30:47 +00:00
Kevin Kirsche 8081d2302e
📝 Fix minor typos (#12516) 2024-10-23 19:30:18 +01:00
github-actions 2d43a8a2a3 📝 Update release notes 2024-10-22 20:48:21 +00:00
github-actions 21fc89976d 📝 Update release notes 2024-10-22 20:47:24 +00:00
YungYueh ChanLee 59efc69bec
🌐 Add Traditional Chinese translation for `docs/zh-hant/docs/how-to/index.md` (#12468) 2024-10-22 21:45:13 +01:00
YungYueh ChanLee 136c48bda6
🌐 Add Traditional Chinese translation for `docs/zh-hant/docs/tutorial/index.md` (#12466) 2024-10-22 21:44:51 +01:00
github-actions fb4b6b7cbe 📝 Update release notes 2024-10-22 20:42:37 +00:00
João Pedro Pereira Holanda c9337b54f0
🌐 Add Portuguese translation for `docs/pt/docs/tutorial/header-param-models.md` (#12437) 2024-10-22 21:41:28 +01:00
github-actions 69cc3161fc 📝 Update release notes 2024-10-22 20:41:15 +00:00
pre-commit-ci[bot] 13c57834a5
⬆ [pre-commit.ci] pre-commit autoupdate (#12505)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.6.9 → v0.7.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.9...v0.7.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-10-22 21:40:52 +01:00
github-actions 92df4e7903 📝 Update release notes 2024-10-22 20:28:24 +00:00
Alejandra c1f91a0403
🌐 Fix rendering issue in translations (#12509) 2024-10-22 21:28:02 +01:00
github-actions 180e72b193 📝 Update release notes 2024-10-22 17:41:57 +00:00
ilacftemp d5a0456084
🌐 Add Portuguese translation for `docs/pt/docs/how-to/extending-openapi.md` (#12470) 2024-10-22 17:40:08 +00:00
github-actions 396c0f6aab 📝 Update release notes 2024-10-22 17:36:16 +00:00
Leonardo Scarlato bbcee4db19
🌐 Add Portuguese translation for `docs/pt/docs/advanced/dataclasses.md` (#12475) 2024-10-22 18:33:53 +01:00
github-actions cb74448bd9 📝 Update release notes 2024-10-22 17:33:23 +00:00
Fernando Alzueta 94fafa5030
🌐 Add Portuguese translation for `docs/pt/docs/how-to/custom-request-and-route.md` (#12483) 2024-10-22 18:33:00 +01:00
Sebastián Ramírez c519614b45 🔖 Release version 0.115.3 2024-10-22 15:26:52 +01:00
github-actions 9c794c9c0d 📝 Update release notes 2024-10-22 14:20:24 +00:00
Marcel Hellkamp c4f8143dea
⬆️ Upgrade Starlette to `>=0.40.0,<0.42.0` (#12469)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-10-22 15:19:56 +01:00
github-actions 45822d31f2 📝 Update release notes 2024-10-20 19:20:44 +00:00
Elton Jefferson 4c1a1938bc
📝 Fix broken link in docs (#12495) 2024-10-20 20:20:23 +01:00
github-actions 5afa6d7066 📝 Update release notes 2024-10-18 12:13:10 +00:00
github-actions f0b5f8adf7 📝 Update release notes 2024-10-18 12:12:24 +00:00
YungYueh ChanLee b0761c2552
🌐 Add Traditional Chinese translation for `docs/zh-hant/docs/fastapi-cli.md` (#12444) 2024-10-18 14:12:01 +02:00
YungYueh ChanLee 53d90074e5
🌐 Add Traditional Chinese translation for `docs/zh-hant/docs/deployment/index.md` (#12439) 2024-10-18 14:10:00 +02:00
github-actions 7038bedc5d 📝 Update release notes 2024-10-18 12:05:45 +00:00
Guilherme Rameh 48849f8a11
🌐 Add Portuguese translation for `docs/pt/docs/how-to/testing-database.md` (#12472) 2024-10-18 14:04:04 +02:00
github-actions b7fb8eb656 📝 Update release notes 2024-10-18 12:03:01 +00:00
Luis Rodrigues ac3c2dd965
🌐 Add Portuguese translation for `docs/pt/docs/how-to/custom-docs-ui-assets.md` (#12473) 2024-10-18 14:02:35 +02:00
github-actions febf6b6a52 📝 Update release notes 2024-10-16 07:45:07 +00:00
leonardopaloschi 71f2be2387
🌐 Add Portuguese translation for `docs/pt/docs/advanced/response-headers.md` (#12458) 2024-10-16 09:44:45 +02:00
github-actions 50639525bf 📝 Update release notes 2024-10-15 12:34:11 +00:00
YungYueh ChanLee 80ba3fc5db
🌐 Add Traditional Chinese translation for `docs/zh-hant/docs/deployment/cloud.md` (#12440) 2024-10-15 14:33:07 +02:00
github-actions d7942aea2d 📝 Update release notes 2024-10-15 12:32:58 +00:00
Rafael de Oliveira Marques 12c188b311
🌐 Update Portuguese translation for `docs/pt/docs/python-types.md` (#12428) 2024-10-15 14:32:27 +02:00
github-actions 9b09974cfc 📝 Update release notes 2024-10-15 11:39:19 +00:00
WISDERFIN 0507458504
🌐 Add Russian translation for `docs/ru/docs/environment-variables.md` (#12436) 2024-10-15 13:38:57 +02:00
github-actions be03a7313e 📝 Update release notes 2024-10-15 10:39:19 +00:00
Alejandra 111ced53af
👷 Update issue manager workflow (#12457)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-10-15 12:38:53 +02:00
github-actions d63f0d60ba 📝 Update release notes 2024-10-15 10:03:32 +00:00
YungYueh ChanLee 4d8d092925
🌐 Add Traditional Chinese translation for `docs/zh-hant/docs/resources/index.md` (#12443) 2024-10-15 12:00:33 +02:00
github-actions 33cd8bbcc5 📝 Update release notes 2024-10-15 09:58:11 +00:00
YungYueh ChanLee 73546a68e6
🌐 Add Traditional Chinese translation for `docs/zh-hant/docs/about/index.md` (#12438) 2024-10-15 11:57:21 +02:00
github-actions c9f11c2b73 📝 Update release notes 2024-10-15 09:53:37 +00:00
Rafael de Oliveira Marques e58c185526
🌐 Add Portuguese translation for `docs/pt/docs/tutorial/query-param-models.md` (#12414) 2024-10-15 11:53:14 +02:00
github-actions 923d44de35 📝 Update release notes 2024-10-14 14:57:54 +00:00
Rafael de Oliveira Marques 7148584ac4
🌐 Remove Portuguese translation for `docs/pt/docs/deployment.md` (#12427) 2024-10-14 16:57:32 +02:00
github-actions 38f65c033f 📝 Update release notes 2024-10-14 10:52:26 +00:00
Sebastián Ramírez 5f998ee55a
🔧 Update team, include YuriiMotov 🚀 (#12453) 2024-10-14 12:51:58 +02:00
github-actions 7358ed246e 📝 Update release notes 2024-10-14 09:17:01 +00:00
Anderson Rocha d4e183da3f
🌐 Add Portuguese translation for `docs/pt/docs/tutorial/body-updates.md` (#12381) 2024-10-14 11:16:06 +02:00
github-actions 0e4dc88bd7 📝 Update release notes 2024-10-14 09:15:46 +00:00
Paulo Falcão b887d434db
🌐 Add Portuguese translation for `docs/pt/docs/advanced/response-cookies.md` (#12417) 2024-10-14 11:15:24 +02:00
github-actions 766a14ddff 📝 Update release notes 2024-10-12 13:59:03 +00:00
Sebastián Ramírez 6384f730f7
👷 Refactor label-approved, make it an internal script instead of an external GitHub Action (#12280) 2024-10-12 13:58:30 +00:00
github-actions 84ef149f83 📝 Update release notes 2024-10-12 13:49:27 +00:00
Sebastián Ramírez 495d90161b
👷 Fix smokeshow, checkout files on CI (#12434) 2024-10-12 15:47:46 +02:00
github-actions ac6c08c71f 📝 Update release notes 2024-10-12 12:28:10 +00:00
Sebastián Ramírez a30eb6f517
👷 Use uv in CI (#12281) 2024-10-12 14:27:19 +02:00
github-actions 3347f0dde5 📝 Update release notes 2024-10-12 10:29:52 +00:00
dependabot[bot] 91672fb9ed
⬆ Update httpx requirement from <0.25.0,>=0.23.0 to >=0.23.0,<0.28.0 (#11509)
Updates the requirements on [httpx](https://github.com/encode/httpx) to permit the latest version.
- [Release notes](https://github.com/encode/httpx/releases)
- [Changelog](https://github.com/encode/httpx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/encode/httpx/compare/0.23.0...0.27.0)

---
updated-dependencies:
- dependency-name: httpx
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-12 12:29:31 +02:00
Sebastián Ramírez 07684aea79 🔖 Release version 0.115.2 2024-10-12 12:00:47 +02:00
github-actions 63c428fbf9 📝 Update release notes 2024-10-12 09:59:23 +00:00
Sebastián Ramírez b77f2351d1
⬆️ Upgrade Starlette to `>=0.37.2,<0.41.0` (#12431) 2024-10-12 11:59:01 +02:00
Sebastián Ramírez 113da5b0a7 🔖 Release version 0.115.1 2024-10-12 11:51:09 +02:00
github-actions f0be768646 📝 Update release notes 2024-10-12 09:45:17 +00:00
Felix Fanghaenel e049fc4ea1
🐛 Fix openapi generation with responses kwarg (#10895)
Co-authored-by: flxdot <felix.fanghaenel@nitrex.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
Co-authored-by: Sławek Ehlert <slawomir.ehlert@gmail.com>
2024-10-12 11:44:57 +02:00
github-actions b29cf1621a 📝 Update release notes 2024-10-12 09:36:55 +00:00
José Pacheco 8ae4603d68
🐛 Remove `Required` shadowing from fastapi using Pydantic v2 (#12197)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2024-10-12 11:36:32 +02:00
github-actions 529155e72e 📝 Update release notes 2024-10-09 20:12:15 +00:00
pre-commit-ci[bot] 104dc0b8d8
⬆ [pre-commit.ci] pre-commit autoupdate (#12396)
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0)
- [github.com/astral-sh/ruff-pre-commit: v0.6.8 → v0.6.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.8...v0.6.9)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-10-09 22:11:46 +02:00
github-actions dbb4a91e12 📝 Update release notes 2024-10-09 19:45:08 +00:00
Sebastián Ramírez 7daaac2bc3
Add new tutorial for SQL databases with SQLModel (#12285) 2024-10-09 21:44:42 +02:00
github-actions 13a18f80b3 📝 Update release notes 2024-10-08 11:01:43 +00:00
Sebastián Ramírez c6dfdb8523
🔨 Add script to generate variants of files (#12405) 2024-10-08 11:01:17 +00:00
github-actions a94d61b2c0 📝 Update release notes 2024-10-08 10:55:50 +00:00
Sebastián Ramírez 40490abaa3
♻️ Update type annotations for improved `python-multipart` (#12407) 2024-10-08 12:55:26 +02:00
github-actions fcb15b4db1 📝 Update release notes 2024-10-08 08:38:00 +00:00
Sebastián Ramírez 018e303fd9
🔧 Add speakeasy-api to `sponsors_badge.yml` (#12404) 2024-10-08 08:37:32 +00:00
github-actions 6345147c24 📝 Update release notes 2024-10-07 20:25:03 +00:00
Sebastián Ramírez 95f167f048
Add docs dependency: markdown-include-variants (#12399) 2024-10-07 20:24:40 +00:00
github-actions ecc4133907 📝 Update release notes 2024-10-07 20:18:29 +00:00
Sebastián Ramírez 797cad7162
📝 Fix extra mdx-base-path paths (#12397) 2024-10-07 20:18:07 +00:00
github-actions e45b5d3589 📝 Update release notes 2024-10-07 20:11:42 +00:00
Sebastián Ramírez b45192c68a
👷 Tweak labeler to not override custom labels (#12398) 2024-10-07 20:11:20 +00:00
github-actions 31aec0967a 📝 Update release notes 2024-10-07 11:32:19 +00:00
Balthazar Rouberol e9c6408af7
📝 Add External Link: How to profile a FastAPI asynchronous request (#12389) 2024-10-07 11:31:55 +00:00
github-actions 3f8a527b50 📝 Update release notes 2024-10-07 11:23:42 +00:00
Rafael de Oliveira Marques e62960e323
🌐 Add Portuguese translation for `docs/pt/docs/tutorial/cookie-param-models.md` (#12298) 2024-10-07 13:23:18 +02:00
github-actions b36b7dfed0 📝 Update release notes 2024-10-06 20:37:15 +00:00
Sebastián Ramírez 0f7d67e85c
🔧 Remove `base_path` for `mdx_include` Markdown extension in MkDocs (#12391) 2024-10-06 22:36:54 +02:00
github-actions c67b41546c 📝 Update release notes 2024-10-06 20:14:33 +00:00
Sebastián Ramírez 1705a8c37f
👷 Update deploy-docs-notify URL (#12392) 2024-10-06 20:14:05 +00:00
github-actions ad8b3ba3ec 📝 Update release notes 2024-10-05 12:49:28 +00:00
Sebastián Ramírez 9d6ec4aa77
👷 Update Cloudflare GitHub Action (#12387) 2024-10-05 14:49:04 +02:00
github-actions ea1265b78b 📝 Update release notes 2024-10-04 11:58:03 +00:00
dependabot[bot] caa298aefe
⬆ Bump pypa/gh-action-pypi-publish from 1.10.1 to 1.10.3 (#12386)
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.10.1 to 1.10.3.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.10.1...v1.10.3)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-04 13:57:23 +02:00
github-actions 82b95dcef8 📝 Update release notes 2024-10-04 11:56:57 +00:00
dependabot[bot] 757eaacd59
⬆ Bump mkdocstrings[python] from 0.25.1 to 0.26.1 (#12371)
Bumps [mkdocstrings[python]](https://github.com/mkdocstrings/mkdocstrings) from 0.25.1 to 0.26.1.
- [Release notes](https://github.com/mkdocstrings/mkdocstrings/releases)
- [Changelog](https://github.com/mkdocstrings/mkdocstrings/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mkdocstrings/mkdocstrings/compare/0.25.1...0.26.1)

---
updated-dependencies:
- dependency-name: mkdocstrings[python]
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
2024-10-04 13:56:35 +02:00
github-actions deec2e591e 📝 Update release notes 2024-10-04 11:39:01 +00:00
dependabot[bot] 8953d9a323
⬆ Bump griffe-typingdoc from 0.2.6 to 0.2.7 (#12370)
Bumps [griffe-typingdoc](https://github.com/mkdocstrings/griffe-typingdoc) from 0.2.6 to 0.2.7.
- [Release notes](https://github.com/mkdocstrings/griffe-typingdoc/releases)
- [Changelog](https://github.com/mkdocstrings/griffe-typingdoc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mkdocstrings/griffe-typingdoc/compare/0.2.6...0.2.7)

---
updated-dependencies:
- dependency-name: griffe-typingdoc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-04 13:37:26 +02:00
github-actions d12db0b26c 📝 Update release notes 2024-10-04 11:36:26 +00:00
Pavlo Pohorieltsev 3f3a3dd664
📝 Update link to Swagger UI configuration docs (#12264) 2024-10-04 13:34:57 +02:00
github-actions f2fb0251cc 📝 Update release notes 2024-10-04 11:26:21 +00:00
pre-commit-ci[bot] a096615f79
⬆ [pre-commit.ci] pre-commit autoupdate (#12331)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.6.7 → v0.6.8](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.7...v0.6.8)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-10-04 13:21:41 +02:00
github-actions 3d24833272 📝 Update release notes 2024-10-04 11:20:57 +00:00
github-actions c08b80d09f 📝 Update release notes 2024-10-04 11:20:35 +00:00
Kayque Govetri c93810e097
📝 Adding links for Playwright and Vite in `docs/project-generation.md` (#12274) 2024-10-04 13:16:34 +02:00
AnandaCampelo a681aeba6d
🌐 Add Portuguese translation for `docs/pt/docs/how-to/graphql.md` (#12215) 2024-10-04 13:15:21 +02:00
github-actions e2217e24b9 📝 Update release notes 2024-10-04 11:14:33 +00:00
Rafael de Oliveira Marques 0e7806e3f9
🌐 Add Portuguese translation for `docs/pt/docs/advanced/security/oauth2-scopes.md` (#12263) 2024-10-04 13:11:41 +02:00
github-actions 5820d4261e 📝 Update release notes 2024-10-04 11:10:09 +00:00
github-actions 304f514ed9 📝 Update release notes 2024-10-04 11:08:00 +00:00
marcelomarkus 17e234452a
🌐 Add Portuguese translation for `docs/pt/docs/deployment/concepts.md` (#12219) 2024-10-04 13:04:50 +02:00
marcelomarkus fa50b0c73c
🌐 Add Portuguese translation for `docs/pt/docs/how-to/conditional-openapi.md` (#12221) 2024-10-04 13:03:46 +02:00
github-actions b1c03ba57e 📝 Update release notes 2024-10-04 11:03:27 +00:00
github-actions 98d190f780 📝 Update release notes 2024-10-04 11:01:25 +00:00
João Pedro Pereira Holanda 69921b463e
🌐 Add Portuguese translation for `docs/pt/docs/advanced/response-directly.md` (#12266) 2024-10-04 13:00:29 +02:00
github-actions ed477ee887 📝 Update release notes 2024-10-04 10:58:40 +00:00
Rafael de Oliveira Marques ca68c99a6e
🌐 Update Portuguese translation for `docs/pt/docs/tutorial/cookie-params.md` (#12297) 2024-10-04 12:58:03 +02:00
kkotipy 0030f1749e
🌐 Fix Korean translation for `docs/ko/docs/tutorial/index.md` (#12278) 2024-10-04 10:57:17 +00:00
github-actions 919721ce8d 📝 Update release notes 2024-10-04 10:56:12 +00:00
Anderson Rocha f0ebae6e9e
🌐 Update Portuguese translation for `docs/pt/docs/advanced/security/http-basic-auth.md` (#12275) 2024-10-04 12:55:49 +02:00
github-actions 847296e885 📝 Update release notes 2024-09-26 17:17:48 +00:00
Sebastián Ramírez bb018fc46c
🔧 Update sponsors, remove Fine.dev (#12271) 2024-09-26 17:17:21 +00:00
github-actions 10f3cb5ab1 📝 Update release notes 2024-09-24 10:14:28 +00:00
pre-commit-ci[bot] d9e989e274
⬆ [pre-commit.ci] pre-commit autoupdate (#12253)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.6.5 → v0.6.7](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.5...v0.6.7)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-24 12:14:00 +02:00
github-actions 9606b916ef 📝 Update release notes 2024-09-21 21:38:11 +00:00
marcelomarkus 6a2ad7031c
🌐 Add Portuguese translation for `docs/pt/docs/deployment/cloud.md` (#12217) 2024-09-21 23:37:48 +02:00
github-actions f6dfb832c5 📝 Update release notes 2024-09-20 11:34:29 +00:00
Javier Sánchez Castro 2cdf111e61
✏️ Fix typo in `docs/es/docs/python-types.md` (#12235) 2024-09-20 11:34:07 +00:00
github-actions 13e20228a9 📝 Update release notes 2024-09-20 11:15:35 +00:00
Max Scheijen 6aefc31600
🌐 Add Dutch translation for `docs/nl/docs/environment-variables.md` (#12200) 2024-09-20 13:13:32 +02:00
github-actions 2459a009f4 📝 Update release notes 2024-09-20 11:11:21 +00:00
João Gustavo Rogel de Oliveira b1024e73be
🌐 Add Portuguese translation for `docs/pt/docs/deployment/manually.md` (#12210) 2024-09-20 13:10:02 +02:00
github-actions 4e3db0b689 📝 Update release notes 2024-09-20 11:03:12 +00:00
marcelomarkus 0b1da2d910
🌐 Add Portuguese translation for `docs/pt/docs/deployment/server-workers.md` (#12220) 2024-09-20 13:01:03 +02:00
github-actions cf93157be7 📝 Update release notes 2024-09-20 11:00:31 +00:00
marcelomarkus 97ac2286aa
🌐 Add Portuguese translation for `docs/pt/docs/how-to/configure-swagger-ui.md` (#12222) 2024-09-20 13:00:08 +02:00
github-actions 7c6f2f8fde 📝 Update release notes 2024-09-19 09:47:54 +00:00
Albert Villanova del Moral 6cc24416e2
✏️ Fix docstring typos in http security (#12223)
Fix docstring typos in http security
2024-09-19 11:47:28 +02:00
github-actions 4d6cab3ec6 📝 Update release notes 2024-09-18 16:10:21 +00:00
Sofie Van Landeghem 42e0e368bc
📝 Fix small typos in the documentation (#12213) 2024-09-18 18:09:57 +02:00
Sebastián Ramírez 40e33e492d 🔖 Release version 0.115.0 2024-09-17 21:07:35 +02:00
Sebastián Ramírez b36047b54a 📝 Update release notes 2024-09-17 21:06:26 +02:00
github-actions 7eadeb69bd 📝 Update release notes 2024-09-17 18:54:35 +00:00
Sebastián Ramírez 55035f440b
Add support for Pydantic models for parameters using `Query`, `Cookie`, `Header` (#12199) 2024-09-17 20:54:10 +02:00
github-actions 0903da78c9 📝 Update release notes 2024-09-16 22:00:35 +00:00
pre-commit-ci[bot] 4b2b14a8e8
⬆ [pre-commit.ci] pre-commit autoupdate (#12204)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.6.4 → v0.6.5](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.4...v0.6.5)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-17 00:00:09 +02:00
github-actions 35df20c79c 📝 Update release notes 2024-09-15 19:04:38 +00:00
Rafael de Oliveira Marques 8eb3c5621f
🌐 Add Portuguese translation for `docs/pt/docs/advanced/security/http-basic-auth.md` (#12195) 2024-09-15 21:04:17 +02:00
Sebastián Ramírez 2ada1615a3 🔖 Release version 0.114.2 2024-09-13 22:46:33 +02:00
github-actions 3a5fd71f55 📝 Update release notes 2024-09-13 09:51:26 +00:00
Nico Tonnhofer 88d4f2cb18
🐛 Fix form field regression (#12194) 2024-09-13 11:51:00 +02:00
github-actions 0fc6e34135 📝 Update release notes 2024-09-13 09:15:10 +00:00
Sebastián Ramírez 2a4351105e
💡 Add comments with instructions for Playwright screenshot scripts (#12193) 2024-09-13 11:14:46 +02:00
github-actions ed66d70513 📝 Update release notes 2024-09-12 17:06:34 +00:00
Rafael de Oliveira Marques e50facaf22
🌐 Add Portuguese translation for `docs/pt/docs/tutorial/request-form-models.md` (#12175) 2024-09-12 19:03:48 +02:00
github-actions 93e50e373b 📝 Update release notes 2024-09-12 17:03:26 +00:00
Waket Zheng 4a94fe3c82
🌐 Add Chinese translation for `docs/zh/docs/project-generation.md` (#12170) 2024-09-12 19:01:54 +02:00
github-actions 492943fdb1 📝 Update release notes 2024-09-12 17:01:01 +00:00
Max Scheijen c8e644d19e
🌐 Add Dutch translation for `docs/nl/docs/python-types.md` (#12158) 2024-09-12 19:00:36 +02:00
github-actions ba0bb6212e 📝 Update release notes 2024-09-11 22:50:18 +00:00
Sebastián Ramírez 24b8f2668b
Add inline-snapshot for tests (#12189) 2024-09-11 22:49:55 +00:00
Sebastián Ramírez 212fd5e247 🔖 Release version 0.114.1 2024-09-11 09:46:34 +02:00
github-actions 8dc882f751 📝 Update release notes 2024-09-11 07:45:49 +00:00
Sebastián Ramírez b0eedbb580
️ Improve performance in request body parsing with a cache for internal model fields (#12184) 2024-09-11 09:45:30 +02:00
github-actions 74451189f6 📝 Update release notes 2024-09-10 10:40:52 +00:00
github-actions a4c5f7f62f 📝 Update release notes 2024-09-10 10:38:58 +00:00
github-actions eb45bade63 📝 Update release notes 2024-09-10 10:37:36 +00:00
marcelomarkus 944b6e507e
🌐 Add Portuguese translation for `docs/pt/docs/virtual-environments.md` (#12163) 2024-09-10 12:37:13 +02:00
marcelomarkus e69ba26386
🌐 Add Portuguese translation for `docs/pt/docs/environment-variables.md` (#12162) 2024-09-10 12:36:42 +02:00
marcelomarkus a4a7925045
🌐 Add Portuguese translation for `docs/pt/docs/tutorial/testing.md` (#12164) 2024-09-10 12:35:14 +02:00
github-actions 73d4f347df 📝 Update release notes 2024-09-10 10:34:46 +00:00
marcelomarkus 80e2cd1274
🌐 Add Portuguese translation for `docs/pt/docs/tutorial/debugging.md` (#12165) 2024-09-10 12:34:25 +02:00
github-actions bc715d55bc 📝 Update release notes 2024-09-10 09:08:09 +00:00
dependabot[bot] fc601bcb4b
⬆ Bump tiangolo/issue-manager from 0.5.0 to 0.5.1 (#12173)
Bumps [tiangolo/issue-manager](https://github.com/tiangolo/issue-manager) from 0.5.0 to 0.5.1.
- [Release notes](https://github.com/tiangolo/issue-manager/releases)
- [Commits](https://github.com/tiangolo/issue-manager/compare/0.5.0...0.5.1)

---
updated-dependencies:
- dependency-name: tiangolo/issue-manager
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-10 11:07:46 +02:00
github-actions da4670cf77 📝 Update release notes 2024-09-09 18:36:15 +00:00
pre-commit-ci[bot] a67167dce3
⬆ [pre-commit.ci] pre-commit autoupdate (#12176)
* ⬆ [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.6.3 → v0.6.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.3...v0.6.4)

* bump ruff in tests requirements as well

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: svlandeg <svlandeg@github.com>
2024-09-09 20:35:50 +02:00
github-actions c49c4e7df8 📝 Update release notes 2024-09-08 20:37:14 +00:00
Guillaume Fassot 270aef71c4
📝 Remove duplicate line in docs for `docs/en/docs/environment-variables.md` (#12169) 2024-09-08 22:36:53 +02:00
github-actions 3a4431b6fe 📝 Update release notes 2024-09-07 23:36:05 +00:00
BORA ec2a508292
🌐 Add Korean translation for `docs/ko/docs/project-generation.md` (#12157) 2024-09-08 01:35:43 +02:00
github-actions b501fc6daf 📝 Update release notes 2024-09-07 15:24:06 +00:00
Sebastián Ramírez edb584199f
👷 Update `issue-manager.yml` (#12159) 2024-09-07 17:21:14 +02:00
github-actions 4b9e5b3a74 📝 Update release notes 2024-09-06 18:06:45 +00:00
Vaibhav b60d36e753
✏️ Fix typo in `fastapi/params.py` (#12143) 2024-09-06 20:06:20 +02:00
Sebastián Ramírez bde12faea2 🔖 Release version 0.114.0 2024-09-06 19:41:13 +02:00
Sebastián Ramírez 74842f0a60 📝 Update release notes 2024-09-06 19:40:27 +02:00
github-actions e68d8c60fb 📝 Update release notes 2024-09-06 17:38:50 +00:00
Sebastián Ramírez 4ff22a0c41
📝 Update docs, Form Models section title, to match config name (#12152) 2024-09-06 17:38:23 +00:00
github-actions a11e392f5f 📝 Update release notes 2024-09-06 17:31:44 +00:00
Sebastián Ramírez 4633b1bca9
Add support for forbidding extra form fields with Pydantic models (#12134)
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2024-09-06 19:31:18 +02:00
github-actions 1b06b53267 📝 Update release notes 2024-09-06 15:58:05 +00:00
Sebastián Ramírez c411b81c29
Update internal tests for latest Pydantic, including CI tweaks to install the latest Pydantic (#12147) 2024-09-06 15:57:43 +00:00
Sebastián Ramírez d86f660302 🔖 Release version 0.113.0 2024-09-05 17:25:29 +02:00
github-actions 179f838c36 📝 Update release notes 2024-09-05 15:23:05 +00:00
Sebastián Ramírez afdda4e50b
🔧 Update sponsors: Coherence link (#12130) 2024-09-05 15:21:35 +00:00
github-actions e787f854dd 📝 Update release notes 2024-09-05 15:17:13 +00:00
Sebastián Ramírez 7bad7c0975
Add support for Pydantic models in `Form` parameters (#12129)
Revert "️ Temporarily revert " Add support for Pydantic models in `Form` pa…"

This reverts commit 8e6cf9ee9c.
2024-09-05 17:16:50 +02:00
Sebastián Ramírez 965fc8301e 📝 Update release notes 2024-09-05 17:09:31 +02:00
Sebastián Ramírez 999eeb6c76 🔖 Release version 0.112.4 2024-09-05 17:00:33 +02:00
Sebastián Ramírez 96c7e7e0f3 📝 Update release notes 2024-09-05 17:00:13 +02:00
Sebastián Ramírez 8224addd8f 📝 Update release notes 2024-09-05 16:57:57 +02:00
github-actions b69e8b24af 📝 Update release notes 2024-09-05 14:56:10 +00:00
Sebastián Ramírez 8e6cf9ee9c
️ Temporarily revert " Add support for Pydantic models in `Form` parameters" to make a checkpoint release (#12128)
Revert " Add support for Pydantic models in `Form` parameters (#12127)"

This reverts commit 0f3e65b007.
2024-09-05 16:55:44 +02:00
github-actions ccb19c4c35 📝 Update release notes 2024-09-05 14:41:11 +00:00
Sebastián Ramírez 0f3e65b007
Add support for Pydantic models in `Form` parameters (#12127) 2024-09-05 16:40:48 +02:00
github-actions 832e634fd4 📝 Update release notes 2024-09-05 11:25:02 +00:00
Sebastián Ramírez aa21814a89
♻️ Refactor deciding if `embed` body fields, do not overwrite fields, compute once per router, refactor internals in preparation for Pydantic models in `Form`, `Query` and others (#12117) 2024-09-05 13:24:36 +02:00
Sebastián Ramírez 7213d421f5 🔖 Release version 0.112.3 2024-09-05 11:13:32 +02:00
github-actions 68e5ef6968 📝 Update release notes 2024-09-05 09:07:55 +00:00
pre-commit-ci[bot] 1f64a1bb55
⬆ [pre-commit.ci] pre-commit autoupdate (#12115)
* ⬆ [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.6.2 → v0.6.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.2...v0.6.3)

* bump ruff as well

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
Co-authored-by: svlandeg <svlandeg@github.com>
2024-09-05 11:07:32 +02:00
github-actions 9b2a9333b3 📝 Update release notes 2024-09-03 16:05:42 +00:00
Shubhendra Kushwaha f42fd9aac2
📝 Add External Link: Techniques and applications of SQLAlchemy global filters in FastAPI (#12109) 2024-09-03 18:05:19 +02:00
github-actions cbdc58b1b7 📝 Update release notes 2024-09-03 13:54:00 +00:00
Max Scheijen 3feed9dd8c
🌐 Add Dutch translation for `docs/nl/docs/features.md` (#12101) 2024-09-03 15:50:38 +02:00
github-actions 560c43269d 📝 Update release notes 2024-09-03 13:49:34 +00:00
dependabot[bot] 7eae925443
⬆ Bump pypa/gh-action-pypi-publish from 1.10.0 to 1.10.1 (#12120)
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.10.0 to 1.10.1.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.10.0...v1.10.1)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-03 15:47:08 +02:00
github-actions 7d69943a22 📝 Update release notes 2024-09-03 13:45:21 +00:00
github-actions 56cfecc1bf 📝 Update release notes 2024-09-03 13:44:55 +00:00
Rafael de Oliveira Marques e26229ed98
🌐 Add Portuguese translation for `docs/pt/docs/advanced/testing-events.md` (#12108) 2024-09-03 15:44:35 +02:00
Rafael de Oliveira Marques c1c57336b0
🌐 Add Portuguese translation for `docs/pt/docs/advanced/security/index.md` (#12114) 2024-09-03 15:43:56 +02:00
github-actions 7537bac43f 📝 Update release notes 2024-09-03 13:15:41 +00:00
dependabot[bot] 6b3d1c6d4e
⬆ Bump pillow from 10.3.0 to 10.4.0 (#12105)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.3.0 to 10.4.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.3.0...10.4.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-03 15:15:17 +02:00
github-actions a6ad088183 📝 Update release notes 2024-09-02 19:54:19 +00:00
Sofie Van Landeghem b63b4189ee
💚 Set `include-hidden-files` to `True` when using the `upload-artifact` GH action (#12118)
* include-hidden-files when uploading coverage files

* include-hidden-files when building docs
2024-09-02 21:53:53 +02:00
github-actions 17f1f7b5bd 📝 Update release notes 2024-09-02 19:37:19 +00:00
dependabot[bot] 92bdfbc7ba
⬆ Bump pypa/gh-action-pypi-publish from 1.9.0 to 1.10.0 (#12112)
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 21:36:52 +02:00
github-actions b203d7a15f 📝 Update release notes 2024-09-01 19:39:46 +00:00
Sebastián Ramírez 23bda0ffeb
♻️ Refactor internal `check_file_field()`, rename to `ensure_multipart_is_installed()` to clarify its purpose (#12106) 2024-09-01 21:39:25 +02:00
github-actions d5c6cf8122 📝 Update release notes 2024-08-31 23:46:26 +00:00
Sebastián Ramírez d08b95ea57
♻️ Rename internal `create_response_field()` to `create_model_field()` as it's used for more than response models (#12103) 2024-09-01 01:46:03 +02:00
github-actions 3660c7a063 📝 Update release notes 2024-08-31 20:52:29 +00:00
Sebastián Ramírez 5b7fa3900e
♻️ Refactor and simplify internal data from `solve_dependencies()` using dataclasses (#12100) 2024-08-31 22:52:06 +02:00
github-actions 8d7d89e8c6 📝 Update release notes 2024-08-31 20:28:07 +00:00
Sebastián Ramírez 08547e1d57
♻️ Refactor and simplify internal `analyze_param()` to structure data with dataclasses instead of tuple (#12099) 2024-08-31 22:27:44 +02:00
github-actions 75c4e7fc44 📝 Update release notes 2024-08-31 20:19:51 +00:00
Sebastián Ramírez 581aacc4a9
♻️ Refactor and simplify dependencies data structures with dataclasses (#12098) 2024-08-31 22:19:30 +02:00
github-actions 47b3351be9 📝 Update release notes 2024-08-31 15:36:24 +00:00
Sebastián Ramírez eebc6c3d54
🔧 Update sponsors link: Coherence (#12097) 2024-08-31 17:35:58 +02:00
github-actions 83422b1923 📝 Update release notes 2024-08-31 10:20:40 +00:00
Sebastián Ramírez 0077af9719
🔧 Update labeler config to handle sponsorships data (#12096) 2024-08-31 12:18:37 +02:00
github-actions 6c8a205db1 📝 Update release notes 2024-08-31 10:16:12 +00:00
Sebastián Ramírez c37f2c976d
📝 Add note about `time.perf_counter()` in middlewares (#12095) 2024-08-31 10:15:50 +00:00
github-actions 5827b922c3 📝 Update release notes 2024-08-31 03:23:14 +00:00
Esteban Maya 1b5984b23b
Merge pull request #11957 from domdent/docs/edit-timer-in-middleware
📝 Tweak middleware code sample `time.time()` to `time.perf_counter()`
2024-08-30 22:22:52 -05:00
Esteban Maya 6ca7b8c608
Merge branch 'master' into docs/edit-timer-in-middleware 2024-08-30 22:11:25 -05:00
github-actions a2458d594f 📝 Update release notes 2024-08-30 16:20:42 +00:00
Sebastián Ramírez 9519380764
🔧 Update sponsors: Coherence (#12093) 2024-08-30 18:20:21 +02:00
github-actions 4eec14fa8c 📝 Update release notes 2024-08-30 16:01:05 +00:00
Marcin Sulikowski 6e98249c21
📝 Fix async test example not to trigger DeprecationWarning (#12084) 2024-08-30 18:00:41 +02:00
github-actions 17a29149e4 📝 Update release notes 2024-08-29 00:02:01 +00:00
Sebastián Ramírez 4cf3421178
🔧 Update sponsors, remove Kong (#12085) 2024-08-29 02:01:29 +02:00
github-actions ffa6d2eafd 📝 Update release notes 2024-08-28 23:44:01 +00:00
Sofie Van Landeghem ae27540348
🌐 Add Dutch translation for `docs/nl/docs/index.md` (#12042)
Co-authored-by: Max Scheijen <maxscheijen@gmail.com>
2024-08-29 01:41:46 +02:00
github-actions 3332895251 📝 Update release notes 2024-08-28 23:40:13 +00:00
Muhammad Ashiq Ameer 9b35d355bf
📝 Update `docs_src/path_params_numeric_validations/tutorial006.py` (#11478)
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2024-08-28 18:39:15 -05:00
github-actions a930128910 📝 Update release notes 2024-08-28 23:35:03 +00:00
Alec Gillis cabed9efb6
📝 Update comma in `docs/en/docs/async.md` (#12062)
Co-authored-by: Alec Gillis <alecgillis@quorum.us>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2024-08-28 18:33:37 -05:00
github-actions 48bf0db58f 📝 Update release notes 2024-08-28 14:07:23 +00:00
pre-commit-ci[bot] 4909e44a7f
⬆ [pre-commit.ci] pre-commit autoupdate (#12076)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.6.1 → v0.6.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.1...v0.6.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-28 09:07:00 -05:00
github-actions be9abcf353 📝 Update release notes 2024-08-28 13:48:40 +00:00
lkw123 f41f6234af
🌐 Update Chinese translation for `docs/zh/docs/how-to/index.md` (#12070) 2024-08-28 08:48:13 -05:00
github-actions 9416e89bd7 📝 Update release notes 2024-08-26 02:15:38 +00:00
Sebastián Ramírez 5fdbeed792
👷 Update `latest-changes` GitHub Action (#12073) 2024-08-26 02:14:56 +00:00
github-actions 3a96938771 📝 Update release notes 2024-08-25 02:44:27 +00:00
Sebastián Ramírez bd1b77548f
📝 Update docs about serving FastAPI: ASGI servers, Docker containers, etc. (#12069) 2024-08-25 02:44:06 +00:00
github-actions b5cbff9521 📝 Update release notes 2024-08-25 00:01:26 +00:00
Sebastián Ramírez c692176d42
📝 Clarify `response_class` parameter, validations, and returning a response directly (#12067) 2024-08-24 19:01:04 -05:00
github-actions d8e526c1db 📝 Update release notes 2024-08-24 21:52:29 +00:00
Sofie Van Landeghem 6aa44a85a2
📝 Fix minor typos and issues in the documentation (#12063) 2024-08-24 16:52:09 -05:00
github-actions e4727ed20a 📝 Update release notes 2024-08-24 20:04:51 +00:00
GPla 9656895b60
📝 Add note in Docker docs about ensuring graceful shutdowns and lifespan events with `CMD` exec form (#11960)
Co-authored-by: svlandeg <svlandeg@github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-08-24 20:04:30 +00:00
Sebastián Ramírez d00af00d3f 🔖 Release version 0.112.2 2024-08-24 14:34:50 -05:00
github-actions b69a9f3b6f 📝 Update release notes 2024-08-24 19:27:59 +00:00
Giunio 51b625e127
🐛 Fix `allow_inf_nan` option for Param and Body classes (#11867)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: svlandeg <svlandeg@github.com>
2024-08-24 14:27:37 -05:00
github-actions 48b36f26d8 📝 Update release notes 2024-08-24 19:10:14 +00:00
Pastukhov Nikita 3a4ac24675
🐛 Ensure that `app.include_router` merges nested lifespans (#9630)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-08-24 14:09:52 -05:00
Sebastián Ramírez 22bf988dfb 📝 Update release notes 2024-08-23 22:48:20 -05:00
github-actions 6935fe8d38 📝 Update release notes 2024-08-24 03:16:48 +00:00
Aymen 8f03716757
📝 Fix a typo in virtual environement page (#12064) 2024-08-23 22:16:23 -05:00
Esteban Maya 866c6987fc
Merge branch 'master' into docs/edit-timer-in-middleware 2024-08-22 12:55:06 -05:00
github-actions d0ce9d2bdf 📝 Update release notes 2024-08-22 00:47:57 +00:00
Sebastián Ramírez 705659bb22
📝 Add docs about Environment Variables and Virtual Environments (#12054) 2024-08-21 19:47:31 -05:00
github-actions 4f3381a95e 📝 Update release notes 2024-08-21 16:58:20 +00:00
João Pedro Pereira Holanda 38ff43b690
🌐 Add Portuguese translation for `docs/pt/docs/tutorial/request_file.md` (#12018) 2024-08-21 11:56:50 -05:00
github-actions 2fe05762b2 📝 Update release notes 2024-08-21 16:55:38 +00:00
Yuki Watanabe 34e6e63fb2
🌐 Add Japanese translation for `docs/ja/docs/learn/index.md` (#11592) 2024-08-21 11:55:16 -05:00
github-actions 2d34086b70 📝 Update release notes 2024-08-20 00:40:55 +00:00
pre-commit-ci[bot] f4dfbae903
⬆ [pre-commit.ci] pre-commit autoupdate (#12046)
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v4.6.0)
- https://github.com/charliermarsh/ruff-pre-commithttps://github.com/astral-sh/ruff-pre-commit

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-19 19:40:31 -05:00
github-actions e8322228b4 📝 Update release notes 2024-08-19 18:15:49 +00:00
Alejandra 6ba8407ff3
📝 Update Spanish translation docs for consistency (#12044) 2024-08-19 13:15:21 -05:00
github-actions 63ae0f1070 📝 Update release notes 2024-08-19 17:35:25 +00:00
xuvjso f0866bc205
🌐 Update docs about dependencies with yield (#12028) 2024-08-19 12:35:03 -05:00
github-actions ae97785ded 📝 Update release notes 2024-08-18 23:26:36 +00:00
Sebastián Ramírez bcd737de33
📝 Add Asyncer mention in async docs (#12037) 2024-08-18 23:26:14 +00:00
github-actions 98712b9e09 📝 Update release notes 2024-08-18 23:17:21 +00:00
Sebastián Ramírez 0e77481acf
📝 Move the Features docs to the top level to improve the main page menu (#12036) 2024-08-18 18:16:56 -05:00
github-actions 6ebaf0efcb 📝 Update release notes 2024-08-18 21:08:39 +00:00
Sebastián Ramírez 4f1eb0cd9e
🔧 Update coverage config files (#12035) 2024-08-18 16:07:03 -05:00
github-actions 0da0814d8a 📝 Update release notes 2024-08-17 21:20:52 +00:00
Sebastián Ramírez 9bfc48ad9f
📝 Update FastAPI People, do not translate to have the most recent info (#12034) 2024-08-17 16:20:31 -05:00
github-actions 882f77f925 📝 Update release notes 2024-08-17 06:54:13 +00:00
0shah0 85cded53c8
✏️ Fix import typo in reference example for `Security` (#11168)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-08-17 06:53:52 +00:00
github-actions 066ea10ac5 📝 Update release notes 2024-08-17 06:42:28 +00:00
Ahsan Sheraz ff1118d6a0
🌐 Update Urdu translation for `docs/ur/docs/benchmarks.md` (#10046)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-08-17 06:42:07 +00:00
github-actions 6aa0435a3e 📝 Update release notes 2024-08-17 04:52:53 +00:00
Jamie Phan 659350e9cd
🎨 Fix typing annotation for semi-internal `FastAPI.add_api_route()` (#10240)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-08-17 04:52:31 +00:00
github-actions 980c88c347 📝 Update release notes 2024-08-17 04:14:10 +00:00
Sebastián Ramírez 3a3ad5d66d
⬆️ Upgrade version of Ruff and reformat (#12032)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-16 23:13:50 -05:00
github-actions 6433c3b70e 📝 Update release notes 2024-08-17 04:00:12 +00:00
gitworkflows 4a7f6e0ae6
🔨 Standardize shebang across shell scripts (#11942) 2024-08-16 22:59:06 -05:00
github-actions 263e46e540 📝 Update release notes 2024-08-17 03:57:45 +00:00
Sofie Van Landeghem 957d747d21
📝 Highlight correct line in tutorial `docs/en/docs/tutorial/body-multiple-params.md` (#11978)
Co-authored-by: Esteban Maya <emayacadavid9@gmail.com>
2024-08-16 22:57:21 -05:00
github-actions 8b05d4518b 📝 Update release notes 2024-08-16 23:18:21 +00:00
Alejandra 8a146b7a28
🔥 Remove Sentry link from Advanced Middleware docs (#12031) 2024-08-16 18:18:02 -05:00
github-actions beedc72281 📝 Update release notes 2024-08-16 22:32:33 +00:00
Esteban Maya 8c85b8f4aa
Merge pull request #11979 from fastapi/dependabot/pip/sqlalchemy-gte-1.3.18-and-lt-2.0.33
⬆ Update sqlalchemy requirement from <1.4.43,>=1.3.18 to >=1.3.18,<2.0.33
2024-08-16 17:32:10 -05:00
Esteban Maya 9c9cccef0c
Merge branch 'master' into dependabot/pip/sqlalchemy-gte-1.3.18-and-lt-2.0.33 2024-08-16 17:21:47 -05:00
github-actions 7ed9a4971e 📝 Update release notes 2024-08-16 21:56:54 +00:00
Sebastián Ramírez daf4970ed7
📝 Clarify management tasks for translations, multiples files in one PR (#12030) 2024-08-16 21:56:33 +00:00
dependabot[bot] be7e7d4433
⬆ Update sqlalchemy requirement
---
updated-dependencies:
- dependency-name: sqlalchemy
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-16 17:45:47 +00:00
github-actions 29babdc0a1 📝 Update release notes 2024-08-16 17:44:48 +00:00
Sebastián Ramírez 46412ff67d
🔊 Remove old ignore warnings (#11950) 2024-08-16 17:44:28 +00:00
github-actions 2e0f74f58b 📝 Update release notes 2024-08-16 17:29:43 +00:00
Sebastián Ramírez ff8fcd3b44
⬆️ Upgrade griffe-typingdoc for the docs (#12029) 2024-08-16 17:29:21 +00:00
github-actions 9a939dec47 📝 Update release notes 2024-08-16 16:56:43 +00:00
gitworkflows f79247b4e5
🙈 Add .coverage* to `.gitignore` (#11940) 2024-08-16 11:56:19 -05:00
github-actions 46d0ffc0d7 📝 Update release notes 2024-08-16 16:52:46 +00:00
VaitoSoi fd5c00ab76
📝 Edit the link to the OpenAPI "Responses Object" and "Response Object" sections in the "Additional Responses in OpenAPI" section (#11996)
Co-authored-by: svlandeg <svlandeg@github.com>
2024-08-16 11:51:25 -05:00
github-actions 9f78e08c14 📝 Update release notes 2024-08-16 16:50:25 +00:00
Jiri Kuncar c81f575d0d
🔨 Specify `email-validator` dependency with dash (#11515)
Co-authored-by: svlandeg <svlandeg@github.com>
2024-08-16 11:50:01 -05:00
github-actions a3f42718de 📝 Update release notes 2024-08-16 02:05:14 +00:00
Alejandra 10eee5c3b3
🌐 Add Spanish translation for `docs/es/docs/project-generation.md` (#11947)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-08-16 02:04:50 +00:00
github-actions a51a98b07e 📝 Update release notes 2024-08-16 01:58:02 +00:00
Sławomir Ehlert 0aaaed581e
⚙️ Record and show test coverage contexts (what test covers which line) (#11518)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-08-15 20:57:38 -05:00
github-actions e8f7bf0ad5 📝 Update release notes 2024-08-16 00:05:21 +00:00
Micael Jarniac a0c529ef0a
📝 Fix minor typo (#12026) 2024-08-15 19:04:55 -05:00
github-actions 470f1ae57d 📝 Update release notes 2024-08-15 23:30:36 +00:00
Nils Lindemann 8809b3685f
📝 Several docs improvements, tweaks, and clarifications (#11390)
Co-authored-by: svlandeg <svlandeg@github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-08-15 23:30:12 +00:00
github-actions 3c8d0abc87 📝 Update release notes 2024-08-15 22:38:22 +00:00
Jun-Ah 준아 265dbeb663
📝 Add missing `compresslevel` parameter on docs for `GZipMiddleware` (#11350)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-08-15 17:38:02 -05:00
github-actions 4636c621a9 📝 Update release notes 2024-08-15 22:31:36 +00:00
Luke Okomilo 2cb1333b97
📝 Fix inconsistent response code when item already exists in docs for testing (#11818)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-08-15 22:31:16 +00:00
github-actions 366bdebd9e 📝 Update release notes 2024-08-15 21:30:26 +00:00
Cedric L'homme 86c8f4fc2b
📝 Update `docs/en/docs/tutorial/body.md` with Python 3.10 union type example (#11415)
Co-authored-by: svlandeg <svlandeg@github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-08-15 16:29:58 -05:00
Sebastián Ramírez 4f937c0c4a 🔖 Release version 0.112.1 2024-08-15 16:00:47 -05:00
github-actions 94be8ff341 📝 Update release notes 2024-08-15 20:58:06 +00:00
dependabot[bot] 285a54cfbd
⬆ Bump pypa/gh-action-pypi-publish from 1.8.14 to 1.9.0 (#11727)
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.8.14 to 1.9.0.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.8.14...v1.9.0)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-15 15:56:19 -05:00
github-actions b7c80cbca2 📝 Update release notes 2024-08-15 18:51:01 +00:00
Pierre V-F 0d92b42ff0
🔧 Add changelog URL to `pyproject.toml`, shows in PyPI (#11152)
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-08-15 13:50:31 -05:00
github-actions 2f5ed4f2d1 📝 Update release notes 2024-08-15 18:39:22 +00:00
Sebastián Ramírez 2c98017200
👷 Do not sync labels as it overrides manually added labels (#12024) 2024-08-15 13:38:43 -05:00
github-actions fc9107843e 📝 Update release notes 2024-08-15 15:51:59 +00:00
Ben Beasley 5fd9ab9750
⬆️ Allow Starlette 0.38.x, update the pin to `>=0.37.2,<0.39.0` (#11876)
Co-authored-by: svlandeg <svlandeg@github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-08-15 10:51:33 -05:00
github-actions 84d69bb69a 📝 Update release notes 2024-08-15 15:41:45 +00:00
marcelomarkus 646232121b
🌐 Add Portuguese translation for `docs/pt/docs/tutorial/bigger-applications.md` (#11971) 2024-08-15 10:38:22 -05:00
github-actions e1b52cf428 📝 Update release notes 2024-08-15 15:38:02 +00:00
Rafael de Oliveira Marques 60fe2b19e8
🌐 Add Portuguese translation for `docs/pt/docs/advanced/testing-websockets.md` (#11994) 2024-08-15 10:36:31 -05:00
github-actions 4fe1af494a 📝 Update release notes 2024-08-15 15:35:41 +00:00
Rafael de Oliveira Marques 959e793297
🌐 Add Portuguese translation for `docs/pt/docs/advanced/testing-dependencies.md` (#11995) 2024-08-15 10:35:17 -05:00
github-actions b04d29c983 📝 Update release notes 2024-08-15 15:21:51 +00:00
Sebastián Ramírez c82497f78e
📝 Update docs section about "Don't Translate these Pages" (#12022) 2024-08-15 10:21:25 -05:00
github-actions 9c3845be8d 📝 Update release notes 2024-08-14 22:57:35 +00:00
Sebastián Ramírez 85bd4067c2
📝 Add documentation for non-translated pages and scripts to verify them (#12020) 2024-08-14 17:57:10 -05:00
github-actions 75705617a6 📝 Update release notes 2024-08-14 18:29:51 +00:00
Sebastián Ramírez 9f57ecd41f
👷🏻 Update Labeler GitHub Actions (#12019) 2024-08-14 18:29:24 +00:00
github-actions 4c490de33d 📝 Update release notes 2024-08-14 14:33:49 +00:00
Sebastián Ramírez 2dad7c9834
🔧 Update configs for MkDocs for languages and social cards (#12016) 2024-08-14 09:33:27 -05:00
github-actions 96cb538fa3 📝 Update release notes 2024-08-14 00:31:10 +00:00
Sebastián Ramírez 7c6e70a0c7
👷 Update permissions and config for labeler GitHub Action (#12008) 2024-08-13 19:30:46 -05:00
github-actions 69a6456d9e 📝 Update release notes 2024-08-13 05:40:18 +00:00
Sebastián Ramírez e5f25e3bca
👷🏻 Add GitHub Action label-checker (#12005) 2024-08-13 05:39:57 +00:00
github-actions 26a37a6a20 📝 Update release notes 2024-08-13 04:54:36 +00:00
Sebastián Ramírez c89533254e
👷 Add label checker GitHub Action (#12004) 2024-08-12 23:54:14 -05:00
github-actions 14c621ea30 📝 Update release notes 2024-08-13 02:00:51 +00:00
Sebastián Ramírez 48c269ba68
👷 Update GitHub Action add-to-project (#12002) 2024-08-12 21:00:25 -05:00
github-actions 14779a3ae1 📝 Update release notes 2024-08-13 01:48:24 +00:00
Sebastián Ramírez b5e167d406
🔧 Update labeler GitHub Action (#12001) 2024-08-12 20:47:59 -05:00
github-actions 663810cb1a 📝 Update release notes 2024-08-13 01:02:50 +00:00
Sebastián Ramírez 748159289f
👷 Add GitHub Action labeler (#12000) 2024-08-12 20:02:29 -05:00
github-actions 768df2736e 📝 Update release notes 2024-08-12 23:05:15 +00:00
Sebastián Ramírez 922ce32aa2
👷 Add GitHub Action add-to-project (#11999) 2024-08-12 23:04:54 +00:00
github-actions d839e3ccbb 📝 Update release notes 2024-08-12 21:48:16 +00:00
Sebastián Ramírez b0a8e7356a
📝 Update admonitions in docs missing (#11998) 2024-08-12 16:47:53 -05:00
github-actions 0e8b6d3bb8 📝 Update release notes 2024-08-09 21:32:11 +00:00
Sebastián Ramírez 06fc1c2cc8
🔨 Update docs.py script to enable dirty reload conditionally (#11986) 2024-08-09 16:30:19 -05:00
github-actions 2b7fc3f340 📝 Update release notes 2024-08-09 21:29:31 +00:00
Sebastián Ramírez 4ec134426d
📝 Update docs about discussions questions (#11985) 2024-08-09 21:29:09 +00:00
github-actions 6d9dc39fcb 📝 Update release notes 2024-08-09 16:54:22 +00:00
Sebastián Ramírez e06e0b1c4a
🔧 Update MkDocs instant previews (#11982) 2024-08-09 16:53:58 +00:00
github-actions 4cbb846d9e 📝 Update release notes 2024-08-09 15:54:10 +00:00
Sebastián Ramírez 8b6d9ba789
🐛 Fix deploy docs previews script to handle mkdocs.yml files (#11984) 2024-08-09 10:52:41 -05:00
github-actions 0b30cad9d2 📝 Update release notes 2024-08-09 01:43:55 +00:00
Sebastián Ramírez 4f9ca032d6
💡 Add comment about custom Termynal line-height (#11976) 2024-08-08 20:42:26 -05:00
github-actions 4b5342b568 📝 Update release notes 2024-08-08 23:34:46 +00:00
Sebastián Ramírez 51563564c6
👷 Add alls-green for test-redistribute (#11974) 2024-08-08 23:34:25 +00:00
github-actions fda1813e13 📝 Update release notes 2024-08-08 23:28:35 +00:00
Sebastián Ramírez 233bab7f41
👷 Update docs-previews to handle no docs changes (#11975) 2024-08-08 18:28:14 -05:00
Sebastián Ramírez 8377c5237c 📝 Update release notes 2024-08-07 22:51:13 -05:00
github-actions b7f035512a 📝 Update release notes 2024-08-07 21:17:38 +00:00
Sebastián Ramírez 58279670b6
🔨 Refactor script `deploy_docs_status.py` to account for deploy URLs with or without trailing slash (#11965) 2024-08-07 16:17:14 -05:00
Sebastián Ramírez ead4f8c6a4
Merge branch 'master' into docs/edit-timer-in-middleware 2024-08-07 16:08:05 -05:00
github-actions 0eddc02aca 📝 Update release notes 2024-08-07 20:57:09 +00:00
Sebastián Ramírez 13b56ab499
🔒️ Update permissions for deploy-docs action (#11964) 2024-08-07 20:56:47 +00:00
github-actions 9e84537685 📝 Update release notes 2024-08-07 19:15:50 +00:00
Sebastián Ramírez f118154576
👷🏻 Add deploy docs status and preview links to PRs (#11961) 2024-08-07 19:15:24 +00:00
github-actions a031d80e5c 📝 Update release notes 2024-08-07 18:58:22 +00:00
Rafael de Oliveira Marques f0a146e4f8
🌐 Add Portuguese translation for `docs/pt/docs/advanced/using-request-directly.md` (#11956) 2024-08-07 13:58:00 -05:00
Dom 7ff5da8bf2 edit middleware docs code sample to use perf_counter as a timer 2024-08-06 14:46:39 +01:00
github-actions df419b739c 📝 Update release notes 2024-08-06 04:48:52 +00:00
Sebastián Ramírez 0cd844d387
🔧 Update docs setup with latest configs and plugins (#11953) 2024-08-05 23:48:30 -05:00
github-actions af1a07052a 📝 Update release notes 2024-08-05 15:49:07 +00:00
P-E. Brian dc384c4f8d
🌐 Add French translation for `docs/fr/docs/tutorial/body-multiple-params.md` (#11796) 2024-08-05 10:48:45 -05:00
github-actions 9dee1f8b28 📝 Update release notes 2024-08-04 23:34:17 +00:00
CAO Mingpei abe62d8a81
🌐 Update Chinese translation for `docs/zh/docs/tutorial/query-params.md` (#11557) 2024-08-04 18:33:57 -05:00
github-actions 35fcb31dca 📝 Update release notes 2024-08-04 18:23:34 +00:00
Sebastián Ramírez f3e49e5f4e
🔇 Ignore warning from attrs in Trio (#11949) 2024-08-04 18:23:14 +00:00
github-actions 22ffde0356 📝 Update release notes 2024-08-04 17:01:24 +00:00
白宦成 b1774bae1b
🌐 Update typo in Chinese translation for `docs/zh/docs/advanced/testing-dependencies.md` (#11944) 2024-08-04 12:01:03 -05:00
github-actions 553816ae6a 📝 Update release notes 2024-08-03 00:03:45 +00:00
marcelomarkus 25f1b1548b
🌐 Add Portuguese translation for `docs/pt/docs/advanced/sub-applications.md` and `docs/pt/docs/advanced/behind-a-proxy.md` (#11856) 2024-08-02 19:02:06 -05:00
github-actions f0367e0424 📝 Update release notes 2024-08-03 00:01:47 +00:00
Wesin Ribeiro Alves 2609348471
🌐 Add Portuguese translation for `docs/pt/docs/tutorial/cors.md` and `docs/pt/docs/tutorial/middleware.md` (#11916) 2024-08-02 19:01:21 -05:00
github-actions 9723721ea4 📝 Update release notes 2024-08-02 19:38:15 +00:00
P-E. Brian e4ab536dc5
🌐 Add French translation for `docs/fr/docs/tutorial/path-params-numeric-validations.md` (#11788) 2024-08-02 14:37:52 -05:00
Sebastián Ramírez b2e233867c 🔖 Release version 0.112.0 2024-08-02 01:09:03 -05:00
Sebastián Ramírez 003d45428f 📝 Update release notes 2024-08-02 01:08:25 -05:00
github-actions 450bff65f4 📝 Update release notes 2024-08-02 06:03:26 +00:00
Sebastián Ramírez a25c92ceb9
♻️ Add support for `pip install "fastapi[standard]"` with standard dependencies and `python -m fastapi` (#11935)
* ♻️ Add support for `pip install "fastapi[standard]"` and make `fastapi` not include the optional standard dependencies

* 📝 Update docs to include new fastapi[standard]

*  Add new stub fastapi command that tells people to install fastapi[standard]

*  Add tests for new stub CLI

* 🔧 Add new command fastapi in main fastapi project, for when fastapi-cli is not installed

* ✏️ Fix types

* 📝 Add note about quotes when installing fastapi[standard]

* 📝 Update docs about standard extra dependencies

* ⬆️ Upgrade fastapi-cli
2024-08-02 01:03:05 -05:00
github-actions 3990a0a510 📝 Update release notes 2024-08-01 05:10:11 +00:00
Rafael de Oliveira Marques 1f7dcc58de
🌐 Update Portuguese translation for `docs/pt/docs/alternatives.md` (#11931) 2024-08-01 00:09:45 -05:00
github-actions 12a4476c3d 📝 Update release notes 2024-08-01 04:54:12 +00:00
Sebastián Ramírez efb4a077be
🔧 Update sponsors: add liblab (#11934) 2024-07-31 23:53:51 -05:00
github-actions 9d41d6e8a8 📝 Update release notes 2024-08-01 02:18:34 +00:00
Sebastián Ramírez 643a87cc84
👷 Update GitHub Action label-approved permissions (#11933)
👷 Update label-approved permissions
2024-07-31 21:18:05 -05:00
github-actions b8a06527fc 📝 Update release notes 2024-07-31 23:40:27 +00:00
Sebastián Ramírez 8b930f8847
👷 Refactor GitHub Action to comment docs deployment URLs and update token (#11925) 2024-07-31 18:40:04 -05:00
github-actions c0ae16ab7a 📝 Update release notes 2024-07-31 14:09:35 +00:00
jianghuyiyuan 2e35b176cf
✏️ Fix typos in docs (#11926) 2024-07-31 09:09:15 -05:00
github-actions b0801e66d3 📝 Update release notes 2024-07-31 02:18:12 +00:00
Sebastián Ramírez 7723e96317
👷 Update tokens for GitHub Actions (#11924) 2024-07-30 21:17:52 -05:00
github-actions b9e274dc11 📝 Update release notes 2024-07-30 01:32:52 +00:00
Sebastián Ramírez 0a21b371b7
📝 Tweak management docs (#11918) 2024-07-29 20:32:30 -05:00
github-actions 2c33611c62 📝 Update release notes 2024-07-29 23:35:29 +00:00
Sebastián Ramírez 221e59b0d1
🚚 Rename GitHub links from tiangolo/fastapi to fastapi/fastapi (#11913) 2024-07-29 18:35:07 -05:00
github-actions 12fffbc7ea 📝 Update release notes 2024-07-29 23:09:37 +00:00
Sebastián Ramírez de70702b7c
👷 Update token permissions to comment deployment URL in docs (#11917) 2024-07-29 23:09:18 +00:00
github-actions 2c57673e07 📝 Update release notes 2024-07-29 22:51:53 +00:00
Sebastián Ramírez 8bd07a4342
👷 Update token permissions for GitHub Actions (#11915) 2024-07-29 17:51:29 -05:00
github-actions 7eb37d08bc 📝 Update release notes 2024-07-29 18:12:37 +00:00
Sebastián Ramírez 9e42833445
👷 Update GitHub Actions token usage (#11914) 2024-07-29 13:12:13 -05:00
Rafael de Oliveira Marques 84b4ac595e
🌐 Add Portuguese translation for `docs/pt/docs/advanced/wsgi.md` (#11909) 2024-07-29 12:09:51 -05:00
github-actions dc8e194a20 📝 Update release notes 2024-07-28 20:26:48 +00:00
Sebastián Ramírez baf1efc8b8
📝 Add docs about FastAPI team and project management (#11908) 2024-07-28 15:26:24 -05:00
github-actions c944f9c40c 📝 Update release notes 2024-07-28 18:49:31 +00:00
Sebastián Ramírez d6dfb9397b
👷 Update GitHub Action to notify translations with label `approved-1` (#11907)
👷 Update GitHub Action to notify translations with label approved-1
2024-07-28 13:49:12 -05:00
github-actions dddf07904a 📝 Update release notes 2024-07-28 00:04:20 +00:00
Sebastián Ramírez 81234084cd
📝 Re-structure docs main menu (#11904) 2024-07-27 19:03:57 -05:00
github-actions a4fd3fd483 📝 Update release notes 2024-07-27 23:59:30 +00:00
Aleksandr Andrukhov c96afadbd7
🌐 Add Russian translation for `docs/ru/docs/tutorial/dependencies/sub-dependencies.md` (#10515) 2024-07-27 18:59:11 -05:00
github-actions 386a6796ab 📝 Update release notes 2024-07-24 20:39:30 +00:00
Rafael de Oliveira Marques 4b4c48ecff
🌐 Add Portuguese translation for `docs/pt/docs/advanced/response-change-status-code.md` (#11863) 2024-07-24 15:39:07 -05:00
github-actions cd86c72ed6 📝 Update release notes 2024-07-23 19:36:46 +00:00
Sebastián Ramírez 480f928599
🔧 Update sponsors, remove Reflex (#11875) 2024-07-23 14:36:22 -05:00
github-actions 360f4966a6 📝 Update release notes 2024-07-22 20:37:50 +00:00
Nolan Di Mare Sullivan b80a2590f8
📝 Update Speakeasy URL (#11871)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-07-22 15:37:30 -05:00
github-actions cd6e9db065 📝 Update release notes 2024-07-18 20:18:17 +00:00
Lucas Balieiro 3898fa88f2
🌐 Add Portuguese translation for `docs/pt/docs/reference/background.md` (#11849) 2024-07-18 15:15:21 -05:00
github-actions 4592223c86 📝 Update release notes 2024-07-18 20:13:42 +00:00
João Pedro Pereira Holanda a5fbbeeb61
🌐 Add Portuguese translation for `docs/pt/docs/tutorial/dependencies/dependencies-with-yield.md` (#11848) 2024-07-18 15:13:18 -05:00
github-actions 15130a3eb5 📝 Update release notes 2024-07-17 22:37:18 +00:00
Sebastián Ramírez 9230978aae
🔧 Update sponsors: remove TalkPython (#11861) 2024-07-17 22:36:02 +00:00
github-actions 84f04cc8a0 📝 Update release notes 2024-07-17 02:13:04 +00:00
Sebastián Ramírez 7bbddf012c
🔨 Update docs Termynal scripts to not include line nums for local dev (#11854) 2024-07-16 21:12:29 -05:00
github-actions 67ed86cb7f 📝 Update release notes 2024-07-15 18:47:15 +00:00
Lucas Balieiro 4c0c05c944
🌐 Add Portuguese translation for `docs/pt/docs/reference/apirouter.md` (#11843) 2024-07-15 13:46:51 -05:00
Sebastián Ramírez b199364246 🔖 Release version 0.111.1 2024-07-14 12:54:20 -05:00
Sebastián Ramírez 38db0a5858 📝 Update release notes 2024-07-14 12:53:37 -05:00
github-actions 0f22c76d7d 📝 Update release notes 2024-07-14 17:47:04 +00:00
Sebastián Ramírez 4d3ef06029
Remove orjson and ujson from default dependencies (#11842) 2024-07-14 12:46:40 -05:00
github-actions 7a9396c839 📝 Update release notes 2024-07-14 17:28:03 +00:00
Alejandra 0b1e2ec2a6
✏️ Rewording in `docs/en/docs/fastapi-cli.md` (#11716)
Co-authored-by: Andres Pineda <1900897+ajpinedam@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-07-14 12:27:40 -05:00
github-actions fb15c48556 📝 Update release notes 2024-07-14 17:11:03 +00:00
gitworkflows 9d74b23670
♻️ Simplify internal docs script (#11777) 2024-07-14 12:10:43 -05:00
github-actions 3a8f6cd1a2 📝 Update release notes 2024-07-14 17:07:22 +00:00
kittydoor 60f7fe4006
📝 Update Hypercorn links in all the docs (#11744) 2024-07-14 12:06:59 -05:00
github-actions ce5ecaa2a2 📝 Update release notes 2024-07-14 16:22:25 +00:00
Maria Camila Gomez R ebc6a0653a
🌐 Add Spanish translation for `docs/es/docs/how-to/graphql.md` (#11697) 2024-07-14 11:22:03 -05:00
github-actions e23916d2f9 📝 Update release notes 2024-07-14 16:00:56 +00:00
Lucas Balieiro dfcc0322e4
🌐 Add Portuguese translation for `docs/pt/docs/reference/index.md` (#11840) 2024-07-14 11:00:35 -05:00
Sebastián Ramírez 9edba691e7 📝 Update release notes 2024-07-13 21:14:00 -05:00
github-actions 36264cffb8 📝 Update release notes 2024-07-14 02:04:19 +00:00
Anita Hammer 511199014f
🌐 Fix link in German translation (#11836)
Broken link on main page
2024-07-13 21:04:00 -05:00
github-actions 9f49708fd8 📝 Update release notes 2024-07-14 01:58:15 +00:00
DamianCzajkowski a3a6c61164
📝 Update docs with Ariadne reference from Starlette to FastAPI (#11797) 2024-07-13 20:57:52 -05:00
github-actions 41e87c0ded 📝 Update release notes 2024-07-14 01:49:49 +00:00
Nicoló Lino 3960b45223
📝 Update fastapi instrumentation external link (#11317) 2024-07-13 20:48:42 -05:00
github-actions 475f0d0158 📝 Update release notes 2024-07-14 01:46:44 +00:00
Augustus D'Souza f9ac185bf0
✏️ Fix links to alembic example repo in docs (#11628) 2024-07-14 01:46:19 +00:00
github-actions 13712e2720 📝 Update release notes 2024-07-14 01:24:27 +00:00
Lucas Balieiro 435c11a406
🌐 Add Portuguese translation for `docs/pt/docs/reference/exceptions.md` (#11834) 2024-07-13 20:24:05 -05:00
github-actions 2606671a0a 📝 Update release notes 2024-07-12 02:43:47 +00:00
João Pedro Pereira Holanda 7782dd677b
🌐 Add Portuguese translation for `docs/pt/docs/tutorial/dependencies/global-dependencies.md` (#11826) 2024-07-11 21:42:04 -05:00
github-actions 18d28d4370 📝 Update release notes 2024-07-12 02:41:39 +00:00
Lucas Balieiro c8414b986f
🌐 Add Portuguese translation for `docs/pt/docs/how-to/general.md` (#11825) 2024-07-11 21:41:15 -05:00
github-actions d3cdd3bbd1 📝 Update release notes 2024-07-11 03:37:40 +00:00
Rafael de Oliveira Marques 2d916a9c95
🌐 Add Portuguese translation for `docs/pt/docs/advanced/async-tests.md` (#11808) 2024-07-10 22:37:20 -05:00
github-actions 912524233b 📝 Update release notes 2024-07-09 17:59:20 +00:00
João Pedro Pereira Holanda 09b0a5d153
🌐 Add Portuguese translation for `docs/pt/docs/tutorial/dependencies/sub-dependencies.md` (#11792) 2024-07-09 12:58:59 -05:00
github-actions 846e8bc886 📝 Update release notes 2024-07-09 15:46:09 +00:00
Valentyn Khoroshchak 7039c5edc5
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/first-steps.md` (#11809) 2024-07-09 10:45:46 -05:00
github-actions b45d1da717 📝 Update release notes 2024-07-08 16:10:09 +00:00
João Pedro Pereira Holanda 4eb8db3cd3
🌐 Add Portuguese translation for `docs/pt/docs/tutorial/dependencies/dependencies-in-path-operation-operators.md` (#11804) 2024-07-08 11:09:45 -05:00
github-actions 4343170a28 📝 Update release notes 2024-07-05 13:46:40 +00:00
Logan d60f8c59b9
🌐 Add Chinese translation for `docs/zh/docs/fastapi-cli.md` (#11786) 2024-07-05 08:46:16 -05:00
github-actions 8d39e5b74a 📝 Update release notes 2024-07-04 20:53:46 +00:00
Rafael de Oliveira Marques dc3c320020
🌐 Add Portuguese translation for `docs/pt/docs/advanced/openapi-webhooks.md` (#11791) 2024-07-04 15:53:25 -05:00
github-actions eca465f4c9 📝 Update release notes 2024-07-03 02:18:33 +00:00
Logan f785676b83
🌐 Update Chinese translation for `docs/tutorial/security/oauth2-jwt.md` (#11781) 2024-07-02 21:17:04 -05:00
github-actions a5ce86dde5 📝 Update release notes 2024-07-03 02:16:13 +00:00
P-E. Brian 6b0dddf55a
📝 Fix image missing in French translation for `docs/fr/docs/async.md` (#11787) 2024-07-02 21:15:55 -05:00
github-actions 42d52b834a 📝 Update release notes 2024-07-01 23:09:02 +00:00
Sebastián Ramírez 0888b3ffc0
🔧 Update sponsors: add Fine (#11784) 2024-07-01 18:08:40 -05:00
github-actions c37d71da70 📝 Update release notes 2024-07-01 15:46:09 +00:00
Rafael de Oliveira Marques 172b3dfd43
🌐 Add Portuguese translation for `docs/pt/docs/advanced/advanced-dependencies.md` (#11775) 2024-07-01 10:45:45 -05:00
github-actions 2afbdb3a44 📝 Update release notes 2024-06-28 14:58:12 +00:00
João Pedro Pereira Holanda ed22cc107d
🌐 Add Portuguese translation for `docs/pt/docs/tutorial/dependencies/classes-as-dependencies.md` (#11768) 2024-06-28 09:57:49 -05:00
github-actions e304414c93 📝 Update release notes 2024-06-26 13:54:46 +00:00
Rafael de Oliveira Marques 8989940569
🌐 Add Portuguese translation for `docs/pt/docs/advanced/additional-status-codes.md` (#11753) 2024-06-26 08:54:00 -05:00
github-actions bd7d503314 📝 Update release notes 2024-06-26 13:53:37 +00:00
João Pedro Pereira Holanda 95e667a00a
🌐 Add Portuguese translation for `docs/pt/docs/tutorial/dependencies/index.md` (#11757) 2024-06-26 08:53:12 -05:00
github-actions e9f4b7975c 📝 Update release notes 2024-06-26 01:52:20 +00:00
Sebastián Ramírez b08f15048d
🔧 Tweak sponsors: Kong URL (#11765) 2024-06-25 20:52:00 -05:00
github-actions f497efaf94 📝 Update release notes 2024-06-26 01:46:45 +00:00
Sebastián Ramírez 4711785594
🔧 Tweak sponsors: Kong URL (#11764) 2024-06-25 20:46:25 -05:00
github-actions a74cb19495 📝 Update release notes 2024-06-26 01:33:22 +00:00
Sebastián Ramírez 913659c80d
🔧 Update sponsors, add Stainless (#11763) 2024-06-25 20:33:01 -05:00
github-actions c26931ae17 📝 Update release notes 2024-06-20 19:12:54 +00:00
github-actions 06839414fa 📝 Update release notes 2024-06-20 19:10:49 +00:00
João Pedro Pereira Holanda 85bad3303f
🌐 Add Portuguese translation for `docs/pt/docs/advanced/settings.md` (#11739) 2024-06-20 14:10:31 -05:00
github-actions 26431224d1 📝 Update release notes 2024-06-20 19:09:46 +00:00
Benjamin Vandamme b7a0fc7e12
🌐 Add French translation for `docs/fr/docs/learn/index.md` (#11712) 2024-06-20 14:09:17 -05:00
Victor Senna e62e5e8812
🌐 Add Portuguese translation for `docs/pt/docs/how-to/index.md` (#11731) 2024-06-20 14:07:51 -05:00
github-actions 33e2fbe20f 📝 Update release notes 2024-06-20 19:07:28 +00:00
Rafael de Oliveira Marques 1b9c402643
🌐 Add Portuguese translation for `docs/pt/docs/advanced/additional-responses.md` (#11736) 2024-06-20 14:06:58 -05:00
github-actions 653315c496 📝 Update release notes 2024-06-18 02:25:32 +00:00
Sebastián Ramírez 32259588e8
🔧 Update sponsors, add Zuplo (#11729) 2024-06-17 21:25:11 -05:00
github-actions d3388bb4ae 📝 Update release notes 2024-06-17 14:21:03 +00:00
Sebastián Ramírez 696dedf8e6
🔧 Update Sponsor link: Coherence (#11730) 2024-06-17 14:20:40 +00:00
github-actions d92a76f315 📝 Update release notes 2024-06-14 15:07:37 +00:00
github-actions df4291699f 📝 Update release notes 2024-06-14 15:07:16 +00:00
Rafael de Oliveira Marques a0761e2b16
🌐 Add Portuguese translation for `docs/pt/docs/advanced/benchmarks.md` (#11713) 2024-06-14 10:07:11 -05:00
Nayeon Kim 9d1f0e3512
🌐 Fix Korean translation for `docs/ko/docs/tutorial/response-status-code.md` (#11718) 2024-06-14 10:06:53 -05:00
github-actions 343f5539bd 📝 Update release notes 2024-06-14 02:45:32 +00:00
Nayeon Kim e4d08e9e1f
🌐 Add Korean translation for `docs/ko/docs/tutorial/extra-data-types.md` (#11711) 2024-06-13 21:45:10 -05:00
github-actions 6257afe304 📝 Update release notes 2024-06-12 23:40:10 +00:00
Alejandra 5422612008
✏️ Update `docs/en/docs/fastapi-cli.md` (#11715) 2024-06-12 18:39:50 -05:00
github-actions a883442ee0 📝 Update release notes 2024-06-12 12:49:59 +00:00
Nayeon Kim 40bb8fac5b
🌐 Fix Korean translation for `docs/ko/docs/tutorial/body-nested-models.md` (#11710) 2024-06-12 07:49:35 -05:00
github-actions 57c8490b0a 📝 Update release notes 2024-06-12 00:49:10 +00:00
Devon Ray 7030237306
📝 Update External Links (#11500) 2024-06-11 19:47:57 -05:00
github-actions 6bc235b2bb 📝 Update release notes 2024-06-12 00:46:09 +00:00
Eduardo Zepeda ad2a09f9f5
📝 Add External Link: Tutorial de FastAPI, ¿el mejor framework de Python? (#11618) 2024-06-11 19:45:46 -05:00
github-actions 695601dff4 📝 Update release notes 2024-06-11 23:50:18 +00:00
Ayrton 706d2499b5
🌐 Add Portuguese translation for `docs/pt/docs/advanced/fastapi-cli.md` (#11641) 2024-06-11 18:49:51 -05:00
github-actions 60d87c0ccb 📝 Update release notes 2024-06-09 02:02:11 +00:00
Walid B 99a491e95c
📝 Fix typo in `docs/en/docs/tutorial/body-multiple-params.md` (#11698) 2024-06-08 21:01:51 -05:00
github-actions ceaed0a447 📝 Update release notes 2024-06-05 21:38:20 +00:00
Ishan Anand 6fa46e4256
📝 Add External Link: Deploy a Serverless FastAPI App with Neon Postgres and AWS App Runner at any scale (#11633) 2024-06-05 16:37:59 -05:00
github-actions a9819dfd8d 📝 Update release notes 2024-06-05 00:08:22 +00:00
Max Su c5bcb806bb
🌐 Add Traditional Chinese translation for `docs/zh-hant/docs/fastapi-people.md` (#11639) 2024-06-04 19:07:01 -05:00
github-actions 72346962b0 📝 Update release notes 2024-06-05 00:06:12 +00:00
Hasan Sezer Taşan e1068116df
🌐 Add Turkish translation for `docs/tr/docs/advanced/index.md` (#11606) 2024-06-04 19:05:51 -05:00
github-actions aed266a7ef 📝 Update release notes 2024-06-03 01:48:39 +00:00
Alejandra 00ebe9c841
📝 Update `security/first-steps.md` (#11674) 2024-06-03 01:48:20 +00:00
github-actions e3d9f8cfc7 📝 Update release notes 2024-06-03 01:36:06 +00:00
Alejandra 3641c1ea55
📝 Update `security/first-steps.md` (#11673)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-06-02 20:35:46 -05:00
github-actions 54ab928acd 📝 Update release notes 2024-06-03 01:11:29 +00:00
Sebastián Ramírez e37dd75485
👥 Update FastAPI People (#11669)
Co-authored-by: github-actions <github-actions@github.com>
2024-06-02 20:09:53 -05:00
github-actions bcb8e64f67 📝 Update release notes 2024-06-01 21:06:19 +00:00
Alejandra 256426ede1
📝 Update note in `path-params-numeric-validations.md` (#11672) 2024-06-01 16:05:52 -05:00
github-actions 563b355a75 📝 Update release notes 2024-05-31 02:38:23 +00:00
Sebastián Ramírez ab8974ef04
📝 Tweak intro docs about `Annotated` and `Query()` params (#11664) 2024-05-30 21:38:05 -05:00
github-actions 995bd43619 📝 Update release notes 2024-05-30 13:28:41 +00:00
Sebastián Ramírez 803b9fca98
🔧 Add sponsor Kong (#11662) 2024-05-30 08:28:20 -05:00
github-actions ba1ac2b1f6 📝 Update release notes 2024-05-28 14:06:23 +00:00
Hasan Sezer Taşan a751cdd17f
🌐 Add Turkish translation for `docs/tr/docs/deployment/cloud.md` (#11610) 2024-05-28 09:05:55 -05:00
github-actions 8b4ce06065 📝 Update release notes 2024-05-27 16:23:10 +00:00
github-actions d523f7f340 📝 Update release notes 2024-05-27 16:22:14 +00:00
github-actions aadc3e7dc1 📝 Update release notes 2024-05-27 16:21:46 +00:00
Hasan Sezer Taşan a8a3971a99
🌐 Add Turkish translation for `docs/tr/docs/advanced/security/index.md` (#11609) 2024-05-27 11:21:37 -05:00
Hasan Sezer Taşan 59b17ce804
🌐 Add Turkish translation for `docs/tr/docs/advanced/testing-websockets.md` (#11608) 2024-05-27 11:21:03 -05:00
Hasan Sezer Taşan 54d0be2388
🌐 Add Turkish translation for `docs/tr/docs/how-to/general.md` (#11607) 2024-05-27 11:20:52 -05:00
github-actions 36269edf6a 📝 Update release notes 2024-05-27 16:19:42 +00:00
chaoless f7a11bc0b4
🌐 Update Chinese translation for `docs/zh/docs/advanced/templates.md` (#11620) 2024-05-27 11:19:21 -05:00
github-actions 86b410e623 📝 Update release notes 2024-05-23 22:59:22 +00:00
Nir Schulman a69f38340f
📝 Restored Swagger-UI links to use the latest version possible. (#11459) 2024-05-23 17:59:02 -05:00
github-actions dda2337722 📝 Update release notes 2024-05-23 22:47:02 +00:00
Hasan Sezer Taşan f1ab5300a7
🌐 Add Turkish translation for `docs/tr/docs/deployment/index.md` (#11605) 2024-05-23 17:46:42 -05:00
github-actions 3e6a59183b 📝 Update release notes 2024-05-20 23:57:31 +00:00
Hasan Sezer Taşan a4c4eb2964
🌐 Add Turkish translation for `docs/tr/docs/tutorial/static-files.md` (#11599) 2024-05-20 18:57:08 -05:00
github-actions bfe698c667 📝 Update release notes 2024-05-20 17:37:51 +00:00
Esteban Maya 5fa8e38681
📝 Update JWT auth documentation to use PyJWT instead of pyhon-jose (#11589)
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-05-20 10:37:28 -07:00
github-actions 710b320fd0 📝 Update release notes 2024-05-20 00:25:11 +00:00
Alejandra 651dd00a9e
📝 Update docs (#11603)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-05-19 17:24:48 -07:00
github-actions ca321db5db 📝 Update release notes 2024-05-18 23:43:36 +00:00
Hasan Sezer Taşan 76d0d81e70
✏️ Fix typo: convert every 're-use' to 'reuse'. (#11598) 2024-05-18 18:43:13 -05:00
github-actions ad85917f61 📝 Update release notes 2024-05-18 00:52:09 +00:00
Igor Sulim 22b033ebd7
🌐 Polish translation for `docs/pl/docs/fastapi-people.md` (#10196) 2024-05-17 19:50:03 -05:00
github-actions d4ce9d5a4a 📝 Update release notes 2024-05-18 00:49:30 +00:00
Hasan Sezer Taşan 23bc02c45a
🌐 Add Turkish translation for `docs/tr/docs/advanced/wsgi.md` (#11575) 2024-05-17 19:49:03 -05:00
github-actions 1dae11ce50 📝 Update release notes 2024-05-18 00:48:23 +00:00
Petar Marić 817cc1d754
✏️ Fix typo in `fastapi/applications.py` (#11593) 2024-05-17 19:48:03 -05:00
github-actions a32902606e 📝 Update release notes 2024-05-14 19:35:25 +00:00
Hasan Sezer Taşan 61ab73ea0f
🌐 Add Turkish translation for `docs/tr/docs/tutorial/cookie-params.md` (#11561) 2024-05-14 14:35:04 -05:00
github-actions 038e1142d7 📝 Update release notes 2024-05-13 00:58:56 +00:00
s111d dfa75c1587
🌐 Add Russian translation for `docs/ru/docs/about/index.md` (#10961) 2024-05-12 19:58:32 -05:00
github-actions af60d6d8ea 📝 Update release notes 2024-05-10 01:06:55 +00:00
Sebastián Ramírez efeee95db7
👷 Update Smokeshow, fix sync download artifact and smokeshow configs (#11563) 2024-05-09 18:06:31 -07:00
github-actions 2c6fb2ecd1 📝 Update release notes 2024-05-10 00:49:28 +00:00
Sebastián Ramírez 1f0eecba81
👷 Update Smokeshow download artifact GitHub Action (#11562) 2024-05-09 17:48:58 -07:00
github-actions e82e6479f2 📝 Update release notes 2024-05-10 00:30:46 +00:00
Tamir Duberstein 722107fe60
👷 Update GitHub actions to download and upload artifacts to v4, for docs and coverage (#11550)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-05-09 17:30:25 -07:00
github-actions 9642ff2637 📝 Update release notes 2024-05-08 19:11:08 +00:00
Hasan Sezer Taşan 8187c54c73
🌐 Add Turkish translation for `docs/tr/docs/tutorial/request-forms.md` (#11553) 2024-05-08 14:10:46 -05:00
github-actions 17c1ae886b 📝 Update release notes 2024-05-07 21:00:47 +00:00
chaoless c4f6439888
🌐 Update Chinese translation for `docs/zh/docs/tutorial/sql-databases.md` (#11539) 2024-05-07 16:00:22 -05:00
github-actions 8c2e9ddd50 📝 Update release notes 2024-05-07 18:31:47 +00:00
Sebastián Ramírez aa50dc200f
👷 Tweak CI for test-redistribute, add needed env vars for slim (#11549) 2024-05-07 11:31:27 -07:00
github-actions e04d397e32 📝 Update release notes 2024-05-05 21:35:58 +00:00
Lucas-lyh 0c82015a8c
🌐 Add Chinese translation for `docs/zh/docs/how-to/configure-swagger-ui.md` (#11501) 2024-05-05 16:34:13 -05:00
github-actions e688c57f30 📝 Update release notes 2024-05-05 21:33:20 +00:00
Nick Chen 6ec46c17d3
🌐 Update Chinese translation for `/docs/advanced/security/http-basic-auth.md` (#11512) 2024-05-05 16:32:54 -05:00
github-actions 8c572a9ef2 📝 Update release notes 2024-05-03 23:25:42 +00:00
Sofie Van Landeghem 9406e822ec
✏️ Fix link in `fastapi-cli.md` (#11524)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-05-03 16:25:16 -07:00
github-actions f243315696 📝 Update release notes 2024-05-03 22:21:32 +00:00
Sebastián Ramírez 96b1625eed
👥 Update FastAPI People (#11511)
Co-authored-by: github-actions <github-actions@github.com>
2024-05-03 17:21:11 -05:00
Sebastián Ramírez 1c3e691875 📝 Update release notes 2024-05-02 17:20:30 -07:00
Sebastián Ramírez ab8f557250 📝 Update release notes 2024-05-02 17:16:02 -07:00
Sebastián Ramírez 67da3bb52e 🔖 Release version 0.111.0 2024-05-02 15:50:18 -07:00
github-actions 9ed94e4f68 📝 Update release notes 2024-05-02 22:37:53 +00:00
Sebastián Ramírez d71be59217
Add FastAPI CLI, the new `fastapi` command (#11522) 2024-05-02 15:37:31 -07:00
github-actions a94ef3351e 📝 Update release notes 2024-04-30 06:38:41 +00:00
Sebastián Ramírez ea1f2190d3
🔧 Add configs and setup for `fastapi-slim` including optional extras `fastapi-slim[standard]`, and `fastapi` including by default the same `standard` extras (#11503) 2024-04-29 23:38:13 -07:00
Sebastián Ramírez 32be95dd86 🔖 Release version 0.110.3 2024-04-29 17:34:06 -07:00
Sebastián Ramírez 92b67b1b29 📝 Update release notes 2024-04-29 17:33:37 -07:00
Sebastián Ramírez e0a9692261 📝 Update release notes 2024-04-29 17:31:58 -07:00
github-actions 62f82296f3 📝 Update release notes 2024-04-30 00:03:35 +00:00
Sebastián Ramírez f49da74200
🔨 Update internal scripts and remove unused ones (#11499) 2024-04-29 17:03:14 -07:00
github-actions 13ce009e9a 📝 Update release notes 2024-04-29 23:49:03 +00:00
Sebastián Ramírez 41fcbc7d00
🔧 Migrate from Hatch to PDM for the internal build (#11498) 2024-04-29 16:48:42 -07:00
github-actions bec2ec7e4c 📝 Update release notes 2024-04-29 05:18:26 +00:00
Sebastián Ramírez 7b55bf37b5
📝 Update references to Python version, FastAPI supports all the current versions, no need to make the version explicit (#11496) 2024-04-28 22:18:04 -07:00
github-actions 285ac017a9 📝 Update release notes 2024-04-28 00:28:00 +00:00
dependabot[bot] d1293b8786
⬆ Bump mkdocstrings[python] from 0.23.0 to 0.24.3 (#11469)
Bumps [mkdocstrings[python]](https://github.com/mkdocstrings/mkdocstrings) from 0.23.0 to 0.24.3.
- [Release notes](https://github.com/mkdocstrings/mkdocstrings/releases)
- [Changelog](https://github.com/mkdocstrings/mkdocstrings/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mkdocstrings/mkdocstrings/compare/0.23.0...0.24.3)

---
updated-dependencies:
- dependency-name: mkdocstrings[python]
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-27 19:27:34 -05:00
github-actions 1d41a7d2df 📝 Update release notes 2024-04-27 14:31:16 +00:00
Ian Chiu 8045f34c52
🌐 Add Traditional Chinese translation for `docs/zh-hant/benchmarks.md` (#11484) 2024-04-27 09:30:56 -05:00
github-actions b254688f37 📝 Update release notes 2024-04-25 17:10:18 +00:00
Bill Zhong 026af6e248
🌐 Update Chinese translation for `docs/zh/docs/fastapi-people.md` (#11476) 2024-04-25 12:09:48 -05:00
github-actions 38929aae1b 📝 Update release notes 2024-04-23 22:29:42 +00:00
ch33zer 550092a3bd
✏️ Fix typo in `fastapi/security/api_key.py` (#11481) 2024-04-23 17:29:18 -05:00
github-actions 5c054fdd65 📝 Update release notes 2024-04-22 23:41:32 +00:00
Bill Zhong 943159afb0
🌐 Add Chinese translation for `docs/zh/docs/how-to/index.md` and `docs/zh/docs/how-to/general.md` (#11443) 2024-04-22 18:41:09 -05:00
github-actions 91dad1cb3a 📝 Update release notes 2024-04-19 19:30:49 +00:00
Fabian Falon 1551913223
🌐 Add Spanish translation for cookie-params `docs/es/docs/tutorial/cookie-params.md` (#11410) 2024-04-19 14:30:26 -05:00
github-actions e00d29e784 📝 Update release notes 2024-04-19 15:30:04 +00:00
Omar Mokhtar ce1fb1a23b
✏️ Fix typo in `security/http.py` (#11455) 2024-04-19 10:29:38 -05:00
github-actions 25c692d77d 📝 Update release notes 2024-04-19 01:03:14 +00:00
Sebastián Ramírez 2f686ce1e5
⬆️ Upgrade MkDocs Material and re-enable cards (#11466) 2024-04-18 19:56:59 -05:00
github-actions 14442d356f 📝 Update release notes 2024-04-19 00:46:03 +00:00
dependabot[bot] 11f95ddef6
⬆ Bump pillow from 10.2.0 to 10.3.0 (#11403)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.2.0 to 10.3.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.2.0...10.3.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-18 19:43:24 -05:00
github-actions fb165a55f0 📝 Update release notes 2024-04-19 00:42:15 +00:00
Sebastián Ramírez 1aedc6e29d
🔧 Ungroup dependabot updates (#11465) 2024-04-18 19:41:55 -05:00
Sebastián Ramírez be1e3faa63 🔖 Release version 0.110.2 2024-04-18 19:31:47 -05:00
github-actions 4ae63ae495 📝 Update release notes 2024-04-19 00:12:01 +00:00
Nils Lindemann 6d523d62d0
📝 Fix types in examples under `docs_src/extra_data_types` (#10535)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-04-18 19:11:40 -05:00
github-actions d84d6e03f4 📝 Update release notes 2024-04-18 23:59:09 +00:00
Sebastián Ramírez a901e2f449
📝 Update references to UJSON (#11464) 2024-04-18 18:58:47 -05:00
github-actions 8a45645177 📝 Update release notes 2024-04-18 22:49:56 +00:00
Paul 74cc33d16b
♻️ Simplify Pydantic configs in OpenAPI models in `fastapi/openapi/models.py` (#10886)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-04-18 17:49:33 -05:00
github-actions 5815fa58fb 📝 Update release notes 2024-04-18 21:57:19 +00:00
arjwilliams 09e4859cab
🐛 Fix support for query parameters with list types, handle JSON encoding Pydantic `UndefinedType` (#9929)
Co-authored-by: Andrew Williams <Andrew.Williams@contemi.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-04-18 16:56:59 -05:00
github-actions 071b8f27f9 📝 Update release notes 2024-04-18 21:53:48 +00:00
Waket Zheng f08234f35a
🌐 Update Chinese translation for `docs/zh/docs/index.html` (#11430)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-04-18 16:53:24 -05:00
github-actions 610534b703 📝 Update release notes 2024-04-18 19:53:46 +00:00
Nils Lindemann ebc8ac7295
📝 Tweak docs and translations links, typos, format (#11389)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-04-18 14:53:19 -05:00
github-actions 3cc5efc5de 📝 Update release notes 2024-04-18 19:41:22 +00:00
Sebastián Ramírez 27da0d02a7
Add support for Pydantic's 2.7 new deprecated Field parameter, remove URL from validation errors response (#11461) 2024-04-18 14:40:57 -05:00
github-actions 3425c834cc 📝 Update release notes 2024-04-06 15:44:16 +00:00
Anton Yakovlev 91606c3c38
🌐 Add Russian translation for `docs/ru/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md` (#11411) 2024-04-06 10:43:55 -05:00
github-actions 7e161b3f9e 📝 Update release notes 2024-04-04 14:22:38 +00:00
Fabian Falon 9e074c2ed2
📝 Fix typo in `docs/es/docs/async.md` (#11400) 2024-04-04 09:20:53 -05:00
github-actions 886dc33f85 📝 Update release notes 2024-04-04 14:20:26 +00:00
Nazaré da Piedade f810c65e7c
🌐 Add Portuguese translations for `learn/index.md` `resources/index.md` `help/index.md` `about/index.md` (#10807) 2024-04-04 09:20:02 -05:00
github-actions 8dfdf69d6b 📝 Update release notes 2024-04-03 16:23:13 +00:00
Lufa1u 7ae1f9003f
🌐 Update Russian translations for deployments docs (#11271) 2024-04-03 11:22:47 -05:00
github-actions 247b58e0f5 📝 Update release notes 2024-04-03 15:35:08 +00:00
Sk Imtiaz Ahmed 2e55203879
🌐 Add Bengali translations for `docs/bn/docs/python-types.md` (#11376) 2024-04-03 10:34:37 -05:00
github-actions 9490491595 📝 Update release notes 2024-04-03 03:42:35 +00:00
Jordan Shatford 71321f0129
📝 Update OpenAPI client generation docs to use `@hey-api/openapi-ts` (#11339)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-04-02 22:42:11 -05:00
github-actions a09c1a034d 📝 Update release notes 2024-04-02 22:38:55 +00:00
github-actions ebcbe3c325 📝 Update release notes 2024-04-02 22:38:22 +00:00
DoHyun Kim d6997ab2a0
🌐 Add Korean translation for `docs/ko/docs/tutorial/security/simple-oauth2.md` (#5744) 2024-04-02 17:37:23 -05:00
kty4119 5a297971a1
🌐 Add Korean translation for `docs/ko/docs/help-fastapi.md` (#4139) 2024-04-02 17:36:57 -05:00
github-actions a85c02b85c 📝 Update release notes 2024-04-02 22:36:18 +00:00
Dong-Young Kim c964d04004
🌐 Add Korean translation for `docs/ko/docs/advanced/events.md` (#5087) 2024-04-02 17:35:55 -05:00
github-actions 62705820d6 📝 Update release notes 2024-04-02 04:38:47 +00:00
SwftAlpc 31dabcb99c
🌐 Add Japanese translation for `docs/ja/docs/tutorial/path-operation-configuration.md` (#1954)
Co-authored-by: ryusuke.miyaji <bluce826@gmail.com>
Co-authored-by: ryuckel <36391432+ryuckel@users.noreply.github.com>
Co-authored-by: tokusumi <tksmtoms@gmail.com>
Co-authored-by: T. Tokusumi <41147016+tokusumi@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-04-01 23:38:26 -05:00
github-actions e68b638f6e 📝 Update release notes 2024-04-02 04:31:41 +00:00
SwftAlpc 6dc9e4a7e4
🌐 Add Japanese translation for `docs/ja/docs/tutorial/request-forms-and-files.md` (#1946)
Co-authored-by: ryusuke.miyaji <bluce826@gmail.com>
Co-authored-by: ryuckel <36391432+ryuckel@users.noreply.github.com>
Co-authored-by: tokusumi <tksmtoms@gmail.com>
Co-authored-by: T. Tokusumi <41147016+tokusumi@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-04-01 23:31:22 -05:00
github-actions 01c3556e79 📝 Update release notes 2024-04-02 04:21:47 +00:00
Aleksandr Andrukhov a9b0911470
🌐 Add Russian translation for `docs/ru/docs/tutorial/dependencies/dependencies-with-yield.md` (#10532) 2024-04-01 23:21:06 -05:00
github-actions c07fd2d499 📝 Update release notes 2024-04-02 04:18:33 +00:00
JungWooGeon bfd6060996
🌐 Add Korean translation for `docs/ko/docs/tutorial/debugging.md` (#5695)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-04-01 23:18:08 -05:00
github-actions e98eb07944 📝 Update release notes 2024-04-02 03:23:15 +00:00
Sebastián Ramírez 1a24c1ef05
⬆️ Upgrade version of typer for docs (#11393) 2024-04-01 22:21:48 -05:00
Sebastián Ramírez 50a880b39f 🔖 Release version 0.110.1 2024-04-01 22:17:13 -05:00
github-actions 5f96d7ea8a 📝 Update release notes 2024-04-02 03:12:21 +00:00
dependabot[bot] d3d9f60a1e
⬆ Bump actions/cache from 3 to 4 (#10988)
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-04-01 22:12:00 -05:00
github-actions 2016de07e0 📝 Update release notes 2024-04-02 02:56:08 +00:00
github-actions c27439d0b4 📝 Update release notes 2024-04-02 02:54:32 +00:00
github-actions 597741771d 📝 Update release notes 2024-04-02 02:53:07 +00:00
Nadav Zingerman eec612ca8d
🐛 Fix parameterless `Depends()` with generics (#9479)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-04-01 21:52:56 -05:00
dependabot[bot] 3c39b1cc0b
⬆ Bump pypa/gh-action-pypi-publish from 1.8.11 to 1.8.14 (#11318)
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.8.11 to 1.8.14.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.8.11...v1.8.14)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-01 21:51:11 -05:00
github-actions dce7c66275 📝 Update release notes 2024-04-02 02:51:05 +00:00
dependabot[bot] 7fb46eab07
⬆ Bump pillow from 10.1.0 to 10.2.0 (#11011)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.1.0 to 10.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.1.0...10.2.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-04-02 02:50:49 +00:00
dependabot[bot] cf6070a491
⬆ Bump black from 23.3.0 to 24.3.0 (#11325)
Bumps [black](https://github.com/psf/black) from 23.3.0 to 24.3.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/23.3.0...24.3.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-01 21:50:33 -05:00
github-actions 58a1a7e8e1 📝 Update release notes 2024-04-02 02:49:14 +00:00
Aleksei Kotenko 9c80842cea
♻️ Update mypy (#11049)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-04-01 21:48:51 -05:00
github-actions 1fcf3884e1 📝 Update release notes 2024-04-02 02:34:42 +00:00
Nils Lindemann 4d2e77cdb7
🌐 Add German translation for `docs/de/docs/tutorial/response-status-code.md` (#10357) 2024-04-01 21:32:57 -05:00
github-actions 2c0c220948 📝 Update release notes 2024-04-02 02:29:00 +00:00
Rafael Barbosa 0cf5ad8619
⬆️ Upgrade Starlette to >=0.37.2,<0.38.0, remove Starlette filterwarning for internal tests (#11266) 2024-04-01 21:28:39 -05:00
github-actions 3c4945e9ea 📝 Update release notes 2024-04-02 01:55:09 +00:00
Esteban Maya ce2a580dd9
👷 Add cron to run test once a week on monday (#11377) 2024-04-01 20:54:47 -05:00
github-actions 8ed3b734cd 📝 Update release notes 2024-04-01 23:12:42 +00:00
Sebastián Ramírez 5282481d0f
👥 Update FastAPI People (#11387)
Co-authored-by: github-actions <github-actions@github.com>
2024-04-01 18:12:23 -05:00
github-actions 9f882de826 📝 Update release notes 2024-04-01 16:49:18 +00:00
Sebastián Ramírez 7fbaa1f7d8
Replace mkdocs-markdownextradata-plugin with mkdocs-macros-plugin (#11383) 2024-04-01 11:48:56 -05:00
github-actions 093a75d885 📝 Update release notes 2024-04-01 05:42:37 +00:00
github-actions 796d0c00a6 📝 Update release notes 2024-04-01 05:38:55 +00:00
jaystone776 ffb036b7d8
🌐 Update Chinese translation for `docs/zh/docs/tutorial/query-params.md` (#3480)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-01 00:36:47 -05:00
github-actions ec96922a28 📝 Update release notes 2024-04-01 05:36:23 +00:00
jaystone776 66dfbb6504
🌐 Update Chinese translation for `docs/zh/docs/tutorial/body.md` (#3481)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-01 00:36:16 -05:00
github-actions 6eff70f294 📝 Update release notes 2024-04-01 05:35:49 +00:00
jaystone776 1e06b177cc
🌐 Update Chinese translation for `docs/zh/docs/tutorial/path-params.md` (#3479)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-01 00:35:40 -05:00
jaystone776 cc8d20e654
🌐 Update Chinese translation for `docs/tutorial/body-fields.md` (#3496)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-01 00:35:27 -05:00
github-actions 620cdb5567 📝 Update release notes 2024-04-01 01:16:17 +00:00
jaystone776 8108cdb737
🌐 Update Chinese translation for `docs/tutorial/extra-models.md` (#3497)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-31 20:15:53 -05:00
github-actions 242ed3bf95 📝 Update release notes 2024-03-31 23:53:11 +00:00
Sebastián Ramírez c1796275f9
📝 Tweak docs and translations links and remove old docs translations (#11381) 2024-03-31 18:52:53 -05:00
github-actions d8449b2fff 📝 Update release notes 2024-03-31 16:37:43 +00:00
igeni ee6403212b
♻️ Simplify string format with f-strings in `fastapi/applications.py` (#11335) 2024-03-31 11:37:21 -05:00
github-actions 4c2de5e2c3 📝 Update release notes 2024-03-31 02:47:18 +00:00
tokusumi 267af47566
🌐 Add Japanese translation for `docs/ja/docs/tutorial/metadata.md` (#2667)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-03-30 21:46:56 -05:00
github-actions 78a883d2c3 📝 Update release notes 2024-03-31 00:16:43 +00:00
github-actions 90f4b93c3e 📝 Update release notes 2024-03-31 00:00:20 +00:00
Nils Lindemann cdfa322651
🌐 Add German translation for `docs/de/docs/contributing.md` (#10487) 2024-03-30 18:55:23 -05:00
github-actions 447527be5d 📝 Update release notes 2024-03-30 23:51:04 +00:00
github-actions bc1ec514ad 📝 Update release notes 2024-03-30 23:50:22 +00:00
github-actions 05b88371bb 📝 Update release notes 2024-03-30 23:49:41 +00:00
github-actions 9a5a429aa0 📝 Update release notes 2024-03-30 23:49:10 +00:00
github-actions aa73071b5e 📝 Update release notes 2024-03-30 23:48:20 +00:00
github-actions 602445f305 📝 Update release notes 2024-03-30 23:47:46 +00:00
github-actions 42d62eb028 📝 Update release notes 2024-03-30 23:46:03 +00:00
github-actions 8c3aa5e012 📝 Update release notes 2024-03-30 23:45:27 +00:00
github-actions 34caf8e42b 📝 Update release notes 2024-03-30 23:44:43 +00:00
github-actions 9c99c43a94 📝 Update release notes 2024-03-30 23:44:05 +00:00
github-actions f61eeb6b18 📝 Update release notes 2024-03-30 23:43:27 +00:00
github-actions 8f2be5e005 📝 Update release notes 2024-03-30 23:41:42 +00:00
github-actions 802f8bc9b6 📝 Update release notes 2024-03-30 23:40:53 +00:00
github-actions 2e355c47f9 📝 Update release notes 2024-03-30 23:40:22 +00:00
github-actions 51e98121d0 📝 Update release notes 2024-03-30 23:39:41 +00:00
github-actions 376726d025 📝 Update release notes 2024-03-30 23:39:09 +00:00
github-actions d75cfa1e0c 📝 Update release notes 2024-03-30 23:36:09 +00:00
Takayoshi Urushio 08c0376582
🌐 Update Japanese translation of `docs/ja/docs/tutorial/query-params.md` (#10808)
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
2024-03-30 18:22:21 -05:00
jaystone776 e99a15db76
🌐 Update Chinese translation for `docs/zh/docs/tutorial/security/get-current-user.md` (#3842)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-30 17:46:46 -05:00
jaystone776 ae315b7f1a
🌐 Add Chinese translation for `docs/zh/docs/advanced/openapi-callbacks.md` (#3825)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-30 17:46:28 -05:00
jaystone776 0e0bae46b5
🌐 Add Chinese translation for `docs/zh/docs/advanced/extending-openapi.md` (#3823)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-30 17:46:12 -05:00
jaystone776 3cf500da06
🌐 Add Chinese translation for `docs/zh/docs/advanced/testing-dependencies.md` (#3819)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-30 17:45:53 -05:00
jaystone776 1faf30d1d5
🌐 Add Chinese translation for `docs/zh/docs/advanced/custom-request-and-route.md` (#3816)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-30 17:45:40 -05:00
jaystone776 ca4da93cf2
🌐 Add Chinese translation for `docs/zh/docs/external-links.md` (#3833)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-03-30 17:45:29 -05:00
jaystone776 807cb3e2ee
🌐 Add Chinese translation for `docs/zh/docs/advanced/templates.md` (#3812)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-30 17:45:16 -05:00
jaystone776 cca48b3956
🌐 Add Chinese translation for `docs/zh/docs/advanced/sub-applications.md` (#3811)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-30 17:45:04 -05:00
jaystone776 8edc04f84c
🌐 Add Chinese translation for `docs/zh/docs/advanced/async-sql-databases.md` (#3805)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-30 17:44:40 -05:00
jaystone776 3e6c1e455b
🌐 Add Chinese translation for `docs/zh/docs/advanced/middleware.md` (#3804)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-30 17:44:27 -05:00
jaystone776 bc6f4ae5ee
🌐 Add Chinese translation for `docs/zh/docs/advanced/dataclasses.md` (#3803)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-30 17:44:14 -05:00
jaystone776 23ddb24279
🌐 Add Chinese translation for `docs/zh/docs/advanced/using-request-directly.md` (#3802)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-30 17:44:02 -05:00
jaystone776 32b5c3fbbb
🌐 Add Chinese translation for `docs/zh/docs/advanced/security/http-basic-auth.md` (#3801)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-30 17:43:48 -05:00
jaystone776 6bee636f90
🌐 Add Chinese translation for `docs/zh/docs/advanced/security/oauth2-scopes.md` (#3800)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-30 17:43:35 -05:00
jaystone776 3c7cd6f85f
🌐 Update Chinese translation for `docs/zh/docs/tutorial/cookie-params.md` (#3486)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-30 17:43:06 -05:00
jaystone776 3c70d6f231
🌐 Update Chinese translation for `docs/zh/docs/tutorial/header-params.md` (#3487)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-30 17:42:51 -05:00
jaystone776 2774e0fcd8
🌐 Update Chinese translation for `docs/tutorial/response-status-code.md` (#3498)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-30 17:40:18 -05:00
github-actions f2778cf28c 📝 Update release notes 2024-03-30 22:19:03 +00:00
github-actions af6558aa40 📝 Update release notes 2024-03-30 21:31:50 +00:00
github-actions b1067780d8 📝 Update release notes 2024-03-30 21:30:30 +00:00
github-actions 5df31886ad 📝 Update release notes 2024-03-30 21:29:44 +00:00
github-actions 1aa2b75667 📝 Update release notes 2024-03-30 21:29:13 +00:00
github-actions 262e455496 📝 Update release notes 2024-03-30 21:27:47 +00:00
github-actions adae85259c 📝 Update release notes 2024-03-30 21:27:14 +00:00
github-actions fdcf67c6ae 📝 Update release notes 2024-03-30 21:26:19 +00:00
github-actions b2cf379680 📝 Update release notes 2024-03-30 21:25:44 +00:00
github-actions e478f14fc4 📝 Update release notes 2024-03-30 21:24:55 +00:00
github-actions a2ec91e205 📝 Update release notes 2024-03-30 21:24:20 +00:00
github-actions 9ad13c95a6 📝 Update release notes 2024-03-30 21:22:47 +00:00
github-actions 7e40dd9673 📝 Update release notes 2024-03-30 21:22:14 +00:00
github-actions 090fcd6879 📝 Update release notes 2024-03-30 21:21:36 +00:00
github-actions 51a6dd6114 📝 Update release notes 2024-03-30 21:20:50 +00:00
github-actions f601756ab7 📝 Update release notes 2024-03-30 21:20:04 +00:00
github-actions 05c54c1cd9 📝 Update release notes 2024-03-30 21:19:30 +00:00
github-actions 19397b35dc 📝 Update release notes 2024-03-30 21:18:45 +00:00
github-actions de756f42fd 📝 Update release notes 2024-03-30 21:18:07 +00:00
github-actions 3afcf4e370 📝 Update release notes 2024-03-30 21:17:14 +00:00
github-actions 3242b13abf 📝 Update release notes 2024-03-30 21:16:46 +00:00
github-actions 27b1bd12ff 📝 Update release notes 2024-03-30 21:15:52 +00:00
github-actions 2f47119f70 📝 Update release notes 2024-03-30 21:14:29 +00:00
github-actions 8a6ac93677 📝 Update release notes 2024-03-30 21:13:53 +00:00
github-actions a25e4cad6d 📝 Update release notes 2024-03-30 21:11:12 +00:00
github-actions d6c814a927 📝 Update release notes 2024-03-30 21:11:05 +00:00
github-actions 472c69df83 📝 Update release notes 2024-03-30 21:10:50 +00:00
github-actions e664e5e0f0 📝 Update release notes 2024-03-30 21:10:41 +00:00
github-actions d576622aae 📝 Update release notes 2024-03-30 21:10:37 +00:00
github-actions e12303e973 📝 Update release notes 2024-03-30 21:09:48 +00:00
github-actions ae80b91922 📝 Update release notes 2024-03-30 21:09:23 +00:00
github-actions 8d8ea4316e 📝 Update release notes 2024-03-30 21:07:21 +00:00
github-actions 57e0af29b2 📝 Update release notes 2024-03-30 21:06:49 +00:00
github-actions 6f4b0eb8f2 📝 Update release notes 2024-03-30 21:06:05 +00:00
github-actions 8064a36a4f 📝 Update release notes 2024-03-30 21:05:28 +00:00
github-actions de45cc22ae 📝 Update release notes 2024-03-30 21:04:38 +00:00
github-actions 31d3528c62 📝 Update release notes 2024-03-30 21:04:08 +00:00
github-actions 9bb85c6485 📝 Update release notes 2024-03-30 21:03:34 +00:00
github-actions 9da3d78ab1 📝 Update release notes 2024-03-30 21:02:42 +00:00
github-actions d371c69e47 📝 Update release notes 2024-03-30 21:02:03 +00:00
github-actions 20b8c51202 📝 Update release notes 2024-03-30 21:01:27 +00:00
github-actions 7fc0157973 📝 Update release notes 2024-03-30 21:00:42 +00:00
github-actions 18e2ad57a3 📝 Update release notes 2024-03-30 21:00:04 +00:00
github-actions 707c918381 📝 Update release notes 2024-03-30 20:59:30 +00:00
github-actions 255366dff6 📝 Update release notes 2024-03-30 20:58:47 +00:00
github-actions 914a82b41d 📝 Update release notes 2024-03-30 20:58:13 +00:00
github-actions 975e0ab5ac 📝 Update release notes 2024-03-30 20:57:36 +00:00
Nils Lindemann c457f320d9
🌐 Add German translation for `docs/de/docs/advanced/events.md` (#10693) 2024-03-30 15:30:59 -05:00
Nils Lindemann c9ab682644
🌐 Add German translation for `docs/de/docs/deployment/cloud.md` (#10746) 2024-03-30 15:30:18 -05:00
Nils Lindemann 7292a59a48
🌐 Add German translation for `docs/de/docs/advanced/behind-a-proxy.md` (#10675) 2024-03-30 15:30:07 -05:00
Nils Lindemann cd19ede25e
🌐 Add German translation for `docs/de/docs/help-fastapi.md` (#10455) 2024-03-30 15:29:57 -05:00
github-actions 36dca65339 📝 Update release notes 2024-03-30 20:29:38 +00:00
Nils Lindemann b2835136a6
🌐 Update German translation for `docs/de/docs/python-types.md` (#10287) 2024-03-30 15:29:25 -05:00
Nils Lindemann ffabc36caf
🌐 Add German translation for `docs/de/docs/tutorial/path-params.md` (#10290)
Co-authored-by: Georg Wicke-Arndt <g.wicke-arndt@outlook.com>
2024-03-30 15:28:59 -05:00
Nils Lindemann 6e47b3256e
🌐 Add German translation for `docs/de/docs/tutorial/handling-errors.md` (#10379) 2024-03-30 15:28:29 -05:00
Nils Lindemann c196794f24
🌐 Update German translation for `docs/de/docs/index.md` (#10283) 2024-03-30 15:28:17 -05:00
Nils Lindemann 6de6e672f4
🌐 Add German translation for `docs/de/docs/advanced/security/http-basic-auth.md` (#10651) 2024-03-30 15:28:08 -05:00
Nils Lindemann 43c6e408e4
🌐 Add German translation for `docs/de/docs/tutorial/bigger-applications.md` (#10554) 2024-03-30 15:27:59 -05:00
Nils Lindemann f5410ce24a
🌐 Add German translation for `docs/de/docs/advanced/path-operation-advanced-configuration.md` (#10612) 2024-03-30 15:27:23 -05:00
Nils Lindemann 1506010664
🌐 Add German translation for `docs/de/docs/tutorial/static-files.md` (#10584) 2024-03-30 15:27:14 -05:00
Nils Lindemann a2d42e32d2
🌐 Add German translation for `docs/de/docs/tutorial/security/oauth2-jwt.md` (#10522) 2024-03-30 15:27:06 -05:00
Nils Lindemann a8127fe48f
🌐 Add German translation for `docs/de/docs/tutorial/response-model.md` (#10345) 2024-03-30 15:26:58 -05:00
Nils Lindemann 71c60bc5f5
🌐 Add German translation for `docs/de/docs/tutorial/extra-models.md` (#10351) 2024-03-30 15:26:47 -05:00
Nils Lindemann 1da96eff26
🌐 Add German translation for `docs/de/docs/tutorial/body-updates.md` (#10396) 2024-03-30 15:26:37 -05:00
Nils Lindemann b9b6963f15
🌐 Add German translation for `docs/de/docs/alternatives.md` (#10855) 2024-03-30 15:26:28 -05:00
Nils Lindemann ccc738cd0f
🌐 Add German translation for `docs/de/docs/advanced/templates.md` (#10678) 2024-03-30 15:26:19 -05:00
Nils Lindemann dccf41c51e
🌐 Add German translation for `docs/de/docs/advanced/security/oauth2-scopes.md` (#10643) 2024-03-30 15:26:08 -05:00
Nils Lindemann 459ace50bc
🌐 Add German translation for `docs/de/docs/advanced/async-tests.md` (#10708) 2024-03-30 15:25:57 -05:00
Nils Lindemann df50cd081e
🌐 Add German translation for `docs/de/docs/tutorial/metadata.md` (#10581) 2024-03-30 15:25:38 -05:00
Nils Lindemann 247611337c
🌐 Add German translation for `docs/de/docs/tutorial/testing.md` (#10586) 2024-03-30 15:20:01 -05:00
Nils Lindemann de25cc7fa9
🌐 Add German translation for `docs/de/docs/tutorial/schema-extra-example.md` (#10597) 2024-03-30 15:19:53 -05:00
Nils Lindemann fd4a727e45
🌐 Add German translation for `docs/de/docs/advanced/index.md` (#10611) 2024-03-30 15:19:44 -05:00
Nils Lindemann 7c10c1cc01
🌐 Add German translation for `docs/de/docs/advanced/response-directly.md` (#10618) 2024-03-30 15:19:36 -05:00
Nils Lindemann 552197a417
🌐 Add German translation for `docs/de/docs/advanced/additional-responses.md` (#10626) 2024-03-30 15:19:26 -05:00
Nils Lindemann 8d211155a0
🌐 Add German translation for `docs/de/docs/advanced/response-cookies.md` (#10627) 2024-03-30 15:19:17 -05:00
Nils Lindemann 8de82dc8d6
🌐 Add German translation for `docs/de/docs/advanced/response-headers.md` (#10628) 2024-03-30 15:19:06 -05:00
Nils Lindemann 85a868d522
🌐 Add German translation for `docs/de/docs/advanced/response-change-status-code.md` (#10632) 2024-03-30 15:18:58 -05:00
Nils Lindemann 8ee29c54c9
🌐 Add German translation for `docs/de/docs/advanced/advanced-dependencies.md` (#10633) 2024-03-30 15:18:49 -05:00
Nils Lindemann e8537099ac
🌐 Add German translation for `docs/de/docs/advanced/security/index.md` (#10635) 2024-03-30 15:18:40 -05:00
Nils Lindemann 3a327ccfb5
🌐 Add German translation for `docs/de/docs/advanced/using-request-directly.md` (#10653) 2024-03-30 15:18:32 -05:00
Nils Lindemann 92f36da16a
🌐 Add German translation for `docs/de/docs/advanced/dataclasses.md` (#10667) 2024-03-30 15:18:23 -05:00
Nils Lindemann 3b2160b69d
🌐 Add German translation for `docs/de/docs/advanced/middleware.md` (#10668) 2024-03-30 15:18:15 -05:00
Nils Lindemann 38cdebfdaa
🌐 Add German translation for `docs/de/docs/advanced/sub-applications.md` (#10671) 2024-03-30 15:18:06 -05:00
Nils Lindemann f6fd035cef
🌐 Add German translation for `docs/de/docs/advanced/websockets.md` (#10687) 2024-03-30 15:17:58 -05:00
Nils Lindemann 3a264f730b
🌐 Add German translation for `docs/de/docs/advanced/testing-websockets.md` (#10703) 2024-03-30 15:17:48 -05:00
Nils Lindemann d5a8d8faa4
🌐 Add German translation for `docs/de/docs/advanced/testing-events.md` (#10704) 2024-03-30 15:17:40 -05:00
Nils Lindemann cf101d4859
🌐 Add German translation for `docs/de/docs/advanced/testing-dependencies.md` (#10706) 2024-03-30 15:17:32 -05:00
Nils Lindemann be8fab0e50
🌐 Add German translation for `docs/de/docs/advanced/openapi-callbacks.md` (#10710) 2024-03-30 15:17:23 -05:00
Nils Lindemann e9c6dfd448
🌐 Add German translation for `docs/de/docs/advanced/settings.md` (#10709) 2024-03-30 15:17:14 -05:00
Nils Lindemann beb0235aad
🌐 Add German translation for `docs/de/docs/advanced/wsgi.md` (#10713) 2024-03-30 15:17:05 -05:00
Nils Lindemann 0a27f39772
🌐 Add German translation for `docs/de/docs/deployment/index.md` (#10733) 2024-03-30 15:16:56 -05:00
Nils Lindemann 19694bc839
🌐 Add German translation for `docs/de/docs/deployment/https.md` (#10737) 2024-03-30 15:16:46 -05:00
Nils Lindemann 6590b52319
🌐 Add German translation for `docs/de/docs/deployment/manually.md` (#10738) 2024-03-30 15:16:35 -05:00
Nils Lindemann e1a0c83fe3
🌐 Add German translation for `docs/de/docs/deployment/concepts.md` (#10744) 2024-03-30 15:16:25 -05:00
Nils Lindemann 4f29ce7110
🌐 Update German translation for `docs/de/docs/features.md` (#10284)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-03-30 14:43:43 -05:00
github-actions 9d6aa67dd1 📝 Update release notes 2024-03-30 18:52:38 +00:00
github-actions 39b222a0b5 📝 Update release notes 2024-03-30 18:52:02 +00:00
github-actions 264f216539 📝 Update release notes 2024-03-30 18:49:37 +00:00
github-actions 96b884a477 📝 Update release notes 2024-03-30 18:48:51 +00:00
github-actions 307d19e93d 📝 Update release notes 2024-03-30 18:48:05 +00:00
github-actions bf47ce1d18 📝 Update release notes 2024-03-30 18:47:24 +00:00
github-actions e5750e55ee 📝 Update release notes 2024-03-30 18:46:43 +00:00
github-actions 3725bfbf5f 📝 Update release notes 2024-03-30 18:46:01 +00:00
github-actions 7a3d9a0a03 📝 Update release notes 2024-03-30 18:45:27 +00:00
github-actions 1b7851e2e8 📝 Update release notes 2024-03-30 18:44:02 +00:00
github-actions 89c4c7ec6e 📝 Update release notes 2024-03-30 18:43:20 +00:00
github-actions 388de5c7e6 📝 Update release notes 2024-03-30 18:42:40 +00:00
github-actions 0a764f2bfc 📝 Update release notes 2024-03-30 18:42:00 +00:00
github-actions 0647300131 📝 Update release notes 2024-03-30 18:40:38 +00:00
github-actions 8baf7ca16d 📝 Update release notes 2024-03-30 18:40:06 +00:00
github-actions a01f0812db 📝 Update release notes 2024-03-30 18:39:28 +00:00
github-actions 779b5953a2 📝 Update release notes 2024-03-30 18:38:38 +00:00
github-actions 9f955fe6c5 📝 Update release notes 2024-03-30 18:38:10 +00:00
github-actions 05a0d04115 📝 Update release notes 2024-03-30 18:37:25 +00:00
github-actions d7ddf9989a 📝 Update release notes 2024-03-30 18:36:51 +00:00
github-actions fe884959cd 📝 Update release notes 2024-03-30 18:35:29 +00:00
github-actions b8d7dda04c 📝 Update release notes 2024-03-30 18:34:52 +00:00
github-actions 2cfba8a371 📝 Update release notes 2024-03-30 18:34:13 +00:00
github-actions 5c8292af8b 📝 Update release notes 2024-03-30 18:33:30 +00:00
github-actions 47412a4c25 📝 Update release notes 2024-03-30 18:32:40 +00:00
github-actions dcb935e486 📝 Update release notes 2024-03-30 18:28:28 +00:00
github-actions e4570cafc0 📝 Update release notes 2024-03-30 18:25:52 +00:00
github-actions e1a7c03c4d 📝 Update release notes 2024-03-30 18:25:00 +00:00
github-actions 143fd39756 📝 Update release notes 2024-03-30 18:24:12 +00:00
github-actions 3d9f95cf78 📝 Update release notes 2024-03-30 18:23:38 +00:00
github-actions ac3e8da01c 📝 Update release notes 2024-03-30 18:22:53 +00:00
github-actions 427acc0db3 📝 Update release notes 2024-03-30 18:22:18 +00:00
github-actions 52f483c91c 📝 Update release notes 2024-03-30 18:21:32 +00:00
github-actions fd90e3541e 📝 Update release notes 2024-03-30 18:21:03 +00:00
Nils Lindemann 632655a9bc
🌐 Add German translation for `docs/de/docs/deployment/server-workers.md` (#10747) 2024-03-30 13:19:25 -05:00
Nils Lindemann 8fd447e0e6
🌐 Add German translation for `docs/de/docs/deployment/docker.md` (#10759) 2024-03-30 13:19:17 -05:00
github-actions 221a3ae59c 📝 Update release notes 2024-03-30 18:19:03 +00:00
Nils Lindemann 57a7579337
🌐 Add German translation for `docs/de/docs/how-to/index.md` (#10769) 2024-03-30 13:18:53 -05:00
Nils Lindemann 68d49c05d5
🌐 Add German translation for `docs/de/docs/how-to/general.md` (#10770) 2024-03-30 13:18:42 -05:00
Nils Lindemann 790734d4d2
🌐 Add German translation for `docs/de/docs/how-to/graphql.md` (#10788) 2024-03-30 13:18:31 -05:00
Nils Lindemann c3056bd2ff
🌐 Add German translation for `docs/de/docs/how-to/custom-request-and-route.md` (#10789) 2024-03-30 13:18:23 -05:00
Nils Lindemann 0c96372b9f
🌐 Add German translation for `docs/de/docs/how-to/conditional-openapi.md` (#10790) 2024-03-30 13:18:13 -05:00
Nils Lindemann cab028842f
🌐 Add German translation for `docs/de/docs/how-to/separate-openapi-schemas.md` (#10796) 2024-03-30 13:18:03 -05:00
Nils Lindemann 33329ecb02
🌐 Add German translation for `docs/de/docs/how-to/configure-swagger-ui.md` (#10804) 2024-03-30 13:17:49 -05:00
github-actions eaa472bcee 📝 Update release notes 2024-03-30 18:17:42 +00:00
Nils Lindemann 871a23427f
🌐 Add German translation for `docs/de/docs/how-to/custom-docs-ui-assets.md` (#10803) 2024-03-30 13:17:36 -05:00
Nils Lindemann cd54748cea
🌐 Add German translation for `docs/de/docs/reference/parameters.md` (#10814) 2024-03-30 13:17:26 -05:00
Nils Lindemann 38ac7445ef
🌐 Add German translation for `docs/de/docs/reference/status.md` (#10815) 2024-03-30 13:17:17 -05:00
Nils Lindemann 2033aacd96
🌐 Add German translation for `docs/de/docs/reference/uploadfile.md` (#10816) 2024-03-30 13:17:09 -05:00
github-actions ccd189bfd4 📝 Update release notes 2024-03-30 18:16:58 +00:00
Nils Lindemann 769d737682
🌐 Add German translation for `docs/de/docs/reference/exceptions.md` (#10817) 2024-03-30 13:16:53 -05:00
Nils Lindemann 6c9f5a3e2d
🌐 Add German translation for `docs/de/docs/reference/dependencies.md` (#10818) 2024-03-30 13:16:45 -05:00
Nils Lindemann e2e1c2de9c
🌐 Add German translation for `docs/de/docs/reference/apirouter.md` (#10819) 2024-03-30 13:16:35 -05:00
Nils Lindemann 30912da5e5
🌐 Add German translation for `docs/de/docs/reference/websockets.md` (#10822) 2024-03-30 13:16:27 -05:00
Nils Lindemann 8a01c8dbd0
🌐 Add German translation for `docs/de/docs/reference/httpconnection.md` (#10823) 2024-03-30 13:16:16 -05:00
Nils Lindemann 2a9aa8d70d
🌐 Add German translation for `docs/de/docs/reference/response.md` (#10824) 2024-03-30 13:16:03 -05:00
Nils Lindemann 40ace5dc60
🌐 Add German translation for `docs/de/docs/reference/middleware.md` (#10837) 2024-03-30 13:15:39 -05:00
github-actions cebb68d604 📝 Update release notes 2024-03-30 18:15:29 +00:00
Nils Lindemann da193665ee
🌐 Add German translation for `docs/de/docs/reference/openapi/*.md` (#10838) 2024-03-30 13:15:17 -05:00
Nils Lindemann 8238c6738f
🌐 Add German translation for `docs/de/docs/reference/security/index.md` (#10839) 2024-03-30 13:15:05 -05:00
Nils Lindemann 26db167121
🌐 Add German translation for `docs/de/docs/reference/staticfiles.md` (#10841) 2024-03-30 13:14:58 -05:00
Nils Lindemann fbf3af6a1a
🌐 Add German translation for `docs/de/docs/reference/testclient.md` (#10843) 2024-03-30 13:14:49 -05:00
Nils Lindemann 57708b2b40
🌐 Add German translation for `docs/de/docs/project-generation.md` (#10851) 2024-03-30 13:14:36 -05:00
github-actions ba754f9011 📝 Update release notes 2024-03-30 18:13:46 +00:00
github-actions f0281cde21 📝 Update release notes 2024-03-30 18:12:23 +00:00
Nils Lindemann 54513de411
🌐 Add German translation for `docs/de/docs/history-design-future.md` (#10865) 2024-03-30 13:10:48 -05:00
Nils Lindemann f43ac35fe5
🌐 Add German translation for `docs/de/docs/tutorial/dependencies/dependencies-with-yield.md` (#10422) 2024-03-30 13:10:29 -05:00
Nils Lindemann 92fe883a2c
🌐 Add German translation for `docs/de/docs/tutorial/dependencies/global-dependencies.md` (#10420) 2024-03-30 13:10:13 -05:00
Nils Lindemann 0262f1b9eb
🌐 Update German translation for `docs/de/docs/fastapi-people.md` (#10285) 2024-03-30 13:10:01 -05:00
Nils Lindemann 544b5872c0
🌐 Add German translation for `docs/de/docs/tutorial/dependencies/sub-dependencies.md` (#10409) 2024-03-30 13:09:48 -05:00
Nils Lindemann 4081ce3b29
🌐 Add German translation for `docs/de/docs/tutorial/security/index.md` (#10429) 2024-03-30 13:09:35 -05:00
Nils Lindemann daecb67c1c
🌐 Add German translation for `docs/de/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md` (#10411) 2024-03-30 13:09:16 -05:00
Nils Lindemann 2228740177
🌐 Add German translation for `docs/de/docs/tutorial/extra-data-types.md` (#10534) 2024-03-30 13:08:55 -05:00
Nils Lindemann 504fb2a64f
🌐 Add German translation for `docs/de/docs/tutorial/security/simple-oauth2.md` (#10504) 2024-03-30 13:08:44 -05:00
Nils Lindemann 9899a074d3
🌐 Add German translation for `docs/de/docs/tutorial/security/get-current-user.md` (#10439) 2024-03-30 13:08:05 -05:00
Nils Lindemann 1a6ba66907
🌐 Add German translation for `docs/de/docs/tutorial/path-operation-configuration.md` (#10383) 2024-03-30 13:07:48 -05:00
Nils Lindemann 1628e96a0f
🌐 Add German translation for `docs/de/docs/tutorial/request-forms-and-files.md` (#10368) 2024-03-30 13:07:35 -05:00
Nils Lindemann b9eeede273
🌐 Add German translation for `docs/de/docs/tutorial/encoder.md` (#10385) 2024-03-30 13:07:21 -05:00
Nils Lindemann 537b7addaf
🌐 Add German translation for `docs/de/docs/tutorial/security/first-steps.md` (#10432) 2024-03-30 13:07:08 -05:00
Nils Lindemann 474d6bc07b
🌐 Add German translation for `docs/de/docs/tutorial/request-forms.md` (#10361) 2024-03-30 13:06:54 -05:00
Nils Lindemann 13f6d97c77
🌐 Add German translation for `docs/de/docs/deployment/versions.md` (#10491) 2024-03-30 13:06:38 -05:00
github-actions f1a9750521 📝 Update release notes 2024-03-30 18:06:23 +00:00
Nils Lindemann e610f0dd6a
🌐 Add German translation for `docs/de/docs/async.md` (#10449) 2024-03-30 13:06:16 -05:00
github-actions dacad696b1 📝 Update release notes 2024-03-30 18:05:35 +00:00
github-actions 5b3eda9300 📝 Update release notes 2024-03-30 18:04:12 +00:00
github-actions c3dd94b96f 📝 Update release notes 2024-03-30 18:03:30 +00:00
Nils Lindemann 272d27e8b5
🌐 Add German translation for `docs/de/docs/tutorial/cookie-params.md` (#10323) 2024-03-30 13:02:19 -05:00
Nils Lindemann 32ba7dc04d
🌐 Add German translation for `docs/de/docs/tutorial/dependencies/classes-as-dependencies.md` (#10407) 2024-03-30 13:01:58 -05:00
github-actions fe5ea68d5d 📝 Update release notes 2024-03-30 18:01:43 +00:00
Nils Lindemann 2925f1693c
🌐 Add German translation for `docs/de/docs/tutorial/dependencies/index.md` (#10399) 2024-03-30 13:01:10 -05:00
Nils Lindemann bea72bfc47
🌐 Add German translation for `docs/de/docs/tutorial/header-params.md` (#10326) 2024-03-30 13:00:50 -05:00
github-actions 8751ee0323 📝 Update release notes 2024-03-30 18:00:33 +00:00
Nils Lindemann 80ae42e0b9
🌐 Add German translation for `docs/de/docs/tutorial/path-params-numeric-validations.md` (#10307) 2024-03-30 12:59:29 -05:00
Nils Lindemann 372e2c84e5
🌐 Add German translation for `docs/de/docs/tutorial/query-params-str-validations.md` (#10304) 2024-03-30 12:58:59 -05:00
github-actions ab7494f288 📝 Update release notes 2024-03-30 17:58:36 +00:00
Nils Lindemann 0c14608618
🌐 Add German translation for `docs/de/docs/tutorial/request-files.md` (#10364) 2024-03-30 12:58:08 -05:00
github-actions f324f31dda 📝 Update release notes 2024-03-29 23:06:40 +00:00
Sun Bin 009b148463
✏️ Fix typo in `fastapi/security/oauth2.py` (#11368) 2024-03-29 18:06:20 -05:00
github-actions b8f8c55991 📝 Update release notes 2024-03-29 20:51:06 +00:00
Sebastián Ramírez 5a30f82264
👷 Disable MkDocs insiders social plugin while an issue in MkDocs Material is handled (#11373) 2024-03-29 15:50:47 -05:00
github-actions b37426329a 📝 Update release notes 2024-03-29 20:35:51 +00:00
Sebastián Ramírez 11b3c7e791
👷 Fix logic for when to install and use MkDocs Insiders (#11372) 2024-03-29 15:35:31 -05:00
github-actions 461420719d 📝 Update release notes 2024-03-28 23:32:41 +00:00
Sebastián Ramírez 04249d589b
👷 Do not use Python packages cache for publish (#11366) 2024-03-28 18:32:17 -05:00
github-actions 43160896c5 📝 Update release notes 2024-03-28 23:28:29 +00:00
Sebastián Ramírez cd3e2bc2d2
👷 Add CI to test sdists for redistribution (e.g. Linux distros) (#11365) 2024-03-28 18:28:07 -05:00
github-actions cb0ab43224 📝 Update release notes 2024-03-28 04:05:40 +00:00
Samuel Favarin ff41af83a4
🌐 Add Portuguese translation for `docs/pt/docs/advanced/templates.md` (#11338) 2024-03-27 23:05:17 -05:00
github-actions 040448811a 📝 Update release notes 2024-03-27 03:03:01 +00:00
Sebastián Ramírez 8953d23a2b
👷 Update build-docs GitHub Action path filter (#11354) 2024-03-26 22:02:41 -05:00
github-actions 8bfed9aee2 📝 Update release notes 2024-03-26 17:38:55 +00:00
Sebastián Ramírez d0fcfd0dff
🔧 Update Ruff config, add extra ignore rule from SQLModel (#11353) 2024-03-26 12:38:21 -05:00
github-actions 910413e215 📝 Update release notes 2024-03-26 16:57:16 +00:00
Charlie Marsh 5ccc869fee
⬆️ Upgrade configuration for Ruff v0.2.0 (#11075) 2024-03-26 11:56:53 -05:00
github-actions b0dd4f7bfc 📝 Update release notes 2024-03-25 23:10:38 +00:00
Sebastián Ramírez 2a54cd5abe
🔧 Update sponsors, add MongoDB (#11346) 2024-03-25 18:10:11 -05:00
github-actions bb39305939 📝 Update release notes 2024-03-25 19:12:03 +00:00
Sk Imtiaz Ahmed ddff295f44
🌐 Add Bengali translations for `docs/bn/docs/learn/index.md` (#11337) 2024-03-25 14:11:39 -05:00
github-actions 3aa6c8809e 📝 Update release notes 2024-03-22 01:42:39 +00:00
Alejandra 93034fea48
📝 Update links to Pydantic docs to point to new website (#11328) 2024-03-21 20:42:11 -05:00
github-actions 03b1e93456 📝 Update release notes 2024-03-21 21:54:43 +00:00
Alejandra 7b1da59b28
✏️ Fix typo in `docs/en/docs/tutorial/extra-models.md` (#11329) 2024-03-21 16:54:22 -05:00
github-actions 96b14d9f33 📝 Update release notes 2024-03-21 21:12:48 +00:00
Alejandra 0021acd4de
📝 Update `project-generation.md` (#11326)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-03-21 16:12:21 -05:00
github-actions 517d0a95de 📝 Update release notes 2024-03-21 20:57:53 +00:00
Alejandra 887ac7054b
📝 Update External Links (#11327) 2024-03-21 15:57:27 -05:00
github-actions 06e534404d 📝 Update release notes 2024-03-21 01:11:12 +00:00
水上 皓登 f29b30b784
🔥 Remove link to Pydantic's benchmark, on other i18n pages. (#11224) 2024-03-20 20:10:47 -05:00
github-actions 957845d967 📝 Update release notes 2024-03-19 01:36:05 +00:00
dependabot[bot] fb71a5d75b
⬆ Bump dorny/paths-filter from 2 to 3 (#11028)
Bumps [dorny/paths-filter](https://github.com/dorny/paths-filter) from 2 to 3.
- [Release notes](https://github.com/dorny/paths-filter/releases)
- [Changelog](https://github.com/dorny/paths-filter/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dorny/paths-filter/compare/v2...v3)

---
updated-dependencies:
- dependency-name: dorny/paths-filter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-18 20:35:22 -05:00
github-actions 29254a76c4 📝 Update release notes 2024-03-19 01:33:53 +00:00
dependabot[bot] cbbfd22aa0
⬆ Bump dawidd6/action-download-artifact from 3.0.0 to 3.1.4 (#11310)
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 3.0.0 to 3.1.4.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](https://github.com/dawidd6/action-download-artifact/compare/v3.0.0...v3.1.4)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-18 20:33:28 -05:00
github-actions e752601107 📝 Update release notes 2024-03-18 16:26:42 +00:00
choi-haram 6297c8a0bd
🌐 Fix Korean translation for `docs/ko/docs/index.md` (#11296) 2024-03-18 11:26:07 -05:00
github-actions 2189ce9e6a 📝 Update release notes 2024-03-18 16:25:27 +00:00
choi-haram ff4c4e0c42
🌐 Add Korean translation for `docs/ko/docs/about/index.md` (#11299)
🌐 Add Korean translation for docs/ko/docs/about/index.md
2024-03-18 11:25:02 -05:00
github-actions ffb4f77a11 📝 Update release notes 2024-03-16 23:54:48 +00:00
Sebastián Ramírez f0becc4452
♻️ Refactor computing FastAPI People, include 3 months, 6 months, 1 year, based on comment date, not discussion date (#11304) 2024-03-16 18:54:24 -05:00
github-actions 7fa85d5ebd 📝 Update release notes 2024-03-14 17:04:25 +00:00
Elliott Larsen e11e5d20e7
🌐 Add Korean translation for `docs/ko/docs/advanced/index.md` (#9613) 2024-03-14 18:04:00 +01:00
github-actions 870d50ac65 📝 Update release notes 2024-03-14 16:45:24 +00:00
github-actions b56a7802f9 📝 Update release notes 2024-03-14 16:44:31 +00:00
Nils Lindemann d0ac56694e
🌐 Add German translation for `docs/de/docs/how-to/extending-openapi.md` (#10794) 2024-03-14 17:44:05 +01:00
Sebastián Ramírez 5df9f30b93
👥 Update FastAPI People (#11228)
Co-authored-by: github-actions <github-actions@github.com>
2024-03-14 17:43:24 +01:00
github-actions d928140cde 📝 Update release notes 2024-03-14 16:42:14 +00:00
Jack Lee 7b21e027b3
🌐 Update Chinese translation for `docs/zh/docs/tutorial/metadata.md` (#11286) 2024-03-14 17:41:51 +01:00
github-actions 5e427ba972 📝 Update release notes 2024-03-14 16:38:46 +00:00
David Huser 3c70b55042
✏️ Fix typos in docstrings (#11295) 2024-03-14 17:38:24 +01:00
github-actions 1b105cb000 📝 Update release notes 2024-03-14 11:40:25 +00:00
Alejandra aff139ee90
🛠️ Improve Node.js script in docs to generate TypeScript clients (#11293) 2024-03-14 12:40:05 +01:00
github-actions 365c9382f6 📝 Update release notes 2024-03-13 19:21:40 +00:00
Nan Wang 50597af785
🔥 Remove Jina AI QA Bot from the docs (#11268) 2024-03-13 20:21:21 +01:00
github-actions 9c2b6d09f1 📝 Update release notes 2024-03-13 19:07:36 +00:00
bebop 478288700a
📝 Update examples for tests to replace "inexistent" for "nonexistent" (#11220) 2024-03-13 20:07:10 +01:00
github-actions 72e07c4f44 📝 Update release notes 2024-03-13 19:02:42 +00:00
Joshua Hanson 0e2f2d6d3a
📝 Update `python-multipart` GitHub link in all docs from `https://andrew-d.github.io/python-multipart/` to `https://github.com/Kludex/python-multipart` (#11239) 2024-03-13 20:02:19 +01:00
github-actions 176a93f476 📝 Update release notes 2024-03-13 11:57:47 +00:00
Aruelius.L 65fd7f5bb0
🌐 Update Chinese translation for `docs/zh/docs/contributing.md` (#10887) 2024-03-13 12:57:21 +01:00
github-actions 9aad9e3868 📝 Update release notes 2024-03-09 00:40:55 +00:00
Vusal Abdullayev ce8dfd8013
🌐 Add Azerbaijani translation for `docs/az/docs/fastapi-people.md` (#11195) 2024-03-09 01:39:20 +01:00
github-actions d8eccdea1b 📝 Update release notes 2024-03-09 00:35:46 +00:00
👁Max👁 299bf22ad8
🌐 Add Russian translation for `docs/ru/docs/tutorial/dependencies/index.md` (#11223) 2024-03-09 01:35:05 +01:00
github-actions 7b957e94e3 📝 Update release notes 2024-03-09 00:32:26 +00:00
JackLee 4f20ca6a7c
🌐 Update Chinese translation for `docs/zh/docs/tutorial/query-params.md` (#11242) 2024-03-09 01:32:05 +01:00
github-actions eef1b7d515 📝 Update release notes 2024-02-28 14:04:27 +00:00
Sebastián Ramírez c0ad1ebabd
🔧 Update sponsors, remove Jina, remove Powens, move TestDriven.io (#11213) 2024-02-28 15:04:08 +01:00
Sebastián Ramírez c4c70fd792 📝 Update release notes 2024-02-27 12:18:27 +01:00
github-actions 7ef0b08897 📝 Update release notes 2024-02-25 14:25:31 +00:00
Vusal Abdullayev 937378ff05
🌐 Add Azerbaijani translation for `docs/az/learn/index.md` (#11192) 2024-02-25 09:25:12 -05:00
Sebastián Ramírez e40747f10a 🔖 Release version 0.110.0 2024-02-25 00:19:38 +01:00
Sebastián Ramírez 32b56a8d08 📝 Update release notes 2024-02-25 00:18:13 +01:00
github-actions b6b0f2a7e6 📝 Update release notes 2024-02-24 23:06:56 +00:00
Sebastián Ramírez bf771bd781
🐛 Fix unhandled growing memory for internal server errors, refactor dependencies with `yield` and `except` to require raising again as in regular Python (#11191)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-02-25 00:06:37 +01:00
github-actions 6336604906 📝 Update release notes 2024-02-21 22:27:53 +00:00
github-actions cb93874014 📝 Update release notes 2024-02-21 22:27:17 +00:00
Nils Lindemann 9210e6a330
🌐 Add German translation for `docs/de/docs/reference/background.md` (#10820) 2024-02-21 17:26:48 -05:00
Nils Lindemann dec45c534f
🌐 Add German translation for `docs/de/docs/reference/templating.md` (#10842) 2024-02-21 17:26:02 -05:00
github-actions 5da35ff980 📝 Update release notes 2024-02-21 22:23:21 +00:00
Nils Lindemann 626b066e56
🌐 Add German translation for `docs/de/docs/external-links.md` (#10852) 2024-02-21 17:23:00 -05:00
github-actions a6bc32a61a 📝 Update release notes 2024-02-19 18:46:23 +00:00
Hasan Sezer Taşan e52bf9628f
🌐 Update Turkish translation for `docs/tr/docs/tutorial/query-params.md` (#11162) 2024-02-19 13:46:02 -05:00
github-actions e76977bb35 📝 Update release notes 2024-02-19 15:57:07 +00:00
Nils Lindemann 073a05ebdd
🌐 Add German translation for `docs/de/docs/reference/encoders.md` (#10840) 2024-02-19 10:54:52 -05:00
github-actions d0b143916c 📝 Update release notes 2024-02-19 15:54:37 +00:00
github-actions ce1a358cbf 📝 Update release notes 2024-02-19 15:53:44 +00:00
Nils Lindemann 646e7eb3c7
🌐 Add German translation for `docs/de/docs/reference/responses.md` (#10825) 2024-02-19 10:53:39 -05:00
Nils Lindemann 6062ec86f3
🌐 Add German translation for `docs/de/docs/reference/request.md` (#10821) 2024-02-19 10:53:18 -05:00
github-actions 3808d618fd 📝 Update release notes 2024-02-18 12:21:32 +00:00
github-actions f1ff930e68 📝 Update release notes 2024-02-18 12:20:55 +00:00
Emirhan Soytaş 7ca6f1cd1a
🌐 Add Turkish translation for `docs/tr/docs/tutorial/query-params.md` (#11078) 2024-02-18 07:20:41 -05:00
Nils Lindemann 73ca60c273
🌐 Add German translation for `docs/de/docs/reference/fastapi.md` (#10813) 2024-02-18 07:19:32 -05:00
github-actions 122713b168 📝 Update release notes 2024-02-18 12:18:59 +00:00
Nils Lindemann ec464f0938
🌐 Add German translation for `docs/de/docs/newsletter.md` (#10853) 2024-02-18 07:18:33 -05:00
github-actions be87690255 📝 Update release notes 2024-02-16 12:06:46 +00:00
Max Su 33f6026c6c
🌐 Add Traditional Chinese translation for `docs/zh-hant/docs/learn/index.md` (#11142) 2024-02-16 07:06:22 -05:00
github-actions 8ad6acfe6a 📝 Update release notes 2024-02-14 15:06:07 +00:00
김명기 b8941c31ea
🌐 Add Korean translation for `/docs/ko/docs/tutorial/dependencies/global-dependencies.md` (#11123) 2024-02-14 10:05:47 -05:00
github-actions a315048357 📝 Update release notes 2024-02-11 13:52:06 +00:00
김명기 b1fa0f262e
🌐 Add Korean translation for `/docs/ko/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md` (#11124) 2024-02-11 08:49:45 -05:00
github-actions 44c4cdd73b 📝 Update release notes 2024-02-11 13:48:54 +00:00
Kani Kim c0df023557
✏️ Fix minor typos in `docs/ko/docs/` (#11126) 2024-02-11 08:48:31 -05:00
github-actions 9f4db6d6d3 📝 Update release notes 2024-02-09 12:36:07 +00:00
Kani Kim 383870a275
🌐 Add Korean translation for `/docs/ko/docs/tutorial/schema-extra-example.md` (#11121) 2024-02-09 07:35:46 -05:00
github-actions 76e14214bd 📝 Update release notes 2024-02-09 10:39:15 +00:00
github-actions 564d5591ad 📝 Update release notes 2024-02-09 10:36:41 +00:00
Kani Kim a5edc3f85b
🌐 Add Korean translation for `/docs/ko/docs/tutorial/body-fields.md` (#11112) 2024-02-09 05:36:26 -05:00
github-actions 75e3aac8d3 📝 Update release notes 2024-02-09 10:35:36 +00:00
김명기 d048b485cd
🌐 Add Korean translation for `/docs/ko/docs/tutorial/cookie-params.md` (#11118) 2024-02-09 05:34:57 -05:00
Kani Kim b7e1551286
🌐 Update Korean translation for `/docs/ko/docs/dependencies/index.md` (#11114) 2024-02-09 05:34:13 -05:00
github-actions d2f69cf311 📝 Update release notes 2024-02-09 10:33:22 +00:00
Kani Kim 378623294e
🌐 Update Korean translation for `/docs/ko/docs/deployment/docker.md` (#11113) 2024-02-09 05:33:00 -05:00
github-actions 1f6a33ce72 📝 Update release notes 2024-02-08 13:11:17 +00:00
Hasan Sezer Taşan 0c13911af8
🌐 Update Turkish translation for `docs/tr/docs/tutorial/first-steps.md` (#11094) 2024-02-08 08:10:55 -05:00
Emirhan Soytaş 572a47cd1e
🌐 Add Turkish translation for `docs/tr/docs/tutorial/path-params.md` (#11073) 2024-02-08 08:10:29 -05:00
github-actions 2db35873ec 📝 Update release notes 2024-02-07 13:02:52 +00:00
Ich bin Xaraxx! :P fe4bed62ff
🌐 Add Spanish translation for `docs/es/docs/advanced/security/index.md` (#2278)
Co-authored-by: Xaraxx <sara.galvan.o91@gmail.com>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-02-07 14:02:32 +01:00
github-actions d442afa175 📝 Update release notes 2024-02-07 12:51:31 +00:00
Ich bin Xaraxx! :P 1926ade7a8
🌐 Add Spanish translation for `docs/es/docs/advanced/response-headers.md` (#2276)
Co-authored-by: Xaraxx <sara.galvan.o91@gmail.com>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-02-07 13:51:12 +01:00
github-actions 712eee66ca 📝 Update release notes 2024-02-07 11:55:58 +00:00
Pablo 957e6600a7
🌐 Add Spanish translation for `docs/es/docs/deployment/index.md` and `~/deployment/versions.md` (#9669)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-02-07 11:55:38 +00:00
github-actions 2a60a055f0 📝 Update release notes 2024-02-07 11:40:11 +00:00
pablocm83 f48912633a
🌐 Add Spanish translation for `docs/es/docs/benchmarks.md` (#10928)
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-02-07 11:39:50 +00:00
github-actions e79bd168a4 📝 Update release notes 2024-02-06 19:56:42 +00:00
Alejandra b9766d7ee9
🌐 Add Spanish translation for `docs/es/docs/advanced/response-change-status-code.md` (#11100)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-02-06 20:56:23 +01:00
github-actions d9cacacf7f 📝 Update release notes 2024-02-06 17:21:53 +00:00
Jacob Hayes 0880a5c6a0
✏️ Fix minor typo in `fastapi/applications.py` (#11099) 2024-02-06 12:21:29 -05:00
Sebastián Ramírez 141e34f281 📝 Update release notes 2024-02-04 22:24:21 +01:00
Sebastián Ramírez 57b0983948 🔖 Release FastAPI version 0.109.2 2024-02-04 22:21:53 +01:00
github-actions 50e558e944 📝 Update release notes 2024-02-04 21:15:15 +00:00
Sebastián Ramírez 4a2be2abff
⬆️ Upgrade version of Starlette to `>= 0.36.3` (#11086) 2024-02-04 22:14:53 +01:00
github-actions 43f9cbc0fc 📝 Update release notes 2024-02-04 20:57:18 +00:00
Sebastián Ramírez 739739c9d2
🍱 Add new FastAPI logo (#11090) 2024-02-04 21:56:59 +01:00
github-actions 6944ae15a2 📝 Update release notes 2024-02-04 14:29:04 +00:00
Alper e239c56371
🌐 Update Turkish translation for `docs/tr/docs/fastapi-people.md` (#10547) 2024-02-04 09:28:44 -05:00
Sebastián Ramírez 3f3ee240dd 📝 Update release notes 2024-02-03 13:54:44 +01:00
Sebastián Ramírez 7633d1571c 🔖 Release version 0.109.1 2024-02-03 13:42:30 +01:00
Sebastián Ramírez a4de147521 📝 Update release notes 2024-02-03 13:41:43 +01:00
Sebastián Ramírez 9d34ad0ee8
Merge pull request from GHSA-qf9m-vfgh-m389 2024-02-03 13:32:42 +01:00
github-actions ebf9723494 📝 Update release notes 2024-02-02 19:52:32 +00:00
Sebastián Ramírez 8590d0c2ec
👥 Update FastAPI People (#11074) 2024-02-02 20:52:13 +01:00
github-actions 063d7ffb15 📝 Update release notes 2024-02-02 18:09:33 +00:00
pablocm83 3c81e622f3
🌐 Add Spanish translation for `docs/es/docs/external-links.md` (#10933) 2024-02-02 13:09:12 -05:00
github-actions 6c4a143fd0 📝 Update release notes 2024-02-02 17:40:08 +00:00
Soonho Kwon d254e2f6ad
🌐 Update Korean translation for `docs/ko/docs/tutorial/first-steps.md`, `docs/ko/docs/tutorial/index.md`, `docs/ko/docs/tutorial/path-params.md`, and `docs/ko/docs/tutorial/query-params.md` (#4218) 2024-02-02 12:39:46 -05:00
github-actions 6f6e786979 📝 Update release notes 2024-02-01 21:11:27 +00:00
zqc 60130ed5f2
🌐 Add Chinese translation for `docs/zh/docs/tutorial/dependencies/dependencies-with-yield.md` (#10870) 2024-02-01 16:11:05 -05:00
github-actions e94575c283 📝 Update release notes 2024-02-01 08:57:17 +00:00
xzmeng fd330fc452
🌐 Add Chinese translation for `docs/zh/docs/deployment/concepts.md` (#10282) 2024-02-01 03:56:55 -05:00
github-actions df674d5b21 📝 Update release notes 2024-01-31 22:14:15 +00:00
Sebastián Ramírez f43e18562b
🔧 Update sponsors: add Coherence (#11066) 2024-01-31 23:13:52 +01:00
github-actions c8c9ae475c 📝 Update release notes 2024-01-31 15:46:19 +00:00
Aykhan Shahsuvarov 67494c2b5e
🌐 Add Azerbaijani translation for `docs/az/docs/index.md` (#11047) 2024-01-31 10:45:57 -05:00
github-actions 531b0d5e03 📝 Update release notes 2024-01-31 14:35:50 +00:00
JeongHyeongKim 7178eb4fb1
🌐 Add Korean translation for `docs/ko/docs/tutorial/middleware.md` (#2829) 2024-01-31 09:35:27 -05:00
github-actions ec5e08251d 📝 Update release notes 2024-01-30 18:47:20 +00:00
Sebastián Ramírez fb7af9ec72
👷 Upgrade GitHub Action issue-manager (#11056) 2024-01-30 19:46:56 +01:00
github-actions ffbe83d4d0 📝 Update release notes 2024-01-30 14:24:57 +00:00
Sebastián Ramírez 2a21dfba0e
🍱 Update sponsors: TalkPython badge (#11052) 2024-01-30 15:24:35 +01:00
github-actions efee7a407d 📝 Update release notes 2024-01-30 09:58:29 +00:00
Sebastián Ramírez 1b824e0c23
🔧 Update sponsors: TalkPython badge image (#11048) 2024-01-30 10:58:10 +01:00
github-actions a235d93002 📝 Update release notes 2024-01-29 18:10:30 +00:00
Nils Lindemann 653a3579ca
🌐 Add German translation for `docs/de/docs/tutorial/body-nested-models.md` (#10313) 2024-01-29 13:10:09 -05:00
github-actions 4f8eec808f 📝 Update release notes 2024-01-29 17:55:19 +00:00
mojtaba e3728489fa
🌐 Add Persian translation for `docs/fa/docs/tutorial/middleware.md` (#9695) 2024-01-29 12:53:46 -05:00
github-actions 08b98adea6 📝 Update release notes 2024-01-29 17:49:07 +00:00
Reza Rohani 11a1268fe2
🌐 Update Farsi translation for `docs/fa/docs/index.md` (#10216) 2024-01-29 12:48:49 -05:00
github-actions 7c5c29de9e 📝 Update release notes 2024-01-29 17:37:16 +00:00
github-actions 2d886c0e75 📝 Update release notes 2024-01-29 17:36:44 +00:00
Nils Lindemann 4185f0bd9d
🌐 Add German translation for `docs/de/docs/tutorial/body-fields.md` (#10310) 2024-01-29 12:36:19 -05:00
Nils Lindemann 32e5a37d1d
🌐 Add German translation for `docs/de/docs/tutorial/body.md` (#10295) 2024-01-29 12:35:23 -05:00
github-actions b180d39d7e 📝 Update release notes 2024-01-29 17:33:04 +00:00
Nils Lindemann 26ab83e157
🌐 Add German translation for `docs/de/docs/tutorial/body-multiple-params.md` (#10308) 2024-01-29 12:32:43 -05:00
github-actions ab22b79590 📝 Update release notes 2024-01-28 18:43:09 +00:00
Sho Nakamura aae14c5379
🌐 Add Japanese translation for `docs/ja/docs/tutorial/security/get-current-user.md` (#2681)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-28 19:36:35 +01:00
github-actions b2faa22f42 📝 Update release notes 2024-01-28 18:30:52 +00:00
github-actions 0cf8c74e46 📝 Update release notes 2024-01-28 18:27:02 +00:00
jaystone776 1f9d5a1db9
🌐 Add Chinese translation for `docs/zh/docs/advanced/advanced-dependencies.md` (#3798) 2024-01-28 13:26:57 -05:00
github-actions 39d26f3491 📝 Update release notes 2024-01-28 18:26:17 +00:00
github-actions 5f194ddcc0 📝 Update release notes 2024-01-28 18:23:59 +00:00
jaystone776 13c6eb2db0
🌐 Add Chinese translation for `docs/zh/docs/advanced/events.md` (#3815) 2024-01-28 13:23:10 -05:00
jaystone776 fc4606e1d0
🌐 Add Chinese translation for `docs/zh/docs/advanced/behind-a-proxy.md` (#3820) 2024-01-28 13:22:37 -05:00
jaystone776 eaf394d364
🌐 Add Chinese translation for `docs/zh/docs/advanced/testing-events.md` (#3818) 2024-01-28 13:21:02 -05:00
github-actions 92cf191f1f 📝 Update release notes 2024-01-28 18:17:01 +00:00
jaystone776 4b7fa89f4e
🌐 Add Chinese translation for `docs/zh/docs/advanced/testing-websockets.md` (#3817) 2024-01-28 13:12:29 -05:00
github-actions 539e032b2d 📝 Update release notes 2024-01-28 18:11:59 +00:00
jaystone776 1e8b44f3e4
🌐 Add Chinese translation for `docs/zh/docs/advanced/testing-database.md` (#3821) 2024-01-28 13:09:26 -05:00
github-actions a54ca14876 📝 Update release notes 2024-01-28 18:08:47 +00:00
github-actions 6008c04e2e 📝 Update release notes 2024-01-28 18:07:45 +00:00
jaystone776 f81bedd853
🌐 Add Chinese translation for `docs/zh/docs/deployment/deta.md` (#3837) 2024-01-28 13:06:55 -05:00
jaystone776 5b0bff3e93
🌐 Add Chinese translation for `docs/zh/docs/history-design-future.md` (#3832) 2024-01-28 13:05:57 -05:00
github-actions e1119a16cb 📝 Update release notes 2024-01-28 18:05:04 +00:00
jaystone776 49113c35be
🌐 Add Chinese translation for `docs/zh/docs/project-generation.md` (#3831) 2024-01-28 13:03:58 -05:00
github-actions 008be03f31 📝 Update release notes 2024-01-28 18:01:03 +00:00
xzmeng 38f8181fdc
🌐 Add Chinese translation for `docs/zh/docs/deployment/docker.md` (#10296) 2024-01-28 13:00:42 -05:00
github-actions 52df4d0378 📝 Update release notes 2024-01-28 10:38:55 +00:00
Sebastián Ramírez 4d93299a57
🔧 Update sponsors, remove Deta (#11041) 2024-01-28 11:38:34 +01:00
github-actions 9fd7aa8abe 📝 Update release notes 2024-01-28 10:33:29 +00:00
Sebastián Ramírez c7111f67ec
📝 Tweak wording in `help-fastapi.md` (#11040) 2024-01-28 11:33:07 +01:00
github-actions 04de371a3a 📝 Update release notes 2024-01-28 09:54:03 +00:00
Sebastián Ramírez 3b18f1bfc1
💄 Fix CSS breaking RTL languages (erroneously introduced by a previous RTL PR) (#11039) 2024-01-28 09:53:45 +00:00
github-actions 8602873d1a 📝 Update release notes 2024-01-27 10:51:51 +00:00
pablocm83 4b8c822c92
🌐 Update Spanish translation for `docs/es/docs/features.md` (#10884) 2024-01-27 05:51:32 -05:00
github-actions f4e2b6f451 📝 Update release notes 2024-01-27 10:44:06 +00:00
pablocm83 23fc06dab9
🌐 Add Spanish translation for `docs/es/docs/newsletter.md` (#10922) 2024-01-27 05:43:44 -05:00
github-actions 44645f882f 📝 Update release notes 2024-01-27 09:40:14 +00:00
Sebastián Ramírez d522cdcb7a
📝 Tweak docs for Behind a Proxy (#11038) 2024-01-27 10:39:50 +01:00
github-actions a67f9767a0 📝 Update release notes 2024-01-27 09:30:03 +00:00
Jun-Ah 준아 3817514992
🌐 Add Korean translation for `docs/ko/docs/tutorial/background-tasks.md` (#5910) 2024-01-27 04:28:49 -05:00
github-actions 2f2a7ad361 📝 Update release notes 2024-01-27 09:17:26 +00:00
Alper 4c0d12497f
🌐 Add Turkish translation for `docs/tr/docs/alternatives.md` (#10502) 2024-01-27 04:14:47 -05:00
github-actions 2ccc0ccf01 📝 Update release notes 2024-01-27 09:13:27 +00:00
github-actions b110cd62a0 📝 Update release notes 2024-01-27 09:12:59 +00:00
Kani Kim 00395f3eeb
🌐 Add Korean translation for `docs/ko/docs/tutorial/dependencies/index.md` (#10989) 2024-01-27 04:12:44 -05:00
Kani Kim 2378cfd56a
🌐 Add Korean translation for `/docs/ko/docs/tutorial/body.md` (#11000) 2024-01-27 04:11:46 -05:00
github-actions e196abad3e 📝 Update release notes 2024-01-27 09:09:13 +00:00
Donny Peeters 7ee9303551
📝 Add External Link: 10 Tips for adding SQLAlchemy to FastAPI (#11036) 2024-01-27 04:08:54 -05:00
github-actions 92feb73531 📝 Update release notes 2024-01-25 15:09:59 +00:00
Luccas Mateus d693d0a980
🌐 Add Portuguese translation for `docs/pt/docs/tutorial/schema-extra-example.md` (#4065) 2024-01-25 10:05:24 -05:00
github-actions 1b01cbe092 📝 Update release notes 2024-01-25 15:03:50 +00:00
Hasan Sezer Taşan 5d74e58e95
🌐 Add Turkish translation for `docs/tr/docs/history-design-future.md` (#11012) 2024-01-25 09:59:43 -05:00
github-actions 06bdf03bce 📝 Update release notes 2024-01-25 14:59:03 +00:00
github-actions 01c56c059e 📝 Update release notes 2024-01-25 14:58:23 +00:00
Hasan Sezer Taşan 3e98fb9c83
🌐 Add Turkish translation for `docs/tr/docs/resources/index.md` (#11020) 2024-01-25 09:57:16 -05:00
Hasan Sezer Taşan ecee093e34
🌐 Add Turkish translation for `docs/tr/docs/how-to/index.md` (#11021) 2024-01-25 09:56:05 -05:00
github-actions 28e679d6dc 📝 Update release notes 2024-01-25 14:55:49 +00:00
Nils Lindemann e55c7ccbcb
🌐 Add German translation for `docs/de/docs/tutorial/query-params.md` (#10293) 2024-01-25 09:53:41 -05:00
github-actions 9af7f2a5d5 📝 Update release notes 2024-01-25 14:53:25 +00:00
Jessica Temporal 9ee70f82e7
📝 Add External Link: Tips on migrating from Flask to FastAPI and vice-versa (#11029) 2024-01-25 09:53:05 -05:00
github-actions e96e74ad36 📝 Update release notes 2024-01-23 17:32:19 +00:00
Alejandra 8e9af7932c
🔧 Add Italian to `mkdocs.yml` (#11016) 2024-01-23 12:31:56 -05:00
github-actions 4c077492ae 📝 Update release notes 2024-01-23 16:04:37 +00:00
Nils Lindemann dcf8b24ece
🌐 Add German translation for `docs/de/docs/benchmarks.md` (#10866) 2024-01-23 11:04:13 -05:00
github-actions 6aa521aa03 📝 Update release notes 2024-01-23 16:02:56 +00:00
Hasan Sezer Taşan aae29cac5c
🌐 Add Turkish translation for `docs/tr/docs/learn/index.md` (#11014) 2024-01-23 11:02:27 -05:00
github-actions 9a5181abfc 📝 Update release notes 2024-01-23 15:06:34 +00:00
mojtaba 30f31540fc
🌐 Add Persian translation for `docs/fa/docs/tutorial/security/index.md` (#9945) 2024-01-23 10:06:11 -05:00
github-actions 30f1a1c4ef 📝 Update release notes 2024-01-23 14:19:05 +00:00
github-actions a12c5db74c 📝 Update release notes 2024-01-23 14:16:59 +00:00
github-actions 2341f72101 📝 Update release notes 2024-01-23 14:15:50 +00:00
Hasan Sezer Taşan 754ea10fcc
🌐 Add Turkish translation for `docs/tr/docs/help/index.md` (#11013) 2024-01-23 09:13:01 -05:00
github-actions 39cff8d7d6 📝 Update release notes 2024-01-23 14:12:29 +00:00
Hasan Sezer Taşan 7586688cc9
🌐 Add Turkish translation for `docs/tr/docs/about/index.md` (#11006) 2024-01-23 09:11:15 -05:00
github-actions 9e06513033 📝 Update release notes 2024-01-23 14:10:41 +00:00
Hasan Sezer Taşan 189f679f9b
🌐 Update Turkish translation for `docs/tr/docs/benchmarks.md` (#11005) 2024-01-23 09:10:30 -05:00
github-actions 6d46b60cb3 📝 Update release notes 2024-01-23 14:09:56 +00:00
github-actions f021ccb905 📝 Update release notes 2024-01-23 14:09:28 +00:00
Matteo aa3ed353b3
🌐 Add Italian translation for `docs/it/docs/index.md` (#5233) 2024-01-23 09:06:33 -05:00
Kani Kim 3351674918
🌐 Add Korean translation for `docs/ko/docs/help/index.md` (#10983) 2024-01-23 09:05:09 -05:00
Kani Kim 058044fdb1
🌐 Add Korean translation for `docs/ko/docs/features.md` (#10976) 2024-01-23 09:04:27 -05:00
DoHyun Kim 0ec0df5090
🌐 Add Korean translation for `docs/ko/docs/tutorial/security/get-current-user.md` (#5737) 2024-01-23 09:02:49 -05:00
github-actions a56d32c3a4 📝 Update release notes 2024-01-23 14:01:38 +00:00
Aleksandr Andrukhov 9060c427a6
🌐 Add Russian translation for `docs/ru/docs/tutorial/security/first-steps.md` (#10541) 2024-01-23 09:00:11 -05:00
github-actions 0fb326fc6e 📝 Update release notes 2024-01-23 13:58:04 +00:00
github-actions cc9c448ed4 📝 Update release notes 2024-01-23 13:57:19 +00:00
github-actions ccdc962936 📝 Update release notes 2024-01-23 13:56:42 +00:00
Aleksandr Andrukhov ac5e73b19d
🌐 Add Russian translation for `docs/ru/docs/tutorial/handling-errors.md` (#10375) 2024-01-23 08:56:29 -05:00
Aleksandr Andrukhov 672b501b98
🌐 Add Russian translation for `docs/ru/docs/tutorial/encoder.md` (#10374) 2024-01-23 08:56:12 -05:00
Aleksandr Andrukhov 95d5902af1
🌐 Add Russian translation for `docs/ru/docs/tutorial/body-updates.md` (#10373) 2024-01-23 08:55:32 -05:00
github-actions 315d8184e7 📝 Update release notes 2024-01-23 13:54:45 +00:00
Nikita 5132976253
🌐 Russian translation: updated `fastapi-people.md`. (#10255) 2024-01-23 08:54:17 -05:00
github-actions 280f49ea83 📝 Update release notes 2024-01-23 13:15:22 +00:00
github-actions 7c9cb476a4 📝 Update release notes 2024-01-23 13:11:16 +00:00
3w36zj6 13b908df68
🌐 Add Japanese translation for `docs/ja/docs/tutorial/security/index.md` (#5798) 2024-01-23 08:10:49 -05:00
github-actions 5ca3d17587 📝 Update release notes 2024-01-23 13:08:30 +00:00
Nils Lindemann 74cf1c9702
🌐 Add German translation for `docs/de/docs/advanced/generate-clients.md` (#10725) 2024-01-23 08:07:40 -05:00
Nils Lindemann 43a7ff782b
🌐 Add German translation for `docs/de/docs/advanced/openapi-webhooks.md` (#10712) 2024-01-23 08:06:03 -05:00
github-actions 2c1dd4a92b 📝 Update release notes 2024-01-23 13:05:40 +00:00
github-actions 149fa96dc7 📝 Update release notes 2024-01-23 13:05:21 +00:00
Nils Lindemann c3914a19a7
🌐 Add German translation for `docs/de/docs/advanced/custom-response.md` (#10624) 2024-01-23 08:05:12 -05:00
Nils Lindemann 690edc0385
🌐 Add German translation for `docs/de/docs/advanced/additional-status-codes.md` (#10617) 2024-01-23 08:04:57 -05:00
github-actions cedea4d7b5 📝 Update release notes 2024-01-23 11:27:20 +00:00
Johannes Jungbluth 2f6fdf62b9
🌐 Add German translation for `docs/de/docs/tutorial/middleware.md` (#10391) 2024-01-23 06:26:59 -05:00
github-actions d2d5a5290c 📝 Update release notes 2024-01-23 11:22:48 +00:00
Nils Lindemann 9a33950344
🌐 Add German translation for introduction documents (#10497) 2024-01-23 06:22:17 -05:00
github-actions d7c588d693 📝 Update release notes 2024-01-22 20:18:27 +00:00
github-actions c945d686bb 📝 Update release notes 2024-01-22 20:12:06 +00:00
SwftAlpc 851daec754
🌐 Add Japanese translation for `docs/ja/docs/tutorial/encoder.md` (#1955) 2024-01-22 15:09:02 -05:00
github-actions f772868a56 📝 Update release notes 2024-01-22 20:06:11 +00:00
github-actions 7514aab30b 📝 Update release notes 2024-01-22 20:02:56 +00:00
SwftAlpc 1ac6b761e1
🌐 Add Japanese translation for `docs/ja/docs/tutorial/extra-data-types.md` (#1932) 2024-01-22 15:01:49 -05:00
github-actions 29c8b19af8 📝 Update release notes 2024-01-22 19:58:14 +00:00
bilal alpaslan 63ffd735d1
🌐 Add Turkish translation `docs/tr/docs/async.md` (#5191) 2024-01-22 14:57:04 -05:00
bilal alpaslan 0a105dc285
🌐 Add Turkish translation for `docs/tr/docs/project-generation.md` (#5192) 2024-01-22 14:55:41 -05:00
github-actions f8e77fb64c 📝 Update release notes 2024-01-22 19:55:21 +00:00
github-actions 22c34a3956 📝 Update release notes 2024-01-22 19:54:45 +00:00
HyeonJeong Yeo 6c3d8eb2d9
🌐 Add Korean translation for `docs/ko/docs/deployment/docker.md` (#5657) 2024-01-22 14:50:44 -05:00
github-actions 6f42234301 📝 Update release notes 2024-01-22 19:49:43 +00:00
gyudoza 79ab317cbd
🌐 Add Korean translation for `docs/ko/docs/deployment/server-workers.md` (#4935) 2024-01-22 14:49:13 -05:00
gyudoza 3f95f6fe41
🌐 Add Korean translation for `docs/ko/docs/deployment/index.md` (#4561) 2024-01-22 14:47:57 -05:00
github-actions 167d2524b4 📝 Update release notes 2024-01-22 19:47:31 +00:00
github-actions d532602eed 📝 Update release notes 2024-01-22 19:46:50 +00:00
github-actions 77fe266a69 📝 Update release notes 2024-01-22 19:44:45 +00:00
jungsu.kwon 66ef70a2ba
🌐 Add Korean translation for `docs/ko/docs/tutorial/path-operation-configuration.md` (#3639) 2024-01-22 14:43:22 -05:00
清靈語 792ba01745
🌐 Modify the description of `zh` - Traditional Chinese (#10889)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-22 20:42:53 +01:00
Jeesang Kim ea6e0ffdc0
🌐 Add Korean translation for `docs/ko/docs/tutorial/static-files.md` (#2957) 2024-01-22 14:42:37 -05:00
Spike Ho Yeol Lee 8ec9e30010
🌐 Add Korean translation for `docs/ko/docs/tutorial/response-model.md` (#2766) 2024-01-22 14:41:09 -05:00
github-actions ef1ccb563d 📝 Update release notes 2024-01-22 19:39:50 +00:00
github-actions adf61e5675 📝 Update release notes 2024-01-22 19:39:08 +00:00
Dahun Jeong 83944b9e26
🌐 Add Korean translation for `docs/ko/docs/tutorial/body-multiple-params.md` (#2461) 2024-01-22 14:37:52 -05:00
Spike Ho Yeol Lee 87a4c9ef01
🌐 Add Korean translation for `docs/ko/docs/tutorial/query-params-str-validations.md` (#2415) 2024-01-22 14:37:01 -05:00
github-actions eea7635713 📝 Update release notes 2024-01-22 19:36:25 +00:00
JRIM 2a8f8d1ac0
🌐 Add Korean translation for `docs/ko/docs/python-types.md` (#2267) 2024-01-22 14:34:47 -05:00
github-actions 5fb87313e2 📝 Update release notes 2024-01-22 19:31:48 +00:00
Spike Ho Yeol Lee 01d774d38c
🌐 Add Korean translation for `docs/ko/docs/tutorial/body-nested-models.md` (#2506) 2024-01-22 14:31:27 -05:00
github-actions 896f171aa2 📝 Update release notes 2024-01-22 19:26:37 +00:00
Sebastián Ramírez 2fe1a1387b
🔨 Verify `mkdocs.yml` languages in CI, update `docs.py` (#11009) 2024-01-22 20:26:14 +01:00
github-actions 60ea8f85a1 📝 Update release notes 2024-01-22 18:43:31 +00:00
Alejandra 62e6c888b7
🔧 Update config in `label-approved.yml` to accept translations with 1 reviewer (#11007) 2024-01-22 19:43:10 +01:00
github-actions 510c7a56a4 📝 Update release notes 2024-01-19 23:05:10 +00:00
Kani Kim c3019096e7
🌐 Add Korean translation for `docs/ko/docs/learn/index.md` (#10977) 2024-01-19 18:04:42 -05:00
github-actions d74b3b2565 📝 Update release notes 2024-01-17 17:15:47 +00:00
Max Su df09e0a3f6
🌐 Initialize translations for Traditional Chinese (#10505)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-17 18:15:27 +01:00
github-actions fc8ea413eb 📝 Update release notes 2024-01-16 13:23:49 +00:00
Sebastián Ramírez 950d9ce74d
📝 Deprecate old tutorials: Peewee, Couchbase, encode/databases (#10979) 2024-01-16 14:23:25 +01:00
github-actions d761a29908 📝 Update release notes 2024-01-16 12:11:43 +00:00
Nils Lindemann d1e533e370
✏️ Tweak the german translation of `docs/de/docs/tutorial/index.md` (#10962) 2024-01-16 07:11:15 -05:00
github-actions ae92e563b1 📝 Update release notes 2024-01-15 21:41:21 +00:00
ChanHaeng Lee 75ea31c79e
✏️ Fix typo error in `docs/ko/docs/tutorial/path-params.md` (#10758) 2024-01-15 16:40:57 -05:00
github-actions 2ce4c102fb 📝 Update release notes 2024-01-15 20:42:07 +00:00
Rafal Skolasinski 8450dc204d
✏️ Fix typo in `fastapi/security/oauth2.py` (#10972) 2024-01-15 21:41:47 +01:00
github-actions 2c670325af 📝 Update release notes 2024-01-15 16:47:21 +00:00
github-actions e500f99403 📝 Update release notes 2024-01-15 16:45:17 +00:00
SwftAlpc 7b462b2e69
🌐 Add Japanese translation for `docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md` (#1961)
Co-authored-by: ryusuke.miyaji <bluce826@gmail.com>
Co-authored-by: ryuckel <36391432+ryuckel@users.noreply.github.com>
Co-authored-by: tokusumi <tksmtoms@gmail.com>
Co-authored-by: T. Tokusumi <41147016+tokusumi@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-15 16:45:09 +00:00
SwftAlpc b518241c59
🌐 Add Japanese translation for `docs/ja/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md` (#1960)
Co-authored-by: ryusuke.miyaji <bluce826@gmail.com>
Co-authored-by: ryuckel <36391432+ryuckel@users.noreply.github.com>
Co-authored-by: tokusumi <tksmtoms@gmail.com>
Co-authored-by: T. Tokusumi <41147016+tokusumi@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-15 17:44:28 +01:00
github-actions 082eb21ba0 📝 Update release notes 2024-01-15 16:44:02 +00:00
SwftAlpc c68836ae46
🌐 Add Japanese translation for `docs/ja/docs/tutorial/dependencies/sub-dependencies.md` (#1959)
Co-authored-by: ryusuke.miyaji <bluce826@gmail.com>
Co-authored-by: ryuckel <36391432+ryuckel@users.noreply.github.com>
Co-authored-by: tokusumi <tksmtoms@gmail.com>
Co-authored-by: T. Tokusumi <41147016+tokusumi@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-15 17:43:41 +01:00
github-actions 6f3a134f6d 📝 Update release notes 2024-01-15 16:18:40 +00:00
github-actions 94404fc1a0 📝 Update release notes 2024-01-15 16:16:10 +00:00
tokusumi 289fbc83ba
🌐 Add Japanese translation for `docs/ja/docs/tutorial/background-tasks.md` (#2668)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-15 11:12:39 -05:00
github-actions 8ad62bd837 📝 Update release notes 2024-01-15 16:10:30 +00:00
SwftAlpc 39bb4bbdfc
🌐 Add Japanese translation for `docs/ja/docs/tutorial/dependencies/index.md` and `docs/ja/docs/tutorial/dependencies/classes-as-dependencies.md` (#1958)
Co-authored-by: ryusuke.miyaji <bluce826@gmail.com>
Co-authored-by: ryuckel <36391432+ryuckel@users.noreply.github.com>
Co-authored-by: tokusumi <tksmtoms@gmail.com>
Co-authored-by: T. Tokusumi <41147016+tokusumi@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-15 11:08:16 -05:00
SwftAlpc 5c71522974
🌐 Add Japanese translation for `docs/ja/docs/tutorial/response-model.md` (#1938)
Co-authored-by: ryusuke.miyaji <bluce826@gmail.com>
Co-authored-by: ryuckel <36391432+ryuckel@users.noreply.github.com>
Co-authored-by: tokusumi <tksmtoms@gmail.com>
Co-authored-by: T. Tokusumi <41147016+tokusumi@users.noreply.github.com>
Co-authored-by: atsumi <atsumi.tatsuya@gmail.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-15 11:01:54 -05:00
github-actions bf9489c0ad 📝 Update release notes 2024-01-15 15:53:17 +00:00
github-actions 997281bf83 📝 Update release notes 2024-01-15 15:51:30 +00:00
github-actions 1cf1ee42fe 📝 Update release notes 2024-01-15 15:48:57 +00:00
SwftAlpc a14907a47d
🌐 Add Japanese translation for `docs/ja/docs/tutorial/body-multiple-params.md` (#1903)
Co-authored-by: ryusuke.miyaji <bluce826@gmail.com>
Co-authored-by: ryuckel <36391432+ryuckel@users.noreply.github.com>
Co-authored-by: tokusumi <tksmtoms@gmail.com>
Co-authored-by: T. Tokusumi <41147016+tokusumi@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-15 10:48:41 -05:00
github-actions eed57df6f6 📝 Update release notes 2024-01-15 15:46:53 +00:00
SwftAlpc b73de83ca2
🌐 Add Japanese translation for `docs/ja/docs/tutorial/path-params-numeric-validations.md` (#1902)
Co-authored-by: ryusuke.miyaji <bluce826@gmail.com>
Co-authored-by: ryuckel <36391432+ryuckel@users.noreply.github.com>
Co-authored-by: tokusumi <tksmtoms@gmail.com>
Co-authored-by: T. Tokusumi <41147016+tokusumi@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-15 10:46:32 -05:00
github-actions b21599bab0 📝 Update release notes 2024-01-15 15:46:12 +00:00
SwftAlpc efac3a293f
🌐 Add Japanese translation for `docs/ja/docs/python-types.md` (#1899)
Co-authored-by: ryusuke.miyaji <bluce826@gmail.com>
Co-authored-by: ryuckel <36391432+ryuckel@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-15 10:45:27 -05:00
SwftAlpc 217bff20ca
🌐 Add Japanese translation for `docs/ja/docs/tutorial/handling-errors.md` (#1953)
Co-authored-by: ryusuke.miyaji <bluce826@gmail.com>
Co-authored-by: ryuckel <36391432+ryuckel@users.noreply.github.com>
Co-authored-by: tokusumi <tksmtoms@gmail.com>
Co-authored-by: T. Tokusumi <41147016+tokusumi@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-15 10:43:45 -05:00
SwftAlpc 88225ae231
🌐 Add Japanese translation for `docs/ja/docs/tutorial/response-status-code.md` (#1942)
Co-authored-by: ryusuke.miyaji <bluce826@gmail.com>
Co-authored-by: ryuckel <36391432+ryuckel@users.noreply.github.com>
Co-authored-by: tokusumi <tksmtoms@gmail.com>
Co-authored-by: T. Tokusumi <41147016+tokusumi@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-15 10:42:08 -05:00
github-actions 17511f7768 📝 Update release notes 2024-01-15 15:38:58 +00:00
github-actions f386011d64 📝 Update release notes 2024-01-15 15:38:18 +00:00
SwftAlpc c238292b44
🌐 Add Japanese translation for `docs/ja/docs/tutorial/extra-models.md` (#1941)
Co-authored-by: ryusuke.miyaji <bluce826@gmail.com>
Co-authored-by: ryuckel <36391432+ryuckel@users.noreply.github.com>
Co-authored-by: tokusumi <tksmtoms@gmail.com>
Co-authored-by: T. Tokusumi <41147016+tokusumi@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-15 16:36:32 +01:00
github-actions 79dbb11867 📝 Update release notes 2024-01-15 15:35:41 +00:00
SwftAlpc 2619bbd7cd
🌐 Add Japanese tranlsation for `docs/ja/docs/tutorial/schema-extra-example.md` (#1931)
Co-authored-by: ryusuke.miyaji <bluce826@gmail.com>
Co-authored-by: ryuckel <36391432+ryuckel@users.noreply.github.com>
Co-authored-by: tokusumi <tksmtoms@gmail.com>
Co-authored-by: T. Tokusumi <41147016+tokusumi@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-15 16:35:25 +01:00
SwftAlpc 88f19be7c3
🌐 Add Japanese translation for `docs/ja/docs/tutorial/body-nested-models.md` (#1930)
Co-authored-by: ryusuke.miyaji <bluce826@gmail.com>
Co-authored-by: ryuckel <36391432+ryuckel@users.noreply.github.com>
Co-authored-by: tokusumi <tksmtoms@gmail.com>
Co-authored-by: T. Tokusumi <41147016+tokusumi@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-15 16:34:57 +01:00
github-actions 467ab2a575 📝 Update release notes 2024-01-15 15:33:51 +00:00
SwftAlpc 15429a9c39
🌐 Add Japanese translation for `docs/ja/docs/tutorial/body-fields.md` (#1923)
Co-authored-by: ryusuke.miyaji <bluce826@gmail.com>
Co-authored-by: ryuckel <36391432+ryuckel@users.noreply.github.com>
Co-authored-by: tokusumi <tksmtoms@gmail.com>
Co-authored-by: T. Tokusumi <41147016+tokusumi@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-15 16:33:28 +01:00
github-actions 32ae949723 📝 Update release notes 2024-01-15 15:17:54 +00:00
Pedro Augusto de Paula Barbosa cf01195555
📝 Update `HTTPException` details in `docs/en/docs/tutorial/handling-errors.md` (#5418)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-15 16:17:34 +01:00
github-actions 2b6f12a5d0 📝 Update release notes 2024-01-15 15:14:34 +00:00
Sebastián Ramírez 63e5396a78
👷 Add changes-requested handling in GitHub Action issue manager (#10971) 2024-01-15 16:13:48 +01:00
github-actions 69dc735fc2 📝 Update release notes 2024-01-15 10:32:42 +00:00
Sebastián Ramírez dcc952d699
Include HTTP 205 in status codes with no body (#10969) 2024-01-15 11:32:16 +01:00
github-actions e90fc7bed4 📝 Update release notes 2024-01-13 15:10:47 +00:00
Emmett Butler f18eadb7de
Refactor tests for duplicate operation ID generation for compatibility with other tools running the FastAPI test suite (#10876)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-13 16:10:26 +01:00
github-actions 61a08d0c60 📝 Update release notes 2024-01-13 14:31:58 +00:00
Evgenii de0126d145
♻️ Simplify string format with f-strings in `fastapi/utils.py` (#10576)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-13 15:31:38 +01:00
github-actions cca6203c18 📝 Update release notes 2024-01-13 12:19:28 +00:00
Nils Lindemann 83e386519d
✏️ A few tweaks in `docs/de/docs/tutorial/first-steps.md` (#10959) 2024-01-13 07:16:22 -05:00
github-actions b24c4870d8 📝 Update release notes 2024-01-13 12:10:29 +00:00
Nils Lindemann bc13faa15d
✏️ Fix link in `docs/en/docs/advanced/async-tests.md` (#10960) 2024-01-13 07:07:15 -05:00
github-actions 5377c594da 📝 Update release notes 2024-01-13 12:00:11 +00:00
Juan José López Lira a37ac3819e
✏️ Fix typos for Spanish documentation (#10957) 2024-01-13 06:57:27 -05:00
github-actions 4299e712fb 📝 Update release notes 2024-01-13 11:51:55 +00:00
fhabers21 c3e2aa9dc2
🌐 Add German translation for `docs/de/docs/tutorial/index.md` (#9502)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-13 06:50:36 -05:00
github-actions cc5711e6f1 📝 Update release notes 2024-01-13 11:49:51 +00:00
Ahmed Ashraf 1caee0f105
✏️ Fix Pydantic method name in `docs/en/docs/advanced/path-operation-advanced-configuration.md` (#10826)
Co-authored-by: Ahmed Ashraf <root@xps>
2024-01-13 06:49:05 -05:00
github-actions 1ce27fd743 📝 Update release notes 2024-01-13 01:00:55 +00:00
Marcelo Trylesinski fad1a464e7
🔧 Group dependencies on dependabot updates (#10952) 2024-01-13 02:00:31 +01:00
github-actions 26e57903d1 📝 Update release notes 2024-01-12 15:14:18 +00:00
dependabot[bot] b0cd4f915b
⬆ Bump actions/setup-python from 4 to 5 (#10764)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-12 16:13:58 +01:00
github-actions bc7d026b6c 📝 Update release notes 2024-01-12 15:04:40 +00:00
github-actions c9e46ae12c 📝 Update release notes 2024-01-12 15:02:38 +00:00
dependabot[bot] a293709998
⬆ Bump pypa/gh-action-pypi-publish from 1.8.10 to 1.8.11 (#10731)
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.8.10 to 1.8.11.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.8.10...v1.8.11)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-12 10:01:52 -05:00
Jiri Daněk 25646a5070
🔧 Fix Ruff configuration unintentionally enabling and re-disabling mccabe complexity check (#10893)
Fix mistake in Ruff configuration unintentionally enabling mccabe complexity check

Enabling "C" turns on complexity checks (C90, mccabe), which is unintended
Instead, enable "C4" to get flake8-comprehensions checks

See docs at https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4

Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-12 16:01:06 +01:00
github-actions 0ce4f80ac9 📝 Update release notes 2024-01-12 15:00:39 +00:00
dependabot[bot] 91666b3556
⬆ Bump dawidd6/action-download-artifact from 2.28.0 to 3.0.0 (#10777)
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 2.28.0 to 3.0.0.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](https://github.com/dawidd6/action-download-artifact/compare/v2.28.0...v3.0.0)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-12 10:00:18 -05:00
github-actions 22e5d9e27f 📝 Update release notes 2024-01-12 14:52:20 +00:00
ooknimm be0bd34446
Re-enable test in `tests/test_tutorial/test_header_params/test_tutorial003.py` after fix in Starlette (#10904)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-12 15:52:00 +01:00
github-actions 44f3ebce6e 📝 Update release notes 2024-01-12 14:38:40 +00:00
Sebastián Ramírez 0aee526de9
🔧 Add support for translations to languages with a longer code name, like `zh-hant` (#10950) 2024-01-12 14:38:17 +00:00
github-actions 4f9ad80f5d 📝 Update release notes 2024-01-12 14:15:52 +00:00
Nils Lindemann c81ab17a59
🌐 Add German translation for `docs/de/docs/tutorial/background-tasks.md` (#10566) 2024-01-12 09:15:29 -05:00
github-actions ca33b6edac 📝 Update release notes 2024-01-12 14:10:54 +00:00
Delitel-WEB 58e2f8b1d9
✏️ Fix typo in `docs/ru/docs/index.md` (#10672) 2024-01-12 09:10:31 -05:00
github-actions 38915783fc 📝 Update release notes 2024-01-12 14:03:51 +00:00
Jacob McDonald 7e0e16fa36
📝 Add warning about lifespan functions and backwards compatibility with events (#10734)
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
2024-01-12 15:03:25 +01:00
github-actions dc704036a2 📝 Update release notes 2024-01-12 13:40:15 +00:00
theoohoho f1329abf99
✏️ Fix broken link in `docs/tutorial/sql-databases.md` in several languages (#10716) 2024-01-12 08:39:54 -05:00
github-actions 753c8136d8 📝 Update release notes 2024-01-12 11:15:04 +00:00
github-actions 6a4aed45f0 📝 Update release notes 2024-01-12 11:13:22 +00:00
HiemalBeryl 4c231854dc
✏️ Fix typos in `docs/zh/docs/tutorial/extra-data-types.md` (#10727) 2024-01-12 12:13:04 +01:00
Aleksandr Andrukhov 3ca38568c1
🌐 Add Russian translation for `docs/ru/docs/tutorial/dependencies/classes-as-dependencies.md` (#10410)
Co-authored-by: Vladislav Kramorenko <85196001+Xewus@users.noreply.github.com>
2024-01-12 12:12:19 +01:00
github-actions e0eaaee749 📝 Update release notes 2024-01-12 11:11:15 +00:00
Turabek Gaybullaev ea84587a2f
✏️ Remove broken links from `external_links.yml` (#10943) 2024-01-12 12:10:55 +01:00
github-actions 5f37d3870b 📝 Update release notes 2024-01-11 22:25:58 +00:00
Ezzeddin Abdullah 0c796747a3
📝 Update template docs with more info about `url_for` (#5937)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-11 23:25:37 +01:00
github-actions 22e68b151d 📝 Update release notes 2024-01-11 21:21:57 +00:00
Piotr Szaciłowski fd97e8efe4
📝 Update usage of Token model in security docs (#9313)
Co-authored-by: Alejandra Sánchez <ing.alejandrasanchezv@gmail.com>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-11 16:21:35 -05:00
github-actions 53a3dd7408 📝 Update release notes 2024-01-11 20:18:31 +00:00
Pedro Augusto de Paula Barbosa d192ddacec
✏️ Update highlighted line in `docs/en/docs/tutorial/bigger-applications.md` (#5490)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
2024-01-11 21:18:07 +01:00
github-actions cbcd3fe863 📝 Update release notes 2024-01-11 20:01:57 +00:00
Ankit Anchlia b62e379a55
📝 Add External Link: Explore How to Effectively Use JWT With FastAPI (#10212)
Co-authored-by: Ankit <aanchlia@bluemoonforms.com>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
2024-01-11 20:59:29 +01:00
github-actions 99769b9669 📝 Update release notes 2024-01-11 19:57:48 +00:00
Hungtsetse f74aeb0067
📝 Add hyperlink to `docs/en/docs/tutorial/static-files.md` (#10243) 2024-01-11 14:56:09 -05:00
github-actions 4dde172a96 📝 Update release notes 2024-01-11 19:52:37 +00:00
Nicoló Lino e6759aa604
📝 Add External Link: Instrument a FastAPI service adding tracing with OpenTelemetry and send/show traces in Grafana Tempo (#9440)
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
2024-01-11 14:52:15 -05:00
github-actions 0be64abac7 📝 Update release notes 2024-01-11 17:43:08 +00:00
Nils Lindemann 0380ca3e69
📝 Review and rewording of `en/docs/contributing.md` (#10480)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-11 21:42:43 +04:00
github-actions 3325635eed 📝 Update release notes 2024-01-11 17:29:48 +00:00
Mikhail Rozhkov abe7db6b24
📝 Add External Link: ML serving and monitoring with FastAPI and Evidently (#9701)
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-11 21:29:24 +04:00
github-actions 6761fc1fa4 📝 Update release notes 2024-01-11 16:31:38 +00:00
malicious 838e9c964e
📝 Reword in docs, from "have in mind" to "keep in mind" (#10376)
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
2024-01-11 20:31:18 +04:00
github-actions facdc91629 📝 Update release notes 2024-01-11 16:07:29 +00:00
Jeny Sadadia 1369c45c2e
📝 Add External Link: Talk by Jeny Sadadia (#10265)
Signed-off-by: Jeny Sadadia <jeny.sadadia@gmail.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-11 16:07:05 +00:00
github-actions fedee4d028 📝 Update release notes 2024-01-11 15:59:47 +00:00
Nils Lindemann 6bda1326a4
📝 Add location info to `tutorial/bigger-applications.md` (#10552) 2024-01-11 16:59:27 +01:00
Sebastián Ramírez cb95d1cb89 🔖 Release version 0.109.0 2024-01-11 16:32:00 +01:00
github-actions 7c1aeb5db2 📝 Update release notes 2024-01-11 15:30:35 +00:00
Sebastián Ramírez 5e583199b3
⬆️ Upgrade Starlette to >=0.35.0,<0.36.0 (#10938) 2024-01-11 16:29:54 +01:00
github-actions c3e0625423 📝 Update release notes 2024-01-11 14:35:15 +00:00
s111d c46eba8004
✏️ Fix typo in `docs/en/docs/alternatives.md` (#10931)
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
2024-01-11 09:33:57 -05:00
github-actions 5b1e6865c5 📝 Update release notes 2024-01-11 14:33:27 +00:00
Nils Lindemann 69cb005f61
📝 Replace `email` with `username` in `docs_src/security/tutorial007` code examples (#10649) 2024-01-11 09:33:05 -05:00
github-actions 0da980cb0b 📝 Update release notes 2024-01-10 21:00:51 +00:00
Nils Lindemann 135dcba746
📝 Add VS Code tutorial link (#10592)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-11 01:00:32 +04:00
github-actions 21145d8e9f 📝 Update release notes 2024-01-10 20:56:59 +00:00
Aliaksei Urbanski 07f8d31ec9
Add support for Python 3.12 (#10666)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-10 15:55:45 -05:00
github-actions 91d7fb6d25 📝 Update release notes 2024-01-10 19:14:15 +00:00
Sebastián Ramírez b584faffee
📝 Add notes about Pydantic v2's new `.model_dump()` (#10929) 2024-01-10 19:13:55 +00:00
github-actions 1334485435 📝 Update release notes 2024-01-10 18:15:28 +00:00
Sungyun Hur 843bc85155
📝 Fix broken link in `docs/en/docs/tutorial/sql-databases.md` (#10765)
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
2024-01-10 13:15:04 -05:00
github-actions 1cd23a1dbc 📝 Update release notes 2024-01-10 17:43:56 +00:00
Fahad Md Kamal 06bf7781df
🌐 Add Bengali translation for `docs/bn/docs/index.md` (#9177)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-10 18:43:35 +01:00
github-actions 7e0cdf2510 📝 Update release notes 2024-01-10 17:19:42 +00:00
Sebastián Ramírez 84cd488df1
📝 Add External Link: FastAPI application monitoring made easy (#10917)
Co-authored-by: Simon Gurcke <simon@gurcke.de>
2024-01-10 21:19:21 +04:00
github-actions 958425a899 📝 Update release notes 2024-01-09 20:37:29 +00:00
Craig Blaszczyk 7eeacc9958
Generate automatic language names for docs translations (#5354)
Co-authored-by: Craig Blaszczyk <craig@boughtbymany.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-09 20:37:09 +00:00
github-actions 3b9a2bcb1b 📝 Update release notes 2024-01-09 18:35:49 +00:00
github-actions f73be1d599 📝 Update release notes 2024-01-09 18:33:22 +00:00
github-actions dd6cf5d710 📝 Update release notes 2024-01-09 18:32:18 +00:00
github-actions aa6586d51a 📝 Update release notes 2024-01-09 18:24:21 +00:00
s111d f43fc82267
✏️ Fix typos in `docs/en/docs/alternatives.md` and `docs/en/docs/tutorial/dependencies/index.md` (#10906)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-09 22:22:46 +04:00
Sebastián Ramírez 0108b002f3
👥 Update FastAPI People (#10871)
Co-authored-by: github-actions <github-actions@github.com>
2024-01-09 13:20:37 -05:00
Dmitry Volodin f226040d28
✏️ Fix typos in `docs/en/docs/tutorial/dependencies/dependencies-with-yield.md` (#10834)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-09 22:19:59 +04:00
github-actions cbd53f3bc8 📝 Update release notes 2024-01-09 18:15:02 +00:00
Takuma Yamamoto e628e1928e
✏️ Update Python version in `index.md` in several languages (#10711)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-09 18:13:02 +00:00
github-actions 809b21c849 📝 Update release notes 2024-01-09 18:12:12 +00:00
John Philip 7dd944deda
📝 Add article: "Building a RESTful API with FastAPI: Secure Signup and Login Functionality Included" (#9733)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-09 21:49:58 +04:00
Andrew Chang-DeWitt 6f43539d87
📝 Add warning about lifecycle events with `AsyncClient` (#4167)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2024-01-09 21:45:52 +04:00
github-actions d62b3ea69c 📝 Update release notes 2024-01-09 17:32:21 +00:00
github-actions d2c7ffb447 📝 Update release notes 2024-01-09 17:31:25 +00:00
Aleksandr Andrukhov 33e57e6f02
🌐 Add Russian translation for `docs/ru/docs/tutorial/request-forms-and-files.md` (#10347)
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
2024-01-09 21:06:10 +04:00
Rostyslav e986894344
🌐 Add Ukrainian translation for `docs/uk/docs/index.md` (#10362)
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
2024-01-09 21:04:42 +04:00
github-actions 43489beb98 📝 Update release notes 2024-01-09 17:00:36 +00:00
github-actions 5e5cabefe1 📝 Update release notes 2024-01-09 16:51:05 +00:00
github-actions 6c15776406 📝 Update release notes 2024-01-09 16:50:06 +00:00
github-actions c2dc0252b0 📝 Update release notes 2024-01-09 16:38:21 +00:00
github-actions 04dbcf416c 📝 Update release notes 2024-01-09 16:31:04 +00:00
Clarence ed3e79be77
✏️ Fix typos in `/docs/reference/exceptions.md` and `/en/docs/reference/status.md` (#10809) 2024-01-09 17:30:58 +01:00
Sumin Kim 6efd537204
✏️ Update Python version in `docs/ko/docs/index.md` (#10680) 2024-01-09 17:23:09 +01:00
Kay Jan aa53a48fe3
✏️ Fix typo in `openapi-callbacks.md` (#10673) 2024-01-09 17:21:54 +01:00
Amir Khorasani 7d8241acb9
🌐 Add Persian translation for `docs/fa/docs/features.md` (#5887)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: Amin Alaee <mohammadamin.alaee@gmail.com>
2024-01-09 20:14:01 +04:00
Sepehr Shirkhanlu 60e1259ca4
✏️ Fix typo in `fastapi/routing.py` (#10520)
Fix: https://github.com/tiangolo/fastapi/discussions/10493
2024-01-09 17:10:37 +01:00
github-actions cee422f073 📝 Update release notes 2024-01-09 16:09:04 +00:00
github-actions 9ddc71e317 📝 Update release notes 2024-01-09 16:08:31 +00:00
github-actions d305a67a81 📝 Update release notes 2024-01-09 16:07:49 +00:00
github-actions 8f70f8c43b 📝 Update release notes 2024-01-09 16:03:03 +00:00
github-actions 11a5993c8c 📝 Update release notes 2024-01-09 16:01:13 +00:00
_Shuibei 9f7902925a
🌐 Add Chinese translation for `docs/zh/docs/advanced/additional-responses.md` (#10325)
Co-authored-by: unknown <lemonc2021@foxmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-09 16:53:39 +01:00
Aleksandr Andrukhov a64b2fed91
🌐 Fix typos in Russian translations for `docs/ru/docs/tutorial/background-tasks.md`, `docs/ru/docs/tutorial/body-nested-models.md`, `docs/ru/docs/tutorial/debugging.md`, `docs/ru/docs/tutorial/testing.md` (#10311) 2024-01-09 16:52:07 +01:00
Aleksandr Andrukhov 933668b42e
🌐 Add Russian translation for `docs/ru/docs/tutorial/request-files.md` (#10332)
Co-authored-by: Vladislav Kramorenko <85196001+Xewus@users.noreply.github.com>
Co-authored-by: oubush <oubush@users.noreply.github.com>
2024-01-09 10:51:54 -05:00
github-actions c5bbcb8c9c 📝 Update release notes 2024-01-09 15:49:16 +00:00
github-actions f27e818edb 📝 Update release notes 2024-01-09 15:47:49 +00:00
github-actions fe620a6c12 📝 Update release notes 2024-01-09 15:46:50 +00:00
xzmeng 179c8a0763
🌐 Add Chinese translation for `docs/zh/docs/deployment/server-workers.md` (#10292)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Big Yellow Dog <dognasus@outlook.com>
2024-01-09 16:46:41 +01:00
xzmeng 4023510e4c
🌐 Add Chinese translation for `docs/zh/docs/deployment/cloud.md` (#10291)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Lion <121552599+socket-socket@users.noreply.github.com>
2024-01-09 16:44:17 +01:00
github-actions d29709fee8 📝 Update release notes 2024-01-09 15:43:37 +00:00
github-actions 623ee4460b 📝 Update release notes 2024-01-09 15:41:08 +00:00
xzmeng da9bd0ee4c
🌐 Add Chinese translation for `docs/zh/docs/deployment/manually.md` (#10279)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Big Yellow Dog <dognasus@outlook.com>
2024-01-09 16:39:41 +01:00
xzmeng 5eab5dbed6
🌐 Add Chinese translation for `docs/zh/docs/deployment/https.md` (#10277)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Big Yellow Dog <dognasus@outlook.com>
Co-authored-by: Lion <121552599+socket-socket@users.noreply.github.com>
2024-01-09 16:38:25 +01:00
xzmeng 152171e455
🌐 Add Chinese translation for `docs/zh/docs/deployment/index.md` (#10275)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: 吴定焕 <108172295+wdh99@users.noreply.github.com>
2024-01-09 16:37:29 +01:00
github-actions 271b4f3144 📝 Update release notes 2024-01-09 15:37:13 +00:00
fhabers21 031000fc6e
🌐 Add German translation for `docs/de/docs/tutorial/first-steps.md` (#9530)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: Georg Wicke-Arndt <g.wicke-arndt@outlook.com>
2024-01-09 16:36:32 +01:00
github-actions c471c93113 📝 Update release notes 2024-01-09 15:36:04 +00:00
Hasan Sezer Taşan 1021152f0a
🌐 Update Turkish translation for `docs/tr/docs/index.md` (#10444) 2024-01-09 10:35:44 -05:00
github-actions b4ad143e37 📝 Update release notes 2024-01-09 15:33:53 +00:00
KAZAMA-DREAM cb53749798
🌐 Add Chinese translation for `docs/zh/docs/learn/index.md` (#10479)
Co-authored-by: KAZAMA <wyy1778789301@163.com>
2024-01-09 10:33:25 -05:00
github-actions 01b106c290 📝 Update release notes 2024-01-09 15:31:54 +00:00
Aleksandr Andrukhov 3256c3ff07
🌐 Add Russian translation for `docs/ru/docs/learn/index.md` (#10539)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-09 10:31:45 -05:00
github-actions d6b4c6c65c 📝 Update release notes 2024-01-09 15:31:14 +00:00
Royc30ne 0f4b6294bf
🌐 Update SQLAlchemy instruction in Chinese translation `docs/zh/docs/tutorial/sql-databases.md` (#9712)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-09 16:29:37 +01:00
github-actions 0a3dc7d107 📝 Update release notes 2024-01-09 15:28:54 +00:00
Hasan Sezer Taşan 23ad827597
🌐 Add Turkish translation for `docs/tr/docs/external-links.md` (#10549) 2024-01-09 10:28:47 -05:00
pablocm83 4fa251beb5
🌐 Add Spanish translation for `docs/es/docs/learn/index.md` (#10885)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-09 19:26:26 +04:00
ArtemKhymenko 3af6766e26
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/body-fields.md` (#10670)
Co-authored-by: Maksym Zavalniuk <mezgoodle@gmail.com>
Co-authored-by: Rostyslav <rostik1410@users.noreply.github.com>
2024-01-09 10:25:48 -05:00
github-actions ce9aba258e 📝 Update release notes 2024-01-09 15:22:55 +00:00
github-actions f9cbaa5f39 📝 Update release notes 2024-01-09 15:18:47 +00:00
David Takacs eecc7a8113
🌐 Add Hungarian translation for `/docs/hu/docs/index.md` (#10812)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Peter Panko <prike18@gmail.com>
2024-01-09 16:16:04 +01:00
Hasan Sezer Taşan 2090e9a3e2
🌐 Add Turkish translation for `docs/tr/docs/newsletter.md` (#10550) 2024-01-09 16:14:23 +01:00
github-actions 5b63406aa5 📝 Update release notes 2024-01-09 15:12:19 +00:00
github-actions ca10d3927b 📝 Update release notes 2024-01-09 15:11:39 +00:00
github-actions 631601787b 📝 Update release notes 2024-01-09 15:11:10 +00:00
pablocm83 d129910323
🌐 Add Spanish translation for `docs/es/docs/help/index.md` (#10907) 2024-01-09 16:09:47 +01:00
pablocm83 e10bdb82cc
🌐 Add Spanish translation for `docs/es/docs/about/index.md` (#10908)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-09 16:09:12 +01:00
pablocm83 7111d69f28
🌐 Add Spanish translation for `docs/es/docs/resources/index.md` (#10909) 2024-01-09 16:08:24 +01:00
github-actions 635d1a2d6d 📝 Update release notes 2024-01-09 15:04:35 +00:00
Sebastián Ramírez 423cdd24cc
👷 Upgrade custom GitHub Action comment-docs-preview-in-pr (#10916) 2024-01-09 19:02:53 +04:00
github-actions 7fbb7963d3 📝 Update release notes 2024-01-09 14:57:58 +00:00
Sebastián Ramírez 78ff6e3efd
⬆️ Upgrade GitHub Action latest-changes (#10915) 2024-01-09 18:57:33 +04:00
github-actions fe694766ae 📝 Update release notes 2024-01-09 14:45:35 +00:00
Tristan Marion a1ea708044
📝 Replace HTTP code returned in case of existing user error in docs for testing (#4482)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-09 18:44:08 +04:00
github-actions 897cde9fe2 📝 Update release notes 2024-01-09 14:37:53 +00:00
github-actions ed628ddb92 📝 Update release notes 2024-01-09 14:37:20 +00:00
Moustapha Sall 4491ea6882
📝 Update example source files for SQL databases with SQLAlchemy (#9508)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2024-01-09 15:35:33 +01:00
Keshav Malik 57d4d93841
📝 Add blog for FastAPI & Supabase (#6018)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-09 18:32:46 +04:00
github-actions 136fe2b70f 📝 Update release notes 2024-01-09 14:30:16 +00:00
Andrey Otto e9ffa20c8e
📝 Update code examples in docs for body, replace name `create_item` with `update_item` when appropriate (#5913) 2024-01-09 18:28:58 +04:00
github-actions d5498274f9 📝 Update release notes 2024-01-09 14:21:30 +00:00
Sebastián Ramírez 3c7685273f
👷 Upgrade GitHub Action label-approved (#10913) 2024-01-09 18:21:10 +04:00
github-actions 04016d3bf9 📝 Update release notes 2024-01-08 18:50:12 +00:00
Sebastián Ramírez 1780c21e7a
⬆️ Upgrade GitHub Action label-approved (#10905) 2024-01-08 22:49:53 +04:00
Sebastián Ramírez 040ad986d4 ✏️ Fix typo in release notes 2023-12-26 21:47:18 +01:00
github-actions 84d400b916 📝 Update release notes 2023-12-26 20:37:55 +00:00
Sebastián Ramírez dd790c34ff
✏️ Fix typo in dependencies with yield source examples (#10847) 2023-12-26 21:37:34 +01:00
Sebastián Ramírez fe0249a23e 🔖 Release version 0.108.0 2023-12-26 21:17:18 +01:00
github-actions 43e2223804 📝 Update release notes 2023-12-26 20:12:59 +00:00
Sebastián Ramírez c55f90df32
⬆️ Upgrade Starlette to `>=0.29.0,<0.33.0`, update docs and usage of templates with new Starlette arguments (#10846)
* 📝 Update docs for compatibility with Starlette 0.29.0 and new template arguments

* ⬆️ Upgrade Starlette to >=0.29.0,<0.33.0

* 📌 Remove AnyIO pin
2023-12-26 21:12:34 +01:00
Sebastián Ramírez f933fd6ff8 🔖 Release version 0.107.0 2023-12-26 20:04:08 +01:00
github-actions 9090bf4084 📝 Update release notes 2023-12-26 19:03:31 +00:00
Adrian Garcia Badaracco d633953f13
⬆️ Upgrade Starlette to 0.28.0 (#9636)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-12-26 20:03:07 +01:00
github-actions a751032c09 📝 Update release notes 2023-12-26 17:23:45 +00:00
Alejandra 505ae06c0b
📝 Add docs: Node.js script alternative to update OpenAPI for generated clients (#10845) 2023-12-26 18:23:20 +01:00
github-actions 4de60e153a 📝 Update release notes 2023-12-26 17:14:13 +00:00
Alejandra 8b5843ebcd
📝 Restructure Docs section in Contributing page (#10844)
📝 Restructure Docs section in Contributing page
2023-12-26 18:13:50 +01:00
Sebastián Ramírez 5826c4f31f 📝 Tweak release notes 2023-12-25 19:06:04 +01:00
Sebastián Ramírez 91510db620 🔖 Release version 0.106.0 2023-12-25 19:01:26 +01:00
Sebastián Ramírez bcd5a424cd 📝 Update release notes 2023-12-25 19:00:47 +01:00
github-actions 678bed2fc9 📝 Update release notes 2023-12-25 17:57:54 +00:00
Sebastián Ramírez a4aa79e0b4
Add support for raising exceptions (including `HTTPException`) in dependencies with `yield` in the exit code, do not support them in background tasks (#10831)
* ♻️ Refactor dependency AsyncExitStack logic, exit dependencies after creating the response, before sending it

*  Update tests for dependencies exit, check they are finished before the response is sent

* 🔥 Remove ExitAsyncStackMiddleware as it's no longer needed

* 📝 Update docs for dependencies with yield

* 📝 Update release notes

* 📝 Add source examples for new dependencies with yield raising

*  Add tests for new dependencies raising after yield

* 📝 Update release notes
2023-12-25 18:57:35 +01:00
github-actions e7756ae7dc 📝 Update release notes 2023-12-20 17:06:01 +00:00
Sebastián Ramírez dc2fdd56af
👥 Update FastAPI People (#10567)
Co-authored-by: github-actions <github-actions@github.com>
2023-12-20 18:05:37 +01:00
Sebastián Ramírez 36c2667768 📝 Update release notes 2023-12-12 00:34:36 +00:00
Sebastián Ramírez d8185efb6e 🔖 Release version 0.105.0 2023-12-12 00:32:48 +00:00
github-actions fc51d7e3c7 📝 Update release notes 2023-12-12 00:29:29 +00:00
Sebastián Ramírez b98c65cb36
🔥 Remove unused NoneType (#10774) 2023-12-12 00:29:03 +00:00
github-actions ba99214417 📝 Update release notes 2023-12-12 00:23:15 +00:00
Sebastián Ramírez 6f5aa81c07
Add support for multiple Annotated annotations, e.g. `Annotated[str, Field(), Query()]` (#10773) 2023-12-12 00:22:47 +00:00
github-actions 73dcc40f09 📝 Update release notes 2023-12-06 11:34:10 +00:00
Sebastián Ramírez 33493ce694
🔧 Update sponsors, add PropelAuth (#10760) 2023-12-06 12:33:48 +01:00
github-actions 01e570c56d 📝 Update release notes 2023-12-04 11:11:17 +00:00
Sebastián Ramírez ca03379b65
👷 Update build docs, verify README on CI (#10750) 2023-12-04 12:10:54 +01:00
github-actions 8cf2fa0fe4 📝 Update release notes 2023-11-30 20:48:22 +00:00
Sebastián Ramírez 99a2ec981b
📝 Tweak default suggested configs for generating clients (#10736) 2023-11-30 21:48:01 +01:00
github-actions 6fb951bae2 📝 Update release notes 2023-11-28 12:10:38 +00:00
Sebastián Ramírez 13cef7a21a
🔧 Update sponsors, remove Fern (#10729) 2023-11-28 13:10:12 +01:00
github-actions e9ce31e96b 📝 Update release notes 2023-11-28 10:52:59 +00:00
Sebastián Ramírez 1560879a84
🔧 Update sponsors, add Scalar (#10728) 2023-11-28 10:52:35 +00:00
github-actions ac93277d3b 📝 Update release notes 2023-11-18 13:47:35 +00:00
Sebastián Ramírez 71d51a9953
🔧 Update sponsors, add Codacy (#10677) 2023-11-18 14:47:04 +01:00
github-actions 81bab77617 📝 Update release notes 2023-11-18 13:38:23 +00:00
Sebastián Ramírez 781984b226
🔧 Update sponsors, add Reflex (#10676) 2023-11-18 14:38:01 +01:00
github-actions 480620372a 📝 Update release notes 2023-11-04 02:03:01 +00:00
Sebastián Ramírez b04d07c933
📝 Update release notes, move and check latest-changes (#10588) 2023-11-04 06:02:18 +04:00
github-actions 46335068d2 📝 Update release notes 2023-11-04 01:53:13 +00:00
Sebastián Ramírez 4f89886b00
👷 Upgrade latest-changes GitHub Action (#10587) 2023-11-04 05:52:42 +04:00
Sebastián Ramírez 1c25e2d8dc 📝 Update release notes 2023-10-30 15:12:57 +04:00
Sebastián Ramírez 7e5afe2cb9 🔖 Release version 0.104.1 2023-10-30 14:04:54 +04:00
Sebastián Ramírez 6c53ddd084 📝 Update release notes 2023-10-30 14:04:14 +04:00
github-actions 0f1ddf5f69 📝 Update release notes 2023-10-30 09:59:37 +00:00
Alejandra Klachquin 758a8f29e1
📌 Pin Swagger UI version to 5.9.0 temporarily to handle a bug crashing it in 5.9.1 (#10529)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-10-30 13:58:58 +04:00
github-actions e4b21c6eab 📝 Update release notes 2023-10-30 08:08:48 +00:00
Koke 759378d67f
✏️ Update Pydantic links to dotenv support (#10511) 2023-10-30 12:00:16 +04:00
github-actions e7204ac7bf 📝 Update release notes 2023-10-30 07:52:04 +00:00
github-actions 7702c5af36 📝 Update release notes 2023-10-30 07:51:12 +00:00
github-actions 0066578bbe 📝 Update release notes 2023-10-30 07:42:04 +00:00
Hasnat Sajid 6b903ff1fb
✏️ Update links in `docs/en/docs/async.md` and `docs/zh/docs/async.md` to make them relative (#10498) 2023-10-30 11:07:15 +04:00
Hasnat Sajid cbc8f18664
✏️ Fix links in `docs/em/docs/async.md` (#10507) 2023-10-30 11:05:01 +04:00
Dmitry fbe6ba6df1
✏️ Fix typo in `docs/em/docs/index.md`, Python 3.8 (#10521)
typo in index page

7️⃣ ->  8️⃣
2023-10-30 11:01:00 +04:00
github-actions b84f9f6ecb 📝 Update release notes 2023-10-29 09:49:57 +00:00
dependabot[bot] 0b83491843
⬆ Bump pillow from 9.5.0 to 10.1.0 (#10446)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.5.0 to 10.1.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/9.5.0...10.1.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-29 13:49:21 +04:00
github-actions 38db1fe074 📝 Update release notes 2023-10-29 09:33:47 +00:00
github-actions 378e590757 📝 Update release notes 2023-10-29 09:33:30 +00:00
dependabot[bot] 290191421b
⬆ Update mkdocs-material requirement from <9.0.0,>=8.1.4 to >=8.1.4,<10.0.0 (#5862)
⬆ Update mkdocs-material requirement

Updates the requirements on [mkdocs-material](https://github.com/squidfunk/mkdocs-material) to permit the latest version.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/8.1.4...9.0.3)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-29 09:33:11 +00:00
dependabot[bot] e0c5beb5c8
⬆ Bump mkdocs-material from 9.1.21 to 9.4.7 (#10545)
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.1.21 to 9.4.7.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.1.21...9.4.7)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-29 13:32:50 +04:00
github-actions 072c701b0e 📝 Update release notes 2023-10-29 09:12:56 +00:00
Sebastián Ramírez e45cbb7e5e
👷 Install MkDocs Material Insiders only when secrets are available, for Dependabot (#10544) 2023-10-29 13:12:11 +04:00
github-actions 2754d4e0fe 📝 Update release notes 2023-10-25 08:25:52 +00:00
Sebastián Ramírez f7e338dcd8
🔧 Update sponsors badges, Databento (#10519) 2023-10-25 12:25:03 +04:00
github-actions 223970e03c 📝 Update release notes 2023-10-24 20:26:43 +00:00
Sebastián Ramírez 2e14c69c31
👷 Adopt Ruff format (#10517)
* 🔧 Update pre-commit, use ruff format

* ⬆️ Upgrade dependencies, use Ruff for formatting

* 🔧 Update Ruff config

* 🔨 Update lint and format scripts, use Ruff

* 🎨 Format internals with Ruff

* 🎨 Format docs scripts

* 🎨 Format tests

* 🎨 Format extra commas in src for docs

* 📝 Update docs mentioning `@lru_cache()`, use `@lru_cache` instead to keep consistency with the format

* 🎨 Update src for docs, use plain `@lru_cache`

* 🎨 Update src for docs format and docs references
2023-10-25 00:26:06 +04:00
github-actions 4ef7a40eae 📝 Update release notes 2023-10-22 10:04:16 +00:00
Sebastián Ramírez e0a5edaaa3
🔧 Add `CITATION.cff` file for academic citations (#10496) 2023-10-22 14:03:38 +04:00
github-actions f9b53ae778 📝 Update release notes 2023-10-22 07:35:50 +00:00
Sebastián Ramírez e8bd645fa9
📝 Update data structure and render for external-links (#10495)
* 📝 Update data structure and render for external-links

* 📝 Update translations for external links
2023-10-22 11:35:13 +04:00
github-actions 808e3bb9d5 📝 Update release notes 2023-10-21 07:11:00 +00:00
Sebastián Ramírez 9bfbacfe98
🐛 Fix overriding MKDocs theme lang in hook (#10490) 2023-10-21 11:10:18 +04:00
github-actions ab65486e75 📝 Update release notes 2023-10-20 09:21:13 +00:00
worldworm 9b3e166b43
✏️ Fix link to SPDX license identifier in `docs/en/docs/tutorial/metadata.md` (#10433)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-10-20 13:19:31 +04:00
github-actions 07a9b240e9 📝 Update release notes 2023-10-20 09:13:35 +00:00
Giulio Davide Carparelli 89e03bad16
📝 Update example validation error from Pydantic v1 to match Pydantic v2 in `docs/en/docs/tutorial/path-params.md` (#10043) 2023-10-20 13:08:42 +04:00
github-actions f41eb5e005 📝 Update release notes 2023-10-20 09:03:34 +00:00
github-actions eb017270fc 📝 Update release notes 2023-10-20 09:00:53 +00:00
Heinz-Alexander Fuetterer ae84ff6e44
✏️ Fix typos in emoji docs and in some source examples (#10438) 2023-10-20 13:00:44 +04:00
github-actions f785a6ce90 📝 Update release notes 2023-10-20 09:00:11 +00:00
Surav Shrestha 6dac39dbca
✏️ Fix typo in `docs/en/docs/reference/dependencies.md` (#10465) 2023-10-20 12:58:51 +04:00
yogabonito 4bd1430677
✏️ Fix typos and rewordings in `docs/en/docs/tutorial/body-nested-models.md` (#10468) 2023-10-20 12:58:03 +04:00
github-actions cda5e770ab 📝 Update release notes 2023-10-20 08:56:08 +00:00
yogabonito 57a030175e
📝 Update docs, remove references to removed `pydantic.Required` in `docs/en/docs/tutorial/query-params-str-validations.md` (#10469) 2023-10-20 12:55:30 +04:00
github-actions 968afca058 📝 Update release notes 2023-10-20 08:53:37 +00:00
Tiago Silva 6eb30959bc
✏️ Fix typo in `docs/en/docs/reference/index.md` (#10467)
Fix small typo in reference/index.md
2023-10-20 12:52:59 +04:00
github-actions dcbe7f7ac0 📝 Update release notes 2023-10-20 08:39:45 +00:00
Sebastián Ramírez dc7838eec3
🔥 Drop/close Gitter chat. Questions should go to GitHub Discussions, free conversations to Discord. (#10485) 2023-10-20 12:39:03 +04:00
github-actions 7670a132b3 📝 Update release notes 2023-10-20 08:28:05 +00:00
Sebastián Ramírez c13aa9ed5f
🔥 Remove unnecessary duplicated docstrings (#10484) 2023-10-20 12:27:26 +04:00
Sebastián Ramírez 38f191dcd3 🔖 Release version 0.104.0 2023-10-18 16:51:07 +04:00
Sebastián Ramírez 76e547f254 📝 Update release notes 2023-10-18 16:50:22 +04:00
github-actions f056d001e5 📝 Update release notes 2023-10-18 12:37:29 +00:00
Sebastián Ramírez 05ca41cfd1
Add reference (code API) docs with PEP 727, add subclass with custom docstrings for `BackgroundTasks`, refactor docs structure (#10392)
*  Add mkdocstrings and griffe-typingdoc to dependencies

* 🔧 Add mkdocstrings configs to MkDocs

* 📝 Add first WIP reference page

* ⬆️ Upgrade typing-extensions to the minimum version including Doc()

* 📝 Add docs to FastAPI parameters

* 📝 Add docstrings for OpenAPI docs utils

* 📝 Add docstrings for security utils

* 📝 Add docstrings for UploadFile

* 📝 Update docstrings in FastAPI class

* 📝 Add docstrings for path operation methods

* 📝 Add docstring for jsonable_encoder

* 📝 Add docstrings for exceptions

* 📝 Add docstsrings for parameter functions

* 📝 Add docstrings for responses

* 📝 Add docstrings for APIRouter

* ♻️ Sub-class BackgroundTasks to document it with docstrings

* 📝 Update usage of background tasks in dependencies

*  Update tests with new deprecation warnings

* 📝 Add new reference docs

* 🔧 Update MkDocs with new reference docs

*  Update pytest fixture, deprecation is raised only once

* 🎨 Update format for types in exceptions.py

* ♻️ Update annotations in BackgroundTask, `Annotated` can't take ParamSpec's P.args or P.kwargs

* ✏️ Fix typos caught by @pawamoy

* 🔧 Update and fix MkDocstrings configs from @pawamoy tips

* 📝 Update reference docs

* ✏️ Fix typos found by @pawamoy

*  Add HTTPX as a dependency for docs, for the TestClient

* 🔧 Update MkDocs config, rename websockets reference

* 🔇 Add type-ignores for Doc as the stubs haven't been released for mypy

* 🔥 Remove duplicated deprecated notice

* 🔇 Remove typing error for unreleased stub in openapi/docs.py

*  Add tests for UploadFile for coverage

* ⬆️ Upgrade griffe-typingdoc==0.2.2

* 📝 Refactor docs structure

* 🔨 Update README generation with new index frontmatter and style

* 🔨 Update generation of languages, remove from top menu, keep in lang menu

* 📝 Add OpenAPI Pydantic models

* 🔨 Update docs script to not translate Reference and Release Notes

* 🔧 Add reference for OpenAPI models

* 🔧 Update MkDocs config for mkdocstrings insiders

* 👷 Install mkdocstring insiders in CI for docs

* 🐛 Fix MkDocstrings insiders install URL

*  Move dependencies shared by docs and tests to its own requirements file

* 👷 Update cache keys for test and docs dependencies

* 📝 Remove no longer needed __init__ placeholder docstrings

* 📝 Move docstring for APIRouter to the class level (not __init__ level)

* 🔥 Remove no longer needed dummy placeholder __init__ docstring
2023-10-18 16:36:40 +04:00
github-actions 3fa44aabe3 📝 Update release notes 2023-10-17 07:20:59 +00:00
github-actions 912e4bb906 📝 Update release notes 2023-10-17 07:20:20 +00:00
dependabot[bot] 89e7417652
⬆ Bump dawidd6/action-download-artifact from 2.27.0 to 2.28.0 (#10268)
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 2.27.0 to 2.28.0.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](https://github.com/dawidd6/action-download-artifact/compare/v2.27.0...v2.28.0)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 11:20:09 +04:00
dependabot[bot] d03373f3e8
⬆ Bump actions/checkout from 3 to 4 (#10208)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 11:19:41 +04:00
github-actions e5fd92a7ab 📝 Update release notes 2023-10-17 07:19:26 +00:00
dependabot[bot] 6b0c77e554
⬆ Bump pypa/gh-action-pypi-publish from 1.8.6 to 1.8.10 (#10061)
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.8.6 to 1.8.10.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.8.6...v1.8.10)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 11:18:40 +04:00
github-actions 4ef8c3286d 📝 Update release notes 2023-10-17 05:59:55 +00:00
Sebastián Ramírez 2ba7586ff3
⬆️ Drop support for Python 3.7, require Python 3.8 or above (#10442)
* 📝 Update docs, require Python 3.8+, drop 3.7

* 🔧 Update pyproject.toml, drop support for Python 3.7, require Python 3.8+

* 👷 Update CI GitHub Actions, drop support for Python 3.7, require 3.8+

* 📝 Update docs' references to Python 3.6 and 3.7, use Python 3.8
2023-10-17 09:59:11 +04:00
github-actions c1adce4fe9 📝 Update release notes 2023-10-04 22:52:00 +00:00
Sebastián Ramírez 89789c80ae
🔧 Update sponsors, Bump.sh images (#10381) 2023-10-04 22:51:10 +00:00
github-actions cb4f0e57ce 📝 Update release notes 2023-10-02 23:12:28 +00:00
Sebastián Ramírez 568b35f3df
👥 Update FastAPI People (#10363)
Co-authored-by: github-actions <github-actions@github.com>
2023-10-02 18:11:52 -05:00
Sebastián Ramírez 1bf5e7a10e 🔖 Release 0.103.2 2023-09-28 14:57:42 -05:00
Sebastián Ramírez fcda32d231 📝 Update release notes 2023-09-28 14:56:50 -05:00
Sebastián Ramírez d0b17dd49c
⬆️ Upgrade Python version in Docker images for GitHub Actions (#10350) 2023-09-28 14:51:39 -05:00
github-actions d769da3c38 📝 Update release notes 2023-09-28 19:42:38 +00:00
Sebastián Ramírez 2f50ae8825
🔧 Update sponsors, remove Flint (#10349) 2023-09-28 14:41:17 -05:00
github-actions 831b5d5402 📝 Update release notes 2023-09-28 04:15:17 +00:00
Sebastián Ramírez bc935e08b6
⬆️ Upgrade compatibility with Pydantic v2.4, new renamed functions and JSON Schema input/output models with default values (#10344)
* 🚚 Refactor deprecated import general_plain_validator_function to with_info_plain_validator_function

* 🚚 Rename deprecated FieldValidationInfo to ValidationInfo

*  Update tests with new defaults for JSON Schema for default values

* ♻️ Add Pydantic v1 version of with_info_plain_validator_function

* 👷 Invalidate cache

*  Fix tests for Pydantic v1

*  Tweak tests coverage for older Pydantic v2 versions
2023-09-27 23:14:40 -05:00
github-actions b944b55dfc 📝 Update release notes 2023-09-27 23:02:35 +00:00
Sebastián Ramírez 74cf05117b
🔧 Rename label "awaiting review" to "awaiting-review" to simplify search queries (#10343) 2023-09-27 18:01:46 -05:00
github-actions 1c4a9e91b6 📝 Update release notes 2023-09-27 20:55:18 +00:00
ArtemKhymenko b2f8ac6a83
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/extra-data-types.md` (#10132)
Co-authored-by: ArtemKhymenko <ak@workconsult.ua>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Rostyslav <rostik1410@users.noreply.github.com>
2023-09-27 15:53:36 -05:00
github-actions 99ffbcdee0 📝 Update release notes 2023-09-27 20:53:18 +00:00
Samuel Rigaud 69f82e5222
🌐 Fix typos in French translations for `docs/fr/docs/advanced/path-operation-advanced-configuration.md`, `docs/fr/docs/alternatives.md`, `docs/fr/docs/async.md`, `docs/fr/docs/features.md`, `docs/fr/docs/help-fastapi.md`, `docs/fr/docs/index.md`, `docs/fr/docs/python-types.md`, `docs/fr/docs/tutorial/body.md`, `docs/fr/docs/tutorial/first-steps.md`, `docs/fr/docs/tutorial/query-params.md` (#10154)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-09-27 15:52:31 -05:00
github-actions 27870e20f5 📝 Update release notes 2023-09-27 20:48:01 +00:00
mkdir700 1453cea404
🌐 Add Chinese translation for `docs/zh/docs/async.md` (#5591)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jedore <jedore_fight@189.cn>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: 吴定焕 <108172295+wdh99@users.noreply.github.com>
2023-09-27 15:47:21 -05:00
github-actions 073e7fc950 📝 Update release notes 2023-09-25 23:08:51 +00:00
jaystone776 0e2ca1cacb
🌐 Update Chinese translation for `docs/tutorial/security/simple-oauth2.md` (#3844)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-09-25 18:06:09 -05:00
github-actions 255e743f98 📝 Update release notes 2023-09-25 23:05:48 +00:00
Sion Shin c89549c703
🌐 Add Korean translation for `docs/ko/docs/deployment/cloud.md` (#10191)
Co-authored-by: Joona Yoon <joonas-yoon@users.noreply.github.com>
2023-09-25 18:02:59 -05:00
github-actions 14e0914fcf 📝 Update release notes 2023-09-25 23:02:43 +00:00
Yusuke Tamura 3106a3a50e
🌐 Add Japanese translation for `docs/ja/docs/deployment/https.md` (#10298)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-09-25 18:01:57 -05:00
github-actions c75cdc6d9a 📝 Update release notes 2023-09-25 23:00:56 +00:00
Aleksandr Andrukhov cb410d3015
🌐 Fix typo in Russian translation for `docs/ru/docs/tutorial/body-fields.md` (#10224)
Co-authored-by: Vladislav Kramorenko <85196001+Xewus@users.noreply.github.com>
2023-09-25 18:00:09 -05:00
github-actions 69a7c99b44 📝 Update release notes 2023-09-22 23:39:37 +00:00
Raman Bazhanau 89246313aa
🌐 Add Polish translation for `docs/pl/docs/help-fastapi.md` (#10121)
Co-authored-by: Igor Sulim <30448496+isulim@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: Antek S. <antoni.szych@gmail.com>
2023-09-22 18:38:53 -05:00
github-actions 79399e43df 📝 Update release notes 2023-09-22 23:37:34 +00:00
Aleksandr Andrukhov 84794221d9
🌐 Add Russian translation for `docs/ru/docs/tutorial/header-params.md` (#10226)
Co-authored-by: Artem Golicyn <86262613+AGolicyn@users.noreply.github.com>
Co-authored-by: Nikita <omegastrikeclan@yandex.ru>
2023-09-22 18:36:59 -05:00
github-actions f4bc0d8205 📝 Update release notes 2023-09-22 23:31:21 +00:00
xzmeng 2fcd8ce8ec
🌐 Add Chinese translation for `docs/zh/docs/deployment/versions.md` (#10276)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Big Yellow Dog <dognasus@outlook.com>
2023-09-22 18:30:46 -05:00
github-actions 46d1da08da 📝 Update release notes 2023-09-15 08:39:26 +00:00
Sebastián Ramírez 571c7a7aba
🔧 Update sponsors, enable Svix (revert #10228) (#10253)
* 🔧 Update sponsors, remove Svix (revert #10228)

This reverts commit e0a99e24b8.

* 🔧 Tweak and update sponsors data
2023-09-15 10:38:48 +02:00
github-actions c6437d555d 📝 Update release notes 2023-09-10 10:37:04 +00:00
Sebastián Ramírez e0a99e24b8
🔧 Update sponsors, remove Svix (#10228) 2023-09-10 12:36:28 +02:00
github-actions a10c35673d 📝 Update release notes 2023-09-10 10:19:02 +00:00
Sebastián Ramírez 766dfb5b38
🔧 Update sponsors, add Bump.sh (#10227) 2023-09-10 12:18:26 +02:00
Sebastián Ramírez bfde8f3ef2 🔖 Release version 0.103.1 2023-09-02 19:10:19 +02:00
Sebastián Ramírez ce8ee1410a 📝 Update release notes 2023-09-02 19:09:47 +02:00
github-actions 118010ad5e 📝 Update release notes 2023-09-02 17:06:22 +00:00
github-actions 8562cae44b 📝 Update release notes 2023-09-02 17:05:59 +00:00
Sebastián Ramírez e1a1a367a7
📌 Pin AnyIO to < 4.0.0 to handle an incompatibility while upgrading to Starlette 0.31.1 (#10194) 2023-09-02 19:03:43 +02:00
Pablo Dorrío Vázquez c502197d7c
✏️ Fix validation parameter name in docs, from `regex` to `pattern` (#10085) 2023-09-02 19:02:26 +02:00
github-actions 7f1dedac2c 📝 Update release notes 2023-09-02 17:01:44 +00:00
Alex Rocha 23511f1fdf
🌐 Remove duplicate line in translation for `docs/pt/docs/tutorial/path-params.md` (#10126) 2023-09-02 19:01:06 +02:00
github-actions 7802454131 📝 Update release notes 2023-09-02 16:56:04 +00:00
Yusuke Tamura caf0b688cd
✏️ Fix indent format in `docs/en/docs/deployment/server-workers.md` (#10066)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-09-02 18:55:26 +02:00
github-actions a6d893fe98 📝 Update release notes 2023-09-02 16:16:38 +00:00
Olaoluwa Afolabi 1711c1e95f
🌐 Add Yoruba translation for `docs/yo/docs/index.md` (#10033)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-09-02 18:12:44 +02:00
github-actions 34028290f5 📝 Update release notes 2023-09-02 16:03:22 +00:00
github-actions aa43afa4c0 📝 Update release notes 2023-09-02 16:00:21 +00:00
Rahul Salgare 0242ca7566
✏️ Fix Pydantic examples in tutorial for Python types (#9961)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-09-02 17:56:35 +02:00
Hasnat Sajid 0ea23e2a8d
✏️ Fix link to Pydantic docs in `docs/en/docs/tutorial/extra-data-types.md` (#10155)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-09-02 17:55:41 +02:00
github-actions 7fe952f522 📝 Update release notes 2023-09-02 15:54:22 +00:00
github-actions 28bf4abf1f 📝 Update release notes 2023-09-02 15:50:11 +00:00
github-actions 1866abffc1 📝 Update release notes 2023-09-02 15:49:31 +00:00
Rostyslav e6c4785959
🌐 Add Ukrainian translation for `docs/uk/docs/python-types.md` (#10080)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-09-02 17:48:03 +02:00
Nguyễn Khắc Thành 8979166bc3
🌐 Add Vietnamese translations for `docs/vi/docs/tutorial/first-steps.md` and `docs/vi/docs/tutorial/index.md` (#10088)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-09-02 17:44:17 +02:00
Poupapaa 2e32957198
✏️ Fix typo in `docs/en/docs/tutorial/handling-errors.md` (#10170)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-09-02 17:43:16 +02:00
github-actions b2562c5c73 📝 Update release notes 2023-09-02 15:41:53 +00:00
github-actions a55f3204ef 📝 Update release notes 2023-09-02 15:37:56 +00:00
Ahsan Sheraz 9fc33f8565
✏️ Fix typos in comment in `fastapi/applications.py` (#10045) 2023-09-02 17:37:40 +02:00
github-actions 59cbeccac0 📝 Update release notes 2023-09-02 15:36:34 +00:00
Ragul K 4e93f8e0bc
✏️ Fix typo in `docs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md` (#10172)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-09-02 17:32:48 +02:00
whysage ad76dd1aa8
🌐 Add Ukrainian translation for `docs/uk/docs/alternatives.md` (#10060)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-09-02 17:32:30 +02:00
github-actions 48f6ccfe7d 📝 Update release notes 2023-09-02 15:31:37 +00:00
Rostyslav 1d688a062e
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/index.md` (#10079) 2023-09-02 17:29:36 +02:00
github-actions 8cb33e9b47 📝 Update release notes 2023-09-02 15:24:05 +00:00
xzmeng d8f2f39f6d
✏️ Fix typos in `docs/en/docs/how-to/separate-openapi-schemas.md` and `docs/en/docs/tutorial/schema-extra-example.md` (#10189) 2023-09-02 17:22:24 +02:00
github-actions 82ff9a6920 📝 Update release notes 2023-09-02 15:19:08 +00:00
PieCat bf952d345c
🌐 Add Chinese translation for `docs/zh/docs/advanced/generate-clients.md` (#9883)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: xzmeng <aumo@foxmail.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-09-02 17:18:30 +02:00
github-actions ee0b28a398 📝 Update release notes 2023-09-01 23:33:31 +00:00
Sebastián Ramírez 4bfe83bd27
👥 Update FastAPI People (#10186)
Co-authored-by: github-actions <github-actions@github.com>
2023-09-02 01:32:40 +02:00
github-actions 7a63d11093 📝 Update release notes 2023-09-01 21:36:46 +00:00
Sebastián Ramírez 37d46e6b6c
Add missing test for OpenAPI examples, it was missing in coverage (#10188)
 Add missing test for OpenAPI examples, it seems it was discovered in coverage by an upgrade in AnyIO
2023-09-01 23:36:08 +02:00
Sebastián Ramírez a3f1689d78 📝 Update release notes 2023-08-26 20:14:42 +02:00
Sebastián Ramírez 415eb1405a 🔖 Release version 0.103.0 2023-08-26 20:10:27 +02:00
Sebastián Ramírez bd32bca55c 📝 Update release notes 2023-08-26 20:09:59 +02:00
github-actions df16699dd8 📝 Update release notes 2023-08-26 18:03:56 +00:00
Sebastián Ramírez 1b714b3177
Add support for `openapi_examples` in all FastAPI parameters (#10152)
* ♻️ Refactor model for OpenAPI Examples to use a reusable TypedDict

*  Add support for openapi_examples in parameters

* 📝 Add new docs examples for new parameter openapi_examples

* 📝 Update docs for Schema Extra to include OpenAPI examples

*  Add tests for new source examples, for openapi_examples

*  Add tests for openapi_examples corner cases and all parameters

* 💡 Tweak and ignore type annotation checks for custom TypedDict
2023-08-26 20:03:13 +02:00
github-actions 5f855b1179 📝 Update release notes 2023-08-26 13:20:54 +00:00
Sebastián Ramírez 594b1ae0c3
📝 Add note to docs about Separate Input and Output Schemas with FastAPI version (#10150) 2023-08-26 15:20:04 +02:00
Sebastián Ramírez f3ab547c0c 📝 Update release notes 2023-08-25 21:23:44 +02:00
Sebastián Ramírez 9cf9e1084d 🔖 Release version 0.102.0 2023-08-25 21:18:38 +02:00
Sebastián Ramírez 859d40407c 📝 Update release notes 2023-08-25 21:18:09 +02:00
github-actions 098778e07f 📝 Update release notes 2023-08-25 19:11:02 +00:00
Sebastián Ramírez ea43f227e5
Add support for disabling the separation of input and output JSON Schemas in OpenAPI with Pydantic v2 (#10145)
* 📝 Add docs for Separate OpenAPI Schemas for Input and Output

* 🔧 Add new docs page to MkDocs config

*  Add separate_input_output_schemas parameter to FastAPI class

* 📝 Add source examples for separating OpenAPI schemas

*  Add tests for separated OpenAPI schemas

* 📝 Add source examples for Python 3.10, 3.9, and 3.7+

* 📝 Update docs for Separate OpenAPI Schemas with new multi-version examples

*  Add and update tests for different Python versions

*  Add tests for corner cases with separate_input_output_schemas

* 📝 Update tutorial to use Union instead of Optional

* 🐛 Fix type annotations

* 🐛 Fix correct import in test

* 💄 Add CSS to simulate browser windows for screenshots

*  Add playwright as a dev dependency to automate generating screenshots

* 🔨 Add Playwright scripts to generate screenshots for new docs

* 📝 Update docs, tweak text to match screenshots

* 🍱 Add screenshots for new docs
2023-08-25 21:10:22 +02:00
github-actions 10a127ea4a 📝 Update release notes 2023-08-19 19:54:40 +00:00
Sebastián Ramírez 8cd7cfc2b6
📝 Add new docs section, How To - Recipes, move docs that don't have to be read by everyone to How To (#10114)
* 📝 Start How To docs section, move Peewee, remove Peewee from dependencies

* 🚚 Move em files to new locations

* 🚚 Move and re-structure advanced docs, move relevant to How To

* 🔧 Update MkDocs config, new files in How To

* 📝 Move docs for Conditional OpenAPI for Japanese to How To

* 📝 Move example source files for Extending OpenAPI into each of the new sections

*  Update tests with new locations for source files

* 🔥 Remove init from Peewee examples
2023-08-19 21:54:04 +02:00
github-actions 3971c44a38 📝 Update release notes 2023-08-19 18:48:35 +00:00
Sebastián Ramírez 7a06de2bb9
♻️ Refactor tests for new Pydantic 2.2.1 (#10115) 2023-08-19 20:47:59 +02:00
github-actions b406dd9174 📝 Update release notes 2023-08-19 14:09:02 +00:00
Sebastián Ramírez 8e38261787
📝 Update Advanced docs, add links to sponsor courses (#10113) 2023-08-19 16:08:16 +02:00
github-actions 486cd139a9 📝 Update release notes 2023-08-19 13:51:12 +00:00
Sebastián Ramírez 08feaf0cc4
📝 Update docs for generating clients (#10112) 2023-08-19 15:49:54 +02:00
github-actions 0fe434ca68 📝 Update release notes 2023-08-19 13:34:10 +00:00
Sebastián Ramírez d1c0e5a89f
📝 Tweak MkDocs and add redirects (#10111) 2023-08-19 13:33:32 +00:00
github-actions e04953a9e0 📝 Update release notes 2023-08-19 13:12:09 +00:00
Sebastián Ramírez d4201a49bc
📝 Restructure docs for cloud providers, include links to sponsors (#10110) 2023-08-19 15:11:35 +02:00
github-actions a6ae5af7d6 📝 Update release notes 2023-08-17 08:52:40 +00:00
Sebastián Ramírez e93d15cf9a
🔧 Update sponsors, add Speakeasy (#10098) 2023-08-17 10:51:58 +02:00
Sebastián Ramírez 63e7edb295 🔖 Release version 0.101.1 2023-08-14 12:03:14 +02:00
Sebastián Ramírez 50b6ff7da6 📝 Update release notes 2023-08-14 12:02:43 +02:00
github-actions d46cd0b1f0 📝 Update release notes 2023-08-14 09:50:40 +00:00
Sebastián Ramírez 5e8f7f13d7
Add `ResponseValidationError` printable details, to show up in server error logs (#10078) 2023-08-14 11:49:57 +02:00
github-actions dafaf6a34c 📝 Update release notes 2023-08-14 09:17:05 +00:00
github-actions 87cc40e483 📝 Update release notes 2023-08-14 09:15:26 +00:00
Yusuke Tamura 25059a7717
🌐 Add Japanese translation for `docs/ja/docs/deployment/concepts.md` (#10062)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-08-14 11:14:37 +02:00
Yusuke Tamura 2a5cc5fff3
🌐 Add Japanese translation for `docs/ja/docs/deployment/server-workers.md` (#10064)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-08-14 11:13:28 +02:00
github-actions 014262c203 📝 Update release notes 2023-08-14 09:13:05 +00:00
Yusuke Tamura 9d6ce823c1
🌐 Update Japanese translation for `docs/ja/docs/deployment/docker.md` (#10073)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-08-14 11:12:14 +02:00
github-actions 48d203a1e7 📝 Update release notes 2023-08-14 09:10:51 +00:00
Rostyslav 47166ed56c
🌐 Add Ukrainian translation for `docs/uk/docs/fastapi-people.md` (#10059) 2023-08-14 11:10:06 +02:00
github-actions 78f38c6bfd 📝 Update release notes 2023-08-10 15:59:15 +00:00
Rostyslav e6afc5911b
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/cookie-params.md` (#10032) 2023-08-10 17:58:13 +02:00
github-actions 5c2a155809 📝 Update release notes 2023-08-10 15:55:32 +00:00
Vladislav Kramorenko fe3eaf63e6
🌐 Add Russian translation for `docs/ru/docs/deployment/docker.md` (#9971)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Yois4101 <119609381+Yois4101@users.noreply.github.com>
2023-08-10 17:53:26 +02:00
github-actions 1f0d9086b3 📝 Update release notes 2023-08-10 15:53:06 +00:00
Nguyễn Khắc Thành f0ab797de4
🌐 Add Vietnamese translation for `docs/vi/docs/python-types.md` (#10047)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-08-10 17:52:25 +02:00
github-actions 82fafcc7ea 📝 Update release notes 2023-08-09 17:05:31 +00:00
Sebastián Ramírez 87398723f9
🔧 Add sponsor Porter (#10051) 2023-08-09 19:04:49 +02:00
github-actions 01383a57cb 📝 Update release notes 2023-08-09 13:27:14 +00:00
Sebastián Ramírez 14c96ef31b
🔧 Update sponsors, add Jina back as bronze sponsor (#10050) 2023-08-09 15:26:33 +02:00
github-actions 942ee69d85 📝 Update release notes 2023-08-05 08:46:58 +00:00
github-actions 6df10c9753 📝 Update release notes 2023-08-05 08:44:36 +00:00
github-actions 0f4a962c20 📝 Update release notes 2023-08-05 08:43:01 +00:00
Russ Biggs bdd991244d
✏️ Fix typo in deprecation warnings in `fastapi/params.py` (#9854)
fix typo for deprecation warnings depreacated -> deprecated
2023-08-05 10:41:21 +02:00
Francis Bergin 69d5ebf34d
✏️ Fix typo in release notes (#9835) 2023-08-05 10:40:24 +02:00
ElliottLarsen 5e59acd35b
✏️ Fix typos in comments on internal code in `fastapi/concurrency.py` and `fastapi/routing.py` (#9590)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2023-08-05 10:39:38 +02:00
github-actions bb7bbafb5f 📝 Update release notes 2023-08-05 08:38:32 +00:00
github-actions 87e126be2e 📝 Update release notes 2023-08-05 08:36:27 +00:00
Adejumo Ridwan Suleiman 33e77b6e25
📝 Add external article: Build an SMS Spam Classifier Serverless Database with FaunaDB and FastAPI (#9847) 2023-08-05 10:36:05 +02:00
github-actions 51f5497f3f 📝 Update release notes 2023-08-05 08:35:55 +00:00
Vicente Merino 0b496ea1f8
📝 Fix typo in `docs/en/docs/contributing.md` (#9878)
Co-authored-by: Vicente Merino <vmerino@rexmas.com>
2023-08-05 10:34:07 +02:00
Reza Rohani b76112f1a5
📝 Fix code highlighting in `docs/en/docs/tutorial/bigger-applications.md` (#9806)
Update bigger-applications.md
2023-08-05 10:33:08 +02:00
github-actions f2e80fae09 📝 Update release notes 2023-08-05 08:28:26 +00:00
github-actions d86a695db9 📝 Update release notes 2023-08-05 08:26:40 +00:00
Aleksandr Pavlov 1c919dee3c
🌐 Add Russian translation for `docs/ru/docs/tutorial/dependencies/global-dependencies.md` (#9970)
Co-authored-by: dedkot <dedkot01@gmail.com>
Co-authored-by: Vladislav Kramorenko <85196001+Xewus@users.noreply.github.com>
2023-08-05 10:26:03 +02:00
Ahsan Sheraz 5891be5ff1
🌐 Add Urdu translation for `docs/ur/docs/benchmarks.md` (#9974) 2023-08-05 10:24:21 +02:00
github-actions abfcb59fd0 📝 Update release notes 2023-08-05 08:23:39 +00:00
github-actions 0148c9508c 📝 Update release notes 2023-08-05 08:23:14 +00:00
dependabot[bot] 8f316be088
⬆ Bump mypy from 1.4.0 to 1.4.1 (#9756)
Bumps [mypy](https://github.com/python/mypy) from 1.4.0 to 1.4.1.
- [Commits](https://github.com/python/mypy/compare/v1.4.0...v1.4.1)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-05 10:22:58 +02:00
dependabot[bot] d48a184dd8
⬆ Bump mkdocs-material from 9.1.17 to 9.1.21 (#9960)
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.1.17 to 9.1.21.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.1.17...9.1.21)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-05 10:22:39 +02:00
Sebastián Ramírez 8adbafc076 🔖 Release version 0.101.0 2023-08-04 23:00:17 +02:00
Sebastián Ramírez 4b5277744a 📝 Update release notes 2023-08-04 22:59:44 +02:00
github-actions 89a7cea561 📝 Update release notes 2023-08-04 20:58:08 +00:00
Sebastián Ramírez 77d1f69b1f
📌 Do not allow Pydantic 2.1.0 that breaks (require 2.1.1) (#10012) 2023-08-04 22:57:30 +02:00
Sebastián Ramírez 944c591803 📝 Update release notes 2023-08-04 22:50:34 +02:00
github-actions 1c20514738 📝 Update release notes 2023-08-04 20:47:42 +00:00
Sebastián Ramírez 19a2c3bb54
Enable Pydantic's serialization mode for responses, add support for Pydantic's `computed_field`, better OpenAPI for response models, proper required attributes, better generated clients (#10011)
*  Enable Pydantic's serialization mode for responses

*  Update tests with new Pydantic v2 serialization mode

*  Add a test for Pydantic v2's computed_field
2023-08-04 22:47:07 +02:00
github-actions d943e02232 📝 Update release notes 2023-08-04 18:19:22 +00:00
Sebastián Ramírez ebdf952545
👷 Add GitHub Actions step dump context to debug external failures (#10008) 2023-08-04 20:18:38 +02:00
github-actions b3a1f91004 📝 Update release notes 2023-08-04 17:48:24 +00:00
Sebastián Ramírez 86e4e9f8f9
🔧 Restore MkDocs Material pin after the fix (#10001) 2023-08-04 19:47:42 +02:00
github-actions 3af7265a43 📝 Update release notes 2023-08-03 16:00:19 +00:00
Sebastián Ramírez 059fb12892
🔧 Update the Question template to ask for the Pydantic version (#10000) 2023-08-03 17:59:41 +02:00
github-actions 10b4c31f06 📝 Update release notes 2023-08-03 15:47:35 +00:00
David Montague 25694f5ae1
Fix tests for compatibility with pydantic 2.1.1 (#9943)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-08-03 17:46:57 +02:00
github-actions 94c48cfc8c 📝 Update release notes 2023-08-03 15:25:10 +00:00
Sebastián Ramírez 4ab0363ad7
Remove direct dependency on MkDocs, Material for MkDocs defines its own dependency (#9986) 2023-08-03 17:24:31 +02:00
github-actions a73cdaed35 📝 Update release notes 2023-08-03 14:25:48 +00:00
Sebastián Ramírez 3fa6cfbcc5
👥 Update FastAPI People (#9999)
Co-authored-by: github-actions <github-actions@github.com>
2023-08-03 16:25:11 +02:00
github-actions ad1d7f539e 📝 Update release notes 2023-08-03 14:13:59 +00:00
Sebastián Ramírez 89537a0497
🐳 Update Dockerfile with compatibility versions, to upgrade later (#9998) 2023-08-03 16:12:28 +02:00
github-actions 3829129245 📝 Update release notes 2023-08-02 18:58:29 +00:00
Sebastián Ramírez 53220b9832
Add pydantic-settings to FastAPI People dependencies (#9988) 2023-08-02 20:57:48 +02:00
github-actions 165f29fe5e 📝 Update release notes 2023-08-02 15:57:57 +00:00
Sebastián Ramírez 1e6bfa1f39
♻️ Update FastAPI People logic with new Pydantic (#9985) 2023-08-02 17:57:20 +02:00
github-actions b473cdd88d 📝 Update release notes 2023-08-02 15:29:13 +00:00
Irfanuddin Shafi Ahmed 37818f553d
Fix test error in Windows for `jsonable_encoder` (#9840)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2023-08-02 17:28:34 +02:00
github-actions 2d8a776836 📝 Update release notes 2023-08-02 15:15:10 +00:00
Nikita 88d96799b1
🌐 Add Russian translation for `docs/ru/docs/tutorial/security/index.md` (#9963)
Co-authored-by: dedkot <dedkot01@gmail.com>
Co-authored-by: Vladislav Kramorenko <85196001+Xewus@users.noreply.github.com>
2023-08-02 17:14:19 +02:00
github-actions 01f91fdb57 📝 Update release notes 2023-08-01 21:40:00 +00:00
Sebastián Ramírez c2a33f1087
🍱 Update sponsors, Fern badge (#9982) 2023-08-01 23:39:22 +02:00
github-actions 6c8c3b788b 📝 Update release notes 2023-08-01 09:20:23 +00:00
Sebastián Ramírez d2169fbad9
👷 Deploy docs to Cloudflare Pages (#9978) 2023-08-01 11:19:44 +02:00
github-actions 74de15d0df 📝 Update release notes 2023-07-31 21:49:56 +00:00
Sebastián Ramírez 1da0a7afbd
🔧 Update sponsor Fern (#9979) 2023-07-31 23:49:19 +02:00
github-actions d38e86ef20 📝 Update release notes 2023-07-31 19:54:46 +00:00
Sebastián Ramírez a0b987224a
👷 Update CI debug mode with Tmate (#9977) 2023-07-31 21:54:07 +02:00
github-actions cd6d75e451 📝 Update release notes 2023-07-28 12:16:16 +00:00
Sebastián Ramírez 076bdea671
🌐 Remove Vietnamese note about missing translation (#9957) 2023-07-28 14:15:29 +02:00
Sebastián Ramírez 8d27236648 🔖 Release version 0.100.1 2023-07-27 21:16:01 +02:00
Sebastián Ramírez effa578b8d 📝 Update release notes 2023-07-27 21:15:16 +02:00
github-actions bec5530ac8 📝 Update release notes 2023-07-27 19:14:48 +00:00
Orest Furda 7b3d770d65
🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/body.md` (#4574)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-07-27 21:09:34 +02:00
github-actions 643d8e41c4 📝 Update release notes 2023-07-27 19:08:23 +00:00
github-actions c52c940066 📝 Update release notes 2023-07-27 19:04:24 +00:00
Nguyễn Khắc Thành 1d088eaf18
🌐 Add Vietnamese translation for `docs/vi/docs/features.md` and `docs/vi/docs/index.md` (#3006)
Co-authored-by: Nguyen Khac Thanh <nkthanh@Nguyens-MacBook-Pro.local>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-07-27 21:01:57 +02:00
github-actions 77cfb3c822 📝 Update release notes 2023-07-27 18:59:56 +00:00
Nina Hwang 55871036db
🌐 Add Korean translation for `docs/ko/docs/async.md` (#4179)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-07-27 20:59:18 +02:00
github-actions e334065d10 📝 Update release notes 2023-07-27 18:57:37 +00:00
github-actions 5d3f51c8bc 📝 Update release notes 2023-07-27 18:56:19 +00:00
吴定焕 e081145c7d
🌐 Add Chinese translation for `docs/zh/docs/tutorial/background-tasks.md` (#9812)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-07-27 20:55:40 +02:00
github-actions a52875c656 📝 Update release notes 2023-07-27 18:54:32 +00:00
Sebastián Ramírez 570ca011f9
🔧 Update sponsors, add Fern (#9956) 2023-07-27 20:53:51 +02:00
Sam Courtemanche 04b9a67cbb
🌐 Add French translation for `docs/fr/docs/tutorial/query-params-str-validations.md` (#4075)
Co-authored-by: Julian Maurin <julian.maurin.perso@pm.me>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-07-27 20:53:21 +02:00
github-actions 02ed00cc47 📝 Update release notes 2023-07-27 18:53:03 +00:00
github-actions 35707a1b29 📝 Update release notes 2023-07-27 18:51:59 +00:00
Julian Maurin e79dc9697c
🌐 Add French translation for `docs/fr/docs/tutorial/index.md` (#2234)
Co-authored-by: Ruidy <ruidy.nemausat@gmail.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-07-27 20:51:55 +02:00
Julian Maurin 2dcf78f295
🌐 Add French translation for `docs/fr/docs/contributing.md` (#2132)
Co-authored-by: Ruidy <ruidy.nemausat@gmail.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-07-27 20:51:07 +02:00
github-actions d7c6894b8b 📝 Update release notes 2023-07-27 18:50:16 +00:00
Clément Sauvage 3ffebbcf01
🌐 Add French translation for `docs/fr/docs/benchmarks.md` (#2155)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sam Courtemanche <smlep.pro@gmail.com>
Co-authored-by: Ruidy <ruidy.nemausat@gmail.com>
2023-07-27 20:49:56 +02:00
mahone3297 943baa387f
🌐 Update Chinese translations with new source files (#9738)
Co-authored-by: mkdir700 <mkdir700@gmail.com>
2023-07-27 20:49:03 +02:00
github-actions 6a95a3a8e7 📝 Update release notes 2023-07-27 18:48:28 +00:00
dedkot 608cc4fea3
🌐 Add Russian translation for `docs/tutorial/request-forms.md` (#9841) 2023-07-27 20:47:42 +02:00
github-actions 39318a39f4 📝 Update release notes 2023-07-27 18:43:30 +00:00
Creat55 703a1f200a
🌐 Update Chinese translation for `docs/zh/docs/tutorial/handling-errors.md` (#9485)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-07-27 20:42:48 +02:00
github-actions 7cdea41431 📝 Update release notes 2023-07-27 18:23:13 +00:00
Marcelo Trylesinski 6c99e90a6b
🐛 Replace `MultHostUrl` to `AnyUrl` for compatibility with older versions of Pydantic v1 (#9852) 2023-07-27 20:22:23 +02:00
github-actions f7e3559bd5 📝 Update release notes 2023-07-09 15:45:55 +00:00
github-actions 2d69531509 📝 Update release notes 2023-07-09 15:44:58 +00:00
Sebastián Ramírez fe91def515
👷 Update FastAPI People token (#9844) 2023-07-09 17:44:40 +02:00
Sebastián Ramírez 73c39745d8
👥 Update FastAPI People (#9775)
Co-authored-by: github-actions <github-actions@github.com>
2023-07-09 17:44:21 +02:00
github-actions ea92dcaa01 📝 Update release notes 2023-07-09 15:40:19 +00:00
Sebastián Ramírez 9213b72115
👷 Update MkDocs Material token (#9843) 2023-07-09 17:39:42 +02:00
github-actions eaa14e18d3 📝 Update release notes 2023-07-09 14:37:16 +00:00
Sebastián Ramírez 69df2fa1e5
👷 Update token for latest changes (#9842) 2023-07-09 16:34:45 +02:00
github-actions c165be380f 📝 Update release notes 2023-07-07 18:15:42 +00:00
Sebastián Ramírez 5f85e2cf58
📝 Update links for self-hosted Swagger UI, point to v5, for OpenAPI 31.0 (#9834)
📝 Update links for self-hosted Swagger UI, point to v5, for OpenAPI 3.1.0
2023-07-07 20:15:08 +02:00
Sebastián Ramírez f8356d9fff 🔖 Release version 0.100.0 2023-07-07 19:25:59 +02:00
Sebastián Ramírez 179e409159 📝 Update release notes 2023-07-07 19:14:54 +02:00
github-actions bb7e5b7261 📝 Update release notes 2023-07-07 17:12:58 +00:00
Sebastián Ramírez 0976185af9
Add support for Pydantic v2 (#9816)
*  Pydantic v2 migration, initial implementation (#9500)

*  Add compat layer, for Pydantic v1 and v2

*  Re-export Pydantic needed internals from compat, to later patch them for v1

* ♻️ Refactor internals to use new compatibility layers and run with Pydantic v2

* 📝 Update examples to run with Pydantic v2

*  Update tests to use Pydantic v2

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

*  Temporarily disable Peewee tests, afterwards I'll enable them only for Pydantic v1

* 🐛 Fix JSON Schema generation and OpenAPI ref template

* 🐛 Fix model field creation with defaults from Pydantic v2

* 🐛 Fix body field creation, with new FieldInfo

*  Use and check new ResponseValidationError for server validation errors

*  Fix test_schema_extra_examples tests with ResponseValidationError

*  Add dirty-equals to tests for compatibility with Pydantic v1 and v2

*  Add util to regenerate errors with custom loc

*  Generate validation errors with loc

*  Update tests for compatibility with Pydantic v1 and v2

*  Update tests for Pydantic v2 in tests/test_filter_pydantic_sub_model.py

*  Refactor tests in tests/test_dependency_overrides.py for Pydantic v2, separate parameterized into independent tests to use insert_assert

*  Refactor OpenAPI test for tests/test_infer_param_optionality.py for consistency, and make it compatible with Pydantic v1 and v2

*  Update tests for tests/test_multi_query_errors.py for Pydantic v1 and v2

*  Update tests for tests/test_multi_body_errors.py for Pydantic v1 and v2

*  Update tests for tests/test_multi_body_errors.py for Pydantic v1 and v2

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

* ♻️ Refactor tests for tests/test_path.py to inline pytest parameters, to make it easier to make them compatible with Pydantic v2

*  Refactor and udpate tests for tests/test_path.py for Pydantic v1 and v2

* ♻️ Refactor and update tests for tests/test_query.py with compatibility for Pydantic v1 and v2

*  Fix test with optional field without default None

*  Update tests for compatibility with Pydantic v2

*  Update tutorial tests for Pydantic v2

* ♻️ Update OAuth2 dependencies for Pydantic v2

* ♻️ Refactor str check when checking for sequence types

* ♻️ Rename regex to pattern to keep in sync with Pydantic v2

* ♻️ Refactor _compat.py, start moving conditional imports and declarations to specifics of Pydantic v1 or v2

*  Update tests for OAuth2 security optional

*  Refactor tests for OAuth2 optional for Pydantic v2

*  Refactor tests for OAuth2 security for compatibility with Pydantic v2

* 🐛 Fix location in compat layer for Pydantic v2 ModelField

*  Refactor tests for Pydantic v2 in tests/test_tutorial/test_bigger_applications/test_main_an_py39.py

* 🐛 Add missing markers in Python 3.9 tests

*  Refactor tests for bigger apps for consistency with annotated ones and with support for Pydantic v2

* 🐛 Fix jsonable_encoder with new Pydantic v2 data types and Url

* 🐛 Fix invalid JSON error for compatibility with Pydantic v2

*  Update tests for behind_a_proxy for Pydantic v2

*  Update tests for tests/test_tutorial/test_body/test_tutorial001_py310.py for Pydantic v2

*  Update tests for tests/test_tutorial/test_body/test_tutorial001.py with Pydantic v2 and consistency with Python 3.10 tests

*  Fix tests for tutorial/body_fields for Pydantic v2

*  Refactor tests for tutorial/body_multiple_params with Pydantic v2

*  Update tests for tutorial/body_nested_models for Pydantic v2

*  Update tests for tutorial/body_updates for Pydantic v2

*  Update test for tutorial/cookie_params for Pydantic v2

*  Fix tests for tests/test_tutorial/test_custom_request_and_route/test_tutorial002.py for Pydantic v2

*  Update tests for tutorial/dataclasses for Pydantic v2

*  Update tests for tutorial/dependencies for Pydantic v2

*  Update tests for tutorial/extra_data_types for Pydantic v2

*  Update tests for tutorial/handling_errors for Pydantic v2

*  Fix test markers for Python 3.9

*  Update tests for tutorial/header_params for Pydantic v2

*  Update tests for Pydantic v2 in tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py

*  Fix extra tests for Pydantic v2

*  Refactor test for parameters, to later fix Pydantic v2

*  Update tests for tutorial/query_params for Pydantic v2

* ♻️ Update examples in docs to use new pattern instead of the old regex

*  Fix several tests for Pydantic v2

*  Update and fix test for ResponseValidationError

* 🐛 Fix check for sequences vs scalars, include bytes as scalar

* 🐛 Fix check for complex data types, include UploadFile

* 🐛 Add list to sequence annotation types

* 🐛 Fix checks for uploads and add utils to find if an annotation is an upload (or bytes)

*  Add UnionType and NoneType to compat layer

*  Update tests for request_files for compatibility with Pydantic v2 and consistency with other tests

*  Fix testsw for request_forms for Pydantic v2

*  Fix tests for request_forms_and_files for Pydantic v2

*  Fix tests in tutorial/security for compatibility with Pydantic v2

* ⬆️ Upgrade required version of email_validator

*  Fix tests for params repr

*  Add Pydantic v2 pytest markers

* Use match_pydantic_error_url

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

* Use field_serializer instead of encoders in some tests

* Show Undefined as ... in repr

* Mark custom encoders test with xfail

* Update test to reflect new serialization of Decimal as str

* Use `model_validate` instead of `from_orm`

* Update JSON schema to reflect required nullable

* Add dirty-equals to pyproject.toml

* Fix locs and error creation for use with pydantic 2.0a4

* Use the type adapter for serialization. This is hacky.

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

*  Refactor test_multi_body_errors for compatibility with Pydantic v1 and v2

*  Refactor test_custom_encoder for Pydantic v1 and v2

*  Set input to None for now, for compatibility with current tests

* 🐛 Fix passing serialization params to model field when handling the response

* ♻️ Refactor exceptions to not depend on Pydantic ValidationError class

* ♻️ Revert/refactor params to simplify repr

*  Tweak tests for custom class encoders for Pydantic v1 and v2

*  Tweak tests for jsonable_encoder for Pydantic v1 and v2

*  Tweak test for compatibility with Pydantic v1 and v2

* 🐛 Fix filtering data with subclasses

* 🐛 Workaround examples in OpenAPI schema

*  Add skip marker for SQL tutorial, needs to be updated either way

*  Update test for broken JSON

*  Fix test for broken JSON

*  Update tests for timedeltas

*  Fix test for plain text validation errors

*  Add markers for Pydantic v1 exclusive tests (for now)

*  Update test for path_params with enums for compatibility with Pydantic v1 and v2

*  Update tests for extra examples in OpenAPI

*  Fix tests for response_model with compatibility with Pydantic v1 and v2

* 🐛 Fix required double serialization for different types of models

*  Fix tests for response model with compatibility with new Pydantic v2

* 🐛 Import Undefined from compat layer

*  Fix tests for response_model for Pydantic v2

*  Fix tests for schema_extra for Pydantic v2

*  Add markers and update tests for Pydantic v2

* 💡 Comment out logic for double encoding that breaks other usecases

*  Update errors for int parsing

* ♻️ Refactor re-enabling compatibility for Pydantic v1

* ♻️ Refactor OpenAPI utils to re-enable support for Pydantic v1

* ♻️ Refactor dependencies/utils and _compat for compatibility with Pydantic v1

* 🐛 Fix and tweak compatibility with Pydantic v1 and v2 in dependencies/utils

*  Tweak tests and examples for Pydantic v1

* ♻️ Tweak call to ModelField.validate for compatibility with Pydantic v1

*  Use new global override TypeAdapter from_attributes

*  Update tests after updating from_attributes

* 🔧 Update pytest config to avoid collecting tests from docs, useful for editor-integrated tests

*  Add test for data filtering, including inheritance and models in fields or lists of models

* ♻️ Make OpenAPI models compatible with both Pydantic v1 and v2

* ♻️ Fix compatibility for Pydantic v1 and v2 in jsonable_encoder

* ♻️ Fix compatibility in params with Pydantic v1 and v2

* ♻️ Fix compatibility when creating a FieldInfo in Pydantic v1 and v2 in utils.py

* ♻️ Fix generation of flat_models and JSON Schema definitions in _compat.py for Pydantic v1 and v2

* ♻️ Update handling of ErrorWrappers for Pydantic v1

* ♻️ Refactor checks and handling of types an sequences

* ♻️ Refactor and cleanup comments with compatibility for Pydantic v1 and v2

* ♻️ Update UploadFile for compatibility with both Pydantic v1 and v2

* 🔥 Remove commented out unneeded code

* 🐛 Fix mock of get_annotation_from_field_info for Pydantic v1 and v2

* 🐛 Fix params with compatibility for Pydantic v1 and v2, with schemas and new pattern vs regex

* 🐛 Fix check if field is sequence for Pydantic v1

*  Fix tests for custom_schema_fields, for compatibility with Pydantic v1 and v2

*  Simplify and fix tests for jsonable_encoder with compatibility for Pydantic v1 and v2

*  Fix tests for orm_mode with Pydantic v1 and compatibility with Pydantic v2

* ♻️ Refactor logic for normalizing Pydantic v1 ErrorWrappers

* ♻️ Workaround for params with examples, before defining what to deprecate in Pydantic v1 and v2 for examples with JSON Schema vs OpenAPI

*  Fix tests for Pydantic v1 and v2 for response_by_alias

*  Fix test for schema_extra with compatibility with Pydantic v1 and v2

* ♻️ Tweak error regeneration with loc

* ♻️ Update error handling and serializationwith compatibility for Pydantic v1 and v2

* ♻️ Re-enable custom encoders for Pydantic v1

* ♻️ Update ErrorWrapper reserialization in Pydantic v1, do it outside of FastAPI ValidationExceptions

*  Update test for filter_submodel, re-structure to simplify testing while keeping division of Pydantic v1 and v2

*  Refactor Pydantic v1 only test that requires modifying environment variables

* 🔥 Update test for plaintext error responses, for Pydantic v1 and v2

* ️ Revert changes in DB tutorial to use Pydantic v1 (the new guide will have SQLModel)

*  Mark current SQL DB tutorial tests as Pydantic only

* ♻️ Update datastructures for compatibility with Pydantic v1, not requiring pydantic-core

* ♻️ Update encoders.py for compatibility with Pydantic v1

* ️ Revert changes to Peewee, the docs for that are gonna live in a new HowTo section, not in the main tutorials

* ♻️ Simplify response body kwargs generation

* 🔥 Clean up comments

* 🔥 Clean some tests and comments

*  Refactor tests to match new Pydantic error string URLs

*  Refactor tests for recursive models for Pydantic v1 and v2

*  Update tests for Peewee, re-enable, Pydantic-v1-only

* ♻️ Update FastAPI params to take regex and pattern arguments

* ️ Revert tutorial examples for pattern, it will be done in a subsequent PR

* ️ Revert changes in schema extra examples, it will be added later in a docs-specific PR

* 💡 Add TODO comment to document str validations with pattern

* 🔥 Remove unneeded comment

* 📌 Upgrade Pydantic pin dependency

* ⬆️ Upgrade email_validator dependency

* 🐛 Tweak type annotations in _compat.py

* 🔇 Tweak mypy errors for compat, for Pydantic v1 re-imports

* 🐛 Tweak and fix type annotations

*  Update requirements-test.txt, re-add dirty-equals

* 🔥 Remove unnecessary config

* 🐛 Tweak type annotations

* 🔥 Remove unnecessary type in dependencies/utils.py

* 💡 Update comment in routing.py

---------

Co-authored-by: David Montague <35119617+dmontagu@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* 👷 Add CI for both Pydantic v1 and v2 (#9688)

* 👷 Test and install Pydantic v1 and v2 in CI

* 💚 Tweak CI config for Pydantic v1 and v2

* 💚 Fix Pydantic v2 specification in CI

* 🐛 Fix type annotations for compatibility with Python 3.7

* 💚 Install Pydantic v2 for lints

* 🐛 Fix type annotations for Pydantic v2

* 💚 Re-use test cache for lint

* ♻️ Refactor internals for test coverage and performance (#9691)

* ♻️ Tweak import of Annotated from typing_extensions, they are installed anyway

* ♻️ Refactor _compat to define functions for Pydantic v1 or v2 once instead of checking inside

*  Add test for UploadFile for Pydantic v2

* ♻️ Refactor types and remove logic for impossible cases

*  Add missing tests from test refactor for path params

*  Add tests for new decimal encoder

* 💡 Add TODO comment for decimals in encoders

* 🔥 Remove unneeded dummy function

* 🔥 Remove section of code in field_annotation_is_scalar covered by sub-call to field_annotation_is_complex

* ♻️ Refactor and tweak variables and types in _compat

*  Add tests for corner cases and compat with Pydantic v1 and v2

* ♻️ Refactor type annotations

* 🔖 Release version 0.100.0-beta1

* ♻️ Refactor parts that use optional requirements to make them compatible with installations without them (#9707)

* ♻️ Refactor parts that use optional requirements to make them compatible with installations without them

* ♻️ Update JSON Schema for email field without email-validator installed

* 🐛 Fix support for Pydantic v2.0, small changes in their final release (#9771)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>

* 🔖 Release version 0.100.0-beta2

*  OpenAPI 3.1.0 with Pydantic v2, merge `master` (#9773)

*  Add dirty-equals as a testing dependency (#9778)

 Add dirty-equals as a testing dependency, it seems it got lsot at some point

* 🔀 Merge master, fix valid JSON Schema accepting bools (#9782)

* ️ Revert usage of custom logic for TypeAdapter JSON Schema, solved on the Pydantic side (#9787)

️ Revert usage of custom logic for TypeAdapter JSON Schema, solved on Pydantic side

* ♻️ Deprecate parameter `regex`, use `pattern` instead (#9786)

* 📝 Update docs to deprecate regex, recommend pattern

* ♻️ Update examples to use new pattern instead of regex

* 📝 Add new example with deprecated regex

* ♻️ Add deprecation notes and warnings for regex

*  Add tests for regex deprecation

*  Update tests for compatibility with Pydantic v1

*  Update docs to use Pydantic v2 settings and add note and example about v1 (#9788)

*  Add pydantic-settings to all extras

* 📝 Update docs for Pydantic settings

* 📝 Update Settings source examples to use Pydantic v2, and add a Pydantic v1 version

*  Add tests for settings with Pydantic v1 and v2

* 🔥 Remove solved TODO comment

* ♻️ Update conditional OpenAPI to use new Pydantic v2 settings

*  Update tests to import Annotated from typing_extensions for Python < 3.9 (#9795)

*  Add pydantic-extra-types to fastapi[extra]

*  temp: Install Pydantic from source to test JSON Schema metadata fixes (#9777)

*  Install Pydantic from source, from branch for JSON Schema with metadata

*  Update dependencies, install Pydantic main

*  Fix dependency URL for Pydantic from source

*  Add pydantic-settings for test requirements

* 💡 Add TODO comments to re-enable Pydantic main (not from source) (#9796)

*  Add new Pydantic Field param options to Query, Cookie, Body, etc. (#9797)

* 📝 Add docs for Pydantic v2 for `docs/en/docs/advanced/path-operation-advanced-configuration.md` (#9798)

* 📝 Update docs in examples for settings with Pydantic v2 (#9799)

* 📝 Update JSON Schema `examples` docs with Pydantic v2 (#9800)

* ♻️ Use new Pydantic v2 JSON Schema generator (#9813)

Co-authored-by: David Montague <35119617+dmontagu@users.noreply.github.com>

* ♻️ Tweak type annotations and Pydantic version range (#9801)

* 📌 Re-enable GA Pydantic, for v2, require minimum 2.0.2 (#9814)

* 🔖 Release version 0.100.0-beta3

* 🔥 Remove duplicate type declaration from merge conflicts (#9832)

* 👷‍♂️ Run tests with Pydantic v2 GA (#9830)

👷 Run tests for Pydantic v2 GA

* 📝 Add notes to docs expecting Pydantic v2 and future updates (#9833)

* 📝 Update index with new extras

* 📝 Update release notes

---------

Co-authored-by: David Montague <35119617+dmontagu@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Pastukhov Nikita <diementros@yandex.ru>
2023-07-07 19:12:13 +02:00
Sebastián Ramírez dd4e78ca7b 🔖 Release version 0.99.1 2023-07-02 18:00:39 +02:00
Sebastián Ramírez 8a198fc1ed 📝 Update release notes 2023-07-02 18:00:12 +02:00
github-actions 6bd4f53531 📝 Update release notes 2023-07-02 15:59:00 +00:00
Sebastián Ramírez 07e1dea467
🐛 Fix JSON Schema accepting bools as valid JSON Schemas, e.g. `additionalProperties: false` (#9781)
* 🐛 Fix JSON Schema accepting bools as valid JSON Schemas, e.g. additionalProperties: false

*  Add test to ensure additionalProperties can be false

* ♻️ Tweak OpenAPI models to support Pydantic v1's JSON Schema for tuples
2023-07-02 17:58:23 +02:00
github-actions 0f105d9076 📝 Update release notes 2023-07-01 16:44:12 +00:00
Sebastián Ramírez 4d83f984cc
📝 Update source examples to use new JSON Schema examples field (#9776)
* 📝 Update source examples to use new JSON Schema examples field

*  Update tests for JSON Schema examples

* 📝 Update highlights in JSON Schema examples
2023-07-01 18:43:29 +02:00
Sebastián Ramírez 983f1d34db 🔖 Release version 0.99.0 2023-06-30 20:55:17 +02:00
Sebastián Ramírez efc2bcc57a 📝 Update release notes 2023-06-30 20:54:25 +02:00
github-actions b757211299 📝 Update release notes 2023-06-30 18:25:53 +00:00
Sebastián Ramírez 7dad5a820b
Add support for OpenAPI 3.1.0 (#9770)
*  Update OpenAPI models for JSON Schema 2020-12 and OpenAPI 3.1.0

*  Add support for summary and webhooks

*  Update JSON Schema for UploadFiles

* ️ Revert making paths optional, to ensure always correctness

* ️ Keep UploadFile as format: binary for compatibility with the rest of Pydantic bytes fields in v1

*  Update version of OpenAPI generated to 3.1.0

*  Update the version of Swagger UI

* 📝 Update docs about extending OpenAPI

* 📝 Update docs and links to refer to OpenAPI 3.1.0

*  Update logic for handling webhooks

* ♻️ Update parameter functions and classes, deprecate example and make examples the main field

*  Update tests for OpenAPI 3.1.0

* 📝 Update examples for OpenAPI metadata

*  Add and update tests for OpenAPI metadata

* 📝 Add source example for webhooks

* 📝 Update docs for metadata

* 📝 Update docs for Schema extra

* 📝 Add docs for webhooks

* 🔧 Add webhooks docs to MkDocs

*  Update tests for extending OpenAPI

*  Add tests for webhooks

* ♻️ Refactor generation of OpenAPI and JSON Schema with params

* 📝 Update source examples for field examples

*  Update tests for examples

*  Make sure the minimum version of typing-extensions installed has deprecated() (already a dependency of Pydantic)

* ✏️ Fix typo in Webhooks example code

* 🔥 Remove commented out code of removed nullable field

* 🗑️ Add deprecation warnings for example argument

*  Update tests to check for deprecation warnings

*  Add test for webhooks with security schemes, for coverage

* 🍱 Update image for metadata, with new summary

* 🍱 Add docs image for Webhooks

* 📝 Update docs for webhooks, add docs UI image
2023-06-30 20:25:16 +02:00
github-actions 02fc9e8a63 📝 Update release notes 2023-06-30 16:23:36 +00:00
Sebastián Ramírez 0a8423d792
🔨 Enable linenums in MkDocs Material during local live development to simplify highlighting code (#9769) 2023-06-30 18:23:02 +02:00
github-actions 0f390cd4b5 📝 Update release notes 2023-06-28 16:39:44 +00:00
Carson Crane 1f21b16e03
Add support for `deque` objects and children in `jsonable_encoder` (#9433)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-06-28 18:39:10 +02:00
github-actions d409c05d6f 📝 Update release notes 2023-06-27 01:14:01 +00:00
dependabot[bot] 782b1c49a9
⬆ Update httpx requirement from <0.24.0,>=0.23.0 to >=0.23.0,<0.25.0 (#9724)
Updates the requirements on [httpx](https://github.com/encode/httpx) to permit the latest version.
- [Release notes](https://github.com/encode/httpx/releases)
- [Changelog](https://github.com/encode/httpx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/encode/httpx/compare/0.23.0...0.24.1)

---
updated-dependencies:
- dependency-name: httpx
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 03:13:10 +02:00
github-actions 706d74b6ad 📝 Update release notes 2023-06-27 01:10:40 +00:00
dependabot[bot] 9debdc97ef
⬆ Bump mkdocs-material from 9.1.16 to 9.1.17 (#9746)
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.1.16 to 9.1.17.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.1.16...9.1.17)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 03:08:43 +02:00
github-actions 6c143b930d 📝 Update release notes 2023-06-27 01:07:03 +00:00
github-actions dffca555ff 📝 Update release notes 2023-06-27 01:06:48 +00:00
Sebastián Ramírez 5e7d45af16
🔥 Remove missing translation dummy pages, no longer necessary (#9751) 2023-06-27 03:06:27 +02:00
pre-commit-ci[bot] eb312758d8
⬆ [pre-commit.ci] pre-commit autoupdate (#9259)
updates:
- [github.com/asottile/pyupgrade: v3.3.1 → v3.7.0](https://github.com/asottile/pyupgrade/compare/v3.3.1...v3.7.0)
- [github.com/charliermarsh/ruff-pre-commit: v0.0.272 → v0.0.275](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.272...v0.0.275)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-06-27 03:06:02 +02:00
github-actions a95af94669 📝 Update release notes 2023-06-27 01:02:34 +00:00
mojtaba 6ba4492670
🌐 Add Persian translation for `docs/fa/docs/advanced/sub-applications.md` (#9692)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Amin Alaee <mohammadamin.alaee@gmail.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-06-27 03:02:00 +02:00
github-actions 317cef3f8a 📝 Update release notes 2023-06-27 01:00:55 +00:00
Sergei Glazkov 81772b46a8
🌐 Add Russian translation for `docs/ru/docs/tutorial/response-model.md` (#9675)
Co-authored-by: s.glazkov <s.glazkov@polymatica.ru>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alexandr <alexandrhub@vk.com>
Co-authored-by: ivan-abc <36765187+ivan-abc@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-06-27 03:00:19 +02:00
github-actions 47524eee1b 📝 Update release notes 2023-06-26 16:03:19 +00:00
Sebastián Ramírez 872af100f5
📝 Fix form for the FastAPI and friends newsletter (#9749) 2023-06-26 18:02:34 +02:00
github-actions d1c5c5c97c 📝 Update release notes 2023-06-26 14:06:24 +00:00
Sebastián Ramírez ed297bb2e0
Add Material for MkDocs Insiders features and cards (#9748)
*  Add dependencies for MkDocs Insiders

* 🙈 Add Insider's .cache to .gitignore

* 🔧 Update MkDocs configs for Insiders

* 💄 Add custom Insiders card layout, while the custom logo is provided from upstream

* 🔨 Update docs.py script to dynamically enable insiders if it's installed

* 👷 Add cache for MkDocs Material Insiders' cards

* 🔊 Add a small log to the docs CLI

* 🔊 Tweak logs, only after exporting languages

* 🐛 Fix accessing non existing env var

* 🔧 Invalidate deps cache

* 🔧 Tweak cache IDs

* 👷 Update cache for installing insiders

* 🔊 Log insiders

* 💚 Invalidate cache

* 👷 Tweak cache keys

* 👷 Trigger CI and test cache

* 🔥 Remove cache comment

* ️ Optimize cache usage for first runs of docs

* 👷 Tweak cache for MkDocs Material cards

* 💚 Trigger CI to test cache
2023-06-26 16:05:43 +02:00
github-actions afc237ad53 📝 Update release notes 2023-06-25 12:57:53 +00:00
Sebastián Ramírez b107b6a096
🔥 Remove languages without translations (#9743)
* 🔥 Remove lang directories for empty translations

* 🔥 Remove untranslated langs from main config
2023-06-25 14:57:19 +02:00
github-actions be8e704e46 📝 Update release notes 2023-06-25 12:34:39 +00:00
Sebastián Ramírez 5656ed09ef
Refactor docs for building scripts, use MkDocs hooks, simplify (remove) configs for languages (#9742)
*  Add MkDocs hooks to re-use all config from en, and auto-generate missing docs files form en

* 🔧 Update MkDocs config for es

* 🔧 Simplify configs for all languages

*  Compute available languages from MkDocs Material for config overrides in hooks

* 🔧 Update config for MkDocs for en, to make paths compatible for other languages

* ♻️ Refactor scripts/docs.py to remove all custom logic that is now handled by the MkDocs hooks

* 🔧 Remove ta language as it's incomplete (no translations and causing errors)

* 🔥 Remove ta lang, no translations available

* 🔥 Remove dummy overrides directories, no longer needed

*  Use the same missing-translation.md file contents for hooks

* ️ Restore and refactor new-lang command

* 📝 Update docs for contributing with new simplified workflow for translations

* 🔊 Enable logs so that MkDocs can show its standard output on the docs.py script
2023-06-25 14:33:58 +02:00
github-actions c563b5bcf1 📝 Update release notes 2023-06-24 14:47:59 +00:00
Sebastián Ramírez 51d3a8ff12
🔨 Add MkDocs hook that renames sections based on the first index file (#9737) 2023-06-24 16:47:15 +02:00
github-actions 3aea9acc68 📝 Update release notes 2023-06-24 12:31:54 +00:00
Sebastián Ramírez dfa56f743a
👷 Make cron jobs run only on main repo, not on forks, to avoid error notifications from missing tokens (#9735) 2023-06-24 14:30:57 +02:00
github-actions 8cee653ad8 📝 Update release notes 2023-06-24 12:29:17 +00:00
Sebastián Ramírez dd590f46ad
🔧 Update MkDocs for other languages (#9734) 2023-06-24 14:28:43 +02:00
github-actions 7d865c9487 📝 Update release notes 2023-06-24 00:00:47 +00:00
Sebastián Ramírez c09e5cdfa7
👷 Refactor Docs CI, run in multiple workers with a dynamic matrix to optimize speed (#9732) 2023-06-24 02:00:12 +02:00
github-actions 2848951082 📝 Update release notes 2023-06-23 23:52:34 +00:00
Sebastián Ramírez f61217a18a
🔥 Remove old internal GitHub Action watch-previews that is no longer needed (#9730) 2023-06-24 01:51:56 +02:00
github-actions 1471bc956c 📝 Update release notes 2023-06-23 18:17:17 +00:00
Sebastián Ramírez 0c66ec7da9
⬆️ Upgrade MkDocs and MkDocs Material (#9729) 2023-06-23 20:16:41 +02:00
github-actions 5a3bbb62de 📝 Update release notes 2023-06-23 17:55:46 +00:00
Sebastián Ramírez 42d0d6e4a5
👷 Build and deploy docs only on docs changes (#9728) 2023-06-23 19:55:09 +02:00
Sebastián Ramírez 4721405ef7 🔖 Release version 0.98.0 2023-06-22 19:58:22 +02:00
Sebastián Ramírez 8066f85b3f 📝 Update release notes 2023-06-22 19:57:25 +02:00
github-actions 2ffb08d0bc 📝 Update release notes 2023-06-22 17:52:55 +00:00
dependabot[bot] d1805ef466
⬆ Bump ruff from 0.0.272 to 0.0.275 (#9721)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-22 19:52:20 +02:00
github-actions 41d774ed6d 📝 Update release notes 2023-06-22 17:44:21 +00:00
dependabot[bot] 836ac56203
⬆ Update uvicorn[standard] requirement from <0.21.0,>=0.12.0 to >=0.12.0,<0.23.0 (#9463)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-22 19:43:44 +02:00
github-actions a01c2ca3dd 📝 Update release notes 2023-06-22 17:43:29 +00:00
dependabot[bot] 6553243dbf
⬆ Bump mypy from 1.3.0 to 1.4.0 (#9719)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-22 19:42:53 +02:00
github-actions fdc713428e 📝 Update release notes 2023-06-22 17:26:46 +00:00
dependabot[bot] 60343161ea
⬆ Update pre-commit requirement from <3.0.0,>=2.17.0 to >=2.17.0,<4.0.0 (#9251)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-22 19:26:01 +02:00
github-actions 586de94ca1 📝 Update release notes 2023-06-22 17:12:59 +00:00
dependabot[bot] 56bc75372f
⬆ Bump pypa/gh-action-pypi-publish from 1.8.5 to 1.8.6 (#9482)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-22 19:12:24 +02:00
github-actions 4842dfadcf 📝 Update release notes 2023-06-22 17:07:05 +00:00
я котик пур-пур cfc06a3a3d
📝 Update docs on Pydantic using ujson internally (#5804)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-06-22 17:06:25 +00:00
github-actions c812b42293 📝 Update release notes 2023-06-22 17:04:50 +00:00
ivan-abc 68ce5b37dc
✏ Rewording in `docs/en/docs/tutorial/debugging.md` (#9581)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-06-22 17:04:16 +00:00
github-actions 0dc9a377dc 📝 Update release notes 2023-06-22 17:02:08 +00:00
Pankaj Kumar d82700c96d
✏️ Fix tooltips for light/dark theme toggler in docs (#9588) 2023-06-22 19:01:28 +02:00
github-actions fafe670db6 📝 Update release notes 2023-06-22 16:53:00 +00:00
TabarakoAkula 47342cdd18
🌐 Add Russian translation for `docs/ru/docs/tutorial/metadata.md` (#9681)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: ivan-abc <36765187+ivan-abc@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-06-22 18:52:24 +02:00
github-actions e76dd3e70d 📝 Update release notes 2023-06-22 16:44:41 +00:00
Marcel Sander e5f3d6a5eb
📝 Add german blog post (Domain-driven Design mit Python und FastAPI) (#9261) 2023-06-22 18:44:05 +02:00
github-actions 7217f167d4 📝 Update release notes 2023-06-22 16:41:05 +00:00
github-actions 762ede2bec 📝 Update release notes 2023-06-22 16:40:50 +00:00
jyothish-mohan a3b1478221
✏️ Tweak wording in `docs/en/docs/tutorial/security/index.md` (#9561) 2023-06-22 18:40:32 +02:00
Lili_DL 41ff599d4b
🌐 Fix typo in Spanish translation for `docs/es/docs/tutorial/first-steps.md` (#9571)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-06-22 18:40:17 +02:00
github-actions b1f27c96c4 📝 Update release notes 2023-06-22 16:35:04 +00:00
TabarakoAkula 4c401aef0f
🌐 Add Russian translation for `docs/tutorial/path-operation-configuration.md` (#9696)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: ivan-abc <36765187+ivan-abc@users.noreply.github.com>
Co-authored-by: Alexandr <alexandrhub@vk.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-06-22 16:33:47 +00:00
github-actions c7dad1bb59 📝 Update release notes 2023-06-22 16:33:28 +00:00
Alexandr 0ef164e1ee
📝 Update `Annotated` notes in `docs/en/docs/tutorial/schema-extra-example.md` (#9620)
Update for docs/tutorial/schema-extra-example.md

When working on the translation, I noticed that this page is missing the annotated tips that can be found in the rest of the documentation (I checked, and it's the only page where they're missing).
2023-06-22 18:32:53 +02:00
github-actions fd6a78cbfe 📝 Update release notes 2023-06-22 16:20:40 +00:00
lordqyxz fa7474b2e8
🌐 Add Chinese translation for `docs/zh/docs/advanced/security/index.md` (#9666)
Co-authored-by: shiyz <shiyz@finchina.com>
2023-06-22 18:19:49 +02:00
github-actions 2f0541f17a 📝 Update release notes 2023-06-22 16:18:54 +00:00
雨过初晴 804a0a90cf
🌐 Add Chinese translations for `docs/zh/docs/advanced/settings.md` (#9652) 2023-06-22 18:18:04 +02:00
github-actions 847befdc1d 📝 Update release notes 2023-06-22 16:17:50 +00:00
雨过初晴 4a7b21483b
🌐 Add Chinese translations for `docs/zh/docs/advanced/websockets.md` (#9651) 2023-06-22 18:17:12 +02:00
github-actions 1182b36362 📝 Update release notes 2023-06-22 16:16:43 +00:00
吴定焕 e17cacfee4
🌐 Add Chinese translation for `docs/zh/docs/tutorial/testing.md` (#9641)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-06-22 18:16:06 +02:00
github-actions 234cecb5bf 📝 Update release notes 2023-06-22 16:14:54 +00:00
ivan-abc 612cbee165
🌐 Add Russian translation for `docs/tutorial/extra-models.md` (#9619)
Co-authored-by: Alexandr <alexandrhub@vk.com>
2023-06-22 18:14:16 +02:00
github-actions 223ed67682 📝 Update release notes 2023-06-22 14:30:35 +00:00
ivan-abc a2a0119c14
🌐 Add Russian translation for `docs/tutorial/cors.md` (#9608)
Co-authored-by: Alexandr <alexandrhub@vk.com>
Co-authored-by: Vladislav Kramorenko <85196001+Xewus@users.noreply.github.com>
2023-06-22 16:29:56 +02:00
github-actions 09319d6271 📝 Update release notes 2023-06-22 14:29:41 +00:00
Michał Brotoń a92e9c957a
🌐 Add Polish translation for `docs/pl/docs/features.md` (#5348)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-06-22 16:29:05 +02:00
github-actions 7505f24f2e 📝 Update release notes 2023-06-22 11:47:12 +00:00
Alexandr 57727fa4e0
🌐 Add Russian translation for `docs/ru/docs/tutorial/body-nested-models.md` (#9605)
Co-authored-by: ivan-abc <36765187+ivan-abc@users.noreply.github.com>
Co-authored-by: Vladislav Kramorenko <85196001+Xewus@users.noreply.github.com>
2023-06-22 13:46:36 +02:00
github-actions a2aede32b4 📝 Update release notes 2023-06-22 11:43:21 +00:00
Ricardo Castro 7c66ec8a8b
✏️ Fix typo `Annotation` -> `Annotated` in `docs/en/docs/tutorial/query-params-str-validations.md` (#9625)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-06-22 11:42:48 +00:00
github-actions d47eea9bb6 📝 Update release notes 2023-06-22 11:35:49 +00:00
Michał Górny 74de9a7b15
🔧 Set minimal hatchling version needed to build the package (#9240)
Set minimal hatchling version needed to build the package

Set the minimal hatchling version that is needed to build fastapi to
1.13.0.  Older versions fail to build because they do not recognize
the trove classifiers used, e.g. 1.12.2 yields:

    ValueError: Unknown classifier in field `project.classifiers`: Framework :: Pydantic

Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-06-22 13:35:12 +02:00
github-actions 3279f0ba63 📝 Update release notes 2023-06-22 11:32:46 +00:00
Jacob Coffee 428376d285
📝 Add repo link to PyPI (#9559) 2023-06-22 13:32:09 +02:00
github-actions 05c5ce3689 📝 Update release notes 2023-06-22 11:26:45 +00:00
Ryan Russell b4b39d3359
✏️ Fix typos in data for tests (#4958)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-06-22 11:26:11 +00:00
github-actions 2f048f7199 📝 Update release notes 2023-06-22 11:20:49 +00:00
Harsha Laxman 2cef119cd7
📝 Use in memory database for testing SQL in docs (#1223)
Co-authored-by: Harsha Laxman <harsh@Harshas-MacBook-Pro.local>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-06-22 11:20:12 +00:00
github-actions dd1c2018dc 📝 Update release notes 2023-06-22 10:38:27 +00:00
cyberlis e94c13ce74
Add allow disabling `redirect_slashes` at the FastAPI app level (#3432)
Co-authored-by: Denis Lisovik <ckyberlis@gmail.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-06-22 10:37:50 +00:00
github-actions b7ce10079e 📝 Update release notes 2023-06-19 12:34:13 +00:00
Sebastián Ramírez 87d5870314
🔧 Update sponsors, add Flint (#9699)
* 🔧 Set up sponsor Flint

* 🔧 Add configs for Flint sponsor
2023-06-19 12:33:32 +00:00
3355 changed files with 311324 additions and 126527 deletions

View File

@ -123,6 +123,20 @@ body:
```
validations:
required: true
- type: input
id: pydantic-version
attributes:
label: Pydantic Version
description: |
What Pydantic version are you using?
You can find the Pydantic version with:
```bash
python -c "import pydantic; print(pydantic.version.VERSION)"
```
validations:
required: true
- type: input
id: python-version
attributes:

View File

@ -0,0 +1,45 @@
labels: [lang-all]
body:
- type: markdown
attributes:
value: |
Thanks for your interest in helping translate the FastAPI docs! 🌍
Please follow these instructions carefully to propose a new language translation. 🙏
This structured process helps ensure translations can be properly maintained long-term.
- type: checkboxes
id: checks
attributes:
label: Initial Checks
description: Please confirm and check all the following options.
options:
- label: I checked that this language is not already being translated in FastAPI docs.
required: true
- label: I searched existing discussions to ensure no one else proposed this language.
required: true
- label: I am a native speaker of the language I want to help translate.
required: true
- type: input
id: language
attributes:
label: Target Language
description: What language do you want to translate the FastAPI docs into?
placeholder: e.g. Latin
validations:
required: true
- type: textarea
id: additional_info
attributes:
label: Additional Information
description: Any other relevant information about your translation proposal
- type: markdown
attributes:
value: |
Translations are automatized with AI and then reviewed by native speakers. 🤖 🙋
This allows us to keep them consistent and up-to-date.
If there are several native speakers commenting on this discussion and
committing to help review new translations, the FastAPI team will review it
and potentially make it an official translation. 😎

View File

@ -4,13 +4,13 @@ contact_links:
about: Please report security vulnerabilities to security@tiangolo.com
- name: Question or Problem
about: Ask a question or ask about a problem in GitHub Discussions.
url: https://github.com/tiangolo/fastapi/discussions/categories/questions
url: https://github.com/fastapi/fastapi/discussions/categories/questions
- name: Feature Request
about: To suggest an idea or ask about a feature, please start with a question saying what you would like to achieve. There might be a way to do it already.
url: https://github.com/tiangolo/fastapi/discussions/categories/questions
url: https://github.com/fastapi/fastapi/discussions/categories/questions
- name: Show and tell
about: Show what you built with FastAPI or to be used with FastAPI.
url: https://github.com/tiangolo/fastapi/discussions/categories/show-and-tell
url: https://github.com/fastapi/fastapi/discussions/categories/show-and-tell
- name: Translations
about: Coordinate translations in GitHub Discussions.
url: https://github.com/tiangolo/fastapi/discussions/categories/translations
url: https://github.com/fastapi/fastapi/discussions/categories/translations

View File

@ -6,7 +6,7 @@ body:
value: |
Thanks for your interest in FastAPI! 🚀
If you are not @tiangolo or he didn't ask you directly to create an issue here, please start the conversation in a [Question in GitHub Discussions](https://github.com/tiangolo/fastapi/discussions/categories/questions) instead.
If you are not @tiangolo or he didn't ask you directly to create an issue here, please start the conversation in a [Question in GitHub Discussions](https://github.com/fastapi/fastapi/discussions/categories/questions) instead.
- type: checkboxes
id: privileged
attributes:

View File

@ -1,7 +0,0 @@
FROM python:3.7
RUN pip install httpx "pydantic==1.5.1" pygithub
COPY ./app /app
CMD ["python", "/app/main.py"]

View File

@ -1,13 +0,0 @@
name: Comment Docs Preview in PR
description: Comment with the docs URL preview in the PR
author: Sebastián Ramírez <tiangolo@gmail.com>
inputs:
token:
description: Token for the repo. Can be passed in using {{ secrets.GITHUB_TOKEN }}
required: true
deploy_url:
description: The deployment URL to comment in the PR
required: true
runs:
using: docker
image: Dockerfile

View File

@ -1,68 +0,0 @@
import logging
import sys
from pathlib import Path
from typing import Union
import httpx
from github import Github
from github.PullRequest import PullRequest
from pydantic import BaseModel, BaseSettings, SecretStr, ValidationError
github_api = "https://api.github.com"
class Settings(BaseSettings):
github_repository: str
github_event_path: Path
github_event_name: Union[str, None] = None
input_token: SecretStr
input_deploy_url: str
class PartialGithubEventHeadCommit(BaseModel):
id: str
class PartialGithubEventWorkflowRun(BaseModel):
head_commit: PartialGithubEventHeadCommit
class PartialGithubEvent(BaseModel):
workflow_run: PartialGithubEventWorkflowRun
if __name__ == "__main__":
logging.basicConfig(level=logging.INFO)
settings = Settings()
logging.info(f"Using config: {settings.json()}")
g = Github(settings.input_token.get_secret_value())
repo = g.get_repo(settings.github_repository)
try:
event = PartialGithubEvent.parse_file(settings.github_event_path)
except ValidationError as e:
logging.error(f"Error parsing event file: {e.errors()}")
sys.exit(0)
use_pr: Union[PullRequest, None] = None
for pr in repo.get_pulls():
if pr.head.sha == event.workflow_run.head_commit.id:
use_pr = pr
break
if not use_pr:
logging.error(f"No PR found for hash: {event.workflow_run.head_commit.id}")
sys.exit(0)
github_headers = {
"Authorization": f"token {settings.input_token.get_secret_value()}"
}
url = f"{github_api}/repos/{settings.github_repository}/issues/{use_pr.number}/comments"
logging.info(f"Using comments URL: {url}")
response = httpx.post(
url,
headers=github_headers,
json={
"body": f"📝 Docs preview for commit {use_pr.head.sha} at: {settings.input_deploy_url}"
},
)
if not (200 <= response.status_code <= 300):
logging.error(f"Error posting comment: {response.text}")
sys.exit(1)
logging.info("Finished")

View File

@ -1,7 +0,0 @@
FROM python:3.7
RUN pip install httpx PyGithub "pydantic==1.5.1" "pyyaml>=5.3.1,<6.0.0"
COPY ./app /app
CMD ["python", "/app/main.py"]

View File

@ -1,10 +0,0 @@
name: "Notify Translations"
description: "Notify in the issue for a translation when there's a new PR available"
author: "Sebastián Ramírez <tiangolo@gmail.com>"
inputs:
token:
description: 'Token, to read the GitHub API. Can be passed in using {{ secrets.GITHUB_TOKEN }}'
required: true
runs:
using: 'docker'
image: 'Dockerfile'

View File

@ -1,417 +0,0 @@
import logging
import random
import sys
import time
from pathlib import Path
from typing import Any, Dict, List, Union, cast
import httpx
from github import Github
from pydantic import BaseModel, BaseSettings, SecretStr
awaiting_label = "awaiting review"
lang_all_label = "lang-all"
approved_label = "approved-2"
translations_path = Path(__file__).parent / "translations.yml"
github_graphql_url = "https://api.github.com/graphql"
questions_translations_category_id = "DIC_kwDOCZduT84CT5P9"
all_discussions_query = """
query Q($category_id: ID) {
repository(name: "fastapi", owner: "tiangolo") {
discussions(categoryId: $category_id, first: 100) {
nodes {
title
id
number
labels(first: 10) {
edges {
node {
id
name
}
}
}
}
}
}
}
"""
translation_discussion_query = """
query Q($after: String, $discussion_number: Int!) {
repository(name: "fastapi", owner: "tiangolo") {
discussion(number: $discussion_number) {
comments(first: 100, after: $after) {
edges {
cursor
node {
id
url
body
}
}
}
}
}
}
"""
add_comment_mutation = """
mutation Q($discussion_id: ID!, $body: String!) {
addDiscussionComment(input: {discussionId: $discussion_id, body: $body}) {
comment {
id
url
body
}
}
}
"""
update_comment_mutation = """
mutation Q($comment_id: ID!, $body: String!) {
updateDiscussionComment(input: {commentId: $comment_id, body: $body}) {
comment {
id
url
body
}
}
}
"""
class Comment(BaseModel):
id: str
url: str
body: str
class UpdateDiscussionComment(BaseModel):
comment: Comment
class UpdateCommentData(BaseModel):
updateDiscussionComment: UpdateDiscussionComment
class UpdateCommentResponse(BaseModel):
data: UpdateCommentData
class AddDiscussionComment(BaseModel):
comment: Comment
class AddCommentData(BaseModel):
addDiscussionComment: AddDiscussionComment
class AddCommentResponse(BaseModel):
data: AddCommentData
class CommentsEdge(BaseModel):
node: Comment
cursor: str
class Comments(BaseModel):
edges: List[CommentsEdge]
class CommentsDiscussion(BaseModel):
comments: Comments
class CommentsRepository(BaseModel):
discussion: CommentsDiscussion
class CommentsData(BaseModel):
repository: CommentsRepository
class CommentsResponse(BaseModel):
data: CommentsData
class AllDiscussionsLabelNode(BaseModel):
id: str
name: str
class AllDiscussionsLabelsEdge(BaseModel):
node: AllDiscussionsLabelNode
class AllDiscussionsDiscussionLabels(BaseModel):
edges: List[AllDiscussionsLabelsEdge]
class AllDiscussionsDiscussionNode(BaseModel):
title: str
id: str
number: int
labels: AllDiscussionsDiscussionLabels
class AllDiscussionsDiscussions(BaseModel):
nodes: List[AllDiscussionsDiscussionNode]
class AllDiscussionsRepository(BaseModel):
discussions: AllDiscussionsDiscussions
class AllDiscussionsData(BaseModel):
repository: AllDiscussionsRepository
class AllDiscussionsResponse(BaseModel):
data: AllDiscussionsData
class Settings(BaseSettings):
github_repository: str
input_token: SecretStr
github_event_path: Path
github_event_name: Union[str, None] = None
httpx_timeout: int = 30
input_debug: Union[bool, None] = False
class PartialGitHubEventIssue(BaseModel):
number: int
class PartialGitHubEvent(BaseModel):
pull_request: PartialGitHubEventIssue
def get_graphql_response(
*,
settings: Settings,
query: str,
after: Union[str, None] = None,
category_id: Union[str, None] = None,
discussion_number: Union[int, None] = None,
discussion_id: Union[str, None] = None,
comment_id: Union[str, None] = None,
body: Union[str, None] = None,
) -> Dict[str, Any]:
headers = {"Authorization": f"token {settings.input_token.get_secret_value()}"}
# some fields are only used by one query, but GraphQL allows unused variables, so
# keep them here for simplicity
variables = {
"after": after,
"category_id": category_id,
"discussion_number": discussion_number,
"discussion_id": discussion_id,
"comment_id": comment_id,
"body": body,
}
response = httpx.post(
github_graphql_url,
headers=headers,
timeout=settings.httpx_timeout,
json={"query": query, "variables": variables, "operationName": "Q"},
)
if response.status_code != 200:
logging.error(
f"Response was not 200, after: {after}, category_id: {category_id}"
)
logging.error(response.text)
raise RuntimeError(response.text)
data = response.json()
if "errors" in data:
logging.error(f"Errors in response, after: {after}, category_id: {category_id}")
logging.error(response.text)
raise RuntimeError(response.text)
return cast(Dict[str, Any], data)
def get_graphql_translation_discussions(*, settings: Settings):
data = get_graphql_response(
settings=settings,
query=all_discussions_query,
category_id=questions_translations_category_id,
)
graphql_response = AllDiscussionsResponse.parse_obj(data)
return graphql_response.data.repository.discussions.nodes
def get_graphql_translation_discussion_comments_edges(
*, settings: Settings, discussion_number: int, after: Union[str, None] = None
):
data = get_graphql_response(
settings=settings,
query=translation_discussion_query,
discussion_number=discussion_number,
after=after,
)
graphql_response = CommentsResponse.parse_obj(data)
return graphql_response.data.repository.discussion.comments.edges
def get_graphql_translation_discussion_comments(
*, settings: Settings, discussion_number: int
):
comment_nodes: List[Comment] = []
discussion_edges = get_graphql_translation_discussion_comments_edges(
settings=settings, discussion_number=discussion_number
)
while discussion_edges:
for discussion_edge in discussion_edges:
comment_nodes.append(discussion_edge.node)
last_edge = discussion_edges[-1]
discussion_edges = get_graphql_translation_discussion_comments_edges(
settings=settings,
discussion_number=discussion_number,
after=last_edge.cursor,
)
return comment_nodes
def create_comment(*, settings: Settings, discussion_id: str, body: str):
data = get_graphql_response(
settings=settings,
query=add_comment_mutation,
discussion_id=discussion_id,
body=body,
)
response = AddCommentResponse.parse_obj(data)
return response.data.addDiscussionComment.comment
def update_comment(*, settings: Settings, comment_id: str, body: str):
data = get_graphql_response(
settings=settings,
query=update_comment_mutation,
comment_id=comment_id,
body=body,
)
response = UpdateCommentResponse.parse_obj(data)
return response.data.updateDiscussionComment.comment
if __name__ == "__main__":
settings = Settings()
if settings.input_debug:
logging.basicConfig(level=logging.DEBUG)
else:
logging.basicConfig(level=logging.INFO)
logging.debug(f"Using config: {settings.json()}")
g = Github(settings.input_token.get_secret_value())
repo = g.get_repo(settings.github_repository)
if not settings.github_event_path.is_file():
raise RuntimeError(
f"No github event file available at: {settings.github_event_path}"
)
contents = settings.github_event_path.read_text()
github_event = PartialGitHubEvent.parse_raw(contents)
# Avoid race conditions with multiple labels
sleep_time = random.random() * 10 # random number between 0 and 10 seconds
logging.info(
f"Sleeping for {sleep_time} seconds to avoid "
"race conditions and multiple comments"
)
time.sleep(sleep_time)
# Get PR
logging.debug(f"Processing PR: #{github_event.pull_request.number}")
pr = repo.get_pull(github_event.pull_request.number)
label_strs = {label.name for label in pr.get_labels()}
langs = []
for label in label_strs:
if label.startswith("lang-") and not label == lang_all_label:
langs.append(label[5:])
logging.info(f"PR #{pr.number} has labels: {label_strs}")
if not langs or lang_all_label not in label_strs:
logging.info(f"PR #{pr.number} doesn't seem to be a translation PR, skipping")
sys.exit(0)
# Generate translation map, lang ID to discussion
discussions = get_graphql_translation_discussions(settings=settings)
lang_to_discussion_map: Dict[str, AllDiscussionsDiscussionNode] = {}
for discussion in discussions:
for edge in discussion.labels.edges:
label = edge.node.name
if label.startswith("lang-") and not label == lang_all_label:
lang = label[5:]
lang_to_discussion_map[lang] = discussion
logging.debug(f"Using translations map: {lang_to_discussion_map}")
# Messages to create or check
new_translation_message = f"Good news everyone! 😉 There's a new translation PR to be reviewed: #{pr.number} by @{pr.user.login}. 🎉 This requires 2 approvals from native speakers to be merged. 🤓"
done_translation_message = f"~There's a new translation PR to be reviewed: #{pr.number} by @{pr.user.login}~ Good job! This is done. 🍰☕"
# Normally only one language, but still
for lang in langs:
if lang not in lang_to_discussion_map:
log_message = f"Could not find discussion for language: {lang}"
logging.error(log_message)
raise RuntimeError(log_message)
discussion = lang_to_discussion_map[lang]
logging.info(
f"Found a translation discussion for language: {lang} in discussion: #{discussion.number}"
)
already_notified_comment: Union[Comment, None] = None
already_done_comment: Union[Comment, None] = None
logging.info(
f"Checking current comments in discussion: #{discussion.number} to see if already notified about this PR: #{pr.number}"
)
comments = get_graphql_translation_discussion_comments(
settings=settings, discussion_number=discussion.number
)
for comment in comments:
if new_translation_message in comment.body:
already_notified_comment = comment
elif done_translation_message in comment.body:
already_done_comment = comment
logging.info(
f"Already notified comment: {already_notified_comment}, already done comment: {already_done_comment}"
)
if pr.state == "open" and awaiting_label in label_strs:
logging.info(
f"This PR seems to be a language translation and awaiting reviews: #{pr.number}"
)
if already_notified_comment:
logging.info(
f"This PR #{pr.number} was already notified in comment: {already_notified_comment.url}"
)
else:
logging.info(
f"Writing notification comment about PR #{pr.number} in Discussion: #{discussion.number}"
)
comment = create_comment(
settings=settings,
discussion_id=discussion.id,
body=new_translation_message,
)
logging.info(f"Notified in comment: {comment.url}")
elif pr.state == "closed" or approved_label in label_strs:
logging.info(f"Already approved or closed PR #{pr.number}")
if already_done_comment:
logging.info(
f"This PR #{pr.number} was already marked as done in comment: {already_done_comment.url}"
)
elif already_notified_comment:
updated_comment = update_comment(
settings=settings,
comment_id=already_notified_comment.id,
body=done_translation_message,
)
logging.info(f"Marked as done in comment: {updated_comment.url}")
else:
logging.info(
f"There doesn't seem to be anything to be done about PR #{pr.number}"
)
logging.info("Finished")

View File

@ -1,7 +0,0 @@
FROM python:3.7
RUN pip install httpx PyGithub "pydantic==1.5.1" "pyyaml>=5.3.1,<6.0.0"
COPY ./app /app
CMD ["python", "/app/main.py"]

View File

@ -1,13 +0,0 @@
name: "Generate FastAPI People"
description: "Generate the data for the FastAPI People page"
author: "Sebastián Ramírez <tiangolo@gmail.com>"
inputs:
token:
description: 'User token, to read the GitHub API. Can be passed in using {{ secrets.ACTION_TOKEN }}'
required: true
standard_token:
description: 'Default GitHub Action token, used for the PR. Can be passed in using {{ secrets.GITHUB_TOKEN }}'
required: true
runs:
using: 'docker'
image: 'Dockerfile'

View File

@ -1,726 +0,0 @@
import logging
import subprocess
import sys
from collections import Counter, defaultdict
from datetime import datetime, timedelta, timezone
from pathlib import Path
from typing import Any, Container, DefaultDict, Dict, List, Set, Union
import httpx
import yaml
from github import Github
from pydantic import BaseModel, BaseSettings, SecretStr
github_graphql_url = "https://api.github.com/graphql"
questions_category_id = "MDE4OkRpc2N1c3Npb25DYXRlZ29yeTMyMDAxNDM0"
discussions_query = """
query Q($after: String, $category_id: ID) {
repository(name: "fastapi", owner: "tiangolo") {
discussions(first: 100, after: $after, categoryId: $category_id) {
edges {
cursor
node {
number
author {
login
avatarUrl
url
}
title
createdAt
comments(first: 100) {
nodes {
createdAt
author {
login
avatarUrl
url
}
isAnswer
replies(first: 10) {
nodes {
createdAt
author {
login
avatarUrl
url
}
}
}
}
}
}
}
}
}
}
"""
issues_query = """
query Q($after: String) {
repository(name: "fastapi", owner: "tiangolo") {
issues(first: 100, after: $after) {
edges {
cursor
node {
number
author {
login
avatarUrl
url
}
title
createdAt
state
comments(first: 100) {
nodes {
createdAt
author {
login
avatarUrl
url
}
}
}
}
}
}
}
}
"""
prs_query = """
query Q($after: String) {
repository(name: "fastapi", owner: "tiangolo") {
pullRequests(first: 100, after: $after) {
edges {
cursor
node {
number
labels(first: 100) {
nodes {
name
}
}
author {
login
avatarUrl
url
}
title
createdAt
state
comments(first: 100) {
nodes {
createdAt
author {
login
avatarUrl
url
}
}
}
reviews(first:100) {
nodes {
author {
login
avatarUrl
url
}
state
}
}
}
}
}
}
}
"""
sponsors_query = """
query Q($after: String) {
user(login: "tiangolo") {
sponsorshipsAsMaintainer(first: 100, after: $after) {
edges {
cursor
node {
sponsorEntity {
... on Organization {
login
avatarUrl
url
}
... on User {
login
avatarUrl
url
}
}
tier {
name
monthlyPriceInDollars
}
}
}
}
}
}
"""
class Author(BaseModel):
login: str
avatarUrl: str
url: str
# Issues and Discussions
class CommentsNode(BaseModel):
createdAt: datetime
author: Union[Author, None] = None
class Replies(BaseModel):
nodes: List[CommentsNode]
class DiscussionsCommentsNode(CommentsNode):
replies: Replies
class Comments(BaseModel):
nodes: List[CommentsNode]
class DiscussionsComments(BaseModel):
nodes: List[DiscussionsCommentsNode]
class IssuesNode(BaseModel):
number: int
author: Union[Author, None] = None
title: str
createdAt: datetime
state: str
comments: Comments
class DiscussionsNode(BaseModel):
number: int
author: Union[Author, None] = None
title: str
createdAt: datetime
comments: DiscussionsComments
class IssuesEdge(BaseModel):
cursor: str
node: IssuesNode
class DiscussionsEdge(BaseModel):
cursor: str
node: DiscussionsNode
class Issues(BaseModel):
edges: List[IssuesEdge]
class Discussions(BaseModel):
edges: List[DiscussionsEdge]
class IssuesRepository(BaseModel):
issues: Issues
class DiscussionsRepository(BaseModel):
discussions: Discussions
class IssuesResponseData(BaseModel):
repository: IssuesRepository
class DiscussionsResponseData(BaseModel):
repository: DiscussionsRepository
class IssuesResponse(BaseModel):
data: IssuesResponseData
class DiscussionsResponse(BaseModel):
data: DiscussionsResponseData
# PRs
class LabelNode(BaseModel):
name: str
class Labels(BaseModel):
nodes: List[LabelNode]
class ReviewNode(BaseModel):
author: Union[Author, None] = None
state: str
class Reviews(BaseModel):
nodes: List[ReviewNode]
class PullRequestNode(BaseModel):
number: int
labels: Labels
author: Union[Author, None] = None
title: str
createdAt: datetime
state: str
comments: Comments
reviews: Reviews
class PullRequestEdge(BaseModel):
cursor: str
node: PullRequestNode
class PullRequests(BaseModel):
edges: List[PullRequestEdge]
class PRsRepository(BaseModel):
pullRequests: PullRequests
class PRsResponseData(BaseModel):
repository: PRsRepository
class PRsResponse(BaseModel):
data: PRsResponseData
# Sponsors
class SponsorEntity(BaseModel):
login: str
avatarUrl: str
url: str
class Tier(BaseModel):
name: str
monthlyPriceInDollars: float
class SponsorshipAsMaintainerNode(BaseModel):
sponsorEntity: SponsorEntity
tier: Tier
class SponsorshipAsMaintainerEdge(BaseModel):
cursor: str
node: SponsorshipAsMaintainerNode
class SponsorshipAsMaintainer(BaseModel):
edges: List[SponsorshipAsMaintainerEdge]
class SponsorsUser(BaseModel):
sponsorshipsAsMaintainer: SponsorshipAsMaintainer
class SponsorsResponseData(BaseModel):
user: SponsorsUser
class SponsorsResponse(BaseModel):
data: SponsorsResponseData
class Settings(BaseSettings):
input_token: SecretStr
input_standard_token: SecretStr
github_repository: str
httpx_timeout: int = 30
def get_graphql_response(
*,
settings: Settings,
query: str,
after: Union[str, None] = None,
category_id: Union[str, None] = None,
) -> Dict[str, Any]:
headers = {"Authorization": f"token {settings.input_token.get_secret_value()}"}
# category_id is only used by one query, but GraphQL allows unused variables, so
# keep it here for simplicity
variables = {"after": after, "category_id": category_id}
response = httpx.post(
github_graphql_url,
headers=headers,
timeout=settings.httpx_timeout,
json={"query": query, "variables": variables, "operationName": "Q"},
)
if response.status_code != 200:
logging.error(
f"Response was not 200, after: {after}, category_id: {category_id}"
)
logging.error(response.text)
raise RuntimeError(response.text)
data = response.json()
if "errors" in data:
logging.error(f"Errors in response, after: {after}, category_id: {category_id}")
logging.error(response.text)
raise RuntimeError(response.text)
return data
def get_graphql_issue_edges(*, settings: Settings, after: Union[str, None] = None):
data = get_graphql_response(settings=settings, query=issues_query, after=after)
graphql_response = IssuesResponse.parse_obj(data)
return graphql_response.data.repository.issues.edges
def get_graphql_question_discussion_edges(
*,
settings: Settings,
after: Union[str, None] = None,
):
data = get_graphql_response(
settings=settings,
query=discussions_query,
after=after,
category_id=questions_category_id,
)
graphql_response = DiscussionsResponse.parse_obj(data)
return graphql_response.data.repository.discussions.edges
def get_graphql_pr_edges(*, settings: Settings, after: Union[str, None] = None):
data = get_graphql_response(settings=settings, query=prs_query, after=after)
graphql_response = PRsResponse.parse_obj(data)
return graphql_response.data.repository.pullRequests.edges
def get_graphql_sponsor_edges(*, settings: Settings, after: Union[str, None] = None):
data = get_graphql_response(settings=settings, query=sponsors_query, after=after)
graphql_response = SponsorsResponse.parse_obj(data)
return graphql_response.data.user.sponsorshipsAsMaintainer.edges
def get_issues_experts(settings: Settings):
issue_nodes: List[IssuesNode] = []
issue_edges = get_graphql_issue_edges(settings=settings)
while issue_edges:
for edge in issue_edges:
issue_nodes.append(edge.node)
last_edge = issue_edges[-1]
issue_edges = get_graphql_issue_edges(settings=settings, after=last_edge.cursor)
commentors = Counter()
last_month_commentors = Counter()
authors: Dict[str, Author] = {}
now = datetime.now(tz=timezone.utc)
one_month_ago = now - timedelta(days=30)
for issue in issue_nodes:
issue_author_name = None
if issue.author:
authors[issue.author.login] = issue.author
issue_author_name = issue.author.login
issue_commentors = set()
for comment in issue.comments.nodes:
if comment.author:
authors[comment.author.login] = comment.author
if comment.author.login != issue_author_name:
issue_commentors.add(comment.author.login)
for author_name in issue_commentors:
commentors[author_name] += 1
if issue.createdAt > one_month_ago:
last_month_commentors[author_name] += 1
return commentors, last_month_commentors, authors
def get_discussions_experts(settings: Settings):
discussion_nodes: List[DiscussionsNode] = []
discussion_edges = get_graphql_question_discussion_edges(settings=settings)
while discussion_edges:
for discussion_edge in discussion_edges:
discussion_nodes.append(discussion_edge.node)
last_edge = discussion_edges[-1]
discussion_edges = get_graphql_question_discussion_edges(
settings=settings, after=last_edge.cursor
)
commentors = Counter()
last_month_commentors = Counter()
authors: Dict[str, Author] = {}
now = datetime.now(tz=timezone.utc)
one_month_ago = now - timedelta(days=30)
for discussion in discussion_nodes:
discussion_author_name = None
if discussion.author:
authors[discussion.author.login] = discussion.author
discussion_author_name = discussion.author.login
discussion_commentors = set()
for comment in discussion.comments.nodes:
if comment.author:
authors[comment.author.login] = comment.author
if comment.author.login != discussion_author_name:
discussion_commentors.add(comment.author.login)
for reply in comment.replies.nodes:
if reply.author:
authors[reply.author.login] = reply.author
if reply.author.login != discussion_author_name:
discussion_commentors.add(reply.author.login)
for author_name in discussion_commentors:
commentors[author_name] += 1
if discussion.createdAt > one_month_ago:
last_month_commentors[author_name] += 1
return commentors, last_month_commentors, authors
def get_experts(settings: Settings):
# Migrated to only use GitHub Discussions
# (
# issues_commentors,
# issues_last_month_commentors,
# issues_authors,
# ) = get_issues_experts(settings=settings)
(
discussions_commentors,
discussions_last_month_commentors,
discussions_authors,
) = get_discussions_experts(settings=settings)
# commentors = issues_commentors + discussions_commentors
commentors = discussions_commentors
# last_month_commentors = (
# issues_last_month_commentors + discussions_last_month_commentors
# )
last_month_commentors = discussions_last_month_commentors
# authors = {**issues_authors, **discussions_authors}
authors = {**discussions_authors}
return commentors, last_month_commentors, authors
def get_contributors(settings: Settings):
pr_nodes: List[PullRequestNode] = []
pr_edges = get_graphql_pr_edges(settings=settings)
while pr_edges:
for edge in pr_edges:
pr_nodes.append(edge.node)
last_edge = pr_edges[-1]
pr_edges = get_graphql_pr_edges(settings=settings, after=last_edge.cursor)
contributors = Counter()
commentors = Counter()
reviewers = Counter()
authors: Dict[str, Author] = {}
for pr in pr_nodes:
author_name = None
if pr.author:
authors[pr.author.login] = pr.author
author_name = pr.author.login
pr_commentors: Set[str] = set()
pr_reviewers: Set[str] = set()
for comment in pr.comments.nodes:
if comment.author:
authors[comment.author.login] = comment.author
if comment.author.login == author_name:
continue
pr_commentors.add(comment.author.login)
for author_name in pr_commentors:
commentors[author_name] += 1
for review in pr.reviews.nodes:
if review.author:
authors[review.author.login] = review.author
pr_reviewers.add(review.author.login)
for reviewer in pr_reviewers:
reviewers[reviewer] += 1
if pr.state == "MERGED" and pr.author:
contributors[pr.author.login] += 1
return contributors, commentors, reviewers, authors
def get_individual_sponsors(settings: Settings):
nodes: List[SponsorshipAsMaintainerNode] = []
edges = get_graphql_sponsor_edges(settings=settings)
while edges:
for edge in edges:
nodes.append(edge.node)
last_edge = edges[-1]
edges = get_graphql_sponsor_edges(settings=settings, after=last_edge.cursor)
tiers: DefaultDict[float, Dict[str, SponsorEntity]] = defaultdict(dict)
for node in nodes:
tiers[node.tier.monthlyPriceInDollars][
node.sponsorEntity.login
] = node.sponsorEntity
return tiers
def get_top_users(
*,
counter: Counter,
min_count: int,
authors: Dict[str, Author],
skip_users: Container[str],
):
users = []
for commentor, count in counter.most_common(50):
if commentor in skip_users:
continue
if count >= min_count:
author = authors[commentor]
users.append(
{
"login": commentor,
"count": count,
"avatarUrl": author.avatarUrl,
"url": author.url,
}
)
return users
if __name__ == "__main__":
logging.basicConfig(level=logging.INFO)
settings = Settings()
logging.info(f"Using config: {settings.json()}")
g = Github(settings.input_standard_token.get_secret_value())
repo = g.get_repo(settings.github_repository)
question_commentors, question_last_month_commentors, question_authors = get_experts(
settings=settings
)
contributors, pr_commentors, reviewers, pr_authors = get_contributors(
settings=settings
)
authors = {**question_authors, **pr_authors}
maintainers_logins = {"tiangolo"}
bot_names = {"codecov", "github-actions", "pre-commit-ci", "dependabot"}
maintainers = []
for login in maintainers_logins:
user = authors[login]
maintainers.append(
{
"login": login,
"answers": question_commentors[login],
"prs": contributors[login],
"avatarUrl": user.avatarUrl,
"url": user.url,
}
)
min_count_expert = 10
min_count_last_month = 3
min_count_contributor = 4
min_count_reviewer = 4
skip_users = maintainers_logins | bot_names
experts = get_top_users(
counter=question_commentors,
min_count=min_count_expert,
authors=authors,
skip_users=skip_users,
)
last_month_active = get_top_users(
counter=question_last_month_commentors,
min_count=min_count_last_month,
authors=authors,
skip_users=skip_users,
)
top_contributors = get_top_users(
counter=contributors,
min_count=min_count_contributor,
authors=authors,
skip_users=skip_users,
)
top_reviewers = get_top_users(
counter=reviewers,
min_count=min_count_reviewer,
authors=authors,
skip_users=skip_users,
)
tiers = get_individual_sponsors(settings=settings)
keys = list(tiers.keys())
keys.sort(reverse=True)
sponsors = []
for key in keys:
sponsor_group = []
for login, sponsor in tiers[key].items():
sponsor_group.append(
{"login": login, "avatarUrl": sponsor.avatarUrl, "url": sponsor.url}
)
sponsors.append(sponsor_group)
people = {
"maintainers": maintainers,
"experts": experts,
"last_month_active": last_month_active,
"top_contributors": top_contributors,
"top_reviewers": top_reviewers,
}
github_sponsors = {
"sponsors": sponsors,
}
people_path = Path("./docs/en/data/people.yml")
github_sponsors_path = Path("./docs/en/data/github_sponsors.yml")
people_old_content = people_path.read_text(encoding="utf-8")
github_sponsors_old_content = github_sponsors_path.read_text(encoding="utf-8")
new_people_content = yaml.dump(
people, sort_keys=False, width=200, allow_unicode=True
)
new_github_sponsors_content = yaml.dump(
github_sponsors, sort_keys=False, width=200, allow_unicode=True
)
if (
people_old_content == new_people_content
and github_sponsors_old_content == new_github_sponsors_content
):
logging.info("The FastAPI People data hasn't changed, finishing.")
sys.exit(0)
people_path.write_text(new_people_content, encoding="utf-8")
github_sponsors_path.write_text(new_github_sponsors_content, encoding="utf-8")
logging.info("Setting up GitHub Actions git user")
subprocess.run(["git", "config", "user.name", "github-actions"], check=True)
subprocess.run(
["git", "config", "user.email", "github-actions@github.com"], check=True
)
branch_name = "fastapi-people"
logging.info(f"Creating a new branch {branch_name}")
subprocess.run(["git", "checkout", "-b", branch_name], check=True)
logging.info("Adding updated file")
subprocess.run(
["git", "add", str(people_path), str(github_sponsors_path)], check=True
)
logging.info("Committing updated file")
message = "👥 Update FastAPI People"
result = subprocess.run(["git", "commit", "-m", message], check=True)
logging.info("Pushing branch")
subprocess.run(["git", "push", "origin", branch_name], check=True)
logging.info("Creating PR")
pr = repo.create_pull(title=message, body=message, base="master", head=branch_name)
logging.info(f"Created PR: {pr.number}")
logging.info("Finished")

View File

@ -1,7 +0,0 @@
FROM python:3.7
RUN pip install httpx PyGithub "pydantic==1.5.1"
COPY ./app /app
CMD ["python", "/app/main.py"]

View File

@ -1,10 +0,0 @@
name: "Watch docs previews in PRs"
description: "Check PRs and trigger new docs deploys"
author: "Sebastián Ramírez <tiangolo@gmail.com>"
inputs:
token:
description: 'Token for the repo. Can be passed in using {{ secrets.GITHUB_TOKEN }}'
required: true
runs:
using: 'docker'
image: 'Dockerfile'

View File

@ -1,101 +0,0 @@
import logging
from datetime import datetime
from pathlib import Path
from typing import List, Union
import httpx
from github import Github
from github.NamedUser import NamedUser
from pydantic import BaseModel, BaseSettings, SecretStr
github_api = "https://api.github.com"
netlify_api = "https://api.netlify.com"
class Settings(BaseSettings):
input_token: SecretStr
github_repository: str
github_event_path: Path
github_event_name: Union[str, None] = None
class Artifact(BaseModel):
id: int
node_id: str
name: str
size_in_bytes: int
url: str
archive_download_url: str
expired: bool
created_at: datetime
updated_at: datetime
class ArtifactResponse(BaseModel):
total_count: int
artifacts: List[Artifact]
def get_message(commit: str) -> str:
return f"Docs preview for commit {commit} at"
if __name__ == "__main__":
logging.basicConfig(level=logging.INFO)
settings = Settings()
logging.info(f"Using config: {settings.json()}")
g = Github(settings.input_token.get_secret_value())
repo = g.get_repo(settings.github_repository)
owner: NamedUser = repo.owner
headers = {"Authorization": f"token {settings.input_token.get_secret_value()}"}
prs = list(repo.get_pulls(state="open"))
response = httpx.get(
f"{github_api}/repos/{settings.github_repository}/actions/artifacts",
headers=headers,
)
data = response.json()
artifacts_response = ArtifactResponse.parse_obj(data)
for pr in prs:
logging.info("-----")
logging.info(f"Processing PR #{pr.number}: {pr.title}")
pr_comments = list(pr.get_issue_comments())
pr_commits = list(pr.get_commits())
last_commit = pr_commits[0]
for pr_commit in pr_commits:
if pr_commit.commit.author.date > last_commit.commit.author.date:
last_commit = pr_commit
commit = last_commit.commit.sha
logging.info(f"Last commit: {commit}")
message = get_message(commit)
notified = False
for pr_comment in pr_comments:
if message in pr_comment.body:
notified = True
logging.info(f"Docs preview was notified: {notified}")
if not notified:
artifact_name = f"docs-zip-{commit}"
use_artifact: Union[Artifact, None] = None
for artifact in artifacts_response.artifacts:
if artifact.name == artifact_name:
use_artifact = artifact
break
if not use_artifact:
logging.info("Artifact not available")
else:
logging.info(f"Existing artifact: {use_artifact.name}")
response = httpx.post(
"https://api.github.com/repos/tiangolo/fastapi/actions/workflows/preview-docs.yml/dispatches",
headers=headers,
json={
"ref": "master",
"inputs": {
"pr": f"{pr.number}",
"name": artifact_name,
"commit": commit,
},
},
)
logging.info(
f"Trigger sent, response status: {response.status_code} - content: {response.content}"
)
logging.info("Finished")

View File

@ -8,9 +8,9 @@ updates:
commit-message:
prefix:
# Python
- package-ecosystem: "pip"
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "daily"
interval: "monthly"
commit-message:
prefix:

38
.github/labeler.yml vendored Normal file
View File

@ -0,0 +1,38 @@
docs:
- all:
- changed-files:
- any-glob-to-any-file:
- docs/en/docs/**
- docs_src/**
- all-globs-to-all-files:
- '!fastapi/**'
- '!pyproject.toml'
- '!docs/en/data/sponsors.yml'
- '!docs/en/overrides/main.html'
lang-all:
- all:
- changed-files:
- any-glob-to-any-file:
- docs/*/docs/**
- all-globs-to-all-files:
- '!docs/en/docs/**'
- '!docs/*/**/_*.md'
- '!fastapi/**'
- '!pyproject.toml'
internal:
- all:
- changed-files:
- any-glob-to-any-file:
- .github/**
- scripts/**
- .gitignore
- .pre-commit-config.yaml
- uv.lock
- docs/en/data/sponsors.yml
- docs/en/overrides/main.html
- all-globs-to-all-files:
- '!docs/*/docs/**'
- '!fastapi/**'
- '!pyproject.toml'

18
.github/workflows/add-to-project.yml vendored Normal file
View File

@ -0,0 +1,18 @@
name: Add to Project
on:
pull_request_target:
issues:
types:
- opened
- reopened
jobs:
add-to-project:
name: Add to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v1.0.2
with:
project-url: https://github.com/orgs/fastapi/projects/2
github-token: ${{ secrets.PROJECTS_TOKEN }}

View File

@ -4,46 +4,114 @@ on:
branches:
- master
pull_request:
types: [opened, synchronize]
types:
- opened
- synchronize
jobs:
build-docs:
changes:
runs-on: ubuntu-latest
# Required permissions
permissions:
pull-requests: read
# Set job outputs to values from filter step
outputs:
docs: ${{ steps.filter.outputs.docs }}
steps:
- uses: actions/checkout@v6
# For pull requests it's not necessary to checkout the code but for the main branch it is
- uses: dorny/paths-filter@v4
id: filter
with:
filters: |
docs:
- README.md
- docs/**
- docs_src/**
- pyproject.toml
- uv.lock
- mkdocs.yml
- mkdocs.env.yml
- .github/workflows/build-docs.yml
- .github/workflows/deploy-docs.yml
- scripts/mkdocs_hooks.py
langs:
needs:
- changes
runs-on: ubuntu-latest
outputs:
langs: ${{ steps.show-langs.outputs.langs }}
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install docs extras
run: uv sync --locked --no-dev --group docs
- name: Export Language Codes
id: show-langs
run: |
echo "langs=$(uv run ./scripts/docs.py langs-json)" >> $GITHUB_OUTPUT
build-docs:
needs:
- changes
- langs
if: ${{ needs.changes.outputs.docs == 'true' }}
runs-on: ubuntu-latest
strategy:
matrix:
lang: ${{ fromJson(needs.langs.outputs.langs) }}
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: "3.11"
- uses: actions/cache@v3
id: cache
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-docs-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-docs.txt') }}-v03
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install docs extras
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -r requirements-docs.txt
- name: Install Material for MkDocs Insiders
if: ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false ) && steps.cache.outputs.cache-hit != 'true'
run: pip install git+https://${{ secrets.ACTIONS_TOKEN }}@github.com/squidfunk/mkdocs-material-insiders.git
run: uv sync --locked --no-dev --group docs
- name: Update Languages
run: uv run ./scripts/docs.py update-languages
- uses: actions/cache@v5
with:
key: mkdocs-cards-${{ matrix.lang }}-${{ github.ref }}
path: docs/${{ matrix.lang }}/.cache
- name: Build Docs
run: python ./scripts/docs.py build-all
- name: Zip docs
run: bash ./scripts/zip-docs.sh
- uses: actions/upload-artifact@v3
run: uv run ./scripts/docs.py build-lang ${{ matrix.lang }}
- uses: actions/upload-artifact@v7
with:
name: docs-zip
path: ./site/docs.zip
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v2.0.0
name: docs-site-${{ matrix.lang }}
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:
- build-docs
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
publish-dir: './site'
production-branch: master
github-token: ${{ secrets.FASTAPI_BUILD_DOCS_NETLIFY }}
enable-commit-comment: false
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
jobs: ${{ toJSON(needs) }}
allowed-skips: build-docs

49
.github/workflows/contributors.yml vendored Normal file
View File

@ -0,0 +1,49 @@
name: FastAPI People Contributors
on:
schedule:
- cron: "0 3 1 * *"
workflow_dispatch:
inputs:
debug_enabled:
description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)"
required: false
default: "false"
jobs:
job:
if: github.repository_owner == 'fastapi'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install Dependencies
run: uv sync --locked --no-dev --group github-actions
# Allow debugging with tmate
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
with:
limit-access-to-actor: true
env:
GITHUB_TOKEN: ${{ secrets.FASTAPI_PR_TOKEN }}
- name: FastAPI People Contributors
run: uv run ./scripts/contributors.py
env:
GITHUB_TOKEN: ${{ secrets.FASTAPI_PR_TOKEN }}

82
.github/workflows/deploy-docs.yml vendored Normal file
View File

@ -0,0 +1,82 @@
name: Deploy Docs
on:
workflow_run:
workflows:
- Build Docs
types:
- completed
permissions:
deployments: write
issues: write
pull-requests: write
statuses: write
jobs:
deploy-docs:
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install GitHub Actions dependencies
run: uv sync --locked --no-dev --group github-actions
- name: Deploy Docs Status Pending
run: uv run ./scripts/deploy_docs_status.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
RUN_ID: ${{ github.run_id }}
STATE: "pending"
- name: Clean site
run: |
rm -rf ./site
mkdir ./site
- uses: actions/download-artifact@v8
with:
path: ./site/
pattern: docs-site-*
merge-multiple: true
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
- name: Deploy to Cloudflare Pages
# hashFiles returns an empty string if there are no files
if: hashFiles('./site/*')
id: deploy
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@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy ./site --project-name=${{ env.PROJECT_NAME }} --branch=${{ env.BRANCH }}
- name: Deploy Docs Status Error
if: failure()
run: uv run ./scripts/deploy_docs_status.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
RUN_ID: ${{ github.run_id }}
STATE: "error"
- name: Comment Deploy
run: uv run ./scripts/deploy_docs_status.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEPLOY_URL: ${{ steps.deploy.outputs.deployment-url }}
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
RUN_ID: ${{ github.run_id }}
STATE: "success"

19
.github/workflows/detect-conflicts.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: "Conflict detector"
on:
push:
pull_request_target:
types: [synchronize]
jobs:
main:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Check if PRs have merge conflicts
uses: eps1lon/actions-label-merge-conflict@v3
with:
dirtyLabel: "conflicts"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
commentOnDirty: "This pull request has a merge conflict that needs to be resolved."

View File

@ -2,7 +2,7 @@ name: Issue Manager
on:
schedule:
- cron: "0 0 * * *"
- cron: "13 22 * * *"
issue_comment:
types:
- created
@ -14,17 +14,42 @@ on:
- labeled
workflow_dispatch:
permissions:
issues: write
pull-requests: write
jobs:
issue-manager:
if: github.repository_owner == 'fastapi'
runs-on: ubuntu-latest
steps:
- uses: tiangolo/issue-manager@0.4.0
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: tiangolo/issue-manager@0.6.0
with:
token: ${{ secrets.FASTAPI_ISSUE_MANAGER }}
token: ${{ secrets.GITHUB_TOKEN }}
config: >
{
"answered": {
"delay": 864000,
"message": "Assuming the original need was handled, this will be automatically closed now. But feel free to add more comments or create new issues or PRs."
},
"waiting": {
"delay": 2628000,
"message": "As this PR has been waiting for the original user for a while but seems to be inactive, it's now going to be closed. But if there's anyone interested, feel free to create a new PR.",
"reminder": {
"before": "P3D",
"message": "Heads-up: this will be closed in 3 days unless there's new activity."
}
},
"invalid": {
"delay": 0,
"message": "This was marked as invalid and will be closed now. If this is an error, please provide additional details."
},
"maybe-ai": {
"delay": 0,
"message": "This was marked as potentially AI generated and will be closed now. If this is an error, please provide additional details, make sure to read the docs about contributing and AI."
}
}

View File

@ -3,11 +3,43 @@ name: Label Approved
on:
schedule:
- cron: "0 12 * * *"
workflow_dispatch:
permissions:
pull-requests: write
jobs:
label-approved:
if: github.repository_owner == 'fastapi'
runs-on: ubuntu-latest
steps:
- uses: docker://tiangolo/label-approved:0.0.2
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
token: ${{ secrets.FASTAPI_LABEL_APPROVED }}
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install GitHub Actions dependencies
run: uv sync --locked --no-dev --group github-actions
- name: Label Approved
run: uv run ./scripts/label_approved.py
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONFIG: >
{
"approved-1":
{
"number": 1,
"await_label": "awaiting-review"
}
}

33
.github/workflows/labeler.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Labels
on:
pull_request_target:
types:
- opened
- synchronize
- reopened
# For label-checker
- labeled
- unlabeled
jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v6
if: ${{ github.event.action != 'labeled' && github.event.action != 'unlabeled' }}
- run: echo "Done adding labels"
# Run this after labeler applied labels
check-labels:
needs:
- labeler
permissions:
pull-requests: read
runs-on: ubuntu-latest
steps:
- uses: docker://agilepathway/pull-request-label-checker:latest
with:
one_of: breaking,security,feature,bug,refactor,upgrade,docs,lang-all,internal
repo_token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -14,25 +14,33 @@ on:
debug_enabled:
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
default: 'false'
jobs:
latest-changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
# pin to actions/checkout@v5 for compatibility with latest-changes
# Ref: https://github.com/actions/checkout/issues/2313
- uses: actions/checkout@v5
with:
# To allow latest-changes to commit to master
token: ${{ secrets.ACTIONS_TOKEN }}
# To allow latest-changes to commit to the main branch
token: ${{ secrets.FASTAPI_LATEST_CHANGES }}
# Allow debugging with tmate
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
with:
limit-access-to-actor: true
- uses: docker://tiangolo/latest-changes:0.0.3
- uses: tiangolo/latest-changes@0.4.1
with:
token: ${{ secrets.FASTAPI_LATEST_CHANGES }}
token: ${{ secrets.GITHUB_TOKEN }}
latest_changes_file: docs/en/docs/release-notes.md
latest_changes_header: '## Latest Changes\n\n'
latest_changes_header: '## Latest Changes'
end_regex: '^## '
debug_logs: true
label_header_prefix: '### '

View File

@ -5,18 +5,51 @@ on:
types:
- labeled
- closed
workflow_dispatch:
inputs:
number:
description: PR number
required: true
debug_enabled:
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: 'false'
jobs:
notify-translations:
job:
runs-on: ubuntu-latest
permissions:
discussions: write
steps:
- uses: actions/checkout@v3
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install Dependencies
run: uv sync --locked --no-dev --group github-actions
# Allow debugging with tmate
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
with:
limit-access-to-actor: true
- uses: ./.github/actions/notify-translations
with:
token: ${{ secrets.FASTAPI_NOTIFY_TRANSLATIONS }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Notify Translations
run: uv run ./scripts/notify_translations.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUMBER: ${{ github.event.inputs.number || null }}
DEBUG: ${{ github.event.inputs.debug_enabled || 'false' }}

View File

@ -6,25 +6,45 @@ on:
workflow_dispatch:
inputs:
debug_enabled:
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
description: Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)
required: false
default: false
default: "false"
jobs:
fastapi-people:
job:
if: github.repository_owner == 'fastapi'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
# Ref: https://github.com/actions/runner/issues/2033
- name: Fix git safe.directory in container
run: mkdir -p /home/runner/work/_temp/_github_home && printf "[safe]\n\tdirectory = /github/workspace" > /home/runner/work/_temp/_github_home/.gitconfig
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install Dependencies
run: uv sync --locked --no-dev --group github-actions
# Allow debugging with tmate
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
with:
limit-access-to-actor: true
- uses: ./.github/actions/people
with:
token: ${{ secrets.ACTIONS_TOKEN }}
standard_token: ${{ secrets.FASTAPI_PEOPLE }}
env:
GITHUB_TOKEN: ${{ secrets.FASTAPI_PEOPLE }}
- name: FastAPI People Experts
run: uv run ./scripts/people.py
env:
GITHUB_TOKEN: ${{ secrets.FASTAPI_PEOPLE }}
SLEEP_INTERVAL: ${{ vars.PEOPLE_SLEEP_INTERVAL }}

90
.github/workflows/pre-commit.yml vendored Normal file
View File

@ -0,0 +1,90 @@
name: pre-commit
on:
pull_request:
types:
- opened
- synchronize
env:
# Forks and Dependabot don't have access to secrets
HAS_SECRETS: ${{ secrets.PRE_COMMIT != '' }}
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v5
name: Checkout PR for own repo
if: env.HAS_SECRETS == 'true'
with:
# To be able to commit it needs to fetch the head of the branch, not the
# merge commit
ref: ${{ github.head_ref }}
# And it needs the full history to be able to compute diffs
fetch-depth: 0
# A token other than the default GITHUB_TOKEN is needed to be able to trigger CI
token: ${{ secrets.PRE_COMMIT }}
# pre-commit lite ci needs the default checkout configs to work
- uses: actions/checkout@v5
name: Checkout PR for fork
if: env.HAS_SECRETS == 'false'
with:
# To be able to commit it needs the head branch of the PR, the remote one
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install Dependencies
run: uv sync --locked --extra all
- name: Run prek - pre-commit
id: precommit
run: uvx prek run --from-ref origin/${GITHUB_BASE_REF} --to-ref HEAD --show-diff-on-failure
continue-on-error: true
- name: Commit and push changes
if: env.HAS_SECRETS == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add -A
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "🎨 Auto format"
git push
fi
- uses: pre-commit-ci/lite-action@v1.1.0
if: env.HAS_SECRETS == 'false'
with:
msg: 🎨 Auto format
- name: Error out on pre-commit errors
if: steps.precommit.outcome == 'failure'
run: exit 1
# https://github.com/marketplace/actions/alls-green#why
pre-commit-alls-green: # This job does nothing and is only used for the branch protection
if: always()
needs:
- pre-commit
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}

View File

@ -1,46 +0,0 @@
name: Preview Docs
on:
workflow_run:
workflows:
- Build Docs
types:
- completed
jobs:
preview-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Clean site
run: |
rm -rf ./site
mkdir ./site
- name: Download Artifact Docs
uses: dawidd6/action-download-artifact@v2.27.0
with:
github_token: ${{ secrets.FASTAPI_PREVIEW_DOCS_DOWNLOAD_ARTIFACTS }}
workflow: build-docs.yml
run_id: ${{ github.event.workflow_run.id }}
name: docs-zip
path: ./site/
- name: Unzip docs
run: |
cd ./site
unzip docs.zip
rm -f docs.zip
- name: Deploy to Netlify
id: netlify
uses: nwtgck/actions-netlify@v2.0.0
with:
publish-dir: './site'
production-deploy: false
github-token: ${{ secrets.FASTAPI_PREVIEW_DOCS_NETLIFY }}
enable-commit-comment: false
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
- name: Comment Deploy
uses: ./.github/actions/comment-docs-preview-in-pr
with:
token: ${{ secrets.FASTAPI_PREVIEW_DOCS_COMMENT_DEPLOY }}
deploy_url: "${{ steps.netlify.outputs.deploy-url }}"

View File

@ -8,34 +8,22 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: "3.7"
# Issue ref: https://github.com/actions/setup-python/issues/436
# cache: "pip"
cache-dependency-path: pyproject.toml
- uses: actions/cache@v3
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-publish
- name: Install build dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install build
python-version-file: ".python-version"
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Build distribution
run: python -m build
run: uv build
- name: Publish
uses: pypa/gh-action-pypi-publish@v1.8.5
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
run: uv publish

View File

@ -10,27 +10,45 @@ permissions:
jobs:
smokeshow:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v4
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.9'
- run: pip install smokeshow
- uses: dawidd6/action-download-artifact@v2.27.0
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
github_token: ${{ secrets.FASTAPI_SMOKESHOW_DOWNLOAD_ARTIFACTS }}
workflow: test.yml
commit: ${{ github.event.workflow_run.head_sha }}
- run: smokeshow upload coverage-html
cache-dependency-glob: |
pyproject.toml
uv.lock
- run: uv sync --locked --no-dev --group github-actions
- uses: actions/download-artifact@v8
with:
name: coverage-html
path: htmlcov
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
# Try 5 times to upload coverage to smokeshow
- name: Upload coverage to Smokeshow
run: |
for i in 1 2 3 4 5; do
if uv run smokeshow upload htmlcov; then
echo "Smokeshow upload success!"
break
fi
echo "Smokeshow upload error, sleep 1 sec and try again."
sleep 1
done
env:
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage}
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 100
SMOKESHOW_GITHUB_CONTEXT: coverage
SMOKESHOW_GITHUB_TOKEN: ${{ secrets.FASTAPI_SMOKESHOW_UPLOAD }}
SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
SMOKESHOW_AUTH_KEY: ${{ secrets.SMOKESHOW_AUTH_KEY }}

48
.github/workflows/sponsors.yml vendored Normal file
View File

@ -0,0 +1,48 @@
name: FastAPI People Sponsors
on:
schedule:
- cron: "0 6 1 * *"
workflow_dispatch:
inputs:
debug_enabled:
description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)"
required: false
default: "false"
jobs:
job:
if: github.repository_owner == 'fastapi'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install Dependencies
run: uv sync --locked --no-dev --group github-actions
# Allow debugging with tmate
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
with:
limit-access-to-actor: true
- name: FastAPI People Sponsors
run: uv run ./scripts/sponsors.py
env:
SPONSORS_TOKEN: ${{ secrets.SPONSORS_TOKEN }}
PR_TOKEN: ${{ secrets.FASTAPI_PR_TOKEN }}

60
.github/workflows/test-redistribute.yml vendored Normal file
View File

@ -0,0 +1,60 @@
name: Test Redistribute
on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
jobs:
test-redistribute:
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: ".python-version"
- name: Install build dependencies
run: pip install build
- name: Build source distribution
run: python -m build --sdist
- name: Decompress source distribution
run: |
cd dist
tar xvf fastapi*.tar.gz
- name: Install test dependencies
run: |
cd dist/fastapi*/
pip install --group tests --editable .[all]
- name: Run source distribution tests
run: |
cd dist/fastapi*/
bash scripts/test.sh
- name: Build wheel distribution
run: |
cd dist
pip wheel --no-deps fastapi*.tar.gz
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
# https://github.com/marketplace/actions/alls-green#why
test-redistribute-alls-green: # This job does nothing and is only used for the branch protection
if: always()
needs:
- test-redistribute
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}

View File

@ -8,100 +8,207 @@ on:
types:
- opened
- synchronize
schedule:
# cron every week on monday
- cron: "0 0 * * 1"
env:
UV_NO_SYNC: true
INLINE_SNAPSHOT_DEFAULT_FLAGS: review
jobs:
lint:
changes:
runs-on: ubuntu-latest
# Required permissions
permissions:
pull-requests: read
# Set job outputs to values from filter step
outputs:
src: ${{ steps.filter.outputs.src }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
# Issue ref: https://github.com/actions/setup-python/issues/436
# cache: "pip"
# cache-dependency-path: pyproject.toml
- uses: actions/cache@v3
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}-test-v03
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -r requirements-tests.txt
- name: Lint
run: bash scripts/lint.sh
- uses: actions/checkout@v6
# For pull requests it's not necessary to checkout the code but for the main branch it is
- uses: dorny/paths-filter@v4
id: filter
with:
filters: |
src:
- .github/workflows/test.yml
- docs_src/**
- fastapi/**
- scripts/**
- tests/**
- .python-version
- pyproject.toml
- uv.lock
test:
runs-on: ubuntu-latest
needs:
- changes
if: needs.changes.outputs.src == 'true' || github.ref == 'refs/heads/master'
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
os: [ windows-latest, macos-latest ]
python-version: [ "3.14" ]
uv-resolution:
- highest
starlette-src:
- starlette-pypi
- starlette-git
include:
- os: macos-latest
python-version: "3.10"
coverage: coverage
uv-resolution: lowest-direct
- os: windows-latest
python-version: "3.12"
coverage: coverage
uv-resolution: lowest-direct
- os: ubuntu-latest
python-version: "3.13"
coverage: coverage
uv-resolution: highest
- os: ubuntu-latest
python-version: "3.13"
uv-resolution: highest
codspeed: codspeed
- os: ubuntu-latest
python-version: "3.14"
coverage: coverage
uv-resolution: highest
starlette-src: starlette-git
fail-fast: false
runs-on: ${{ matrix.os }}
env:
UV_PYTHON: ${{ matrix.python-version }}
UV_RESOLUTION: ${{ matrix.uv-resolution }}
STARLETTE_SRC: ${{ matrix.starlette-src }}
steps:
- uses: actions/checkout@v3
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
# Issue ref: https://github.com/actions/setup-python/issues/436
# cache: "pip"
# cache-dependency-path: pyproject.toml
- uses: actions/cache@v3
id: cache
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}-test-v03
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -r requirements-tests.txt
run: uv sync --no-dev --group tests --extra all
- name: Ensure that we have the lowest supported Pydantic version
if: matrix.uv-resolution == 'lowest-direct'
run: uv pip install "pydantic==2.9.0"
- name: Install Starlette from source
if: matrix.starlette-src == 'starlette-git'
run: uv pip install "git+https://github.com/Kludex/starlette@main"
- run: mkdir coverage
- name: Test
run: bash scripts/test.sh
run: uv run --no-sync bash scripts/test-cov.sh
env:
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
# Do not store coverage for all possible combinations to avoid file size max errors in Smokeshow
- name: Store coverage files
uses: actions/upload-artifact@v3
if: matrix.coverage == 'coverage'
uses: actions/upload-artifact@v7
with:
name: coverage
name: coverage-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/coverage/.coverage.*') }}
path: coverage
include-hidden-files: true
benchmark:
needs:
- changes
if: needs.changes.outputs.src == 'true' || github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
env:
UV_PYTHON: "3.13"
UV_RESOLUTION: highest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install Dependencies
run: uv sync --no-dev --group tests --extra all
- name: CodSpeed benchmarks
uses: CodSpeedHQ/action@v4
with:
mode: simulation
run: uv run --no-sync pytest tests/benchmarks --codspeed
coverage-combine:
needs: [test]
needs:
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.8'
# Issue ref: https://github.com/actions/setup-python/issues/436
# cache: "pip"
# cache-dependency-path: pyproject.toml
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install Dependencies
run: uv sync --locked --no-dev --group tests --extra all
- name: Get coverage files
uses: actions/download-artifact@v3
uses: actions/download-artifact@v8
with:
name: coverage
pattern: coverage-*
path: coverage
- run: pip install coverage[toml]
merge-multiple: true
- run: ls -la coverage
- run: coverage combine coverage
- run: coverage report
- run: coverage html --show-contexts --title "Coverage for ${{ github.sha }}"
- run: uv run coverage combine coverage
- run: uv run coverage html --title "Coverage for ${{ github.sha }}"
- name: Store coverage HTML
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v7
with:
name: coverage-html
path: htmlcov
include-hidden-files: true
- run: uv run coverage report --fail-under=100
# https://github.com/marketplace/actions/alls-green#why
check: # This job does nothing and is only used for the branch protection
if: always()
needs:
- coverage-combine
- benchmark
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
allowed-skips: coverage-combine,test,benchmark

36
.github/workflows/topic-repos.yml vendored Normal file
View File

@ -0,0 +1,36 @@
name: Update Topic Repos
on:
schedule:
- cron: "0 12 1 * *"
workflow_dispatch:
jobs:
topic-repos:
if: github.repository_owner == 'fastapi'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install GitHub Actions dependencies
run: uv sync --locked --no-dev --group github-actions
- name: Update Topic Repos
run: uv run ./scripts/topic_repos.py
env:
GITHUB_TOKEN: ${{ secrets.FASTAPI_PR_TOKEN }}

123
.github/workflows/translate.yml vendored Normal file
View File

@ -0,0 +1,123 @@
name: Translate
on:
schedule:
- cron: "0 5 1,15 * *" # Run at 05:00 on the 1st and 15th of every month
workflow_dispatch:
inputs:
debug_enabled:
description: Run with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)
required: false
default: "false"
command:
description: Command to run
type: choice
options:
- translate-page
- translate-lang
- update-outdated
- add-missing
- update-and-add
- remove-removable
language:
description: Language to translate to as a letter code (e.g. "es" for Spanish)
type: string
required: false
default: ""
en_path:
description: File path in English to translate (e.g. docs/en/docs/index.md)
type: string
required: false
default: ""
commit_in_place:
description: Commit changes directly instead of making a PR
type: boolean
required: false
default: false
max:
description: Maximum number of items to translate (e.g. 10)
type: number
required: false
default: 10
jobs:
langs:
runs-on: ubuntu-latest
outputs:
langs: ${{ steps.show-langs.outputs.langs }}
commands: ${{ steps.show-langs.outputs.commands }}
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install Dependencies
run: uv sync --locked --no-dev --group github-actions --group translations
- name: Export Language Codes
id: show-langs
run: |
echo "langs=$(uv run ./scripts/translate.py llm-translatable-json)" >> $GITHUB_OUTPUT
echo "commands=$(uv run ./scripts/translate.py commands-json)" >> $GITHUB_OUTPUT
env:
LANGUAGE: ${{ github.event.inputs.language }}
COMMAND: ${{ github.event.inputs.command }}
translate:
if: github.repository_owner == 'fastapi'
needs: langs
runs-on: ubuntu-latest
strategy:
matrix:
lang: ${{ fromJson(needs.langs.outputs.langs) }}
command: ${{ fromJson(needs.langs.outputs.commands) }}
permissions:
contents: write
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install Dependencies
run: uv sync --locked --no-dev --group github-actions --group translations
# Allow debugging with tmate
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
with:
limit-access-to-actor: true
env:
GITHUB_TOKEN: ${{ secrets.FASTAPI_TRANSLATIONS }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- name: FastAPI Translate
run: |
uv run ./scripts/translate.py ${{ matrix.command }}
uv run ./scripts/translate.py make-pr
env:
GITHUB_TOKEN: ${{ secrets.FASTAPI_TRANSLATIONS }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
LANGUAGE: ${{ matrix.lang }}
EN_PATH: ${{ github.event.inputs.en_path }}
COMMAND: ${{ matrix.command }}
COMMIT_IN_PLACE: ${{ github.event.inputs.commit_in_place == 'true' && 'true' || '' }}
MAX: ${{ github.event.inputs.max }}

9
.gitignore vendored
View File

@ -7,7 +7,7 @@ __pycache__
htmlcov
dist
site
.coverage
.coverage*
coverage.xml
.netlify
test.db
@ -16,6 +16,7 @@ Pipfile.lock
env3.*
env
docs_build
site_build
venv
docs.zip
archive.zip
@ -23,3 +24,9 @@ archive.zip
# vim temporary files
*~
.*.sw?
.cache
# macOS
.DS_Store
.codspeed

View File

@ -1,35 +1,87 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_language_version:
python: python3.10
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-toml
- id: check-yaml
- id: check-added-large-files
args: ['--maxkb=750']
exclude: ^uv.lock$
- id: check-toml
- id: check-yaml
args:
- --unsafe
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
- --unsafe
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: local
hooks:
- id: pyupgrade
- id: local-ruff-check
name: ruff check
entry: uv run ruff check --force-exclude --fix --exit-non-zero-on-fix
require_serial: true
language: unsupported
types: [python]
- id: local-ruff-format
name: ruff format
entry: uv run ruff format --force-exclude --exit-non-zero-on-format
require_serial: true
language: unsupported
types: [python]
- id: local-mypy
name: mypy check
entry: uv run mypy fastapi
require_serial: true
language: unsupported
pass_filenames: false
- id: local-ty
name: ty check
entry: uv run ty check fastapi
require_serial: true
language: unsupported
pass_filenames: false
- id: add-permalinks-pages
language: unsupported
name: add-permalinks-pages
entry: uv run ./scripts/docs.py add-permalinks-pages
args:
- --py3-plus
- --keep-runtime-typing
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.272
hooks:
- id: ruff
args:
- --fix
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
ci:
autofix_commit_msg: 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
autoupdate_commit_msg: ⬆ [pre-commit.ci] pre-commit autoupdate
- --update-existing
files: ^docs/en/docs/.*\.md$
- id: generate-readme
language: unsupported
name: generate README.md from index.md
entry: uv run ./scripts/docs.py generate-readme
files: ^docs/en/docs/index\.md|docs/en/data/sponsors\.yml|scripts/docs\.py$
pass_filenames: false
- id: update-languages
language: unsupported
name: update languages
entry: uv run ./scripts/docs.py update-languages
files: ^docs/.*|scripts/docs\.py$
pass_filenames: false
- id: ensure-non-translated
language: unsupported
name: ensure non-translated files are not modified
entry: uv run ./scripts/docs.py ensure-non-translated
files: ^docs/(?!en/).*|^scripts/docs\.py$
pass_filenames: false
- id: fix-translations
language: unsupported
name: fix translations
entry: uv run ./scripts/translation_fixer.py fix-pages
files: ^docs/(?!en/).*/docs/.*\.md$
- id: add-release-date
language: unsupported
name: add date to latest release header
entry: uv run python scripts/add_latest_release_date.py
files: ^docs/en/docs/release-notes\.md$
pass_filenames: false

1
.python-version Normal file
View File

@ -0,0 +1 @@
3.11

24
CITATION.cff Normal file
View File

@ -0,0 +1,24 @@
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: FastAPI
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Sebastián
family-names: Ramírez
email: tiangolo@gmail.com
identifiers:
repository-code: 'https://github.com/fastapi/fastapi'
url: 'https://fastapi.tiangolo.com'
abstract: >-
FastAPI framework, high performance, easy to learn, fast to code,
ready for production
keywords:
- fastapi
- pydantic
- starlette
license: MIT

272
README.md
View File

@ -5,90 +5,104 @@
<em>FastAPI framework, high performance, easy to learn, fast to code, ready for production</em>
</p>
<p align="center">
<a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3ATest+event%3Apush+branch%3Amaster" target="_blank">
<img src="https://github.com/tiangolo/fastapi/workflows/Test/badge.svg?event=push&branch=master" alt="Test">
<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="Test">
</a>
<a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/tiangolo/fastapi" target="_blank">
<img src="https://coverage-badge.samuelcolvin.workers.dev/tiangolo/fastapi.svg" alt="Coverage">
<a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/fastapi">
<img src="https://coverage-badge.samuelcolvin.workers.dev/fastapi/fastapi.svg" alt="Coverage">
</a>
<a href="https://pypi.org/project/fastapi" target="_blank">
<a href="https://pypi.org/project/fastapi">
<img src="https://img.shields.io/pypi/v/fastapi?color=%2334D058&label=pypi%20package" alt="Package version">
</a>
<a href="https://pypi.org/project/fastapi" target="_blank">
<a href="https://pypi.org/project/fastapi">
<img src="https://img.shields.io/pypi/pyversions/fastapi.svg?color=%2334D058" alt="Supported Python versions">
</a>
</p>
---
**Documentation**: <a href="https://fastapi.tiangolo.com" target="_blank">https://fastapi.tiangolo.com</a>
**Documentation**: [https://fastapi.tiangolo.com](https://fastapi.tiangolo.com)
**Source Code**: <a href="https://github.com/tiangolo/fastapi" target="_blank">https://github.com/tiangolo/fastapi</a>
**Source Code**: [https://github.com/fastapi/fastapi](https://github.com/fastapi/fastapi)
---
FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.7+ based on standard Python type hints.
FastAPI is a modern, fast (high-performance), web framework for building APIs with Python based on standard Python type hints.
The key features are:
* **Fast**: Very high performance, on par with **NodeJS** and **Go** (thanks to Starlette and Pydantic). [One of the fastest Python frameworks available](#performance).
* **Fast to code**: Increase the speed to develop features by about 200% to 300%. *
* **Fewer bugs**: Reduce about 40% of human (developer) induced errors. *
* **Intuitive**: Great editor support. <abbr title="also known as auto-complete, autocompletion, IntelliSense">Completion</abbr> everywhere. Less time debugging.
* **Intuitive**: Great editor support. <dfn title="also known as auto-complete, autocompletion, IntelliSense">Completion</dfn> everywhere. Less time debugging.
* **Easy**: Designed to be easy to use and learn. Less time reading docs.
* **Short**: Minimize code duplication. Multiple features from each parameter declaration. Fewer bugs.
* **Robust**: Get production-ready code. With automatic interactive documentation.
* **Standards-based**: Based on (and fully compatible with) the open standards for APIs: <a href="https://github.com/OAI/OpenAPI-Specification" class="external-link" target="_blank">OpenAPI</a> (previously known as Swagger) and <a href="https://json-schema.org/" class="external-link" target="_blank">JSON Schema</a>.
* **Standards-based**: Based on (and fully compatible with) the open standards for APIs: [OpenAPI](https://github.com/OAI/OpenAPI-Specification) (previously known as Swagger) and [JSON Schema](https://json-schema.org/).
<small>* estimation based on tests on an internal development team, building production applications.</small>
<small>* estimation based on tests conducted by an internal development team, building production applications.</small>
## Sponsors
<!-- sponsors -->
### Keystone Sponsor
<a href="https://cryptapi.io/" target="_blank" title="CryptAPI: Your easy to use, secure and privacy oriented payment gateway."><img src="https://fastapi.tiangolo.com/img/sponsors/cryptapi.svg"></a>
<a href="https://platform.sh/try-it-now/?utm_source=fastapi-signup&utm_medium=banner&utm_campaign=FastAPI-signup-June-2023" target="_blank" title="Build, run and scale your apps on a modern, reliable, and secure PaaS."><img src="https://fastapi.tiangolo.com/img/sponsors/platform-sh.png"></a>
<a href="https://www.deta.sh/?ref=fastapi" target="_blank" title="The launchpad for all your (team's) ideas"><img src="https://fastapi.tiangolo.com/img/sponsors/deta.svg"></a>
<a href="https://training.talkpython.fm/fastapi-courses" target="_blank" title="FastAPI video courses on demand from people you trust"><img src="https://fastapi.tiangolo.com/img/sponsors/talkpython.png"></a>
<a href="https://testdriven.io/courses/tdd-fastapi/" target="_blank" title="Learn to build high-quality web apps with best practices"><img src="https://fastapi.tiangolo.com/img/sponsors/testdriven.svg"></a>
<a href="https://github.com/deepset-ai/haystack/" target="_blank" title="Build powerful search from composable, open source building blocks"><img src="https://fastapi.tiangolo.com/img/sponsors/haystack-fastapi.svg"></a>
<a href="https://careers.powens.com/" target="_blank" title="Powens is hiring!"><img src="https://fastapi.tiangolo.com/img/sponsors/powens.png"></a>
<a href="https://fastapicloud.com" target="_blank" title="FastAPI Cloud. By the same team behind FastAPI. You code. We Cloud."><img src="https://fastapi.tiangolo.com/img/sponsors/fastapicloud.png"></a>
### Gold and Silver Sponsors
<a href="https://blockbee.io?ref=fastapi" target="_blank" title="BlockBee Cryptocurrency Payment Gateway"><img src="https://fastapi.tiangolo.com/img/sponsors/blockbee.png"></a>
<a href="https://github.com/scalar/scalar/?utm_source=fastapi&utm_medium=website&utm_campaign=main-badge" target="_blank" title="Scalar: Beautiful Open-Source API References from Swagger/OpenAPI files"><img src="https://fastapi.tiangolo.com/img/sponsors/scalar.svg"></a>
<a href="https://www.propelauth.com/?utm_source=fastapi&utm_campaign=1223&utm_medium=mainbadge" target="_blank" title="Auth, user management and more for your B2B product"><img src="https://fastapi.tiangolo.com/img/sponsors/propelauth.png"></a>
<a href="https://zuplo.link/fastapi-gh" target="_blank" title="Zuplo: Deploy, Secure, Document, and Monetize your FastAPI"><img src="https://fastapi.tiangolo.com/img/sponsors/zuplo.png"></a>
<a href="https://liblab.com?utm_source=fastapi" target="_blank" title="liblab - Generate SDKs from FastAPI"><img src="https://fastapi.tiangolo.com/img/sponsors/liblab.png"></a>
<a href="https://docs.render.com/deploy-fastapi?utm_source=deploydoc&utm_medium=referral&utm_campaign=fastapi" target="_blank" title="Deploy & scale any full-stack web app on Render. Focus on building apps, not infra."><img src="https://fastapi.tiangolo.com/img/sponsors/render.svg"></a>
<a href="https://www.coderabbit.ai/?utm_source=fastapi&utm_medium=badge&utm_campaign=fastapi" target="_blank" title="Cut Code Review Time & Bugs in Half with CodeRabbit"><img src="https://fastapi.tiangolo.com/img/sponsors/coderabbit.png"></a>
<a href="https://subtotal.com/?utm_source=fastapi&utm_medium=sponsorship&utm_campaign=open-source" target="_blank" title="The Gold Standard in Retail Account Linking"><img src="https://fastapi.tiangolo.com/img/sponsors/subtotal.svg"></a>
<a href="https://docs.railway.com/guides/fastapi?utm_medium=integration&utm_source=docs&utm_campaign=fastapi" target="_blank" title="Deploy enterprise applications at startup speed"><img src="https://fastapi.tiangolo.com/img/sponsors/railway.png"></a>
<a href="https://serpapi.com/?utm_source=fastapi_website" target="_blank" title="SerpApi: Web Search API"><img src="https://fastapi.tiangolo.com/img/sponsors/serpapi.png"></a>
<a href="https://www.greptile.com/?utm_source=fastapi&utm_medium=sponsorship&utm_campaign=fastapi_sponsor_page" target="_blank" title="Greptile: The AI Code Reviewer"><img src="https://fastapi.tiangolo.com/img/sponsors/greptile.png"></a>
<a href="https://databento.com/?utm_source=fastapi&utm_medium=sponsor&utm_content=display" target="_blank" title="Pay as you go for market data"><img src="https://fastapi.tiangolo.com/img/sponsors/databento.svg"></a>
<a href="https://speakeasy.com/editor?utm_source=fastapi+repo&utm_medium=github+sponsorship" target="_blank" title="SDKs for your API | Speakeasy"><img src="https://fastapi.tiangolo.com/img/sponsors/speakeasy.png"></a>
<a href="https://www.svix.com/" target="_blank" title="Svix - Webhooks as a service"><img src="https://fastapi.tiangolo.com/img/sponsors/svix.svg"></a>
<a href="https://databento.com/" target="_blank" title="Pay as you go for market data"><img src="https://fastapi.tiangolo.com/img/sponsors/databento.svg"></a>
<a href="https://www.stainlessapi.com/?utm_source=fastapi&utm_medium=referral" target="_blank" title="Stainless | Generate best-in-class SDKs"><img src="https://fastapi.tiangolo.com/img/sponsors/stainless.png"></a>
<a href="https://www.permit.io/blog/implement-authorization-in-fastapi?utm_source=github&utm_medium=referral&utm_campaign=fastapi" target="_blank" title="Fine-Grained Authorization for FastAPI"><img src="https://fastapi.tiangolo.com/img/sponsors/permit.png"></a>
<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>
<!-- /sponsors -->
<a href="https://fastapi.tiangolo.com/fastapi-people/#sponsors" class="external-link" target="_blank">Other sponsors</a>
[Other sponsors](https://fastapi.tiangolo.com/fastapi-people/#sponsors)
## Opinions
"_[...] I'm using **FastAPI** a ton these days. [...] I'm actually planning to use it for all of my team's **ML services at Microsoft**. Some of them are getting integrated into the core **Windows** product and some **Office** products._"
<div style="text-align: right; margin-right: 10%;">Kabir Khan - <strong>Microsoft</strong> <a href="https://github.com/tiangolo/fastapi/pull/26" target="_blank"><small>(ref)</small></a></div>
<div style="text-align: right; margin-right: 10%;">Kabir Khan - <strong>Microsoft</strong> <a href="https://github.com/fastapi/fastapi/pull/26"><small>(ref)</small></a></div>
---
"_We adopted the **FastAPI** library to spawn a **REST** server that can be queried to obtain **predictions**. [for Ludwig]_"
<div style="text-align: right; margin-right: 10%;">Piero Molino, Yaroslav Dudin, and Sai Sumanth Miryala - <strong>Uber</strong> <a href="https://eng.uber.com/ludwig-v0-2/" target="_blank"><small>(ref)</small></a></div>
<div style="text-align: right; margin-right: 10%;">Piero Molino, Yaroslav Dudin, and Sai Sumanth Miryala - <strong>Uber</strong> <a href="https://eng.uber.com/ludwig-v0-2/"><small>(ref)</small></a></div>
---
"_**Netflix** is pleased to announce the open-source release of our **crisis management** orchestration framework: **Dispatch**! [built with **FastAPI**]_"
<div style="text-align: right; margin-right: 10%;">Kevin Glisson, Marc Vilanova, Forest Monsen - <strong>Netflix</strong> <a href="https://netflixtechblog.com/introducing-dispatch-da4b8a2a8072" target="_blank"><small>(ref)</small></a></div>
<div style="text-align: right; margin-right: 10%;">Kevin Glisson, Marc Vilanova, Forest Monsen - <strong>Netflix</strong> <a href="https://netflixtechblog.com/introducing-dispatch-da4b8a2a8072"><small>(ref)</small></a></div>
---
"_Im over the moon excited about **FastAPI**. Its so fun!_"
<div style="text-align: right; margin-right: 10%;">Brian Okken - <strong><a href="https://pythonbytes.fm/episodes/show/123/time-to-right-the-py-wrongs?time_in_sec=855" target="_blank">Python Bytes</a> podcast host</strong> <a href="https://twitter.com/brianokken/status/1112220079972728832" target="_blank"><small>(ref)</small></a></div>
<div style="text-align: right; margin-right: 10%;">Brian Okken - <strong>[Python Bytes](https://pythonbytes.fm/episodes/show/123/time-to-right-the-py-wrongs?time_in_sec=855) podcast host</strong> <a href="https://x.com/brianokken/status/1112220079972728832"><small>(ref)</small></a></div>
---
"_Honestly, what you've built looks super solid and polished. In many ways, it's what I wanted **Hug** to be - it's really inspiring to see someone build that._"
<div style="text-align: right; margin-right: 10%;">Timothy Crosley - <strong><a href="https://www.hug.rest/" target="_blank">Hug</a> creator</strong> <a href="https://news.ycombinator.com/item?id=19455465" target="_blank"><small>(ref)</small></a></div>
<div style="text-align: right; margin-right: 10%;">Timothy Crosley - <strong>[Hug](https://github.com/hugapi/hug) creator</strong> <a href="https://news.ycombinator.com/item?id=19455465"><small>(ref)</small></a></div>
---
@ -96,66 +110,60 @@ The key features are:
"_We've switched over to **FastAPI** for our **APIs** [...] I think you'll like it [...]_"
<div style="text-align: right; margin-right: 10%;">Ines Montani - Matthew Honnibal - <strong><a href="https://explosion.ai" target="_blank">Explosion AI</a> founders - <a href="https://spacy.io" target="_blank">spaCy</a> creators</strong> <a href="https://twitter.com/_inesmontani/status/1144173225322143744" target="_blank"><small>(ref)</small></a> - <a href="https://twitter.com/honnibal/status/1144031421859655680" target="_blank"><small>(ref)</small></a></div>
<div style="text-align: right; margin-right: 10%;">Ines Montani - Matthew Honnibal - <strong>[Explosion AI](https://explosion.ai) founders - [spaCy](https://spacy.io) creators</strong> <a href="https://x.com/_inesmontani/status/1144173225322143744"><small>(ref)</small></a> - <a href="https://x.com/honnibal/status/1144031421859655680"><small>(ref)</small></a></div>
---
"_If anyone is looking to build a production Python API, I would highly recommend **FastAPI**. It is **beautifully designed**, **simple to use** and **highly scalable**, it has become a **key component** in our API first development strategy and is driving many automations and services such as our Virtual TAC Engineer._"
<div style="text-align: right; margin-right: 10%;">Deon Pillsbury - <strong>Cisco</strong> <a href="https://www.linkedin.com/posts/deonpillsbury_cisco-cx-python-activity-6963242628536487936-trAp/" target="_blank"><small>(ref)</small></a></div>
<div style="text-align: right; margin-right: 10%;">Deon Pillsbury - <strong>Cisco</strong> <a href="https://www.linkedin.com/posts/deonpillsbury_cisco-cx-python-activity-6963242628536487936-trAp/"><small>(ref)</small></a></div>
---
## FastAPI mini documentary
There's a [FastAPI mini documentary](https://www.youtube.com/watch?v=mpR8ngthqiE) released at the end of 2025, you can watch it online:
<a href="https://www.youtube.com/watch?v=mpR8ngthqiE"><img src="https://fastapi.tiangolo.com/img/fastapi-documentary.jpg" alt="FastAPI Mini Documentary"></a>
## **Typer**, the FastAPI of CLIs
<a href="https://typer.tiangolo.com" target="_blank"><img src="https://typer.tiangolo.com/img/logo-margin/logo-margin-vector.svg" style="width: 20%;"></a>
<a href="https://typer.tiangolo.com"><img src="https://typer.tiangolo.com/img/logo-margin/logo-margin-vector.svg" style="width: 20%;"></a>
If you are building a <abbr title="Command Line Interface">CLI</abbr> app to be used in the terminal instead of a web API, check out <a href="https://typer.tiangolo.com/" class="external-link" target="_blank">**Typer**</a>.
If you are building a <abbr title="Command Line Interface">CLI</abbr> app to be used in the terminal instead of a web API, check out [**Typer**](https://typer.tiangolo.com/).
**Typer** is FastAPI's little sibling. And it's intended to be the **FastAPI of CLIs**. ⌨️ 🚀
## Requirements
Python 3.7+
FastAPI stands on the shoulders of giants:
* <a href="https://www.starlette.io/" class="external-link" target="_blank">Starlette</a> for the web parts.
* <a href="https://pydantic-docs.helpmanual.io/" class="external-link" target="_blank">Pydantic</a> for the data parts.
* [Starlette](https://www.starlette.dev/) for the web parts.
* [Pydantic](https://docs.pydantic.dev/) for the data parts.
## Installation
Create and activate a [virtual environment](https://fastapi.tiangolo.com/virtual-environments/) and then install FastAPI:
<div class="termy">
```console
$ pip install fastapi
$ pip install "fastapi[standard]"
---> 100%
```
</div>
You will also need an ASGI server, for production such as <a href="https://www.uvicorn.org" class="external-link" target="_blank">Uvicorn</a> or <a href="https://github.com/pgjones/hypercorn" class="external-link" target="_blank">Hypercorn</a>.
<div class="termy">
```console
$ pip install "uvicorn[standard]"
---> 100%
```
</div>
**Note**: Make sure you put `"fastapi[standard]"` in quotes to ensure it works in all terminals.
## Example
### Create it
* Create a file `main.py` with:
Create a file `main.py` with:
```Python
from typing import Union
from fastapi import FastAPI
app = FastAPI()
@ -167,7 +175,7 @@ def read_root():
@app.get("/items/{item_id}")
def read_item(item_id: int, q: Union[str, None] = None):
def read_item(item_id: int, q: str | None = None):
return {"item_id": item_id, "q": q}
```
@ -176,9 +184,7 @@ def read_item(item_id: int, q: Union[str, None] = None):
If your code uses `async` / `await`, use `async def`:
```Python hl_lines="9 14"
from typing import Union
```Python hl_lines="7 12"
from fastapi import FastAPI
app = FastAPI()
@ -190,13 +196,13 @@ async def read_root():
@app.get("/items/{item_id}")
async def read_item(item_id: int, q: Union[str, None] = None):
async def read_item(item_id: int, q: str | None = None):
return {"item_id": item_id, "q": q}
```
**Note**:
If you don't know, check the _"In a hurry?"_ section about <a href="https://fastapi.tiangolo.com/async/#in-a-hurry" target="_blank">`async` and `await` in the docs</a>.
If you don't know, check the _"In a hurry?"_ section about [`async` and `await` in the docs](https://fastapi.tiangolo.com/async/#in-a-hurry).
</details>
@ -207,11 +213,24 @@ Run the server with:
<div class="termy">
```console
$ uvicorn main:app --reload
$ 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 [28720]
INFO: Started server process [28722]
INFO: Started reloader process [2248755] using WatchFiles
INFO: Started server process [2248757]
INFO: Waiting for application startup.
INFO: Application startup complete.
```
@ -219,19 +238,19 @@ INFO: Application startup complete.
</div>
<details markdown="1">
<summary>About the command <code>uvicorn main:app --reload</code>...</summary>
<summary>About the command <code>fastapi dev</code>...</summary>
The command `uvicorn main:app` refers to:
The command `fastapi dev` reads your `main.py` file automatically, detects the **FastAPI** app in it, and starts a server using [Uvicorn](https://www.uvicorn.dev).
* `main`: the file `main.py` (the Python "module").
* `app`: the object created inside of `main.py` with the line `app = FastAPI()`.
* `--reload`: make the server restart after code changes. Only do this for development.
By default, `fastapi dev` will start with auto-reload enabled for local development.
You can read more about it in the [FastAPI CLI docs](https://fastapi.tiangolo.com/fastapi-cli/).
</details>
### Check it
Open your browser at <a href="http://127.0.0.1:8000/items/5?q=somequery" class="external-link" target="_blank">http://127.0.0.1:8000/items/5?q=somequery</a>.
Open your browser at [http://127.0.0.1:8000/items/5?q=somequery](http://127.0.0.1:8000/items/5?q=somequery).
You will see the JSON response as:
@ -248,17 +267,17 @@ You already created an API that:
### Interactive API docs
Now go to <a href="http://127.0.0.1:8000/docs" class="external-link" target="_blank">http://127.0.0.1:8000/docs</a>.
Now go to [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs).
You will see the automatic interactive API documentation (provided by <a href="https://github.com/swagger-api/swagger-ui" class="external-link" target="_blank">Swagger UI</a>):
You will see the automatic interactive API documentation (provided by [Swagger UI](https://github.com/swagger-api/swagger-ui)):
![Swagger UI](https://fastapi.tiangolo.com/img/index/index-01-swagger-ui-simple.png)
### Alternative API docs
And now, go to <a href="http://127.0.0.1:8000/redoc" class="external-link" target="_blank">http://127.0.0.1:8000/redoc</a>.
And now, go to [http://127.0.0.1:8000/redoc](http://127.0.0.1:8000/redoc).
You will see the alternative automatic documentation (provided by <a href="https://github.com/Rebilly/ReDoc" class="external-link" target="_blank">ReDoc</a>):
You will see the alternative automatic documentation (provided by [ReDoc](https://github.com/Rebilly/ReDoc)):
![ReDoc](https://fastapi.tiangolo.com/img/index/index-02-redoc-simple.png)
@ -268,9 +287,7 @@ Now modify the file `main.py` to receive a body from a `PUT` request.
Declare the body using standard Python types, thanks to Pydantic.
```Python hl_lines="4 9-12 25-27"
from typing import Union
```Python hl_lines="2 7-10 23-25"
from fastapi import FastAPI
from pydantic import BaseModel
@ -280,7 +297,7 @@ app = FastAPI()
class Item(BaseModel):
name: str
price: float
is_offer: Union[bool, None] = None
is_offer: bool | None = None
@app.get("/")
@ -289,7 +306,7 @@ def read_root():
@app.get("/items/{item_id}")
def read_item(item_id: int, q: Union[str, None] = None):
def read_item(item_id: int, q: str | None = None):
return {"item_id": item_id, "q": q}
@ -298,11 +315,11 @@ def update_item(item_id: int, item: Item):
return {"item_name": item.name, "item_id": item_id}
```
The server should reload automatically (because you added `--reload` to the `uvicorn` command above).
The `fastapi dev` server should reload automatically.
### Interactive API docs upgrade
Now go to <a href="http://127.0.0.1:8000/docs" class="external-link" target="_blank">http://127.0.0.1:8000/docs</a>.
Now go to [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs).
* The interactive API documentation will be automatically updated, including the new body:
@ -318,7 +335,7 @@ Now go to <a href="http://127.0.0.1:8000/docs" class="external-link" target="_bl
### Alternative API docs upgrade
And now, go to <a href="http://127.0.0.1:8000/redoc" class="external-link" target="_blank">http://127.0.0.1:8000/redoc</a>.
And now, go to [http://127.0.0.1:8000/redoc](http://127.0.0.1:8000/redoc).
* The alternative documentation will also reflect the new query parameter and body:
@ -332,7 +349,7 @@ You do that with standard modern Python types.
You don't have to learn a new syntax, the methods or classes of a specific library, etc.
Just standard **Python 3.7+**.
Just standard **Python**.
For example, for an `int`:
@ -354,7 +371,7 @@ item: Item
* Validation of data:
* Automatic and clear errors when the data is invalid.
* Validation even for deeply nested JSON objects.
* <abbr title="also known as: serialization, parsing, marshalling">Conversion</abbr> of input data: coming from the network to Python data and types. Reading from:
* <dfn title="also known as: serialization, parsing, marshalling">Conversion</dfn> of input data: coming from the network to Python data and types. Reading from:
* JSON.
* Path parameters.
* Query parameters.
@ -362,7 +379,7 @@ item: Item
* Headers.
* Forms.
* Files.
* <abbr title="also known as: serialization, parsing, marshalling">Conversion</abbr> of output data: converting from Python data and types to network data (as JSON):
* <dfn title="also known as: serialization, parsing, marshalling">Conversion</dfn> of output data: converting from Python data and types to network data (as JSON):
* Convert Python types (`str`, `int`, `float`, `bool`, `list`, etc).
* `datetime` objects.
* `UUID` objects.
@ -382,7 +399,7 @@ Coming back to the previous code example, **FastAPI** will:
* Check if there is an optional query parameter named `q` (as in `http://127.0.0.1:8000/items/foo?q=somequery`) for `GET` requests.
* As the `q` parameter is declared with `= None`, it is optional.
* Without the `None` it would be required (as is the body in the case with `PUT`).
* For `PUT` requests to `/items/{item_id}`, Read the body as JSON:
* For `PUT` requests to `/items/{item_id}`, read the body as JSON:
* Check that it has a required attribute `name` that should be a `str`.
* Check that it has a required attribute `price` that has to be a `float`.
* Check that it has an optional attribute `is_offer`, that should be a `bool`, if present.
@ -425,10 +442,10 @@ For a more complete example including more features, see the <a href="https://fa
* Declaration of **parameters** from other different places as: **headers**, **cookies**, **form fields** and **files**.
* How to set **validation constraints** as `maximum_length` or `regex`.
* A very powerful and easy to use **<abbr title="also known as components, resources, providers, services, injectables">Dependency Injection</abbr>** system.
* A very powerful and easy to use **<dfn title="also known as components, resources, providers, services, injectables">Dependency Injection</dfn>** system.
* Security and authentication, including support for **OAuth2** with **JWT tokens** and **HTTP Basic** auth.
* More advanced (but equally easy) techniques for declaring **deeply nested JSON models** (thanks to Pydantic).
* **GraphQL** integration with <a href="https://strawberry.rocks" class="external-link" target="_blank">Strawberry</a> and other libraries.
* **GraphQL** integration with [Strawberry](https://strawberry.rocks) and other libraries.
* Many extra features (thanks to Starlette) as:
* **WebSockets**
* extremely easy tests based on HTTPX and `pytest`
@ -436,34 +453,95 @@ For a more complete example including more features, see the <a href="https://fa
* **Cookie Sessions**
* ...and more.
### Deploy your app (optional)
You can optionally deploy your FastAPI app to [FastAPI Cloud](https://fastapicloud.com), go and join the waiting list if you haven't. 🚀
If you already have a **FastAPI Cloud** account (we invited you from the waiting list 😉), you can deploy your application with one command.
<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>
That's it! Now you can access your app at that URL. ✨
#### About FastAPI Cloud
**[FastAPI Cloud](https://fastapicloud.com)** is built by the same author and team behind **FastAPI**.
It streamlines the process of **building**, **deploying**, and **accessing** an API with minimal effort.
It brings the same **developer experience** of building apps with FastAPI to **deploying** them to the cloud. 🎉
FastAPI Cloud is the primary sponsor and funding provider for the *FastAPI and friends* open source projects. ✨
#### Deploy to other cloud providers
FastAPI is open source and based on standards. You can deploy FastAPI apps to any cloud provider you choose.
Follow your cloud provider's guides to deploy FastAPI apps with them. 🤓
## Performance
Independent TechEmpower benchmarks show **FastAPI** applications running under Uvicorn as <a href="https://www.techempower.com/benchmarks/#section=test&runid=7464e520-0dc2-473d-bd34-dbdfd7e85911&hw=ph&test=query&l=zijzen-7" class="external-link" target="_blank">one of the fastest Python frameworks available</a>, only below Starlette and Uvicorn themselves (used internally by FastAPI). (*)
Independent TechEmpower benchmarks show **FastAPI** applications running under Uvicorn as [one of the fastest Python frameworks available](https://www.techempower.com/benchmarks/#section=test&runid=7464e520-0dc2-473d-bd34-dbdfd7e85911&hw=ph&test=query&l=zijzen-7), only below Starlette and Uvicorn themselves (used internally by FastAPI). (*)
To understand more about it, see the section <a href="https://fastapi.tiangolo.com/benchmarks/" class="internal-link" target="_blank">Benchmarks</a>.
To understand more about it, see the section [Benchmarks](https://fastapi.tiangolo.com/benchmarks/).
## Optional Dependencies
## Dependencies
FastAPI depends on Pydantic and Starlette.
### `standard` Dependencies
When you install FastAPI with `pip install "fastapi[standard]"` it comes with the `standard` group of optional dependencies:
Used by Pydantic:
* <a href="https://github.com/esnme/ultrajson" target="_blank"><code>ujson</code></a> - for faster JSON <abbr title="converting the string that comes from an HTTP request into Python data">"parsing"</abbr>.
* <a href="https://github.com/JoshData/python-email-validator" target="_blank"><code>email_validator</code></a> - for email validation.
* [`email-validator`](https://github.com/JoshData/python-email-validator) - for email validation.
Used by Starlette:
* <a href="https://www.python-httpx.org" target="_blank"><code>httpx</code></a> - Required if you want to use the `TestClient`.
* <a href="https://jinja.palletsprojects.com" target="_blank"><code>jinja2</code></a> - Required if you want to use the default template configuration.
* <a href="https://andrew-d.github.io/python-multipart/" target="_blank"><code>python-multipart</code></a> - Required if you want to support form <abbr title="converting the string that comes from an HTTP request into Python data">"parsing"</abbr>, with `request.form()`.
* <a href="https://pythonhosted.org/itsdangerous/" target="_blank"><code>itsdangerous</code></a> - Required for `SessionMiddleware` support.
* <a href="https://pyyaml.org/wiki/PyYAMLDocumentation" target="_blank"><code>pyyaml</code></a> - Required for Starlette's `SchemaGenerator` support (you probably don't need it with FastAPI).
* <a href="https://github.com/esnme/ultrajson" target="_blank"><code>ujson</code></a> - Required if you want to use `UJSONResponse`.
* [`httpx`](https://www.python-httpx.org) - Required if you want to use the `TestClient`.
* [`jinja2`](https://jinja.palletsprojects.com) - Required if you want to use the default template configuration.
* [`python-multipart`](https://github.com/Kludex/python-multipart) - Required if you want to support form <dfn title="converting the string that comes from an HTTP request into Python data">"parsing"</dfn>, with `request.form()`.
Used by FastAPI / Starlette:
Used by FastAPI:
* <a href="https://www.uvicorn.org" target="_blank"><code>uvicorn</code></a> - for the server that loads and serves your application.
* <a href="https://github.com/ijl/orjson" target="_blank"><code>orjson</code></a> - Required if you want to use `ORJSONResponse`.
* [`uvicorn`](https://www.uvicorn.dev) - for the server that loads and serves your application. This includes `uvicorn[standard]`, which includes some dependencies (e.g. `uvloop`) needed for high performance serving.
* `fastapi-cli[standard]` - to provide the `fastapi` command.
* This includes `fastapi-cloud-cli`, which allows you to deploy your FastAPI application to [FastAPI Cloud](https://fastapicloud.com).
You can install all of these with `pip install "fastapi[all]"`.
### Without `standard` Dependencies
If you don't want to include the `standard` optional dependencies, you can install with `pip install fastapi` instead of `pip install "fastapi[standard]"`.
### Without `fastapi-cloud-cli`
If you want to install FastAPI with the standard dependencies but without the `fastapi-cloud-cli`, you can install with `pip install "fastapi[standard-no-fastapi-cloud-cli]"`.
### Additional Optional Dependencies
There are some additional dependencies you might want to install.
Additional optional Pydantic dependencies:
* [`pydantic-settings`](https://docs.pydantic.dev/latest/usage/pydantic_settings/) - for settings management.
* [`pydantic-extra-types`](https://docs.pydantic.dev/latest/usage/types/extra_types/extra_types/) - for extra types to be used with Pydantic.
Additional optional FastAPI dependencies:
* [`orjson`](https://github.com/ijl/orjson) - Required if you want to use `ORJSONResponse`.
* [`ujson`](https://github.com/esnme/ultrajson) - Required if you want to use `UJSONResponse`.
## License

View File

@ -16,7 +16,7 @@ You can learn more about [FastAPI versions and how to pin and upgrade them](http
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://twitter.com/tiangolo)) will review it thoroughly and get back to you.
I (the author, [@tiangolo](https://x.com/tiangolo)) will review it thoroughly and get back to you.
## Public Discussions

View File

@ -1,466 +0,0 @@
{!../../../docs/missing-translation.md!}
<p align="center">
<a href="https://fastapi.tiangolo.com"><img src="https://fastapi.tiangolo.com/img/logo-margin/logo-teal.png" alt="FastAPI"></a>
</p>
<p align="center">
<em>FastAPI framework, high performance, easy to learn, fast to code, ready for production</em>
</p>
<p align="center">
<a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3ATest" target="_blank">
<img src="https://github.com/tiangolo/fastapi/workflows/Test/badge.svg" alt="Test">
</a>
<a href="https://codecov.io/gh/tiangolo/fastapi" target="_blank">
<img src="https://img.shields.io/codecov/c/github/tiangolo/fastapi?color=%2334D058" alt="Coverage">
</a>
<a href="https://pypi.org/project/fastapi" target="_blank">
<img src="https://img.shields.io/pypi/v/fastapi?color=%2334D058&label=pypi%20package" alt="Package version">
</a>
</p>
---
**Documentation**: <a href="https://fastapi.tiangolo.com" target="_blank">https://fastapi.tiangolo.com</a>
**Source Code**: <a href="https://github.com/tiangolo/fastapi" target="_blank">https://github.com/tiangolo/fastapi</a>
---
FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based on standard Python type hints.
The key features are:
* **Fast**: Very high performance, on par with **NodeJS** and **Go** (thanks to Starlette and Pydantic). [One of the fastest Python frameworks available](#performance).
* **Fast to code**: Increase the speed to develop features by about 200% to 300%. *
* **Fewer bugs**: Reduce about 40% of human (developer) induced errors. *
* **Intuitive**: Great editor support. <abbr title="also known as auto-complete, autocompletion, IntelliSense">Completion</abbr> everywhere. Less time debugging.
* **Easy**: Designed to be easy to use and learn. Less time reading docs.
* **Short**: Minimize code duplication. Multiple features from each parameter declaration. Fewer bugs.
* **Robust**: Get production-ready code. With automatic interactive documentation.
* **Standards-based**: Based on (and fully compatible with) the open standards for APIs: <a href="https://github.com/OAI/OpenAPI-Specification" class="external-link" target="_blank">OpenAPI</a> (previously known as Swagger) and <a href="https://json-schema.org/" class="external-link" target="_blank">JSON Schema</a>.
<small>* estimation based on tests on an internal development team, building production applications.</small>
## Sponsors
<!-- sponsors -->
{% if sponsors %}
{% for sponsor in sponsors.gold -%}
<a href="{{ sponsor.url }}" target="_blank" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
{% endfor -%}
{%- for sponsor in sponsors.silver -%}
<a href="{{ sponsor.url }}" target="_blank" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
{% endfor %}
{% endif %}
<!-- /sponsors -->
<a href="https://fastapi.tiangolo.com/fastapi-people/#sponsors" class="external-link" target="_blank">Other sponsors</a>
## Opinions
"_[...] I'm using **FastAPI** a ton these days. [...] I'm actually planning to use it for all of my team's **ML services at Microsoft**. Some of them are getting integrated into the core **Windows** product and some **Office** products._"
<div style="text-align: right; margin-right: 10%;">Kabir Khan - <strong>Microsoft</strong> <a href="https://github.com/tiangolo/fastapi/pull/26" target="_blank"><small>(ref)</small></a></div>
---
"_We adopted the **FastAPI** library to spawn a **REST** server that can be queried to obtain **predictions**. [for Ludwig]_"
<div style="text-align: right; margin-right: 10%;">Piero Molino, Yaroslav Dudin, and Sai Sumanth Miryala - <strong>Uber</strong> <a href="https://eng.uber.com/ludwig-v0-2/" target="_blank"><small>(ref)</small></a></div>
---
"_**Netflix** is pleased to announce the open-source release of our **crisis management** orchestration framework: **Dispatch**! [built with **FastAPI**]_"
<div style="text-align: right; margin-right: 10%;">Kevin Glisson, Marc Vilanova, Forest Monsen - <strong>Netflix</strong> <a href="https://netflixtechblog.com/introducing-dispatch-da4b8a2a8072" target="_blank"><small>(ref)</small></a></div>
---
"_Im over the moon excited about **FastAPI**. Its so fun!_"
<div style="text-align: right; margin-right: 10%;">Brian Okken - <strong><a href="https://pythonbytes.fm/episodes/show/123/time-to-right-the-py-wrongs?time_in_sec=855" target="_blank">Python Bytes</a> podcast host</strong> <a href="https://twitter.com/brianokken/status/1112220079972728832" target="_blank"><small>(ref)</small></a></div>
---
"_Honestly, what you've built looks super solid and polished. In many ways, it's what I wanted **Hug** to be - it's really inspiring to see someone build that._"
<div style="text-align: right; margin-right: 10%;">Timothy Crosley - <strong><a href="https://www.hug.rest/" target="_blank">Hug</a> creator</strong> <a href="https://news.ycombinator.com/item?id=19455465" target="_blank"><small>(ref)</small></a></div>
---
"_If you're looking to learn one **modern framework** for building REST APIs, check out **FastAPI** [...] It's fast, easy to use and easy to learn [...]_"
"_We've switched over to **FastAPI** for our **APIs** [...] I think you'll like it [...]_"
<div style="text-align: right; margin-right: 10%;">Ines Montani - Matthew Honnibal - <strong><a href="https://explosion.ai" target="_blank">Explosion AI</a> founders - <a href="https://spacy.io" target="_blank">spaCy</a> creators</strong> <a href="https://twitter.com/_inesmontani/status/1144173225322143744" target="_blank"><small>(ref)</small></a> - <a href="https://twitter.com/honnibal/status/1144031421859655680" target="_blank"><small>(ref)</small></a></div>
---
## **Typer**, the FastAPI of CLIs
<a href="https://typer.tiangolo.com" target="_blank"><img src="https://typer.tiangolo.com/img/logo-margin/logo-margin-vector.svg" style="width: 20%;"></a>
If you are building a <abbr title="Command Line Interface">CLI</abbr> app to be used in the terminal instead of a web API, check out <a href="https://typer.tiangolo.com/" class="external-link" target="_blank">**Typer**</a>.
**Typer** is FastAPI's little sibling. And it's intended to be the **FastAPI of CLIs**. ⌨️ 🚀
## Requirements
Python 3.7+
FastAPI stands on the shoulders of giants:
* <a href="https://www.starlette.io/" class="external-link" target="_blank">Starlette</a> for the web parts.
* <a href="https://pydantic-docs.helpmanual.io/" class="external-link" target="_blank">Pydantic</a> for the data parts.
## Installation
<div class="termy">
```console
$ pip install fastapi
---> 100%
```
</div>
You will also need an ASGI server, for production such as <a href="https://www.uvicorn.org" class="external-link" target="_blank">Uvicorn</a> or <a href="https://gitlab.com/pgjones/hypercorn" class="external-link" target="_blank">Hypercorn</a>.
<div class="termy">
```console
$ pip install "uvicorn[standard]"
---> 100%
```
</div>
## Example
### Create it
* Create a file `main.py` with:
```Python
from typing import Optional
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: Optional[str] = None):
return {"item_id": item_id, "q": q}
```
<details markdown="1">
<summary>Or use <code>async def</code>...</summary>
If your code uses `async` / `await`, use `async def`:
```Python hl_lines="9 14"
from typing import Optional
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: Optional[str] = None):
return {"item_id": item_id, "q": q}
```
**Note**:
If you don't know, check the _"In a hurry?"_ section about <a href="https://fastapi.tiangolo.com/async/#in-a-hurry" target="_blank">`async` and `await` in the docs</a>.
</details>
### Run it
Run the server with:
<div class="termy">
```console
$ uvicorn main:app --reload
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: Started reloader process [28720]
INFO: Started server process [28722]
INFO: Waiting for application startup.
INFO: Application startup complete.
```
</div>
<details markdown="1">
<summary>About the command <code>uvicorn main:app --reload</code>...</summary>
The command `uvicorn main:app` refers to:
* `main`: the file `main.py` (the Python "module").
* `app`: the object created inside of `main.py` with the line `app = FastAPI()`.
* `--reload`: make the server restart after code changes. Only do this for development.
</details>
### Check it
Open your browser at <a href="http://127.0.0.1:8000/items/5?q=somequery" class="external-link" target="_blank">http://127.0.0.1:8000/items/5?q=somequery</a>.
You will see the JSON response as:
```JSON
{"item_id": 5, "q": "somequery"}
```
You already created an API that:
* Receives HTTP requests in the _paths_ `/` and `/items/{item_id}`.
* Both _paths_ take `GET` <em>operations</em> (also known as HTTP _methods_).
* The _path_ `/items/{item_id}` has a _path parameter_ `item_id` that should be an `int`.
* The _path_ `/items/{item_id}` has an optional `str` _query parameter_ `q`.
### Interactive API docs
Now go to <a href="http://127.0.0.1:8000/docs" class="external-link" target="_blank">http://127.0.0.1:8000/docs</a>.
You will see the automatic interactive API documentation (provided by <a href="https://github.com/swagger-api/swagger-ui" class="external-link" target="_blank">Swagger UI</a>):
![Swagger UI](https://fastapi.tiangolo.com/img/index/index-01-swagger-ui-simple.png)
### Alternative API docs
And now, go to <a href="http://127.0.0.1:8000/redoc" class="external-link" target="_blank">http://127.0.0.1:8000/redoc</a>.
You will see the alternative automatic documentation (provided by <a href="https://github.com/Rebilly/ReDoc" class="external-link" target="_blank">ReDoc</a>):
![ReDoc](https://fastapi.tiangolo.com/img/index/index-02-redoc-simple.png)
## Example upgrade
Now modify the file `main.py` to receive a body from a `PUT` request.
Declare the body using standard Python types, thanks to Pydantic.
```Python hl_lines="4 9-12 25-27"
from typing import Optional
from fastapi import FastAPI
from pydantic import BaseModel
app = FastAPI()
class Item(BaseModel):
name: str
price: float
is_offer: Optional[bool] = None
@app.get("/")
def read_root():
return {"Hello": "World"}
@app.get("/items/{item_id}")
def read_item(item_id: int, q: Optional[str] = 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}
```
The server should reload automatically (because you added `--reload` to the `uvicorn` command above).
### Interactive API docs upgrade
Now go to <a href="http://127.0.0.1:8000/docs" class="external-link" target="_blank">http://127.0.0.1:8000/docs</a>.
* The interactive API documentation will be automatically updated, including the new body:
![Swagger UI](https://fastapi.tiangolo.com/img/index/index-03-swagger-02.png)
* Click on the button "Try it out", it allows you to fill the parameters and directly interact with the API:
![Swagger UI interaction](https://fastapi.tiangolo.com/img/index/index-04-swagger-03.png)
* Then click on the "Execute" button, the user interface will communicate with your API, send the parameters, get the results and show them on the screen:
![Swagger UI interaction](https://fastapi.tiangolo.com/img/index/index-05-swagger-04.png)
### Alternative API docs upgrade
And now, go to <a href="http://127.0.0.1:8000/redoc" class="external-link" target="_blank">http://127.0.0.1:8000/redoc</a>.
* The alternative documentation will also reflect the new query parameter and body:
![ReDoc](https://fastapi.tiangolo.com/img/index/index-06-redoc-02.png)
### Recap
In summary, you declare **once** the types of parameters, body, etc. as function parameters.
You do that with standard modern Python types.
You don't have to learn a new syntax, the methods or classes of a specific library, etc.
Just standard **Python 3.6+**.
For example, for an `int`:
```Python
item_id: int
```
or for a more complex `Item` model:
```Python
item: Item
```
...and with that single declaration you get:
* Editor support, including:
* Completion.
* Type checks.
* Validation of data:
* Automatic and clear errors when the data is invalid.
* Validation even for deeply nested JSON objects.
* <abbr title="also known as: serialization, parsing, marshalling">Conversion</abbr> of input data: coming from the network to Python data and types. Reading from:
* JSON.
* Path parameters.
* Query parameters.
* Cookies.
* Headers.
* Forms.
* Files.
* <abbr title="also known as: serialization, parsing, marshalling">Conversion</abbr> of output data: converting from Python data and types to network data (as JSON):
* Convert Python types (`str`, `int`, `float`, `bool`, `list`, etc).
* `datetime` objects.
* `UUID` objects.
* Database models.
* ...and many more.
* Automatic interactive API documentation, including 2 alternative user interfaces:
* Swagger UI.
* ReDoc.
---
Coming back to the previous code example, **FastAPI** will:
* Validate that there is an `item_id` in the path for `GET` and `PUT` requests.
* Validate that the `item_id` is of type `int` for `GET` and `PUT` requests.
* If it is not, the client will see a useful, clear error.
* Check if there is an optional query parameter named `q` (as in `http://127.0.0.1:8000/items/foo?q=somequery`) for `GET` requests.
* As the `q` parameter is declared with `= None`, it is optional.
* Without the `None` it would be required (as is the body in the case with `PUT`).
* For `PUT` requests to `/items/{item_id}`, Read the body as JSON:
* Check that it has a required attribute `name` that should be a `str`.
* Check that it has a required attribute `price` that has to be a `float`.
* Check that it has an optional attribute `is_offer`, that should be a `bool`, if present.
* All this would also work for deeply nested JSON objects.
* Convert from and to JSON automatically.
* Document everything with OpenAPI, that can be used by:
* Interactive documentation systems.
* Automatic client code generation systems, for many languages.
* Provide 2 interactive documentation web interfaces directly.
---
We just scratched the surface, but you already get the idea of how it all works.
Try changing the line with:
```Python
return {"item_name": item.name, "item_id": item_id}
```
...from:
```Python
... "item_name": item.name ...
```
...to:
```Python
... "item_price": item.price ...
```
...and see how your editor will auto-complete the attributes and know their types:
![editor support](https://fastapi.tiangolo.com/img/vscode-completion.png)
For a more complete example including more features, see the <a href="https://fastapi.tiangolo.com/tutorial/">Tutorial - User Guide</a>.
**Spoiler alert**: the tutorial - user guide includes:
* Declaration of **parameters** from other different places as: **headers**, **cookies**, **form fields** and **files**.
* How to set **validation constraints** as `maximum_length` or `regex`.
* A very powerful and easy to use **<abbr title="also known as components, resources, providers, services, injectables">Dependency Injection</abbr>** system.
* Security and authentication, including support for **OAuth2** with **JWT tokens** and **HTTP Basic** auth.
* More advanced (but equally easy) techniques for declaring **deeply nested JSON models** (thanks to Pydantic).
* Many extra features (thanks to Starlette) as:
* **WebSockets**
* **GraphQL**
* extremely easy tests based on `requests` and `pytest`
* **CORS**
* **Cookie Sessions**
* ...and more.
## Performance
Independent TechEmpower benchmarks show **FastAPI** applications running under Uvicorn as <a href="https://www.techempower.com/benchmarks/#section=test&runid=7464e520-0dc2-473d-bd34-dbdfd7e85911&hw=ph&test=query&l=zijzen-7" class="external-link" target="_blank">one of the fastest Python frameworks available</a>, only below Starlette and Uvicorn themselves (used internally by FastAPI). (*)
To understand more about it, see the section <a href="https://fastapi.tiangolo.com/benchmarks/" class="internal-link" target="_blank">Benchmarks</a>.
## Optional Dependencies
Used by Pydantic:
* <a href="https://github.com/esnme/ultrajson" target="_blank"><code>ujson</code></a> - for faster JSON <abbr title="converting the string that comes from an HTTP request into Python data">"parsing"</abbr>.
* <a href="https://github.com/JoshData/python-email-validator" target="_blank"><code>email_validator</code></a> - for email validation.
Used by Starlette:
* <a href="https://www.python-httpx.org" target="_blank"><code>httpx</code></a> - Required if you want to use the `TestClient`.
* <a href="https://jinja.palletsprojects.com" target="_blank"><code>jinja2</code></a> - Required if you want to use the default template configuration.
* <a href="https://andrew-d.github.io/python-multipart/" target="_blank"><code>python-multipart</code></a> - Required if you want to support form <abbr title="converting the string that comes from an HTTP request into Python data">"parsing"</abbr>, with `request.form()`.
* <a href="https://pythonhosted.org/itsdangerous/" target="_blank"><code>itsdangerous</code></a> - Required for `SessionMiddleware` support.
* <a href="https://pyyaml.org/wiki/PyYAMLDocumentation" target="_blank"><code>pyyaml</code></a> - Required for Starlette's `SchemaGenerator` support (you probably don't need it with FastAPI).
* <a href="https://graphene-python.org/" target="_blank"><code>graphene</code></a> - Required for `GraphQLApp` support.
* <a href="https://github.com/esnme/ultrajson" target="_blank"><code>ujson</code></a> - Required if you want to use `UJSONResponse`.
Used by FastAPI / Starlette:
* <a href="https://www.uvicorn.org" target="_blank"><code>uvicorn</code></a> - for the server that loads and serves your application.
* <a href="https://github.com/ijl/orjson" target="_blank"><code>orjson</code></a> - Required if you want to use `ORJSONResponse`.
You can install all of these with `pip install fastapi[all]`.
## License
This project is licensed under the terms of the MIT license.

View File

@ -1,160 +0,0 @@
site_name: FastAPI
site_description: FastAPI framework, high performance, easy to learn, fast to code, ready for production
site_url: https://fastapi.tiangolo.com/az/
theme:
name: material
custom_dir: overrides
palette:
- media: '(prefers-color-scheme: light)'
scheme: default
primary: teal
accent: amber
toggle:
icon: material/lightbulb
name: Switch to light mode
- media: '(prefers-color-scheme: dark)'
scheme: slate
primary: teal
accent: amber
toggle:
icon: material/lightbulb-outline
name: Switch to dark mode
features:
- search.suggest
- search.highlight
- content.tabs.link
icon:
repo: fontawesome/brands/github-alt
logo: https://fastapi.tiangolo.com/img/icon-white.svg
favicon: https://fastapi.tiangolo.com/img/favicon.png
language: en
repo_name: tiangolo/fastapi
repo_url: https://github.com/tiangolo/fastapi
edit_uri: ''
plugins:
- search
- markdownextradata:
data: data
nav:
- FastAPI: index.md
- Languages:
- en: /
- az: /az/
- cs: /cs/
- de: /de/
- em: /em/
- es: /es/
- fa: /fa/
- fr: /fr/
- he: /he/
- hy: /hy/
- id: /id/
- it: /it/
- ja: /ja/
- ko: /ko/
- lo: /lo/
- nl: /nl/
- pl: /pl/
- pt: /pt/
- ru: /ru/
- sq: /sq/
- sv: /sv/
- ta: /ta/
- tr: /tr/
- uk: /uk/
- zh: /zh/
markdown_extensions:
- toc:
permalink: true
- markdown.extensions.codehilite:
guess_lang: false
- mdx_include:
base_path: docs
- admonition
- codehilite
- extra
- pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format ''
- pymdownx.tabbed:
alternate_style: true
- attr_list
- md_in_html
extra:
analytics:
provider: google
property: G-YNEVN69SC3
social:
- icon: fontawesome/brands/github-alt
link: https://github.com/tiangolo/fastapi
- icon: fontawesome/brands/discord
link: https://discord.gg/VQjSZaeJmf
- icon: fontawesome/brands/twitter
link: https://twitter.com/fastapi
- icon: fontawesome/brands/linkedin
link: https://www.linkedin.com/in/tiangolo
- icon: fontawesome/brands/dev
link: https://dev.to/tiangolo
- icon: fontawesome/brands/medium
link: https://medium.com/@tiangolo
- icon: fontawesome/solid/globe
link: https://tiangolo.com
alternate:
- link: /
name: en - English
- link: /az/
name: az
- link: /cs/
name: cs
- link: /de/
name: de
- link: /em/
name: 😉
- link: /es/
name: es - español
- link: /fa/
name: fa
- link: /fr/
name: fr - français
- link: /he/
name: he
- link: /hy/
name: hy
- link: /id/
name: id
- link: /it/
name: it - italiano
- link: /ja/
name: ja - 日本語
- link: /ko/
name: ko - 한국어
- link: /lo/
name: lo - ພາສາລາວ
- link: /nl/
name: nl
- link: /pl/
name: pl
- link: /pt/
name: pt - português
- link: /ru/
name: ru - русский язык
- link: /sq/
name: sq - shqip
- link: /sv/
name: sv - svenska
- link: /ta/
name: ta - தமிழ்
- link: /tr/
name: tr - Türkçe
- link: /uk/
name: uk - українська мова
- link: /zh/
name: zh - 汉语
extra_css:
- https://fastapi.tiangolo.com/css/termynal.css
- https://fastapi.tiangolo.com/css/custom.css
extra_javascript:
- https://fastapi.tiangolo.com/js/termynal.js
- https://fastapi.tiangolo.com/js/custom.js

View File

@ -1,473 +0,0 @@
{!../../../docs/missing-translation.md!}
<p align="center">
<a href="https://fastapi.tiangolo.com"><img src="https://fastapi.tiangolo.com/img/logo-margin/logo-teal.png" alt="FastAPI"></a>
</p>
<p align="center">
<em>FastAPI framework, high performance, easy to learn, fast to code, ready for production</em>
</p>
<p align="center">
<a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3ATest+event%3Apush+branch%3Amaster" target="_blank">
<img src="https://github.com/tiangolo/fastapi/workflows/Test/badge.svg?event=push&branch=master" alt="Test">
</a>
<a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/tiangolo/fastapi" target="_blank">
<img src="https://coverage-badge.samuelcolvin.workers.dev/tiangolo/fastapi.svg" alt="Coverage">
</a>
<a href="https://pypi.org/project/fastapi" target="_blank">
<img src="https://img.shields.io/pypi/v/fastapi?color=%2334D058&label=pypi%20package" alt="Package version">
</a>
<a href="https://pypi.org/project/fastapi" target="_blank">
<img src="https://img.shields.io/pypi/pyversions/fastapi.svg?color=%2334D058" alt="Supported Python versions">
</a>
</p>
---
**Documentation**: <a href="https://fastapi.tiangolo.com" target="_blank">https://fastapi.tiangolo.com</a>
**Source Code**: <a href="https://github.com/tiangolo/fastapi" target="_blank">https://github.com/tiangolo/fastapi</a>
---
FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.7+ based on standard Python type hints.
The key features are:
* **Fast**: Very high performance, on par with **NodeJS** and **Go** (thanks to Starlette and Pydantic). [One of the fastest Python frameworks available](#performance).
* **Fast to code**: Increase the speed to develop features by about 200% to 300%. *
* **Fewer bugs**: Reduce about 40% of human (developer) induced errors. *
* **Intuitive**: Great editor support. <abbr title="also known as auto-complete, autocompletion, IntelliSense">Completion</abbr> everywhere. Less time debugging.
* **Easy**: Designed to be easy to use and learn. Less time reading docs.
* **Short**: Minimize code duplication. Multiple features from each parameter declaration. Fewer bugs.
* **Robust**: Get production-ready code. With automatic interactive documentation.
* **Standards-based**: Based on (and fully compatible with) the open standards for APIs: <a href="https://github.com/OAI/OpenAPI-Specification" class="external-link" target="_blank">OpenAPI</a> (previously known as Swagger) and <a href="https://json-schema.org/" class="external-link" target="_blank">JSON Schema</a>.
<small>* estimation based on tests on an internal development team, building production applications.</small>
## Sponsors
<!-- sponsors -->
{% if sponsors %}
{% for sponsor in sponsors.gold -%}
<a href="{{ sponsor.url }}" target="_blank" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
{% endfor -%}
{%- for sponsor in sponsors.silver -%}
<a href="{{ sponsor.url }}" target="_blank" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
{% endfor %}
{% endif %}
<!-- /sponsors -->
<a href="https://fastapi.tiangolo.com/fastapi-people/#sponsors" class="external-link" target="_blank">Other sponsors</a>
## Opinions
"_[...] I'm using **FastAPI** a ton these days. [...] I'm actually planning to use it for all of my team's **ML services at Microsoft**. Some of them are getting integrated into the core **Windows** product and some **Office** products._"
<div style="text-align: right; margin-right: 10%;">Kabir Khan - <strong>Microsoft</strong> <a href="https://github.com/tiangolo/fastapi/pull/26" target="_blank"><small>(ref)</small></a></div>
---
"_We adopted the **FastAPI** library to spawn a **REST** server that can be queried to obtain **predictions**. [for Ludwig]_"
<div style="text-align: right; margin-right: 10%;">Piero Molino, Yaroslav Dudin, and Sai Sumanth Miryala - <strong>Uber</strong> <a href="https://eng.uber.com/ludwig-v0-2/" target="_blank"><small>(ref)</small></a></div>
---
"_**Netflix** is pleased to announce the open-source release of our **crisis management** orchestration framework: **Dispatch**! [built with **FastAPI**]_"
<div style="text-align: right; margin-right: 10%;">Kevin Glisson, Marc Vilanova, Forest Monsen - <strong>Netflix</strong> <a href="https://netflixtechblog.com/introducing-dispatch-da4b8a2a8072" target="_blank"><small>(ref)</small></a></div>
---
"_Im over the moon excited about **FastAPI**. Its so fun!_"
<div style="text-align: right; margin-right: 10%;">Brian Okken - <strong><a href="https://pythonbytes.fm/episodes/show/123/time-to-right-the-py-wrongs?time_in_sec=855" target="_blank">Python Bytes</a> podcast host</strong> <a href="https://twitter.com/brianokken/status/1112220079972728832" target="_blank"><small>(ref)</small></a></div>
---
"_Honestly, what you've built looks super solid and polished. In many ways, it's what I wanted **Hug** to be - it's really inspiring to see someone build that._"
<div style="text-align: right; margin-right: 10%;">Timothy Crosley - <strong><a href="https://www.hug.rest/" target="_blank">Hug</a> creator</strong> <a href="https://news.ycombinator.com/item?id=19455465" target="_blank"><small>(ref)</small></a></div>
---
"_If you're looking to learn one **modern framework** for building REST APIs, check out **FastAPI** [...] It's fast, easy to use and easy to learn [...]_"
"_We've switched over to **FastAPI** for our **APIs** [...] I think you'll like it [...]_"
<div style="text-align: right; margin-right: 10%;">Ines Montani - Matthew Honnibal - <strong><a href="https://explosion.ai" target="_blank">Explosion AI</a> founders - <a href="https://spacy.io" target="_blank">spaCy</a> creators</strong> <a href="https://twitter.com/_inesmontani/status/1144173225322143744" target="_blank"><small>(ref)</small></a> - <a href="https://twitter.com/honnibal/status/1144031421859655680" target="_blank"><small>(ref)</small></a></div>
---
"_If anyone is looking to build a production Python API, I would highly recommend **FastAPI**. It is **beautifully designed**, **simple to use** and **highly scalable**, it has become a **key component** in our API first development strategy and is driving many automations and services such as our Virtual TAC Engineer._"
<div style="text-align: right; margin-right: 10%;">Deon Pillsbury - <strong>Cisco</strong> <a href="https://www.linkedin.com/posts/deonpillsbury_cisco-cx-python-activity-6963242628536487936-trAp/" target="_blank"><small>(ref)</small></a></div>
---
## **Typer**, the FastAPI of CLIs
<a href="https://typer.tiangolo.com" target="_blank"><img src="https://typer.tiangolo.com/img/logo-margin/logo-margin-vector.svg" style="width: 20%;"></a>
If you are building a <abbr title="Command Line Interface">CLI</abbr> app to be used in the terminal instead of a web API, check out <a href="https://typer.tiangolo.com/" class="external-link" target="_blank">**Typer**</a>.
**Typer** is FastAPI's little sibling. And it's intended to be the **FastAPI of CLIs**. ⌨️ 🚀
## Requirements
Python 3.7+
FastAPI stands on the shoulders of giants:
* <a href="https://www.starlette.io/" class="external-link" target="_blank">Starlette</a> for the web parts.
* <a href="https://pydantic-docs.helpmanual.io/" class="external-link" target="_blank">Pydantic</a> for the data parts.
## Installation
<div class="termy">
```console
$ pip install fastapi
---> 100%
```
</div>
You will also need an ASGI server, for production such as <a href="https://www.uvicorn.org" class="external-link" target="_blank">Uvicorn</a> or <a href="https://github.com/pgjones/hypercorn" class="external-link" target="_blank">Hypercorn</a>.
<div class="termy">
```console
$ pip install "uvicorn[standard]"
---> 100%
```
</div>
## Example
### Create it
* Create a file `main.py` with:
```Python
from typing import Union
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: Union[str, None] = None):
return {"item_id": item_id, "q": q}
```
<details markdown="1">
<summary>Or use <code>async def</code>...</summary>
If your code uses `async` / `await`, use `async def`:
```Python hl_lines="9 14"
from typing import Union
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: Union[str, None] = None):
return {"item_id": item_id, "q": q}
```
**Note**:
If you don't know, check the _"In a hurry?"_ section about <a href="https://fastapi.tiangolo.com/async/#in-a-hurry" target="_blank">`async` and `await` in the docs</a>.
</details>
### Run it
Run the server with:
<div class="termy">
```console
$ uvicorn main:app --reload
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: Started reloader process [28720]
INFO: Started server process [28722]
INFO: Waiting for application startup.
INFO: Application startup complete.
```
</div>
<details markdown="1">
<summary>About the command <code>uvicorn main:app --reload</code>...</summary>
The command `uvicorn main:app` refers to:
* `main`: the file `main.py` (the Python "module").
* `app`: the object created inside of `main.py` with the line `app = FastAPI()`.
* `--reload`: make the server restart after code changes. Only do this for development.
</details>
### Check it
Open your browser at <a href="http://127.0.0.1:8000/items/5?q=somequery" class="external-link" target="_blank">http://127.0.0.1:8000/items/5?q=somequery</a>.
You will see the JSON response as:
```JSON
{"item_id": 5, "q": "somequery"}
```
You already created an API that:
* Receives HTTP requests in the _paths_ `/` and `/items/{item_id}`.
* Both _paths_ take `GET` <em>operations</em> (also known as HTTP _methods_).
* The _path_ `/items/{item_id}` has a _path parameter_ `item_id` that should be an `int`.
* The _path_ `/items/{item_id}` has an optional `str` _query parameter_ `q`.
### Interactive API docs
Now go to <a href="http://127.0.0.1:8000/docs" class="external-link" target="_blank">http://127.0.0.1:8000/docs</a>.
You will see the automatic interactive API documentation (provided by <a href="https://github.com/swagger-api/swagger-ui" class="external-link" target="_blank">Swagger UI</a>):
![Swagger UI](https://fastapi.tiangolo.com/img/index/index-01-swagger-ui-simple.png)
### Alternative API docs
And now, go to <a href="http://127.0.0.1:8000/redoc" class="external-link" target="_blank">http://127.0.0.1:8000/redoc</a>.
You will see the alternative automatic documentation (provided by <a href="https://github.com/Rebilly/ReDoc" class="external-link" target="_blank">ReDoc</a>):
![ReDoc](https://fastapi.tiangolo.com/img/index/index-02-redoc-simple.png)
## Example upgrade
Now modify the file `main.py` to receive a body from a `PUT` request.
Declare the body using standard Python types, thanks to Pydantic.
```Python hl_lines="4 9-12 25-27"
from typing import Union
from fastapi import FastAPI
from pydantic import BaseModel
app = FastAPI()
class Item(BaseModel):
name: str
price: float
is_offer: Union[bool, None] = None
@app.get("/")
def read_root():
return {"Hello": "World"}
@app.get("/items/{item_id}")
def read_item(item_id: int, q: Union[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}
```
The server should reload automatically (because you added `--reload` to the `uvicorn` command above).
### Interactive API docs upgrade
Now go to <a href="http://127.0.0.1:8000/docs" class="external-link" target="_blank">http://127.0.0.1:8000/docs</a>.
* The interactive API documentation will be automatically updated, including the new body:
![Swagger UI](https://fastapi.tiangolo.com/img/index/index-03-swagger-02.png)
* Click on the button "Try it out", it allows you to fill the parameters and directly interact with the API:
![Swagger UI interaction](https://fastapi.tiangolo.com/img/index/index-04-swagger-03.png)
* Then click on the "Execute" button, the user interface will communicate with your API, send the parameters, get the results and show them on the screen:
![Swagger UI interaction](https://fastapi.tiangolo.com/img/index/index-05-swagger-04.png)
### Alternative API docs upgrade
And now, go to <a href="http://127.0.0.1:8000/redoc" class="external-link" target="_blank">http://127.0.0.1:8000/redoc</a>.
* The alternative documentation will also reflect the new query parameter and body:
![ReDoc](https://fastapi.tiangolo.com/img/index/index-06-redoc-02.png)
### Recap
In summary, you declare **once** the types of parameters, body, etc. as function parameters.
You do that with standard modern Python types.
You don't have to learn a new syntax, the methods or classes of a specific library, etc.
Just standard **Python 3.7+**.
For example, for an `int`:
```Python
item_id: int
```
or for a more complex `Item` model:
```Python
item: Item
```
...and with that single declaration you get:
* Editor support, including:
* Completion.
* Type checks.
* Validation of data:
* Automatic and clear errors when the data is invalid.
* Validation even for deeply nested JSON objects.
* <abbr title="also known as: serialization, parsing, marshalling">Conversion</abbr> of input data: coming from the network to Python data and types. Reading from:
* JSON.
* Path parameters.
* Query parameters.
* Cookies.
* Headers.
* Forms.
* Files.
* <abbr title="also known as: serialization, parsing, marshalling">Conversion</abbr> of output data: converting from Python data and types to network data (as JSON):
* Convert Python types (`str`, `int`, `float`, `bool`, `list`, etc).
* `datetime` objects.
* `UUID` objects.
* Database models.
* ...and many more.
* Automatic interactive API documentation, including 2 alternative user interfaces:
* Swagger UI.
* ReDoc.
---
Coming back to the previous code example, **FastAPI** will:
* Validate that there is an `item_id` in the path for `GET` and `PUT` requests.
* Validate that the `item_id` is of type `int` for `GET` and `PUT` requests.
* If it is not, the client will see a useful, clear error.
* Check if there is an optional query parameter named `q` (as in `http://127.0.0.1:8000/items/foo?q=somequery`) for `GET` requests.
* As the `q` parameter is declared with `= None`, it is optional.
* Without the `None` it would be required (as is the body in the case with `PUT`).
* For `PUT` requests to `/items/{item_id}`, Read the body as JSON:
* Check that it has a required attribute `name` that should be a `str`.
* Check that it has a required attribute `price` that has to be a `float`.
* Check that it has an optional attribute `is_offer`, that should be a `bool`, if present.
* All this would also work for deeply nested JSON objects.
* Convert from and to JSON automatically.
* Document everything with OpenAPI, that can be used by:
* Interactive documentation systems.
* Automatic client code generation systems, for many languages.
* Provide 2 interactive documentation web interfaces directly.
---
We just scratched the surface, but you already get the idea of how it all works.
Try changing the line with:
```Python
return {"item_name": item.name, "item_id": item_id}
```
...from:
```Python
... "item_name": item.name ...
```
...to:
```Python
... "item_price": item.price ...
```
...and see how your editor will auto-complete the attributes and know their types:
![editor support](https://fastapi.tiangolo.com/img/vscode-completion.png)
For a more complete example including more features, see the <a href="https://fastapi.tiangolo.com/tutorial/">Tutorial - User Guide</a>.
**Spoiler alert**: the tutorial - user guide includes:
* Declaration of **parameters** from other different places as: **headers**, **cookies**, **form fields** and **files**.
* How to set **validation constraints** as `maximum_length` or `regex`.
* A very powerful and easy to use **<abbr title="also known as components, resources, providers, services, injectables">Dependency Injection</abbr>** system.
* Security and authentication, including support for **OAuth2** with **JWT tokens** and **HTTP Basic** auth.
* More advanced (but equally easy) techniques for declaring **deeply nested JSON models** (thanks to Pydantic).
* **GraphQL** integration with <a href="https://strawberry.rocks" class="external-link" target="_blank">Strawberry</a> and other libraries.
* Many extra features (thanks to Starlette) as:
* **WebSockets**
* extremely easy tests based on HTTPX and `pytest`
* **CORS**
* **Cookie Sessions**
* ...and more.
## Performance
Independent TechEmpower benchmarks show **FastAPI** applications running under Uvicorn as <a href="https://www.techempower.com/benchmarks/#section=test&runid=7464e520-0dc2-473d-bd34-dbdfd7e85911&hw=ph&test=query&l=zijzen-7" class="external-link" target="_blank">one of the fastest Python frameworks available</a>, only below Starlette and Uvicorn themselves (used internally by FastAPI). (*)
To understand more about it, see the section <a href="https://fastapi.tiangolo.com/benchmarks/" class="internal-link" target="_blank">Benchmarks</a>.
## Optional Dependencies
Used by Pydantic:
* <a href="https://github.com/esnme/ultrajson" target="_blank"><code>ujson</code></a> - for faster JSON <abbr title="converting the string that comes from an HTTP request into Python data">"parsing"</abbr>.
* <a href="https://github.com/JoshData/python-email-validator" target="_blank"><code>email_validator</code></a> - for email validation.
Used by Starlette:
* <a href="https://www.python-httpx.org" target="_blank"><code>httpx</code></a> - Required if you want to use the `TestClient`.
* <a href="https://jinja.palletsprojects.com" target="_blank"><code>jinja2</code></a> - Required if you want to use the default template configuration.
* <a href="https://andrew-d.github.io/python-multipart/" target="_blank"><code>python-multipart</code></a> - Required if you want to support form <abbr title="converting the string that comes from an HTTP request into Python data">"parsing"</abbr>, with `request.form()`.
* <a href="https://pythonhosted.org/itsdangerous/" target="_blank"><code>itsdangerous</code></a> - Required for `SessionMiddleware` support.
* <a href="https://pyyaml.org/wiki/PyYAMLDocumentation" target="_blank"><code>pyyaml</code></a> - Required for Starlette's `SchemaGenerator` support (you probably don't need it with FastAPI).
* <a href="https://github.com/esnme/ultrajson" target="_blank"><code>ujson</code></a> - Required if you want to use `UJSONResponse`.
Used by FastAPI / Starlette:
* <a href="https://www.uvicorn.org" target="_blank"><code>uvicorn</code></a> - for the server that loads and serves your application.
* <a href="https://github.com/ijl/orjson" target="_blank"><code>orjson</code></a> - Required if you want to use `ORJSONResponse`.
You can install all of these with `pip install "fastapi[all]"`.
## License
This project is licensed under the terms of the MIT license.

View File

@ -1,154 +0,0 @@
site_name: FastAPI
site_description: FastAPI framework, high performance, easy to learn, fast to code, ready for production
site_url: https://fastapi.tiangolo.com/cs/
theme:
name: material
custom_dir: overrides
palette:
- media: '(prefers-color-scheme: light)'
scheme: default
primary: teal
accent: amber
toggle:
icon: material/lightbulb
name: Switch to light mode
- media: '(prefers-color-scheme: dark)'
scheme: slate
primary: teal
accent: amber
toggle:
icon: material/lightbulb-outline
name: Switch to dark mode
features:
- search.suggest
- search.highlight
- content.tabs.link
icon:
repo: fontawesome/brands/github-alt
logo: https://fastapi.tiangolo.com/img/icon-white.svg
favicon: https://fastapi.tiangolo.com/img/favicon.png
language: cs
repo_name: tiangolo/fastapi
repo_url: https://github.com/tiangolo/fastapi
edit_uri: ''
plugins:
- search
- markdownextradata:
data: data
nav:
- FastAPI: index.md
- Languages:
- en: /
- az: /az/
- cs: /cs/
- de: /de/
- es: /es/
- fa: /fa/
- fr: /fr/
- he: /he/
- hy: /hy/
- id: /id/
- it: /it/
- ja: /ja/
- ko: /ko/
- nl: /nl/
- pl: /pl/
- pt: /pt/
- ru: /ru/
- sq: /sq/
- sv: /sv/
- ta: /ta/
- tr: /tr/
- uk: /uk/
- zh: /zh/
markdown_extensions:
- toc:
permalink: true
- markdown.extensions.codehilite:
guess_lang: false
- mdx_include:
base_path: docs
- admonition
- codehilite
- extra
- pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format ''
- pymdownx.tabbed:
alternate_style: true
- attr_list
- md_in_html
extra:
analytics:
provider: google
property: G-YNEVN69SC3
social:
- icon: fontawesome/brands/github-alt
link: https://github.com/tiangolo/fastapi
- icon: fontawesome/brands/discord
link: https://discord.gg/VQjSZaeJmf
- icon: fontawesome/brands/twitter
link: https://twitter.com/fastapi
- icon: fontawesome/brands/linkedin
link: https://www.linkedin.com/in/tiangolo
- icon: fontawesome/brands/dev
link: https://dev.to/tiangolo
- icon: fontawesome/brands/medium
link: https://medium.com/@tiangolo
- icon: fontawesome/solid/globe
link: https://tiangolo.com
alternate:
- link: /
name: en - English
- link: /az/
name: az
- link: /cs/
name: cs
- link: /de/
name: de
- link: /es/
name: es - español
- link: /fa/
name: fa
- link: /fr/
name: fr - français
- link: /he/
name: he
- link: /hy/
name: hy
- link: /id/
name: id
- link: /it/
name: it - italiano
- link: /ja/
name: ja - 日本語
- link: /ko/
name: ko - 한국어
- link: /nl/
name: nl
- link: /pl/
name: pl
- link: /pt/
name: pt - português
- link: /ru/
name: ru - русский язык
- link: /sq/
name: sq - shqip
- link: /sv/
name: sv - svenska
- link: /ta/
name: ta - தமிழ்
- link: /tr/
name: tr - Türkçe
- link: /uk/
name: uk - українська мова
- link: /zh/
name: zh - 汉语
extra_css:
- https://fastapi.tiangolo.com/css/termynal.css
- https://fastapi.tiangolo.com/css/custom.css
extra_javascript:
- https://fastapi.tiangolo.com/js/termynal.js
- https://fastapi.tiangolo.com/js/custom.js

503
docs/de/docs/_llm-test.md Normal file
View File

@ -0,0 +1,503 @@
# 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.
Hier hinzugefügte Tests werden von allen Erstellern sprachsspezifischer Prompts gesehen.
So verwenden:
* Einen sprachsspezifischen Prompt haben `docs/{language code}/llm-prompt.md`.
* Eine frische Übersetzung dieses Dokuments in die gewünschte Zielsprache durchführen (siehe z. B. das Kommando `translate-page` der `translate.py`). Dadurch wird die Übersetzung unter `docs/{language code}/docs/_llm-test.md` erstellt.
* Prüfen Sie, ob in der Übersetzung alles in Ordnung ist.
* Verbessern Sie bei Bedarf Ihren sprachsspezifischen Prompt, den allgemeinen Prompt oder das englische Dokument.
* Beheben Sie anschließend manuell die verbleibenden Probleme in der Übersetzung, sodass es eine gute Übersetzung ist.
* Übersetzen Sie erneut, nachdem die gute Übersetzung vorliegt. Das ideale Ergebnis wäre, dass das LLM an der Übersetzung keine Änderungen mehr vornimmt. Das bedeutet, dass der allgemeine Prompt und Ihr sprachsspezifischer Prompt so gut sind, wie sie sein können (Es wird manchmal ein paar scheinbar zufällige Änderungen machen, der Grund ist, dass [LLMs keine deterministischen Algorithmen sind](https://doublespeak.chat/#/handbook#deterministic-output)).
Die Tests:
## Codeschnipsel { #code-snippets }
//// tab | Test
Dies ist ein Codeschnipsel: `foo`. Und dies ist ein weiteres Codeschnipsel: `bar`. Und noch eins: `baz quux`.
////
//// tab | Info
Der Inhalt von Codeschnipseln sollte unverändert bleiben.
Siehe Abschnitt `### Content of code snippets` im allgemeinen Prompt in `scripts/translate.py`.
////
## Anführungszeichen { #quotes }
//// tab | Test
Gestern schrieb mein Freund: „Wenn man incorrectly korrekt schreibt, hat man es falsch geschrieben“. Worauf ich antwortete: „Korrekt, aber incorrectly ist inkorrekterweise nicht „incorrectly““.
/// note | Hinweis
Das LLM wird dies wahrscheinlich falsch übersetzen. Interessant ist nur, ob es die korrigierte Übersetzung bei einer erneuten Übersetzung beibehält.
///
////
//// tab | Info
Der Promptdesigner kann entscheiden, ob neutrale Anführungszeichen in typografische Anführungszeichen umgewandelt werden sollen. Es ist in Ordnung, sie unverändert zu lassen.
Siehe zum Beispiel den Abschnitt `### Quotes` in `docs/de/llm-prompt.md`.
////
## Anführungszeichen in Codeschnipseln { #quotes-in-code-snippets }
//// tab | Test
`pip install "foo[bar]"`
Beispiele für Stringliterale in Codeschnipseln: `"this"`, `'that'`.
Ein schwieriges Beispiel für Stringliterale in Codeschnipseln: `f"I like {'oranges' if orange else "apples"}"`
Hardcore: `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 | Info
... Allerdings müssen Anführungszeichen in Codeschnipseln unverändert bleiben.
////
## Codeblöcke { #code-blocks }
//// tab | Test
Ein Bash-Codebeispiel ...
```bash
# Eine Begrüßung an das Universum ausgeben
echo "Hello universe"
```
... und ein Konsolen-Codebeispiel ...
```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
```
... und noch ein Konsolen-Codebeispiel ...
```console
// Create a directory "Code"
$ mkdir code
// In dieses Verzeichnis wechseln
$ cd code
```
... und ein Python-Codebeispiel ...
```Python
wont_work() # Das wird nicht funktionieren 😱
works(foo="bar") # Das funktioniert 🎉
```
... und das war's.
////
//// tab | Info
Code in Codeblöcken sollte nicht verändert werden, mit Ausnahme von Kommentaren.
Siehe Abschnitt `### Content of code blocks` im allgemeinen Prompt in `scripts/translate.py`.
////
## Tabs und farbige Boxen { #tabs-and-colored-boxes }
//// tab | Test
/// info | Info
Etwas Text
///
/// note | Hinweis
Etwas Text
///
/// note | Technische Details
Etwas Text
///
/// check | Testen
Etwas Text
///
/// tip | Tipp
Etwas Text
///
/// warning | Achtung
Etwas Text
///
/// danger | Gefahr
Etwas Text
///
////
//// tab | Info
Tabs und `Info`/`Note`/`Warning`/usw. Blöcke sollten die Übersetzung ihres Titels nach einem vertikalen Strich (`|`) erhalten.
Siehe die Abschnitte `### Special blocks` und `### Tab blocks` im allgemeinen Prompt in `scripts/translate.py`.
////
## Web- und interne Links { #web-and-internal-links }
//// tab | Test
Der Linktext sollte übersetzt werden, die Linkadresse sollte unverändert bleiben:
* [Link zur Überschrift oben](#code-snippets)
* [Interner Link](index.md#installation)
* [Externer Link](https://sqlmodel.tiangolo.com/)
* [Link zu einem Stil](https://fastapi.tiangolo.com/css/styles.css)
* [Link zu einem Skript](https://fastapi.tiangolo.com/js/logic.js)
* [Link zu einem Bild](https://fastapi.tiangolo.com/img/foo.jpg)
Der Linktext sollte übersetzt werden, die Linkadresse sollte auf die Übersetzung zeigen:
* [FastAPI-Link](https://fastapi.tiangolo.com/de/)
////
//// tab | Info
Links sollten übersetzt werden, aber ihre Adresse soll unverändert bleiben. Eine Ausnahme sind absolute Links zu Seiten der FastAPI-Dokumentation. In diesem Fall sollte auf die Übersetzung verlinkt werden.
Siehe Abschnitt `### Links` im allgemeinen Prompt in `scripts/translate.py`.
////
## HTML-„abbr“-Elemente { #html-abbr-elements }
//// tab | Test
Hier einige Dinge, die in HTML-„abbr“-Elemente gepackt sind (einige sind erfunden):
### 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="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>.
////
//// tab | Info
„title“-Attribute von „abbr“-Elementen werden nach bestimmten Anweisungen übersetzt.
Übersetzungen können eigene „abbr“-Elemente hinzufügen, die das LLM nicht entfernen soll. Z. B. um englische Wörter zu erklären.
Siehe Abschnitt `### HTML abbr elements` im allgemeinen Prompt in `scripts/translate.py`.
////
## HTML „dfn“-Elemente { #html-dfn-elements }
* <dfn title="Eine Gruppe von Maschinen, die so konfiguriert sind, dass sie verbunden sind und in irgendeiner Weise zusammenarbeiten.">Cluster</dfn>
* <dfn title="Eine Methode des Machine Learning, die künstliche neuronale Netze mit zahlreichen versteckten Schichten zwischen Eingabe- und Ausgabeschicht verwendet und so eine umfassende interne Struktur entwickelt">Deep Learning</dfn>
## Überschriften { #headings }
//// tab | Test
### Eine Webapp entwickeln ein Tutorial { #develop-a-webapp-a-tutorial }
Hallo.
### Typhinweise und -annotationen { #type-hints-and-annotations }
Hallo wieder.
### Super- und Subklassen { #super-and-subclasses }
Hallo wieder.
////
//// tab | Info
Die einzige strenge Regel für Überschriften ist, dass das LLM den Hash-Teil in geschweiften Klammern unverändert lässt, damit Links nicht kaputtgehen.
Siehe Abschnitt `### Headings` im allgemeinen Prompt in `scripts/translate.py`.
Für einige sprachsspezifische Anweisungen, siehe z. B. den Abschnitt `### Headings` in `docs/de/llm-prompt.md`.
////
## In der Dokumentation verwendete Begriffe { #terms-used-in-the-docs }
//// tab | Test
* Sie
* Ihr
* z. B.
* usw.
* `foo` vom Typ `int`
* `bar` vom Typ `str`
* `baz` vom Typ `list`
* das Tutorial Benutzerhandbuch
* das Handbuch für fortgeschrittene Benutzer
* die SQLModel-Dokumentation
* die API-Dokumentation
* die automatische Dokumentation
* Data Science
* Deep Learning
* Machine Learning
* Dependency Injection
* HTTP Basic-Authentifizierung
* HTTP Digest
* ISO-Format
* der JSON-Schema-Standard
* das JSON-Schema
* die Schema-Definition
* Password Flow
* Mobile
* deprecatet
* designt
* ungültig
* on the fly
* Standard
* Default
* Groß-/Klein­schrei­bung ist relevant
* Groß-/Klein­schrei­bung ist nicht relevant
* die Anwendung bereitstellen
* die Seite ausliefern
* die App
* die Anwendung
* der Request
* die Response
* die Error-Response
* die Pfadoperation
* der Pfadoperation-Dekorator
* die Pfadoperation-Funktion
* der Body
* der Requestbody
* der Responsebody
* der JSON-Body
* der Formularbody
* der Dateibody
* der Funktionskörper
* der Parameter
* der Body-Parameter
* der Pfad-Parameter
* der Query-Parameter
* der Cookie-Parameter
* der Header-Parameter
* der Formular-Parameter
* der Funktionsparameter
* das Event
* das Startup-Event
* das Hochfahren des Servers
* das Shutdown-Event
* das Lifespan-Event
* der Handler
* der Eventhandler
* der Exceptionhandler
* handhaben
* das Modell
* das Pydantic-Modell
* das Datenmodell
* das Datenbankmodell
* das Formularmodell
* das Modellobjekt
* die Klasse
* die Basisklasse
* die Elternklasse
* die Subklasse
* die Kindklasse
* die Geschwisterklasse
* die Klassenmethode
* der Header
* die Header
* der Autorisierungsheader
* der `Authorization`-Header
* der Forwarded-Header
* das Dependency-Injection-System
* die Dependency
* das Dependable
* der Dependant
* I/O-lastig
* CPU-lastig
* Nebenläufigkeit
* Parallelität
* Multiprocessing
* die Umgebungsvariable
* die Umgebungsvariable
* der `PATH`
* die `PATH`-Umgebungsvariable
* die Authentifizierung
* der Authentifizierungsanbieter
* die Autorisierung
* das Anmeldeformular
* der Autorisierungsanbieter
* der Benutzer authentisiert sich
* das System authentifiziert den Benutzer
* Das CLI
* Das Kommandozeileninterface
* der Server
* der Client
* der Cloudanbieter
* der Clouddienst
* die Entwicklung
* die Entwicklungsphasen
* das Dict
* das Dictionary
* die Enumeration
* das Enum
* das Enum-Member
* der Encoder
* der Decoder
* kodieren
* dekodieren
* die Exception
* werfen
* der Ausdruck
* die Anweisung
* das Frontend
* das Backend
* die GitHub-Diskussion
* das GitHub-Issue
* die Leistung
* die Leistungsoptimierung
* der Rückgabetyp
* der Rückgabewert
* die Sicherheit
* das Sicherheitsschema
* der Task
* der Hintergrundtask
* die Taskfunktion
* das Template
* die Template-Engine
* die Typannotation
* der Typhinweis
* der Serverworker
* der Uvicorn-Worker
* der Gunicorn-Worker
* der Workerprozess
* die Workerklasse
* die Workload
* das Deployment
* deployen
* das SDK
* das Software Development Kit
* der `APIRouter`
* die `requirements.txt`
* das Bearer-Token
* der Breaking Change
* der Bug
* der Button
* das Callable
* der Code
* der Commit
* der Contextmanager
* die Coroutine
* die Datenbanksession
* die Festplatte
* die Domain
* die Engine
* das Fake-X
* die HTTP-GET-Methode
* das Item
* die Bibliothek
* der Lifespan
* der Lock
* die Middleware
* die Mobile-Anwendung
* das Modul
* das Mounten
* das Netzwerk
* das Origin
* Die Überschreibung
* die Payload
* der Prozessor
* die Property
* der Proxy
* der Pull Request
* die Query
* der RAM
* der entfernte Rechner
* der Statuscode
* der String
* der Tag
* das Webframework
* die Wildcard
* zurückgeben
* validieren
////
//// tab | Info
Dies ist eine nicht vollständige und nicht normative Liste von (meist) technischen Begriffen, die in der Dokumentation vorkommen. Sie kann dem Promptdesigner helfen herauszufinden, bei welchen Begriffen das LLM Unterstützung braucht. Zum Beispiel, wenn es eine gute Übersetzung immer wieder auf eine suboptimale Übersetzung zurücksetzt. Oder wenn es Probleme hat, einen Begriff in Ihrer Sprache zu konjugieren/deklinieren.
Siehe z. B. den Abschnitt `### List of English terms and their preferred German translations` in `docs/de/llm-prompt.md`.
////

View File

@ -0,0 +1,3 @@
# Über { #about }
Über FastAPI, sein Design, seine Inspiration und mehr. 🤓

View File

@ -0,0 +1,247 @@
# Zusätzliche Responses in OpenAPI { #additional-responses-in-openapi }
/// warning | Achtung
Dies ist ein eher fortgeschrittenes Thema.
Wenn Sie mit **FastAPI** beginnen, benötigen Sie dies möglicherweise nicht.
///
Sie können zusätzliche <abbr title="Response Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Responses</abbr> mit zusätzlichen Statuscodes, Medientypen, Beschreibungen, usw. deklarieren.
Diese zusätzlichen Responses werden in das OpenAPI-Schema aufgenommen, sodass sie auch in der API-Dokumentation erscheinen.
Für diese zusätzlichen Responses müssen Sie jedoch sicherstellen, dass Sie eine `Response`, wie etwa `JSONResponse`, direkt zurückgeben, mit Ihrem Statuscode und Inhalt.
## Zusätzliche Response mit `model` { #additional-response-with-model }
Sie können Ihren *Pfadoperation-Dekoratoren* einen Parameter `responses` übergeben.
Der nimmt ein <abbr title="Dictionary Zuordnungstabelle: In anderen Sprachen auch Hash, Map, Objekt, Assoziatives Array genannt">`dict`</abbr> entgegen, die Schlüssel sind Statuscodes für jede Response, wie etwa `200`, und die Werte sind andere `dict`s mit den Informationen für jede Response.
Jedes dieser Response-`dict`s kann einen Schlüssel `model` haben, welcher ein Pydantic-Modell enthält, genau wie `response_model`.
**FastAPI** nimmt dieses Modell, generiert dessen JSON-Schema und fügt es an der richtigen Stelle in OpenAPI ein.
Um beispielsweise eine weitere Response mit dem Statuscode `404` und einem Pydantic-Modell `Message` zu deklarieren, können Sie schreiben:
{* ../../docs_src/additional_responses/tutorial001_py310.py hl[18,22] *}
/// note | Hinweis
Beachten Sie, dass Sie die `JSONResponse` direkt zurückgeben müssen.
///
/// info | Info
Der `model`-Schlüssel ist nicht Teil von OpenAPI.
**FastAPI** nimmt das Pydantic-Modell von dort, generiert das JSON-Schema und fügt es an der richtigen Stelle ein.
Die richtige Stelle ist:
* Im Schlüssel `content`, der als Wert ein weiteres JSON-Objekt (`dict`) hat, welches Folgendes enthält:
* Ein Schlüssel mit dem Medientyp, z. B. `application/json`, der als Wert ein weiteres JSON-Objekt hat, welches Folgendes enthält:
* Ein Schlüssel `schema`, der als Wert das JSON-Schema aus dem Modell hat, hier ist die richtige Stelle.
* **FastAPI** fügt hier eine Referenz auf die globalen JSON-Schemas an einer anderen Stelle in Ihrer OpenAPI hinzu, anstatt es direkt einzubinden. Auf diese Weise können andere Anwendungen und Clients diese JSON-Schemas direkt verwenden, bessere Tools zur Codegenerierung bereitstellen, usw.
///
Die generierten Responses in der OpenAPI für diese *Pfadoperation* lauten:
```JSON hl_lines="3-12"
{
"responses": {
"404": {
"description": "Additional Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Message"
}
}
}
},
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Item"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
```
Die Schemas werden von einer anderen Stelle innerhalb des OpenAPI-Schemas referenziert:
```JSON hl_lines="4-16"
{
"components": {
"schemas": {
"Message": {
"title": "Message",
"required": [
"message"
],
"type": "object",
"properties": {
"message": {
"title": "Message",
"type": "string"
}
}
},
"Item": {
"title": "Item",
"required": [
"id",
"value"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"value": {
"title": "Value",
"type": "string"
}
}
},
"ValidationError": {
"title": "ValidationError",
"required": [
"loc",
"msg",
"type"
],
"type": "object",
"properties": {
"loc": {
"title": "Location",
"type": "array",
"items": {
"type": "string"
}
},
"msg": {
"title": "Message",
"type": "string"
},
"type": {
"title": "Error Type",
"type": "string"
}
}
},
"HTTPValidationError": {
"title": "HTTPValidationError",
"type": "object",
"properties": {
"detail": {
"title": "Detail",
"type": "array",
"items": {
"$ref": "#/components/schemas/ValidationError"
}
}
}
}
}
}
}
```
## Zusätzliche Medientypen für die Haupt-Response { #additional-media-types-for-the-main-response }
Sie können denselben `responses`-Parameter verwenden, um verschiedene Medientypen für dieselbe Haupt-Response hinzuzufügen.
Sie können beispielsweise einen zusätzlichen Medientyp `image/png` hinzufügen und damit deklarieren, dass Ihre *Pfadoperation* ein JSON-Objekt (mit dem Medientyp `application/json`) oder ein PNG-Bild zurückgeben kann:
{* ../../docs_src/additional_responses/tutorial002_py310.py hl[17:22,26] *}
/// note | Hinweis
Beachten Sie, dass Sie das Bild direkt mit einer `FileResponse` zurückgeben müssen.
///
/// info | Info
Sofern Sie in Ihrem Parameter `responses` nicht explizit einen anderen Medientyp angeben, geht FastAPI davon aus, dass die Response denselben Medientyp wie die Haupt-Response-Klasse hat (Standardmäßig `application/json`).
Wenn Sie jedoch eine benutzerdefinierte Response-Klasse mit `None` als Medientyp angegeben haben, verwendet FastAPI `application/json` für jede zusätzliche Response, die über ein zugehöriges Modell verfügt.
///
## Informationen kombinieren { #combining-information }
Sie können auch Response-Informationen von mehreren Stellen kombinieren, einschließlich der Parameter `response_model`, `status_code` und `responses`.
Sie können ein `response_model` deklarieren, indem Sie den Standardstatuscode `200` (oder bei Bedarf einen benutzerdefinierten) verwenden und dann zusätzliche Informationen für dieselbe Response in `responses` direkt im OpenAPI-Schema deklarieren.
**FastAPI** behält die zusätzlichen Informationen aus `responses` und kombiniert sie mit dem JSON-Schema aus Ihrem Modell.
Sie können beispielsweise eine Response mit dem Statuscode `404` deklarieren, die ein Pydantic-Modell verwendet und über eine benutzerdefinierte Beschreibung (`description`) verfügt.
Und eine Response mit dem Statuscode `200`, die Ihr `response_model` verwendet, aber ein benutzerdefiniertes Beispiel (`example`) enthält:
{* ../../docs_src/additional_responses/tutorial003_py310.py hl[20:31] *}
Es wird alles kombiniert und in Ihre OpenAPI eingebunden und in der API-Dokumentation angezeigt:
<img src="/img/tutorial/additional-responses/image01.png">
## Vordefinierte und benutzerdefinierte Responses kombinieren { #combine-predefined-responses-and-custom-ones }
Möglicherweise möchten Sie einige vordefinierte Responses haben, die für viele *Pfadoperationen* gelten, Sie möchten diese jedoch mit benutzerdefinierten Responses kombinieren, die für jede *Pfadoperation* erforderlich sind.
In diesen Fällen können Sie die Python-Technik zum „Entpacken“ eines `dict`s mit `**dict_to_unpack` verwenden:
```Python
old_dict = {
"old key": "old value",
"second old key": "second old value",
}
new_dict = {**old_dict, "new key": "new value"}
```
Hier wird `new_dict` alle Schlüssel-Wert-Paare von `old_dict` plus das neue Schlüssel-Wert-Paar enthalten:
```Python
{
"old key": "old value",
"second old key": "second old value",
"new key": "new value",
}
```
Mit dieser Technik können Sie einige vordefinierte Responses in Ihren *Pfadoperationen* wiederverwenden und sie mit zusätzlichen benutzerdefinierten Responses kombinieren.
Zum Beispiel:
{* ../../docs_src/additional_responses/tutorial004_py310.py hl[11:15,24] *}
## Weitere Informationen zu OpenAPI-Responses { #more-information-about-openapi-responses }
Um zu sehen, was genau Sie in die Responses aufnehmen können, können Sie die folgenden Abschnitte in der OpenAPI-Spezifikation überprüfen:
* [OpenAPI Responses Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#responses-object), enthält das `Response Object`.
* [OpenAPI Response Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#response-object), Sie können alles davon direkt in jede Response innerhalb Ihres `responses`-Parameter einfügen. Einschließlich `description`, `headers`, `content` (darin deklarieren Sie verschiedene Medientypen und JSON-Schemas) und `links`.

View File

@ -0,0 +1,41 @@
# Zusätzliche Statuscodes { #additional-status-codes }
Standardmäßig liefert **FastAPI** die <abbr title="Response Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Responses</abbr> als `JSONResponse` zurück und fügt den Inhalt, den Sie aus Ihrer *Pfadoperation* zurückgeben, in diese `JSONResponse` ein.
Es wird der Default-Statuscode oder derjenige verwendet, den Sie in Ihrer *Pfadoperation* festgelegt haben.
## Zusätzliche Statuscodes { #additional-status-codes_1 }
Wenn Sie neben dem Hauptstatuscode weitere Statuscodes zurückgeben möchten, können Sie dies tun, indem Sie direkt eine `Response` zurückgeben, wie etwa eine `JSONResponse`, und den zusätzlichen Statuscode direkt festlegen.
Angenommen, Sie möchten eine *Pfadoperation* haben, die das Aktualisieren von Artikeln ermöglicht und bei Erfolg den HTTP-Statuscode 200 „OK“ zurückgibt.
Sie möchten aber auch, dass sie neue Artikel akzeptiert. Und wenn die Artikel vorher nicht vorhanden waren, werden diese Artikel erstellt und der HTTP-Statuscode 201 „Created“ zurückgegeben.
Um dies zu erreichen, importieren Sie `JSONResponse`, und geben Sie Ihren Inhalt direkt zurück, indem Sie den gewünschten `status_code` setzen:
{* ../../docs_src/additional_status_codes/tutorial001_an_py310.py hl[4,25] *}
/// warning | Achtung
Wenn Sie eine `Response` direkt zurückgeben, wie im obigen Beispiel, wird sie direkt zurückgegeben.
Sie wird nicht mit einem Modell usw. serialisiert.
Stellen Sie sicher, dass sie die gewünschten Daten enthält und dass die Werte gültiges JSON sind (wenn Sie `JSONResponse` verwenden).
///
/// note | Technische Details
Sie können auch `from starlette.responses import JSONResponse` verwenden.
**FastAPI** bietet dieselben `starlette.responses` auch via `fastapi.responses` an, als Annehmlichkeit für Sie, den Entwickler. Die meisten verfügbaren Responses kommen aber direkt von Starlette. Dasselbe gilt für `status`.
///
## OpenAPI- und API-Dokumentation { #openapi-and-api-docs }
Wenn Sie zusätzliche Statuscodes und Responses direkt zurückgeben, werden diese nicht in das OpenAPI-Schema (die API-Dokumentation) aufgenommen, da FastAPI keine Möglichkeit hat, im Voraus zu wissen, was Sie zurückgeben werden.
Sie können das jedoch in Ihrem Code dokumentieren, indem Sie Folgendes verwenden: [Zusätzliche Responses](additional-responses.md).

View File

@ -0,0 +1,163 @@
# Fortgeschrittene Abhängigkeiten { #advanced-dependencies }
## Parametrisierte Abhängigkeiten { #parameterized-dependencies }
Alle Abhängigkeiten, die wir bisher gesehen haben, waren festgelegte Funktionen oder Klassen.
Es kann jedoch Fälle geben, in denen Sie Parameter für eine Abhängigkeit festlegen möchten, ohne viele verschiedene Funktionen oder Klassen zu deklarieren.
Stellen wir uns vor, wir möchten eine Abhängigkeit haben, die prüft, ob ein Query-Parameter `q` einen vordefinierten Inhalt hat.
Aber wir wollen diesen vordefinierten Inhalt per Parameter festlegen können.
## Eine „aufrufbare“ Instanz { #a-callable-instance }
In Python gibt es eine Möglichkeit, eine Instanz einer Klasse <abbr title="Englisch „callable“">„aufrufbar“</abbr> zu machen.
Nicht die Klasse selbst (die bereits aufrufbar ist), sondern eine Instanz dieser Klasse.
Dazu deklarieren wir eine Methode `__call__`:
{* ../../docs_src/dependencies/tutorial011_an_py310.py hl[12] *}
In diesem Fall ist dieses `__call__` das, was **FastAPI** verwendet, um nach zusätzlichen Parametern und Unterabhängigkeiten zu suchen, und das ist es auch, was später aufgerufen wird, um einen Wert an den Parameter in Ihrer *Pfadoperation-Funktion* zu übergeben.
## Die Instanz parametrisieren { #parameterize-the-instance }
Und jetzt können wir `__init__` verwenden, um die Parameter der Instanz zu deklarieren, die wir zum „Parametrisieren“ der Abhängigkeit verwenden können:
{* ../../docs_src/dependencies/tutorial011_an_py310.py hl[9] *}
In diesem Fall wird **FastAPI** `__init__` nie berühren oder sich darum kümmern, wir werden es direkt in unserem Code verwenden.
## Eine Instanz erstellen { #create-an-instance }
Wir könnten eine Instanz dieser Klasse erstellen mit:
{* ../../docs_src/dependencies/tutorial011_an_py310.py hl[18] *}
Und auf diese Weise können wir unsere Abhängigkeit „parametrisieren“, die jetzt `"bar"` enthält, als das Attribut `checker.fixed_content`.
## Die Instanz als Abhängigkeit verwenden { #use-the-instance-as-a-dependency }
Dann könnten wir diesen `checker` in einem `Depends(checker)` anstelle von `Depends(FixedContentQueryChecker)` verwenden, da die Abhängigkeit die Instanz `checker` und nicht die Klasse selbst ist.
Und beim Auflösen der Abhängigkeit ruft **FastAPI** diesen `checker` wie folgt auf:
```Python
checker(q="somequery")
```
... und übergibt, was immer das als Wert dieser Abhängigkeit in unserer *Pfadoperation-Funktion* zurückgibt, als den Parameter `fixed_content_included`:
{* ../../docs_src/dependencies/tutorial011_an_py310.py hl[22] *}
/// tip | Tipp
Das alles mag gekünstelt wirken. Und es ist möglicherweise noch nicht ganz klar, welchen Nutzen das hat.
Diese Beispiele sind bewusst einfach gehalten, zeigen aber, wie alles funktioniert.
In den Kapiteln zum Thema Sicherheit gibt es Hilfsfunktionen, die auf die gleiche Weise implementiert werden.
Wenn Sie das hier alles verstanden haben, wissen Sie bereits, wie diese Sicherheits-Hilfswerkzeuge unter der Haube funktionieren.
///
## Abhängigkeiten mit `yield`, `HTTPException`, `except` und Hintergrundtasks { #dependencies-with-yield-httpexception-except-and-background-tasks }
/// warning | Achtung
Sie benötigen diese technischen Details höchstwahrscheinlich nicht.
Diese Details sind hauptsächlich nützlich, wenn Sie eine FastAPI-Anwendung haben, die älter als 0.121.0 ist, und Sie auf Probleme mit Abhängigkeiten mit `yield` stoßen.
///
Abhängigkeiten mit `yield` haben sich im Laufe der Zeit weiterentwickelt, um verschiedene Anwendungsfälle abzudecken und einige Probleme zu beheben, hier ist eine Zusammenfassung der Änderungen.
### Abhängigkeiten mit `yield` und `scope` { #dependencies-with-yield-and-scope }
In Version 0.121.0 hat FastAPI Unterstützung für `Depends(scope="function")` für Abhängigkeiten mit `yield` hinzugefügt.
Mit `Depends(scope="function")` wird der Exit-Code nach `yield` direkt nach dem Ende der *Pfadoperation-Funktion* ausgeführt, bevor die Response an den Client gesendet wird.
Und bei Verwendung von `Depends(scope="request")` (dem Default) wird der Exit-Code nach `yield` ausgeführt, nachdem die Response gesendet wurde.
Mehr dazu finden Sie in der Dokumentation zu [Abhängigkeiten mit `yield` Frühes Beenden und `scope`](../tutorial/dependencies/dependencies-with-yield.md#early-exit-and-scope).
### Abhängigkeiten mit `yield` und `StreamingResponse`, Technische Details { #dependencies-with-yield-and-streamingresponse-technical-details }
Vor FastAPI 0.118.0 wurde bei Verwendung einer Abhängigkeit mit `yield` der Exit-Code nach der *Pfadoperation-Funktion* ausgeführt, aber unmittelbar bevor die Response gesendet wurde.
Die Absicht war, Ressourcen nicht länger als nötig zu halten, während darauf gewartet wird, dass die Response durchs Netzwerk reist.
Diese Änderung bedeutete auch, dass bei Rückgabe einer `StreamingResponse` der Exit-Code der Abhängigkeit mit `yield` bereits ausgeführt worden wäre.
Wenn Sie beispielsweise eine Datenbanksession in einer Abhängigkeit mit `yield` hatten, konnte die `StreamingResponse` diese Session während des Streamens von Daten nicht verwenden, weil die Session im Exit-Code nach `yield` bereits geschlossen worden wäre.
Dieses Verhalten wurde in 0.118.0 zurückgenommen, sodass der Exit-Code nach `yield` ausgeführt wird, nachdem die Response gesendet wurde.
/// info | Info
Wie Sie unten sehen werden, ähnelt dies sehr dem Verhalten vor Version 0.106.0, jedoch mit mehreren Verbesserungen und Bugfixes für Sonderfälle.
///
#### Anwendungsfälle mit frühem Exit-Code { #use-cases-with-early-exit-code }
Es gibt einige Anwendungsfälle mit spezifischen Bedingungen, die vom alten Verhalten profitieren könnten, den Exit-Code von Abhängigkeiten mit `yield` vor dem Senden der Response auszuführen.
Stellen Sie sich zum Beispiel vor, Sie haben Code, der in einer Abhängigkeit mit `yield` eine Datenbanksession verwendet, nur um einen Benutzer zu verifizieren, die Datenbanksession wird aber in der *Pfadoperation-Funktion* nie wieder verwendet, sondern nur in der Abhängigkeit, und die Response benötigt lange, um gesendet zu werden, wie eine `StreamingResponse`, die Daten langsam sendet, aus irgendeinem Grund aber die Datenbank nicht verwendet.
In diesem Fall würde die Datenbanksession gehalten, bis das Senden der Response abgeschlossen ist, aber wenn Sie sie nicht verwenden, wäre es nicht notwendig, sie zu halten.
So könnte es aussehen:
{* ../../docs_src/dependencies/tutorial013_an_py310.py *}
Der Exit-Code, das automatische Schließen der `Session` in:
{* ../../docs_src/dependencies/tutorial013_an_py310.py ln[19:21] *}
... würde ausgeführt, nachdem die Response das langsame Senden der Daten beendet:
{* ../../docs_src/dependencies/tutorial013_an_py310.py ln[30:38] hl[31:33] *}
Da `generate_stream()` die Datenbanksession jedoch nicht verwendet, ist es nicht wirklich notwendig, die Session während des Sendens der Response offen zu halten.
Wenn Sie diesen spezifischen Anwendungsfall mit SQLModel (oder SQLAlchemy) haben, könnten Sie die Session explizit schließen, nachdem Sie sie nicht mehr benötigen:
{* ../../docs_src/dependencies/tutorial014_an_py310.py ln[24:28] hl[28] *}
Auf diese Weise würde die Session die Datenbankverbindung freigeben, sodass andere Requests sie verwenden könnten.
Wenn Sie einen anderen Anwendungsfall haben, der ein frühes Beenden aus einer Abhängigkeit mit `yield` benötigt, erstellen Sie bitte eine [GitHub-Diskussion-Frage](https://github.com/fastapi/fastapi/discussions/new?category=questions) mit Ihrem spezifischen Anwendungsfall und warum Sie von einem frühen Schließen für Abhängigkeiten mit `yield` profitieren würden.
Wenn es überzeugende Anwendungsfälle für ein frühes Schließen bei Abhängigkeiten mit `yield` gibt, würde ich erwägen, eine neue Möglichkeit hinzuzufügen, um ein frühes Schließen optional zu aktivieren.
### Abhängigkeiten mit `yield` und `except`, Technische Details { #dependencies-with-yield-and-except-technical-details }
Vor FastAPI 0.110.0 war es so, dass wenn Sie eine Abhängigkeit mit `yield` verwendet und dann in dieser Abhängigkeit mit `except` eine Exception abgefangen haben und die Exception nicht erneut geworfen haben, die Exception automatisch an beliebige Exceptionhandler oder den Handler für interne Serverfehler weitergereicht/weitergeworfen wurde.
Dies wurde in Version 0.110.0 geändert, um unbehandelten Speicherverbrauch durch weitergeleitete Exceptions ohne Handler (interne Serverfehler) zu beheben und um es mit dem Verhalten von normalem Python-Code konsistent zu machen.
### Hintergrundtasks und Abhängigkeiten mit `yield`, Technische Details { #background-tasks-and-dependencies-with-yield-technical-details }
Vor FastAPI 0.106.0 war das Werfen von Exceptions nach `yield` nicht möglich, der Exit-Code in Abhängigkeiten mit `yield` wurde ausgeführt, nachdem die Response gesendet wurde, sodass [Exceptionhandler](../tutorial/handling-errors.md#install-custom-exception-handlers) bereits ausgeführt worden wären.
Dies war so designt, hauptsächlich um die Verwendung derselben von Abhängigkeiten „geyieldeten“ Objekte in Hintergrundtasks zu ermöglichen, da der Exit-Code erst ausgeführt wurde, nachdem die Hintergrundtasks abgeschlossen waren.
Dies wurde in FastAPI 0.106.0 geändert mit der Absicht, keine Ressourcen zu halten, während darauf gewartet wird, dass die Response durchs Netzwerk reist.
/// tip | Tipp
Zusätzlich ist ein Hintergrundtask normalerweise ein unabhängiger Logikblock, der separat gehandhabt werden sollte, mit eigenen Ressourcen (z. B. eigener Datenbankverbindung).
So haben Sie wahrscheinlich saubereren Code.
///
Wenn Sie sich bisher auf dieses Verhalten verlassen haben, sollten Sie jetzt die Ressourcen für Hintergrundtasks innerhalb des Hintergrundtasks selbst erstellen und intern nur Daten verwenden, die nicht von den Ressourcen von Abhängigkeiten mit `yield` abhängen.
Anstatt beispielsweise dieselbe Datenbanksession zu verwenden, würden Sie innerhalb des Hintergrundtasks eine neue Datenbanksession erstellen und die Objekte aus der Datenbank mithilfe dieser neuen Session beziehen. Und anstatt das Objekt aus der Datenbank als Parameter an die Hintergrundtask-Funktion zu übergeben, würden Sie die ID dieses Objekts übergeben und das Objekt dann innerhalb der Hintergrundtask-Funktion erneut beziehen.

View File

@ -0,0 +1,61 @@
# Fortgeschrittene Python-Typen { #advanced-python-types }
Hier sind einige zusätzliche Ideen, die beim Arbeiten mit Python-Typen nützlich sein könnten.
## `Union` oder `Optional` verwenden { #using-union-or-optional }
Wenn Ihr Code aus irgendeinem Grund nicht `|` verwenden kann, z. B. wenn es nicht in einer Typannotation ist, sondern in etwas wie `response_model=`, können Sie anstelle des senkrechten Strichs (`|`) `Union` aus `typing` verwenden.
Zum Beispiel könnten Sie deklarieren, dass etwas ein `str` oder `None` sein könnte:
```python
from typing import Union
def say_hi(name: Union[str, None]):
print(f"Hi {name}!")
```
`typing` hat außerdem eine Abkürzung, um zu deklarieren, dass etwas `None` sein könnte, mit `Optional`.
Hier ist ein Tipp aus meiner sehr **subjektiven** Perspektive:
* 🚨 Vermeiden Sie die Verwendung von `Optional[SomeType]`
* Verwenden Sie stattdessen ✨ **`Union[SomeType, None]`** ✨.
Beides ist äquivalent und unter der Haube identisch, aber ich würde `Union` statt `Optional` empfehlen, weil das Wort „**optional**“ implizieren könnte, dass der Wert optional ist; tatsächlich bedeutet es jedoch „es kann `None` sein“, selbst wenn es nicht optional ist und weiterhin erforderlich bleibt.
Ich finde, `Union[SomeType, None]` ist expliziter in dem, was es bedeutet.
Es geht nur um Wörter und Namen. Aber diese Wörter können beeinflussen, wie Sie und Ihr Team über den Code denken.
Als Beispiel nehmen wir diese Funktion:
```python
from typing import Optional
def say_hi(name: Optional[str]):
print(f"Hey {name}!")
```
Der Parameter `name` ist als `Optional[str]` definiert, aber er ist **nicht optional**, Sie können die Funktion nicht ohne den Parameter aufrufen:
```Python
say_hi() # Oh nein, das löst einen Fehler aus! 😱
```
Der Parameter `name` ist **weiterhin erforderlich** (nicht *optional*), weil er keinen Defaultwert hat. Dennoch akzeptiert `name` den Wert `None`:
```Python
say_hi(name=None) # Das funktioniert, None ist gültig 🎉
```
Die gute Nachricht ist: In den meisten Fällen können Sie einfach `|` verwenden, um Unions von Typen zu definieren:
```python
def say_hi(name: str | None):
print(f"Hey {name}!")
```
Sie müssen sich also normalerweise keine Gedanken über Namen wie `Optional` und `Union` machen. 😎

View File

@ -0,0 +1,99 @@
# Asynchrone Tests { #async-tests }
Sie haben bereits gesehen, wie Sie Ihre **FastAPI**-Anwendungen mit dem bereitgestellten `TestClient` testen. Bisher haben Sie nur gesehen, wie man synchrone Tests schreibt, ohne `async`-Funktionen zu verwenden.
Die Möglichkeit, in Ihren Tests asynchrone Funktionen zu verwenden, könnte beispielsweise nützlich sein, wenn Sie Ihre Datenbank asynchron abfragen. Stellen Sie sich vor, Sie möchten das Senden von <abbr title="Request Anfrage: Daten, die der Client zum Server sendet">Requests</abbr> an Ihre FastAPI-Anwendung testen und dann überprüfen, ob Ihr Backend die richtigen Daten erfolgreich in die Datenbank geschrieben hat, während Sie eine asynchrone Datenbankbibliothek verwenden.
Schauen wir uns an, wie wir das machen können.
## pytest.mark.anyio { #pytest-mark-anyio }
Wenn wir in unseren Tests asynchrone Funktionen aufrufen möchten, müssen unsere Testfunktionen asynchron sein. AnyIO stellt hierfür ein nettes Plugin zur Verfügung, mit dem wir festlegen können, dass einige Testfunktionen asynchron aufgerufen werden sollen.
## HTTPX { #httpx }
Auch wenn Ihre **FastAPI**-Anwendung normale `def`-Funktionen anstelle von `async def` verwendet, handelt es sich darunter immer noch um eine `async`-Anwendung.
Der `TestClient` betreibt unter der Haube etwas Magie, um die asynchrone FastAPI-Anwendung in Ihren normalen `def`-Testfunktionen, mithilfe von Standard-Pytest aufzurufen. Aber diese Magie funktioniert nicht mehr, wenn wir sie in asynchronen Funktionen verwenden. Durch die asynchrone Ausführung unserer Tests können wir den `TestClient` nicht mehr in unseren Testfunktionen verwenden.
Der `TestClient` basiert auf [HTTPX](https://www.python-httpx.org) und glücklicherweise können wir es direkt verwenden, um die API zu testen.
## Beispiel { #example }
Betrachten wir als einfaches Beispiel eine Dateistruktur ähnlich der in [Größere Anwendungen](../tutorial/bigger-applications.md) und [Testen](../tutorial/testing.md):
```
.
├── app
│   ├── __init__.py
│   ├── main.py
│   └── test_main.py
```
Die Datei `main.py` hätte als Inhalt:
{* ../../docs_src/async_tests/app_a_py310/main.py *}
Die Datei `test_main.py` hätte die Tests für `main.py`, das könnte jetzt so aussehen:
{* ../../docs_src/async_tests/app_a_py310/test_main.py *}
## Es ausführen { #run-it }
Sie können Ihre Tests wie gewohnt ausführen mit:
<div class="termy">
```console
$ pytest
---> 100%
```
</div>
## Im Detail { #in-detail }
Der Marker `@pytest.mark.anyio` teilt pytest mit, dass diese Testfunktion asynchron aufgerufen werden soll:
{* ../../docs_src/async_tests/app_a_py310/test_main.py hl[7] *}
/// tip | Tipp
Beachten Sie, dass die Testfunktion jetzt `async def` ist und nicht nur `def` wie zuvor, wenn Sie den `TestClient` verwenden.
///
Dann können wir einen `AsyncClient` mit der App erstellen und mit `await` asynchrone Requests an ihn senden.
{* ../../docs_src/async_tests/app_a_py310/test_main.py hl[9:12] *}
Das ist das Äquivalent zu:
```Python
response = client.get('/')
```
... welches wir verwendet haben, um unsere Requests mit dem `TestClient` zu machen.
/// tip | Tipp
Beachten Sie, dass wir async/await mit dem neuen `AsyncClient` verwenden der Request ist asynchron.
///
/// warning | Achtung
Falls Ihre Anwendung auf Lifespan-Events angewiesen ist, der `AsyncClient` löst diese Events nicht aus. Um sicherzustellen, dass sie ausgelöst werden, verwenden Sie `LifespanManager` von [florimondmanca/asgi-lifespan](https://github.com/florimondmanca/asgi-lifespan#usage).
///
## Andere asynchrone Funktionsaufrufe { #other-asynchronous-function-calls }
Da die Testfunktion jetzt asynchron ist, können Sie in Ihren Tests neben dem Senden von Requests an Ihre FastAPI-Anwendung jetzt auch andere `async`-Funktionen aufrufen (und `await`en), genau so, wie Sie diese an anderer Stelle in Ihrem Code aufrufen würden.
/// tip | Tipp
Wenn Sie einen `RuntimeError: Task attached to a different loop` erhalten, wenn Sie asynchrone Funktionsaufrufe in Ihre Tests integrieren (z. B. bei Verwendung von [MongoDBs MotorClient](https://stackoverflow.com/questions/41584243/runtimeerror-task-attached-to-a-different-loop)), dann denken Sie daran, Objekte zu instanziieren, die einen Event Loop nur innerhalb asynchroner Funktionen benötigen, z. B. einen `@app.on_event("startup")`-Callback.
///

View File

@ -0,0 +1,466 @@
# Hinter einem Proxy { #behind-a-proxy }
In vielen Situationen würden Sie einen **Proxy** wie Traefik oder Nginx vor Ihrer FastAPI-App verwenden.
Diese Proxys könnten HTTPS-Zertifikate und andere Dinge handhaben.
## Proxy-<abbr title="weitergeleitete Header">Forwarded-Header</abbr> { #proxy-forwarded-headers }
Ein **Proxy** vor Ihrer Anwendung würde normalerweise einige Header on-the-fly setzen, bevor er die Requests an den **Server** sendet, um den Server wissen zu lassen, dass der Request vom Proxy **weitergeleitet** wurde, einschließlich der ursprünglichen (öffentlichen) URL, inklusive der Domain, dass HTTPS verwendet wird, usw.
Das **Server**-Programm (z. B. **Uvicorn** via **FastAPI CLI**) ist in der Lage, diese Header zu interpretieren und diese Information dann an Ihre Anwendung weiterzugeben.
Aber aus Sicherheitsgründen, da der Server nicht weiß, dass er hinter einem vertrauenswürdigen Proxy läuft, wird er diese Header nicht interpretieren.
/// note | Technische Details
Die Proxy-Header sind:
* [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Forwarded-For)
* [X-Forwarded-Proto](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Forwarded-Proto)
* [X-Forwarded-Host](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Forwarded-Host)
///
### Proxy-Forwarded-Header aktivieren { #enable-proxy-forwarded-headers }
Sie können FastAPI CLI mit der *CLI-Option* `--forwarded-allow-ips` starten und die IP-Adressen übergeben, denen vertraut werden soll, um diese Forwarded-Header zu lesen.
Wenn Sie es auf `--forwarded-allow-ips="*"` setzen, würde es allen eingehenden IPs vertrauen.
Wenn Ihr **Server** hinter einem vertrauenswürdigen **Proxy** sitzt und nur der Proxy mit ihm spricht, würde dies dazu führen, dass er die IP dieses **Proxys** akzeptiert, was auch immer sie ist.
<div class="termy">
```console
$ fastapi run --forwarded-allow-ips="*"
<span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
```
</div>
### Weiterleitungen mit HTTPS { #redirects-with-https }
Angenommen, Sie definieren eine *Pfadoperation* `/items/`:
{* ../../docs_src/behind_a_proxy/tutorial001_01_py310.py hl[6] *}
Wenn der Client versucht, zu `/items` zu gehen, würde er standardmäßig zu `/items/` umgeleitet.
Aber bevor Sie die *CLI-Option* `--forwarded-allow-ips` setzen, könnte er zu `http://localhost:8000/items/` umleiten.
Aber möglicherweise wird Ihre Anwendung unter `https://mysuperapp.com` gehostet, und die Weiterleitung sollte zu `https://mysuperapp.com/items/` erfolgen.
Durch Setzen von `--proxy-headers` kann FastAPI jetzt an den richtigen Ort umleiten. 😎
```
https://mysuperapp.com/items/
```
/// tip | Tipp
Wenn Sie mehr über HTTPS erfahren möchten, lesen Sie den Leitfaden [Über HTTPS](../deployment/https.md).
///
### Wie Proxy-Forwarded-Header funktionieren { #how-proxy-forwarded-headers-work }
Hier ist eine visuelle Darstellung, wie der **Proxy** weitergeleitete Header zwischen dem Client und dem **Anwendungsserver** hinzufügt:
```mermaid
sequenceDiagram
participant Client
participant Proxy as Proxy/Loadbalancer
participant Server as FastAPI Server
Client->>Proxy: HTTPS-Request<br/>Host: mysuperapp.com<br/>Pfad: /items
Note over Proxy: Proxy fügt Forwarded-Header hinzu
Proxy->>Server: HTTP-Request<br/>X-Forwarded-For: [client IP]<br/>X-Forwarded-Proto: https<br/>X-Forwarded-Host: mysuperapp.com<br/>Pfad: /items
Note over Server: Server interpretiert die Header<br/>(wenn --forwarded-allow-ips gesetzt ist)
Server->>Proxy: HTTP-Response<br/>mit correkten HTTPS-URLs
Proxy->>Client: HTTPS-Response
```
Der **Proxy** fängt den ursprünglichen Client-Request ab und fügt die speziellen *Forwarded*-Header (`X-Forwarded-*`) hinzu, bevor er den Request an den **Anwendungsserver** weitergibt.
Diese Header bewahren Informationen über den ursprünglichen Request, die sonst verloren gingen:
* **X-Forwarded-For**: Die ursprüngliche IP-Adresse des Clients
* **X-Forwarded-Proto**: Das ursprüngliche Protokoll (`https`)
* **X-Forwarded-Host**: Der ursprüngliche Host (`mysuperapp.com`)
Wenn **FastAPI CLI** mit `--forwarded-allow-ips` konfiguriert ist, vertraut es diesen Headern und verwendet sie, z. B. um die korrekten URLs in Weiterleitungen zu erzeugen.
## Proxy mit einem abgetrennten Pfadpräfix { #proxy-with-a-stripped-path-prefix }
Sie könnten einen Proxy haben, der Ihrer Anwendung ein Pfadpräfix hinzufügt.
In diesen Fällen können Sie <abbr title="Wurzelpfad">`root_path`</abbr> verwenden, um Ihre Anwendung zu konfigurieren.
Der `root_path` ist ein Mechanismus, der von der ASGI-Spezifikation bereitgestellt wird (auf der FastAPI via Starlette aufbaut).
Der `root_path` wird verwendet, um diese speziellen Fälle zu handhaben.
Und er wird auch intern beim Mounten von Unteranwendungen verwendet.
Ein Proxy mit einem abgetrennten Pfadpräfix bedeutet in diesem Fall, dass Sie einen Pfad unter `/app` in Ihrem Code deklarieren könnten, dann aber, eine Ebene darüber, den Proxy hinzufügen, der Ihre **FastAPI**-Anwendung unter einem Pfad wie `/api/v1` platziert.
In diesem Fall würde der ursprüngliche Pfad `/app` tatsächlich unter `/api/v1/app` bereitgestellt.
Auch wenn Ihr gesamter Code unter der Annahme geschrieben ist, dass es nur `/app` gibt.
{* ../../docs_src/behind_a_proxy/tutorial001_py310.py hl[6] *}
Und der Proxy würde das **Pfadpräfix** on-the-fly **„entfernen“**, bevor er den <abbr title="Request Anfrage: Daten, die der Client zum Server sendet">Request</abbr> an den Anwendungsserver (wahrscheinlich Uvicorn via FastAPI CLI) übermittelt, dafür sorgend, dass Ihre Anwendung davon überzeugt ist, dass sie unter `/app` bereitgestellt wird, sodass Sie nicht Ihren gesamten Code dahingehend aktualisieren müssen, das Präfix `/api/v1` zu verwenden.
Bis hierher würde alles wie gewohnt funktionieren.
Wenn Sie dann jedoch die Benutzeroberfläche der integrierten Dokumentation (das Frontend) öffnen, wird angenommen, dass sich das OpenAPI-Schema unter `/openapi.json` anstelle von `/api/v1/openapi.json` befindet.
Also würde das Frontend (das im Browser läuft) versuchen, `/openapi.json` zu erreichen und wäre nicht in der Lage, das OpenAPI-Schema abzurufen.
Da wir für unsere Anwendung einen Proxy mit dem Pfadpräfix `/api/v1` haben, muss das Frontend das OpenAPI-Schema unter `/api/v1/openapi.json` abrufen.
```mermaid
graph LR
browser("Browser")
proxy["Proxy auf http://0.0.0.0:9999/api/v1/app"]
server["Server auf http://127.0.0.1:8000/app"]
browser --> proxy
proxy --> server
```
/// tip | Tipp
Die IP `0.0.0.0` wird üblicherweise verwendet, um anzudeuten, dass das Programm alle auf diesem Computer/Server verfügbaren IPs abhört.
///
Die Benutzeroberfläche der Dokumentation würde benötigen, dass das OpenAPI-Schema deklariert, dass sich dieser API-`server` unter `/api/v1` (hinter dem Proxy) befindet. Zum Beispiel:
```JSON hl_lines="4-8"
{
"openapi": "3.1.0",
// Hier mehr Einstellungen
"servers": [
{
"url": "/api/v1"
}
],
"paths": {
// Hier mehr Einstellungen
}
}
```
In diesem Beispiel könnte der „Proxy“ etwa **Traefik** sein. Und der Server wäre etwas wie FastAPI CLI mit **Uvicorn**, auf dem Ihre FastAPI-Anwendung ausgeführt wird.
### Bereitstellung des `root_path` { #providing-the-root-path }
Um dies zu erreichen, können Sie die Kommandozeilenoption `--root-path` wie folgt verwenden:
<div class="termy">
```console
$ fastapi run main.py --forwarded-allow-ips="*" --root-path /api/v1
<span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
```
</div>
Falls Sie Hypercorn verwenden, das hat auch die Option `--root-path`.
/// note | Technische Details
Die ASGI-Spezifikation definiert einen `root_path` für diesen Anwendungsfall.
Und die Kommandozeilenoption `--root-path` stellt diesen `root_path` bereit.
///
### Testen des aktuellen `root_path` { #checking-the-current-root-path }
Sie können den aktuellen `root_path` abrufen, der von Ihrer Anwendung für jeden Request verwendet wird. Er ist Teil des `scope`-<abbr title="Dictionary Zuordnungstabelle: In anderen Sprachen auch Hash, Map, Objekt, Assoziatives Array genannt">Dictionarys</abbr> (das ist Teil der ASGI-Spezifikation).
Hier fügen wir ihn, nur zu Demonstrationszwecken, in die Nachricht ein.
{* ../../docs_src/behind_a_proxy/tutorial001_py310.py hl[8] *}
Wenn Sie Uvicorn dann starten mit:
<div class="termy">
```console
$ fastapi run main.py --forwarded-allow-ips="*" --root-path /api/v1
<span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
```
</div>
wäre die <abbr title="Response Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Response</abbr> etwa:
```JSON
{
"message": "Hello World",
"root_path": "/api/v1"
}
```
### Festlegen des `root_path` in der FastAPI-Anwendung { #setting-the-root-path-in-the-fastapi-app }
Falls Sie keine Möglichkeit haben, eine Kommandozeilenoption wie `--root-path` oder ähnlich zu übergeben, können Sie, alternativ dazu, beim Erstellen Ihrer FastAPI-Anwendung den Parameter `root_path` setzen:
{* ../../docs_src/behind_a_proxy/tutorial002_py310.py hl[3] *}
Die Übergabe des `root_path` an `FastAPI` wäre das Äquivalent zur Übergabe der `--root-path`-Kommandozeilenoption an Uvicorn oder Hypercorn.
### Über `root_path` { #about-root-path }
Beachten Sie, dass der Server (Uvicorn) diesen `root_path` für nichts anderes verwendet als für die Weitergabe an die Anwendung.
Aber wenn Sie mit Ihrem Browser auf [http://127.0.0.1:8000/app](http://127.0.0.1:8000/app) gehen, sehen Sie die normale Response:
```JSON
{
"message": "Hello World",
"root_path": "/api/v1"
}
```
Es wird also nicht erwartet, dass unter `http://127.0.0.1:8000/api/v1/app` darauf zugegriffen wird.
Uvicorn erwartet, dass der Proxy unter `http://127.0.0.1:8000/app` auf Uvicorn zugreift, und dann liegt es in der Verantwortung des Proxys, das zusätzliche `/api/v1`-Präfix darüber hinzuzufügen.
## Über Proxys mit einem abgetrennten Pfadpräfix { #about-proxies-with-a-stripped-path-prefix }
Bedenken Sie, dass ein Proxy mit abgetrenntem Pfadpräfix nur eine von vielen Konfigurationsmöglichkeiten ist.
Wahrscheinlich wird in vielen Fällen die Standardeinstellung sein, dass der Proxy kein abgetrenntes Pfadpräfix hat.
In einem solchen Fall (ohne ein abgetrenntes Pfadpräfix) würde der Proxy auf etwas wie `https://myawesomeapp.com` lauschen, und wenn der Browser dann zu `https://myawesomeapp.com/api/v1/app` wechselt, und Ihr Server (z. B. Uvicorn) auf `http://127.0.0.1:8000` lauscht, würde der Proxy (ohne ein abgetrenntes Pfadpräfix) über denselben Pfad auf Uvicorn zugreifen: `http://127.0.0.1:8000/api/v1/app`.
## Lokal testen mit Traefik { #testing-locally-with-traefik }
Sie können das Experiment mit einem abgetrennten Pfadpräfix einfach lokal ausführen, indem Sie [Traefik](https://docs.traefik.io/) verwenden.
[Laden Sie Traefik herunter](https://github.com/containous/traefik/releases), es ist eine einzelne Binärdatei, Sie können die komprimierte Datei extrahieren und sie direkt vom Terminal aus ausführen.
Dann erstellen Sie eine Datei `traefik.toml` mit:
```TOML hl_lines="3"
[entryPoints]
[entryPoints.http]
address = ":9999"
[providers]
[providers.file]
filename = "routes.toml"
```
Dadurch wird Traefik angewiesen, Port 9999 abzuhören und eine andere Datei `routes.toml` zu verwenden.
/// tip | Tipp
Wir verwenden Port 9999 anstelle des Standard-HTTP-Ports 80, damit Sie ihn nicht mit Administratorrechten (`sudo`) ausführen müssen.
///
Erstellen Sie nun die andere Datei `routes.toml`:
```TOML hl_lines="5 12 20"
[http]
[http.middlewares]
[http.middlewares.api-stripprefix.stripPrefix]
prefixes = ["/api/v1"]
[http.routers]
[http.routers.app-http]
entryPoints = ["http"]
service = "app"
rule = "PathPrefix(`/api/v1`)"
middlewares = ["api-stripprefix"]
[http.services]
[http.services.app]
[http.services.app.loadBalancer]
[[http.services.app.loadBalancer.servers]]
url = "http://127.0.0.1:8000"
```
Diese Datei konfiguriert Traefik, das Pfadpräfix `/api/v1` zu verwenden.
Und dann leitet Traefik seine Requests an Ihren Uvicorn weiter, der unter `http://127.0.0.1:8000` läuft.
Starten Sie nun Traefik:
<div class="termy">
```console
$ ./traefik --configFile=traefik.toml
INFO[0000] Configuration loaded from file: /home/user/awesomeapi/traefik.toml
```
</div>
Und jetzt starten Sie Ihre Anwendung mit Uvicorn, indem Sie die Option `--root-path` verwenden:
<div class="termy">
```console
$ fastapi run main.py --forwarded-allow-ips="*" --root-path /api/v1
<span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
```
</div>
### Die Responses testen { #check-the-responses }
Wenn Sie nun zur URL mit dem Port für Uvicorn gehen: [http://127.0.0.1:8000/app](http://127.0.0.1:8000/app), sehen Sie die normale Response:
```JSON
{
"message": "Hello World",
"root_path": "/api/v1"
}
```
/// tip | Tipp
Beachten Sie, dass, obwohl Sie unter `http://127.0.0.1:8000/app` darauf zugreifen, als `root_path` angezeigt wird `/api/v1`, welches aus der Option `--root-path` stammt.
///
Öffnen Sie nun die URL mit dem Port für Traefik, einschließlich des Pfadpräfixes: [http://127.0.0.1:9999/api/v1/app](http://127.0.0.1:9999/api/v1/app).
Wir bekommen die gleiche Response:
```JSON
{
"message": "Hello World",
"root_path": "/api/v1"
}
```
Diesmal jedoch unter der URL mit dem vom Proxy bereitgestellten Präfixpfad: `/api/v1`.
Die Idee hier ist natürlich, dass jeder über den Proxy auf die Anwendung zugreifen soll, daher ist die Version mit dem Pfadpräfix `/api/v1` die „korrekte“.
Und die von Uvicorn direkt bereitgestellte Version ohne Pfadpräfix (`http://127.0.0.1:8000/app`) wäre ausschließlich für den Zugriff durch den _Proxy_ (Traefik) bestimmt.
Dies demonstriert, wie der Proxy (Traefik) das Pfadpräfix verwendet und wie der Server (Uvicorn) den `root_path` aus der Option `--root-path` verwendet.
### Es in der Dokumentationsoberfläche testen { #check-the-docs-ui }
Jetzt folgt der spaßige Teil. ✨
Der „offizielle“ Weg, auf die Anwendung zuzugreifen, wäre über den Proxy mit dem von uns definierten Pfadpräfix. Wenn Sie also die von Uvicorn direkt bereitgestellte Dokumentationsoberfläche ohne das Pfadpräfix in der URL ausprobieren, wird es erwartungsgemäß nicht funktionieren, da erwartet wird, dass der Zugriff über den Proxy erfolgt.
Sie können das unter [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs) sehen:
<img src="/img/tutorial/behind-a-proxy/image01.png">
Wenn wir jedoch unter der „offiziellen“ URL, über den Proxy mit Port `9999`, unter `/api/v1/docs`, auf die Dokumentationsoberfläche zugreifen, funktioniert es ordnungsgemäß! 🎉
Sie können das unter [http://127.0.0.1:9999/api/v1/docs](http://127.0.0.1:9999/api/v1/docs) testen:
<img src="/img/tutorial/behind-a-proxy/image02.png">
Genau so, wie wir es wollten. ✔️
Dies liegt daran, dass FastAPI diesen `root_path` verwendet, um den Default-`server` in OpenAPI mit der von `root_path` bereitgestellten URL zu erstellen.
## Zusätzliche Server { #additional-servers }
/// warning | Achtung
Dies ist ein fortgeschrittener Anwendungsfall. Überspringen Sie das gerne.
///
Standardmäßig erstellt **FastAPI** einen `server` im OpenAPI-Schema mit der URL für den `root_path`.
Sie können aber auch andere alternative `servers` bereitstellen, beispielsweise wenn Sie möchten, dass *dieselbe* Dokumentationsoberfläche mit einer Staging- und Produktionsumgebung interagiert.
Wenn Sie eine benutzerdefinierte Liste von Servern (`servers`) übergeben und es einen `root_path` gibt (da Ihre API hinter einem Proxy läuft), fügt **FastAPI** einen „Server“ mit diesem `root_path` am Anfang der Liste ein.
Zum Beispiel:
{* ../../docs_src/behind_a_proxy/tutorial003_py310.py hl[4:7] *}
Erzeugt ein OpenAPI-Schema, wie:
```JSON hl_lines="5-7"
{
"openapi": "3.1.0",
// Hier mehr Einstellungen
"servers": [
{
"url": "/api/v1"
},
{
"url": "https://stag.example.com",
"description": "Staging environment"
},
{
"url": "https://prod.example.com",
"description": "Production environment"
}
],
"paths": {
// Hier mehr Einstellungen
}
}
```
/// tip | Tipp
Beachten Sie den automatisch generierten Server mit dem `URL`-Wert `/api/v1`, welcher vom `root_path` stammt.
///
In der Dokumentationsoberfläche unter [http://127.0.0.1:9999/api/v1/docs](http://127.0.0.1:9999/api/v1/docs) würde es so aussehen:
<img src="/img/tutorial/behind-a-proxy/image03.png">
/// tip | Tipp
Die Dokumentationsoberfläche interagiert mit dem von Ihnen ausgewählten Server.
///
/// note | Technische Details
Die Eigenschaft `servers` in der OpenAPI-Spezifikation ist optional.
Wenn Sie den Parameter `servers` nicht angeben und `root_path` den Wert `/` hat, wird die Eigenschaft `servers` im generierten OpenAPI-Schema standardmäßig vollständig weggelassen, was dem Äquivalent eines einzelnen Servers mit einem `url`-Wert von `/` entspricht.
///
### Den automatischen Server von `root_path` deaktivieren { #disable-automatic-server-from-root-path }
Wenn Sie nicht möchten, dass **FastAPI** einen automatischen Server inkludiert, welcher `root_path` verwendet, können Sie den Parameter `root_path_in_servers=False` verwenden:
{* ../../docs_src/behind_a_proxy/tutorial004_py310.py hl[9] *}
Dann wird er nicht in das OpenAPI-Schema aufgenommen.
## Mounten einer Unteranwendung { #mounting-a-sub-application }
Wenn Sie gleichzeitig eine Unteranwendung mounten (wie beschrieben in [Unteranwendungen Mounts](sub-applications.md)) und einen Proxy mit `root_path` verwenden wollen, können Sie das normal tun, wie Sie es erwarten würden.
FastAPI verwendet intern den `root_path` auf intelligente Weise, sodass es einfach funktioniert. ✨

View File

@ -0,0 +1,272 @@
# Benutzerdefinierte Response HTML, Stream, Datei, andere { #custom-response-html-stream-file-others }
Standardmäßig gibt **FastAPI** JSON-Responses zurück.
Sie können dies überschreiben, indem Sie direkt eine `Response` zurückgeben, wie in [Eine Response direkt zurückgeben](response-directly.md) gezeigt.
Wenn Sie jedoch direkt eine `Response` (oder eine Unterklasse wie `JSONResponse`) zurückgeben, werden die Daten nicht automatisch konvertiert (selbst wenn Sie ein `response_model` deklarieren), und die Dokumentation wird nicht automatisch generiert (zum Beispiel einschließlich des spezifischen „Medientyps“ im HTTP-Header `Content-Type` als Teil der generierten OpenAPI).
Sie können jedoch auch die `Response`, die Sie verwenden möchten (z. B. jede `Response`-Unterklasse), im *Pfadoperation-Dekorator* mit dem `response_class`-Parameter deklarieren.
Der Inhalt, den Sie von Ihrer *Pfadoperation-Funktion* zurückgeben, wird in diese `Response` eingefügt.
/// note | Hinweis
Wenn Sie eine Response-Klasse ohne Medientyp verwenden, erwartet FastAPI, dass Ihre Response keinen Inhalt hat, und dokumentiert daher das Format der Response nicht in deren generierter OpenAPI-Dokumentation.
///
## JSON-Responses { #json-responses }
Standardmäßig gibt FastAPI JSON-Responses zurück.
Wenn Sie ein [Responsemodell](../tutorial/response-model.md) deklarieren, verwendet FastAPI Pydantic, um die Daten zu JSON zu serialisieren.
Wenn Sie kein Responsemodell deklarieren, verwendet FastAPI den `jsonable_encoder`, wie in [JSON-kompatibler Encoder](../tutorial/encoder.md) erklärt, und packt das Ergebnis in eine `JSONResponse`.
Wenn Sie eine `response_class` mit einem JSON-Medientyp (`application/json`) deklarieren, wie es bei `JSONResponse` der Fall ist, werden die von Ihnen zurückgegebenen Daten automatisch mit jedem Pydantic-`response_model` (das Sie im *Pfadoperation-Dekorator* deklariert haben) konvertiert (und gefiltert). Aber die Daten werden nicht mit Pydantic zu JSON-Bytes serialisiert, stattdessen werden sie mit dem `jsonable_encoder` konvertiert und anschließend an die `JSONResponse`-Klasse übergeben, die sie dann mit der Standard-JSON-Bibliothek in Python in Bytes serialisiert.
### JSON-Leistung { #json-performance }
Kurz gesagt: Wenn Sie die maximale Leistung möchten, verwenden Sie ein [Responsemodell](../tutorial/response-model.md) und deklarieren Sie keine `response_class` im *Pfadoperation-Dekorator*.
{* ../../docs_src/response_model/tutorial001_01_py310.py ln[15:17] hl[16] *}
## HTML-Response { #html-response }
Um eine Response mit HTML direkt von **FastAPI** zurückzugeben, verwenden Sie `HTMLResponse`.
* Importieren Sie `HTMLResponse`.
* Übergeben Sie `HTMLResponse` als den Parameter `response_class` Ihres *Pfadoperation-Dekorators*.
{* ../../docs_src/custom_response/tutorial002_py310.py hl[2,7] *}
/// info | Info
Der Parameter `response_class` wird auch verwendet, um den „Medientyp“ der Response zu definieren.
In diesem Fall wird der HTTP-Header `Content-Type` auf `text/html` gesetzt.
Und er wird als solcher in OpenAPI dokumentiert.
///
### Eine `Response` zurückgeben { #return-a-response }
Wie in [Eine Response direkt zurückgeben](response-directly.md) gezeigt, können Sie die Response auch direkt in Ihrer *Pfadoperation* überschreiben, indem Sie diese zurückgeben.
Das gleiche Beispiel von oben, das eine `HTMLResponse` zurückgibt, könnte so aussehen:
{* ../../docs_src/custom_response/tutorial003_py310.py hl[2,7,19] *}
/// warning | Achtung
Eine `Response`, die direkt von Ihrer *Pfadoperation-Funktion* zurückgegeben wird, wird in OpenAPI nicht dokumentiert (zum Beispiel wird der `Content-Type` nicht dokumentiert) und ist in der automatischen interaktiven Dokumentation nicht sichtbar.
///
/// info | Info
Natürlich stammen der eigentliche `Content-Type`-Header, der Statuscode, usw., aus dem `Response`-Objekt, das Sie zurückgegeben haben.
///
### In OpenAPI dokumentieren und `Response` überschreiben { #document-in-openapi-and-override-response }
Wenn Sie die Response innerhalb der Funktion überschreiben und gleichzeitig den „Medientyp“ in OpenAPI dokumentieren möchten, können Sie den `response_class`-Parameter verwenden UND ein `Response`-Objekt zurückgeben.
Die `response_class` wird dann nur zur Dokumentation der OpenAPI-*Pfadoperation* verwendet, Ihre `Response` wird jedoch unverändert verwendet.
#### Eine `HTMLResponse` direkt zurückgeben { #return-an-htmlresponse-directly }
Es könnte zum Beispiel so etwas sein:
{* ../../docs_src/custom_response/tutorial004_py310.py hl[7,21,23] *}
In diesem Beispiel generiert die Funktion `generate_html_response()` bereits eine `Response` und gibt sie zurück, anstatt das HTML in einem `str` zurückzugeben.
Indem Sie das Ergebnis des Aufrufs von `generate_html_response()` zurückgeben, geben Sie bereits eine `Response` zurück, die das Standardverhalten von **FastAPI** überschreibt.
Aber da Sie die `HTMLResponse` auch in der `response_class` übergeben haben, weiß **FastAPI**, dass sie in OpenAPI und der interaktiven Dokumentation als HTML mit `text/html` zu dokumentieren ist:
<img src="/img/tutorial/custom-response/image01.png">
## Verfügbare Responses { #available-responses }
Hier sind einige der verfügbaren Responses.
Bedenken Sie, dass Sie `Response` verwenden können, um alles andere zurückzugeben, oder sogar eine benutzerdefinierte Unterklasse zu erstellen.
/// note | Technische Details
Sie können auch `from starlette.responses import HTMLResponse` verwenden.
**FastAPI** bietet dieselben `starlette.responses` auch via `fastapi.responses` an, als Annehmlichkeit für Sie, den Entwickler. Die meisten verfügbaren Responses kommen aber direkt von Starlette.
///
### `Response` { #response }
Die Hauptklasse `Response`, alle anderen Responses erben von ihr.
Sie können sie direkt zurückgeben.
Sie akzeptiert die folgenden Parameter:
* `content` Ein `str` oder `bytes`.
* `status_code` Ein `int`-HTTP-Statuscode.
* `headers` Ein `dict` von Strings.
* `media_type` Ein `str`, der den Medientyp angibt. Z. B. `"text/html"`.
FastAPI (eigentlich Starlette) fügt automatisch einen Content-Length-Header ein. Außerdem wird es einen Content-Type-Header einfügen, der auf dem `media_type` basiert, und für Texttypen einen Zeichensatz (charset) anfügen.
{* ../../docs_src/response_directly/tutorial002_py310.py hl[1,18] *}
### `HTMLResponse` { #htmlresponse }
Nimmt Text oder Bytes entgegen und gibt eine HTML-Response zurück, wie Sie oben gelesen haben.
### `PlainTextResponse` { #plaintextresponse }
Nimmt Text oder Bytes entgegen und gibt eine Plain-Text-Response zurück.
{* ../../docs_src/custom_response/tutorial005_py310.py hl[2,7,9] *}
### `JSONResponse` { #jsonresponse }
Nimmt einige Daten entgegen und gibt eine `application/json`-codierte Response zurück.
Dies ist die Standard-Response, die in **FastAPI** verwendet wird, wie Sie oben gelesen haben.
/// note | Technische Details
Wenn Sie jedoch ein Responsemodell oder einen Rückgabetyp deklarieren, wird dieser direkt verwendet, um die Daten zu JSON zu serialisieren, und eine Response mit dem richtigen Medientyp für JSON wird direkt zurückgegeben, ohne die `JSONResponse`-Klasse zu verwenden.
Dies ist der ideale Weg, um die beste Leistung zu erzielen.
///
### `RedirectResponse` { #redirectresponse }
Gibt eine HTTP-Weiterleitung (HTTP-Redirect) zurück. Verwendet standardmäßig den Statuscode 307 Temporäre Weiterleitung (Temporary Redirect).
Sie können eine `RedirectResponse` direkt zurückgeben:
{* ../../docs_src/custom_response/tutorial006_py310.py hl[2,9] *}
---
Oder Sie können sie im Parameter `response_class` verwenden:
{* ../../docs_src/custom_response/tutorial006b_py310.py hl[2,7,9] *}
Wenn Sie das tun, können Sie die URL direkt von Ihrer *Pfadoperation*-Funktion zurückgeben.
In diesem Fall ist der verwendete `status_code` der Standardcode für die `RedirectResponse`, also `307`.
---
Sie können den Parameter `status_code` auch in Kombination mit dem Parameter `response_class` verwenden:
{* ../../docs_src/custom_response/tutorial006c_py310.py hl[2,7,9] *}
### `StreamingResponse` { #streamingresponse }
Nimmt einen asynchronen Generator oder einen normalen Generator/Iterator (eine Funktion mit `yield`) und streamt den Responsebody.
{* ../../docs_src/custom_response/tutorial007_py310.py hl[3,16] *}
/// note | Technische Details
Ein `async`-Task kann nur abgebrochen werden, wenn er ein `await` erreicht. Wenn es kein `await` gibt, kann der Generator (Funktion mit `yield`) nicht ordnungsgemäß abgebrochen werden und könnte weiterlaufen, selbst nachdem der Abbruch angefordert wurde.
Da dieses kleine Beispiel keine `await`-Anweisungen benötigt, fügen wir ein `await anyio.sleep(0)` hinzu, um dem Event Loop die Chance zu geben, den Abbruch zu verarbeiten.
Dies wäre bei großen oder unendlichen Streams noch wichtiger.
///
/// tip | Tipp
Anstatt eine `StreamingResponse` direkt zurückzugeben, sollten Sie wahrscheinlich dem Stil in [Daten streamen](./stream-data.md) folgen. Das ist wesentlich bequemer und behandelt den Abbruch im Hintergrund für Sie.
Wenn Sie JSON Lines streamen, folgen Sie dem Tutorial [JSON Lines streamen](../tutorial/stream-json-lines.md).
///
### `FileResponse` { #fileresponse }
Streamt eine Datei asynchron als Response.
Nimmt zur Instanziierung einen anderen Satz von Argumenten entgegen als die anderen Response-Typen:
* `path` Der Dateipfad zur Datei, die gestreamt werden soll.
* `headers` Alle benutzerdefinierten Header, die inkludiert werden sollen, als Dictionary.
* `media_type` Ein String, der den Medientyp angibt. Wenn nicht gesetzt, wird der Dateiname oder Pfad verwendet, um auf einen Medientyp zu schließen.
* `filename` Wenn gesetzt, wird das in der `Content-Disposition` der Response eingefügt.
Datei-Responses enthalten die entsprechenden `Content-Length`-, `Last-Modified`- und `ETag`-Header.
{* ../../docs_src/custom_response/tutorial009_py310.py hl[2,10] *}
Sie können auch den Parameter `response_class` verwenden:
{* ../../docs_src/custom_response/tutorial009b_py310.py hl[2,8,10] *}
In diesem Fall können Sie den Dateipfad direkt von Ihrer *Pfadoperation*-Funktion zurückgeben.
## Benutzerdefinierte Response-Klasse { #custom-response-class }
Sie können Ihre eigene benutzerdefinierte Response-Klasse erstellen, die von `Response` erbt und diese verwendet.
Nehmen wir zum Beispiel an, dass Sie [`orjson`](https://github.com/ijl/orjson) mit einigen Einstellungen verwenden möchten.
Sie möchten etwa, dass Ihre Response eingerücktes und formatiertes JSON zurückgibt. Dafür möchten Sie die orjson-Option `orjson.OPT_INDENT_2` verwenden.
Sie könnten eine `CustomORJSONResponse` erstellen. Das Wichtigste, was Sie tun müssen, ist, eine `Response.render(content)`-Methode zu erstellen, die den Inhalt als `bytes` zurückgibt:
{* ../../docs_src/custom_response/tutorial009c_py310.py hl[9:14,17] *}
Anstatt Folgendes zurückzugeben:
```json
{"message": "Hello World"}
```
... wird diese Response Folgendes zurückgeben:
```json
{
"message": "Hello World"
}
```
Natürlich werden Sie wahrscheinlich viel bessere Möglichkeiten finden, Vorteil daraus zu ziehen, als JSON zu formatieren. 😉
### `orjson` oder Responsemodell { #orjson-or-response-model }
Wenn es Ihnen um Leistung geht, sind Sie wahrscheinlich mit einem [Responsemodell](../tutorial/response-model.md) besser beraten als mit einer `orjson`-Response.
Mit einem Responsemodell verwendet FastAPI Pydantic, um die Daten ohne Zwischenschritte zu JSON zu serialisieren, also ohne sie z. B. erst mit `jsonable_encoder` zu konvertieren, was sonst der Fall wäre.
Und unter der Haube verwendet Pydantic dieselben Rust-Mechanismen wie `orjson`, um nach JSON zu serialisieren. Sie erhalten mit einem Responsemodell also ohnehin die beste Leistung.
## Standard-Response-Klasse { #default-response-class }
Beim Erstellen einer **FastAPI**-Klasseninstanz oder eines `APIRouter`s können Sie angeben, welche Response-Klasse standardmäßig verwendet werden soll.
Der Parameter, der das definiert, ist `default_response_class`.
Im folgenden Beispiel verwendet **FastAPI** standardmäßig `HTMLResponse` in allen *Pfadoperationen*, anstelle von JSON.
{* ../../docs_src/custom_response/tutorial010_py310.py hl[2,4] *}
/// tip | Tipp
Sie können dennoch weiterhin `response_class` in *Pfadoperationen* überschreiben, wie bisher.
///
## Zusätzliche Dokumentation { #additional-documentation }
Sie können auch den Medientyp und viele andere Details in OpenAPI mit `responses` deklarieren: [Zusätzliche Responses in OpenAPI](additional-responses.md).

View File

@ -0,0 +1,95 @@
# Datenklassen verwenden { #using-dataclasses }
FastAPI basiert auf **Pydantic**, und ich habe Ihnen gezeigt, wie Sie Pydantic-Modelle verwenden können, um <abbr title="Request Anfrage: Daten, die der Client zum Server sendet">Requests</abbr> und <abbr title="Response Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Responses</abbr> zu deklarieren.
Aber FastAPI unterstützt auf die gleiche Weise auch die Verwendung von [`dataclasses`](https://docs.python.org/3/library/dataclasses.html):
{* ../../docs_src/dataclasses_/tutorial001_py310.py hl[1,6:11,18:19] *}
Das ist dank **Pydantic** ebenfalls möglich, da es [„`dataclasses` intern unterstützt“](https://docs.pydantic.dev/latest/concepts/dataclasses/#use-of-stdlib-dataclasses-with-basemodel).
Auch wenn im obigen Code Pydantic nicht explizit vorkommt, verwendet FastAPI Pydantic, um diese Standard-Datenklassen in Pydantics eigene Variante von Datenklassen zu konvertieren.
Und natürlich wird das gleiche unterstützt:
* Datenvalidierung
* Datenserialisierung
* Datendokumentation, usw.
Das funktioniert genauso wie mit Pydantic-Modellen. Und tatsächlich wird es unter der Haube mittels Pydantic auf die gleiche Weise bewerkstelligt.
/// info | Info
Bedenken Sie, dass Datenklassen nicht alles können, was Pydantic-Modelle können.
Daher müssen Sie möglicherweise weiterhin Pydantic-Modelle verwenden.
Wenn Sie jedoch eine Menge Datenklassen herumliegen haben, ist dies ein guter Trick, um sie für eine Web-API mithilfe von FastAPI zu verwenden. 🤓
///
## Datenklassen in `response_model` { #dataclasses-in-response-model }
Sie können `dataclasses` auch im Parameter `response_model` verwenden:
{* ../../docs_src/dataclasses_/tutorial002_py310.py hl[1,6:12,18] *}
Die Datenklasse wird automatisch in eine Pydantic-Datenklasse konvertiert.
Auf diese Weise wird deren Schema in der Benutzeroberfläche der API-Dokumentation angezeigt:
<img src="/img/tutorial/dataclasses/image01.png">
## Datenklassen in verschachtelten Datenstrukturen { #dataclasses-in-nested-data-structures }
Sie können `dataclasses` auch mit anderen Typannotationen kombinieren, um verschachtelte Datenstrukturen zu erstellen.
In einigen Fällen müssen Sie möglicherweise immer noch Pydantics Version von `dataclasses` verwenden. Zum Beispiel, wenn Sie Fehler in der automatisch generierten API-Dokumentation haben.
In diesem Fall können Sie einfach die Standard-`dataclasses` durch `pydantic.dataclasses` ersetzen, was einen direkten Ersatz darstellt:
{* ../../docs_src/dataclasses_/tutorial003_py310.py hl[1,4,7:10,13:16,22:24,27] *}
1. Wir importieren `field` weiterhin von Standard-`dataclasses`.
2. `pydantic.dataclasses` ist ein direkter Ersatz für `dataclasses`.
3. Die Datenklasse `Author` enthält eine Liste von `Item`-Datenklassen.
4. Die Datenklasse `Author` wird im `response_model`-Parameter verwendet.
5. Sie können andere Standard-Typannotationen mit Datenklassen als Requestbody verwenden.
In diesem Fall handelt es sich um eine Liste von `Item`-Datenklassen.
6. Hier geben wir ein <abbr title="Dictionary Zuordnungstabelle: In anderen Sprachen auch Hash, Map, Objekt, Assoziatives Array genannt">Dictionary</abbr> zurück, das `items` enthält, welches eine Liste von Datenklassen ist.
FastAPI ist weiterhin in der Lage, die Daten nach JSON zu <dfn title="Konvertieren der Daten in ein übertragbares Format">Serialisieren</dfn>.
7. Hier verwendet das `response_model` als Typannotation eine Liste von `Author`-Datenklassen.
Auch hier können Sie `dataclasses` mit Standard-Typannotationen kombinieren.
8. Beachten Sie, dass diese *Pfadoperation-Funktion* reguläres `def` anstelle von `async def` verwendet.
Wie immer können Sie in FastAPI `def` und `async def` beliebig kombinieren.
Wenn Sie eine Auffrischung darüber benötigen, wann welche Anwendung sinnvoll ist, lesen Sie den Abschnitt „In Eile?“ in der Dokumentation zu [`async` und `await`](../async.md#in-a-hurry).
9. Diese *Pfadoperation-Funktion* gibt keine Datenklassen zurück (obwohl dies möglich wäre), sondern eine Liste von Dictionarys mit internen Daten.
FastAPI verwendet den Parameter `response_model` (der Datenklassen enthält), um die Response zu konvertieren.
Sie können `dataclasses` mit anderen Typannotationen auf vielfältige Weise kombinieren, um komplexe Datenstrukturen zu bilden.
Weitere Einzelheiten finden Sie in den Bemerkungen im Quellcode oben.
## Mehr erfahren { #learn-more }
Sie können `dataclasses` auch mit anderen Pydantic-Modellen kombinieren, von ihnen erben, sie in Ihre eigenen Modelle einbinden, usw.
Weitere Informationen finden Sie in der [Pydantic-Dokumentation zu Datenklassen](https://docs.pydantic.dev/latest/concepts/dataclasses/).
## Version { #version }
Dies ist verfügbar seit FastAPI-Version `0.67.0`. 🔖

View File

@ -0,0 +1,165 @@
# Lifespan-Events { #lifespan-events }
Sie können Logik (Code) definieren, die ausgeführt werden soll, bevor die Anwendung **hochfährt**. Dies bedeutet, dass dieser Code **einmal** ausgeführt wird, **bevor** die Anwendung **beginnt, <abbr title="Request Anfrage: Daten, die der Client zum Server sendet">Requests</abbr> entgegenzunehmen**.
Auf die gleiche Weise können Sie Logik (Code) definieren, die ausgeführt werden soll, wenn die Anwendung **heruntergefahren** wird. In diesem Fall wird dieser Code **einmal** ausgeführt, **nachdem** möglicherweise **viele Requests** bearbeitet wurden.
Da dieser Code ausgeführt wird, bevor die Anwendung **beginnt**, Requests entgegenzunehmen, und unmittelbar, nachdem sie die Bearbeitung von Requests **abgeschlossen hat**, deckt er den gesamten Anwendungs-<abbr title="Lebensdauer">**Lifespan**</abbr> ab (das Wort „Lifespan“ wird gleich wichtig sein 😉).
Dies kann sehr nützlich sein, um **Ressourcen** einzurichten, die Sie in der gesamten App verwenden wollen und die von Requests **gemeinsam genutzt** werden und/oder die Sie anschließend **aufräumen** müssen. Zum Beispiel ein Pool von Datenbankverbindungen oder das Laden eines gemeinsam genutzten Modells für maschinelles Lernen.
## Anwendungsfall { #use-case }
Beginnen wir mit einem Beispiel-**Anwendungsfall** und schauen uns dann an, wie wir ihn mit dieser Methode implementieren können.
Stellen wir uns vor, Sie verfügen über einige **Modelle für maschinelles Lernen**, die Sie zur Bearbeitung von Requests verwenden möchten. 🤖
Die gleichen Modelle werden von den Requests gemeinsam genutzt, es handelt sich also nicht um ein Modell pro Request, pro Benutzer, oder ähnliches.
Stellen wir uns vor, dass das Laden des Modells **eine ganze Weile dauern** kann, da viele **Daten von der Festplatte** gelesen werden müssen. Sie möchten das also nicht für jeden Request tun.
Sie könnten das auf der obersten Ebene des Moduls/der Datei machen, aber das würde auch bedeuten, dass **das Modell geladen wird**, selbst wenn Sie nur einen einfachen automatisierten Test ausführen, dann wäre dieser Test **langsam**, weil er warten müsste, bis das Modell geladen ist, bevor er einen davon unabhängigen Teil des Codes ausführen könnte.
Das wollen wir besser machen: Laden wir das Modell, bevor die Requests bearbeitet werden, aber unmittelbar bevor die Anwendung beginnt, Requests zu empfangen, und nicht, während der Code geladen wird.
## Lifespan { #lifespan }
Sie können diese Logik beim <abbr title="Hochfahren">*Startup*</abbr> und <abbr title="Herunterfahren">*Shutdown*</abbr> mithilfe des `lifespan`-Parameters der `FastAPI`-App und eines „Kontextmanagers“ definieren (ich zeige Ihnen gleich, was das ist).
Beginnen wir mit einem Beispiel und sehen es uns dann im Detail an.
Wir erstellen eine asynchrone Funktion `lifespan()` mit `yield` wie folgt:
{* ../../docs_src/events/tutorial003_py310.py hl[16,19] *}
Hier simulieren wir den langsamen *Startup*, das Laden des Modells, indem wir die (Fake-)Modellfunktion vor dem `yield` in das <abbr title="Dictionary Zuordnungstabelle: In anderen Sprachen auch Hash, Map, Objekt, Assoziatives Array genannt">Dictionary</abbr> mit Modellen für maschinelles Lernen einfügen. Dieser Code wird ausgeführt, **bevor** die Anwendung **beginnt, Requests entgegenzunehmen**, während des *Startups*.
Und dann, direkt nach dem `yield`, entladen wir das Modell. Dieser Code wird ausgeführt, **nachdem** die Anwendung **die Bearbeitung von Requests abgeschlossen hat**, direkt vor dem *Shutdown*. Dadurch könnten beispielsweise Ressourcen wie Arbeitsspeicher oder eine GPU freigegeben werden.
/// tip | Tipp
Das `shutdown` würde erfolgen, wenn Sie die Anwendung **stoppen**.
Möglicherweise müssen Sie eine neue Version starten, oder Sie haben es einfach satt, sie auszuführen. 🤷
///
### Lifespan-Funktion { #lifespan-function }
Das Erste, was auffällt, ist, dass wir eine asynchrone Funktion mit `yield` definieren. Das ist sehr ähnlich zu Abhängigkeiten mit `yield`.
{* ../../docs_src/events/tutorial003_py310.py hl[14:19] *}
Der erste Teil der Funktion, vor dem `yield`, wird ausgeführt **bevor** die Anwendung startet.
Und der Teil nach `yield` wird ausgeführt, **nachdem** die Anwendung beendet ist.
### Asynchroner Kontextmanager { #async-context-manager }
Wie Sie sehen, ist die Funktion mit einem `@asynccontextmanager` versehen.
Dadurch wird die Funktion in einen sogenannten „**asynchronen Kontextmanager**“ umgewandelt.
{* ../../docs_src/events/tutorial003_py310.py hl[1,13] *}
Ein **Kontextmanager** in Python ist etwas, das Sie in einer `with`-Anweisung verwenden können, zum Beispiel kann `open()` als Kontextmanager verwendet werden:
```Python
with open("file.txt") as file:
file.read()
```
In neueren Versionen von Python gibt es auch einen **asynchronen Kontextmanager**. Sie würden ihn mit `async with` verwenden:
```Python
async with lifespan(app):
await do_stuff()
```
Wenn Sie wie oben einen Kontextmanager oder einen asynchronen Kontextmanager erstellen, führt dieser vor dem Betreten des `with`-Blocks den Code vor dem `yield` aus, und nach dem Verlassen des `with`-Blocks wird er den Code nach dem `yield` ausführen.
In unserem obigen Codebeispiel verwenden wir ihn nicht direkt, sondern übergeben ihn an FastAPI, damit es ihn verwenden kann.
Der Parameter `lifespan` der `FastAPI`-App benötigt einen **asynchronen Kontextmanager**, wir können ihm also unseren neuen asynchronen Kontextmanager `lifespan` übergeben.
{* ../../docs_src/events/tutorial003_py310.py hl[22] *}
## Alternative Events (<abbr title="veraltet, obsolet: Es soll nicht mehr verwendet werden">deprecatet</abbr>) { #alternative-events-deprecated }
/// warning | Achtung
Der empfohlene Weg, den *Startup* und *Shutdown* zu handhaben, ist die Verwendung des `lifespan`-Parameters der `FastAPI`-App, wie oben beschrieben. Wenn Sie einen `lifespan`-Parameter übergeben, werden die `startup`- und `shutdown`-Eventhandler nicht mehr aufgerufen. Es ist entweder alles `lifespan` oder alles Events, nicht beides.
Sie können diesen Teil wahrscheinlich überspringen.
///
Es gibt eine alternative Möglichkeit, diese Logik zu definieren, sodass sie beim *Startup* und beim *Shutdown* ausgeführt wird.
Sie können <abbr title="Eventhandler Ereignisbehandler: Funktion, die beim Eintreten eines bestimmten Ereignisses ausgeführt wird">Eventhandler</abbr> (Funktionen) definieren, die ausgeführt werden sollen, bevor die Anwendung hochgefahren wird oder wenn die Anwendung heruntergefahren wird.
Diese Funktionen können mit `async def` oder normalem `def` deklariert werden.
### `startup`-Event { #startup-event }
Um eine Funktion hinzuzufügen, die vor dem Start der Anwendung ausgeführt werden soll, deklarieren Sie diese mit dem Event `startup`:
{* ../../docs_src/events/tutorial001_py310.py hl[8] *}
In diesem Fall initialisiert die Eventhandler-Funktion `startup` die „Datenbank“ der Items (nur ein `dict`) mit einigen Werten.
Sie können mehr als eine Eventhandler-Funktion hinzufügen.
Und Ihre Anwendung empfängt erst dann Requests, wenn alle `startup`-Eventhandler abgeschlossen sind.
### `shutdown`-Event { #shutdown-event }
Um eine Funktion hinzuzufügen, die beim Shutdown der Anwendung ausgeführt werden soll, deklarieren Sie sie mit dem Event `shutdown`:
{* ../../docs_src/events/tutorial002_py310.py hl[6] *}
Hier schreibt die `shutdown`-Eventhandler-Funktion eine Textzeile `"Application shutdown"` in eine Datei `log.txt`.
/// info | Info
In der Funktion `open()` bedeutet `mode="a"` „append“ („anhängen“), sodass die Zeile nach dem, was sich in dieser Datei befindet, hinzugefügt wird, ohne den vorherigen Inhalt zu überschreiben.
///
/// tip | Tipp
Beachten Sie, dass wir in diesem Fall eine Standard-Python-Funktion `open()` verwenden, die mit einer Datei interagiert.
Es handelt sich also um I/O (Input/Output), welches „Warten“ erfordert, bis Dinge auf die Festplatte geschrieben werden.
Aber `open()` verwendet nicht `async` und `await`.
Daher deklarieren wir die Eventhandler-Funktion mit Standard-`def` statt mit `async def`.
///
### `startup` und `shutdown` zusammen { #startup-and-shutdown-together }
Es besteht eine hohe Wahrscheinlichkeit, dass die Logik für Ihr *Startup* und *Shutdown* miteinander verknüpft ist. Vielleicht möchten Sie etwas beginnen und es dann beenden, eine Ressource laden und sie dann freigeben usw.
Bei getrennten Funktionen, die keine gemeinsame Logik oder Variablen haben, ist dies schwieriger, da Sie Werte in globalen Variablen speichern oder ähnliche Tricks verwenden müssen.
Aus diesem Grund wird jetzt empfohlen, stattdessen `lifespan` wie oben erläutert zu verwenden.
## Technische Details { #technical-details }
Nur ein technisches Detail für die neugierigen Nerds. 🤓
In der technischen ASGI-Spezifikation ist dies Teil des [Lifespan Protokolls](https://asgi.readthedocs.io/en/latest/specs/lifespan.html) und definiert Events namens `startup` und `shutdown`.
/// info | Info
Weitere Informationen zu Starlettes `lifespan`-Handlern finden Sie in [Starlettes Lifespan-Dokumentation](https://www.starlette.dev/lifespan/).
Einschließlich, wie man Lifespan-Zustand handhabt, der in anderen Bereichen Ihres Codes verwendet werden kann.
///
## Unteranwendungen { #sub-applications }
🚨 Beachten Sie, dass diese Lifespan-Events (Startup und Shutdown) nur für die Hauptanwendung ausgeführt werden, nicht für [Unteranwendungen Mounts](sub-applications.md).

View File

@ -0,0 +1,208 @@
# SDKs generieren { #generating-sdks }
Da **FastAPI** auf der **OpenAPI**-Spezifikation basiert, können dessen APIs in einem standardisierten Format beschrieben werden, das viele Tools verstehen.
Dies vereinfacht es, aktuelle **Dokumentation** und Client-Bibliotheken (<abbr title="Software Development Kits - Software-Entwicklungspakete">**SDKs**</abbr>) in verschiedenen Sprachen zu generieren sowie **Test-** oder **Automatisierungs-Workflows**, die mit Ihrem Code synchron bleiben.
In diesem Leitfaden erfahren Sie, wie Sie ein **TypeScript-SDK** für Ihr FastAPI-Backend generieren.
## Open Source SDK-Generatoren { #open-source-sdk-generators }
Eine vielseitige Möglichkeit ist der [OpenAPI Generator](https://openapi-generator.tech/), der **viele Programmiersprachen** unterstützt und SDKs aus Ihrer OpenAPI-Spezifikation generieren kann.
Für **TypeScript-Clients** ist [Hey API](https://heyapi.dev/) eine speziell entwickelte Lösung, die ein optimiertes Erlebnis für das TypeScript-Ökosystem bietet.
Weitere SDK-Generatoren finden Sie auf [OpenAPI.Tools](https://openapi.tools/#sdk).
/// tip | Tipp
FastAPI generiert automatisch **OpenAPI 3.1**-Spezifikationen, daher muss jedes von Ihnen verwendete Tool diese Version unterstützen.
///
## SDK-Generatoren von FastAPI-Sponsoren { #sdk-generators-from-fastapi-sponsors }
Dieser Abschnitt hebt **venture-unterstützte** und **firmengestützte** Lösungen hervor, die von Unternehmen entwickelt werden, welche FastAPI sponsern. Diese Produkte bieten **zusätzliche Funktionen** und **Integrationen** zusätzlich zu hochwertig generierten SDKs.
Durch das ✨ [**Sponsoring von FastAPI**](../help-fastapi.md#sponsor-the-author) ✨ helfen diese Unternehmen sicherzustellen, dass das Framework und sein **Ökosystem** gesund und **nachhaltig** bleiben.
Ihr Sponsoring zeigt auch ein starkes Engagement für die FastAPI-**Community** (Sie), was bedeutet, dass sie nicht nur einen **großartigen Service** bieten möchten, sondern auch ein **robustes und florierendes Framework**, FastAPI, unterstützen möchten. 🙇
Zum Beispiel könnten Sie ausprobieren:
* [Speakeasy](https://speakeasy.com/editor?utm_source=fastapi+repo&utm_medium=github+sponsorship)
* [Stainless](https://www.stainless.com/?utm_source=fastapi&utm_medium=referral)
* [liblab](https://developers.liblab.com/tutorials/sdk-for-fastapi?utm_source=fastapi)
Einige dieser Lösungen sind möglicherweise auch Open Source oder bieten kostenlose Tarife an, sodass Sie diese ohne finanzielle Verpflichtung ausprobieren können. Andere kommerzielle SDK-Generatoren sind online verfügbar und können dort gefunden werden. 🤓
## Ein TypeScript-SDK erstellen { #create-a-typescript-sdk }
Beginnen wir mit einer einfachen FastAPI-Anwendung:
{* ../../docs_src/generate_clients/tutorial001_py310.py hl[7:9,12:13,16:17,21] *}
Beachten Sie, dass die *Pfadoperationen* die Modelle definieren, die sie für die <abbr title="Request Anfrage: Daten, die der Client zum Server sendet">Request</abbr>- und <abbr title="Response Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Response</abbr>-<abbr title="Die eigentlichen Nutzdaten, abzüglich der Metadaten">Payload</abbr> verwenden, indem sie die Modelle `Item` und `ResponseMessage` verwenden.
### API-Dokumentation { #api-docs }
Wenn Sie zu `/docs` gehen, sehen Sie, dass es die **Schemas** für die Daten enthält, die in Requests gesendet und in Responses empfangen werden:
<img src="/img/tutorial/generate-clients/image01.png">
Sie können diese Schemas sehen, da sie mit den Modellen in der App deklariert wurden.
Diese Informationen sind im **OpenAPI-Schema** der Anwendung verfügbar und werden in der API-Dokumentation angezeigt.
Diese Informationen aus den Modellen, die in OpenAPI enthalten sind, können verwendet werden, um **den Client-Code zu generieren**.
### Hey API { #hey-api }
Sobald wir eine FastAPI-App mit den Modellen haben, können wir Hey API verwenden, um einen TypeScript-Client zu generieren. Der schnellste Weg das zu tun, ist über npx.
```sh
npx @hey-api/openapi-ts -i http://localhost:8000/openapi.json -o src/client
```
Dies generiert ein TypeScript-SDK in `./src/client`.
Sie können lernen, wie man [`@hey-api/openapi-ts` installiert](https://heyapi.dev/openapi-ts/get-started) und über die [erzeugte Ausgabe](https://heyapi.dev/openapi-ts/output) auf deren Website lesen.
### Das SDK verwenden { #using-the-sdk }
Jetzt können Sie den Client-Code importieren und verwenden. Er könnte wie folgt aussehen, beachten Sie, dass Sie eine automatische Vervollständigung für die Methoden erhalten:
<img src="/img/tutorial/generate-clients/image02.png">
Sie werden auch eine automatische Vervollständigung für die zu sendende Payload erhalten:
<img src="/img/tutorial/generate-clients/image03.png">
/// tip | Tipp
Beachten Sie die automatische Vervollständigung für `name` und `price`, die in der FastAPI-Anwendung im `Item`-Modell definiert wurden.
///
Sie erhalten Inline-Fehlerberichte für die von Ihnen gesendeten Daten:
<img src="/img/tutorial/generate-clients/image04.png">
Das Response-Objekt hat auch automatische Vervollständigung:
<img src="/img/tutorial/generate-clients/image05.png">
## FastAPI-Anwendung mit Tags { #fastapi-app-with-tags }
In vielen Fällen wird Ihre FastAPI-App größer sein und Sie werden wahrscheinlich Tags verwenden, um verschiedene Gruppen von *Pfadoperationen* zu separieren.
Zum Beispiel könnten Sie einen Abschnitt für **Items** und einen weiteren Abschnitt für **Users** haben, und diese könnten durch Tags getrennt sein:
{* ../../docs_src/generate_clients/tutorial002_py310.py hl[21,26,34] *}
### Einen TypeScript-Client mit Tags generieren { #generate-a-typescript-client-with-tags }
Wenn Sie einen Client für eine FastAPI-App generieren, die Tags verwendet, wird normalerweise der Client-Code auch anhand der Tags getrennt.
Auf diese Weise können Sie die Dinge für den Client-Code richtig ordnen und gruppieren:
<img src="/img/tutorial/generate-clients/image06.png">
In diesem Fall haben Sie:
* `ItemsService`
* `UsersService`
### Client-Methodennamen { #client-method-names }
Im Moment sehen die generierten Methodennamen wie `createItemItemsPost` nicht sehr sauber aus:
```TypeScript
ItemsService.createItemItemsPost({name: "Plumbus", price: 5})
```
... das liegt daran, dass der Client-Generator für jede *Pfadoperation* die OpenAPI-interne **Operation-ID** verwendet.
OpenAPI erfordert, dass jede Operation-ID innerhalb aller *Pfadoperationen* einzigartig ist. Daher verwendet FastAPI den **Funktionsnamen**, den **Pfad** und die **HTTP-Methode/-Operation**, um diese Operation-ID zu generieren. Denn so kann sichergestellt werden, dass die Operation-IDs einzigartig sind.
Aber ich zeige Ihnen als Nächstes, wie Sie das verbessern können. 🤓
## Benutzerdefinierte Operation-IDs und bessere Methodennamen { #custom-operation-ids-and-better-method-names }
Sie können die Art und Weise, wie diese Operation-IDs **generiert** werden, **ändern**, um sie einfacher zu machen und **einfachere Methodennamen** in den Clients zu haben.
In diesem Fall müssen Sie auf andere Weise sicherstellen, dass jede Operation-ID **einzigartig** ist.
Zum Beispiel könnten Sie sicherstellen, dass jede *Pfadoperation* einen Tag hat, und dann die Operation-ID basierend auf dem **Tag** und dem *Pfadoperation*-**Namen** (dem Funktionsnamen) generieren.
### Eine benutzerdefinierte Funktion zur Erzeugung einer eindeutigen ID erstellen { #custom-generate-unique-id-function }
FastAPI verwendet eine **eindeutige ID** für jede *Pfadoperation*, die für die **Operation-ID** und auch für die Namen aller benötigten benutzerdefinierten Modelle für Requests oder Responses verwendet wird.
Sie können diese Funktion anpassen. Sie nimmt ein `APIRoute` und gibt einen String zurück.
Hier verwendet sie beispielsweise den ersten Tag (Sie werden wahrscheinlich nur einen Tag haben) und den *Pfadoperation*-Namen (den Funktionsnamen).
Anschließend können Sie diese benutzerdefinierte Funktion als `generate_unique_id_function`-Parameter an **FastAPI** übergeben:
{* ../../docs_src/generate_clients/tutorial003_py310.py hl[6:7,10] *}
### Einen TypeScript-Client mit benutzerdefinierten Operation-IDs generieren { #generate-a-typescript-client-with-custom-operation-ids }
Wenn Sie nun den Client erneut generieren, werden Sie feststellen, dass er über die verbesserten Methodennamen verfügt:
<img src="/img/tutorial/generate-clients/image07.png">
Wie Sie sehen, haben die Methodennamen jetzt den Tag und dann den Funktionsnamen, aber keine Informationen aus dem URL-Pfad und der HTTP-Operation.
### Die OpenAPI-Spezifikation für den Client-Generator vorab modifizieren { #preprocess-the-openapi-specification-for-the-client-generator }
Der generierte Code enthält immer noch einige **verdoppelte Informationen**.
Wir wissen bereits, dass diese Methode mit den **Items** zusammenhängt, weil dieses Wort in `ItemsService` enthalten ist (vom Tag übernommen), aber wir haben den Tag-Namen dennoch im Methodennamen vorangestellt. 😕
Wir werden das wahrscheinlich weiterhin für OpenAPI allgemein beibehalten wollen, da dadurch sichergestellt wird, dass die Operation-IDs **einzigartig** sind.
Aber für den generierten Client könnten wir die OpenAPI-Operation-IDs direkt vor der Generierung der Clients **modifizieren**, um diese Methodennamen schöner und **sauberer** zu machen.
Wir könnten das OpenAPI-JSON in eine Datei `openapi.json` herunterladen und dann mit einem Skript wie dem folgenden **den präfixierten Tag entfernen**:
{* ../../docs_src/generate_clients/tutorial004_py310.py *}
//// tab | Node.js
```Javascript
{!> ../../docs_src/generate_clients/tutorial004.js!}
```
////
Damit würden die Operation-IDs von Dingen wie `items-get_items` in `get_items` umbenannt, sodass der Client-Generator einfachere Methodennamen generieren kann.
### Einen TypeScript-Client mit der vorverarbeiteten OpenAPI generieren { #generate-a-typescript-client-with-the-preprocessed-openapi }
Da das Endergebnis nun in einer `openapi.json`-Datei vorliegt, müssen Sie Ihren Eingabeort aktualisieren:
```sh
npx @hey-api/openapi-ts -i ./openapi.json -o src/client
```
Nach der Generierung des neuen Clients haben Sie jetzt **saubere Methodennamen**, mit allen **Autovervollständigungen**, **Inline-Fehlerberichten**, usw.:
<img src="/img/tutorial/generate-clients/image08.png">
## Vorteile { #benefits }
Wenn Sie die automatisch generierten Clients verwenden, erhalten Sie **Autovervollständigung** für:
* Methoden.
* Request-Payloads im Body, Query-Parameter, usw.
* Response-Payloads.
Sie erhalten auch **Inline-Fehlerberichte** für alles.
Und wann immer Sie den Backend-Code aktualisieren und **das Frontend neu generieren**, stehen alle neuen *Pfadoperationen* als Methoden zur Verfügung, die alten werden entfernt und alle anderen Änderungen werden im generierten Code reflektiert. 🤓
Das bedeutet auch, dass, wenn sich etwas ändert, dies automatisch im Client-Code **reflektiert** wird. Und wenn Sie den Client **erstellen**, wird eine Fehlermeldung ausgegeben, wenn die verwendeten Daten **nicht übereinstimmen**.
Sie würden also **viele Fehler sehr früh** im Entwicklungszyklus erkennen, anstatt darauf warten zu müssen, dass die Fehler Ihren Endbenutzern in der Produktion angezeigt werden, und dann zu versuchen, zu debuggen, wo das Problem liegt. ✨

View File

@ -0,0 +1,21 @@
# Handbuch für fortgeschrittene Benutzer { #advanced-user-guide }
## Zusatzfunktionen { #additional-features }
Das Haupt-[Tutorial Benutzerhandbuch](../tutorial/index.md) sollte ausreichen, um Ihnen einen Überblick über alle Hauptfunktionen von **FastAPI** zu geben.
In den nächsten Abschnitten sehen Sie weitere Optionen, Konfigurationen und zusätzliche Funktionen.
/// tip | Tipp
Die nächsten Abschnitte sind **nicht unbedingt „fortgeschritten“**.
Und es ist möglich, dass für Ihren Anwendungsfall die Lösung in einem davon liegt.
///
## Das Tutorial zuerst lesen { #read-the-tutorial-first }
Sie können immer noch die meisten Funktionen in **FastAPI** mit den Kenntnissen aus dem Haupt-[Tutorial Benutzerhandbuch](../tutorial/index.md) nutzen.
Und die nächsten Abschnitte setzen voraus, dass Sie es bereits gelesen haben und dass Sie diese Hauptideen kennen.

View File

@ -0,0 +1,63 @@
# JSON mit Bytes als base64 { #json-with-bytes-as-base64 }
Wenn Ihre App JSON-Daten empfangen und senden muss, Sie darin aber Binärdaten einschließen müssen, können Sie diese als base64 kodieren.
## Base64 vs Dateien { #base64-vs-files }
Prüfen Sie zunächst, ob Sie [Request Files](../tutorial/request-files.md) zum Hochladen von Binärdaten und [Benutzerdefinierte Response FileResponse](./custom-response.md#fileresponse--fileresponse-) zum Senden von Binärdaten verwenden können, anstatt sie in JSON zu kodieren.
JSON kann nur UTF-8-kodierte Strings enthalten, es kann daher keine rohen Bytes enthalten.
Base64 kann Binärdaten in Strings kodieren, dafür werden jedoch mehr Zeichen benötigt als in den ursprünglichen Binärdaten; es ist daher in der Regel weniger effizient als der Umgang mit normalen Dateien.
Verwenden Sie base64 nur, wenn Sie Binärdaten unbedingt in JSON einbetten müssen und dafür keine Dateien verwenden können.
## Pydantic `bytes` { #pydantic-bytes }
Sie können ein Pydantic-Modell mit `bytes`-Feldern deklarieren und dann in der Modellkonfiguration `val_json_bytes` verwenden, um anzugeben, dass zur *Validierung* von eingehenden JSON-Daten base64 genutzt werden soll; im Rahmen dieser Validierung wird der base64-String in Bytes dekodiert.
{* ../../docs_src/json_base64_bytes/tutorial001_py310.py ln[1:9,29:35] hl[9] *}
Wenn Sie die `/docs` aufrufen, zeigt die Dokumentation, dass das Feld `data` base64-kodierte Bytes erwartet:
<div class="screenshot">
<img src="/img/tutorial/json-base64-bytes/image01.png">
</div>
Sie könnten einen Request wie folgt senden:
```json
{
"description": "Some data",
"data": "aGVsbG8="
}
```
/// tip | Tipp
`aGVsbG8=` ist die base64-Kodierung von `hello`.
///
Anschließend dekodiert Pydantic den base64-String und stellt Ihnen die ursprünglichen Bytes im Feld `data` des Modells bereit.
Sie erhalten eine Response wie:
```json
{
"description": "Some data",
"content": "hello"
}
```
## Pydantic `bytes` für Ausgabedaten { #pydantic-bytes-for-output-data }
Sie können in der Modellkonfiguration für Ausgabedaten auch `bytes`-Felder mit `ser_json_bytes` verwenden; Pydantic wird die Bytes bei der Erzeugung der JSON-Response als base64 *serialisieren*.
{* ../../docs_src/json_base64_bytes/tutorial001_py310.py ln[1:2,12:16,29,38:41] hl[16] *}
## Pydantic `bytes` für Eingabe- und Ausgabedaten { #pydantic-bytes-for-input-and-output-data }
Und selbstverständlich können Sie dasselbe Modell so konfigurieren, dass base64 sowohl für Eingaben (*validieren*) mit `val_json_bytes` als auch für Ausgaben (*serialisieren*) mit `ser_json_bytes` verwendet wird, wenn JSON-Daten empfangen und gesendet werden.
{* ../../docs_src/json_base64_bytes/tutorial001_py310.py ln[1:2,19:26,29,44:46] hl[23:26] *}

View File

@ -0,0 +1,97 @@
# Fortgeschrittene Middleware { #advanced-middleware }
Im Haupttutorial haben Sie gelesen, wie Sie Ihrer Anwendung [benutzerdefinierte Middleware](../tutorial/middleware.md) hinzufügen können.
Und dann auch, wie man [CORS mittels der `CORSMiddleware`](../tutorial/cors.md) handhabt.
In diesem Abschnitt werden wir sehen, wie man andere Middlewares verwendet.
## ASGI-Middleware hinzufügen { #adding-asgi-middlewares }
Da **FastAPI** auf Starlette basiert und die <abbr title="Asynchrones Server-Gateway-Interface">ASGI</abbr>-Spezifikation implementiert, können Sie jede ASGI-Middleware verwenden.
Eine Middleware muss nicht speziell für FastAPI oder Starlette gemacht sein, um zu funktionieren, solange sie der ASGI-Spezifikation genügt.
Im Allgemeinen handelt es sich bei ASGI-Middleware um Klassen, die als erstes Argument eine ASGI-Anwendung erwarten.
In der Dokumentation für ASGI-Middlewares von Drittanbietern wird Ihnen wahrscheinlich gesagt, dass Sie etwa Folgendes tun sollen:
```Python
from unicorn import UnicornMiddleware
app = SomeASGIApp()
new_app = UnicornMiddleware(app, some_config="rainbow")
```
Aber FastAPI (eigentlich Starlette) bietet eine einfachere Möglichkeit, welche sicherstellt, dass die internen Middlewares zur Behandlung von Serverfehlern und benutzerdefinierten Exceptionhandlern ordnungsgemäß funktionieren.
Dazu verwenden Sie `app.add_middleware()` (wie schon im Beispiel für CORS gesehen).
```Python
from fastapi import FastAPI
from unicorn import UnicornMiddleware
app = FastAPI()
app.add_middleware(UnicornMiddleware, some_config="rainbow")
```
`app.add_middleware()` empfängt eine Middleware-Klasse als erstes Argument und dann alle weiteren Argumente, die an die Middleware übergeben werden sollen.
## Integrierte Middleware { #integrated-middlewares }
**FastAPI** enthält mehrere Middlewares für gängige Anwendungsfälle. Wir werden als Nächstes sehen, wie man sie verwendet.
/// note | Technische Details
Für die nächsten Beispiele könnten Sie auch `from starlette.middleware.something import SomethingMiddleware` verwenden.
**FastAPI** bietet mehrere Middlewares via `fastapi.middleware` an, als Annehmlichkeit für Sie, den Entwickler. Die meisten verfügbaren Middlewares kommen aber direkt von Starlette.
///
## `HTTPSRedirectMiddleware` { #httpsredirectmiddleware }
Erzwingt, dass alle eingehenden <abbr title="Request Anfrage: Daten, die der Client zum Server sendet">Requests</abbr> entweder `https` oder `wss` sein müssen.
Alle eingehenden Requests an `http` oder `ws` werden stattdessen an das sichere Schema umgeleitet.
{* ../../docs_src/advanced_middleware/tutorial001_py310.py hl[2,6] *}
## `TrustedHostMiddleware` { #trustedhostmiddleware }
Erzwingt, dass alle eingehenden Requests einen korrekt gesetzten `Host`-Header haben, um sich vor HTTP-Host-Header-Angriffen zu schützen.
{* ../../docs_src/advanced_middleware/tutorial002_py310.py hl[2,6:8] *}
Die folgenden Argumente werden unterstützt:
* `allowed_hosts` Eine Liste von Domain-Namen, die als Hostnamen zulässig sein sollten. Wildcard-Domains wie `*.example.com` werden unterstützt, um Subdomains zu matchen. Um jeden Hostnamen zu erlauben, verwenden Sie entweder `allowed_hosts=["*"]` oder lassen Sie diese Middleware weg.
* `www_redirect` Wenn auf True gesetzt, werden Requests an Nicht-www-Versionen der erlaubten Hosts zu deren www-Gegenstücken umgeleitet. Der Defaultwert ist `True`.
Wenn ein eingehender Request nicht korrekt validiert wird, wird eine `400`-<abbr title="Response Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Response</abbr> gesendet.
## `GZipMiddleware` { #gzipmiddleware }
Verarbeitet GZip-Responses für alle Requests, die „gzip“ im `Accept-Encoding`-Header enthalten.
Diese Middleware verarbeitet sowohl Standard- als auch Streaming-Responses.
{* ../../docs_src/advanced_middleware/tutorial003_py310.py hl[2,6] *}
Die folgenden Argumente werden unterstützt:
* `minimum_size` Responses, die kleiner als diese Mindestgröße in Bytes sind, nicht per GZip komprimieren. Der Defaultwert ist `500`.
* `compresslevel` Wird während der GZip-Kompression verwendet. Es ist ein Ganzzahlwert zwischen 1 und 9. Der Defaultwert ist `9`. Ein niedrigerer Wert resultiert in schnellerer Kompression, aber größeren Dateigrößen, während ein höherer Wert langsamere Kompression, aber kleinere Dateigrößen zur Folge hat.
## Andere Middlewares { #other-middlewares }
Es gibt viele andere ASGI-Middlewares.
Zum Beispiel:
* [Uvicorns `ProxyHeadersMiddleware`](https://github.com/encode/uvicorn/blob/master/uvicorn/middleware/proxy_headers.py)
* [MessagePack](https://github.com/florimondmanca/msgpack-asgi)
Um mehr über weitere verfügbare Middlewares herauszufinden, besuchen Sie [Starlettes Middleware-Dokumentation](https://www.starlette.dev/middleware/) und die [ASGI Awesome List](https://github.com/florimondmanca/awesome-asgi).

View File

@ -0,0 +1,186 @@
# OpenAPI-Callbacks { #openapi-callbacks }
Sie könnten eine API mit einer *Pfadoperation* erstellen, die einen <abbr title="Request Anfrage: Daten, die der Client zum Server sendet">Request</abbr> an eine *externe API* auslösen könnte, welche von jemand anderem erstellt wurde (wahrscheinlich derselbe Entwickler, der Ihre API *verwenden* würde).
Der Vorgang, der stattfindet, wenn Ihre API-Anwendung die *externe API* aufruft, wird als <abbr title="„Rückruf“">„Callback“</abbr> bezeichnet. Denn die Software, die der externe Entwickler geschrieben hat, sendet einen Request an Ihre API und dann *ruft Ihre API zurück* (*calls back*) und sendet einen Request an eine *externe API* (die wahrscheinlich vom selben Entwickler erstellt wurde).
In diesem Fall möchten Sie möglicherweise dokumentieren, wie diese externe API aussehen *sollte*. Welche *Pfadoperation* sie haben sollte, welchen Body sie erwarten sollte, welche <abbr title="Response Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Response</abbr> sie zurückgeben sollte, usw.
## Eine Anwendung mit Callbacks { #an-app-with-callbacks }
Sehen wir uns das alles anhand eines Beispiels an.
Stellen Sie sich vor, Sie entwickeln eine Anwendung, mit der Sie Rechnungen erstellen können.
Diese Rechnungen haben eine `id`, einen optionalen `title`, einen `customer` (Kunde) und ein `total` (Gesamtsumme).
Der Benutzer Ihrer API (ein externer Entwickler) erstellt mit einem POST-Request eine Rechnung in Ihrer API.
Dann wird Ihre API (stellen wir uns vor):
* die Rechnung an einen Kunden des externen Entwicklers senden.
* das Geld einsammeln.
* eine Benachrichtigung an den API-Benutzer (den externen Entwickler) zurücksenden.
* Dies erfolgt durch Senden eines POST-Requests (von *Ihrer API*) an eine *externe API*, die von diesem externen Entwickler bereitgestellt wird (das ist der „Callback“).
## Die normale **FastAPI**-Anwendung { #the-normal-fastapi-app }
Sehen wir uns zunächst an, wie die normale API-Anwendung aussehen würde, bevor wir den Callback hinzufügen.
Sie verfügt über eine *Pfadoperation*, die einen `Invoice`-Body empfängt, und einen Query-Parameter `callback_url`, der die URL für den Callback enthält.
Dieser Teil ist ziemlich normal, der größte Teil des Codes ist Ihnen wahrscheinlich bereits bekannt:
{* ../../docs_src/openapi_callbacks/tutorial001_py310.py hl[7:11,34:51] *}
/// tip | Tipp
Der Query-Parameter `callback_url` verwendet einen Pydantic-[Url](https://docs.pydantic.dev/latest/api/networks/)-Typ.
///
Das einzig Neue ist `callbacks=invoices_callback_router.routes` als Argument für den *Pfadoperation-Dekorator*. Wir werden als Nächstes sehen, was das ist.
## Dokumentation des Callbacks { #documenting-the-callback }
Der tatsächliche Callback-Code hängt stark von Ihrer eigenen API-Anwendung ab.
Und er wird wahrscheinlich von Anwendung zu Anwendung sehr unterschiedlich sein.
Es könnten nur eine oder zwei Codezeilen sein, wie zum Beispiel:
```Python
callback_url = "https://example.com/api/v1/invoices/events/"
httpx.post(callback_url, json={"description": "Invoice paid", "paid": True})
```
Der möglicherweise wichtigste Teil des Callbacks besteht jedoch darin, sicherzustellen, dass Ihr API-Benutzer (der externe Entwickler) die *externe API* korrekt implementiert, gemäß den Daten, die *Ihre API* im Requestbody des Callbacks senden wird, usw.
Als Nächstes fügen wir den Code hinzu, um zu dokumentieren, wie diese *externe API* aussehen sollte, um den Callback von *Ihrer API* zu empfangen.
Diese Dokumentation wird in der Swagger-Oberfläche unter `/docs` in Ihrer API angezeigt und zeigt externen Entwicklern, wie diese die *externe API* erstellen sollten.
In diesem Beispiel wird nicht der Callback selbst implementiert (das könnte nur eine Codezeile sein), sondern nur der Dokumentationsteil.
/// tip | Tipp
Der eigentliche Callback ist nur ein HTTP-Request.
Wenn Sie den Callback selbst implementieren, können Sie beispielsweise [HTTPX](https://www.python-httpx.org) oder [Requests](https://requests.readthedocs.io/) verwenden.
///
## Schreiben des Codes, der den Callback dokumentiert { #write-the-callback-documentation-code }
Dieser Code wird nicht in Ihrer Anwendung ausgeführt, wir benötigen ihn nur, um zu *dokumentieren*, wie diese *externe API* aussehen soll.
Sie wissen jedoch bereits, wie Sie mit **FastAPI** ganz einfach eine automatische Dokumentation für eine API erstellen.
Daher werden wir dasselbe Wissen nutzen, um zu dokumentieren, wie die *externe API* aussehen sollte ... indem wir die *Pfadoperation(en)* erstellen, welche die externe API implementieren soll (die, welche Ihre API aufruft).
/// tip | Tipp
Wenn Sie den Code zum Dokumentieren eines Callbacks schreiben, kann es hilfreich sein, sich vorzustellen, dass Sie dieser *externe Entwickler* sind. Und dass Sie derzeit die *externe API* implementieren, nicht *Ihre API*.
Wenn Sie diese Sichtweise (des *externen Entwicklers*) vorübergehend übernehmen, wird es offensichtlicher, wo die Parameter, das Pydantic-Modell für den Body, die Response, usw. für diese *externe API* hingehören.
///
### Einen Callback-`APIRouter` erstellen { #create-a-callback-apirouter }
Erstellen Sie zunächst einen neuen `APIRouter`, der einen oder mehrere Callbacks enthält.
{* ../../docs_src/openapi_callbacks/tutorial001_py310.py hl[1,23] *}
### Die Callback-*Pfadoperation* erstellen { #create-the-callback-path-operation }
Um die Callback-*Pfadoperation* zu erstellen, verwenden Sie denselben `APIRouter`, den Sie oben erstellt haben.
Sie sollte wie eine normale FastAPI-*Pfadoperation* aussehen:
* Sie sollte wahrscheinlich eine Deklaration des Bodys enthalten, die sie erhalten soll, z. B. `body: InvoiceEvent`.
* Und sie könnte auch eine Deklaration der Response enthalten, die zurückgegeben werden soll, z. B. `response_model=InvoiceEventReceived`.
{* ../../docs_src/openapi_callbacks/tutorial001_py310.py hl[14:16,19:20,26:30] *}
Es gibt zwei Hauptunterschiede zu einer normalen *Pfadoperation*:
* Es muss kein tatsächlicher Code vorhanden sein, da Ihre Anwendung diesen Code niemals aufruft. Sie wird nur zur Dokumentation der *externen API* verwendet. Die Funktion könnte also einfach `pass` enthalten.
* Der *Pfad* kann einen [OpenAPI-3-Ausdruck](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#key-expression) enthalten (mehr dazu weiter unten), wo er Variablen mit Parametern und Teilen des ursprünglichen Requests verwenden kann, der an *Ihre API* gesendet wurde.
### Der Callback-Pfadausdruck { #the-callback-path-expression }
Der Callback-*Pfad* kann einen [OpenAPI-3-Ausdruck](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#key-expression) enthalten, welcher Teile des ursprünglichen Requests enthalten kann, der an *Ihre API* gesendet wurde.
In diesem Fall ist es der `str`:
```Python
"{$callback_url}/invoices/{$request.body.id}"
```
Wenn Ihr API-Benutzer (der externe Entwickler) also einen Request an *Ihre API* sendet, via:
```
https://yourapi.com/invoices/?callback_url=https://www.external.org/events
```
mit einem JSON-Körper:
```JSON
{
"id": "2expen51ve",
"customer": "Mr. Richie Rich",
"total": "9999"
}
```
dann verarbeitet *Ihre API* die Rechnung und sendet irgendwann später einen Callback-Request an die `callback_url` (die *externe API*):
```
https://www.external.org/events/invoices/2expen51ve
```
mit einem JSON-Body, der etwa Folgendes enthält:
```JSON
{
"description": "Payment celebration",
"paid": true
}
```
und sie würde eine Response von dieser *externen API* mit einem JSON-Body wie dem folgenden erwarten:
```JSON
{
"ok": true
}
```
/// tip | Tipp
Beachten Sie, dass die verwendete Callback-URL die URL enthält, die als Query-Parameter in `callback_url` (`https://www.external.org/events`) empfangen wurde, und auch die Rechnungs-`id` aus dem JSON-Body (`2expen51ve`).
///
### Den Callback-Router hinzufügen { #add-the-callback-router }
An diesem Punkt haben Sie die benötigte(n) *Callback-Pfadoperation(en)* (diejenige(n), die der *externe Entwickler* in der *externen API* implementieren sollte) im Callback-Router, den Sie oben erstellt haben.
Verwenden Sie nun den Parameter `callbacks` im *Pfadoperation-Dekorator Ihrer API*, um das Attribut `.routes` (das ist eigentlich nur eine `list`e von Routen/*Pfadoperationen*) dieses Callback-Routers zu übergeben:
{* ../../docs_src/openapi_callbacks/tutorial001_py310.py hl[33] *}
/// tip | Tipp
Beachten Sie, dass Sie nicht den Router selbst (`invoices_callback_router`) an `callback=` übergeben, sondern das Attribut `.routes`, wie in `invoices_callback_router.routes`.
///
### Es in der Dokumentation testen { #check-the-docs }
Jetzt können Sie Ihre Anwendung starten und auf [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs) gehen.
Sie sehen Ihre Dokumentation, einschließlich eines Abschnitts „Callbacks“ für Ihre *Pfadoperation*, der zeigt, wie die *externe API* aussehen sollte:
<img src="/img/tutorial/openapi-callbacks/image01.png">

View File

@ -0,0 +1,55 @@
# OpenAPI Webhooks { #openapi-webhooks }
Es gibt Fälle, in denen Sie Ihren API-**Benutzern** mitteilen möchten, dass Ihre App *deren* App mit einigen Daten aufrufen (einen <abbr title="Request Anfrage: Daten, die der Client zum Server sendet">Request</abbr> senden) könnte, normalerweise um über ein bestimmtes **Event** zu **benachrichtigen**.
Das bedeutet, dass anstelle des normalen Prozesses, bei dem Ihre Benutzer Requests an Ihre API senden, **Ihre API** (oder Ihre App) **Requests an deren System** (an deren API, deren App) senden könnte.
Das wird normalerweise als **Web<abbr title="Haken, Einhängepunkt">hook</abbr>** bezeichnet.
## Webhooks-Schritte { #webhooks-steps }
Der Prozess besteht normalerweise darin, dass **Sie in Ihrem Code definieren**, welche Nachricht Sie senden möchten, den **Requestbody**.
Sie definieren auch auf irgendeine Weise, in welchen **Momenten** Ihre App diese Requests oder Events senden wird.
Und **Ihre Benutzer** definieren auf irgendeine Weise (zum Beispiel irgendwo in einem Web-<abbr title="Benutzeroberfläche für das Visualisieren und Managen von Daten">Dashboard</abbr>) die **URL**, an die Ihre App diese Requests senden soll.
Die gesamte **Logik** zur Registrierung der URLs für Webhooks und der Code zum tatsächlichen Senden dieser Requests liegt bei Ihnen. Sie schreiben es so, wie Sie möchten, in **Ihrem eigenen Code**.
## Webhooks mit **FastAPI** und OpenAPI dokumentieren { #documenting-webhooks-with-fastapi-and-openapi }
Mit **FastAPI**, mithilfe von OpenAPI, können Sie die Namen dieser Webhooks, die Arten von HTTP-Operationen, die Ihre App senden kann (z. B. `POST`, `PUT`, usw.) und die **Requestbodys** definieren, die Ihre App senden würde.
Dies kann es Ihren Benutzern viel einfacher machen, **deren APIs zu implementieren**, um Ihre **Webhook**-Requests zu empfangen. Möglicherweise können diese sogar einen Teil ihres eigenen API-Codes automatisch generieren.
/// info | Info
Webhooks sind in OpenAPI 3.1.0 und höher verfügbar und werden von FastAPI `0.99.0` und höher unterstützt.
///
## Eine App mit Webhooks { #an-app-with-webhooks }
Wenn Sie eine **FastAPI**-Anwendung erstellen, gibt es ein `webhooks`-Attribut, das Sie verwenden können, um *Webhooks* zu definieren, genauso wie Sie *Pfadoperationen* definieren würden, zum Beispiel mit `@app.webhooks.post()`.
{* ../../docs_src/openapi_webhooks/tutorial001_py310.py hl[9:12,15:20] *}
Die von Ihnen definierten Webhooks landen im **OpenAPI**-Schema und der automatischen **Dokumentations-Oberfläche**.
/// info | Info
Das `app.webhooks`-Objekt ist eigentlich nur ein `APIRouter`, derselbe Typ, den Sie verwenden würden, wenn Sie Ihre App mit mehreren Dateien strukturieren.
///
Beachten Sie, dass Sie bei Webhooks tatsächlich keinen *Pfad* (wie `/items/`) deklarieren, der Text, den Sie dort übergeben, ist lediglich eine **Kennzeichnung** des Webhooks (der Name des Events). Zum Beispiel ist in `@app.webhooks.post("new-subscription")` der Webhook-Name `new-subscription`.
Das liegt daran, dass erwartet wird, dass **Ihre Benutzer** den tatsächlichen **URL-Pfad**, an dem sie den Webhook-Request empfangen möchten, auf andere Weise definieren (z. B. über ein Web-Dashboard).
### Die Dokumentation testen { #check-the-docs }
Jetzt können Sie Ihre App starten und auf [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs) gehen.
Sie werden sehen, dass Ihre Dokumentation die normalen *Pfadoperationen* und jetzt auch einige **Webhooks** enthält:
<img src="/img/tutorial/openapi-webhooks/image01.png">

View File

@ -0,0 +1,172 @@
# Fortgeschrittene Konfiguration der Pfadoperation { #path-operation-advanced-configuration }
## OpenAPI operationId { #openapi-operationid }
/// warning | Achtung
Wenn Sie kein „Experte“ für OpenAPI sind, brauchen Sie dies wahrscheinlich nicht.
///
Mit dem Parameter `operation_id` können Sie die OpenAPI `operationId` festlegen, die in Ihrer *Pfadoperation* verwendet werden soll.
Sie müssten sicherstellen, dass sie für jede Operation eindeutig ist.
{* ../../docs_src/path_operation_advanced_configuration/tutorial001_py310.py hl[6] *}
### Verwendung des Namens der *Pfadoperation-Funktion* als operationId { #using-the-path-operation-function-name-as-the-operationid }
Wenn Sie die Funktionsnamen Ihrer API als `operationId`s verwenden möchten, können Sie über alle iterieren und die `operation_id` jeder *Pfadoperation* mit deren `APIRoute.name` überschreiben.
Sie sollten dies tun, nachdem Sie alle Ihre *Pfadoperationen* hinzugefügt haben.
{* ../../docs_src/path_operation_advanced_configuration/tutorial002_py310.py hl[2, 12:21, 24] *}
/// tip | Tipp
Wenn Sie `app.openapi()` manuell aufrufen, sollten Sie vorher die `operationId`s aktualisiert haben.
///
/// warning | Achtung
Wenn Sie dies tun, müssen Sie sicherstellen, dass jede Ihrer *Pfadoperation-Funktionen* einen eindeutigen Namen hat.
Auch wenn diese sich in unterschiedlichen Modulen (Python-Dateien) befinden.
///
## Von OpenAPI ausschließen { #exclude-from-openapi }
Um eine *Pfadoperation* aus dem generierten OpenAPI-Schema (und damit aus den automatischen Dokumentationssystemen) auszuschließen, verwenden Sie den Parameter `include_in_schema` und setzen Sie ihn auf `False`:
{* ../../docs_src/path_operation_advanced_configuration/tutorial003_py310.py hl[6] *}
## Fortgeschrittene Beschreibung mittels Docstring { #advanced-description-from-docstring }
Sie können die verwendeten Zeilen aus dem Docstring einer *Pfadoperation-Funktion* einschränken, die für OpenAPI verwendet werden.
Das Hinzufügen eines `\f` (ein maskiertes „Form Feed“-Zeichen) führt dazu, dass **FastAPI** die für OpenAPI verwendete Ausgabe an dieser Stelle abschneidet.
Sie wird nicht in der Dokumentation angezeigt, aber andere Tools (wie z. B. Sphinx) können den Rest verwenden.
{* ../../docs_src/path_operation_advanced_configuration/tutorial004_py310.py hl[17:27] *}
## Zusätzliche Responses { #additional-responses }
Sie haben wahrscheinlich gesehen, wie man das `response_model` und den `status_code` für eine *Pfadoperation* deklariert.
Das definiert die Metadaten der Haupt-<abbr title="Response Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Response</abbr> einer *Pfadoperation*.
Sie können auch zusätzliche Responses mit deren Modellen, Statuscodes usw. deklarieren.
Es gibt hier in der Dokumentation ein ganzes Kapitel darüber, Sie können es unter [Zusätzliche Responses in OpenAPI](additional-responses.md) lesen.
## OpenAPI-Extra { #openapi-extra }
Wenn Sie in Ihrer Anwendung eine *Pfadoperation* deklarieren, generiert **FastAPI** automatisch die relevanten Metadaten dieser *Pfadoperation*, die in das OpenAPI-Schema aufgenommen werden sollen.
/// note | Technische Details
In der OpenAPI-Spezifikation wird es das [Operationsobjekt](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#operation-object) genannt.
///
Es hat alle Informationen zur *Pfadoperation* und wird zur Erstellung der automatischen Dokumentation verwendet.
Es enthält `tags`, `parameters`, `requestBody`, `responses`, usw.
Dieses *Pfadoperation*-spezifische OpenAPI-Schema wird normalerweise automatisch von **FastAPI** generiert, Sie können es aber auch erweitern.
/// tip | Tipp
Dies ist ein Low-Level-Erweiterungspunkt.
Wenn Sie nur zusätzliche Responses deklarieren müssen, können Sie dies bequemer mit [Zusätzliche Responses in OpenAPI](additional-responses.md) tun.
///
Sie können das OpenAPI-Schema für eine *Pfadoperation* erweitern, indem Sie den Parameter `openapi_extra` verwenden.
### OpenAPI-Erweiterungen { #openapi-extensions }
Dieses `openapi_extra` kann beispielsweise hilfreich sein, um [OpenAPI-Erweiterungen](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#specificationExtensions) zu deklarieren:
{* ../../docs_src/path_operation_advanced_configuration/tutorial005_py310.py hl[6] *}
Wenn Sie die automatische API-Dokumentation öffnen, wird Ihre Erweiterung am Ende der spezifischen *Pfadoperation* angezeigt.
<img src="/img/tutorial/path-operation-advanced-configuration/image01.png">
Und wenn Sie die resultierende OpenAPI sehen (unter `/openapi.json` in Ihrer API), sehen Sie Ihre Erweiterung auch als Teil der spezifischen *Pfadoperation*:
```JSON hl_lines="22"
{
"openapi": "3.1.0",
"info": {
"title": "FastAPI",
"version": "0.1.0"
},
"paths": {
"/items/": {
"get": {
"summary": "Read Items",
"operationId": "read_items_items__get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
},
"x-aperture-labs-portal": "blue"
}
}
}
}
```
### Benutzerdefiniertes OpenAPI-*Pfadoperation*-Schema { #custom-openapi-path-operation-schema }
Das <abbr title="Dictionary Zuordnungstabelle: In anderen Sprachen auch Hash, Map, Objekt, Assoziatives Array genannt">Dictionary</abbr> in `openapi_extra` wird mit dem automatisch generierten OpenAPI-Schema für die *Pfadoperation* zusammengeführt (mittels Deep Merge).
Sie können dem automatisch generierten Schema also zusätzliche Daten hinzufügen.
Sie könnten sich beispielsweise dafür entscheiden, den <abbr title="Request Anfrage: Daten, die der Client zum Server sendet">Request</abbr> mit Ihrem eigenen Code zu lesen und zu validieren, ohne FastAPIs automatische Funktionen mit Pydantic zu verwenden, aber Sie könnten den Request trotzdem im OpenAPI-Schema definieren wollen.
Das könnte man mit `openapi_extra` machen:
{* ../../docs_src/path_operation_advanced_configuration/tutorial006_py310.py hl[19:36, 39:40] *}
In diesem Beispiel haben wir kein Pydantic-Modell deklariert. Tatsächlich wird der Requestbody nicht einmal als JSON <dfn title="von einem einfachen Format, wie Bytes, in Python-Objekte konvertiert">geparst</dfn>, sondern direkt als `bytes` gelesen und die Funktion `magic_data_reader()` wäre dafür verantwortlich, ihn in irgendeiner Weise zu parsen.
Dennoch können wir das zu erwartende Schema für den Requestbody deklarieren.
### Benutzerdefinierter OpenAPI-Content-Type { #custom-openapi-content-type }
Mit demselben Trick könnten Sie ein Pydantic-Modell verwenden, um das JSON-Schema zu definieren, das dann im benutzerdefinierten Abschnitt des OpenAPI-Schemas für die *Pfadoperation* enthalten ist.
Und Sie könnten dies auch tun, wenn der Datentyp im Request nicht JSON ist.
In der folgenden Anwendung verwenden wir beispielsweise weder FastAPIs integrierte Funktionalität zum Extrahieren des JSON-Schemas aus Pydantic-Modellen noch die automatische Validierung für JSON. Tatsächlich deklarieren wir den Request-Content-Type als YAML und nicht als JSON:
{* ../../docs_src/path_operation_advanced_configuration/tutorial007_py310.py hl[15:20, 22] *}
Obwohl wir nicht die standardmäßig integrierte Funktionalität verwenden, verwenden wir dennoch ein Pydantic-Modell, um das JSON-Schema für die Daten, die wir in YAML empfangen möchten, manuell zu generieren.
Dann verwenden wir den Request direkt und extrahieren den Body als `bytes`. Das bedeutet, dass FastAPI nicht einmal versucht, die Request-Payload als JSON zu parsen.
Und dann parsen wir in unserem Code diesen YAML-Inhalt direkt und verwenden dann wieder dasselbe Pydantic-Modell, um den YAML-Inhalt zu validieren:
{* ../../docs_src/path_operation_advanced_configuration/tutorial007_py310.py hl[24:31] *}
/// tip | Tipp
Hier verwenden wir dasselbe Pydantic-Modell wieder.
Aber genauso hätten wir es auch auf andere Weise validieren können.
///

View File

@ -0,0 +1,31 @@
# Response Statuscode ändern { #response-change-status-code }
Sie haben wahrscheinlich schon vorher gelesen, dass Sie einen Default-[Response-Statuscode](../tutorial/response-status-code.md) festlegen können.
In manchen Fällen müssen Sie jedoch einen anderen als den Default-Statuscode zurückgeben.
## Anwendungsfall { #use-case }
Stellen Sie sich zum Beispiel vor, Sie möchten standardmäßig den HTTP-Statuscode „OK“ `200` zurückgeben.
Wenn die Daten jedoch nicht vorhanden sind, möchten Sie diese erstellen und den HTTP-Statuscode „CREATED“ `201` zurückgeben.
Sie möchten aber dennoch in der Lage sein, die von Ihnen zurückgegebenen Daten mit einem `response_model` zu filtern und zu konvertieren.
In diesen Fällen können Sie einen `Response`-Parameter verwenden.
## Einen `Response`-Parameter verwenden { #use-a-response-parameter }
Sie können einen Parameter vom Typ `Response` in Ihrer *Pfadoperation-Funktion* deklarieren (wie Sie es auch für Cookies und Header tun können).
Anschließend können Sie den `status_code` in diesem *vorübergehenden* <abbr title="Response Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Response</abbr>-Objekt festlegen.
{* ../../docs_src/response_change_status_code/tutorial001_py310.py hl[1,9,12] *}
Und dann können Sie jedes benötigte Objekt zurückgeben, wie Sie es normalerweise tun würden (ein `dict`, ein Datenbankmodell usw.).
Und wenn Sie ein `response_model` deklariert haben, wird es weiterhin zum Filtern und Konvertieren des von Ihnen zurückgegebenen Objekts verwendet.
**FastAPI** verwendet diese *vorübergehende* Response, um den Statuscode (auch Cookies und Header) zu extrahieren und fügt diese in die endgültige Response ein, die den von Ihnen zurückgegebenen Wert enthält, gefiltert nach einem beliebigen `response_model`.
Sie können den Parameter `Response` auch in Abhängigkeiten deklarieren und den Statuscode darin festlegen. Bedenken Sie jedoch, dass der zuletzt gesetzte gewinnt.

View File

@ -0,0 +1,51 @@
# Response-Cookies { #response-cookies }
## Einen `Response`-Parameter verwenden { #use-a-response-parameter }
Sie können einen Parameter vom Typ `Response` in Ihrer *Pfadoperation-Funktion* deklarieren.
Und dann können Sie Cookies in diesem *vorübergehenden* <abbr title="Response Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Response</abbr>-Objekt setzen.
{* ../../docs_src/response_cookies/tutorial002_py310.py hl[1, 8:9] *}
Anschließend können Sie wie gewohnt jedes gewünschte Objekt zurückgeben (ein `dict`, ein Datenbankmodell, usw.).
Und wenn Sie ein `response_model` deklariert haben, wird es weiterhin zum Filtern und Konvertieren des von Ihnen zurückgegebenen Objekts verwendet.
**FastAPI** verwendet diese *vorübergehende* Response, um die Cookies (auch Header und Statuscode) zu extrahieren und fügt diese in die endgültige Response ein, die den von Ihnen zurückgegebenen Wert enthält, gefiltert nach einem beliebigen `response_model`.
Sie können den `Response`-Parameter auch in Abhängigkeiten deklarieren und darin Cookies (und Header) setzen.
## Eine `Response` direkt zurückgeben { #return-a-response-directly }
Sie können Cookies auch erstellen, wenn Sie eine `Response` direkt in Ihrem Code zurückgeben.
Dazu können Sie eine Response erstellen, wie unter [Eine Response direkt zurückgeben](response-directly.md) beschrieben.
Setzen Sie dann Cookies darin und geben Sie sie dann zurück:
{* ../../docs_src/response_cookies/tutorial001_py310.py hl[10:12] *}
/// tip | Tipp
Beachten Sie, dass, wenn Sie eine Response direkt zurückgeben, anstatt den `Response`-Parameter zu verwenden, FastAPI diese direkt zurückgibt.
Sie müssen also sicherstellen, dass Ihre Daten vom richtigen Typ sind. Z. B. sollten diese mit JSON kompatibel sein, wenn Sie eine `JSONResponse` zurückgeben.
Und auch, dass Sie keine Daten senden, die durch ein `response_model` hätten gefiltert werden sollen.
///
### Mehr Informationen { #more-info }
/// note | Technische Details
Sie können auch `from starlette.responses import Response` oder `from starlette.responses import JSONResponse` verwenden.
**FastAPI** bietet dieselben `starlette.responses` auch via `fastapi.responses` an, als Annehmlichkeit für Sie, den Entwickler. Die meisten verfügbaren Responses kommen aber direkt von Starlette.
Und da die `Response` häufig zum Setzen von Headern und Cookies verwendet wird, stellt **FastAPI** diese auch unter `fastapi.Response` bereit.
///
Um alle verfügbaren Parameter und Optionen anzuzeigen, sehen Sie sich deren [Dokumentation in Starlette](https://www.starlette.dev/responses/#set-cookie) an.

View File

@ -0,0 +1,83 @@
# Eine Response direkt zurückgeben { #return-a-response-directly }
Wenn Sie eine **FastAPI** *Pfadoperation* erstellen, können Sie normalerweise beliebige Daten davon zurückgeben: ein `dict`, eine `list`, ein Pydantic-Modell, ein Datenbankmodell, usw.
Wenn Sie ein [Responsemodell](../tutorial/response-model.md) deklarieren, wird FastAPI es verwenden, um die Daten mithilfe von Pydantic nach JSON zu serialisieren.
Wenn Sie kein Responsemodell deklarieren, verwendet FastAPI den `jsonable_encoder`, wie in [JSON-kompatibler Encoder](../tutorial/encoder.md) erläutert, und packt die Daten in eine `JSONResponse`.
Sie könnten auch direkt eine `JSONResponse` erstellen und zurückgeben.
/// tip | Tipp
Normalerweise erzielen Sie eine deutlich bessere Leistung, wenn Sie ein [Responsemodell](../tutorial/response-model.md) verwenden, als wenn Sie direkt eine `JSONResponse` zurückgeben, da die Serialisierung der Daten dabei mit Pydantic in Rust erfolgt.
///
## Eine `Response` zurückgeben { #return-a-response }
Tatsächlich können Sie jede `Response` oder jede Unterklasse davon zurückgeben.
/// info | Info
`JSONResponse` selbst ist eine Unterklasse von `Response`.
///
Und wenn Sie eine `Response` zurückgeben, wird **FastAPI** diese direkt weiterleiten.
Es wird keine Datenkonvertierung mit Pydantic-Modellen durchführen, es wird den Inhalt nicht in irgendeinen Typ konvertieren, usw.
Dadurch haben Sie viel Flexibilität. Sie können jeden Datentyp zurückgeben, jede Datendeklaration oder -validierung überschreiben, usw.
Das bringt Ihnen aber auch viel Verantwortung. Sie müssen sicherstellen, dass die von Ihnen zurückgegebenen Daten korrekt sind, das richtige Format haben, serialisierbar sind, usw.
## Verwendung des `jsonable_encoder` in einer `Response` { #using-the-jsonable-encoder-in-a-response }
Da **FastAPI** keine Änderungen an einer von Ihnen zurückgegebenen `Response` vornimmt, müssen Sie sicherstellen, dass deren Inhalt dafür bereit ist.
Sie können beispielsweise kein Pydantic-Modell in eine `JSONResponse` einfügen, ohne es zuvor in ein `dict` zu konvertieren, bei dem alle Datentypen (wie `datetime`, `UUID`, usw.) in JSON-kompatible Typen konvertiert wurden.
In diesen Fällen können Sie den `jsonable_encoder` verwenden, um Ihre Daten zu konvertieren, bevor Sie sie an eine Response übergeben:
{* ../../docs_src/response_directly/tutorial001_py310.py hl[5:6,20:21] *}
/// note | Technische Details
Sie könnten auch `from starlette.responses import JSONResponse` verwenden.
**FastAPI** bietet dieselben `starlette.responses` auch via `fastapi.responses` an, als Annehmlichkeit für Sie, den Entwickler. Die meisten verfügbaren Responses kommen aber direkt von Starlette.
///
## Eine benutzerdefinierte `Response` zurückgeben { #returning-a-custom-response }
Das obige Beispiel zeigt alle Teile, die Sie benötigen, ist aber noch nicht sehr nützlich, da Sie das `item` einfach direkt hätten zurückgeben können, und **FastAPI** würde es für Sie in eine `JSONResponse` einfügen, es in ein `dict` konvertieren, usw. All das standardmäßig.
Sehen wir uns nun an, wie Sie damit eine benutzerdefinierte Response zurückgeben können.
Nehmen wir an, Sie möchten eine [XML](https://en.wikipedia.org/wiki/XML)-Response zurückgeben.
Sie könnten Ihren XML-Inhalt als String in eine `Response` einfügen und sie zurückgeben:
{* ../../docs_src/response_directly/tutorial002_py310.py hl[1,18] *}
## Funktionsweise eines Responsemodells { #how-a-response-model-works }
Wenn Sie in einer Pfadoperation ein [Responsemodell - Rückgabetyp](../tutorial/response-model.md) deklarieren, wird **FastAPI** es verwenden, um die Daten mithilfe von Pydantic nach JSON zu serialisieren.
{* ../../docs_src/response_model/tutorial001_01_py310.py hl[16,21] *}
Da dies auf der Rust-Seite geschieht, ist die Leistung deutlich besser, als wenn es mit normalem Python und der Klasse `JSONResponse` erfolgen würde.
Wenn Sie ein `response_model` oder einen Rückgabetyp verwenden, nutzt FastAPI weder den `jsonable_encoder` (was langsamer wäre) zur Konvertierung der Daten noch die Klasse `JSONResponse`.
Stattdessen nimmt es die von Pydantic mithilfe des Responsemodells (oder Rückgabetyps) generierten JSON-Bytes und gibt direkt eine `Response` mit dem richtigen Mediatyp für JSON (`application/json`) zurück.
## Anmerkungen { #notes }
Wenn Sie eine `Response` direkt zurücksenden, werden deren Daten weder validiert, konvertiert (serialisiert), noch automatisch dokumentiert.
Sie können sie aber trotzdem wie unter [Zusätzliche Responses in OpenAPI](additional-responses.md) beschrieben dokumentieren.
In späteren Abschnitten erfahren Sie, wie Sie diese benutzerdefinierten `Response`s verwenden/deklarieren und gleichzeitig über automatische Datenkonvertierung, Dokumentation, usw. verfügen.

View File

@ -0,0 +1,41 @@
# Response-Header { #response-headers }
## Einen `Response`-Parameter verwenden { #use-a-response-parameter }
Sie können einen Parameter vom Typ `Response` in Ihrer *Pfadoperation-Funktion* deklarieren (wie Sie es auch für Cookies tun können).
Und dann können Sie Header in diesem *vorübergehenden* <abbr title="Response Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Response</abbr>-Objekt festlegen.
{* ../../docs_src/response_headers/tutorial002_py310.py hl[1, 7:8] *}
Anschließend können Sie wie gewohnt jedes gewünschte Objekt zurückgeben (ein `dict`, ein Datenbankmodell, usw.).
Und wenn Sie ein `response_model` deklariert haben, wird es weiterhin zum Filtern und Konvertieren des von Ihnen zurückgegebenen Objekts verwendet.
**FastAPI** verwendet diese *vorübergehende* Response, um die Header (auch Cookies und Statuscode) zu extrahieren und fügt diese in die endgültige Response ein, die den von Ihnen zurückgegebenen Wert enthält, gefiltert nach einem beliebigen `response_model`.
Sie können den Parameter `Response` auch in Abhängigkeiten deklarieren und darin Header (und Cookies) festlegen.
## Eine `Response` direkt zurückgeben { #return-a-response-directly }
Sie können auch Header hinzufügen, wenn Sie eine `Response` direkt zurückgeben.
Erstellen Sie eine Response wie in [Eine Response direkt zurückgeben](response-directly.md) beschrieben und übergeben Sie die Header als zusätzlichen Parameter:
{* ../../docs_src/response_headers/tutorial001_py310.py hl[10:12] *}
/// note | Technische Details
Sie können auch `from starlette.responses import Response` oder `from starlette.responses import JSONResponse` verwenden.
**FastAPI** bietet dieselben `starlette.responses` auch via `fastapi.responses` an, als Annehmlichkeit für Sie, den Entwickler. Die meisten verfügbaren Responses kommen aber direkt von Starlette.
Und da die `Response` häufig zum Setzen von Headern und Cookies verwendet wird, stellt **FastAPI** diese auch unter `fastapi.Response` bereit.
///
## Benutzerdefinierte Header { #custom-headers }
Beachten Sie, dass benutzerdefinierte proprietäre Header [mit dem Präfix `X-`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) hinzugefügt werden können.
Wenn Sie jedoch benutzerdefinierte Header haben, die ein Client in einem Browser sehen können soll, müssen Sie diese zu Ihrer CORS-Konfiguration hinzufügen (weitere Informationen finden Sie unter [CORS (Cross-Origin Resource Sharing)](../tutorial/cors.md)), unter Verwendung des Parameters `expose_headers`, dokumentiert in [Starlettes CORS-Dokumentation](https://www.starlette.dev/middleware/#corsmiddleware).

View File

@ -0,0 +1,107 @@
# HTTP Basic Auth { #http-basic-auth }
Für die einfachsten Fälle können Sie <abbr title="HTTP-Basisauthentifizierung">HTTP Basic Auth</abbr> verwenden.
Bei HTTP Basic Auth erwartet die Anwendung einen Header, der einen Benutzernamen und ein Passwort enthält.
Wenn sie diesen nicht empfängt, gibt sie den HTTP-Error 401 „Unauthorized“ zurück.
Und gibt einen Header `WWW-Authenticate` mit dem Wert `Basic` und einem optionalen <abbr title="Bereich">`realm`</abbr>-Parameter zurück.
Dadurch wird der Browser angewiesen, die integrierte Eingabeaufforderung für einen Benutzernamen und ein Passwort anzuzeigen.
Wenn Sie dann den Benutzernamen und das Passwort eingeben, sendet der Browser diese automatisch im Header.
## Einfaches HTTP Basic Auth { #simple-http-basic-auth }
* Importieren Sie `HTTPBasic` und `HTTPBasicCredentials`.
* Erstellen Sie mit `HTTPBasic` ein „`security`-Schema“.
* Verwenden Sie dieses `security` mit einer Abhängigkeit in Ihrer *Pfadoperation*.
* Diese gibt ein Objekt vom Typ `HTTPBasicCredentials` zurück:
* Es enthält den gesendeten `username` und das gesendete `password`.
{* ../../docs_src/security/tutorial006_an_py310.py hl[4,8,12] *}
Wenn Sie versuchen, die URL zum ersten Mal zu öffnen (oder in der Dokumentation auf den Button „Execute“ zu klicken), wird der Browser Sie nach Ihrem Benutzernamen und Passwort fragen:
<img src="/img/tutorial/security/image12.png">
## Den Benutzernamen überprüfen { #check-the-username }
Hier ist ein vollständigeres Beispiel.
Verwenden Sie eine Abhängigkeit, um zu überprüfen, ob Benutzername und Passwort korrekt sind.
Verwenden Sie dazu das Python-Standardmodul [`secrets`](https://docs.python.org/3/library/secrets.html), um den Benutzernamen und das Passwort zu überprüfen.
`secrets.compare_digest()` benötigt `bytes` oder einen `str`, welcher nur ASCII-Zeichen (solche der englischen Sprache) enthalten darf, das bedeutet, dass es nicht mit Zeichen wie `á`, wie in `Sebastián`, funktionieren würde.
Um dies zu lösen, konvertieren wir zunächst den `username` und das `password` in UTF-8-codierte `bytes`.
Dann können wir `secrets.compare_digest()` verwenden, um sicherzustellen, dass `credentials.username` `"stanleyjobson"` und `credentials.password` `"swordfish"` ist.
{* ../../docs_src/security/tutorial007_an_py310.py hl[1,12:24] *}
Dies wäre das gleiche wie:
```Python
if not (credentials.username == "stanleyjobson") or not (credentials.password == "swordfish"):
# Einen Error zurückgeben
...
```
Aber durch die Verwendung von `secrets.compare_digest()` ist dieser Code sicher vor einer Art von Angriffen, die „Timing-Angriffe“ genannt werden.
### Timing-Angriffe { #timing-attacks }
Aber was ist ein „Timing-Angriff“?
Stellen wir uns vor, dass einige Angreifer versuchen, den Benutzernamen und das Passwort zu erraten.
Und sie senden einen <abbr title="Request Anfrage: Daten, die der Client zum Server sendet">Request</abbr> mit dem Benutzernamen `johndoe` und dem Passwort `love123`.
Dann würde der Python-Code in Ihrer Anwendung etwa so aussehen:
```Python
if "johndoe" == "stanleyjobson" and "love123" == "swordfish":
...
```
Aber genau in dem Moment, in dem Python das erste `j` in `johndoe` mit dem ersten `s` in `stanleyjobson` vergleicht, gibt es `False` zurück, da es bereits weiß, dass diese beiden Strings nicht identisch sind, und denkt, „Es besteht keine Notwendigkeit, weitere Berechnungen mit dem Vergleich der restlichen Buchstaben zu verschwenden“. Und Ihre Anwendung wird zurückgeben „Incorrect username or password“.
Doch dann versuchen es die Angreifer mit dem Benutzernamen `stanleyjobsox` und dem Passwort `love123`.
Und Ihr Anwendungscode macht etwa Folgendes:
```Python
if "stanleyjobsox" == "stanleyjobson" and "love123" == "swordfish":
...
```
Python muss das gesamte `stanleyjobso` in `stanleyjobsox` und `stanleyjobson` vergleichen, bevor es erkennt, dass beide Zeichenfolgen nicht gleich sind. Daher wird es einige zusätzliche Mikrosekunden dauern, bis die <abbr title="Response Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Response</abbr> „Incorrect username or password“ erfolgt.
#### Die Zeit zum Antworten hilft den Angreifern { #the-time-to-answer-helps-the-attackers }
Wenn die Angreifer zu diesem Zeitpunkt feststellen, dass der Server einige Mikrosekunden länger braucht, um die Response „Incorrect username or password“ zu senden, wissen sie, dass sie _etwas_ richtig gemacht haben, einige der Anfangsbuchstaben waren richtig.
Und dann können sie es noch einmal versuchen, wohl wissend, dass es wahrscheinlich eher etwas mit `stanleyjobsox` als mit `johndoe` zu tun hat.
#### Ein „professioneller“ Angriff { #a-professional-attack }
Natürlich würden die Angreifer das alles nicht von Hand versuchen, sondern ein Programm dafür schreiben, möglicherweise mit Tausenden oder Millionen Tests pro Sekunde. Und würden jeweils nur einen zusätzlichen richtigen Buchstaben erhalten.
Aber so hätten die Angreifer in wenigen Minuten oder Stunden mit der „Hilfe“ unserer Anwendung den richtigen Benutzernamen und das richtige Passwort erraten, indem sie die Zeitspanne zur Hilfe nehmen, die diese zur Beantwortung benötigt.
#### Das Problem beheben mittels `secrets.compare_digest()` { #fix-it-with-secrets-compare-digest }
Aber in unserem Code verwenden wir tatsächlich `secrets.compare_digest()`.
Damit wird, kurz gesagt, der Vergleich von `stanleyjobsox` mit `stanleyjobson` genauso lange dauern wie der Vergleich von `johndoe` mit `stanleyjobson`. Und das Gleiche gilt für das Passwort.
So ist Ihr Anwendungscode, dank der Verwendung von `secrets.compare_digest()`, vor dieser ganzen Klasse von Sicherheitsangriffen geschützt.
### Den Error zurückgeben { #return-the-error }
Nachdem Sie festgestellt haben, dass die Anmeldeinformationen falsch sind, geben Sie eine `HTTPException` mit dem Statuscode 401 zurück (derselbe, der auch zurückgegeben wird, wenn keine Anmeldeinformationen angegeben werden) und fügen den Header `WWW-Authenticate` hinzu, damit der Browser die Anmeldeaufforderung erneut anzeigt:
{* ../../docs_src/security/tutorial007_an_py310.py hl[26:30] *}

View File

@ -0,0 +1,19 @@
# Fortgeschrittene Sicherheit { #advanced-security }
## Zusatzfunktionen { #additional-features }
Neben den in [Tutorial Benutzerhandbuch: Sicherheit](../../tutorial/security/index.md) behandelten Funktionen gibt es noch einige zusätzliche Funktionen zur Handhabung der Sicherheit.
/// tip | Tipp
Die nächsten Abschnitte sind **nicht unbedingt „fortgeschritten“**.
Und es ist möglich, dass für Ihren Anwendungsfall die Lösung in einem davon liegt.
///
## Das Tutorial zuerst lesen { #read-the-tutorial-first }
Die nächsten Abschnitte setzen voraus, dass Sie das Haupt-[Tutorial Benutzerhandbuch: Sicherheit](../../tutorial/security/index.md) bereits gelesen haben.
Sie basieren alle auf den gleichen Konzepten, ermöglichen jedoch einige zusätzliche Funktionalitäten.

View File

@ -0,0 +1,274 @@
# OAuth2-Scopes { #oauth2-scopes }
Sie können OAuth2-<abbr title="Geltungsbereiche">Scopes</abbr> direkt in **FastAPI** verwenden, sie sind nahtlos integriert.
Das ermöglicht es Ihnen, ein feingranuliertes Berechtigungssystem nach dem OAuth2-Standard in Ihre OpenAPI-Anwendung (und deren API-Dokumentation) zu integrieren.
OAuth2 mit Scopes ist der Mechanismus, der von vielen großen Authentifizierungsanbietern wie Facebook, Google, GitHub, Microsoft, X (Twitter) usw. verwendet wird. Sie verwenden ihn, um Benutzern und Anwendungen spezifische Berechtigungen zu erteilen.
Jedes Mal, wenn Sie sich mit Facebook, Google, GitHub, Microsoft oder X (Twitter) anmelden („log in with“), verwendet die entsprechende Anwendung OAuth2 mit Scopes.
In diesem Abschnitt erfahren Sie, wie Sie Authentifizierung und Autorisierung mit demselben OAuth2, mit Scopes in Ihrer **FastAPI**-Anwendung verwalten.
/// warning | Achtung
Dies ist ein mehr oder weniger fortgeschrittener Abschnitt. Wenn Sie gerade erst anfangen, können Sie ihn überspringen.
Sie benötigen nicht unbedingt OAuth2-Scopes, und Sie können die Authentifizierung und Autorisierung handhaben wie Sie möchten.
Aber OAuth2 mit Scopes kann bequem in Ihre API (mit OpenAPI) und deren API-Dokumentation integriert werden.
Dennoch, verwenden Sie solche Scopes oder andere Sicherheits-/Autorisierungsanforderungen in Ihrem Code so wie Sie es möchten.
In vielen Fällen kann OAuth2 mit Scopes ein Overkill sein.
Aber wenn Sie wissen, dass Sie es brauchen oder neugierig sind, lesen Sie weiter.
///
## OAuth2-Scopes und OpenAPI { #oauth2-scopes-and-openapi }
Die OAuth2-Spezifikation definiert „Scopes“ als eine Liste von durch Leerzeichen getrennten Strings.
Der Inhalt jedes dieser Strings kann ein beliebiges Format haben, sollte jedoch keine Leerzeichen enthalten.
Diese Scopes stellen „Berechtigungen“ dar.
In OpenAPI (z. B. der API-Dokumentation) können Sie „Sicherheitsschemas“ definieren.
Wenn eines dieser Sicherheitsschemas OAuth2 verwendet, können Sie auch Scopes deklarieren und verwenden.
Jeder „Scope“ ist nur ein String (ohne Leerzeichen).
Er wird normalerweise verwendet, um bestimmte Sicherheitsberechtigungen zu deklarieren, zum Beispiel:
* `users:read` oder `users:write` sind gängige Beispiele.
* `instagram_basic` wird von Facebook / Instagram verwendet.
* `https://www.googleapis.com/auth/drive` wird von Google verwendet.
/// info | Info
In OAuth2 ist ein „Scope“ nur ein String, der eine bestimmte erforderliche Berechtigung deklariert.
Es spielt keine Rolle, ob er andere Zeichen wie `:` enthält oder ob es eine URL ist.
Diese Details sind implementierungsspezifisch.
Für OAuth2 sind es einfach nur Strings.
///
## Gesamtübersicht { #global-view }
Sehen wir uns zunächst kurz die Teile an, die sich gegenüber den Beispielen im Haupt-**Tutorial Benutzerhandbuch** für [OAuth2 mit Password (und Hashing), Bearer mit JWT-Tokens](../../tutorial/security/oauth2-jwt.md) ändern. Diesmal verwenden wir OAuth2-Scopes:
{* ../../docs_src/security/tutorial005_an_py310.py hl[5,9,13,47,65,106,108:116,122:126,130:136,141,157] *}
Sehen wir uns diese Änderungen nun Schritt für Schritt an.
## OAuth2-Sicherheitsschema { #oauth2-security-scheme }
Die erste Änderung ist, dass wir jetzt das OAuth2-Sicherheitsschema mit zwei verfügbaren Scopes deklarieren: `me` und `items`.
Der `scopes`-Parameter erhält ein <abbr title="Dictionary Zuordnungstabelle: In anderen Sprachen auch Hash, Map, Objekt, Assoziatives Array genannt">`dict`</abbr> mit jedem Scope als Schlüssel und dessen Beschreibung als Wert:
{* ../../docs_src/security/tutorial005_an_py310.py hl[63:66] *}
Da wir diese Scopes jetzt deklarieren, werden sie in der API-Dokumentation angezeigt, wenn Sie sich einloggen/autorisieren.
Und Sie können auswählen, auf welche Scopes Sie Zugriff haben möchten: `me` und `items`.
Das ist derselbe Mechanismus, der verwendet wird, wenn Sie beim Anmelden mit Facebook, Google, GitHub, usw. Berechtigungen erteilen:
<img src="/img/tutorial/security/image11.png">
## JWT-Token mit Scopes { #jwt-token-with-scopes }
Ändern Sie nun die Token-*Pfadoperation*, um die angeforderten Scopes zurückzugeben.
Wir verwenden immer noch dasselbe `OAuth2PasswordRequestForm`. Es enthält eine Eigenschaft `scopes` mit einer `list`e von `str`s für jeden Scope, den es im <abbr title="Request Anfrage: Daten, die der Client zum Server sendet">Request</abbr> erhalten hat.
Und wir geben die Scopes als Teil des JWT-Tokens zurück.
/// danger | Gefahr
Der Einfachheit halber fügen wir hier die empfangenen Scopes direkt zum Token hinzu.
Aus Sicherheitsgründen sollten Sie jedoch sicherstellen, dass Sie in Ihrer Anwendung nur die Scopes hinzufügen, die der Benutzer tatsächlich haben kann, oder die Sie vordefiniert haben.
///
{* ../../docs_src/security/tutorial005_an_py310.py hl[157] *}
## Scopes in *Pfadoperationen* und Abhängigkeiten deklarieren { #declare-scopes-in-path-operations-and-dependencies }
Jetzt deklarieren wir, dass die *Pfadoperation* für `/users/me/items/` den Scope `items` erfordert.
Dazu importieren und verwenden wir `Security` von `fastapi`.
Sie können `Security` verwenden, um Abhängigkeiten zu deklarieren (genau wie `Depends`), aber `Security` erhält auch einen Parameter `scopes` mit einer Liste von Scopes (Strings).
In diesem Fall übergeben wir eine Abhängigkeitsfunktion `get_current_active_user` an `Security` (genauso wie wir es mit `Depends` tun würden).
Wir übergeben aber auch eine `list`e von Scopes, in diesem Fall mit nur einem Scope: `items` (es könnten mehrere sein).
Und die Abhängigkeitsfunktion `get_current_active_user` kann auch Unterabhängigkeiten deklarieren, nicht nur mit `Depends`, sondern auch mit `Security`. Ihre eigene Unterabhängigkeitsfunktion (`get_current_user`) und weitere Scope-Anforderungen deklarierend.
In diesem Fall erfordert sie den Scope `me` (sie könnte mehr als einen Scope erfordern).
/// note | Hinweis
Sie müssen nicht unbedingt an verschiedenen Stellen verschiedene Scopes hinzufügen.
Wir tun dies hier, um zu demonstrieren, wie **FastAPI** auf verschiedenen Ebenen deklarierte Scopes verarbeitet.
///
{* ../../docs_src/security/tutorial005_an_py310.py hl[5,141,172] *}
/// info | Technische Details
`Security` ist tatsächlich eine Unterklasse von `Depends` und hat nur noch einen zusätzlichen Parameter, den wir später kennenlernen werden.
Durch die Verwendung von `Security` anstelle von `Depends` weiß **FastAPI** jedoch, dass es Sicherheits-Scopes deklarieren, intern verwenden und die API mit OpenAPI dokumentieren kann.
Wenn Sie jedoch `Query`, `Path`, `Depends`, `Security` und andere von `fastapi` importieren, handelt es sich tatsächlich um Funktionen, die spezielle Klassen zurückgeben.
///
## `SecurityScopes` verwenden { #use-securityscopes }
Aktualisieren Sie nun die Abhängigkeit `get_current_user`.
Das ist diejenige, die von den oben genannten Abhängigkeiten verwendet wird.
Hier verwenden wir dasselbe OAuth2-Schema, das wir zuvor erstellt haben, und deklarieren es als Abhängigkeit: `oauth2_scheme`.
Da diese Abhängigkeitsfunktion selbst keine Scope-Anforderungen hat, können wir `Depends` mit `oauth2_scheme` verwenden. Wir müssen `Security` nicht verwenden, wenn wir keine Sicherheits-Scopes angeben müssen.
Wir deklarieren auch einen speziellen Parameter vom Typ `SecurityScopes`, der aus `fastapi.security` importiert wird.
Diese `SecurityScopes`-Klasse ähnelt `Request` (`Request` wurde verwendet, um das Request-Objekt direkt zu erhalten).
{* ../../docs_src/security/tutorial005_an_py310.py hl[9,106] *}
## Die `scopes` verwenden { #use-the-scopes }
Der Parameter `security_scopes` wird vom Typ `SecurityScopes` sein.
Dieses verfügt über ein Attribut `scopes` mit einer Liste, die alle von ihm selbst benötigten Scopes enthält und ferner alle Abhängigkeiten, die dieses als Unterabhängigkeit verwenden. Sprich, alle „Dependanten“ ... das mag verwirrend klingen, wird aber später noch einmal erklärt.
Das `security_scopes`-Objekt (der Klasse `SecurityScopes`) stellt außerdem ein `scope_str`-Attribut mit einem einzelnen String bereit, der die durch Leerzeichen getrennten Scopes enthält (den werden wir verwenden).
Wir erstellen eine `HTTPException`, die wir später an mehreren Stellen wiederverwenden (`raise`n) können.
In diese Exception fügen wir (falls vorhanden) die erforderlichen Scopes als durch Leerzeichen getrennten String ein (unter Verwendung von `scope_str`). Wir fügen diesen String mit den Scopes in den Header `WWW-Authenticate` ein (das ist Teil der Spezifikation).
{* ../../docs_src/security/tutorial005_an_py310.py hl[106,108:116] *}
## Den `username` und das Format der Daten überprüfen { #verify-the-username-and-data-shape }
Wir verifizieren, dass wir einen `username` erhalten, und extrahieren die Scopes.
Und dann validieren wir diese Daten mit dem Pydantic-Modell (wobei wir die `ValidationError`-Exception abfangen), und wenn wir beim Lesen des JWT-Tokens oder beim Validieren der Daten mit Pydantic einen Fehler erhalten, lösen wir die zuvor erstellte `HTTPException` aus.
Dazu aktualisieren wir das Pydantic-Modell `TokenData` mit einem neuen Attribut `scopes`.
Durch die Validierung der Daten mit Pydantic können wir sicherstellen, dass wir beispielsweise präzise eine `list`e von `str`s mit den Scopes und einen `str` mit dem `username` haben.
Anstelle beispielsweise eines `dict`s oder etwas anderem, was später in der Anwendung zu Fehlern führen könnte und darum ein Sicherheitsrisiko darstellt.
Wir verifizieren auch, dass wir einen Benutzer mit diesem Benutzernamen haben, und wenn nicht, lösen wir dieselbe Exception aus, die wir zuvor erstellt haben.
{* ../../docs_src/security/tutorial005_an_py310.py hl[47,117:129] *}
## Die `scopes` verifizieren { #verify-the-scopes }
Wir überprüfen nun, ob das empfangene Token alle Scopes enthält, die von dieser Abhängigkeit und deren Verwendern (einschließlich *Pfadoperationen*) gefordert werden. Andernfalls lösen wir eine `HTTPException` aus.
Hierzu verwenden wir `security_scopes.scopes`, das eine `list`e mit allen diesen Scopes als `str` enthält.
{* ../../docs_src/security/tutorial005_an_py310.py hl[130:136] *}
## Abhängigkeitsbaum und Scopes { #dependency-tree-and-scopes }
Sehen wir uns diesen Abhängigkeitsbaum und die Scopes noch einmal an.
Da die Abhängigkeit `get_current_active_user` von `get_current_user` abhängt, wird der bei `get_current_active_user` deklarierte Scope `"me"` in die Liste der erforderlichen Scopes in `security_scopes.scopes` aufgenommen, das an `get_current_user` übergeben wird.
Die *Pfadoperation* selbst deklariert auch einen Scope, `"items"`, sodass dieser auch in der Liste der `security_scopes.scopes` enthalten ist, die an `get_current_user` übergeben wird.
So sieht die Hierarchie der Abhängigkeiten und Scopes aus:
* Die *Pfadoperation* `read_own_items` hat:
* Erforderliche Scopes `["items"]` mit der Abhängigkeit:
* `get_current_active_user`:
* Die Abhängigkeitsfunktion `get_current_active_user` hat:
* Erforderliche Scopes `["me"]` mit der Abhängigkeit:
* `get_current_user`:
* Die Abhängigkeitsfunktion `get_current_user` hat:
* Selbst keine erforderlichen Scopes.
* Eine Abhängigkeit, die `oauth2_scheme` verwendet.
* Einen `security_scopes`-Parameter vom Typ `SecurityScopes`:
* Dieser `security_scopes`-Parameter hat ein Attribut `scopes` mit einer `list`e, die alle oben deklarierten Scopes enthält, sprich:
* `security_scopes.scopes` enthält `["me", "items"]` für die *Pfadoperation* `read_own_items`.
* `security_scopes.scopes` enthält `["me"]` für die *Pfadoperation* `read_users_me`, da das in der Abhängigkeit `get_current_active_user` deklariert ist.
* `security_scopes.scopes` wird `[]` (nichts) für die *Pfadoperation* `read_system_status` enthalten, da diese keine `Security` mit `scopes` deklariert hat, und deren Abhängigkeit `get_current_user` ebenfalls keinerlei `scopes` deklariert.
/// tip | Tipp
Das Wichtige und „Magische“ hier ist, dass `get_current_user` für jede *Pfadoperation* eine andere Liste von `scopes` hat, die überprüft werden.
Alles hängt von den „Scopes“ ab, die in jeder *Pfadoperation* und jeder Abhängigkeit im Abhängigkeitsbaum für diese bestimmte *Pfadoperation* deklariert wurden.
///
## Weitere Details zu `SecurityScopes` { #more-details-about-securityscopes }
Sie können `SecurityScopes` an jeder Stelle und an mehreren Stellen verwenden, es muss sich nicht in der „Wurzel“-Abhängigkeit befinden.
Es wird immer die Sicherheits-Scopes enthalten, die in den aktuellen `Security`-Abhängigkeiten deklariert sind und in allen Abhängigkeiten für **diese spezifische** *Pfadoperation* und **diesen spezifischen** Abhängigkeitsbaum.
Da die `SecurityScopes` alle von den Verwendern der Abhängigkeiten deklarierten Scopes enthalten, können Sie damit überprüfen, ob ein Token in einer zentralen Abhängigkeitsfunktion über die erforderlichen Scopes verfügt, und dann unterschiedliche Scope-Anforderungen in unterschiedlichen *Pfadoperationen* deklarieren.
Diese werden für jede *Pfadoperation* unabhängig überprüft.
## Es testen { #check-it }
Wenn Sie die API-Dokumentation öffnen, können Sie sich authentisieren und angeben, welche Scopes Sie autorisieren möchten.
<img src="/img/tutorial/security/image11.png">
Wenn Sie keinen Scope auswählen, werden Sie „authentifiziert“, aber wenn Sie versuchen, auf `/users/me/` oder `/users/me/items/` zuzugreifen, wird eine Fehlermeldung angezeigt, die sagt, dass Sie nicht über genügend Berechtigungen verfügen. Sie können aber auf `/status/` zugreifen.
Und wenn Sie den Scope `me`, aber nicht den Scope `items` auswählen, können Sie auf `/users/me/` zugreifen, aber nicht auf `/users/me/items/`.
Das würde einer Drittanbieteranwendung passieren, die versucht, auf eine dieser *Pfadoperationen* mit einem Token zuzugreifen, das von einem Benutzer bereitgestellt wurde, abhängig davon, wie viele Berechtigungen der Benutzer dieser Anwendung erteilt hat.
## Über Integrationen von Drittanbietern { #about-third-party-integrations }
In diesem Beispiel verwenden wir den OAuth2-Flow „Password“.
Das ist angemessen, wenn wir uns bei unserer eigenen Anwendung anmelden, wahrscheinlich mit unserem eigenen Frontend.
Weil wir darauf vertrauen können, dass es den `username` und das `password` erhält, welche wir kontrollieren.
Wenn Sie jedoch eine OAuth2-Anwendung erstellen, mit der andere eine Verbindung herstellen würden (d.h. wenn Sie einen Authentifizierungsanbieter erstellen, der Facebook, Google, GitHub usw. entspricht), sollten Sie einen der anderen Flows verwenden.
Am häufigsten ist der „Implicit“-Flow.
Am sichersten ist der „Code“-Flow, die Implementierung ist jedoch komplexer, da mehr Schritte erforderlich sind. Da er komplexer ist, schlagen viele Anbieter letztendlich den „Implicit“-Flow vor.
/// note | Hinweis
Es ist üblich, dass jeder Authentifizierungsanbieter seine Flows anders benennt, um sie zu einem Teil seiner Marke zu machen.
Aber am Ende implementieren sie denselben OAuth2-Standard.
///
**FastAPI** enthält Werkzeuge für alle diese OAuth2-Authentifizierungs-Flows in `fastapi.security.oauth2`.
## `Security` in Dekorator-`dependencies` { #security-in-decorator-dependencies }
Auf die gleiche Weise können Sie eine `list`e von `Depends` im Parameter `dependencies` des Dekorators definieren (wie in [Abhängigkeiten in Pfadoperation-Dekoratoren](../../tutorial/dependencies/dependencies-in-path-operation-decorators.md) erläutert), Sie könnten auch dort `Security` mit `scopes` verwenden.

View File

@ -0,0 +1,302 @@
# Einstellungen und Umgebungsvariablen { #settings-and-environment-variables }
In vielen Fällen benötigt Ihre Anwendung möglicherweise einige externe Einstellungen oder Konfigurationen, zum Beispiel geheime Schlüssel, Datenbank-Anmeldeinformationen, Anmeldeinformationen für E-Mail-Dienste, usw.
Die meisten dieser Einstellungen sind variabel (können sich ändern), wie z. B. Datenbank-URLs. Und vieles könnten schützenswerte, geheime Daten sein.
Aus diesem Grund werden diese üblicherweise in Umgebungsvariablen bereitgestellt, die von der Anwendung gelesen werden.
/// tip | Tipp
Um Umgebungsvariablen zu verstehen, können Sie [Umgebungsvariablen](../environment-variables.md) lesen.
///
## Typen und Validierung { #types-and-validation }
Diese Umgebungsvariablen können nur Text-Zeichenketten verarbeiten, da sie außerhalb von Python liegen und mit anderen Programmen und dem Rest des Systems (und sogar mit verschiedenen Betriebssystemen wie Linux, Windows, macOS) kompatibel sein müssen.
Das bedeutet, dass jeder in Python aus einer Umgebungsvariablen gelesene Wert ein `str` ist und jede Konvertierung in einen anderen Typ oder jede Validierung im Code erfolgen muss.
## Pydantic `Settings` { #pydantic-settings }
Glücklicherweise bietet Pydantic ein großartiges Werkzeug zur Verarbeitung dieser Einstellungen, die von Umgebungsvariablen stammen, mit [Pydantic: Settings Management](https://docs.pydantic.dev/latest/concepts/pydantic_settings/).
### `pydantic-settings` installieren { #install-pydantic-settings }
Stellen Sie zunächst sicher, dass Sie Ihre [virtuelle Umgebung](../virtual-environments.md) erstellt und aktiviert haben, und installieren Sie dann das Package `pydantic-settings`:
<div class="termy">
```console
$ pip install pydantic-settings
---> 100%
```
</div>
Es ist bereits enthalten, wenn Sie die `all`-Extras installiert haben, mit:
<div class="termy">
```console
$ pip install "fastapi[all]"
---> 100%
```
</div>
### Das `Settings`-Objekt erstellen { #create-the-settings-object }
Importieren Sie `BaseSettings` aus Pydantic und erstellen Sie eine Unterklasse, ganz ähnlich wie bei einem Pydantic-Modell.
Auf die gleiche Weise wie bei Pydantic-Modellen deklarieren Sie Klassenattribute mit Typannotationen und möglicherweise Defaultwerten.
Sie können dieselben Validierungs-Funktionen und -Tools verwenden, die Sie für Pydantic-Modelle verwenden, z. B. verschiedene Datentypen und zusätzliche Validierungen mit `Field()`.
{* ../../docs_src/settings/tutorial001_py310.py hl[2,5:8,11] *}
/// tip | Tipp
Für ein schnelles Copy-and-paste verwenden Sie nicht dieses Beispiel, sondern das letzte unten.
///
Wenn Sie dann eine Instanz dieser `Settings`-Klasse erstellen (in diesem Fall als `settings`-Objekt), liest Pydantic die Umgebungsvariablen ohne Berücksichtigung der Groß- und Kleinschreibung. Eine Variable `APP_NAME` in Großbuchstaben wird also als Attribut `app_name` gelesen.
Als Nächstes werden die Daten konvertiert und validiert. Wenn Sie also dieses `settings`-Objekt verwenden, verfügen Sie über Daten mit den von Ihnen deklarierten Typen (z. B. ist `items_per_user` ein `int`).
### `settings` verwenden { #use-the-settings }
Dann können Sie das neue `settings`-Objekt in Ihrer Anwendung verwenden:
{* ../../docs_src/settings/tutorial001_py310.py hl[18:20] *}
### Den Server ausführen { #run-the-server }
Als Nächstes würden Sie den Server ausführen und die Konfigurationen als Umgebungsvariablen übergeben. Sie könnten beispielsweise `ADMIN_EMAIL` und `APP_NAME` festlegen mit:
<div class="termy">
```console
$ ADMIN_EMAIL="deadpool@example.com" APP_NAME="ChimichangApp" fastapi run main.py
<span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
```
</div>
/// tip | Tipp
Um mehrere Umgebungsvariablen für einen einzelnen Befehl festzulegen, trennen Sie diese einfach durch ein Leerzeichen und fügen Sie alle vor dem Befehl ein.
///
Und dann würde die Einstellung `admin_email` auf „deadpool@example.com“ gesetzt.
Der `app_name` wäre „ChimichangApp“.
Und `items_per_user` würde seinen Defaultwert von `50` behalten.
## Einstellungen in einem anderen Modul { #settings-in-another-module }
Sie könnten diese Einstellungen in eine andere Moduldatei einfügen, wie Sie in [Größere Anwendungen mehrere Dateien](../tutorial/bigger-applications.md) gesehen haben.
Sie könnten beispielsweise eine Datei `config.py` haben mit:
{* ../../docs_src/settings/app01_py310/config.py *}
Und dann verwenden Sie diese in einer Datei `main.py`:
{* ../../docs_src/settings/app01_py310/main.py hl[3,11:13] *}
/// tip | Tipp
Sie benötigen außerdem eine Datei `__init__.py`, wie in [Größere Anwendungen mehrere Dateien](../tutorial/bigger-applications.md) gesehen.
///
## Einstellungen in einer Abhängigkeit { #settings-in-a-dependency }
In manchen Fällen kann es nützlich sein, die Einstellungen mit einer Abhängigkeit bereitzustellen, anstatt ein globales Objekt `settings` zu haben, das überall verwendet wird.
Dies könnte besonders beim Testen nützlich sein, da es sehr einfach ist, eine Abhängigkeit mit Ihren eigenen benutzerdefinierten Einstellungen zu überschreiben.
### Die Konfigurationsdatei { #the-config-file }
Ausgehend vom vorherigen Beispiel könnte Ihre Datei `config.py` so aussehen:
{* ../../docs_src/settings/app02_an_py310/config.py hl[10] *}
Beachten Sie, dass wir jetzt keine Standardinstanz `settings = Settings()` erstellen.
### Die Haupt-Anwendungsdatei { #the-main-app-file }
Jetzt erstellen wir eine Abhängigkeit, die ein neues `config.Settings()` zurückgibt.
{* ../../docs_src/settings/app02_an_py310/main.py hl[6,12:13] *}
/// tip | Tipp
Wir werden das `@lru_cache` in Kürze besprechen.
Im Moment nehmen Sie an, dass `get_settings()` eine normale Funktion ist.
///
Und dann können wir das von der *Pfadoperation-Funktion* als Abhängigkeit einfordern und es überall dort verwenden, wo wir es brauchen.
{* ../../docs_src/settings/app02_an_py310/main.py hl[17,19:21] *}
### Einstellungen und Tests { #settings-and-testing }
Dann wäre es sehr einfach, beim Testen ein anderes Einstellungsobjekt bereitzustellen, indem man eine Abhängigkeitsüberschreibung für `get_settings` erstellt:
{* ../../docs_src/settings/app02_an_py310/test_main.py hl[9:10,13,21] *}
Bei der Abhängigkeitsüberschreibung legen wir einen neuen Wert für `admin_email` fest, wenn wir das neue `Settings`-Objekt erstellen, und geben dann dieses neue Objekt zurück.
Dann können wir testen, ob das verwendet wird.
## Lesen einer `.env`-Datei { #reading-a-env-file }
Wenn Sie viele Einstellungen haben, die sich möglicherweise oft ändern, vielleicht in verschiedenen Umgebungen, kann es nützlich sein, diese in eine Datei zu schreiben und sie dann daraus zu lesen, als wären sie Umgebungsvariablen.
Diese Praxis ist so weit verbreitet, dass sie einen Namen hat. Diese Umgebungsvariablen werden üblicherweise in einer Datei `.env` abgelegt und die Datei wird „dotenv“ genannt.
/// tip | Tipp
Eine Datei, die mit einem Punkt (`.`) beginnt, ist eine versteckte Datei in Unix-ähnlichen Systemen wie Linux und macOS.
Aber eine dotenv-Datei muss nicht unbedingt genau diesen Dateinamen haben.
///
Pydantic unterstützt das Lesen dieser Dateitypen mithilfe einer externen Bibliothek. Weitere Informationen finden Sie unter [Pydantic Settings: Dotenv (.env) support](https://docs.pydantic.dev/latest/concepts/pydantic_settings/#dotenv-env-support).
/// tip | Tipp
Damit das funktioniert, müssen Sie `pip install python-dotenv` ausführen.
///
### Die `.env`-Datei { #the-env-file }
Sie könnten eine `.env`-Datei haben, mit:
```bash
ADMIN_EMAIL="deadpool@example.com"
APP_NAME="ChimichangApp"
```
### Einstellungen aus `.env` lesen { #read-settings-from-env }
Und dann aktualisieren Sie Ihre `config.py` mit:
{* ../../docs_src/settings/app03_an_py310/config.py hl[9] *}
/// tip | Tipp
Das Attribut `model_config` wird nur für die Pydantic-Konfiguration verwendet. Weitere Informationen finden Sie unter [Pydantic: Concepts: Configuration](https://docs.pydantic.dev/latest/concepts/config/).
///
Hier definieren wir die Konfiguration `env_file` innerhalb Ihrer Pydantic-`Settings`-Klasse und setzen den Wert auf den Dateinamen mit der dotenv-Datei, die wir verwenden möchten.
### Die `Settings` nur einmal laden mittels `lru_cache` { #creating-the-settings-only-once-with-lru-cache }
Das Lesen einer Datei von der Festplatte ist normalerweise ein kostspieliger (langsamer) Vorgang, daher möchten Sie ihn wahrscheinlich nur einmal ausführen und dann dasselbe Einstellungsobjekt erneut verwenden, anstatt es für jeden <abbr title="Request Anfrage: Daten, die der Client zum Server sendet">Request</abbr> zu lesen.
Aber jedes Mal, wenn wir ausführen:
```Python
Settings()
```
würde ein neues `Settings`-Objekt erstellt und bei der Erstellung würde die `.env`-Datei erneut ausgelesen.
Wenn die Abhängigkeitsfunktion wie folgt wäre:
```Python
def get_settings():
return Settings()
```
würden wir dieses Objekt für jeden Request erstellen und die `.env`-Datei für jeden Request lesen. ⚠️
Da wir jedoch den `@lru_cache`-Dekorator oben verwenden, wird das `Settings`-Objekt nur einmal erstellt, nämlich beim ersten Aufruf. ✔️
{* ../../docs_src/settings/app03_an_py310/main.py hl[1,11] *}
Dann wird bei allen nachfolgenden Aufrufen von `get_settings()`, in den Abhängigkeiten für darauffolgende Requests, dasselbe Objekt zurückgegeben, das beim ersten Aufruf zurückgegeben wurde, anstatt den Code von `get_settings()` erneut auszuführen und ein neues `Settings`-Objekt zu erstellen.
#### Technische Details zu `lru_cache` { #lru-cache-technical-details }
`@lru_cache` ändert die Funktion, die es dekoriert, dahingehend, denselben Wert zurückzugeben, der beim ersten Mal zurückgegeben wurde, anstatt ihn erneut zu berechnen und den Code der Funktion jedes Mal auszuführen.
Die darunter liegende Funktion wird also für jede Argumentkombination einmal ausgeführt. Und dann werden die von jeder dieser Argumentkombinationen zurückgegebenen Werte immer wieder verwendet, wenn die Funktion mit genau derselben Argumentkombination aufgerufen wird.
Wenn Sie beispielsweise eine Funktion haben:
```Python
@lru_cache
def say_hi(name: str, salutation: str = "Ms."):
return f"Hello {salutation} {name}"
```
könnte Ihr Programm so ausgeführt werden:
```mermaid
sequenceDiagram
participant code as Code
participant function as say_hi()
participant execute as Funktion ausführen
rect rgba(0, 255, 0, .1)
code ->> function: say_hi(name="Camila")
function ->> execute: führe Code der Funktion aus
execute ->> code: gib das Resultat zurück
end
rect rgba(0, 255, 255, .1)
code ->> function: say_hi(name="Camila")
function ->> code: gib das gespeicherte Resultat zurück
end
rect rgba(0, 255, 0, .1)
code ->> function: say_hi(name="Rick")
function ->> execute: führe Code der Funktion aus
execute ->> code: gib das Resultat zurück
end
rect rgba(0, 255, 0, .1)
code ->> function: say_hi(name="Rick", salutation="Mr.")
function ->> execute: führe Code der Funktion aus
execute ->> code: gib das Resultat zurück
end
rect rgba(0, 255, 255, .1)
code ->> function: say_hi(name="Rick")
function ->> code: gib das gespeicherte Resultat zurück
end
rect rgba(0, 255, 255, .1)
code ->> function: say_hi(name="Camila")
function ->> code: gib das gespeicherte Resultat zurück
end
```
Im Fall unserer Abhängigkeit `get_settings()` akzeptiert die Funktion nicht einmal Argumente, sodass sie immer den gleichen Wert zurückgibt.
Auf diese Weise verhält es sich fast so, als wäre es nur eine globale Variable. Da es jedoch eine Abhängigkeitsfunktion verwendet, können wir diese zu Testzwecken problemlos überschreiben.
`@lru_cache` ist Teil von `functools`, welches Teil von Pythons Standardbibliothek ist. Weitere Informationen dazu finden Sie in der [Python Dokumentation für `@lru_cache`](https://docs.python.org/3/library/functools.html#functools.lru_cache).
## Zusammenfassung { #recap }
Mit Pydantic Settings können Sie die Einstellungen oder Konfigurationen für Ihre Anwendung verwalten und dabei die gesamte Leistungsfähigkeit der Pydantic-Modelle nutzen.
* Durch die Verwendung einer Abhängigkeit können Sie das Testen vereinfachen.
* Sie können `.env`-Dateien damit verwenden.
* Durch die Verwendung von `@lru_cache` können Sie vermeiden, die dotenv-Datei bei jedem Request erneut zu lesen, während Sie sie während des Testens überschreiben können.

View File

@ -0,0 +1,117 @@
# Daten streamen { #stream-data }
Wenn Sie Daten streamen möchten, die als JSON strukturiert werden können, sollten Sie [JSON Lines streamen](../tutorial/stream-json-lines.md).
Wenn Sie jedoch **reine Binärdaten** oder Strings streamen möchten, so können Sie es machen.
/// info | Info
Hinzugefügt in FastAPI 0.134.0.
///
## Anwendungsfälle { #use-cases }
Sie könnten dies verwenden, wenn Sie reine Strings streamen möchten, z. B. direkt aus der Ausgabe eines **AI-LLM**-Dienstes.
Sie könnten es auch nutzen, um **große Binärdateien** zu streamen, wobei Sie jeden Datenchunk beim Lesen streamen, ohne alles auf einmal in den Speicher laden zu müssen.
Sie könnten auf diese Weise auch **Video** oder **Audio** streamen, es könnte sogar beim Verarbeiten erzeugt und gesendet werden.
## Eine `StreamingResponse` mit `yield` { #a-streamingresponse-with-yield }
Wenn Sie in Ihrer Pfadoperation-Funktion ein `response_class=StreamingResponse` deklarieren, können Sie `yield` verwenden, um nacheinander jeden Datenchunk zu senden.
{* ../../docs_src/stream_data/tutorial001_py310.py ln[1:23] hl[20,23] *}
FastAPI übergibt jeden Datenchunk unverändert an die `StreamingResponse`, es wird nicht versucht, ihn in JSON oder etwas Ähnliches zu konvertieren.
### Nicht-async-Pfadoperation-Funktionen { #non-async-path-operation-functions }
Sie können auch reguläre `def`-Funktionen (ohne `async`) verwenden und `yield` auf die gleiche Weise einsetzen.
{* ../../docs_src/stream_data/tutorial001_py310.py ln[26:29] hl[27] *}
### Keine Annotation { #no-annotation }
Sie müssen den Rückgabetyp für das Streamen von Binärdaten nicht wirklich annotieren.
Da FastAPI die Daten nicht mit Pydantic in JSON umzuwandeln oder sie anderweitig zu serialisieren versucht, ist die Typannotation hier nur für Ihren Editor und Tools relevant, sie wird von FastAPI nicht verwendet.
{* ../../docs_src/stream_data/tutorial001_py310.py ln[32:35] hl[33] *}
Das bedeutet auch, dass Sie mit `StreamingResponse` die **Freiheit** und **Verantwortung** haben, die Datenbytes genau so zu erzeugen und zu encodieren, wie sie gesendet werden sollen, unabhängig von den Typannotationen. 🤓
### Bytes streamen { #stream-bytes }
Einer der Hauptanwendungsfälle wäre, `bytes` statt Strings zu streamen, das können Sie selbstverständlich tun.
{* ../../docs_src/stream_data/tutorial001_py310.py ln[44:47] hl[47] *}
## Eine benutzerdefinierte `PNGStreamingResponse` { #a-custom-pngstreamingresponse }
In den obigen Beispielen wurden die Datenbytes gestreamt, aber die Response hatte keinen `Content-Type`-Header, sodass der Client nicht wusste, welchen Datentyp er erhielt.
Sie können eine benutzerdefinierte Unterklasse von `StreamingResponse` erstellen, die den `Content-Type`-Header auf den Typ der gestreamten Daten setzt.
Zum Beispiel können Sie eine `PNGStreamingResponse` erstellen, die den `Content-Type`-Header mit dem Attribut `media_type` auf `image/png` setzt:
{* ../../docs_src/stream_data/tutorial002_py310.py ln[6,19:20] hl[20] *}
Dann können Sie diese neue Klasse mit `response_class=PNGStreamingResponse` in Ihrer Pfadoperation-Funktion verwenden:
{* ../../docs_src/stream_data/tutorial002_py310.py ln[23:27] hl[23] *}
### Eine Datei simulieren { #simulate-a-file }
In diesem Beispiel simulieren wir eine Datei mit `io.BytesIO`, einem dateiähnlichen Objekt, das nur im Speicher lebt, uns aber dieselbe Schnittstelle nutzen lässt.
Wir können z. B. darüber iterieren, um seinen Inhalt zu konsumieren, so wie bei einer Datei.
{* ../../docs_src/stream_data/tutorial002_py310.py ln[1:27] hl[3,12:13,25] *}
/// note | Technische Details
Die anderen beiden Variablen, `image_base64` und `binary_image`, sind ein in Base64 encodiertes Bild, dann in Bytes konvertiert, um es anschließend an `io.BytesIO` zu übergeben.
Nur damit es in derselben Datei leben kann, für dieses Beispiel, und Sie es unverändert kopieren und ausführen können. 🥚
///
Mit einem `with`-Block stellen wir sicher, dass das dateiähnliche Objekt geschlossen wird, nachdem die Generatorfunktion (die Funktion mit `yield`) fertig ist. Also nachdem die Response gesendet wurde.
In diesem speziellen Beispiel wäre das nicht so wichtig, weil es sich um eine unechte In-Memory-Datei (mit `io.BytesIO`) handelt, aber bei einer echten Datei wäre es wichtig sicherzustellen, dass die Datei nach der Arbeit damit geschlossen wird.
### Dateien und Async { #files-and-async }
In den meisten Fällen sind dateiähnliche Objekte standardmäßig nicht mit async und await kompatibel.
Beispielsweise haben sie kein `await file.read()` oder `async for chunk in file`.
Und in vielen Fällen wäre das Lesen eine blockierende Operation (die die Event-Loop blockieren könnte), weil von der Festplatte oder aus dem Netzwerk gelesen wird.
/// info | Info
Das obige Beispiel ist tatsächlich eine Ausnahme, weil sich das `io.BytesIO`-Objekt bereits im Speicher befindet, daher blockiert sein Lesen nichts.
Aber in vielen Fällen würde das Lesen einer Datei oder eines dateiähnlichen Objekts blockieren.
///
Um die Event-Loop nicht zu blockieren, können Sie die Pfadoperation-Funktion einfach mit normalem `def` statt `async def` deklarieren, dadurch führt FastAPI sie in einem Threadpool-Worker aus, um die Haupt-Event-Loop nicht zu blockieren.
{* ../../docs_src/stream_data/tutorial002_py310.py ln[30:34] hl[31] *}
/// tip | Tipp
Wenn Sie blockierenden Code aus einer async-Funktion heraus aufrufen müssen, oder eine async-Funktion aus einer blockierenden Funktion, könnten Sie [Asyncer](https://asyncer.tiangolo.com), eine Schwesterbibliothek zu FastAPI, verwenden.
///
### `yield from` { #yield-from }
Wenn Sie über etwas iterieren, z. B. ein dateiähnliches Objekt, und dann für jedes Element `yield` verwenden, könnten Sie auch `yield from` verwenden, um jedes Element direkt weiterzugeben und die `for`-Schleife zu sparen.
Das ist nichts Spezifisches an FastAPI, das ist einfach Python, aber ein netter Trick. 😎
{* ../../docs_src/stream_data/tutorial002_py310.py ln[37:40] hl[40] *}

View File

@ -0,0 +1,88 @@
# Strikte Content-Type-Prüfung { #strict-content-type-checking }
Standardmäßig verwendet **FastAPI** eine strikte Prüfung des `Content-Type`-Headers für JSON-Requestbodys. Das bedeutet, dass JSON-Requests einen gültigen `Content-Type`-Header (z. B. `application/json`) enthalten MÜSSEN, damit der Body als JSON geparst wird.
## CSRF-Risiko { #csrf-risk }
Dieses Standardverhalten schützt vor einer Klasse von **Cross-Site Request Forgery (CSRF)**-Angriffen in einem sehr spezifischen Szenario.
Diese Angriffe nutzen aus, dass Browser Skripte Requests senden lassen, ohne einen CORS-Preflight-Check durchzuführen, wenn sie:
* keinen `Content-Type`-Header haben (z. B. mit `fetch()` und einem `Blob`-Body)
* und keine Authentifizierungsdaten senden.
Diese Art von Angriff ist vor allem relevant, wenn:
* die Anwendung lokal läuft (z. B. auf `localhost`) oder in einem internen Netzwerk
* und die Anwendung keine Authentifizierung hat, sondern erwartet, dass jeder Request aus demselben Netzwerk vertrauenswürdig ist.
## Beispielangriff { #example-attack }
Stellen Sie sich vor, Sie bauen eine Möglichkeit, lokal einen KI-Agenten auszuführen.
Er stellt eine API bereit unter
```
http://localhost:8000/v1/agents/multivac
```
Es gibt auch ein Frontend unter
```
http://localhost:8000
```
/// tip | Tipp
Beachten Sie, dass beide denselben Host haben.
///
Dann können Sie über das Frontend den KI-Agenten Dinge in Ihrem Namen erledigen lassen.
Da er **lokal** läuft und nicht im offenen Internet, entscheiden Sie sich, **keine Authentifizierung** einzurichten und vertrauen stattdessen einfach auf den Zugriff im lokalen Netzwerk.
Dann könnte einer Ihrer Benutzer es installieren und lokal ausführen.
Anschließend könnte er eine bösartige Website öffnen, z. B. so etwas wie
```
https://evilhackers.example.com
```
Und diese bösartige Website sendet Requests mit `fetch()` und einem `Blob`-Body an die lokale API unter
```
http://localhost:8000/v1/agents/multivac
```
Obwohl der Host der bösartigen Website und der lokalen App unterschiedlich ist, löst der Browser keinen CORS-Preflight-Request aus, weil:
* sie ohne Authentifizierung läuft, es müssen keine Credentials gesendet werden.
* der Browser annimmt, dass kein JSON gesendet wird (wegen des fehlenden `Content-Type`-Headers).
Dann könnte die bösartige Website den lokalen KI-Agenten dazu bringen, wütende Nachrichten an den Ex-Chef des Benutzers zu schicken ... oder Schlimmeres. 😅
## Offenes Internet { #open-internet }
Wenn Ihre App im offenen Internet läuft, würden Sie nicht „dem Netzwerk vertrauen“ und jedem erlauben, privilegierte Requests ohne Authentifizierung zu senden.
Angreifer könnten einfach ein Skript ausführen, um Requests an Ihre API zu senden, es ist keine Browserinteraktion nötig. Daher sichern Sie wahrscheinlich schon alle privilegierten Endpunkte.
In diesem Fall gilt **dieser Angriff / dieses Risiko nicht für Sie**.
Dieses Risiko und dieser Angriff sind vor allem relevant, wenn die App im **lokalen Netzwerk** läuft und das die **einzige angenommene Schutzmaßnahme** ist.
## Requests ohne Content-Type erlauben { #allowing-requests-without-content-type }
Wenn Sie Clients unterstützen müssen, die keinen `Content-Type`-Header senden, können Sie die strikte Prüfung deaktivieren, indem Sie `strict_content_type=False` setzen:
{* ../../docs_src/strict_content_type/tutorial001_py310.py hl[4] *}
Mit dieser Einstellung werden Requests ohne `Content-Type`-Header im Body als JSON geparst. Das entspricht dem Verhalten älterer FastAPI-Versionen.
/// info | Info
Dieses Verhalten und diese Konfiguration wurden in FastAPI 0.132.0 hinzugefügt.
///

View File

@ -0,0 +1,67 @@
# Unteranwendungen Mounts { #sub-applications-mounts }
Wenn Sie zwei unabhängige FastAPI-Anwendungen mit deren eigenen unabhängigen OpenAPI und deren eigenen Dokumentationsoberflächen benötigen, können Sie eine Hauptanwendung haben und dann eine (oder mehrere) Unteranwendung(en) „mounten“.
## Eine **FastAPI**-Anwendung mounten { #mounting-a-fastapi-application }
„Mounten“ („Einhängen“) bedeutet das Hinzufügen einer völlig „unabhängigen“ Anwendung an einem bestimmten Pfad, die sich dann um die Handhabung aller unter diesem Pfad liegenden _Pfadoperationen_ kümmert, welche in dieser Unteranwendung deklariert sind.
### Hauptanwendung { #top-level-application }
Erstellen Sie zunächst die Hauptanwendung **FastAPI** und deren *Pfadoperationen*:
{* ../../docs_src/sub_applications/tutorial001_py310.py hl[3, 6:8] *}
### Unteranwendung { #sub-application }
Erstellen Sie dann Ihre Unteranwendung und deren *Pfadoperationen*.
Diese Unteranwendung ist nur eine weitere Standard-FastAPI-Anwendung, aber diese wird „gemountet“:
{* ../../docs_src/sub_applications/tutorial001_py310.py hl[11, 14:16] *}
### Die Unteranwendung mounten { #mount-the-sub-application }
Mounten Sie in Ihrer Top-Level-Anwendung `app` die Unteranwendung `subapi`.
In diesem Fall wird sie im Pfad `/subapi` gemountet:
{* ../../docs_src/sub_applications/tutorial001_py310.py hl[11, 19] *}
### Die automatische API-Dokumentation testen { #check-the-automatic-api-docs }
Führen Sie nun den Befehl `fastapi` aus:
<div class="termy">
```console
$ fastapi dev
<span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
```
</div>
Und öffnen Sie die Dokumentation unter [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs).
Sie sehen die automatische API-Dokumentation für die Hauptanwendung, welche nur deren eigene _Pfadoperationen_ anzeigt:
<img src="/img/tutorial/sub-applications/image01.png">
Öffnen Sie dann die Dokumentation für die Unteranwendung unter [http://127.0.0.1:8000/subapi/docs](http://127.0.0.1:8000/subapi/docs).
Sie sehen die automatische API-Dokumentation für die Unteranwendung, welche nur deren eigene _Pfadoperationen_ anzeigt, alle unter dem korrekten Unterpfad-Präfix `/subapi`:
<img src="/img/tutorial/sub-applications/image02.png">
Wenn Sie versuchen, mit einer der beiden Benutzeroberflächen zu interagieren, funktionieren diese ordnungsgemäß, da der Browser mit jeder spezifischen Anwendung oder Unteranwendung kommunizieren kann.
### Technische Details: `root_path` { #technical-details-root-path }
Wenn Sie eine Unteranwendung wie oben beschrieben mounten, kümmert sich FastAPI darum, den Mount-Pfad für die Unteranwendung zu kommunizieren, mithilfe eines Mechanismus aus der ASGI-Spezifikation namens `root_path`.
Auf diese Weise weiß die Unteranwendung, dass sie dieses Pfadpräfix für die Benutzeroberfläche der Dokumentation verwenden soll.
Und die Unteranwendung könnte auch ihre eigenen gemounteten Unteranwendungen haben und alles würde korrekt funktionieren, da FastAPI sich um alle diese `root_path`s automatisch kümmert.
Mehr über den `root_path` und dessen explizite Verwendung erfahren Sie im Abschnitt [Hinter einem Proxy](behind-a-proxy.md).

View File

@ -0,0 +1,126 @@
# Templates { #templates }
Sie können jede gewünschte Template-Engine mit **FastAPI** verwenden.
Eine häufige Wahl ist Jinja2, dasselbe, was auch von Flask und anderen Tools verwendet wird.
Es gibt Werkzeuge zur einfachen Konfiguration, die Sie direkt in Ihrer **FastAPI**-Anwendung verwenden können (bereitgestellt von Starlette).
## Abhängigkeiten installieren { #install-dependencies }
Stellen Sie sicher, dass Sie eine [virtuelle Umgebung](../virtual-environments.md) erstellen, sie aktivieren und `jinja2` installieren:
<div class="termy">
```console
$ pip install jinja2
---> 100%
```
</div>
## `Jinja2Templates` verwenden { #using-jinja2templates }
* Importieren Sie `Jinja2Templates`.
* Erstellen Sie ein `templates`-Objekt, das Sie später wiederverwenden können.
* Deklarieren Sie einen `<abbr title="Request Anfrage: Daten, die der Client zum Server sendet">Request</abbr>`-Parameter in der *Pfadoperation*, welcher ein Template zurückgibt.
* Verwenden Sie die von Ihnen erstellten `templates`, um eine `TemplateResponse` zu rendern und zurückzugeben, übergeben Sie den Namen des Templates, das Requestobjekt und ein „Kontext“-<abbr title="Dictionary Zuordnungstabelle: In anderen Sprachen auch Hash, Map, Objekt, Assoziatives Array genannt">Dictionary</abbr> mit Schlüssel-Wert-Paaren, die innerhalb des Jinja2-Templates verwendet werden sollen.
{* ../../docs_src/templates/tutorial001_py310.py hl[4,11,15:18] *}
/// note | Hinweis
Vor FastAPI 0.108.0 und Starlette 0.29.0 war `name` der erste Parameter.
Außerdem wurde in früheren Versionen das `request`-Objekt als Teil der Schlüssel-Wert-Paare im Kontext für Jinja2 übergeben.
///
/// tip | Tipp
Durch die Deklaration von `response_class=HTMLResponse` kann die Dokumentationsoberfläche erkennen, dass die <abbr title="Response Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Response</abbr> HTML sein wird.
///
/// note | Technische Details
Sie können auch `from starlette.templating import Jinja2Templates` verwenden.
**FastAPI** bietet dasselbe `starlette.templating` auch via `fastapi.templating` an, als Annehmlichkeit für Sie, den Entwickler. Aber die meisten der verfügbaren Responses kommen direkt von Starlette. Das Gleiche gilt für `Request` und `StaticFiles`.
///
## Templates erstellen { #writing-templates }
Dann können Sie unter `templates/item.html` ein Template erstellen, mit z. B. folgendem Inhalt:
```jinja hl_lines="7"
{!../../docs_src/templates/templates/item.html!}
```
### Template-Kontextwerte { #template-context-values }
Im HTML, welches enthält:
{% raw %}
```jinja
Item ID: {{ id }}
```
{% endraw %}
... wird die `id` angezeigt, welche dem „Kontext“-`dict` entnommen wird, welches Sie übergeben haben:
```Python
{"id": id}
```
Mit beispielsweise einer ID `42` würde das wie folgt gerendert werden:
```html
Item ID: 42
```
### Template-`url_for`-Argumente { #template-url-for-arguments }
Sie können `url_for()` auch innerhalb des Templates verwenden, es nimmt als Argumente dieselben Argumente, die von Ihrer *Pfadoperation-Funktion* verwendet werden.
Der Abschnitt mit:
{% raw %}
```jinja
<a href="{{ url_for('read_item', id=id) }}">
```
{% endraw %}
... generiert also einen Link zu derselben URL, welche von der *Pfadoperation-Funktion* `read_item(id=id)` gehandhabt werden würde.
Mit beispielsweise der ID `42` würde dies Folgendes ergeben:
```html
<a href="/items/42">
```
## Templates und statische Dateien { #templates-and-static-files }
Sie können `url_for()` innerhalb des Templates auch beispielsweise mit den `StaticFiles` verwenden, die Sie mit `name="static"` gemountet haben.
```jinja hl_lines="4"
{!../../docs_src/templates/templates/item.html!}
```
In diesem Beispiel würde das zu einer CSS-Datei unter `static/styles.css` verlinken, mit folgendem Inhalt:
```CSS hl_lines="4"
{!../../docs_src/templates/static/styles.css!}
```
Und da Sie `StaticFiles` verwenden, wird diese CSS-Datei automatisch von Ihrer **FastAPI**-Anwendung unter der URL `/static/styles.css` ausgeliefert.
## Mehr Details { #more-details }
Weitere Informationen, einschließlich, wie man Templates testet, finden Sie in [Starlettes Dokumentation zu Templates](https://www.starlette.dev/templates/).

View File

@ -0,0 +1,54 @@
# Testen mit Überschreibungen für Abhängigkeiten { #testing-dependencies-with-overrides }
## Abhängigkeiten beim Testen überschreiben { #overriding-dependencies-during-testing }
Es gibt einige Szenarien, in denen Sie beim Testen möglicherweise eine Abhängigkeit überschreiben möchten.
Sie möchten nicht, dass die ursprüngliche Abhängigkeit ausgeführt wird (und auch keine der möglicherweise vorhandenen Unterabhängigkeiten).
Stattdessen möchten Sie eine andere Abhängigkeit bereitstellen, die nur während Tests (möglicherweise nur bei einigen bestimmten Tests) verwendet wird und einen Wert bereitstellt, der dort verwendet werden kann, wo der Wert der ursprünglichen Abhängigkeit verwendet wurde.
### Anwendungsfälle: Externer Service { #use-cases-external-service }
Ein Beispiel könnte sein, dass Sie einen externen Authentifizierungsanbieter haben, mit dem Sie sich verbinden müssen.
Sie senden ihm ein Token und er gibt einen authentifizierten Benutzer zurück.
Dieser Anbieter berechnet Ihnen möglicherweise Gebühren pro <abbr title="Request Anfrage: Daten, die der Client zum Server sendet">Request</abbr>, und der Aufruf könnte etwas länger dauern, als wenn Sie einen vordefinierten <abbr title="Platzhalter, vorgetäuscht, zum Schein">Mock</abbr>-Benutzer für Tests hätten.
Sie möchten den externen Anbieter wahrscheinlich einmal testen, ihn aber nicht unbedingt bei jedem weiteren ausgeführten Test aufrufen.
In diesem Fall können Sie die Abhängigkeit, die diesen Anbieter aufruft, überschreiben und eine benutzerdefinierte Abhängigkeit verwenden, die einen Mock-Benutzer zurückgibt, nur für Ihre Tests.
### Das Attribut `app.dependency_overrides` verwenden { #use-the-app-dependency-overrides-attribute }
Für diese Fälle verfügt Ihre **FastAPI**-Anwendung über das Attribut `app.dependency_overrides`, bei diesem handelt sich um ein einfaches <abbr title="Dictionary Zuordnungstabelle: In anderen Sprachen auch Hash, Map, Objekt, Assoziatives Array genannt">`dict`</abbr>.
Um eine Abhängigkeit für das Testen zu überschreiben, geben Sie als Schlüssel die ursprüngliche Abhängigkeit (eine Funktion) und als Wert Ihre Überschreibung der Abhängigkeit (eine andere Funktion) ein.
Und dann ruft **FastAPI** diese Überschreibung anstelle der ursprünglichen Abhängigkeit auf.
{* ../../docs_src/dependency_testing/tutorial001_an_py310.py hl[26:27,30] *}
/// tip | Tipp
Sie können eine Überschreibung für eine Abhängigkeit festlegen, die an einer beliebigen Stelle in Ihrer **FastAPI**-Anwendung verwendet wird.
Die ursprüngliche Abhängigkeit könnte in einer *Pfadoperation-Funktion*, einem *Pfadoperation-Dekorator* (wenn Sie den Rückgabewert nicht verwenden), einem `.include_router()`-Aufruf, usw. verwendet werden.
FastAPI kann sie in jedem Fall überschreiben.
///
Anschließend können Sie Ihre Überschreibungen zurücksetzen (entfernen), indem Sie `app.dependency_overrides` auf ein leeres `dict` setzen:
```Python
app.dependency_overrides = {}
```
/// tip | Tipp
Wenn Sie eine Abhängigkeit nur während einiger Tests überschreiben möchten, können Sie die Überschreibung zu Beginn des Tests (innerhalb der Testfunktion) festlegen und am Ende (am Ende der Testfunktion) zurücksetzen.
///

View File

@ -0,0 +1,12 @@
# Events testen: Lifespan und Startup Shutdown { #testing-events-lifespan-and-startup-shutdown }
Wenn Sie `lifespan` in Ihren Tests ausführen müssen, können Sie den `TestClient` mit einer `with`-Anweisung verwenden:
{* ../../docs_src/app_testing/tutorial004_py310.py hl[9:15,18,27:28,30:32,41:43] *}
Sie können mehr Details unter [„Lifespan in Tests ausführen in der offiziellen Starlette-Dokumentation.“](https://www.starlette.dev/lifespan/#running-lifespan-in-tests) nachlesen.
Für die deprecateten Events <abbr title="Hochfahren">`startup`</abbr> und <abbr title="Herunterfahren">`shutdown`</abbr> können Sie den `TestClient` wie folgt verwenden:
{* ../../docs_src/app_testing/tutorial003_py310.py hl[9:12,20:24] *}

View File

@ -0,0 +1,13 @@
# WebSockets testen { #testing-websockets }
Sie können denselben `TestClient` zum Testen von WebSockets verwenden.
Dazu verwenden Sie den `TestClient` in einer `with`-Anweisung, eine Verbindung zum WebSocket herstellend:
{* ../../docs_src/app_testing/tutorial002_py310.py hl[27:31] *}
/// note | Hinweis
Weitere Informationen finden Sie in Starlettes Dokumentation zum [Testen von WebSockets](https://www.starlette.dev/testclient/#testing-websocket-sessions).
///

View File

@ -0,0 +1,56 @@
# Den Request direkt verwenden { #using-the-request-directly }
Bisher haben Sie die Teile des <abbr title="Request Anfrage: Daten, die der Client zum Server sendet">Requests</abbr>, die Sie benötigen, mithilfe von deren Typen deklariert.
Daten nehmend von:
* Dem Pfad als Parameter.
* Headern.
* Cookies.
* usw.
Und indem Sie das tun, validiert **FastAPI** diese Daten, konvertiert sie und generiert automatisch Dokumentation für Ihre API.
Es gibt jedoch Situationen, in denen Sie möglicherweise direkt auf das `Request`-Objekt zugreifen müssen.
## Details zum `Request`-Objekt { #details-about-the-request-object }
Da **FastAPI** unter der Haube eigentlich **Starlette** ist, mit einer Ebene von mehreren Tools darüber, können Sie Starlettes [`Request`](https://www.starlette.dev/requests/)-Objekt direkt verwenden, wenn Sie es benötigen.
Das bedeutet allerdings auch, dass, wenn Sie Daten direkt vom `Request`-Objekt nehmen (z. B. dessen Body lesen), diese von FastAPI nicht validiert, konvertiert oder dokumentiert werden (mit OpenAPI, für die automatische API-Benutzeroberfläche).
Obwohl jeder andere normal deklarierte Parameter (z. B. der Body, mit einem Pydantic-Modell) dennoch validiert, konvertiert, annotiert, usw. werden würde.
Es gibt jedoch bestimmte Fälle, in denen es nützlich ist, auf das `Request`-Objekt zuzugreifen.
## Das `Request`-Objekt direkt verwenden { #use-the-request-object-directly }
Angenommen, Sie möchten auf die IP-Adresse/den Host des Clients in Ihrer *Pfadoperation-Funktion* zugreifen.
Dazu müssen Sie direkt auf den Request zugreifen.
{* ../../docs_src/using_request_directly/tutorial001_py310.py hl[1,7:8] *}
Durch die Deklaration eines *Pfadoperation-Funktionsparameters*, dessen Typ der `Request` ist, weiß **FastAPI**, dass es den `Request` diesem Parameter übergeben soll.
/// tip | Tipp
Beachten Sie, dass wir in diesem Fall einen Pfad-Parameter zusätzlich zum Request-Parameter deklarieren.
Der Pfad-Parameter wird also extrahiert, validiert, in den spezifizierten Typ konvertiert und mit OpenAPI annotiert.
Auf die gleiche Weise können Sie wie gewohnt jeden anderen Parameter deklarieren und zusätzlich auch den `Request` erhalten.
///
## `Request`-Dokumentation { #request-documentation }
Weitere Details zum [`Request`-Objekt auf der offiziellen Starlette-Dokumentationsseite](https://www.starlette.dev/requests/).
/// note | Technische Details
Sie können auch `from starlette.requests import Request` verwenden.
**FastAPI** stellt es direkt zur Verfügung, als Komfort für Sie, den Entwickler. Es kommt aber direkt von Starlette.
///

View File

@ -0,0 +1,186 @@
# WebSockets { #websockets }
Sie können [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) mit **FastAPI** verwenden.
## `websockets` installieren { #install-websockets }
Stellen Sie sicher, dass Sie eine [virtuelle Umgebung](../virtual-environments.md) erstellen, sie aktivieren und `websockets` installieren (eine Python-Bibliothek, die die Verwendung des „WebSocket“-Protokolls erleichtert):
<div class="termy">
```console
$ pip install websockets
---> 100%
```
</div>
## WebSockets-Client { #websockets-client }
### In Produktion { #in-production }
In Ihrem Produktionssystem haben Sie wahrscheinlich ein Frontend, das mit einem modernen Framework wie React, Vue.js oder Angular erstellt wurde.
Und um über WebSockets mit Ihrem Backend zu kommunizieren, würden Sie wahrscheinlich die Werkzeuge Ihres Frontends verwenden.
Oder Sie verfügen möglicherweise über eine native Mobile-Anwendung, die direkt in nativem Code mit Ihrem WebSocket-Backend kommuniziert.
Oder Sie haben andere Möglichkeiten, mit dem WebSocket-Endpunkt zu kommunizieren.
---
Für dieses Beispiel verwenden wir jedoch ein sehr einfaches HTML-Dokument mit etwas JavaScript, alles in einem langen String.
Das ist natürlich nicht optimal und man würde das nicht in der Produktion machen.
In der Produktion hätten Sie eine der oben genannten Optionen.
Aber es ist der einfachste Weg, sich auf die Serverseite von WebSockets zu konzentrieren und ein funktionierendes Beispiel zu haben:
{* ../../docs_src/websockets_/tutorial001_py310.py hl[2,6:38,41:43] *}
## Einen `websocket` erstellen { #create-a-websocket }
Erstellen Sie in Ihrer **FastAPI**-Anwendung einen `websocket`:
{* ../../docs_src/websockets_/tutorial001_py310.py hl[1,46:47] *}
/// note | Technische Details
Sie könnten auch `from starlette.websockets import WebSocket` verwenden.
**FastAPI** stellt den gleichen `WebSocket` direkt zur Verfügung, als Annehmlichkeit für Sie, den Entwickler. Er kommt aber direkt von Starlette.
///
## Nachrichten erwarten und Nachrichten senden { #await-for-messages-and-send-messages }
In Ihrer WebSocket-Route können Sie Nachrichten `await`en und Nachrichten senden.
{* ../../docs_src/websockets_/tutorial001_py310.py hl[48:52] *}
Sie können Binär-, Text- und JSON-Daten empfangen und senden.
## Es ausprobieren { #try-it }
Legen Sie Ihren Code in einer Datei `main.py` ab und führen Sie dann Ihre Anwendung aus:
<div class="termy">
```console
$ fastapi dev
<span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
```
</div>
Öffnen Sie Ihren Browser unter [http://127.0.0.1:8000](http://127.0.0.1:8000).
Sie sehen eine einfache Seite wie:
<img src="/img/tutorial/websockets/image01.png">
Sie können Nachrichten in das Eingabefeld tippen und absenden:
<img src="/img/tutorial/websockets/image02.png">
Und Ihre **FastAPI**-Anwendung mit WebSockets antwortet:
<img src="/img/tutorial/websockets/image03.png">
Sie können viele Nachrichten senden (und empfangen):
<img src="/img/tutorial/websockets/image04.png">
Und alle verwenden dieselbe WebSocket-Verbindung.
## Verwendung von `Depends` und anderen { #using-depends-and-others }
In WebSocket-Endpunkten können Sie Folgendes aus `fastapi` importieren und verwenden:
* `Depends`
* `Security`
* `Cookie`
* `Header`
* `Path`
* `Query`
Diese funktionieren auf die gleiche Weise wie für andere FastAPI-Endpunkte/*Pfadoperationen*:
{* ../../docs_src/websockets_/tutorial002_an_py310.py hl[68:69,82] *}
/// info | Info
Da es sich um einen WebSocket handelt, macht es keinen Sinn, eine `HTTPException` auszulösen, stattdessen lösen wir eine `WebSocketException` aus.
Sie können einen „Closing“-Code verwenden, aus den [gültigen Codes, die in der Spezifikation definiert sind](https://tools.ietf.org/html/rfc6455#section-7.4.1).
///
### WebSockets mit Abhängigkeiten ausprobieren { #try-the-websockets-with-dependencies }
Führen Sie Ihre Anwendung aus:
<div class="termy">
```console
$ fastapi dev
<span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
```
</div>
Öffnen Sie Ihren Browser unter [http://127.0.0.1:8000](http://127.0.0.1:8000).
Dort können Sie einstellen:
* Die „Item ID“, die im Pfad verwendet wird.
* Das „Token“, das als Query-Parameter verwendet wird.
/// tip | Tipp
Beachten Sie, dass die Query `token` von einer Abhängigkeit verarbeitet wird.
///
Damit können Sie den WebSocket verbinden und dann Nachrichten senden und empfangen:
<img src="/img/tutorial/websockets/image05.png">
## Verbindungsabbrüche und mehrere Clients handhaben { #handling-disconnections-and-multiple-clients }
Wenn eine WebSocket-Verbindung geschlossen wird, löst `await websocket.receive_text()` eine `WebSocketDisconnect`-Exception aus, die Sie dann wie in folgendem Beispiel abfangen und behandeln können.
{* ../../docs_src/websockets_/tutorial003_py310.py hl[79:81] *}
Zum Ausprobieren:
* Öffnen Sie die Anwendung mit mehreren Browser-Tabs.
* Schreiben Sie Nachrichten in den Tabs.
* Schließen Sie dann einen der Tabs.
Das wird die Ausnahme `WebSocketDisconnect` auslösen und alle anderen Clients erhalten eine Nachricht wie:
```
Client #1596980209979 left the chat
```
/// tip | Tipp
Die obige Anwendung ist ein minimales und einfaches Beispiel, das zeigt, wie Nachrichten verarbeitet und an mehrere WebSocket-Verbindungen gesendet werden.
Beachten Sie jedoch, dass, da alles nur im Speicher in einer einzigen Liste verwaltet wird, es nur funktioniert, während der Prozess ausgeführt wird, und nur mit einem einzelnen Prozess.
Wenn Sie etwas benötigen, das sich leicht in FastAPI integrieren lässt, aber robuster ist und von Redis, PostgreSQL und anderen unterstützt wird, sehen Sie sich [encode/broadcaster](https://github.com/encode/broadcaster) an.
///
## Mehr Informationen { #more-info }
Weitere Informationen zu Optionen finden Sie in der Dokumentation von Starlette:
* [Die `WebSocket`-Klasse](https://www.starlette.dev/websockets/).
* [Klassen-basierte Handhabung von WebSockets](https://www.starlette.dev/endpoints/#websocketendpoint).

View File

@ -0,0 +1,51 @@
# WSGI inkludieren Flask, Django und andere { #including-wsgi-flask-django-others }
Sie können WSGI-Anwendungen mounten, wie Sie es in [Unteranwendungen Mounts](sub-applications.md), [Hinter einem Proxy](behind-a-proxy.md) gesehen haben.
Dazu können Sie die `WSGIMiddleware` verwenden und damit Ihre WSGI-Anwendung wrappen, zum Beispiel Flask, Django usw.
## `WSGIMiddleware` verwenden { #using-wsgimiddleware }
/// info | Info
Dafür muss `a2wsgi` installiert sein, z. B. mit `pip install a2wsgi`.
///
Sie müssen `WSGIMiddleware` aus `a2wsgi` importieren.
Wrappen Sie dann die WSGI-Anwendung (z. B. Flask) mit der Middleware.
Und dann mounten Sie das auf einem Pfad.
{* ../../docs_src/wsgi/tutorial001_py310.py hl[1,3,23] *}
/// note | Hinweis
Früher wurde empfohlen, `WSGIMiddleware` aus `fastapi.middleware.wsgi` zu verwenden, dies ist jetzt deprecatet.
Stattdessen wird empfohlen, das Paket `a2wsgi` zu verwenden. Die Nutzung bleibt gleich.
Stellen Sie lediglich sicher, dass das Paket `a2wsgi` installiert ist und importieren Sie `WSGIMiddleware` korrekt aus `a2wsgi`.
///
## Es testen { #check-it }
Jetzt wird jeder <abbr title="Request Anfrage: Daten, die der Client zum Server sendet">Request</abbr> unter dem Pfad `/v1/` von der Flask-Anwendung verarbeitet.
Und der Rest wird von **FastAPI** gehandhabt.
Wenn Sie das ausführen und auf [http://localhost:8000/v1/](http://localhost:8000/v1/) gehen, sehen Sie die <abbr title="Response Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Response</abbr> von Flask:
```txt
Hello, World from Flask!
```
Und wenn Sie auf [http://localhost:8000/v2](http://localhost:8000/v2) gehen, sehen Sie die Response von FastAPI:
```JSON
{
"message": "Hello World"
}
```

View File

@ -0,0 +1,485 @@
# Alternativen, Inspiration und Vergleiche { #alternatives-inspiration-and-comparisons }
Was hat **FastAPI** inspiriert, wie es sich im Vergleich zu Alternativen verhält und was es von ihnen gelernt hat.
## Einführung { #intro }
**FastAPI** würde ohne die frühere Arbeit anderer nicht existieren.
Es wurden zuvor viele Tools entwickelt, die als Inspiration für seine Entwicklung dienten.
Ich habe die Schaffung eines neuen Frameworks viele Jahre lang vermieden. Zuerst habe ich versucht, alle von **FastAPI** abgedeckten Funktionen mithilfe vieler verschiedener Frameworks, Plugins und Tools zu lösen.
Aber irgendwann gab es keine andere Möglichkeit, als etwas zu schaffen, das all diese Funktionen bereitstellte, die besten Ideen früherer Tools aufnahm und diese auf die bestmögliche Weise kombinierte, wobei Sprachfunktionen verwendet wurden, die vorher noch nicht einmal verfügbar waren (Python 3.6+ Typhinweise).
## Vorherige Tools { #previous-tools }
### [Django](https://www.djangoproject.com/) { #django }
Es ist das beliebteste Python-Framework und genießt großes Vertrauen. Es wird zum Aufbau von Systemen wie Instagram verwendet.
Es ist relativ eng mit relationalen Datenbanken (wie MySQL oder PostgreSQL) gekoppelt, daher ist es nicht sehr einfach, eine NoSQL-Datenbank (wie Couchbase, MongoDB, Cassandra, usw.) als Hauptspeicherengine zu verwenden.
Es wurde erstellt, um den HTML-Code im Backend zu generieren, nicht um APIs zu erstellen, die von einem modernen Frontend (wie React, Vue.js und Angular) oder von anderen Systemen (wie <abbr title="Internet of Things - Internet der Dinge">IoT</abbr>-Geräten) verwendet werden, um mit ihm zu kommunizieren.
### [Django REST Framework](https://www.django-rest-framework.org/) { #django-rest-framework }
Das Django REST Framework wurde als flexibles Toolkit zum Erstellen von Web-APIs unter Verwendung von Django entwickelt, um dessen API-Möglichkeiten zu verbessern.
Es wird von vielen Unternehmen verwendet, darunter Mozilla, Red Hat und Eventbrite.
Es war eines der ersten Beispiele für **automatische API-Dokumentation**, und dies war insbesondere eine der ersten Ideen, welche „die Suche nach“ **FastAPI** inspirierten.
/// note | Hinweis
Das Django REST Framework wurde von Tom Christie erstellt. Derselbe Schöpfer von Starlette und Uvicorn, auf denen **FastAPI** basiert.
///
/// check | Inspirierte **FastAPI**
Eine automatische API-Dokumentationsoberfläche zu haben.
///
### [Flask](https://flask.palletsprojects.com) { #flask }
Flask ist ein „Mikroframework“, es enthält weder Datenbankintegration noch viele der Dinge, die standardmäßig in Django enthalten sind.
Diese Einfachheit und Flexibilität ermöglichen beispielsweise die Verwendung von NoSQL-Datenbanken als Hauptdatenspeichersystem.
Da es sehr einfach ist, ist es relativ intuitiv zu erlernen, obwohl die Dokumentation an einigen Stellen etwas technisch wird.
Es wird auch häufig für andere Anwendungen verwendet, die nicht unbedingt eine Datenbank, Benutzerverwaltung oder eine der vielen in Django enthaltenen Funktionen benötigen. Obwohl viele dieser Funktionen mit Plugins hinzugefügt werden können.
Diese Entkopplung der Teile und die Tatsache, dass es sich um ein „Mikroframework“ handelt, welches so erweitert werden kann, dass es genau das abdeckt, was benötigt wird, war ein Schlüsselmerkmal, das ich beibehalten wollte.
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.
/// check | Inspirierte **FastAPI**
Ein Mikroframework zu sein. Es einfach zu machen, die benötigten Tools und Teile zu kombinieren.
Über ein einfaches und benutzerfreundliches Routingsystem zu verfügen.
///
### [Requests](https://requests.readthedocs.io) { #requests }
**FastAPI** ist eigentlich keine Alternative zu **Requests**. Der Umfang der beiden ist sehr unterschiedlich.
Es wäre tatsächlich üblich, Requests *innerhalb* einer FastAPI-Anwendung zu verwenden.
Dennoch erhielt FastAPI von Requests einiges an Inspiration.
**Requests** ist eine Bibliothek zur *Interaktion* mit APIs (als Client), während **FastAPI** eine Bibliothek zum *Erstellen* von APIs (als Server) ist.
Die beiden stehen mehr oder weniger an entgegengesetzten Enden und ergänzen sich.
Requests hat ein sehr einfaches und intuitives Design, ist sehr einfach zu bedienen und verfügt über sinnvolle Standardeinstellungen. Aber gleichzeitig ist es sehr leistungsstark und anpassbar.
Aus diesem Grund heißt es auf der offiziellen Website:
> Requests ist eines der am häufigsten heruntergeladenen Python-Packages aller Zeiten
Die Art und Weise, wie Sie es verwenden, ist sehr einfach. Um beispielsweise einen `GET`-<abbr title="Request - Anfrage: Daten, die der Client zum Server sendet">Request</abbr> zu machen, würden Sie schreiben:
```Python
response = requests.get("http://example.com/some/url")
```
Die entsprechende *Pfadoperation* der FastAPI-API könnte wie folgt aussehen:
```Python hl_lines="1"
@app.get("/some/url")
def read_url():
return {"message": "Hello World"}
```
Sehen Sie sich die Ähnlichkeiten in `requests.get(...)` und `@app.get(...)` an.
/// check | Inspirierte **FastAPI**
* Über eine einfache und intuitive API zu verfügen.
* HTTP-Methodennamen (Operationen) direkt, auf einfache und intuitive Weise zu verwenden.
* Vernünftige Standardeinstellungen zu haben, aber auch mächtige Einstellungsmöglichkeiten.
///
### [Swagger](https://swagger.io/) / [OpenAPI](https://github.com/OAI/OpenAPI-Specification/) { #swagger-openapi }
Die Hauptfunktion, die ich vom Django REST Framework haben wollte, war die automatische API-Dokumentation.
Dann fand ich heraus, dass es einen Standard namens Swagger gab, zur Dokumentation von APIs unter Verwendung von JSON (oder YAML, einer Erweiterung von JSON).
Und es gab bereits eine Web-Oberfläche für Swagger-APIs. Die Möglichkeit, Swagger-Dokumentation für eine API zu generieren, würde die automatische Nutzung dieser Web-Oberfläche ermöglichen.
Irgendwann wurde Swagger an die Linux Foundation übergeben und in OpenAPI umbenannt.
Aus diesem Grund spricht man bei Version 2.0 häufig von „Swagger“ und ab Version 3 von „OpenAPI“.
/// check | Inspirierte **FastAPI**
Einen offenen Standard für API-Spezifikationen zu übernehmen und zu verwenden, anstelle eines benutzerdefinierten Schemas.
Und Standard-basierte Tools für die Oberfläche zu integrieren:
* [Swagger UI](https://github.com/swagger-api/swagger-ui)
* [ReDoc](https://github.com/Rebilly/ReDoc)
Diese beiden wurden ausgewählt, weil sie ziemlich beliebt und stabil sind, aber bei einer schnellen Suche könnten Sie Dutzende alternativer Benutzeroberflächen für OpenAPI finden (welche Sie mit **FastAPI** verwenden können).
///
### Flask REST Frameworks { #flask-rest-frameworks }
Es gibt mehrere Flask REST Frameworks, aber nachdem ich die Zeit und Arbeit investiert habe, sie zu untersuchen, habe ich festgestellt, dass viele nicht mehr unterstützt werden oder abgebrochen wurden und dass mehrere fortbestehende Probleme sie unpassend machten.
### [Marshmallow](https://marshmallow.readthedocs.io/en/stable/) { #marshmallow }
Eine der von API-Systemen benötigten Hauptfunktionen ist die Daten-<dfn title="auch genannt: Marshalling, Konvertierung">„Serialisierung“</dfn>, welche Daten aus dem Code (Python) entnimmt und in etwas umwandelt, was durch das Netzwerk gesendet werden kann. Beispielsweise das Konvertieren eines Objekts, welches Daten aus einer Datenbank enthält, in ein JSON-Objekt. Konvertieren von `datetime`-Objekten in Strings, usw.
Eine weitere wichtige Funktion, benötigt von APIs, ist die Datenvalidierung, welche sicherstellt, dass die Daten unter gegebenen Umständen gültig sind. Zum Beispiel, dass ein Feld ein `int` ist und kein zufälliger String. Das ist besonders nützlich für hereinkommende Daten.
Ohne ein Datenvalidierungssystem müssten Sie alle Prüfungen manuell im Code durchführen.
Für diese Funktionen wurde Marshmallow entwickelt. Es ist eine großartige Bibliothek und ich habe sie schon oft genutzt.
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.
/// check | Inspirierte **FastAPI**
Code zu verwenden, um „Schemas“ zu definieren, welche Datentypen und Validierung automatisch bereitstellen.
///
### [Webargs](https://webargs.readthedocs.io/en/latest/) { #webargs }
Eine weitere wichtige Funktion, die von APIs benötigt wird, ist das <dfn title="Lesen und Konvertieren nach Python-Daten">Parsen</dfn> von Daten aus eingehenden Requests.
Webargs wurde entwickelt, um dieses für mehrere Frameworks, einschließlich Flask, bereitzustellen.
Es verwendet unter der Haube Marshmallow, um die Datenvalidierung durchzuführen. Und es wurde von denselben Entwicklern erstellt.
Es ist ein großartiges Tool und ich habe es auch oft verwendet, bevor ich **FastAPI** hatte.
/// info | Info
Webargs wurde von denselben Marshmallow-Entwicklern erstellt.
///
/// check | Inspirierte **FastAPI**
Eingehende Requestdaten automatisch zu validieren.
///
### [APISpec](https://apispec.readthedocs.io/en/stable/) { #apispec }
Marshmallow und Webargs bieten Validierung, Parsen und Serialisierung als Plugins.
Es fehlt jedoch noch die Dokumentation. Dann wurde APISpec erstellt.
Es ist ein Plugin für viele Frameworks (und es gibt auch ein Plugin für Starlette).
Die Funktionsweise besteht darin, dass Sie die Definition des Schemas im YAML-Format im Docstring jeder Funktion schreiben, die eine Route verarbeitet.
Und es generiert OpenAPI-Schemas.
So funktioniert es in Flask, Starlette, Responder, usw.
Aber dann haben wir wieder das Problem einer Mikrosyntax innerhalb eines Python-Strings (eines großen YAML).
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.
/// info | Info
APISpec wurde von denselben Marshmallow-Entwicklern erstellt.
///
/// check | Inspirierte **FastAPI**
Den offenen Standard für APIs, OpenAPI, zu unterstützen.
///
### [Flask-apispec](https://flask-apispec.readthedocs.io/en/latest/) { #flask-apispec }
Hierbei handelt es sich um ein Flask-Plugin, welches Webargs, Marshmallow und APISpec miteinander verbindet.
Es nutzt die Informationen von Webargs und Marshmallow, um mithilfe von APISpec automatisch OpenAPI-Schemas zu generieren.
Ein großartiges Tool, sehr unterbewertet. Es sollte weitaus populärer als viele andere Flask-Plugins sein. Möglicherweise liegt es daran, dass die Dokumentation zu kompakt und abstrakt ist.
Das löste das Problem, YAML (eine andere Syntax) in Python-Docstrings schreiben zu müssen.
Diese Kombination aus Flask, Flask-apispec mit Marshmallow und Webargs war bis zur Entwicklung von **FastAPI** mein Lieblings-Backend-Stack.
Die Verwendung führte zur Entwicklung mehrerer Flask-Full-Stack-Generatoren. Dies sind die Hauptstacks, die ich (und mehrere externe Teams) bisher verwendet haben:
* [https://github.com/tiangolo/full-stack](https://github.com/tiangolo/full-stack)
* [https://github.com/tiangolo/full-stack-flask-couchbase](https://github.com/tiangolo/full-stack-flask-couchbase)
* [https://github.com/tiangolo/full-stack-flask-couchdb](https://github.com/tiangolo/full-stack-flask-couchdb)
Und dieselben Full-Stack-Generatoren bildeten die Basis der [**FastAPI**-Projektgeneratoren](project-generation.md).
/// info | Info
Flask-apispec wurde von denselben Marshmallow-Entwicklern erstellt.
///
/// check | Inspirierte **FastAPI**
Das OpenAPI-Schema automatisch zu generieren, aus demselben Code, welcher die Serialisierung und Validierung definiert.
///
### [NestJS](https://nestjs.com/) (und [Angular](https://angular.io/)) { #nestjs-and-angular }
Dies ist nicht einmal Python, NestJS ist ein von Angular inspiriertes JavaScript (TypeScript) NodeJS Framework.
Es erreicht etwas Ähnliches wie Flask-apispec.
Es verfügt über ein integriertes Dependency Injection System, welches von Angular 2 inspiriert ist. Erfordert ein Vorab-Registrieren der „Injectables“ (wie alle anderen Dependency Injection Systeme, welche ich kenne), sodass der Code ausschweifender wird und es mehr Codeverdoppelung gibt.
Da die Parameter mit TypeScript-Typen beschrieben werden (ähnlich den Python-Typhinweisen), ist die Editorunterstützung ziemlich gut.
Da TypeScript-Daten jedoch nach der Kompilierung nach JavaScript nicht erhalten bleiben, können die Typen nicht gleichzeitig die Validierung, Serialisierung und Dokumentation definieren. Aus diesem Grund und aufgrund einiger Designentscheidungen ist es für die Validierung, Serialisierung und automatische Schemagenerierung erforderlich, an vielen Stellen Dekoratoren hinzuzufügen. Es wird also ziemlich ausführlich.
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.
/// check | Inspirierte **FastAPI**
Python-Typen zu verwenden, um eine hervorragende Editorunterstützung zu erhalten.
Über ein leistungsstarkes Dependency Injection System zu verfügen. Eine Möglichkeit zu finden, Codeverdoppelung zu minimieren.
///
### [Sanic](https://sanic.readthedocs.io/en/latest/) { #sanic }
Es war eines der ersten extrem schnellen Python-Frameworks, welches auf `asyncio` basierte. Es wurde so gestaltet, dass es Flask sehr ähnlich ist.
/// note | Technische Details
Es verwendete [`uvloop`](https://github.com/MagicStack/uvloop) anstelle der standardmäßigen Python-`asyncio`-Schleife. Das hat es so schnell gemacht.
Hat eindeutig Uvicorn und Starlette inspiriert, welche derzeit in offenen Benchmarks schneller als Sanic sind.
///
/// check | Inspirierte **FastAPI**
Einen Weg zu finden, eine hervorragende Performanz zu haben.
Aus diesem Grund basiert **FastAPI** auf Starlette, da dieses das schnellste verfügbare Framework ist (getestet in Benchmarks von Dritten).
///
### [Falcon](https://falconframework.org/) { #falcon }
Falcon ist ein weiteres leistungsstarkes Python-Framework. Es ist minimalistisch konzipiert und dient als Grundlage für andere Frameworks wie Hug.
Es ist so konzipiert, dass es über Funktionen verfügt, welche zwei Parameter empfangen, einen <abbr title="Request - Anfrage: Daten, die der Client zum Server sendet">„Request“</abbr> und eine <abbr title="Response - Antwort: Daten, die der Server zum anfragenden Client zurücksendet">„Response“</abbr>. Dann „lesen“ Sie Teile des Requests und „schreiben“ Teile der Response. Aufgrund dieses Designs ist es nicht möglich, Request-Parameter und -Bodys mit Standard-Python-Typhinweisen als Funktionsparameter zu deklarieren.
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.
/// check | Inspirierte **FastAPI**
Wege zu finden, eine großartige Performanz zu erzielen.
Zusammen mit Hug (da Hug auf Falcon basiert), einen `response`-Parameter in Funktionen zu deklarieren.
Obwohl er in FastAPI optional ist und hauptsächlich zum Festlegen von Headern, Cookies und alternativen Statuscodes verwendet wird.
///
### [Molten](https://moltenframework.com/) { #molten }
Ich habe Molten in den ersten Phasen der Entwicklung von **FastAPI** entdeckt. Und es hat ganz ähnliche Ideen:
* Basierend auf Python-Typhinweisen.
* Validierung und Dokumentation aus diesen Typen.
* Dependency Injection System.
Es verwendet keine Datenvalidierungs-, Serialisierungs- und Dokumentationsbibliothek eines Dritten wie Pydantic, sondern verfügt über eine eigene. Daher wären diese Datentyp-Definitionen nicht so einfach wiederverwendbar.
Es erfordert eine etwas ausführlichere Konfiguration. Und da es auf WSGI (anstelle von ASGI) basiert, ist es nicht darauf ausgelegt, die hohe Leistung von Tools wie Uvicorn, Starlette und Sanic zu nutzen.
Das Dependency Injection System erfordert eine Vorab-Registrierung der Abhängigkeiten und die Abhängigkeiten werden basierend auf den deklarierten Typen aufgelöst. Daher ist es nicht möglich, mehr als eine „Komponente“ zu deklarieren, welche einen bestimmten Typ bereitstellt.
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.
/// 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.
Das hat tatsächlich dazu geführt, dass Teile von Pydantic aktualisiert wurden, um denselben Validierungsdeklarationsstil zu unterstützen (diese gesamte Funktionalität ist jetzt bereits in Pydantic verfügbar).
///
### [Hug](https://github.com/hugapi/hug) { #hug }
Hug war eines der ersten Frameworks, welches die Deklaration von API-Parametertypen mithilfe von Python-Typhinweisen implementierte. Das war eine großartige Idee, die andere Tools dazu inspirierte, dasselbe zu tun.
Es verwendete benutzerdefinierte Typen in seinen Deklarationen anstelle von Standard-Python-Typen, es war aber dennoch ein großer Fortschritt.
Außerdem war es eines der ersten Frameworks, welches ein benutzerdefiniertes Schema generierte, welches die gesamte API in JSON deklarierte.
Es basierte nicht auf einem Standard wie OpenAPI und JSON Schema. Daher wäre es nicht einfach, es in andere Tools wie Swagger UI zu integrieren. Aber, nochmal, es war eine sehr innovative Idee.
Es verfügt über eine interessante, ungewöhnliche Funktion: Mit demselben Framework ist es möglich, APIs und auch CLIs zu erstellen.
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.
/// 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.
///
/// check | Ideen, die **FastAPI** inspiriert haben
Hug inspirierte Teile von APIStar und war eines der Tools, die ich am vielversprechendsten fand, neben APIStar.
Hug hat dazu beigetragen, **FastAPI** dazu zu inspirieren, Python-Typhinweise zum Deklarieren von Parametern zu verwenden und ein Schema zu generieren, das die API automatisch definiert.
Hug inspirierte **FastAPI** dazu, einen `response`-Parameter in Funktionen zu deklarieren, um Header und Cookies zu setzen.
///
### [APIStar](https://github.com/encode/apistar) (≦ 0.5) { #apistar-0-5 }
Kurz bevor ich mich entschied, **FastAPI** zu erstellen, fand ich den **APIStar**-Server. Er hatte fast alles, was ich suchte, und ein tolles Design.
Er war eine der ersten Implementierungen eines Frameworks, die ich je gesehen hatte (vor NestJS und Molten), welches Python-Typhinweise zur Deklaration von Parametern und Requests verwendeten. Ich habe ihn mehr oder weniger zeitgleich mit Hug gefunden. Aber APIStar nutzte den OpenAPI-Standard.
Er verfügte an mehreren Stellen über automatische Datenvalidierung, Datenserialisierung und OpenAPI-Schemagenerierung, basierend auf denselben Typhinweisen.
Body-Schemadefinitionen verwendeten nicht die gleichen Python-Typhinweise wie Pydantic, er war Marshmallow etwas ähnlicher, sodass die Editorunterstützung nicht so gut war, aber dennoch war APIStar die beste verfügbare Option.
Er hatte zu dieser Zeit die besten Leistungsbenchmarks (nur übertroffen von Starlette).
Anfangs gab es keine Web-Oberfläche für die automatische API-Dokumentation, aber ich wusste, dass ich Swagger UI hinzufügen konnte.
Er verfügte über ein Dependency Injection System. Es erforderte eine Vorab-Registrierung der Komponenten, wie auch bei anderen oben besprochenen Tools. Aber dennoch, es war ein tolles Feature.
Ich konnte ihn nie in einem vollständigen Projekt verwenden, da er keine Sicherheitsintegration hatte, sodass ich nicht alle Funktionen, die ich hatte, durch die auf Flask-apispec basierenden Full-Stack-Generatoren ersetzen konnte. Ich hatte in meinem Projekte-Backlog den Eintrag, einen Pull Request zu erstellen, welcher diese Funktionalität hinzufügte.
Doch dann verlagerte sich der Schwerpunkt des Projekts.
Es handelte sich nicht länger um ein API-Webframework, da sich der Entwickler auf Starlette konzentrieren musste.
Jetzt handelt es sich bei APIStar um eine Reihe von Tools zur Validierung von OpenAPI-Spezifikationen, nicht um ein Webframework.
/// info | Info
APIStar wurde von Tom Christie erstellt. Derselbe, welcher Folgendes erstellt hat:
* Django REST Framework
* Starlette (auf welchem **FastAPI** basiert)
* Uvicorn (verwendet von Starlette und **FastAPI**)
///
/// check | Inspirierte **FastAPI**
Zu existieren.
Die Idee, mehrere Dinge (Datenvalidierung, Serialisierung und Dokumentation) mit denselben Python-Typen zu deklarieren, welche gleichzeitig eine hervorragende Editorunterstützung bieten, hielt ich für eine brillante Idee.
Und nach einer langen Suche nach einem ähnlichen Framework und dem Testen vieler verschiedener Alternativen, war APIStar die beste verfügbare Option.
Dann hörte APIStar auf, als Server zu existieren, und Starlette wurde geschaffen, welches eine neue, bessere Grundlage für ein solches System bildete. Das war die finale Inspiration für die Entwicklung von **FastAPI**.
Ich betrachte **FastAPI** als einen „spirituellen Nachfolger“ von APIStar, welcher die Funktionen, das Typsystem und andere Teile verbessert und erweitert, basierend auf den Erkenntnissen aus all diesen früheren Tools.
///
## Verwendet von **FastAPI** { #used-by-fastapi }
### [Pydantic](https://docs.pydantic.dev/) { #pydantic }
Pydantic ist eine Bibliothek zum Definieren von Datenvalidierung, Serialisierung und Dokumentation (unter Verwendung von JSON Schema) basierend auf Python-Typhinweisen.
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.
/// check | **FastAPI** verwendet es, um
Die gesamte Datenvalidierung, Datenserialisierung und automatische Modelldokumentation (basierend auf JSON Schema) zu erledigen.
**FastAPI** nimmt dann, abgesehen von all den anderen Dingen, die es tut, dieses JSON-Schema und fügt es in OpenAPI ein.
///
### [Starlette](https://www.starlette.dev/) { #starlette }
Starlette ist ein leichtgewichtiges <dfn title="Der neue Standard für die Erstellung asynchroner Python-Webanwendungen">ASGI</dfn>-Framework/Toolkit, welches sich ideal für die Erstellung hochperformanter asynchroner Dienste eignet.
Es ist sehr einfach und intuitiv. Es ist so konzipiert, dass es leicht erweiterbar ist und über modulare Komponenten verfügt.
Es bietet:
* Eine sehr beeindruckende Leistung.
* WebSocket-Unterstützung.
* Hintergrundtasks im selben Prozess.
* Startup- und Shutdown-Events.
* Testclient basierend auf HTTPX.
* CORS, GZip, statische Dateien, Responses streamen.
* Session- und Cookie-Unterstützung.
* 100 % Testabdeckung.
* 100 % Typannotierte Codebasis.
* Wenige starke Abhängigkeiten.
Starlette ist derzeit das schnellste getestete Python-Framework. Nur übertroffen von Uvicorn, welches kein Framework, sondern ein Server ist.
Starlette bietet alle grundlegenden Funktionen eines Web-Microframeworks.
Es bietet jedoch keine automatische Datenvalidierung, Serialisierung oder Dokumentation.
Das ist eines der wichtigsten Dinge, welche **FastAPI** hinzufügt, alles basierend auf Python-Typhinweisen (mit Pydantic). Das, plus, das Dependency Injection System, Sicherheitswerkzeuge, OpenAPI-Schemagenerierung, usw.
/// note | Technische Details
ASGI ist ein neuer „Standard“, welcher von Mitgliedern des Django-Kernteams entwickelt wird. Es handelt sich immer noch nicht um einen „Python-Standard“ (ein PEP), obwohl sie gerade dabei sind, das zu tun.
Dennoch wird es bereits von mehreren Tools als „Standard“ verwendet. Das verbessert die Interoperabilität erheblich, da Sie Uvicorn mit jeden anderen ASGI-Server (wie Daphne oder Hypercorn) tauschen oder ASGI-kompatible Tools wie `python-socketio` hinzufügen können.
///
/// check | **FastAPI** verwendet es, um
Alle Kern-Webaspekte zu handhaben. Und fügt Funktionen obenauf.
Die Klasse `FastAPI` selbst erbt direkt von der Klasse `Starlette`.
Alles, was Sie also mit Starlette machen können, können Sie direkt mit **FastAPI** machen, da es sich im Grunde um Starlette auf Steroiden handelt.
///
### [Uvicorn](https://www.uvicorn.dev/) { #uvicorn }
Uvicorn ist ein blitzschneller ASGI-Server, der auf uvloop und httptools basiert.
Es handelt sich nicht um ein Webframework, sondern um einen Server. Beispielsweise werden keine Tools für das Routing von Pfaden bereitgestellt. Das ist etwas, was ein Framework wie Starlette (oder **FastAPI**) zusätzlich bieten würde.
Es ist der empfohlene Server für Starlette und **FastAPI**.
/// check | **FastAPI** empfiehlt es als
Hauptwebserver zum Ausführen von **FastAPI**-Anwendungen.
Sie können auch die Kommandozeilenoption `--workers` verwenden, um einen asynchronen Multiprozess-Server zu erhalten.
Weitere Details finden Sie im Abschnitt [Deployment](deployment/index.md).
///
## Benchmarks und Geschwindigkeit { #benchmarks-and-speed }
Um den Unterschied zwischen Uvicorn, Starlette und FastAPI zu verstehen, zu vergleichen, und zu sehen, lesen Sie den Abschnitt über [Benchmarks](benchmarks.md).

444
docs/de/docs/async.md Normal file
View File

@ -0,0 +1,444 @@
# Nebenläufigkeit und async / await { #concurrency-and-async-await }
Details zur `async def`-Syntax für *Pfadoperation-Funktionen* und Hintergrundinformationen zu asynchronem Code, Nebenläufigkeit und Parallelität.
## In Eile? { #in-a-hurry }
<abbr title="too long; didn't read - Zu lang; nicht gelesen"><strong>TL;DR:</strong></abbr>
Wenn Sie Bibliotheken von Dritten verwenden, die mit `await` aufgerufen werden müssen, wie zum Beispiel:
```Python
results = await some_library()
```
Dann deklarieren Sie Ihre *Pfadoperation-Funktionen* mit `async def`, wie in:
```Python hl_lines="2"
@app.get('/')
async def read_results():
results = await some_library()
return results
```
/// note | Hinweis
Sie können `await` nur innerhalb von Funktionen verwenden, die mit `async def` erstellt wurden.
///
---
Wenn Sie eine Bibliothek eines Dritten verwenden, die mit etwas kommuniziert (einer Datenbank, einer API, dem Dateisystem, usw.) und welche die Verwendung von `await` nicht unterstützt (dies ist derzeit bei den meisten Datenbankbibliotheken der Fall), dann deklarieren Sie Ihre *Pfadoperation-Funktionen* ganz normal nur mit `def`, wie in:
```Python hl_lines="2"
@app.get('/')
def results():
results = some_library()
return results
```
---
Wenn Ihre Anwendung (irgendwie) nicht mit etwas anderem kommunizieren und auf dessen Antwort warten muss, verwenden Sie `async def`, auch wenn Sie `await` im Inneren nicht verwenden müssen.
---
Wenn Sie sich unsicher sind, verwenden Sie einfach `def`.
---
**Hinweis**: Sie können `def` und `async def` in Ihren *Pfadoperation-Funktionen* beliebig mischen, so wie Sie es benötigen, und jede einzelne Funktion in der für Sie besten Variante erstellen. FastAPI wird damit das Richtige tun.
Wie dem auch sei, in jedem der oben genannten Fälle wird FastAPI immer noch asynchron arbeiten und extrem schnell sein.
Wenn Sie jedoch den oben genannten Schritten folgen, können einige Performanz-Optimierungen vorgenommen werden.
## Technische Details { #technical-details }
Moderne Versionen von Python unterstützen **„asynchronen Code“** unter Verwendung sogenannter **„Coroutinen“** mithilfe der Syntax **`async` und `await`**.
Nehmen wir obigen Satz in den folgenden Abschnitten Schritt für Schritt unter die Lupe:
* **Asynchroner Code**
* **`async` und `await`**
* **Coroutinen**
## Asynchroner Code { #asynchronous-code }
Asynchroner Code bedeutet lediglich, dass die Sprache 💬 eine Möglichkeit hat, dem Computer / Programm 🤖 mitzuteilen, dass es 🤖 an einem bestimmten Punkt im Code darauf warten muss, dass *etwas anderes* irgendwo anders fertig wird. Nehmen wir an, *etwas anderes* ist hier „Langsam-Datei“ 📝.
Während der Zeit, die „Langsam-Datei“ 📝 benötigt, kann das System also andere Aufgaben erledigen.
Dann kommt der Computer / das Programm 🤖 bei jeder Gelegenheit zurück, weil es entweder wieder wartet oder wann immer es 🤖 die ganze Arbeit erledigt hat, die zu diesem Zeitpunkt zu tun war. Und es 🤖 wird nachschauen, ob eine der Aufgaben, auf die es gewartet hat, fertig ist.
Dann nimmt es 🤖 die erste erledigte Aufgabe (sagen wir, unsere „Langsam-Datei“ 📝) und bearbeitet sie weiter.
Das „Warten auf etwas anderes“ bezieht sich normalerweise auf <abbr title="Input and Output - Eingabe und Ausgabe">I/O</abbr>-Operationen, die relativ „langsam“ sind (im Vergleich zur Geschwindigkeit des Prozessors und des Arbeitsspeichers), wie etwa das Warten darauf, dass:
* die Daten des Clients über das Netzwerk empfangen wurden
* die von Ihrem Programm gesendeten Daten vom Client über das Netzwerk empfangen wurden
* der Inhalt einer Datei vom System von der Festplatte gelesen und an Ihr Programm übergeben wurde
* der Inhalt, den Ihr Programm dem System übergeben hat, auf die Festplatte geschrieben wurde
* eine Remote-API-Operation beendet wurde
* Eine Datenbankoperation abgeschlossen wurde
* eine Datenbankabfrage die Ergebnisse zurückgegeben hat
* usw.
Da die Ausführungszeit hier hauptsächlich durch das Warten auf <abbr title="Input and Output - Eingabe und Ausgabe">I/O</abbr>-Operationen verbraucht wird, nennt man dies auch „I/O-lastige“ („I/O bound“) Operationen.
„Asynchron“, sagt man, weil der Computer / das Programm nicht mit einer langsamen Aufgabe „synchronisiert“ werden muss und nicht auf den genauen Moment warten muss, in dem die Aufgabe beendet ist, ohne dabei etwas zu tun, um schließlich das Ergebnis der Aufgabe zu übernehmen und die Arbeit fortsetzen zu können.
Da es sich stattdessen um ein „asynchrones“ System handelt, kann die Aufgabe nach Abschluss ein wenig (einige Mikrosekunden) in der Schlange warten, bis der Computer / das Programm seine anderen Dinge erledigt hat und zurückkommt, um die Ergebnisse entgegenzunehmen und mit ihnen weiterzuarbeiten.
Für „synchron“ (im Gegensatz zu „asynchron“) wird auch oft der Begriff „sequentiell“ verwendet, da der Computer / das Programm alle Schritte in einer Sequenz („der Reihe nach“) ausführt, bevor es zu einer anderen Aufgabe wechselt, auch wenn diese Schritte mit Warten verbunden sind.
### Nebenläufigkeit und Hamburger { #concurrency-and-burgers }
Diese oben beschriebene Idee von **asynchronem** Code wird manchmal auch **„Nebenläufigkeit“** genannt. Sie unterscheidet sich von **„Parallelität“**.
**Nebenläufigkeit** und **Parallelität** beziehen sich beide auf „verschiedene Dinge, die mehr oder weniger gleichzeitig passieren“.
Aber die Details zwischen *Nebenläufigkeit* und *Parallelität* sind ziemlich unterschiedlich.
Um den Unterschied zu erkennen, stellen Sie sich die folgende Geschichte über Hamburger vor:
### Nebenläufige Hamburger { #concurrent-burgers }
Sie gehen mit Ihrem Schwarm Fastfood holen, stehen in der Schlange, während der Kassierer die Bestellungen der Leute vor Ihnen entgegennimmt. 😍
<img src="/img/async/concurrent-burgers/concurrent-burgers-01.png" class="illustration">
Dann sind Sie an der Reihe und Sie bestellen zwei sehr schmackhafte Burger für Ihren Schwarm und Sie. 🍔🍔
<img src="/img/async/concurrent-burgers/concurrent-burgers-02.png" class="illustration">
Der Kassierer sagt etwas zum Koch in der Küche, damit dieser weiß, dass er Ihre Burger zubereiten muss (obwohl er gerade die für die vorherigen Kunden zubereitet).
<img src="/img/async/concurrent-burgers/concurrent-burgers-03.png" class="illustration">
Sie bezahlen. 💸
Der Kassierer gibt Ihnen die Nummer Ihrer Bestellung.
<img src="/img/async/concurrent-burgers/concurrent-burgers-04.png" class="illustration">
Während Sie warten, suchen Sie sich mit Ihrem Schwarm einen Tisch aus, Sie sitzen da und reden lange mit Ihrem Schwarm (da Ihre Burger sehr aufwändig sind und die Zubereitung einige Zeit dauert).
Während Sie mit Ihrem Schwarm am Tisch sitzen und auf die Burger warten, können Sie die Zeit damit verbringen, zu bewundern, wie großartig, süß und klug Ihr Schwarm ist ✨😍✨.
<img src="/img/async/concurrent-burgers/concurrent-burgers-05.png" class="illustration">
Während Sie warten und mit Ihrem Schwarm sprechen, überprüfen Sie von Zeit zu Zeit die auf dem Zähler angezeigte Nummer, um zu sehen, ob Sie bereits an der Reihe sind.
Dann, irgendwann, sind Sie endlich an der Reihe. Sie gehen zur Theke, holen sich die Burger und kommen zurück an den Tisch.
<img src="/img/async/concurrent-burgers/concurrent-burgers-06.png" class="illustration">
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">
/// info | Info
Die wunderschönen Illustrationen stammen von [Ketrina Thompson](https://www.instagram.com/ketrinadrawsalot). 🎨
///
---
Stellen Sie sich vor, Sie wären der Computer / das Programm 🤖 in dieser Geschichte.
Während Sie an der Schlange stehen, sind Sie einfach untätig 😴, warten darauf, dass Sie an die Reihe kommen, und tun nichts sehr „Produktives“. Aber die Schlange ist schnell abgearbeitet, weil der Kassierer nur die Bestellungen entgegennimmt (und nicht zubereitet), also ist das vertretbar.
Wenn Sie dann an der Reihe sind, erledigen Sie tatsächliche „produktive“ Arbeit, Sie gehen das Menü durch, entscheiden sich, was Sie möchten, bekunden Ihre und die Wahl Ihres Schwarms, bezahlen, prüfen, ob Sie die richtige Menge Geld oder die richtige Karte geben, prüfen, ob die Rechnung korrekt ist, prüfen, dass die Bestellung die richtigen Artikel enthält, usw.
Aber dann, auch wenn Sie Ihre Burger noch nicht haben, ist Ihre Interaktion mit dem Kassierer erst mal „auf Pause“ ⏸, weil Sie warten müssen 🕙, bis Ihre Burger fertig sind.
Aber wenn Sie sich von der Theke entfernt haben und mit der Nummer für die Bestellung an einem Tisch sitzen, können Sie Ihre Aufmerksamkeit auf Ihren Schwarm lenken und an dieser Aufgabe „arbeiten“ ⏯ 🤓. Sie machen wieder etwas sehr „Produktives“ und flirten mit Ihrem Schwarm 😍.
Dann sagt der Kassierer 💁 „Ich bin mit dem Burger fertig“, indem er Ihre Nummer auf dem Display über der Theke anzeigt, aber Sie springen nicht sofort wie verrückt auf, wenn das Display auf Ihre Nummer springt. Sie wissen, dass niemand Ihnen Ihre Burger wegnimmt, denn Sie haben die Nummer Ihrer Bestellung, und andere Leute haben andere Nummern.
Also warten Sie darauf, dass Ihr Schwarm ihre Geschichte zu Ende erzählt (die aktuelle Arbeit ⏯ / bearbeitete Aufgabe beendet 🤓), lächeln sanft und sagen, dass Sie die Burger holen ⏸.
Dann gehen Sie zur Theke 🔀, zur ursprünglichen Aufgabe, die nun erledigt ist ⏯, nehmen die Burger auf, sagen Danke, und bringen sie zum Tisch. Damit ist dieser Schritt / diese Aufgabe der Interaktion mit der Theke abgeschlossen ⏹. Das wiederum schafft eine neue Aufgabe, „Burger essen“ 🔀 ⏯, aber die vorherige Aufgabe „Burger holen“ ist erledigt ⏹.
### Parallele Hamburger { #parallel-burgers }
Stellen wir uns jetzt vor, dass es sich hierbei nicht um „nebenläufige Hamburger“, sondern um „parallele Hamburger“ handelt.
Sie gehen los mit Ihrem Schwarm, um paralleles Fast Food zu bekommen.
Sie stehen in der Schlange, während mehrere (sagen wir acht) Kassierer, die gleichzeitig Köche sind, die Bestellungen der Leute vor Ihnen entgegennehmen.
Alle vor Ihnen warten darauf, dass ihre Burger fertig sind, bevor sie die Theke verlassen, denn jeder der 8 Kassierer geht los und bereitet den Burger sofort zu, bevor er die nächste Bestellung entgegennimmt.
<img src="/img/async/parallel-burgers/parallel-burgers-01.png" class="illustration">
Dann sind Sie endlich an der Reihe und bestellen zwei sehr leckere Burger für Ihren Schwarm und Sie.
Sie zahlen 💸.
<img src="/img/async/parallel-burgers/parallel-burgers-02.png" class="illustration">
Der Kassierer geht in die Küche.
Sie warten, vor der Theke stehend 🕙, damit niemand außer Ihnen Ihre Burger entgegennimmt, da es keine Nummern für die Reihenfolge gibt.
<img src="/img/async/parallel-burgers/parallel-burgers-03.png" class="illustration">
Da Sie und Ihr Schwarm damit beschäftigt sind, niemanden vor sich zu lassen, der Ihre Burger nimmt, wenn sie ankommen, können Sie Ihrem Schwarm keine Aufmerksamkeit schenken. 😞
Das ist „synchrone“ Arbeit, Sie sind mit dem Kassierer/Koch „synchronisiert“ 👨‍🍳. Sie müssen warten 🕙 und genau in dem Moment da sein, in dem der Kassierer/Koch 👨‍🍳 die Burger zubereitet hat und Ihnen gibt, sonst könnte jemand anderes sie nehmen.
<img src="/img/async/parallel-burgers/parallel-burgers-04.png" class="illustration">
Dann kommt Ihr Kassierer/Koch 👨‍🍳 endlich mit Ihren Burgern zurück, nachdem Sie lange vor der Theke gewartet 🕙 haben.
<img src="/img/async/parallel-burgers/parallel-burgers-05.png" class="illustration">
Sie nehmen Ihre Burger und gehen mit Ihrem Schwarm an den Tisch.
Sie essen sie und sind fertig. ⏹
<img src="/img/async/parallel-burgers/parallel-burgers-06.png" class="illustration">
Es wurde nicht viel geredet oder geflirtet, da die meiste Zeit mit Warten 🕙 vor der Theke verbracht wurde. 😞
/// info | Info
Die wunderschönen Illustrationen stammen von [Ketrina Thompson](https://www.instagram.com/ketrinadrawsalot). 🎨
///
---
In diesem Szenario der parallelen Hamburger sind Sie ein Computersystem / Programm 🤖 mit zwei Prozessoren (Sie und Ihr Schwarm), die beide warten 🕙 und ihre Aufmerksamkeit darauf verwenden, „lange Zeit vor der Theke zu warten“ 🕙.
Der Fast-Food-Laden verfügt über 8 Prozessoren (Kassierer/Köche). Während der nebenläufige Burger-Laden nur zwei hatte (einen Kassierer und einen Koch).
Dennoch ist das schlussendliche Benutzererlebnis nicht das Beste. 😞
---
Dies wäre die parallele äquivalente Geschichte für Hamburger. 🍔
Für ein „realeres“ Beispiel hierfür, stellen Sie sich eine Bank vor.
Bis vor kurzem hatten die meisten Banken mehrere Kassierer 👨‍💼👨‍💼👨‍💼👨‍💼 und eine große Warteschlange 🕙🕙🕙🕙🕙🕙🕙🕙.
Alle Kassierer erledigen die ganze Arbeit mit einem Kunden nach dem anderen 👨‍💼⏯.
Und man muss lange in der Schlange warten 🕙 sonst kommt man nicht an die Reihe.
Sie würden Ihren Schwarm 😍 wahrscheinlich nicht mitnehmen wollen, um Besorgungen bei der Bank zu erledigen 🏦.
### Hamburger Schlussfolgerung { #burger-conclusion }
In diesem Szenario „Fastfood-Burger mit Ihrem Schwarm“ ist es viel sinnvoller, ein nebenläufiges System zu haben ⏸🔀⏯, da viel gewartet wird 🕙.
Das ist auch bei den meisten Webanwendungen der Fall.
Viele, viele Benutzer, aber Ihr Server wartet 🕙 darauf, dass deren nicht so gute Internetverbindungen die <abbr title="Request Anfrage: Daten, die der Client zum Server sendet">Requests</abbr> übermitteln.
Und dann wieder warten 🕙, bis die <abbr title="Response Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Responses</abbr> zurückkommen.
Dieses „Warten“ 🕙 wird in Mikrosekunden gemessen, aber zusammenfassend lässt sich sagen, dass am Ende eine Menge gewartet wird.
Deshalb ist es sehr sinnvoll, asynchronen ⏸🔀⏯ Code für Web-APIs zu verwenden.
Diese Art der Asynchronität hat NodeJS populär gemacht (auch wenn NodeJS nicht parallel ist) und darin liegt die Stärke von Go als Programmiersprache.
Und das ist das gleiche Leistungsniveau, das Sie mit **FastAPI** erhalten.
Und da Sie Parallelität und Asynchronität gleichzeitig haben können, erzielen Sie eine höhere Performanz als die meisten getesteten NodeJS-Frameworks und sind mit Go auf Augenhöhe, einer kompilierten Sprache, die näher an C liegt [(alles dank Starlette)](https://www.techempower.com/benchmarks/#section=data-r17&hw=ph&test=query&l=zijmkf-1).
### Ist Nebenläufigkeit besser als Parallelität? { #is-concurrency-better-than-parallelism }
Nein! Das ist nicht die Moral der Geschichte.
Nebenläufigkeit unterscheidet sich von Parallelität. Und sie ist besser bei **bestimmten** Szenarien, die viel Warten erfordern. Aus diesem Grund ist sie im Allgemeinen viel besser als Parallelität für die Entwicklung von Webanwendungen. Aber das stimmt nicht für alle Anwendungen.
Um die Dinge auszugleichen, stellen Sie sich die folgende Kurzgeschichte vor:
> Sie müssen ein großes, schmutziges Haus aufräumen.
*Yup, das ist die ganze Geschichte*.
---
Es gibt kein Warten 🕙, nur viel Arbeit an mehreren Stellen im Haus.
Sie könnten wie im Hamburger-Beispiel hin- und herspringen, zuerst das Wohnzimmer, dann die Küche, aber da Sie auf nichts warten 🕙, sondern nur putzen und putzen, hätte das Hin- und Herspringen keine Auswirkungen.
Es würde mit oder ohne Hin- und Herspringen (Nebenläufigkeit) die gleiche Zeit in Anspruch nehmen, um fertig zu werden, und Sie hätten die gleiche Menge an Arbeit erledigt.
Aber wenn Sie in diesem Fall die acht Ex-Kassierer/Köche/jetzt Reinigungskräfte mitbringen würden und jeder von ihnen (plus Sie) würde einen Bereich des Hauses reinigen, könnten Sie die ganze Arbeit **parallel** erledigen, und würden mit dieser zusätzlichen Hilfe viel schneller fertig werden.
In diesem Szenario wäre jede einzelne Reinigungskraft (einschließlich Ihnen) ein Prozessor, der seinen Teil der Arbeit erledigt.
Und da die meiste Ausführungszeit durch tatsächliche Arbeit (anstatt durch Warten) in Anspruch genommen wird und die Arbeit in einem Computer von einer <abbr title="Central Processing Unit - Zentrale Recheneinheit">CPU</abbr> erledigt wird, werden diese Probleme als „CPU-lastig“ („CPU bound“) bezeichnet.
---
Typische Beispiele für CPU-lastige Vorgänge sind Dinge, die komplexe mathematische Berechnungen erfordern.
Zum Beispiel:
* **Audio-** oder **Bildbearbeitung**.
* **Computer Vision**: Ein Bild besteht aus Millionen von Pixeln, jedes Pixel hat 3 Werte / Farben, die Verarbeitung erfordert normalerweise, Berechnungen mit diesen Pixeln durchzuführen, alles zur gleichen Zeit.
* **Maschinelles Lernen**: Normalerweise sind viele „Matrix“- und „Vektor“-Multiplikationen erforderlich. Stellen Sie sich eine riesige Tabelle mit Zahlen vor, in der Sie alle Zahlen gleichzeitig multiplizieren.
* **Deep Learning**: Dies ist ein Teilgebiet des maschinellen Lernens, daher gilt das Gleiche. Es ist nur so, dass es nicht eine einzige Tabelle mit Zahlen zum Multiplizieren gibt, sondern eine riesige Menge davon, und in vielen Fällen verwendet man einen speziellen Prozessor, um diese Modelle zu erstellen und / oder zu verwenden.
### Nebenläufigkeit + Parallelität: Web + maschinelles Lernen { #concurrency-parallelism-web-machine-learning }
Mit **FastAPI** können Sie die Vorteile der Nebenläufigkeit nutzen, die in der Webentwicklung weit verbreitet ist (derselbe Hauptvorteil von NodeJS).
Sie können aber auch die Vorteile von Parallelität und Multiprocessing (mehrere Prozesse werden parallel ausgeführt) für **CPU-lastige** Workloads wie in Systemen für maschinelles Lernen nutzen.
Dies und die einfache Tatsache, dass Python die Hauptsprache für **Data Science**, maschinelles Lernen und insbesondere Deep Learning ist, machen FastAPI zu einem sehr passenden Werkzeug für Web-APIs und Anwendungen für Data Science / maschinelles Lernen (neben vielen anderen).
Wie Sie diese Parallelität in der Produktion erreichen, erfahren Sie im Abschnitt über [Deployment](deployment/index.md).
## `async` und `await` { #async-and-await }
Moderne Versionen von Python verfügen über eine sehr intuitive Möglichkeit, asynchronen Code zu schreiben. Dadurch sieht es wie normaler „sequentieller“ Code aus und übernimmt im richtigen Moment das „Warten“ für Sie.
Wenn es einen Vorgang gibt, der erfordert, dass gewartet wird, bevor die Ergebnisse zurückgegeben werden, und der diese neue Python-Funktionalität unterstützt, können Sie ihn wie folgt schreiben:
```Python
burgers = await get_burgers(2)
```
Der Schlüssel hier ist das `await`. Es teilt Python mit, dass es warten ⏸ muss, bis `get_burgers(2)` seine Aufgabe erledigt hat 🕙, bevor die Ergebnisse in `burgers` gespeichert werden. Damit weiß Python, dass es in der Zwischenzeit etwas anderes tun kann 🔀 ⏯ (z. B. einen weiteren Request empfangen).
Damit `await` funktioniert, muss es sich in einer Funktion befinden, die diese Asynchronität unterstützt. Dazu deklarieren Sie sie einfach mit `async def`:
```Python hl_lines="1"
async def get_burgers(number: int):
# Mache hier etwas Asynchrones, um die Burger zu erstellen
return burgers
```
... statt mit `def`:
```Python hl_lines="2"
# Dies ist nicht asynchron
def get_sequential_burgers(number: int):
# Mache hier etwas Sequentielles, um die Burger zu erstellen
return burgers
```
Mit `async def` weiß Python, dass es innerhalb dieser Funktion auf `await`-Ausdrücke achten muss und dass es die Ausführung dieser Funktion „anhalten“ ⏸ und etwas anderes tun kann 🔀, bevor es zurückkommt.
Wenn Sie eine `async def`-Funktion aufrufen möchten, müssen Sie sie „erwarten“ („await“). Das folgende wird also nicht funktionieren:
```Python
# Das funktioniert nicht, weil get_burgers definiert wurde mit: async def
burgers = get_burgers(2)
```
---
Wenn Sie also eine Bibliothek verwenden, die Ihnen sagt, dass Sie sie mit `await` aufrufen können, müssen Sie die *Pfadoperation-Funktionen*, die diese Bibliothek verwenden, mittels `async def` erstellen, wie in:
```Python hl_lines="2-3"
@app.get('/burgers')
async def read_burgers():
burgers = await get_burgers(2)
return burgers
```
### Weitere technische Details { #more-technical-details }
Ihnen ist wahrscheinlich aufgefallen, dass `await` nur innerhalb von Funktionen verwendet werden kann, die mit `async def` definiert sind.
Gleichzeitig müssen aber mit `async def` definierte Funktionen „erwartet“ („awaited“) werden. Daher können Funktionen mit `async def` nur innerhalb von Funktionen aufgerufen werden, die auch mit `async def` definiert sind.
Daraus resultiert das Ei-und-Huhn-Problem: Wie ruft man die erste `async` Funktion auf?
Wenn Sie mit **FastAPI** arbeiten, müssen Sie sich darüber keine Sorgen machen, da diese „erste“ Funktion Ihre *Pfadoperation-Funktion* sein wird und FastAPI weiß, was zu tun ist.
Wenn Sie jedoch `async` / `await` ohne FastAPI verwenden möchten, können Sie dies auch tun.
### Schreiben Sie Ihren eigenen asynchronen Code { #write-your-own-async-code }
Starlette (und **FastAPI**) basieren auf [AnyIO](https://anyio.readthedocs.io/en/stable/), was bedeutet, dass es sowohl kompatibel mit der Python-Standardbibliothek [asyncio](https://docs.python.org/3/library/asyncio-task.html) als auch mit [Trio](https://trio.readthedocs.io/en/stable/) ist.
Insbesondere können Sie [AnyIO](https://anyio.readthedocs.io/en/stable/) direkt verwenden für Ihre fortgeschrittenen nebenläufigen Anwendungsfälle, die fortgeschrittenere Muster in Ihrem eigenen Code erfordern.
Und auch wenn Sie FastAPI nicht verwenden würden, könnten Sie Ihre eigenen asynchronen Anwendungen mit [AnyIO](https://anyio.readthedocs.io/en/stable/) schreiben, um hochkompatibel zu sein und dessen Vorteile zu nutzen (z. B. *strukturierte Nebenläufigkeit*).
Ich habe eine weitere Bibliothek auf Basis von AnyIO erstellt, als dünne Schicht obendrauf, um die Typannotationen etwas zu verbessern und bessere **Autovervollständigung**, **Inline-Fehler** usw. zu erhalten. Sie hat auch eine freundliche Einführung und ein Tutorial, um Ihnen zu helfen, **Ihren eigenen asynchronen Code zu verstehen** und zu schreiben: [Asyncer](https://asyncer.tiangolo.com/). Sie ist insbesondere nützlich, wenn Sie **asynchronen Code mit regulärem** (blockierendem/synchronem) Code kombinieren müssen.
### Andere Formen von asynchronem Code { #other-forms-of-asynchronous-code }
Diese Art der Verwendung von `async` und `await` ist in der Sprache relativ neu.
Aber sie erleichtert die Arbeit mit asynchronem Code erheblich.
Die gleiche Syntax (oder fast identisch) wurde kürzlich auch in moderne Versionen von JavaScript (im Browser und in NodeJS) aufgenommen.
Davor war der Umgang mit asynchronem Code jedoch deutlich komplexer und schwieriger.
In früheren Versionen von Python hätten Sie Threads oder [Gevent](https://www.gevent.org/) verwenden können. Der Code ist jedoch viel komplexer zu verstehen, zu debuggen und nachzuvollziehen.
In früheren Versionen von NodeJS / Browser JavaScript hätten Sie „Callbacks“ verwendet. Was zur „Callback-Hölle“ führt.
## Coroutinen { #coroutines }
**Coroutine** ist nur ein schicker Begriff für dasjenige, was von einer `async def`-Funktion zurückgegeben wird. Python weiß, dass es so etwas wie eine Funktion ist, die es starten kann und die irgendwann endet, aber auch dass sie pausiert ⏸ werden kann, wann immer darin ein `await` steht.
Aber all diese Funktionalität der Verwendung von asynchronem Code mit `async` und `await` wird oft als Verwendung von „Coroutinen“ zusammengefasst. Es ist vergleichbar mit dem Hauptmerkmal von Go, den „Goroutinen“.
## Fazit { #conclusion }
Sehen wir uns den gleichen Satz von oben noch mal an:
> Moderne Versionen von Python unterstützen **„asynchronen Code“** unter Verwendung sogenannter **„Coroutinen“** mithilfe der Syntax **`async` und `await`**.
Das sollte jetzt mehr Sinn ergeben. ✨
All das ist es, was FastAPI (via Starlette) befeuert und es eine so beeindruckende Performanz haben lässt.
## Sehr technische Details { #very-technical-details }
/// warning | Achtung
Das folgende können Sie wahrscheinlich überspringen.
Dies sind sehr technische Details darüber, wie **FastAPI** unter der Haube funktioniert.
Wenn Sie über gute technische Kenntnisse verfügen (Coroutinen, Threads, Blocking, usw.) und neugierig sind, wie FastAPI mit `async def`s im Vergleich zu normalen `def`s umgeht, fahren Sie fort.
///
### Pfadoperation-Funktionen { #path-operation-functions }
Wenn Sie eine *Pfadoperation-Funktion* mit normalem `def` anstelle von `async def` deklarieren, wird sie in einem externen Threadpool ausgeführt, der dann `await`et wird, anstatt direkt aufgerufen zu werden (da dies den Server blockieren würde).
Wenn Sie von einem anderen asynchronen Framework kommen, das nicht auf die oben beschriebene Weise funktioniert, und Sie es gewohnt sind, triviale, nur-berechnende *Pfadoperation-Funktionen* mit einfachem `def` zu definieren, um einen geringfügigen Geschwindigkeitsgewinn (etwa 100 Nanosekunden) zu erzielen, beachten Sie bitte, dass der Effekt in **FastAPI** genau gegenteilig wäre. In solchen Fällen ist es besser, `async def` zu verwenden, es sei denn, Ihre *Pfadoperation-Funktionen* verwenden Code, der blockierende <abbr title="Input/Output - Eingabe/Ausgabe: Lesen oder Schreiben von/auf Festplatte, Netzwerkkommunikation.">I/O</abbr>-Operationen durchführt.
Dennoch besteht in beiden Fällen eine gute Chance, dass **FastAPI** [immer noch schneller](index.md#performance) als Ihr bisheriges Framework (oder zumindest damit vergleichbar) ist.
### Abhängigkeiten { #dependencies }
Das Gleiche gilt für [Abhängigkeiten](tutorial/dependencies/index.md). Wenn eine Abhängigkeit eine normale `def`-Funktion anstelle einer `async def` ist, wird sie im externen Threadpool ausgeführt.
### Unterabhängigkeiten { #sub-dependencies }
Sie können mehrere Abhängigkeiten und [Unterabhängigkeiten](tutorial/dependencies/sub-dependencies.md) haben, die einander bedingen (als Parameter der Funktionsdefinitionen), einige davon könnten erstellt werden mit `async def` und einige mit normalem `def`. Es würde immer noch funktionieren, und diejenigen, die mit normalem `def` erstellt wurden, würden in einem externen Thread (vom Threadpool stammend) aufgerufen werden, anstatt `await`et zu werden.
### Andere Hilfsfunktionen { #other-utility-functions }
Jede andere Hilfsfunktion, die Sie direkt aufrufen, kann mit normalem `def` oder `async def` erstellt werden, und FastAPI beeinflusst nicht die Art und Weise, wie Sie sie aufrufen.
Dies steht im Gegensatz zu den Funktionen, die FastAPI für Sie aufruft: *Pfadoperation-Funktionen* und Abhängigkeiten.
Wenn Ihre Hilfsfunktion eine normale Funktion mit `def` ist, wird sie direkt aufgerufen (so wie Sie es in Ihrem Code schreiben), nicht in einem Threadpool. Wenn die Funktion mit `async def` erstellt wurde, sollten Sie sie `await`en, wenn Sie sie in Ihrem Code aufrufen.
---
Nochmal, es handelt sich hier um sehr technische Details, die Ihnen helfen, falls Sie danach gesucht haben.
Andernfalls liegen Sie richtig, wenn Sie sich an die Richtlinien aus dem obigen Abschnitt halten: <a href="#in-a-hurry">In Eile?</a>.

View File

@ -0,0 +1,34 @@
# Benchmarks { #benchmarks }
Unabhängige TechEmpower-Benchmarks zeigen **FastAPI**-Anwendungen, die unter Uvicorn ausgeführt werden, als [eines der schnellsten verfügbaren Python-Frameworks](https://www.techempower.com/benchmarks/#section=test&runid=7464e520-0dc2-473d-bd34-dbdfd7e85911&hw=ph&test=query&l=zijzen-7), nur unterhalb von Starlette und Uvicorn selbst (die intern von FastAPI verwendet werden).
Aber bei der Betrachtung von Benchmarks und Vergleichen sollten Sie Folgendes beachten.
## Benchmarks und Geschwindigkeit { #benchmarks-and-speed }
Wenn Sie die Benchmarks ansehen, ist es üblich, dass mehrere Tools unterschiedlichen Typs als gleichwertig verglichen werden.
Insbesondere dass Uvicorn, Starlette und FastAPI zusammen verglichen werden (neben vielen anderen Tools).
Je einfacher das Problem, das durch das Tool gelöst wird, desto besser wird die Performanz sein. Und die meisten Benchmarks testen nicht die zusätzlichen Funktionen, die das Tool bietet.
Die Hierarchie ist wie folgt:
* **Uvicorn**: ein ASGI-Server
* **Starlette**: (verwendet Uvicorn) ein Web-Mikroframework
* **FastAPI**: (verwendet Starlette) ein API-Mikroframework mit mehreren zusätzlichen Funktionen zum Erstellen von APIs, mit Datenvalidierung, usw.
* **Uvicorn**:
* Wird die beste Performanz haben, da außer dem Server selbst nicht viel zusätzlicher Code vorhanden ist.
* Sie würden eine Anwendung nicht direkt in Uvicorn schreiben. Das würde bedeuten, dass Ihr Code zumindest mehr oder weniger den gesamten von Starlette (oder **FastAPI**) bereitgestellten Code enthalten müsste. Und wenn Sie das täten, hätte Ihre endgültige Anwendung den gleichen Overhead wie bei der Verwendung eines Frameworks und der Minimierung Ihres Anwendungscodes und der Fehler.
* Wenn Sie Uvicorn vergleichen, vergleichen Sie es mit Anwendungsservern wie Daphne, Hypercorn, uWSGI, usw.
* **Starlette**:
* Wird nach Uvicorn die nächstbeste Performanz erbringen. Tatsächlich verwendet Starlette Uvicorn, um zu laufen. Daher kann es wahrscheinlich nur „langsamer“ als Uvicorn werden, weil mehr Code ausgeführt werden muss.
* Aber es bietet Ihnen die Werkzeuge, um einfache Webanwendungen zu erstellen, mit Routing basierend auf Pfaden, usw.
* Wenn Sie Starlette vergleichen, vergleichen Sie es mit Webframeworks (oder Mikroframeworks) wie Sanic, Flask, Django, usw.
* **FastAPI**:
* So wie Starlette Uvicorn verwendet und nicht schneller als dieses sein kann, verwendet **FastAPI** Starlette, sodass es nicht schneller als dieses sein kann.
* FastAPI bietet zusätzliche Funktionen auf Basis von Starlette. Funktionen, die Sie beim Erstellen von APIs fast immer benötigen, wie Datenvalidierung und Serialisierung. Und wenn Sie es verwenden, erhalten Sie kostenlose automatische Dokumentation (die automatische Dokumentation verursacht nicht einmal zusätzlichen Overhead für laufende Anwendungen, sie wird beim Starten generiert).
* Wenn Sie FastAPI nicht verwenden und stattdessen Starlette direkt (oder ein anderes Tool wie Sanic, Flask, Responder, usw.) verwenden würden, müssten Sie die gesamte Datenvalidierung und Serialisierung selbst implementieren. Ihre finale Anwendung hätte also immer noch den gleichen Overhead, als ob sie mit FastAPI erstellt worden wäre. Und in vielen Fällen ist diese Datenvalidierung und Serialisierung der größte Teil des in Anwendungen geschriebenen Codes.
* Durch die Verwendung von FastAPI sparen Sie also Entwicklungszeit, Fehler und Codezeilen und würden wahrscheinlich die gleiche Performanz (oder eine bessere) erzielen, die Sie hätten, wenn Sie es nicht verwenden würden (da Sie alles in Ihrem Code implementieren müssten).
* Wenn Sie FastAPI vergleichen, vergleichen Sie es mit einem Webanwendungs-Framework (oder einer Reihe von Tools), das Datenvalidierung, Serialisierung und Dokumentation bereitstellt, wie Flask-apispec, NestJS, Molten, usw. Frameworks mit integrierter automatischer Datenvalidierung, Serialisierung und Dokumentation.

View File

@ -0,0 +1,24 @@
# FastAPI bei Cloudanbietern deployen { #deploy-fastapi-on-cloud-providers }
Sie können praktisch **jeden Cloudanbieter** verwenden, um Ihre FastAPI-Anwendung zu deployen.
In den meisten Fällen bieten die großen Cloudanbieter Anleitungen zum Deployment von FastAPI an.
## FastAPI Cloud { #fastapi-cloud }
**[FastAPI Cloud](https://fastapicloud.com)** wurde vom selben Autor und Team hinter **FastAPI** entwickelt.
Es vereinfacht den Prozess des **Erstellens**, **Deployens** und **Zugreifens** auf eine API mit minimalem Aufwand.
Es bringt die gleiche **Developer-Experience** beim Erstellen von Apps mit FastAPI auch zum **Deployment** in der Cloud. 🎉
FastAPI Cloud ist der Hauptsponsor und Finanzierungsgeber für die *FastAPI and friends* Open-Source-Projekte. ✨
## Cloudanbieter Sponsoren { #cloud-providers-sponsors }
Einige andere Cloudanbieter ✨ [**sponsern FastAPI**](../help-fastapi.md#sponsor-the-author) ✨ ebenfalls. 🙇
Sie könnten diese ebenfalls in Betracht ziehen, deren Anleitungen folgen und ihre Dienste ausprobieren:
* [Render](https://docs.render.com/deploy-fastapi?utm_source=deploydoc&utm_medium=referral&utm_campaign=fastapi)
* [Railway](https://docs.railway.com/guides/fastapi?utm_medium=integration&utm_source=docs&utm_campaign=fastapi)

View File

@ -0,0 +1,321 @@
# Deployment-Konzepte { #deployments-concepts }
Bei dem Deployment der Bereitstellung einer **FastAPI**-Anwendung, oder eigentlich jeder Art von Web-API, gibt es mehrere Konzepte, die Sie wahrscheinlich interessieren, und mithilfe der Sie die **am besten geeignete** Methode zum **Deployment Ihrer Anwendung** finden können.
Einige wichtige Konzepte sind:
* Sicherheit HTTPS
* Beim Hochfahren ausführen
* Neustarts
* Replikation (die Anzahl der laufenden Prozesse)
* Arbeitsspeicher
* Schritte vor dem Start
Wir werden sehen, wie diese sich auf das **Deployment** auswirken.
Letztendlich besteht das ultimative Ziel darin, **Ihre API-Clients** auf **sichere** Weise zu versorgen, um **Unterbrechungen** zu vermeiden und die **Rechenressourcen** (z. B. entfernte Server/virtuelle Maschinen) so effizient wie möglich zu nutzen. 🚀
Ich erzähle Ihnen hier etwas mehr über diese **Konzepte**, was Ihnen hoffentlich die **Intuition** gibt, die Sie benötigen, um zu entscheiden, wie Sie Ihre API in sehr unterschiedlichen Umgebungen deployen, möglicherweise sogar in **zukünftigen**, die jetzt noch nicht existieren.
Durch die Berücksichtigung dieser Konzepte können Sie die beste Variante des Deployments **Ihrer eigenen APIs** **evaluieren und konzipieren**.
In den nächsten Kapiteln werde ich Ihnen mehr **konkrete Rezepte** für das Deployment von FastAPI-Anwendungen geben.
Aber schauen wir uns zunächst einmal diese grundlegenden **konzeptionellen Ideen** an. Diese Konzepte gelten auch für jede andere Art von Web-API. 💡
## Sicherheit HTTPS { #security-https }
Im [vorherigen Kapitel über HTTPS](https.md) haben wir erfahren, wie HTTPS Verschlüsselung für Ihre API bereitstellt.
Wir haben auch gesehen, dass HTTPS normalerweise von einer Komponente **außerhalb** Ihres Anwendungsservers bereitgestellt wird, einem **TLS-Terminierungsproxy**.
Und es muss etwas geben, das für die **Erneuerung der HTTPS-Zertifikate** zuständig ist, es könnte sich um dieselbe Komponente handeln oder um etwas anderes.
### Beispieltools für HTTPS { #example-tools-for-https }
Einige der Tools, die Sie als TLS-Terminierungsproxy verwenden können, sind:
* Traefik
* Handhabt automatisch Zertifikat-Erneuerungen ✨
* Caddy
* Handhabt automatisch Zertifikat-Erneuerungen ✨
* Nginx
* Mit einer externen Komponente wie Certbot für Zertifikat-Erneuerungen
* HAProxy
* Mit einer externen Komponente wie Certbot für Zertifikat-Erneuerungen
* Kubernetes mit einem Ingress Controller wie Nginx
* Mit einer externen Komponente wie cert-manager für Zertifikat-Erneuerungen
* Es wird intern von einem Cloudanbieter als Teil seiner Dienste verwaltet (siehe unten 👇)
Eine andere Möglichkeit besteht darin, dass Sie einen **Cloud-Dienst** verwenden, der den größten Teil der Arbeit übernimmt, einschließlich der Einrichtung von HTTPS. Er könnte einige Einschränkungen haben oder Ihnen mehr in Rechnung stellen, usw. In diesem Fall müssten Sie jedoch nicht selbst einen TLS-Terminierungsproxy einrichten.
In den nächsten Kapiteln zeige ich Ihnen einige konkrete Beispiele.
---
Die nächsten zu berücksichtigenden Konzepte drehen sich dann um das Programm, das Ihre eigentliche API ausführt (z. B. Uvicorn).
## Programm und Prozess { #program-and-process }
Wir werden viel über den laufenden „**Prozess**“ sprechen, daher ist es nützlich, Klarheit darüber zu haben, was das bedeutet und was der Unterschied zum Wort „**Programm**“ ist.
### Was ist ein Programm { #what-is-a-program }
Das Wort **Programm** wird häufig zur Beschreibung vieler Dinge verwendet:
* Der **Code**, den Sie schreiben, die **Python-Dateien**.
* Die **Datei**, die vom Betriebssystem **ausgeführt** werden kann, zum Beispiel: `python`, `python.exe` oder `uvicorn`.
* Ein bestimmtes Programm, während es auf dem Betriebssystem **läuft**, die CPU nutzt und Dinge im Arbeitsspeicher ablegt. Dies wird auch als **Prozess** bezeichnet.
### Was ist ein Prozess { #what-is-a-process }
Das Wort **Prozess** wird normalerweise spezifischer verwendet und bezieht sich nur auf das, was im Betriebssystem ausgeführt wird (wie im letzten Punkt oben):
* Ein bestimmtes Programm, während es auf dem Betriebssystem **ausgeführt** wird.
* Dies bezieht sich weder auf die Datei noch auf den Code, sondern **speziell** auf das, was vom Betriebssystem **ausgeführt** und verwaltet wird.
* Jedes Programm, jeder Code **kann nur dann Dinge tun**, wenn er **ausgeführt** wird, wenn also ein **Prozess läuft**.
* Der Prozess kann von Ihnen oder vom Betriebssystem **terminiert** („beendet“, „gekillt“) werden. An diesem Punkt hört es auf zu laufen/ausgeführt zu werden und kann **keine Dinge mehr tun**.
* Hinter jeder Anwendung, die Sie auf Ihrem Computer ausführen, steckt ein Prozess, jedes laufende Programm, jedes Fenster usw. Und normalerweise laufen viele Prozesse **gleichzeitig**, während ein Computer eingeschaltet ist.
* Es können **mehrere Prozesse** desselben **Programms** gleichzeitig ausgeführt werden.
Wenn Sie sich den „Task-Manager“ oder „Systemmonitor“ (oder ähnliche Tools) in Ihrem Betriebssystem ansehen, können Sie viele dieser laufenden Prozesse sehen.
Und Sie werden beispielsweise wahrscheinlich feststellen, dass mehrere Prozesse dasselbe Browserprogramm ausführen (Firefox, Chrome, Edge, usw.). Normalerweise führen diese einen Prozess pro Browsertab sowie einige andere zusätzliche Prozesse aus.
<img class="shadow" src="/img/deployment/concepts/image01.png">
---
Nachdem wir nun den Unterschied zwischen den Begriffen **Prozess** und **Programm** kennen, sprechen wir weiter über das Deployment.
## Beim Hochfahren ausführen { #running-on-startup }
Wenn Sie eine Web-API erstellen, möchten Sie in den meisten Fällen, dass diese **immer läuft**, ununterbrochen, damit Ihre Clients immer darauf zugreifen können. Es sei denn natürlich, Sie haben einen bestimmten Grund, warum Sie möchten, dass diese nur in bestimmten Situationen ausgeführt wird. Meistens möchten Sie jedoch, dass sie ständig ausgeführt wird und **verfügbar** ist.
### Auf einem entfernten Server { #in-a-remote-server }
Wenn Sie einen entfernten Server (einen Cloud-Server, eine virtuelle Maschine, usw.) einrichten, können Sie am einfachsten `fastapi run` (welches Uvicorn verwendet) oder etwas Ähnliches manuell ausführen, genau wie bei der lokalen Entwicklung.
Und es wird funktionieren und **während der Entwicklung** nützlich sein.
Wenn Ihre Verbindung zum Server jedoch unterbrochen wird, wird der **laufende Prozess** wahrscheinlich abstürzen.
Und wenn der Server neu gestartet wird (z. B. nach Updates oder Migrationen vom Cloudanbieter), werden Sie das wahrscheinlich **nicht bemerken**. Und deshalb wissen Sie nicht einmal, dass Sie den Prozess manuell neu starten müssen. Ihre API bleibt also einfach tot. 😱
### Beim Hochfahren automatisch ausführen { #run-automatically-on-startup }
Im Allgemeinen möchten Sie wahrscheinlich, dass das Serverprogramm (z. B. Uvicorn) beim Hochfahren des Servers automatisch gestartet wird und kein **menschliches Eingreifen** erforderlich ist, sodass immer ein Prozess mit Ihrer API ausgeführt wird (z. B. Uvicorn, welches Ihre FastAPI-Anwendung ausführt).
### Separates Programm { #separate-program }
Um dies zu erreichen, haben Sie normalerweise ein **separates Programm**, welches sicherstellt, dass Ihre Anwendung beim Hochfahren ausgeführt wird. Und in vielen Fällen würde es auch sicherstellen, dass auch andere Komponenten oder Anwendungen ausgeführt werden, beispielsweise eine Datenbank.
### Beispieltools zur Ausführung beim Hochfahren { #example-tools-to-run-at-startup }
Einige Beispiele für Tools, die diese Aufgabe übernehmen können, sind:
* Docker
* Kubernetes
* Docker Compose
* Docker im Schwarm-Modus
* Systemd
* Supervisor
* Es wird intern von einem Cloudanbieter im Rahmen seiner Dienste verwaltet
* Andere ...
In den nächsten Kapiteln werde ich Ihnen konkretere Beispiele geben.
## Neustart { #restarts }
Ähnlich wie Sie sicherstellen möchten, dass Ihre Anwendung beim Hochfahren ausgeführt wird, möchten Sie wahrscheinlich auch sicherstellen, dass diese nach Fehlern **neu gestartet** wird.
### Wir machen Fehler { #we-make-mistakes }
Wir, als Menschen, machen ständig **Fehler**. Software hat fast *immer* **Bugs**, die an verschiedenen Stellen versteckt sind. 🐛
Und wir als Entwickler verbessern den Code ständig, wenn wir diese Bugs finden und neue Funktionen implementieren (und möglicherweise auch neue Bugs hinzufügen 😅).
### Kleine Fehler automatisch handhaben { #small-errors-automatically-handled }
Wenn beim Erstellen von Web-APIs mit FastAPI ein Fehler in unserem Code auftritt, wird FastAPI ihn normalerweise dem einzelnen <abbr title="Request Anfrage: Daten, die der Client zum Server sendet">Request</abbr> zurückgeben, der den Fehler ausgelöst hat. 🛡
Der Client erhält für diesen Request einen **500 Internal Server Error**, aber die Anwendung arbeitet bei den nächsten Requests weiter, anstatt einfach komplett abzustürzen.
### Größere Fehler Abstürze { #bigger-errors-crashes }
Dennoch kann es vorkommen, dass wir Code schreiben, der **die gesamte Anwendung zum Absturz bringt** und so zum Absturz von Uvicorn und Python führt. 💥
Und dennoch möchten Sie wahrscheinlich nicht, dass die Anwendung tot bleibt, weil an einer Stelle ein Fehler aufgetreten ist. Sie möchten wahrscheinlich, dass sie zumindest für die *Pfadoperationen*, die nicht fehlerhaft sind, **weiterläuft**.
### Neustart nach Absturz { #restart-after-crash }
Aber in den Fällen mit wirklich schwerwiegenden Fehlern, die den laufenden **Prozess** zum Absturz bringen, benötigen Sie eine externe Komponente, die den Prozess **neu startet**, zumindest ein paar Mal ...
/// tip | Tipp
... Obwohl es wahrscheinlich keinen Sinn macht, sie immer wieder neu zu starten, wenn die gesamte Anwendung einfach **sofort abstürzt**. Aber in diesen Fällen werden Sie es wahrscheinlich während der Entwicklung oder zumindest direkt nach dem Deployment bemerken.
Konzentrieren wir uns also auf die Hauptfälle, in denen die Anwendung in bestimmten Fällen **in der Zukunft** völlig abstürzen könnte und es dann dennoch sinnvoll ist, sie neu zu starten.
///
Sie möchten wahrscheinlich, dass eine **externe Komponente** für den Neustart Ihrer Anwendung verantwortlich ist, da zu diesem Zeitpunkt dieselbe Anwendung mit Uvicorn und Python bereits abgestürzt ist und es daher nichts im selben Code derselben Anwendung gibt, was etwas dagegen tun kann.
### Beispieltools zum automatischen Neustart { #example-tools-to-restart-automatically }
In den meisten Fällen wird dasselbe Tool, das zum **Ausführen des Programms beim Hochfahren** verwendet wird, auch für automatische **Neustarts** verwendet.
Dies könnte zum Beispiel erledigt werden durch:
* Docker
* Kubernetes
* Docker Compose
* Docker im Schwarm-Modus
* Systemd
* Supervisor
* Intern von einem Cloudanbieter im Rahmen seiner Dienste
* Andere ...
## Replikation Prozesse und Arbeitsspeicher { #replication-processes-and-memory }
Wenn Sie eine FastAPI-Anwendung verwenden und ein Serverprogramm wie den `fastapi`-Befehl, der Uvicorn ausführt, kann **ein einzelner Prozess** an mehrere Clients gleichzeitig ausliefern.
In vielen Fällen möchten Sie jedoch mehrere Workerprozesse gleichzeitig ausführen.
### Mehrere Prozesse Worker { #multiple-processes-workers }
Wenn Sie mehr Clients haben, als ein einzelner Prozess verarbeiten kann (z. B. wenn die virtuelle Maschine nicht sehr groß ist) und die CPU des Servers **mehrere Kerne** hat, dann könnten **mehrere Prozesse** gleichzeitig mit derselben Anwendung laufen und alle Requests unter sich verteilen.
Wenn Sie mit **mehreren Prozessen** dasselbe API-Programm ausführen, werden diese üblicherweise als <abbr title="Arbeiter">**Worker**</abbr> bezeichnet.
### Workerprozesse und Ports { #worker-processes-and-ports }
Erinnern Sie sich aus der Dokumentation [Über HTTPS](https.md), dass nur ein Prozess auf einer Kombination aus Port und IP-Adresse auf einem Server lauschen kann?
Das ist immer noch wahr.
Um also **mehrere Prozesse** gleichzeitig zu haben, muss es einen **einzelnen Prozess geben, der einen Port überwacht**, welcher dann die Kommunikation auf irgendeine Weise an jeden Workerprozess überträgt.
### Arbeitsspeicher pro Prozess { #memory-per-process }
Wenn das Programm nun Dinge in den Arbeitsspeicher lädt, zum Beispiel ein Modell für maschinelles Lernen in einer Variablen oder den Inhalt einer großen Datei in einer Variablen, verbraucht das alles **einen Teil des Arbeitsspeichers (RAM Random Access Memory)** des Servers.
Und mehrere Prozesse teilen sich normalerweise keinen Speicher. Das bedeutet, dass jeder laufende Prozess seine eigenen Dinge, eigenen Variablen und eigenen Speicher hat. Und wenn Sie in Ihrem Code viel Speicher verbrauchen, verbraucht **jeder Prozess** die gleiche Menge Speicher.
### Serverspeicher { #server-memory }
Wenn Ihr Code beispielsweise ein Machine-Learning-Modell mit **1 GB Größe** lädt und Sie einen Prozess mit Ihrer API ausführen, verbraucht dieser mindestens 1 GB RAM. Und wenn Sie **4 Prozesse** (4 Worker) starten, verbraucht jeder 1 GB RAM. Insgesamt verbraucht Ihre API also **4 GB RAM**.
Und wenn Ihr entfernter Server oder Ihre virtuelle Maschine nur über 3 GB RAM verfügt, führt der Versuch, mehr als 4 GB RAM zu laden, zu Problemen. 🚨
### Mehrere Prozesse Ein Beispiel { #multiple-processes-an-example }
Im folgenden Beispiel gibt es einen **Manager-Prozess**, welcher zwei **Workerprozesse** startet und steuert.
Dieser Manager-Prozess wäre wahrscheinlich derjenige, welcher der IP am **Port** lauscht. Und er würde die gesamte Kommunikation an die Workerprozesse weiterleiten.
Diese Workerprozesse würden Ihre Anwendung ausführen, sie würden die Hauptberechnungen durchführen, um einen **<abbr title="Request Anfrage: Daten, die der Client zum Server sendet">Request</abbr>** entgegenzunehmen und eine **<abbr title="Response Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Response</abbr>** zurückzugeben, und sie würden alles, was Sie in Variablen einfügen, in den RAM laden.
<img src="/img/deployment/concepts/process-ram.drawio.svg">
Und natürlich würden auf derselben Maschine neben Ihrer Anwendung wahrscheinlich **andere Prozesse** laufen.
Ein interessantes Detail ist dabei, dass der Prozentsatz der von jedem Prozess verwendeten **CPU** im Laufe der Zeit stark **variieren** kann, der **Arbeitsspeicher (RAM)** jedoch normalerweise mehr oder weniger **stabil** bleibt.
Wenn Sie eine API haben, die jedes Mal eine vergleichbare Menge an Berechnungen durchführt, und Sie viele Clients haben, dann wird die **CPU-Auslastung** wahrscheinlich *ebenfalls stabil sein* (anstatt ständig schnell zu steigen und zu fallen).
### Beispiele für Replikation-Tools und -Strategien { #examples-of-replication-tools-and-strategies }
Es gibt mehrere Ansätze, um dies zu erreichen, und ich werde Ihnen in den nächsten Kapiteln mehr über bestimmte Strategien erzählen, beispielsweise wenn es um Docker und Container geht.
Die wichtigste zu berücksichtigende Einschränkung besteht darin, dass es eine **einzelne** Komponente geben muss, welche die **öffentliche IP** auf dem **Port** verwaltet. Und dann muss diese irgendwie die Kommunikation **weiterleiten**, an die replizierten **Prozesse/Worker**.
Hier sind einige mögliche Kombinationen und Strategien:
* **Uvicorn** mit `--workers`
* Ein Uvicorn-**Prozessmanager** würde der **IP** am **Port** lauschen, und er würde **mehrere Uvicorn-Workerprozesse** starten.
* **Kubernetes** und andere verteilte **Containersysteme**
* Etwas in der **Kubernetes**-Ebene würde die **IP** und den **Port** abhören. Die Replikation hätte **mehrere Container**, in jedem wird jeweils **ein Uvicorn-Prozess** ausgeführt.
* **Cloud-Dienste**, welche das für Sie erledigen
* Der Cloud-Dienst wird wahrscheinlich **die Replikation für Sie übernehmen**. Er würde Sie möglicherweise **einen auszuführenden Prozess** oder ein **zu verwendendes Container-Image** definieren lassen, in jedem Fall wäre es höchstwahrscheinlich **ein einzelner Uvicorn-Prozess**, und der Cloud-Dienst wäre auch verantwortlich für die Replikation.
/// tip | Tipp
Machen Sie sich keine Sorgen, wenn einige dieser Punkte zu **Containern**, Docker oder Kubernetes noch nicht viel Sinn ergeben.
Ich werde Ihnen in einem zukünftigen Kapitel mehr über Container-Images, Docker, Kubernetes, usw. erzählen: [FastAPI in Containern Docker](docker.md).
///
## Schritte vor dem Start { #previous-steps-before-starting }
Es gibt viele Fälle, in denen Sie, **bevor Sie Ihre Anwendung starten**, einige Schritte ausführen möchten.
Beispielsweise möchten Sie möglicherweise **Datenbankmigrationen** ausführen.
In den meisten Fällen möchten Sie diese Schritte jedoch nur **einmal** ausführen.
Sie möchten also einen **einzelnen Prozess** haben, um diese **Vorab-Schritte** auszuführen, bevor Sie die Anwendung starten.
Und Sie müssen sicherstellen, dass es sich um einen einzelnen Prozess handelt, der die Vorab-Schritte ausführt, *auch* wenn Sie anschließend **mehrere Prozesse** (mehrere Worker) für die Anwendung selbst starten. Wenn diese Schritte von **mehreren Prozessen** ausgeführt würden, würden diese die Arbeit **verdoppeln**, indem sie sie **parallel** ausführen, und wenn es sich bei den Schritten um etwas Delikates wie eine Datenbankmigration handelt, könnte das miteinander Konflikte verursachen.
Natürlich gibt es Fälle, in denen es kein Problem darstellt, die Vorab-Schritte mehrmals auszuführen. In diesem Fall ist die Handhabung viel einfacher.
/// tip | Tipp
Bedenken Sie außerdem, dass Sie, abhängig von Ihrer Einrichtung, in manchen Fällen **gar keine Vorab-Schritte** benötigen, bevor Sie die Anwendung starten.
In diesem Fall müssen Sie sich darüber keine Sorgen machen. 🤷
///
### Beispiele für Strategien für Vorab-Schritte { #examples-of-previous-steps-strategies }
Es hängt **stark** davon ab, wie Sie **Ihr System deployen**, und hängt wahrscheinlich mit der Art und Weise zusammen, wie Sie Programme starten, Neustarts durchführen, usw.
Hier sind einige mögliche Ideen:
* Ein „Init-Container“ in Kubernetes, der vor Ihrem Anwendungs-Container ausgeführt wird
* Ein Bash-Skript, das die Vorab-Schritte ausführt und dann Ihre Anwendung startet
* Sie benötigen immer noch eine Möglichkeit, *dieses* Bash-Skript zu starten/neu zu starten, Fehler zu erkennen, usw.
/// tip | Tipp
Konkretere Beispiele hierfür mit Containern gebe ich Ihnen in einem späteren Kapitel: [FastAPI in Containern Docker](docker.md).
///
## Ressourcennutzung { #resource-utilization }
Ihr(e) Server ist (sind) eine **Ressource**, welche Sie mit Ihren Programmen, der Rechenzeit auf den CPUs und dem verfügbaren RAM-Speicher verbrauchen oder **nutzen** können.
Wie viele Systemressourcen möchten Sie verbrauchen/nutzen? Sie mögen „nicht viel“ denken, aber in Wirklichkeit möchten Sie tatsächlich **so viel wie möglich ohne Absturz** verwenden.
Wenn Sie für drei Server bezahlen, aber nur wenig von deren RAM und CPU nutzen, **verschwenden Sie wahrscheinlich Geld** 💸 und wahrscheinlich **Strom für den Server** 🌎, usw.
In diesem Fall könnte es besser sein, nur zwei Server zu haben und einen höheren Prozentsatz von deren Ressourcen zu nutzen (CPU, Arbeitsspeicher, Festplatte, Netzwerkbandbreite, usw.).
Wenn Sie andererseits über zwei Server verfügen und **100 % ihrer CPU und ihres RAM** nutzen, wird irgendwann ein Prozess nach mehr Speicher fragen und der Server muss die Festplatte als „Speicher“ verwenden (was tausendmal langsamer sein kann) oder er könnte sogar **abstürzen**. Oder ein Prozess muss möglicherweise einige Berechnungen durchführen und müsste warten, bis die CPU wieder frei ist.
In diesem Fall wäre es besser, **einen zusätzlichen Server** zu besorgen und einige Prozesse darauf auszuführen, damit alle über **genug RAM und CPU-Zeit** verfügen.
Es besteht auch die Möglichkeit, dass es aus irgendeinem Grund zu **Spitzen** in der Nutzung Ihrer API kommt. Vielleicht ist diese viral gegangen, oder vielleicht haben andere Dienste oder Bots damit begonnen, sie zu nutzen. Und vielleicht möchten Sie in solchen Fällen über zusätzliche Ressourcen verfügen, um auf der sicheren Seite zu sein.
Sie können eine **beliebige Zahl** festlegen, um beispielsweise eine Ressourcenauslastung zwischen **50 % und 90 %** anzustreben. Der Punkt ist, dass dies wahrscheinlich die wichtigen Dinge sind, die Sie messen und verwenden sollten, um Ihre Deployments zu optimieren.
Sie können einfache Tools wie `htop` verwenden, um die in Ihrem Server verwendete CPU und den RAM oder die von jedem Prozess verwendete Menge anzuzeigen. Oder Sie können komplexere Überwachungstools verwenden, die möglicherweise auf mehrere Server usw. verteilt sind.
## Zusammenfassung { #recap }
Sie haben hier einige der wichtigsten Konzepte gelesen, die Sie wahrscheinlich berücksichtigen müssen, wenn Sie entscheiden, wie Sie Ihre Anwendung deployen:
* Sicherheit HTTPS
* Beim Hochfahren ausführen
* Neustarts
* Replikation (die Anzahl der laufenden Prozesse)
* Arbeitsspeicher
* Schritte vor dem Start
Das Verständnis dieser Ideen und deren Anwendung sollte Ihnen die nötige Intuition vermitteln, um bei der Konfiguration und Optimierung Ihrer Deployments Entscheidungen zu treffen. 🤓
In den nächsten Abschnitten gebe ich Ihnen konkretere Beispiele für mögliche Strategien, die Sie verfolgen können. 🚀

View File

@ -0,0 +1,618 @@
# FastAPI in Containern Docker { #fastapi-in-containers-docker }
Beim Deployment von FastAPI-Anwendungen besteht ein gängiger Ansatz darin, ein **Linux-Containerimage** zu erstellen. Normalerweise erfolgt dies mit [**Docker**](https://www.docker.com/). Sie können dieses Containerimage dann auf eine von mehreren möglichen Arten deployen.
Die Verwendung von Linux-Containern bietet mehrere Vorteile, darunter **Sicherheit**, **Replizierbarkeit**, **Einfachheit** und andere.
/// tip | Tipp
Sie haben es eilig und kennen sich bereits aus? Springen Sie zum [`Dockerfile` unten 👇](#build-a-docker-image-for-fastapi).
///
<details>
<summary>Dockerfile-Vorschau 👀</summary>
```Dockerfile
FROM python:3.14
WORKDIR /code
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY ./app /code/app
CMD ["fastapi", "run", "app/main.py", "--port", "80"]
# Wenn Sie hinter einem Proxy wie Nginx oder Traefik sind, fügen Sie --proxy-headers hinzu
# CMD ["fastapi", "run", "app/main.py", "--port", "80", "--proxy-headers"]
```
</details>
## Was ist ein Container { #what-is-a-container }
Container (hauptsächlich Linux-Container) sind eine sehr **leichtgewichtige** Möglichkeit, Anwendungen einschließlich aller ihrer Abhängigkeiten und erforderlichen Dateien zu verpacken und sie gleichzeitig von anderen Containern (anderen Anwendungen oder Komponenten) im selben System isoliert zu halten.
Linux-Container werden mit demselben Linux-Kernel des Hosts (Maschine, virtuellen Maschine, Cloud-Servers, usw.) ausgeführt. Das bedeutet einfach, dass sie sehr leichtgewichtig sind (im Vergleich zu vollständigen virtuellen Maschinen, die ein gesamtes Betriebssystem emulieren).
Auf diese Weise verbrauchen Container **wenig Ressourcen**, eine Menge vergleichbar mit der direkten Ausführung der Prozesse (eine virtuelle Maschine würde viel mehr verbrauchen).
Container verfügen außerdem über ihre eigenen **isoliert** laufenden Prozesse (üblicherweise nur einen Prozess), über ihr eigenes Dateisystem und ihr eigenes Netzwerk, was Deployment, Sicherheit, Entwicklung usw. vereinfacht.
## Was ist ein Containerimage { #what-is-a-container-image }
Ein **Container** wird von einem **Containerimage** ausgeführt.
Ein Containerimage ist eine **statische** Version aller Dateien, Umgebungsvariablen und des Standardbefehls/-programms, welche in einem Container vorhanden sein sollten. **Statisch** bedeutet hier, dass das Container-**Image** nicht läuft, nicht ausgeführt wird, sondern nur die gepackten Dateien und Metadaten enthält.
Im Gegensatz zu einem „**Containerimage**“, bei dem es sich um den gespeicherten statischen Inhalt handelt, bezieht sich ein „**Container**“ normalerweise auf die laufende Instanz, das Ding, das **ausgeführt** wird.
Wenn der **Container** gestartet und ausgeführt wird (gestartet von einem **Containerimage**), kann er Dateien, Umgebungsvariablen usw. erstellen oder ändern. Diese Änderungen sind nur in diesem Container vorhanden, nicht im zugrunde liegenden Containerimage (werden nicht auf der Festplatte gespeichert).
Ein Containerimage ist vergleichbar mit der **Programmdatei** und ihrem Inhalt, z. B. `python` und eine Datei `main.py`.
Und der **Container** selbst (im Gegensatz zum **Containerimage**) ist die tatsächlich laufende Instanz des Images, vergleichbar mit einem **Prozess**. Tatsächlich läuft ein Container nur, wenn er einen **laufenden Prozess** hat (und normalerweise ist es nur ein einzelner Prozess). Der Container stoppt, wenn kein Prozess darin ausgeführt wird.
## Containerimages { #container-images }
Docker ist eines der wichtigsten Tools zum Erstellen und Verwalten von **Containerimages** und **Containern**.
Und es gibt einen öffentlichen [Docker <abbr title="Umschlagplatz">Hub</abbr>](https://hub.docker.com/) mit vorgefertigten **offiziellen Containerimages** für viele Tools, Umgebungen, Datenbanken und Anwendungen.
Beispielsweise gibt es ein offizielles [Python-Image](https://hub.docker.com/_/python).
Und es gibt viele andere Images für verschiedene Dinge wie Datenbanken, zum Beispiel für:
* [PostgreSQL](https://hub.docker.com/_/postgres)
* [MySQL](https://hub.docker.com/_/mysql)
* [MongoDB](https://hub.docker.com/_/mongo)
* [Redis](https://hub.docker.com/_/redis), usw.
Durch die Verwendung eines vorgefertigten Containerimages ist es sehr einfach, verschiedene Tools zu **kombinieren** und zu verwenden. Zum Beispiel, um eine neue Datenbank auszuprobieren. In den meisten Fällen können Sie die **offiziellen Images** verwenden und diese einfach mit Umgebungsvariablen konfigurieren.
Auf diese Weise können Sie in vielen Fällen etwas über Container und Docker lernen und dieses Wissen mit vielen verschiedenen Tools und Komponenten wiederverwenden.
Sie würden also **mehrere Container** mit unterschiedlichen Dingen ausführen, wie einer Datenbank, einer Python-Anwendung, einem Webserver mit einer React-Frontend-Anwendung, und diese über ihr internes Netzwerk miteinander verbinden.
In alle Containerverwaltungssysteme (wie Docker oder Kubernetes) sind diese Netzwerkfunktionen integriert.
## Container und Prozesse { #containers-and-processes }
Ein **Containerimage** enthält normalerweise in seinen Metadaten das Standardprogramm oder den Standardbefehl, der ausgeführt werden soll, wenn der **Container** gestartet wird, sowie die Parameter, die an dieses Programm übergeben werden sollen. Sehr ähnlich zu dem, was wäre, wenn es über die Befehlszeile gestartet werden würde.
Wenn ein **Container** gestartet wird, führt er diesen Befehl/dieses Programm aus (Sie können ihn jedoch überschreiben und einen anderen Befehl/ein anderes Programm ausführen lassen).
Ein Container läuft, solange der **Hauptprozess** (Befehl oder Programm) läuft.
Ein Container hat normalerweise einen **einzelnen Prozess**, aber es ist auch möglich, Unterprozesse vom Hauptprozess aus zu starten, und auf diese Weise haben Sie **mehrere Prozesse** im selben Container.
Es ist jedoch nicht möglich, einen laufenden Container, ohne **mindestens einen laufenden Prozess** zu haben. Wenn der Hauptprozess stoppt, stoppt der Container.
## Ein Docker-Image für FastAPI erstellen { #build-a-docker-image-for-fastapi }
Okay, wollen wir jetzt etwas bauen! 🚀
Ich zeige Ihnen, wie Sie ein **Docker-Image** für FastAPI **von Grund auf** erstellen, basierend auf dem **offiziellen Python**-Image.
Das ist, was Sie in **den meisten Fällen** tun möchten, zum Beispiel:
* Bei Verwendung von **Kubernetes** oder ähnlichen Tools
* Beim Betrieb auf einem **Raspberry Pi**
* Bei Verwendung eines Cloud-Dienstes, der ein Containerimage für Sie ausführt, usw.
### Paketanforderungen { #package-requirements }
Normalerweise befinden sich die **Paketanforderungen** für Ihre Anwendung in einer Datei.
Dies hängt hauptsächlich von dem Tool ab, mit dem Sie diese Anforderungen **installieren**.
Die gebräuchlichste Methode besteht darin, eine Datei `requirements.txt` mit den Namen der Packages und deren Versionen zu erstellen, eine pro Zeile.
Sie würden natürlich die gleichen Ideen verwenden, die Sie in [Über FastAPI-Versionen](versions.md) gelesen haben, um die Versionsbereiche festzulegen.
Ihre `requirements.txt` könnte beispielsweise so aussehen:
```
fastapi[standard]>=0.113.0,<0.114.0
pydantic>=2.7.0,<3.0.0
```
Und normalerweise würden Sie diese Paketabhängigkeiten mit `pip` installieren, zum Beispiel:
<div class="termy">
```console
$ pip install -r requirements.txt
---> 100%
Successfully installed fastapi pydantic
```
</div>
/// info | Info
Es gibt andere Formate und Tools zum Definieren und Installieren von Paketabhängigkeiten.
///
### Den **FastAPI**-Code erstellen { #create-the-fastapi-code }
* Erstellen Sie ein `app`-Verzeichnis und betreten Sie es.
* Erstellen Sie eine leere Datei `__init__.py`.
* Erstellen Sie eine `main.py`-Datei mit:
```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}
```
### Dockerfile { #dockerfile }
Erstellen Sie nun im selben Projektverzeichnis eine Datei `Dockerfile` mit:
```{ .dockerfile .annotate }
# (1)!
FROM python:3.14
# (2)!
WORKDIR /code
# (3)!
COPY ./requirements.txt /code/requirements.txt
# (4)!
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# (5)!
COPY ./app /code/app
# (6)!
CMD ["fastapi", "run", "app/main.py", "--port", "80"]
```
1. Beginne mit dem offiziellen Python-Basisimage.
2. Setze das aktuelle Arbeitsverzeichnis auf `/code`.
Hier platzieren wir die Datei `requirements.txt` und das Verzeichnis `app`.
3. Kopiere die Datei mit den Paketanforderungen in das Verzeichnis `/code`.
Kopieren Sie zuerst **nur** die Datei mit den Anforderungen, nicht den Rest des Codes.
Da sich diese Datei **nicht oft ändert**, erkennt Docker das und verwendet den **Cache** für diesen Schritt, wodurch der Cache auch für den nächsten Schritt aktiviert wird.
4. Installiere die Paketabhängigkeiten aus der Anforderungsdatei.
Die Option `--no-cache-dir` weist `pip` an, die heruntergeladenen Pakete nicht lokal zu speichern, da dies nur benötigt wird, sollte `pip` erneut ausgeführt werden, um dieselben Pakete zu installieren, aber das ist beim Arbeiten mit Containern nicht der Fall.
/// note | Hinweis
Das `--no-cache-dir` bezieht sich nur auf `pip`, es hat nichts mit Docker oder Containern zu tun.
///
Die Option `--upgrade` weist `pip` an, die Packages zu aktualisieren, wenn sie bereits installiert sind.
Da der vorherige Schritt des Kopierens der Datei vom **Docker-Cache** erkannt werden konnte, wird dieser Schritt auch **den Docker-Cache verwenden**, sofern verfügbar.
Durch die Verwendung des Caches in diesem Schritt **sparen** Sie viel **Zeit**, wenn Sie das Image während der Entwicklung immer wieder erstellen, anstatt **jedes Mal** alle Abhängigkeiten **herunterzuladen und zu installieren**.
5. Kopiere das Verzeichnis `./app` in das Verzeichnis `/code`.
Da hier der gesamte Code enthalten ist, der sich **am häufigsten ändert**, wird der Docker-**Cache** nicht ohne weiteres für diesen oder andere **folgende Schritte** verwendet.
Daher ist es wichtig, dies **nahe dem Ende** des `Dockerfile`s zu platzieren, um die Erstellungszeiten des Containerimages zu optimieren.
6. Lege den **Befehl** fest, um `fastapi run` zu nutzen, welches Uvicorn darunter verwendet.
`CMD` nimmt eine Liste von Zeichenfolgen entgegen. Jede dieser Zeichenfolgen entspricht dem, was Sie durch Leerzeichen getrennt in die Befehlszeile eingeben würden.
Dieser Befehl wird aus dem **aktuellen Arbeitsverzeichnis** ausgeführt, dem gleichen `/code`-Verzeichnis, das Sie oben mit `WORKDIR /code` festgelegt haben.
/// tip | Tipp
Lernen Sie, was jede Zeile bewirkt, indem Sie auf die Zahlenblasen im Code klicken. 👆
///
/// warning | Achtung
Stellen Sie sicher, dass Sie **immer** die **exec form** der Anweisung `CMD` verwenden, wie unten erläutert.
///
#### `CMD` Exec Form verwenden { #use-cmd-exec-form }
Die [`CMD`](https://docs.docker.com/reference/dockerfile/#cmd) Docker-Anweisung kann in zwei Formen geschrieben werden:
**Exec** form:
```Dockerfile
# ✅ Tun Sie das
CMD ["fastapi", "run", "app/main.py", "--port", "80"]
```
⛔️ **Shell** form:
```Dockerfile
# ⛔️ Tun Sie das nicht
CMD fastapi run app/main.py --port 80
```
Achten Sie darauf, stets die **exec** form zu verwenden, um sicherzustellen, dass FastAPI ordnungsgemäß heruntergefahren wird und [Lifespan-Events](../advanced/events.md) ausgelöst werden.
Sie können mehr darüber in der [Docker-Dokumentation für Shell und Exec Form lesen](https://docs.docker.com/reference/dockerfile/#shell-and-exec-form).
Dies kann insbesondere bei der Verwendung von `docker compose` deutlich spürbar sein. Sehen Sie sich diesen Abschnitt in der Docker Compose-FAQ für technische Details an: [Warum benötigen meine Dienste 10 Sekunden, um neu erstellt oder gestoppt zu werden?](https://docs.docker.com/compose/faq/#why-do-my-services-take-10-seconds-to-recreate-or-stop).
#### Verzeichnisstruktur { #directory-structure }
Sie sollten jetzt eine Verzeichnisstruktur wie diese haben:
```
.
├── app
│   ├── __init__.py
│ └── main.py
├── Dockerfile
└── requirements.txt
```
#### Hinter einem TLS-Terminierungsproxy { #behind-a-tls-termination-proxy }
Wenn Sie Ihren Container hinter einem TLS-Terminierungsproxy (Load Balancer) wie Nginx oder Traefik ausführen, fügen Sie die Option `--proxy-headers` hinzu. Das sagt Uvicorn (durch das FastAPI CLI), den von diesem Proxy gesendeten Headern zu vertrauen und dass die Anwendung hinter HTTPS ausgeführt wird, usw.
```Dockerfile
CMD ["fastapi", "run", "app/main.py", "--proxy-headers", "--port", "80"]
```
#### Docker-Cache { #docker-cache }
In diesem `Dockerfile` gibt es einen wichtigen Trick: Wir kopieren zuerst die **Datei nur mit den Abhängigkeiten**, nicht den Rest des Codes. Lassen Sie mich Ihnen erklären, warum.
```Dockerfile
COPY ./requirements.txt /code/requirements.txt
```
Docker und andere Tools **erstellen** diese Containerimages **inkrementell**, fügen **eine Ebene über der anderen** hinzu, beginnend am Anfang des `Dockerfile`s und fügen alle durch die einzelnen Anweisungen des `Dockerfile`s erstellten Dateien hinzu.
Docker und ähnliche Tools verwenden beim Erstellen des Images auch einen **internen Cache**. Wenn sich eine Datei seit der letzten Erstellung des Containerimages nicht geändert hat, wird **dieselbe Ebene wiederverwendet**, die beim letzten Mal erstellt wurde, anstatt die Datei erneut zu kopieren und eine neue Ebene von Grund auf zu erstellen.
Das bloße Vermeiden des Kopierens von Dateien führt nicht unbedingt zu einer großen Verbesserung, aber da der Cache für diesen Schritt verwendet wurde, kann **der Cache für den nächsten Schritt verwendet werden**. Beispielsweise könnte der Cache verwendet werden für die Anweisung, welche die Abhängigkeiten installiert mit:
```Dockerfile
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
```
Die Datei mit den Paketanforderungen wird sich **nicht häufig ändern**. Wenn Docker also nur diese Datei kopiert, kann es für diesen Schritt **den Cache verwenden**.
Und dann kann Docker **den Cache für den nächsten Schritt verwenden**, der diese Abhängigkeiten herunterlädt und installiert. Und hier **sparen wir viel Zeit**. ✨ ... und vermeiden die Langeweile beim Warten. 😪😆
Das Herunterladen und Installieren der Paketabhängigkeiten **könnte Minuten dauern**, aber die Verwendung des **Cache** würde höchstens **Sekunden** dauern.
Und da Sie das Containerimage während der Entwicklung immer wieder erstellen würden, um zu überprüfen, ob Ihre Codeänderungen funktionieren, würde dies viel Zeit sparen.
Dann, gegen Ende des `Dockerfile`s, kopieren wir den gesamten Code. Da sich der **am häufigsten ändert**, platzieren wir das am Ende, da fast immer alles nach diesem Schritt nicht mehr in der Lage sein wird, den Cache zu verwenden.
```Dockerfile
COPY ./app /code/app
```
### Das Docker-Image erstellen { #build-the-docker-image }
Nachdem nun alle Dateien vorhanden sind, erstellen wir das Containerimage.
* Gehen Sie zum Projektverzeichnis (dort, wo sich Ihr `Dockerfile` und Ihr `app`-Verzeichnis befindet).
* Erstellen Sie Ihr FastAPI-Image:
<div class="termy">
```console
$ docker build -t myimage .
---> 100%
```
</div>
/// tip | Tipp
Beachten Sie das `.` am Ende, es entspricht `./` und teilt Docker mit, welches Verzeichnis zum Erstellen des Containerimages verwendet werden soll.
In diesem Fall handelt es sich um dasselbe aktuelle Verzeichnis (`.`).
///
### Den Docker-Container starten { #start-the-docker-container }
* Führen Sie einen Container basierend auf Ihrem Image aus:
<div class="termy">
```console
$ docker run -d --name mycontainer -p 80:80 myimage
```
</div>
## Es testen { #check-it }
Sie sollten es in der URL Ihres Docker-Containers überprüfen können, zum Beispiel: [http://192.168.99.100/items/5?q=somequery](http://192.168.99.100/items/5?q=somequery) oder [http://127.0.0.1/items/5?q=somequery](http://127.0.0.1/items/5?q=somequery) (oder gleichwertig, unter Verwendung Ihres Docker-Hosts).
Sie werden etwas sehen wie:
```JSON
{"item_id": 5, "q": "somequery"}
```
## Interaktive API-Dokumentation { #interactive-api-docs }
Jetzt können Sie auf [http://192.168.99.100/docs](http://192.168.99.100/docs) oder [http://127.0.0.1/docs](http://127.0.0.1/docs) gehen (oder ähnlich, unter Verwendung Ihres Docker-Hosts).
Sie sehen die automatische interaktive API-Dokumentation (bereitgestellt von [Swagger UI](https://github.com/swagger-api/swagger-ui)):
![Swagger-Oberfläche](https://fastapi.tiangolo.com/img/index/index-01-swagger-ui-simple.png)
## Alternative API-Dokumentation { #alternative-api-docs }
Sie können auch auf [http://192.168.99.100/redoc](http://192.168.99.100/redoc) oder [http://127.0.0.1/redoc](http://127.0.0.1/redoc) gehen (oder ähnlich, unter Verwendung Ihres Docker-Hosts).
Sie sehen die alternative automatische Dokumentation (bereitgestellt von [ReDoc](https://github.com/Rebilly/ReDoc)):
![ReDoc](https://fastapi.tiangolo.com/img/index/index-02-redoc-simple.png)
## Ein Docker-Image mit einem Single-File-FastAPI erstellen { #build-a-docker-image-with-a-single-file-fastapi }
Wenn Ihr FastAPI eine einzelne Datei ist, zum Beispiel `main.py` ohne ein `./app`-Verzeichnis, könnte Ihre Dateistruktur wie folgt aussehen:
```
.
├── Dockerfile
├── main.py
└── requirements.txt
```
Dann müssten Sie nur noch die entsprechenden Pfade ändern, um die Datei im `Dockerfile` zu kopieren:
```{ .dockerfile .annotate hl_lines="10 13" }
FROM python:3.14
WORKDIR /code
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# (1)!
COPY ./main.py /code/
# (2)!
CMD ["fastapi", "run", "main.py", "--port", "80"]
```
1. Kopiere die Datei `main.py` direkt in das Verzeichnis `/code` (ohne ein Verzeichnis `./app`).
2. Verwenden Sie `fastapi run`, um Ihre Anwendung in der einzelnen Datei `main.py` bereitzustellen.
Indem Sie die Datei an `fastapi run` übergeben, wird automatisch erkannt, dass es sich um eine einzelne Datei handelt und nicht um den Teil eines Packages, und es wird wissen, wie es zu importieren ist und Ihre FastAPI-App bereitzustellen. 😎
## Deployment-Konzepte { #deployment-concepts }
Lassen Sie uns noch einmal über einige der gleichen [Deployment-Konzepte](concepts.md) in Bezug auf Container sprechen.
Container sind hauptsächlich ein Werkzeug, um den Prozess des **Erstellens und Deployments** einer Anwendung zu vereinfachen, sie erzwingen jedoch keinen bestimmten Ansatz für die Handhabung dieser **Deployment-Konzepte**, und es gibt mehrere mögliche Strategien.
Die **gute Nachricht** ist, dass es mit jeder unterschiedlichen Strategie eine Möglichkeit gibt, alle Deployment-Konzepte abzudecken. 🎉
Sehen wir uns diese **Deployment-Konzepte** im Hinblick auf Container noch einmal an:
* HTTPS
* Beim Hochfahren ausführen
* Neustarts
* Replikation (die Anzahl der laufenden Prozesse)
* Arbeitsspeicher
* Schritte vor dem Start
## HTTPS { #https }
Wenn wir uns nur auf das **Containerimage** für eine FastAPI-Anwendung (und später auf den laufenden **Container**) konzentrieren, würde HTTPS normalerweise **extern** von einem anderen Tool verarbeitet.
Es könnte sich um einen anderen Container handeln, zum Beispiel mit [Traefik](https://traefik.io/), welcher **HTTPS** und **automatischen** Erwerb von **Zertifikaten** handhabt.
/// tip | Tipp
Traefik verfügt über Integrationen mit Docker, Kubernetes und anderen, sodass Sie damit ganz einfach HTTPS für Ihre Container einrichten und konfigurieren können.
///
Alternativ könnte HTTPS von einem Cloud-Anbieter als einer seiner Dienste gehandhabt werden (während die Anwendung weiterhin in einem Container ausgeführt wird).
## Beim Hochfahren ausführen und Neustarts { #running-on-startup-and-restarts }
Normalerweise gibt es ein anderes Tool, das für das **Starten und Ausführen** Ihres Containers zuständig ist.
Es könnte sich um **Docker** direkt, **Docker Compose**, **Kubernetes**, einen **Cloud-Dienst**, usw. handeln.
In den meisten (oder allen) Fällen gibt es eine einfache Option, um die Ausführung des Containers beim Hochfahren und Neustarts bei Fehlern zu ermöglichen. In Docker ist es beispielsweise die Befehlszeilenoption `--restart`.
Ohne die Verwendung von Containern kann es umständlich und schwierig sein, Anwendungen beim Hochfahren auszuführen und neu zu starten. Bei der **Arbeit mit Containern** ist diese Funktionalität jedoch in den meisten Fällen standardmäßig enthalten. ✨
## Replikation Anzahl der Prozesse { #replication-number-of-processes }
Wenn Sie einen <dfn title="Eine Gruppe von Maschinen, die so konfiguriert sind, dass sie verbunden sind und auf irgendeine Weise zusammenarbeiten.">Cluster</dfn> von Maschinen mit **Kubernetes**, Docker Swarm Mode, Nomad verwenden, oder einem anderen, ähnlich komplexen System zur Verwaltung verteilter Container auf mehreren Maschinen, möchten Sie wahrscheinlich die **Replikation auf Cluster-Ebene abwickeln**, anstatt in jedem Container einen **Prozessmanager** (wie Uvicorn mit Workern) zu verwenden.
Diese verteilten Containerverwaltungssysteme wie Kubernetes verfügen normalerweise über eine integrierte Möglichkeit, die **Replikation von Containern** zu handhaben und gleichzeitig **Load Balancing** für die eingehenden <abbr title="Request Anfrage: Daten, die der Client zum Server sendet">Requests</abbr> zu unterstützen. Alles auf **Cluster-Ebene**.
In diesen Fällen möchten Sie wahrscheinlich ein **Docker-Image von Grund auf** erstellen, wie [oben erklärt](#dockerfile), Ihre Abhängigkeiten installieren und **einen einzelnen Uvicorn-Prozess** ausführen, anstatt mehrere Uvicorn-Worker zu verwenden.
### Load Balancer { #load-balancer }
Bei der Verwendung von Containern ist normalerweise eine Komponente vorhanden, **die am Hauptport lauscht**. Es könnte sich um einen anderen Container handeln, der auch ein **TLS-Terminierungsproxy** ist, um **HTTPS** zu verarbeiten, oder ein ähnliches Tool.
Da diese Komponente die **Last** an Requests aufnehmen und diese (hoffentlich) **ausgewogen** auf die Worker verteilen würde, wird sie üblicherweise auch <abbr title="Lastverteiler">**Load Balancer**</abbr> genannt.
/// tip | Tipp
Die gleiche **TLS-Terminierungsproxy**-Komponente, die für HTTPS verwendet wird, wäre wahrscheinlich auch ein **Load Balancer**.
///
Und wenn Sie mit Containern arbeiten, verfügt das gleiche System, mit dem Sie diese starten und verwalten, bereits über interne Tools, um die **Netzwerkkommunikation** (z. B. HTTP-Requests) von diesem **Load Balancer** (das könnte auch ein **TLS-Terminierungsproxy** sein) zu den Containern mit Ihrer Anwendung weiterzuleiten.
### Ein Load Balancer mehrere Workercontainer { #one-load-balancer-multiple-worker-containers }
Bei der Arbeit mit **Kubernetes** oder ähnlichen verteilten Containerverwaltungssystemen würde die Verwendung ihrer internen Netzwerkmechanismen es dem einzelnen **Load Balancer**, der den Haupt-**Port** überwacht, ermöglichen, Kommunikation (Requests) an möglicherweise **mehrere Container** weiterzuleiten, in denen Ihre Anwendung ausgeführt wird.
Jeder dieser Container, in denen Ihre Anwendung ausgeführt wird, verfügt normalerweise über **nur einen Prozess** (z. B. einen Uvicorn-Prozess, der Ihre FastAPI-Anwendung ausführt). Es wären alles **identische Container**, die das Gleiche ausführen, welche aber jeweils über einen eigenen Prozess, Speicher, usw. verfügen. Auf diese Weise würden Sie die **Parallelisierung** in **verschiedenen Kernen** der CPU nutzen. Oder sogar in **verschiedenen Maschinen**.
Und das verteilte Containersystem mit dem **Load Balancer** würde **die Requests abwechselnd** an jeden einzelnen Container mit Ihrer Anwendung verteilen. Jeder Request könnte also von einem der mehreren **replizierten Container** verarbeitet werden, in denen Ihre Anwendung ausgeführt wird.
Und normalerweise wäre dieser **Load Balancer** in der Lage, Requests zu verarbeiten, die an *andere* Anwendungen in Ihrem Cluster gerichtet sind (z. B. eine andere Domain oder unter einem anderen URL-Pfad-Präfix), und würde diese Kommunikation an die richtigen Container weiterleiten für *diese andere* Anwendung, die in Ihrem Cluster ausgeführt wird.
### Ein Prozess pro Container { #one-process-per-container }
In einem solchen Szenario möchten Sie wahrscheinlich **einen einzelnen (Uvicorn-)Prozess pro Container** haben, da Sie die Replikation bereits auf Cluster-Ebene durchführen würden.
In diesem Fall möchten Sie also **nicht** mehrere Worker im Container haben, z. B. mit der `--workers` Befehlszeilenoption. Sie möchten nur einen **einzelnen Uvicorn-Prozess** pro Container haben (wahrscheinlich aber mehrere Container).
Ein weiterer Prozessmanager im Container (wie es bei mehreren Workern der Fall wäre) würde nur **unnötige Komplexität** hinzufügen, um welche Sie sich höchstwahrscheinlich bereits mit Ihrem Clustersystem kümmern.
### Container mit mehreren Prozessen und Sonderfälle { #containers-with-multiple-processes-and-special-cases }
Natürlich gibt es **Sonderfälle**, in denen Sie **einen Container** mit mehreren **Uvicorn-Workerprozessen** haben möchten.
In diesen Fällen können Sie die `--workers` Befehlszeilenoption verwenden, um die Anzahl der zu startenden Worker festzulegen:
```{ .dockerfile .annotate }
FROM python:3.14
WORKDIR /code
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY ./app /code/app
# (1)!
CMD ["fastapi", "run", "app/main.py", "--port", "80", "--workers", "4"]
```
1. Hier verwenden wir die `--workers` Befehlszeilenoption, um die Anzahl der Worker auf 4 festzulegen.
Hier sind einige Beispiele, wann das sinnvoll sein könnte:
#### Eine einfache Anwendung { #a-simple-app }
Sie könnten einen Prozessmanager im Container haben wollen, wenn Ihre Anwendung **einfach genug** ist, sodass Sie es auf einem **einzelnen Server** ausführen können, nicht auf einem Cluster.
#### Docker Compose { #docker-compose }
Sie könnten das Deployment auf einem **einzelnen Server** (kein Cluster) mit **Docker Compose** durchführen, sodass Sie keine einfache Möglichkeit hätten, die Replikation von Containern (mit Docker Compose) zu verwalten und gleichzeitig das gemeinsame Netzwerk mit **Load Balancing** zu haben.
Dann möchten Sie vielleicht **einen einzelnen Container** mit einem **Prozessmanager** haben, der darin **mehrere Workerprozesse** startet.
---
Der Hauptpunkt ist, dass **keine** dieser Regeln **in Stein gemeißelt** ist, der man blind folgen muss. Sie können diese Ideen verwenden, um **Ihren eigenen Anwendungsfall zu evaluieren**, zu entscheiden, welcher Ansatz für Ihr System am besten geeignet ist und herauszufinden, wie Sie folgende Konzepte verwalten:
* Sicherheit HTTPS
* Beim Hochfahren ausführen
* Neustarts
* Replikation (die Anzahl der laufenden Prozesse)
* Arbeitsspeicher
* Schritte vor dem Start
## Arbeitsspeicher { #memory }
Wenn Sie **einen einzelnen Prozess pro Container** ausführen, wird von jedem dieser Container (mehr als einer, wenn sie repliziert werden) eine mehr oder weniger klar definierte, stabile und begrenzte Menge an Arbeitsspeicher verbraucht.
Und dann können Sie dieselben Speichergrenzen und -anforderungen in Ihren Konfigurationen für Ihr Container-Management-System festlegen (z. B. in **Kubernetes**). Auf diese Weise ist es in der Lage, die Container auf den **verfügbaren Maschinen** zu replizieren, wobei die von diesen benötigte Speichermenge und die auf den Maschinen im Cluster verfügbare Menge berücksichtigt werden.
Wenn Ihre Anwendung **einfach** ist, wird dies wahrscheinlich **kein Problem darstellen** und Sie müssen möglicherweise keine festen Speichergrenzen angeben. Wenn Sie jedoch **viel Speicher verbrauchen** (z. B. bei **Modellen für maschinelles Lernen**), sollten Sie überprüfen, wie viel Speicher Sie verbrauchen, und die **Anzahl der Container** anpassen, die in **jeder Maschine** ausgeführt werden (und möglicherweise weitere Maschinen zu Ihrem Cluster hinzufügen).
Wenn Sie **mehrere Prozesse pro Container** ausführen, müssen Sie sicherstellen, dass die Anzahl der gestarteten Prozesse nicht **mehr Speicher verbraucht** als verfügbar ist.
## Schritte vor dem Start und Container { #previous-steps-before-starting-and-containers }
Wenn Sie Container (z. B. Docker, Kubernetes) verwenden, können Sie hauptsächlich zwei Ansätze verwenden.
### Mehrere Container { #multiple-containers }
Wenn Sie **mehrere Container** haben, von denen wahrscheinlich jeder einen **einzelnen Prozess** ausführt (z. B. in einem **Kubernetes**-Cluster), dann möchten Sie wahrscheinlich einen **separaten Container** haben, welcher die Arbeit der **Vorab-Schritte** in einem einzelnen Container, mit einem einzelnen Prozess ausführt, **bevor** die replizierten Workercontainer ausgeführt werden.
/// info | Info
Wenn Sie Kubernetes verwenden, wäre dies wahrscheinlich ein [Init-Container](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/).
///
Wenn es in Ihrem Anwendungsfall kein Problem darstellt, diese vorherigen Schritte **mehrmals parallel** auszuführen (z. B. wenn Sie keine Datenbankmigrationen ausführen, sondern nur prüfen, ob die Datenbank bereits bereit ist), können Sie sie auch einfach in jedem Container direkt vor dem Start des Hauptprozesses einfügen.
### Einzelner Container { #single-container }
Wenn Sie ein einfaches Setup mit einem **einzelnen Container** haben, welcher dann mehrere **Workerprozesse** (oder auch nur einen Prozess) startet, können Sie die Vorab-Schritte im selben Container direkt vor dem Starten des Prozesses mit der Anwendung ausführen.
### Docker-Basisimage { #base-docker-image }
Es gab ein offizielles FastAPI-Docker-Image: [tiangolo/uvicorn-gunicorn-fastapi](https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker). Dieses ist jedoch jetzt deprecatet. ⛔️
Sie sollten wahrscheinlich **nicht** dieses Basis-Docker-Image (oder ein anderes ähnliches) verwenden.
Wenn Sie **Kubernetes** (oder andere) verwenden und bereits **Replikation** auf Cluster-Ebene mit mehreren **Containern** eingerichtet haben. In diesen Fällen ist es besser, **ein Image von Grund auf neu zu erstellen**, wie oben beschrieben: [Ein Docker-Image für FastAPI erstellen](#build-a-docker-image-for-fastapi).
Und wenn Sie mehrere Worker benötigen, können Sie einfach die `--workers` Befehlszeilenoption verwenden.
/// note | Technische Details
Das Docker-Image wurde erstellt, als Uvicorn das Verwalten und Neustarten von ausgefallenen Workern noch nicht unterstützte, weshalb es notwendig war, Gunicorn mit Uvicorn zu verwenden, was zu einer erheblichen Komplexität führte, nur damit Gunicorn die Uvicorn-Workerprozesse verwaltet und neu startet.
Aber jetzt, da Uvicorn (und der `fastapi`-Befehl) die Verwendung von `--workers` unterstützen, gibt es keinen Grund, ein Basis-Docker-Image an Stelle eines eigenen (das praktisch denselben Code enthält 😅) zu verwenden.
///
## Deployment des Containerimages { #deploy-the-container-image }
Nachdem Sie ein Containerimage (Docker) haben, gibt es mehrere Möglichkeiten, es bereitzustellen.
Zum Beispiel:
* Mit **Docker Compose** auf einem einzelnen Server
* Mit einem **Kubernetes**-Cluster
* Mit einem Docker Swarm Mode-Cluster
* Mit einem anderen Tool wie Nomad
* Mit einem Cloud-Dienst, der Ihr Containerimage nimmt und es deployt
## Docker-Image mit `uv` { #docker-image-with-uv }
Wenn Sie [uv](https://github.com/astral-sh/uv) verwenden, um Ihr Projekt zu installieren und zu verwalten, können Sie deren [uv-Docker-Leitfaden](https://docs.astral.sh/uv/guides/integration/docker/) befolgen.
## Zusammenfassung { #recap }
Mithilfe von Containersystemen (z. B. mit **Docker** und **Kubernetes**) ist es ziemlich einfach, alle **Deployment-Konzepte** zu handhaben:
* HTTPS
* Beim Hochfahren ausführen
* Neustarts
* Replikation (die Anzahl der laufenden Prozesse)
* Arbeitsspeicher
* Schritte vor dem Start
In den meisten Fällen möchten Sie wahrscheinlich kein Basisimage verwenden und stattdessen **ein Containerimage von Grund auf erstellen**, eines basierend auf dem offiziellen Python-Docker-Image.
Indem Sie auf die **Reihenfolge** der Anweisungen im `Dockerfile` und den **Docker-Cache** achten, können Sie **die Build-Zeiten minimieren**, um Ihre Produktivität zu erhöhen (und Langeweile zu vermeiden). 😎

View File

@ -0,0 +1,65 @@
# FastAPI Cloud { #fastapi-cloud }
Sie können Ihre FastAPI-App in der [FastAPI Cloud](https://fastapicloud.com) mit **einem einzigen Befehl** deployen tragen Sie sich in die Warteliste ein, falls noch nicht geschehen. 🚀
## Anmelden { #login }
Stellen Sie sicher, dass Sie bereits ein **FastAPI-Cloud-Konto** haben (wir haben Sie von der Warteliste eingeladen 😉).
Melden Sie sich dann an:
<div class="termy">
```console
$ fastapi login
You are logged in to FastAPI Cloud 🚀
```
</div>
## Deployen { #deploy }
Stellen Sie Ihre App jetzt mit **einem einzigen Befehl** bereit:
<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>
Das wars! Jetzt können Sie Ihre App unter dieser URL aufrufen. ✨
## Über FastAPI Cloud { #about-fastapi-cloud }
**[FastAPI Cloud](https://fastapicloud.com)** wird vom gleichen Autor und Team hinter **FastAPI** entwickelt.
Es vereinfacht den Prozess des **Erstellens**, **Deployens** und **Nutzens** einer API mit minimalem Aufwand.
Es bringt die gleiche **Developer-Experience** beim Erstellen von Apps mit FastAPI auch zum **Deployment** in der Cloud. 🎉
Es kümmert sich außerdem um das meiste, was beim Deployen einer App nötig ist, zum Beispiel:
* HTTPS
* Replikation, mit Autoscaling basierend auf Requests
* usw.
FastAPI Cloud ist Hauptsponsor und Finanzierer der Open-Source-Projekte *FastAPI and friends*. ✨
## Bei anderen Cloudanbietern deployen { #deploy-to-other-cloud-providers }
FastAPI ist Open Source und basiert auf Standards. Sie können FastAPI-Apps bei jedem Cloudanbieter Ihrer Wahl deployen.
Folgen Sie den Anleitungen Ihres Cloudanbieters, um dort FastAPI-Apps zu deployen. 🤓
## Auf den eigenen Server deployen { #deploy-your-own-server }
Ich werde Ihnen später in diesem **Deployment-Leitfaden** auch alle Details zeigen, sodass Sie verstehen, was passiert, was geschehen muss und wie Sie FastAPI-Apps selbst deployen können, auch auf Ihre eigenen Server. 🤓

View File

@ -0,0 +1,231 @@
# Über HTTPS { #about-https }
Es ist leicht anzunehmen, dass HTTPS etwas ist, was einfach nur „aktiviert“ wird oder nicht.
Aber es ist viel komplexer als das.
/// tip | Tipp
Wenn Sie es eilig haben oder es Ihnen egal ist, fahren Sie mit den nächsten Abschnitten fort, um Schritt-für-Schritt-Anleitungen für die Einrichtung der verschiedenen Technologien zu erhalten.
///
Um **die Grundlagen von HTTPS** aus Sicht des Benutzers zu erlernen, schauen Sie sich [https://howhttps.works/](https://howhttps.works/) an.
Aus **Sicht des Entwicklers** sollten Sie beim Nachdenken über HTTPS Folgendes beachten:
* Für HTTPS muss **der Server** über von einem **Dritten** generierte **„Zertifikate“** verfügen.
* Diese Zertifikate werden tatsächlich vom Dritten **erworben** und nicht „generiert“.
* Zertifikate haben eine **Lebensdauer**.
* Sie **verfallen**.
* Und dann müssen sie vom Dritten **erneuert**, **erneut erworben** werden.
* Die Verschlüsselung der Verbindung erfolgt auf **TCP-Ebene**.
* Das ist eine Schicht **unter HTTP**.
* Die Handhabung von **Zertifikaten und Verschlüsselung** erfolgt also **vor HTTP**.
* **TCP weiß nichts über „Domains“**. Nur über IP-Adressen.
* Die Informationen über die angeforderte **spezifische Domain** befinden sich in den **HTTP-Daten**.
* Die **HTTPS-Zertifikate** „zertifizieren“ eine **bestimmte Domain**, aber das Protokoll und die Verschlüsselung erfolgen auf TCP-Ebene, **ohne zu wissen**, um welche Domain es sich handelt.
* **Standardmäßig** bedeutet das, dass Sie nur **ein HTTPS-Zertifikat pro IP-Adresse** haben können.
* Ganz gleich, wie groß Ihr Server ist oder wie klein die einzelnen Anwendungen darauf sind.
* Hierfür gibt es jedoch eine **Lösung**.
* Es gibt eine **Erweiterung** zum **TLS**-Protokoll (dasjenige, das die Verschlüsselung auf TCP-Ebene, vor HTTP, verwaltet) namens **[<abbr title="Server Name Indication - Servernamensanzeige">SNI</abbr>](https://en.wikipedia.org/wiki/Server_Name_Indication)**.
* Mit dieser SNI-Erweiterung kann ein einzelner Server (mit einer **einzelnen IP-Adresse**) über **mehrere HTTPS-Zertifikate** verfügen und **mehrere HTTPS-Domains/Anwendungen bereitstellen**.
* Damit das funktioniert, muss eine **einzelne** Komponente (Programm), die auf dem Server ausgeführt wird und welche die **öffentliche IP-Adresse** überwacht, **alle HTTPS-Zertifikate** des Servers haben.
* **Nachdem** eine sichere Verbindung hergestellt wurde, ist das Kommunikationsprotokoll **immer noch HTTP**.
* Die Inhalte sind **verschlüsselt**, auch wenn sie mit dem **HTTP-Protokoll** gesendet werden.
Es ist eine gängige Praxis, **ein Programm/HTTP-Server** auf dem Server (der Maschine, dem Host usw.) laufen zu lassen, welches **alle HTTPS-Aspekte verwaltet**: Empfangen der **verschlüsselten HTTPS-<abbr title="Request Anfrage: Daten, die der Client zum Server sendet">Requests</abbr>**, Senden der **entschlüsselten HTTP-Requests** an die eigentliche HTTP-Anwendung die auf demselben Server läuft (in diesem Fall die **FastAPI**-Anwendung), entgegennehmen der **HTTP-Response** von der Anwendung, **verschlüsseln derselben** mithilfe des entsprechenden **HTTPS-Zertifikats** und Zurücksenden zum Client über **HTTPS**. Dieser Server wird oft als **[TLS-Terminierungsproxy](https://en.wikipedia.org/wiki/TLS_termination_proxy)** bezeichnet.
Einige der Optionen, die Sie als TLS-Terminierungsproxy verwenden können, sind:
* Traefik (kann auch Zertifikat-Erneuerungen durchführen)
* Caddy (kann auch Zertifikat-Erneuerungen durchführen)
* Nginx
* HAProxy
## Let's Encrypt { #lets-encrypt }
Vor Let's Encrypt wurden diese **HTTPS-Zertifikate** von vertrauenswürdigen Dritten verkauft.
Der Prozess zum Erwerb eines dieser Zertifikate war früher umständlich, erforderte viel Papierarbeit und die Zertifikate waren ziemlich teuer.
Aber dann wurde **[Let's Encrypt](https://letsencrypt.org/)** geschaffen.
Es ist ein Projekt der Linux Foundation. Es stellt **kostenlose HTTPS-Zertifikate** automatisiert zur Verfügung. Diese Zertifikate nutzen standardmäßig die gesamte kryptografische Sicherheit und sind kurzlebig (circa 3 Monate), sodass die **Sicherheit tatsächlich besser ist**, aufgrund der kürzeren Lebensdauer.
Die Domains werden sicher verifiziert und die Zertifikate werden automatisch generiert. Das ermöglicht auch die automatische Erneuerung dieser Zertifikate.
Die Idee besteht darin, den Erwerb und die Erneuerung der Zertifikate zu automatisieren, sodass Sie **sicheres HTTPS, kostenlos und für immer** haben können.
## HTTPS für Entwickler { #https-for-developers }
Hier ist ein Beispiel, wie eine HTTPS-API aussehen könnte, Schritt für Schritt, wobei vor allem die für Entwickler wichtigen Ideen berücksichtigt werden.
### Domainname { #domain-name }
Alles beginnt wahrscheinlich damit, dass Sie einen **Domainnamen erwerben**. Anschließend konfigurieren Sie ihn in einem DNS-Server (wahrscheinlich beim selben Cloudanbieter).
Sie würden wahrscheinlich einen Cloud-Server (eine virtuelle Maschine) oder etwas Ähnliches bekommen, und dieser hätte eine <dfn title="Ändert sich im Laufe der Zeit nicht. Nicht dynamisch.">feste</dfn> **öffentliche IP-Adresse**.
In dem oder den DNS-Server(n) würden Sie einen Eintrag (einen „`A record`“) konfigurieren, um mit **Ihrer Domain** auf die öffentliche **IP-Adresse Ihres Servers** zu verweisen.
Sie würden dies wahrscheinlich nur einmal tun, beim ersten Mal, wenn Sie alles einrichten.
/// tip | Tipp
Dieser Domainnamen-Aspekt liegt weit vor HTTPS, aber da alles von der Domain und der IP-Adresse abhängt, lohnt es sich, das hier zu erwähnen.
///
### DNS { #dns }
Konzentrieren wir uns nun auf alle tatsächlichen HTTPS-Aspekte.
Zuerst würde der Browser mithilfe der **DNS-Server** herausfinden, welches die **IP für die Domain** ist, in diesem Fall `someapp.example.com`.
Die DNS-Server geben dem Browser eine bestimmte **IP-Adresse** zurück. Das wäre die von Ihrem Server verwendete öffentliche IP-Adresse, die Sie in den DNS-Servern konfiguriert haben.
<img src="/img/deployment/https/https01.drawio.svg">
### TLS-Handshake-Start { #tls-handshake-start }
Der Browser kommuniziert dann mit dieser IP-Adresse über **Port 443** (den HTTPS-Port).
Der erste Teil der Kommunikation besteht lediglich darin, die Verbindung zwischen dem Client und dem Server herzustellen und die zu verwendenden kryptografischen Schlüssel usw. zu vereinbaren.
<img src="/img/deployment/https/https02.drawio.svg">
Diese Interaktion zwischen dem Client und dem Server zum Aufbau der TLS-Verbindung wird als **<abbr title="TLS-Handschlag">TLS-Handshake</abbr>** bezeichnet.
### TLS mit SNI-Erweiterung { #tls-with-sni-extension }
**Nur ein Prozess** im Server kann an einem bestimmten **Port** einer bestimmten **IP-Adresse** lauschen. Möglicherweise gibt es andere Prozesse, die an anderen Ports dieselbe IP-Adresse abhören, jedoch nur einen für jede Kombination aus IP-Adresse und Port.
TLS (HTTPS) verwendet standardmäßig den spezifischen Port `443`. Das ist also der Port, den wir brauchen.
Da an diesem Port nur ein Prozess lauschen kann, wäre der Prozess, der dies tun würde, der **TLS-Terminierungsproxy**.
Der TLS-Terminierungsproxy hätte Zugriff auf ein oder mehrere **TLS-Zertifikate** (HTTPS-Zertifikate).
Mithilfe der oben beschriebenen **SNI-Erweiterung** würde der TLS-Terminierungsproxy herausfinden, welches der verfügbaren TLS-Zertifikate (HTTPS) er für diese Verbindung verwenden muss, und zwar das, welches mit der vom Client erwarteten Domain übereinstimmt.
In diesem Fall würde er das Zertifikat für `someapp.example.com` verwenden.
<img src="/img/deployment/https/https03.drawio.svg">
Der Client **vertraut** bereits der Entität, die das TLS-Zertifikat generiert hat (in diesem Fall Let's Encrypt, aber wir werden später mehr darüber erfahren), sodass er **verifizieren** kann, dass das Zertifikat gültig ist.
Mithilfe des Zertifikats entscheiden der Client und der TLS-Terminierungsproxy dann, **wie der Rest der TCP-Kommunikation verschlüsselt werden soll**. Damit ist der **TLS-Handshake** abgeschlossen.
Danach verfügen der Client und der Server über eine **verschlüsselte TCP-Verbindung**, via TLS. Und dann können sie diese Verbindung verwenden, um die eigentliche **HTTP-Kommunikation** zu beginnen.
Und genau das ist **HTTPS**, es ist einfach **HTTP** innerhalb einer **sicheren TLS-Verbindung**, statt einer puren (unverschlüsselten) TCP-Verbindung.
/// tip | Tipp
Beachten Sie, dass die Verschlüsselung der Kommunikation auf der **TCP-Ebene** und nicht auf der HTTP-Ebene erfolgt.
///
### HTTPS-Request { #https-request }
Da Client und Server (sprich, der Browser und der TLS-Terminierungsproxy) nun über eine **verschlüsselte TCP-Verbindung** verfügen, können sie die **HTTP-Kommunikation** starten.
Der Client sendet also einen **HTTPS-Request**. Das ist einfach ein HTTP-Request über eine verschlüsselte TLS-Verbindung.
<img src="/img/deployment/https/https04.drawio.svg">
### Den Request entschlüsseln { #decrypt-the-request }
Der TLS-Terminierungsproxy würde die vereinbarte Verschlüsselung zum **Entschlüsseln des Requests** verwenden und den **einfachen (entschlüsselten) HTTP-Request** an den Prozess weiterleiten, der die Anwendung ausführt (z. B. einen Prozess, bei dem Uvicorn die FastAPI-Anwendung ausführt).
<img src="/img/deployment/https/https05.drawio.svg">
### HTTP-Response { #http-response }
Die Anwendung würde den Request verarbeiten und eine **einfache (unverschlüsselte) HTTP-Response** an den TLS-Terminierungsproxy senden.
<img src="/img/deployment/https/https06.drawio.svg">
### HTTPS-Response { #https-response }
Der TLS-Terminierungsproxy würde dann die Response mithilfe der zuvor vereinbarten Kryptografie (als das Zertifikat für `someapp.example.com` verhandelt wurde) **verschlüsseln** und sie an den Browser zurücksenden.
Als Nächstes überprüft der Browser, ob die Response gültig und mit dem richtigen kryptografischen Schlüssel usw. verschlüsselt ist. Anschließend **entschlüsselt er die Response** und verarbeitet sie.
<img src="/img/deployment/https/https07.drawio.svg">
Der Client (Browser) weiß, dass die Response vom richtigen Server kommt, da dieser die Kryptografie verwendet, die zuvor mit dem **HTTPS-Zertifikat** vereinbart wurde.
### Mehrere Anwendungen { #multiple-applications }
Auf demselben Server (oder denselben Servern) könnten sich **mehrere Anwendungen** befinden, beispielsweise andere API-Programme oder eine Datenbank.
Nur ein Prozess kann diese spezifische IP und den Port verarbeiten (in unserem Beispiel der TLS-Terminierungsproxy), aber die anderen Anwendungen/Prozesse können auch auf dem/den Server(n) ausgeführt werden, solange sie nicht versuchen, dieselbe **Kombination aus öffentlicher IP und Port** zu verwenden.
<img src="/img/deployment/https/https08.drawio.svg">
Auf diese Weise könnte der TLS-Terminierungsproxy HTTPS und Zertifikate für **mehrere Domains**, für mehrere Anwendungen, verarbeiten und die Requests dann jeweils an die richtige Anwendung weiterleiten.
### Verlängerung des Zertifikats { #certificate-renewal }
Irgendwann in der Zukunft würde jedes Zertifikat **ablaufen** (etwa 3 Monate nach dem Erwerb).
Und dann gäbe es ein anderes Programm (in manchen Fällen ist es ein anderes Programm, in manchen Fällen ist es derselbe TLS-Terminierungsproxy), das mit Let's Encrypt kommuniziert und das/die Zertifikat(e) erneuert.
<img src="/img/deployment/https/https.drawio.svg">
Die **TLS-Zertifikate** sind **einem Domainnamen zugeordnet**, nicht einer IP-Adresse.
Um die Zertifikate zu erneuern, muss das erneuernde Programm der Behörde (Let's Encrypt) **nachweisen**, dass es diese Domain tatsächlich **besitzt und kontrolliert**.
Um dies zu erreichen und den unterschiedlichen Anwendungsanforderungen gerecht zu werden, gibt es mehrere Möglichkeiten. Einige beliebte Methoden sind:
* **Einige DNS-Einträge ändern**.
* Hierfür muss das erneuernde Programm die APIs des DNS-Anbieters unterstützen. Je nachdem, welchen DNS-Anbieter Sie verwenden, kann dies eine Option sein oder auch nicht.
* **Als Server ausführen** (zumindest während des Zertifikatserwerbsvorgangs), auf der öffentlichen IP-Adresse, die der Domain zugeordnet ist.
* Wie oben erwähnt, kann nur ein Prozess eine bestimmte IP und einen bestimmten Port überwachen.
* Das ist einer der Gründe, warum es sehr nützlich ist, wenn derselbe TLS-Terminierungsproxy auch den Zertifikats-Erneuerungsprozess übernimmt.
* Andernfalls müssen Sie möglicherweise den TLS-Terminierungsproxy vorübergehend stoppen, das Programm starten, welches die neuen Zertifikate beschafft, diese dann mit dem TLS-Terminierungsproxy konfigurieren und dann den TLS-Terminierungsproxy neu starten. Das ist nicht ideal, da Ihre Anwendung(en) während der Zeit, in der der TLS-Terminierungsproxy ausgeschaltet ist, nicht erreichbar ist/sind.
Dieser ganze Erneuerungsprozess, während die Anwendung weiterhin bereitgestellt wird, ist einer der Hauptgründe, warum Sie ein **separates System zur Verarbeitung von HTTPS** mit einem TLS-Terminierungsproxy haben möchten, anstatt einfach die TLS-Zertifikate direkt mit dem Anwendungsserver zu verwenden (z. B. Uvicorn).
## Proxy-<abbr title="weitergeleitete Header">Forwarded-Header</abbr> { #proxy-forwarded-headers }
Wenn Sie einen Proxy zur Verarbeitung von HTTPS verwenden, weiß Ihr **Anwendungsserver** (z. B. Uvicorn über das FastAPI CLI) nichts über den HTTPS-Prozess, er kommuniziert per einfachem HTTP mit dem **TLS-Terminierungsproxy**.
Dieser **Proxy** würde normalerweise unmittelbar vor dem Übermitteln der Anfrage an den **Anwendungsserver** einige HTTP-Header dynamisch setzen, um dem Anwendungsserver mitzuteilen, dass der Request vom Proxy **weitergeleitet** wird.
/// note | Technische Details
Die Proxy-Header sind:
* [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Forwarded-For)
* [X-Forwarded-Proto](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Forwarded-Proto)
* [X-Forwarded-Host](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Forwarded-Host)
///
Trotzdem, da der **Anwendungsserver** nicht weiß, dass er sich hinter einem vertrauenswürdigen **Proxy** befindet, würde er diesen Headern standardmäßig nicht vertrauen.
Sie können den **Anwendungsserver** jedoch so konfigurieren, dass er den vom **Proxy** gesendeten *Forwarded*-Headern vertraut. Wenn Sie das FastAPI CLI verwenden, können Sie die *CLI-Option* `--forwarded-allow-ips` nutzen, um anzugeben, von welchen IPs er diesen *Forwarded*-Headern vertrauen soll.
Wenn der **Anwendungsserver** beispielsweise nur Kommunikation vom vertrauenswürdigen **Proxy** empfängt, können Sie `--forwarded-allow-ips="*"` setzen, um allen eingehenden IPs zu vertrauen, da er nur Requests von der vom **Proxy** verwendeten IP erhalten wird.
Auf diese Weise kann die Anwendung ihre eigene öffentliche URL, ob sie HTTPS verwendet, die Domain, usw. erkennen.
Das ist z. B. nützlich, um <abbr title="Redirect Umleitung">Redirects</abbr> korrekt zu handhaben.
/// tip | Tipp
Mehr dazu finden Sie in der Dokumentation zu [Hinter einem Proxy Proxy-Forwarded-Header aktivieren](../advanced/behind-a-proxy.md#enable-proxy-forwarded-headers)
///
## Zusammenfassung { #recap }
**HTTPS** zu haben ist sehr wichtig und in den meisten Fällen eine **kritische Anforderung**. Die meiste Arbeit, die Sie als Entwickler in Bezug auf HTTPS aufwenden müssen, besteht lediglich darin, **diese Konzepte zu verstehen** und wie sie funktionieren.
Sobald Sie jedoch die grundlegenden Informationen zu **HTTPS für Entwickler** kennen, können Sie verschiedene Tools problemlos kombinieren und konfigurieren, um alles auf einfache Weise zu verwalten.
In einigen der nächsten Kapitel zeige ich Ihnen einige konkrete Beispiele für die Einrichtung von **HTTPS** für **FastAPI**-Anwendungen. 🔒

View File

@ -0,0 +1,23 @@
# Deployment { #deployment }
Das Deployment einer **FastAPI**-Anwendung ist relativ einfach.
## Was bedeutet Deployment { #what-does-deployment-mean }
<abbr title="Bereitstellen der Anwendung">**Deployment**</abbr> bedeutet, die notwendigen Schritte durchzuführen, um die Anwendung **für die Benutzer verfügbar** zu machen.
Bei einer **Web-API** bedeutet das normalerweise, diese auf einem **entfernten Rechner** zu platzieren, mit einem **Serverprogramm**, welches gute Leistung, Stabilität, usw. bietet, damit Ihre **Benutzer** auf die Anwendung effizient und ohne Unterbrechungen oder Probleme **zugreifen** können.
Das steht im Gegensatz zu den **Entwicklungsphasen**, in denen Sie ständig den Code ändern, kaputt machen, reparieren, den Entwicklungsserver stoppen und neu starten, usw.
## Deployment-Strategien { #deployment-strategies }
Es gibt mehrere Möglichkeiten, dies zu tun, abhängig von Ihrem spezifischen Anwendungsfall und den von Ihnen verwendeten Tools.
Sie könnten mithilfe einer Kombination von Tools selbst **einen Server deployen**, Sie könnten einen **Cloud-Dienst** nutzen, der einen Teil der Arbeit für Sie erledigt, oder andere mögliche Optionen.
Zum Beispiel haben wir, das Team hinter FastAPI, [**FastAPI Cloud**](https://fastapicloud.com) entwickelt, um das Deployment von FastAPI-Apps in der Cloud so reibungslos wie möglich zu gestalten, mit derselben Developer-Experience wie beim Arbeiten mit FastAPI.
Ich zeige Ihnen einige der wichtigsten Konzepte, die Sie beim Deployment einer **FastAPI**-Anwendung wahrscheinlich berücksichtigen sollten (obwohl das meiste davon auch für jede andere Art von Webanwendung gilt).
In den nächsten Abschnitten erfahren Sie mehr über die zu beachtenden Details und über die Techniken, das zu tun. ✨

View File

@ -0,0 +1,157 @@
# Einen Server manuell ausführen { #run-a-server-manually }
## Den `fastapi run`-Befehl verwenden { #use-the-fastapi-run-command }
Kurz gesagt, nutzen Sie `fastapi run`, um Ihre FastAPI-Anwendung bereitzustellen:
<div class="termy">
```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 production server 🚀
Searching for package file structure from directories
with <font color="#3465A4">__init__.py</font> files
Importing from <font color="#75507B">/home/user/code/</font><font color="#AD7FA8">awesomeapp</font>
<span style="background-color:#007166"><font color="#D3D7CF"> module </font></span> 🐍 main.py
<span style="background-color:#007166"><font color="#D3D7CF"> code </font></span> Importing the FastAPI app object from the module with
the following code:
<u style="text-decoration-style:solid">from </u><u style="text-decoration-style:solid"><b>main</b></u><u style="text-decoration-style:solid"> import </u><u style="text-decoration-style:solid"><b>app</b></u>
<span style="background-color:#007166"><font color="#D3D7CF"> app </font></span> Using import string: <font color="#3465A4">main:app</font>
<span style="background-color:#007166"><font color="#D3D7CF"> server </font></span> Server started at <font color="#729FCF"><u style="text-decoration-style:solid">http://0.0.0.0:8000</u></font>
<span style="background-color:#007166"><font color="#D3D7CF"> server </font></span> Documentation at <font color="#729FCF"><u style="text-decoration-style:solid">http://0.0.0.0:8000/docs</u></font>
Logs:
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Started server process <b>[</b><font color="#34E2E2"><b>2306215</b></font><b>]</b>
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Waiting for application startup.
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Application startup complete.
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Uvicorn running on <font color="#729FCF"><u style="text-decoration-style:solid">http://0.0.0.0:8000</u></font> <b>(</b>Press CTRL+C
to quit<b>)</b>
```
</div>
Das würde in den meisten Fällen funktionieren. 😎
Sie könnten diesen Befehl beispielsweise verwenden, um Ihre **FastAPI**-App in einem Container, auf einem Server usw. zu starten.
## ASGI-Server { #asgi-servers }
Lassen Sie uns ein wenig tiefer in die Details eintauchen.
FastAPI verwendet einen Standard zum Erstellen von Python-Webframeworks und -Servern, der als <abbr title="Asynchrones Server-Gateway-Interface">ASGI</abbr> bekannt ist. FastAPI ist ein ASGI-Webframework.
Das Wichtigste, was Sie benötigen, um eine **FastAPI**-Anwendung (oder eine andere ASGI-Anwendung) auf einer entfernten Servermaschine auszuführen, ist ein ASGI-Serverprogramm wie **Uvicorn**, der standardmäßig im `fastapi`-Kommando enthalten ist.
Es gibt mehrere Alternativen, einschließlich:
* [Uvicorn](https://www.uvicorn.dev/): ein hochperformanter ASGI-Server.
* [Hypercorn](https://hypercorn.readthedocs.io/): ein ASGI-Server, der unter anderem kompatibel mit HTTP/2 und Trio ist.
* [Daphne](https://github.com/django/daphne): der für Django Channels entwickelte ASGI-Server.
* [Granian](https://github.com/emmett-framework/granian): Ein Rust HTTP-Server für Python-Anwendungen.
* [NGINX Unit](https://unit.nginx.org/howto/fastapi/): NGINX Unit ist eine leichte und vielseitige Laufzeitumgebung für Webanwendungen.
## Servermaschine und Serverprogramm { #server-machine-and-server-program }
Es gibt ein kleines Detail bei den Namen, das Sie beachten sollten. 💡
Das Wort „**Server**“ wird häufig verwendet, um sowohl den entfernten/Cloud-Computer (die physische oder virtuelle Maschine) als auch das Programm zu bezeichnen, das auf dieser Maschine läuft (z. B. Uvicorn).
Denken Sie einfach daran, dass sich „Server“ im Allgemeinen auf eines dieser beiden Dinge beziehen kann.
Wenn man sich auf die entfernte Maschine bezieht, wird sie üblicherweise als **Server**, aber auch als **Maschine**, **VM** (virtuelle Maschine) oder **Knoten** bezeichnet. Diese Begriffe beziehen sich auf irgendeine Art von entfernten Rechner, normalerweise unter Linux, auf dem Sie Programme ausführen.
## Das Serverprogramm installieren { #install-the-server-program }
Wenn Sie FastAPI installieren, wird es mit einem Produktionsserver, Uvicorn, geliefert, und Sie können ihn mit dem `fastapi run` Befehl starten.
Aber Sie können auch ein ASGI-Serverprogramm manuell installieren.
Stellen Sie sicher, dass Sie eine [virtuelle Umgebung](../virtual-environments.md) erstellen, sie aktivieren und dann die Serveranwendung installieren.
Zum Beispiel, um Uvicorn zu installieren:
<div class="termy">
```console
$ pip install "uvicorn[standard]"
---> 100%
```
</div>
Ein ähnlicher Prozess würde für jedes andere ASGI-Serverprogramm gelten.
/// tip | Tipp
Durch das Hinzufügen von `standard` installiert und verwendet Uvicorn einige empfohlene zusätzliche Abhängigkeiten.
Dazu gehört `uvloop`, der hochperformante Drop-in-Ersatz für `asyncio`, der den großen Nebenläufigkeits-Leistungsschub bietet.
Wenn Sie FastAPI mit etwas wie `pip install "fastapi[standard]"` installieren, erhalten Sie auch `uvicorn[standard]`.
///
## Das Serverprogramm ausführen { #run-the-server-program }
Wenn Sie einen ASGI-Server manuell installiert haben, müssen Sie normalerweise einen Importstring in einem speziellen Format übergeben, damit er Ihre FastAPI-Anwendung importiert:
<div class="termy">
```console
$ uvicorn main:app --host 0.0.0.0 --port 80
<span style="color: green;">INFO</span>: Uvicorn running on http://0.0.0.0:80 (Press CTRL+C to quit)
```
</div>
/// note | Hinweis
Der Befehl `uvicorn main:app` bezieht sich auf:
* `main`: die Datei `main.py` (das Python-„Modul“).
* `app`: das Objekt, das innerhalb von `main.py` mit der Zeile `app = FastAPI()` erstellt wurde.
Es ist äquivalent zu:
```Python
from main import app
```
///
Jedes alternative ASGI-Serverprogramm hätte einen ähnlichen Befehl, Sie können in deren jeweiligen Dokumentationen mehr lesen.
/// warning | Achtung
Uvicorn und andere Server unterstützen eine `--reload`-Option, die während der Entwicklung nützlich ist.
Die `--reload`-Option verbraucht viel mehr Ressourcen, ist instabiler, usw.
Sie hilft während der **Entwicklung**, Sie sollten sie jedoch **nicht** in der **Produktion** verwenden.
///
## Deployment-Konzepte { #deployment-concepts }
Diese Beispiele führen das Serverprogramm (z. B. Uvicorn) aus, starten **einen einzelnen Prozess** und überwachen alle IPs (`0.0.0.0`) an einem vordefinierten Port (z. B. `80`).
Das ist die Grundidee. Aber Sie möchten sich wahrscheinlich um einige zusätzliche Dinge kümmern, wie zum Beispiel:
* Sicherheit HTTPS
* Beim Hochfahren ausführen
* Neustarts
* Replikation (die Anzahl der laufenden Prozesse)
* Speicher
* Schritte vor dem Start
In den nächsten Kapiteln erzähle ich Ihnen mehr über jedes dieser Konzepte, wie Sie über diese nachdenken, und gebe Ihnen einige konkrete Beispiele mit Strategien für den Umgang damit. 🚀

View File

@ -0,0 +1,139 @@
# Serverworker Uvicorn mit Workern { #server-workers-uvicorn-with-workers }
Schauen wir uns die Deployment-Konzepte von früher noch einmal an:
* Sicherheit HTTPS
* Beim Hochfahren ausführen
* Neustarts
* **Replikation (die Anzahl der laufenden Prozesse)**
* Arbeitsspeicher
* Schritte vor dem Start
Bis zu diesem Punkt, in allen Tutorials in der Dokumentation, haben Sie wahrscheinlich ein **Serverprogramm** ausgeführt, zum Beispiel mit dem `fastapi`-Befehl, der Uvicorn startet, und einen **einzelnen Prozess** ausführt.
Wenn Sie Anwendungen deployen, möchten Sie wahrscheinlich eine gewisse **Replikation von Prozessen**, um **mehrere Kerne** zu nutzen und mehr <abbr title="Request Anfrage: Daten, die der Client zum Server sendet">Requests</abbr> bearbeiten zu können.
Wie Sie im vorherigen Kapitel über [Deployment-Konzepte](concepts.md) gesehen haben, gibt es mehrere Strategien, die Sie anwenden können.
Hier zeige ich Ihnen, wie Sie **Uvicorn** mit **Workerprozessen** verwenden, indem Sie den `fastapi`-Befehl oder den `uvicorn`-Befehl direkt verwenden.
/// info | Info
Wenn Sie Container verwenden, beispielsweise mit Docker oder Kubernetes, erzähle ich Ihnen mehr darüber im nächsten Kapitel: [FastAPI in Containern Docker](docker.md).
Insbesondere wenn die Anwendung auf **Kubernetes** läuft, werden Sie wahrscheinlich **keine** Worker verwenden wollen, und stattdessen **einen einzelnen Uvicorn-Prozess pro Container** ausführen wollen, aber ich werde Ihnen später in diesem Kapitel mehr darüber erzählen.
///
## Mehrere Worker { #multiple-workers }
Sie können mehrere Worker mit der `--workers`-Befehlszeilenoption starten:
//// tab | `fastapi`
Wenn Sie den `fastapi`-Befehl verwenden:
<div class="termy">
```console
$ <font color="#4E9A06">fastapi</font> run --workers 4 <u style="text-decoration-style:solid">main.py</u>
<span style="background-color:#009485"><font color="#D3D7CF"> FastAPI </font></span> Starting production server 🚀
Searching for package file structure from directories with
<font color="#3465A4">__init__.py</font> files
Importing from <font color="#75507B">/home/user/code/</font><font color="#AD7FA8">awesomeapp</font>
<span style="background-color:#007166"><font color="#D3D7CF"> module </font></span> 🐍 main.py
<span style="background-color:#007166"><font color="#D3D7CF"> code </font></span> Importing the FastAPI app object from the module with the
following code:
<u style="text-decoration-style:solid">from </u><u style="text-decoration-style:solid"><b>main</b></u><u style="text-decoration-style:solid"> import </u><u style="text-decoration-style:solid"><b>app</b></u>
<span style="background-color:#007166"><font color="#D3D7CF"> app </font></span> Using import string: <font color="#3465A4">main:app</font>
<span style="background-color:#007166"><font color="#D3D7CF"> server </font></span> Server started at <font color="#729FCF"><u style="text-decoration-style:solid">http://0.0.0.0:8000</u></font>
<span style="background-color:#007166"><font color="#D3D7CF"> server </font></span> Documentation at <font color="#729FCF"><u style="text-decoration-style:solid">http://0.0.0.0:8000/docs</u></font>
Logs:
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Uvicorn running on <font color="#729FCF"><u style="text-decoration-style:solid">http://0.0.0.0:8000</u></font> <b>(</b>Press CTRL+C to
quit<b>)</b>
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Started parent process <b>[</b><font color="#34E2E2"><b>27365</b></font><b>]</b>
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Started server process <b>[</b><font color="#34E2E2"><b>27368</b></font><b>]</b>
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Started server process <b>[</b><font color="#34E2E2"><b>27369</b></font><b>]</b>
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Started server process <b>[</b><font color="#34E2E2"><b>27370</b></font><b>]</b>
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Started server process <b>[</b><font color="#34E2E2"><b>27367</b></font><b>]</b>
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Waiting for application startup.
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Waiting for application startup.
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Waiting for application startup.
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Waiting for application startup.
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Application startup complete.
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Application startup complete.
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Application startup complete.
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Application startup complete.
```
</div>
////
//// tab | `uvicorn`
Wenn Sie den `uvicorn`-Befehl direkt verwenden möchten:
<div class="termy">
```console
$ uvicorn main:app --host 0.0.0.0 --port 8080 --workers 4
<font color="#A6E22E">INFO</font>: Uvicorn running on <b>http://0.0.0.0:8080</b> (Press CTRL+C to quit)
<font color="#A6E22E">INFO</font>: Started parent process [<font color="#A1EFE4"><b>27365</b></font>]
<font color="#A6E22E">INFO</font>: Started server process [<font color="#A1EFE4">27368</font>]
<font color="#A6E22E">INFO</font>: Waiting for application startup.
<font color="#A6E22E">INFO</font>: Application startup complete.
<font color="#A6E22E">INFO</font>: Started server process [<font color="#A1EFE4">27369</font>]
<font color="#A6E22E">INFO</font>: Waiting for application startup.
<font color="#A6E22E">INFO</font>: Application startup complete.
<font color="#A6E22E">INFO</font>: Started server process [<font color="#A1EFE4">27370</font>]
<font color="#A6E22E">INFO</font>: Waiting for application startup.
<font color="#A6E22E">INFO</font>: Application startup complete.
<font color="#A6E22E">INFO</font>: Started server process [<font color="#A1EFE4">27367</font>]
<font color="#A6E22E">INFO</font>: Waiting for application startup.
<font color="#A6E22E">INFO</font>: Application startup complete.
```
</div>
////
Die einzige neue Option hier ist `--workers`, die Uvicorn anweist, 4 Workerprozesse zu starten.
Sie können auch sehen, dass die **PID** jedes Prozesses angezeigt wird, `27365` für den übergeordneten Prozess (dies ist der **Prozessmanager**) und eine für jeden Workerprozess: `27368`, `27369`, `27370` und `27367`.
## Deployment-Konzepte { #deployment-concepts }
Hier haben Sie gesehen, wie Sie mehrere **Worker** verwenden, um die Ausführung der Anwendung zu **parallelisieren**, **mehrere Kerne** der CPU zu nutzen und in der Lage zu sein, **mehr Requests** zu bearbeiten.
In der Liste der Deployment-Konzepte von oben würde die Verwendung von Workern hauptsächlich bei der **Replikation** und ein wenig bei **Neustarts** helfen, aber Sie müssen sich trotzdem um die anderen kümmern:
* **Sicherheit HTTPS**
* **Beim Hochfahren ausführen**
* ***Neustarts***
* Replikation (die Anzahl der laufenden Prozesse)
* **Arbeitsspeicher**
* **Schritte vor dem Start**
## Container und Docker { #containers-and-docker }
Im nächsten Kapitel über [FastAPI in Containern Docker](docker.md) werde ich einige Strategien erläutern, die Sie für den Umgang mit den anderen **Deployment-Konzepten** verwenden können.
Ich zeige Ihnen, wie Sie **Ihr eigenes Image von Grund auf erstellen**, um einen einzelnen Uvicorn-Prozess auszuführen. Es ist ein einfacher Vorgang und wahrscheinlich das, was Sie tun möchten, wenn Sie ein verteiltes Containerverwaltungssystem wie **Kubernetes** verwenden.
## Zusammenfassung { #recap }
Sie können mehrere Workerprozesse mit der `--workers`-CLI-Option über die `fastapi`- oder `uvicorn`-Befehle nutzen, um **Multikern-CPUs** auszunutzen und **mehrere Prozesse parallel** auszuführen.
Sie könnten diese Tools und Ideen nutzen, wenn Sie **Ihr eigenes Deployment-System** einrichten und sich dabei selbst um die anderen Deployment-Konzepte kümmern.
Schauen Sie sich das nächste Kapitel an, um mehr über **FastAPI** mit Containern (z. B. Docker und Kubernetes) zu erfahren. Sie werden sehen, dass diese Tools auch einfache Möglichkeiten bieten, die anderen **Deployment-Konzepte** zu lösen. ✨

View File

@ -0,0 +1,93 @@
# Über FastAPI-Versionen { #about-fastapi-versions }
**FastAPI** wird bereits in vielen Anwendungen und Systemen produktiv eingesetzt. Und die Testabdeckung wird bei 100 % gehalten. Aber seine Entwicklung geht immer noch schnell voran.
Es werden regelmäßig neue Funktionen hinzugefügt, Fehler werden regelmäßig behoben und der Code wird weiterhin kontinuierlich verbessert.
Aus diesem Grund sind die aktuellen Versionen immer noch `0.x.x`, was darauf hindeutet, dass jede Version möglicherweise nicht abwärtskompatible Änderungen haben könnte. Dies folgt den Konventionen der [Semantische Versionierung](https://semver.org/).
Sie können jetzt Produktionsanwendungen mit **FastAPI** erstellen (und das tun Sie wahrscheinlich schon seit einiger Zeit), Sie müssen nur sicherstellen, dass Sie eine Version verwenden, die korrekt mit dem Rest Ihres Codes funktioniert.
## Ihre `fastapi`-Version pinnen { #pin-your-fastapi-version }
Als Erstes sollten Sie die Version von **FastAPI**, die Sie verwenden, an die höchste Version „pinnen“, von der Sie wissen, dass sie für Ihre Anwendung korrekt funktioniert.
Angenommen, Sie verwenden in Ihrer App die Version `0.112.0`.
Wenn Sie eine `requirements.txt`-Datei verwenden, können Sie die Version wie folgt angeben:
```txt
fastapi[standard]==0.112.0
```
Das würde bedeuten, dass Sie genau die Version `0.112.0` verwenden.
Oder Sie können sie auch anpinnen mit:
```txt
fastapi[standard]>=0.112.0,<0.113.0
```
Das würde bedeuten, dass Sie eine Version `0.112.0` oder höher verwenden würden, aber kleiner als `0.113.0`, beispielsweise würde eine Version `0.112.2` immer noch akzeptiert.
Wenn Sie zum Verwalten Ihrer Installationen andere Tools wie `uv`, Poetry, Pipenv oder andere verwenden, sie verfügen alle über eine Möglichkeit, bestimmte Versionen für Ihre Packages zu definieren.
## Verfügbare Versionen { #available-versions }
Die verfügbaren Versionen können Sie in den [Versionshinweisen](../release-notes.md) einsehen (z. B. um zu überprüfen, welches die neueste Version ist).
## Über Versionen { #about-versions }
Gemäß den Konventionen zur semantischen Versionierung könnte jede Version unter `1.0.0` potenziell nicht abwärtskompatible Änderungen hinzufügen.
FastAPI folgt auch der Konvention, dass jede „PATCH“-Versionsänderung für Bugfixes und abwärtskompatible Änderungen gedacht ist.
/// tip | Tipp
Der „PATCH“ ist die letzte Zahl, zum Beispiel ist in `0.2.3` die PATCH-Version `3`.
///
Sie sollten also in der Lage sein, eine Version wie folgt anzupinnen:
```txt
fastapi>=0.45.0,<0.46.0
```
Nicht abwärtskompatible Änderungen und neue Funktionen werden in „MINOR“-Versionen hinzugefügt.
/// tip | Tipp
„MINOR“ ist die Zahl in der Mitte, zum Beispiel ist in `0.2.3` die MINOR-Version `2`.
///
## Upgrade der FastAPI-Versionen { #upgrading-the-fastapi-versions }
Sie sollten Tests für Ihre App hinzufügen.
Mit **FastAPI** ist das sehr einfach (dank Starlette), schauen Sie sich die Dokumentation an: [Testen](../tutorial/testing.md)
Nachdem Sie Tests erstellt haben, können Sie die **FastAPI**-Version auf eine neuere Version aktualisieren und sicherstellen, dass Ihr gesamter Code ordnungsgemäß funktioniert, indem Sie Ihre Tests ausführen.
Wenn alles funktioniert oder nachdem Sie die erforderlichen Änderungen vorgenommen haben und alle Ihre Tests bestehen, können Sie Ihr `fastapi` an die neue aktuelle Version pinnen.
## Über Starlette { #about-starlette }
Sie sollten die Version von `starlette` nicht pinnen.
Verschiedene Versionen von **FastAPI** verwenden eine bestimmte neuere Version von Starlette.
Sie können **FastAPI** also einfach die korrekte Starlette-Version verwenden lassen.
## Über Pydantic { #about-pydantic }
Pydantic integriert die Tests für **FastAPI** in seine eigenen Tests, sodass neue Versionen von Pydantic (über `1.0.0`) immer mit FastAPI kompatibel sind.
Sie können Pydantic an jede für Sie geeignete Version über `1.0.0` anpinnen.
Zum Beispiel:
```txt
pydantic>=2.7.0,<3.0.0
```

View File

@ -0,0 +1,23 @@
# Editor-Unterstützung { #editor-support }
Die offizielle [FastAPI-Erweiterung](https://marketplace.visualstudio.com/items?itemName=FastAPILabs.fastapi-vscode) verbessert Ihren FastAPI-Entwicklungsworkflow mit Pfadoperation-Erkennung und -Navigation sowie FastAPI-Cloud-Deployment und Live-Logstreaming.
Weitere Details zur Erweiterung finden Sie im README im [GitHub-Repository](https://github.com/fastapi/fastapi-vscode).
## Einrichtung und Installation { #setup-and-installation }
Die **FastAPI-Erweiterung** ist sowohl für [VS Code](https://code.visualstudio.com/) als auch für [Cursor](https://www.cursor.com/) verfügbar. Sie kann direkt über das Erweiterungen-Panel in jedem Editor installiert werden, indem Sie nach „FastAPI“ suchen und die von **FastAPI Labs** veröffentlichte Erweiterung auswählen. Die Erweiterung funktioniert auch in browserbasierten Editoren wie [vscode.dev](https://vscode.dev) und [github.dev](https://github.dev).
### Anwendungserkennung { #application-discovery }
Standardmäßig erkennt die Erweiterung FastAPI-Anwendungen in Ihrem Workspace automatisch, indem sie nach Dateien sucht, die `FastAPI()` instanziieren. Falls die automatische Erkennung mit Ihrer Projektstruktur nicht funktioniert, können Sie einen Entry-Point über `[tool.fastapi]` in `pyproject.toml` oder die VS-Code-Einstellung `fastapi.entryPoint` in Modulnotation angeben (z. B. `myapp.main:app`).
## Funktionen { #features }
- Pfadoperation-Explorer Eine Baumansicht in der Seitenleiste aller <dfn title="Routen, Endpunkte">*Pfadoperationen*</dfn> in Ihrer Anwendung. Klicken Sie, um zu einer beliebigen Route- oder Router-Definition zu springen.
- Routensuche Suchen Sie nach Pfad, Methode oder Namen mit <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>E</kbd> (unter macOS: <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>E</kbd>).
- CodeLens-Navigation Anklickbare Links oberhalb von Testclient-Aufrufen (z. B. `client.get('/items')`), die zur passenden Pfadoperation springen und so eine schnelle Navigation zwischen Tests und Implementierung ermöglichen.
- Zu FastAPI Cloud deployen Deployment Ihrer App mit einem Klick auf [FastAPI Cloud](https://fastapicloud.com/).
- Anwendungslogs streamen Echtzeit-Logstreaming Ihrer auf FastAPI Cloud deployten Anwendung mit Loglevel-Filterung und Textsuche.
Wenn Sie sich mit den Funktionen der Erweiterung vertraut machen möchten, können Sie den ErweiterungsWalkthrough aufrufen, indem Sie die Befehlspalette öffnen (<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> oder unter macOS: <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>) und „Welcome: Open walkthrough …“ auswählen und anschließend den Walkthrough „Get started with FastAPI“ wählen.

View File

@ -0,0 +1,298 @@
# Umgebungsvariablen { #environment-variables }
/// tip | Tipp
Wenn Sie bereits wissen, was „Umgebungsvariablen“ sind und wie man sie verwendet, können Sie dies überspringen.
///
Eine Umgebungsvariable (auch bekannt als „**env var**“) ist eine Variable, die **außerhalb** des Python-Codes im **Betriebssystem** lebt und von Ihrem Python-Code (oder auch von anderen Programmen) gelesen werden kann.
Umgebungsvariablen können nützlich sein, um **Einstellungen** der Anwendung zu handhaben, als Teil der **Installation** von Python usw.
## Umgebungsvariablen erstellen und verwenden { #create-and-use-env-vars }
Sie können Umgebungsvariablen in der **Shell (Terminal)** erstellen und verwenden, ohne Python zu benötigen:
//// tab | Linux, macOS, Windows Bash
<div class="termy">
```console
// Sie können eine Umgebungsvariable MY_NAME erstellen mit
$ export MY_NAME="Wade Wilson"
// Dann können Sie sie mit anderen Programmen verwenden, etwa
$ echo "Hello $MY_NAME"
Hello Wade Wilson
```
</div>
////
//// tab | Windows PowerShell
<div class="termy">
```console
// Erstellen Sie eine Umgebungsvariable MY_NAME
$ $Env:MY_NAME = "Wade Wilson"
// Verwenden Sie sie mit anderen Programmen, etwa
$ echo "Hello $Env:MY_NAME"
Hello Wade Wilson
```
</div>
////
## Umgebungsvariablen in Python lesen { #read-env-vars-in-python }
Sie können auch Umgebungsvariablen **außerhalb** von Python erstellen, im Terminal (oder mit jeder anderen Methode) und sie dann **in Python** lesen.
Zum Beispiel könnten Sie eine Datei `main.py` haben mit:
```Python hl_lines="3"
import os
name = os.getenv("MY_NAME", "World")
print(f"Hello {name} from Python")
```
/// tip | Tipp
Das zweite Argument von [`os.getenv()`](https://docs.python.org/3.8/library/os.html#os.getenv) ist der Defaultwert, der zurückgegeben wird.
Wenn er nicht angegeben wird, ist er standardmäßig `None`. Hier geben wir „World“ als den zu verwendenden Defaultwert an.
///
Dann könnten Sie das Python-Programm aufrufen:
//// tab | Linux, macOS, Windows Bash
<div class="termy">
```console
// Hier setzen wir die Umgebungsvariable noch nicht
$ python main.py
// Da wir die Umgebungsvariable nicht gesetzt haben, erhalten wir den Defaultwert
Hello World from Python
// Aber wenn wir zuerst eine Umgebungsvariable erstellen
$ export MY_NAME="Wade Wilson"
// Und dann das Programm erneut aufrufen
$ python main.py
// Jetzt kann es die Umgebungsvariable lesen
Hello Wade Wilson from Python
```
</div>
////
//// tab | Windows PowerShell
<div class="termy">
```console
// Hier setzen wir die Umgebungsvariable noch nicht
$ python main.py
// Da wir die Umgebungsvariable nicht gesetzt haben, erhalten wir den Defaultwert
Hello World from Python
// Aber wenn wir zuerst eine Umgebungsvariable erstellen
$ $Env:MY_NAME = "Wade Wilson"
// Und dann das Programm erneut aufrufen
$ python main.py
// Jetzt kann es die Umgebungsvariable lesen
Hello Wade Wilson from Python
```
</div>
////
Da Umgebungsvariablen außerhalb des Codes gesetzt werden können, aber vom Code gelesen werden können und nicht mit den restlichen Dateien gespeichert (in `git` committet) werden müssen, werden sie häufig für Konfigurationen oder **Einstellungen** verwendet.
Sie können auch eine Umgebungsvariable nur für einen **spezifischen Programmaufruf** erstellen, die nur für dieses Programm und nur für dessen Dauer verfügbar ist.
Um dies zu tun, erstellen Sie sie direkt vor dem Programmaufruf, in derselben Zeile:
<div class="termy">
```console
// Erstellen Sie eine Umgebungsvariable MY_NAME in der Zeile für diesen Programmaufruf
$ MY_NAME="Wade Wilson" python main.py
// Jetzt kann es die Umgebungsvariable lesen
Hello Wade Wilson from Python
// Die Umgebungsvariable existiert danach nicht mehr
$ python main.py
Hello World from Python
```
</div>
/// tip | Tipp
Sie können mehr darüber lesen auf [The Twelve-Factor App: Config](https://12factor.net/config).
///
## Typen und Validierung { #types-and-validation }
Diese Umgebungsvariablen können nur **Textstrings** handhaben, da sie extern zu Python sind und kompatibel mit anderen Programmen und dem Rest des Systems (und sogar mit verschiedenen Betriebssystemen, wie Linux, Windows, macOS) sein müssen.
Das bedeutet, dass **jeder Wert**, der in Python von einer Umgebungsvariablen gelesen wird, **ein `str` sein wird**, und jede Konvertierung in einen anderen Typ oder jede Validierung muss im Code vorgenommen werden.
Sie werden mehr darüber lernen, wie man Umgebungsvariablen zur Handhabung von **Anwendungseinstellungen** verwendet, im [Handbuch für fortgeschrittene Benutzer Einstellungen und Umgebungsvariablen](./advanced/settings.md).
## `PATH`-Umgebungsvariable { #path-environment-variable }
Es gibt eine **spezielle** Umgebungsvariable namens **`PATH`**, die von den Betriebssystemen (Linux, macOS, Windows) verwendet wird, um Programme zu finden, die ausgeführt werden sollen.
Der Wert der Variable `PATH` ist ein langer String, der aus Verzeichnissen besteht, die auf Linux und macOS durch einen Doppelpunkt `:` und auf Windows durch ein Semikolon `;` getrennt sind.
Zum Beispiel könnte die `PATH`-Umgebungsvariable so aussehen:
//// tab | Linux, macOS
```plaintext
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
```
Das bedeutet, dass das System nach Programmen in den Verzeichnissen suchen sollte:
* `/usr/local/bin`
* `/usr/bin`
* `/bin`
* `/usr/sbin`
* `/sbin`
////
//// tab | Windows
```plaintext
C:\Program Files\Python312\Scripts;C:\Program Files\Python312;C:\Windows\System32
```
Das bedeutet, dass das System nach Programmen in den Verzeichnissen suchen sollte:
* `C:\Program Files\Python312\Scripts`
* `C:\Program Files\Python312`
* `C:\Windows\System32`
////
Wenn Sie einen **Befehl** im Terminal eingeben, **sucht** das Betriebssystem nach dem Programm in **jedem dieser Verzeichnisse**, die in der `PATH`-Umgebungsvariablen aufgeführt sind.
Zum Beispiel, wenn Sie `python` im Terminal eingeben, sucht das Betriebssystem nach einem Programm namens `python` im **ersten Verzeichnis** in dieser Liste.
Wenn es es findet, wird es **benutzt**. Andernfalls sucht es weiter in den **anderen Verzeichnissen**.
### Python installieren und den `PATH` aktualisieren { #installing-python-and-updating-the-path }
Wenn Sie Python installieren, könnten Sie gefragt werden, ob Sie die `PATH`-Umgebungsvariable aktualisieren möchten.
//// tab | Linux, macOS
Angenommen, Sie installieren Python und es landet in einem Verzeichnis `/opt/custompython/bin`.
Wenn Sie erlauben, die `PATH`-Umgebungsvariable zu aktualisieren, fügt der Installer `/opt/custompython/bin` zur `PATH`-Umgebungsvariable hinzu.
Das könnte so aussehen:
```plaintext
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/custompython/bin
```
Auf diese Weise, wenn Sie `python` im Terminal eingeben, findet das System das Python-Programm in `/opt/custompython/bin` (das letzte Verzeichnis) und verwendet dieses.
////
//// tab | Windows
Angenommen, Sie installieren Python und es landet in einem Verzeichnis `C:\opt\custompython\bin`.
Wenn Sie erlauben, die `PATH`-Umgebungsvariable zu aktualisieren, fügt der Installer `C:\opt\custompython\bin` zur `PATH`-Umgebungsvariable hinzu.
```plaintext
C:\Program Files\Python312\Scripts;C:\Program Files\Python312;C:\Windows\System32;C:\opt\custompython\bin
```
Auf diese Weise, wenn Sie `python` im Terminal eingeben, findet das System das Python-Programm in `C:\opt\custompython\bin` (das letzte Verzeichnis) und verwendet dieses.
////
Also, wenn Sie tippen:
<div class="termy">
```console
$ python
```
</div>
//// tab | Linux, macOS
Das System wird das `python` Programm in `/opt/custompython/bin` **finden** und es ausführen.
Es wäre ungefähr gleichbedeutend mit der Eingabe von:
<div class="termy">
```console
$ /opt/custompython/bin/python
```
</div>
////
//// tab | Windows
Das System wird das `python` Programm in `C:\opt\custompython\bin\python` **finden** und es ausführen.
Es wäre ungefähr gleichbedeutend mit der Eingabe von:
<div class="termy">
```console
$ C:\opt\custompython\bin\python
```
</div>
////
Diese Informationen werden nützlich sein, wenn Sie über [Virtuelle Umgebungen](virtual-environments.md) lernen.
## Fazit { #conclusion }
Mit diesem Wissen sollten Sie ein grundlegendes Verständnis davon haben, was **Umgebungsvariablen** sind und wie man sie in Python verwendet.
Sie können auch mehr darüber in der [Wikipedia zu Umgebungsvariablen](https://en.wikipedia.org/wiki/Environment_variable) lesen.
In vielen Fällen ist es nicht sehr offensichtlich, wie Umgebungsvariablen nützlich und sofort anwendbar sein könnten. Aber sie tauchen immer wieder in vielen verschiedenen Szenarien auf, wenn Sie entwickeln, deshalb ist es gut, darüber Bescheid zu wissen.
Zum Beispiel werden Sie diese Informationen im nächsten Abschnitt über [Virtuelle Umgebungen](virtual-environments.md) benötigen.

128
docs/de/docs/fastapi-cli.md Normal file
View File

@ -0,0 +1,128 @@
# FastAPI CLI { #fastapi-cli }
**FastAPI <abbr title="command line interface - Kommandozeileninterface">CLI</abbr>** ist ein Kommandozeilenprogramm, mit dem Sie Ihre FastAPI-App bereitstellen, Ihr FastAPI-Projekt verwalten und mehr.
Wenn Sie FastAPI installieren (z. B. mit `pip install "fastapi[standard]"`), erhalten Sie ein Kommandozeilenprogramm, das Sie im Terminal ausführen können.
Um Ihre FastAPI-App für die Entwicklung auszuführen, können Sie den Befehl `fastapi dev` verwenden:
<div class="termy">
```console
$ <font color="#4E9A06">fastapi</font> dev
<span style="background-color:#009485"><font color="#D3D7CF"> FastAPI </font></span> Starting development server 🚀
Searching for package file structure from directories with
<font color="#3465A4">__init__.py</font> files
Importing from <font color="#75507B">/home/user/code/</font><font color="#AD7FA8">awesomeapp</font>
<span style="background-color:#007166"><font color="#D3D7CF"> module </font></span> 🐍 main.py
<span style="background-color:#007166"><font color="#D3D7CF"> code </font></span> Importing the FastAPI app object from the module with the
following code:
<u style="text-decoration-style:solid">from </u><u style="text-decoration-style:solid"><b>main</b></u><u style="text-decoration-style:solid"> import </u><u style="text-decoration-style:solid"><b>app</b></u>
<span style="background-color:#007166"><font color="#D3D7CF"> app </font></span> Using import string: <font color="#3465A4">main:app</font>
<span style="background-color:#007166"><font color="#D3D7CF"> server </font></span> Server started at <font color="#729FCF"><u style="text-decoration-style:solid">http://127.0.0.1:8000</u></font>
<span style="background-color:#007166"><font color="#D3D7CF"> server </font></span> Documentation at <font color="#729FCF"><u style="text-decoration-style:solid">http://127.0.0.1:8000/docs</u></font>
<span style="background-color:#007166"><font color="#D3D7CF"> tip </font></span> Running in development mode, for production use:
<b>fastapi run</b>
Logs:
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Will watch for changes in these directories:
<b>[</b><font color="#4E9A06">&apos;/home/user/code/awesomeapp&apos;</font><b>]</b>
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Uvicorn running on <font color="#729FCF"><u style="text-decoration-style:solid">http://127.0.0.1:8000</u></font> <b>(</b>Press CTRL+C to
quit<b>)</b>
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Started reloader process <b>[</b><font color="#34E2E2"><b>383138</b></font><b>]</b> using WatchFiles
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Started server process <b>[</b><font color="#34E2E2"><b>383153</b></font><b>]</b>
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Waiting for application startup.
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Application startup complete.
```
</div>
/// tip | Tipp
Für die Produktion würden Sie statt `fastapi dev` `fastapi run` verwenden. 🚀
///
Intern verwendet das **FastAPI CLI** [Uvicorn](https://www.uvicorn.dev), einen leistungsstarken, produktionsreifen, ASGI-Server. 😎
Das `fastapi`-CLI versucht automatisch, die auszuführende FastAPI-App zu erkennen, und geht davon aus, dass es sich um ein Objekt namens `app` in einer Datei `main.py` handelt (oder ein paar weitere Varianten).
Sie können aber auch explizit konfigurieren, welche App verwendet werden soll.
## Den App-`entrypoint` in `pyproject.toml` konfigurieren { #configure-the-app-entrypoint-in-pyproject-toml }
Sie können in einer `pyproject.toml`-Datei konfigurieren, wo sich Ihre App befindet, etwa so:
```toml
[tool.fastapi]
entrypoint = "main:app"
```
Dieser `entrypoint` teilt dem Befehl `fastapi` mit, dass die App so importiert werden soll:
```python
from main import app
```
Wenn Ihr Code so strukturiert wäre:
```
.
├── backend
│   ├── main.py
│   ├── __init__.py
```
Dann würden Sie den `entrypoint` wie folgt setzen:
```toml
[tool.fastapi]
entrypoint = "backend.main:app"
```
was gleichbedeutend wäre mit:
```python
from backend.main import app
```
### `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:
```console
$ fastapi dev main.py
```
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.
## `fastapi dev` { #fastapi-dev }
Das Ausführen von `fastapi dev` startet den Entwicklermodus.
Standardmäßig ist **Autoreload** aktiviert, das den Server automatisch neu lädt, wenn Sie Änderungen an Ihrem Code vornehmen. Dies ist ressourcenintensiv und könnte weniger stabil sein als wenn es deaktiviert ist. Sie sollten es nur für die Entwicklung verwenden. Es horcht auch auf der IP-Adresse `127.0.0.1`, die die IP für Ihre Maschine ist, um nur mit sich selbst zu kommunizieren (`localhost`).
## `fastapi run` { #fastapi-run }
Das Ausführen von `fastapi run` startet FastAPI im Produktionsmodus.
Standardmäßig ist **Autoreload** deaktiviert. Es horcht auch auf der IP-Adresse `0.0.0.0`, was alle verfügbaren IP-Adressen bedeutet, so wird es öffentlich zugänglich für jeden, der mit der Maschine kommunizieren kann. So würden Sie es normalerweise in der Produktion ausführen, beispielsweise in einem Container.
In den meisten Fällen würden (und sollten) Sie einen „Terminierungsproxy“ haben, der HTTPS für Sie verwaltet. Dies hängt davon ab, wie Sie Ihre Anwendung deployen. Ihr Anbieter könnte dies für Sie erledigen, oder Sie müssen es selbst einrichten.
/// tip | Tipp
Sie können mehr darüber in der [Deployment-Dokumentation](deployment/index.md) erfahren.
///

View File

@ -1,58 +1,55 @@
# Merkmale
# Merkmale { #features }
## FastAPI Merkmale
## FastAPI Merkmale { #fastapi-features }
**FastAPI** ermöglicht Ihnen folgendes:
**FastAPI** ermöglicht Ihnen Folgendes:
### Basiert auf offenen Standards
### Basiert auf offenen Standards { #based-on-open-standards }
* <a href="https://github.com/OAI/OpenAPI-Specification" class="external-link" target="_blank"><strong>OpenAPI</strong></a> für API-Erstellung, zusammen mit Deklarationen von <abbr title="auch genannt: Endpunkte, Routen">Pfad</abbr> <abbr title="gemeint sind: HTTP-Methoden, wie POST, GET, PUT, DELETE">Operationen</abbr>, Parameter, Nachrichtenrumpf-Anfragen (englisch: body request), Sicherheit, etc.
* Automatische Dokumentation der Datenentitäten mit dem <a href="https://json-schema.org/" class="external-link" target="_blank"><strong>JSON Schema</strong></a> (OpenAPI basiert selber auf dem JSON Schema).
* Entworfen auf Grundlage dieser Standards nach einer sorgfältigen Studie, statt einer nachträglichen Schicht über diesen Standards.
* Dies ermöglicht automatische **Quellcode-Generierung auf Benutzerebene** in vielen Sprachen.
* [**OpenAPI**](https://github.com/OAI/OpenAPI-Specification) für die Erstellung von APIs, inklusive Deklarationen von <dfn title="auch bekannt als: Endpunkte, Routen">Pfad</dfn>-<dfn title="auch bekannt als HTTP-Methoden, wie POST, GET, PUT, DELETE">Operationen</dfn>, Parametern, <abbr title="Requestbody">Requestbodys</abbr>, Sicherheit, usw.
* Automatische Dokumentation der Datenmodelle mit [**JSON Schema**](https://json-schema.org/) (da OpenAPI selbst auf JSON Schema basiert).
* Um diese Standards herum entworfen, nach sorgfältigem Studium. Statt einer nachträglichen Schicht darüber.
* Dies ermöglicht auch automatische **Client-Code-Generierung** in vielen Sprachen.
### Automatische Dokumentation
### Automatische Dokumentation { #automatic-docs }
Mit einer interaktiven API-Dokumentation und explorativen webbasierten Benutzerschnittstellen. Da FastAPI auf OpenAPI basiert, gibt es hierzu mehrere Optionen, wobei zwei standardmäßig vorhanden sind.
Interaktive API-Dokumentation und erkundbare Web-Benutzeroberflächen. Da das Framework auf OpenAPI basiert, gibt es mehrere Optionen, zwei sind standardmäßig vorhanden.
* <a href="https://github.com/swagger-api/swagger-ui" class="external-link" target="_blank"><strong>Swagger UI</strong></a>, bietet interaktive Exploration: testen und rufen Sie ihre API direkt vom Webbrowser auf.
* [**Swagger UI**](https://github.com/swagger-api/swagger-ui), bietet interaktive Erkundung, testen und rufen Sie Ihre API direkt im Webbrowser auf.
![Swagger UI Interaktion](https://fastapi.tiangolo.com/img/index/index-03-swagger-02.png)
* Alternative API-Dokumentation mit <a href="https://github.com/Rebilly/ReDoc" class="external-link" target="_blank"><strong>ReDoc</strong></a>.
* Alternative API-Dokumentation mit [**ReDoc**](https://github.com/Rebilly/ReDoc).
![ReDoc](https://fastapi.tiangolo.com/img/index/index-06-redoc-02.png)
### Nur modernes Python
### Nur modernes Python { #just-modern-python }
Alles basiert auf **Python 3.6 Typ**-Deklarationen (dank Pydantic). Es muss keine neue Syntax gelernt werden, nur standardisiertes modernes Python.
Alles basiert auf Standard-**Python-Typ**deklarationen (dank Pydantic). Es muss keine neue Syntax gelernt werden, nur standardisiertes modernes Python.
Wenn Sie eine zweiminütige Auffrischung benötigen, wie man Python-Typen verwendet (auch wenn Sie FastAPI nicht benutzen), schauen Sie sich das kurze Tutorial an: [Einführung in Python-Typen](python-types.md).
Wenn Sie eine kurze, zweiminütige, Auffrischung in der Benutzung von Python Typ-Deklarationen benötigen (auch wenn Sie FastAPI nicht nutzen), schauen Sie sich diese kurze Einführung an (Englisch): Python Types{.internal-link target=_blank}.
Sie schreiben Standard-Python mit Typ-Deklarationen:
Sie schreiben Standard-Python mit Typen:
```Python
from typing import List, Dict
from datetime import date
from pydantic import BaseModel
# Deklariere eine Variable als str
# und bekomme Editor-Unterstütung innerhalb der Funktion
# Deklarieren Sie eine Variable als ein str
# und bekommen Sie Editor-Unterstützung innerhalb der Funktion
def main(user_id: str):
return user_id
# Ein Pydantic model
# Ein Pydantic-Modell
class User(BaseModel):
id: int
name: str
joined: date
```
Dies kann nun wiefolgt benutzt werden:
Das kann nun wie folgt verwendet werden:
```Python
my_user: User = User(id=3, name="John Doe", joined="2018-07-19")
@ -66,138 +63,139 @@ second_user_data = {
my_second_user: User = User(**second_user_data)
```
!!! info
`**second_user_data` bedeutet:
/// info | Info
Übergebe die Schlüssel und die zugehörigen Werte des `second_user_data` Datenwörterbuches direkt als Schlüssel-Wert Argumente, äquivalent zu: `User(id=4, name="Mary", joined="2018-11-30")`
`**second_user_data` bedeutet:
### Editor Unterstützung
Nimm die Schlüssel-Wert-Paare des `second_user_data` <abbr title="Dictionary Zuordnungstabelle: In anderen Sprachen auch Hash, Map, Objekt, Assoziatives Array genannt">Dicts</abbr> und übergebe sie direkt als Schlüsselwort-Argumente. Äquivalent zu: `User(id=4, name="Mary", joined="2018-11-30")`
FastAPI wurde so entworfen, dass es einfach und intuitiv zu benutzen ist; alle Entscheidungen wurden auf mehreren Editoren getestet (sogar vor der eigentlichen Implementierung), um so eine best mögliche Entwicklererfahrung zu gewährleisten.
///
In der letzen Python Entwickler Umfrage stellte sich heraus, dass <a href="https://www.jetbrains.com/research/python-developers-survey-2017/#tools-and-features" class="external-link" target="_blank">die meist genutzte Funktion die "Autovervollständigung" ist</a>.
### Editor Unterstützung { #editor-support }
Die gesamte Struktur von **FastAPI** soll dem gerecht werden. Autovervollständigung funktioniert überall.
Das ganze Framework wurde so entworfen, dass es einfach und intuitiv zu benutzen ist; alle Entscheidungen wurden auf mehreren Editoren getestet, sogar vor der Implementierung, um die bestmögliche Entwicklererfahrung zu gewährleisten.
Sie müssen selten in die Dokumentation schauen.
In den Python-Entwickler-Umfragen wird klar, [dass die meist genutzte Funktion die „Autovervollständigung“ ist](https://www.jetbrains.com/research/python-developers-survey-2017/#tools-and-features).
So kann ihr Editor Sie unterstützen:
Das gesamte **FastAPI**-Framework ist darauf ausgelegt, das zu erfüllen. Autovervollständigung funktioniert überall.
* in <a href="https://code.visualstudio.com/" class="external-link" target="_blank">Visual Studio Code</a>:
Sie werden selten noch mal in der Dokumentation nachschauen müssen.
![editor support](https://fastapi.tiangolo.com/img/vscode-completion.png)
So kann Ihr Editor Sie unterstützen:
* in <a href="https://www.jetbrains.com/pycharm/" class="external-link" target="_blank">PyCharm</a>:
* in [Visual Studio Code](https://code.visualstudio.com/):
![editor support](https://fastapi.tiangolo.com/img/pycharm-completion.png)
![Editor Unterstützung](https://fastapi.tiangolo.com/img/vscode-completion.png)
Sie bekommen Autovervollständigung an Stellen, an denen Sie dies vorher nicht für möglich gehalten hätten. Zum Beispiel der `price` Schlüssel aus einem JSON Datensatz (dieser könnte auch verschachtelt sein) aus einer Anfrage.
* in [PyCharm](https://www.jetbrains.com/pycharm/):
Hierdurch werden Sie nie wieder einen falschen Schlüsselnamen benutzen und sparen sich lästiges Suchen in der Dokumentation, um beispielsweise herauszufinden ob Sie `username` oder `user_name` als Schlüssel verwenden.
![Editor Unterstützung](https://fastapi.tiangolo.com/img/pycharm-completion.png)
### Kompakt
Sie bekommen sogar Autovervollständigung an Stellen, an denen Sie dies vorher nicht für möglich gehalten hätten. Zum Beispiel der `price` Schlüssel in einem JSON Datensatz (dieser könnte auch verschachtelt sein), der aus einem Request kommt.
FastAPI nutzt für alles sensible **Standard-Einstellungen**, welche optional überall konfiguriert werden können. Alle Parameter können ganz genau an Ihre Bedürfnisse angepasst werden, sodass sie genau die API definieren können, die sie brauchen.
Nie wieder falsche Schlüsselnamen tippen, Hin und Herhüpfen zwischen der Dokumentation, Hoch- und Runterscrollen, um herauszufinden, ob es `username` oder `user_name` war.
Aber standardmäßig, **"funktioniert einfach"** alles.
### Kompakt { #short }
### Validierung
Es gibt für alles sensible **Defaultwerte**, mit optionaler Konfiguration überall. Alle Parameter können feinjustiert werden, damit sie tun, was Sie benötigen, und die API definieren, die Sie brauchen.
* Validierung für die meisten (oder alle?) Python **Datentypen**, hierzu gehören:
Aber standardmäßig **„funktioniert einfach alles“**.
### Validierung { #validation }
* Validierung für die meisten (oder alle?) Python-**Datentypen**, hierzu gehören:
* JSON Objekte (`dict`).
* JSON Listen (`list`), die den Typ ihrer Elemente definieren.
* Zeichenketten (`str`), mit definierter minimaler und maximaler Länge.
* Zahlen (`int`, `float`) mit minimaler und maximaler Größe, usw.
* Strings (`str`) mit definierter minimaler und maximaler Länge.
* Zahlen (`int`, `float`) mit Mindest- und Maximalwerten, usw.
* Validierung für ungewöhnliche Typen, wie:
* Validierung für mehr exotische Typen, wie:
* URL.
* Email.
* E-Mail.
* UUID.
* ... und andere.
Die gesamte Validierung übernimmt das etablierte und robuste **Pydantic**.
Die gesamte Validierung übernimmt das gut etablierte und robuste **Pydantic**.
### Sicherheit und Authentifizierung
### Sicherheit und Authentifizierung { #security-and-authentication }
Integrierte Sicherheit und Authentifizierung. Ohne Kompromisse bei Datenbanken oder Datenmodellen.
Sicherheit und Authentifizierung sind integriert. Ohne Kompromisse bei Datenbanken oder Datenmodellen.
Unterstützt werden alle von OpenAPI definierten Sicherheitsschemata, hierzu gehören:
Alle in OpenAPI definierten Sicherheitsschemas, inklusive:
* HTTP Basis Authentifizierung.
* **OAuth2** (auch mit **JWT Zugriffstokens**). Schauen Sie sich hierzu dieses Tutorial an: [OAuth2 mit JWT](tutorial/security/oauth2-jwt.md){.internal-link target=_blank}.
* HTTP Basic.
* **OAuth2** (auch mit **JWT Tokens**). Siehe dazu das Tutorial zu [OAuth2 mit JWT](tutorial/security/oauth2-jwt.md).
* API Schlüssel in:
* Kopfzeile (HTTP Header).
* Anfrageparametern.
* Cookies, etc.
* Headern.
* Query-Parametern.
* Cookies, usw.
Zusätzlich gibt es alle Sicherheitsfunktionen von Starlette (auch **session cookies**).
Zusätzlich alle Sicherheitsfunktionen von Starlette (inklusive **Session Cookies**).
Alles wurde als wiederverwendbare Werkzeuge und Komponenten geschaffen, die einfach in ihre Systeme, Datenablagen, relationale und nicht-relationale Datenbanken, ..., integriert werden können.
Alles als wiederverwendbare Tools und Komponenten gebaut, die einfach in Ihre Systeme, Datenspeicher, relationale und nicht-relationale Datenbanken, usw., integriert werden können.
### Einbringen von Abhängigkeiten (meist: Dependency Injection)
### Dependency Injection { #dependency-injection }
FastAPI enthält ein extrem einfaches, aber extrem mächtiges <abbr title='oft verwendet im Zusammenhang von: Komponenten, Resourcen, Diensten, Dienstanbieter'><strong>Dependency Injection</strong></abbr> System.
FastAPI enthält ein extrem einfach zu verwendendes, aber extrem mächtiges <dfn title='auch bekannt als: "Komponenten", "Ressourcen", "Dienste", "Dienstanbieter"'><strong>Dependency Injection</strong></dfn> System.
* Selbst Abhängigkeiten können Abhängigkeiten haben, woraus eine Hierachie oder ein **"Graph" von Abhängigkeiten** entsteht.
* **Automatische Umsetzung** durch FastAPI.
* Alle abhängigen Komponenten könnten Daten von Anfragen, **Erweiterungen der Pfadoperations-**Einschränkungen und der automatisierten Dokumentation benötigen.
* **Automatische Validierung** selbst für *Pfadoperationen*-Parameter, die in den Abhängigkeiten definiert wurden.
* Unterstützt komplexe Benutzerauthentifizierungssysteme, **Datenbankverbindungen**, usw.
* **Keine Kompromisse** bei Datenbanken, Eingabemasken, usw. Sondern einfache Integration von allen.
* Selbst Abhängigkeiten können Abhängigkeiten haben, woraus eine Hierarchie oder ein **„Graph“ von Abhängigkeiten** entsteht.
* Alles **automatisch gehandhabt** durch das Framework.
* Alle Abhängigkeiten können Daten von Requests anfordern und das Verhalten von **Pfadoperationen** und der automatisierten Dokumentation **modifizieren**.
* **Automatische Validierung** selbst für solche Parameter von *Pfadoperationen*, welche in Abhängigkeiten definiert sind.
* Unterstützung für komplexe Authentifizierungssysteme, **Datenbankverbindungen**, usw.
* **Keine Kompromisse** bei Datenbanken, Frontends, usw., sondern einfache Integration mit allen.
### Unbegrenzte Erweiterungen
### Unbegrenzte Erweiterungen { #unlimited-plug-ins }
Oder mit anderen Worten, sie werden nicht benötigt. Importieren und nutzen Sie Quellcode nach Bedarf.
Oder mit anderen Worten, sie werden nicht benötigt. Importieren und nutzen Sie den Code, den Sie brauchen.
Jede Integration wurde so entworfen, dass sie einfach zu nutzen ist (mit Abhängigkeiten), sodass Sie eine Erweiterung für Ihre Anwendung mit nur zwei Zeilen an Quellcode implementieren können. Hierbei nutzen Sie die selbe Struktur und Syntax, wie bei Pfadoperationen.
Jede Integration wurde so entworfen, dass sie so einfach zu nutzen ist (mit Abhängigkeiten), dass Sie eine Erweiterung für Ihre Anwendung mit nur zwei Zeilen Code erstellen können. Hierbei nutzen Sie die gleiche Struktur und Syntax, wie bei *Pfadoperationen*.
### Getestet
### Getestet { #tested }
* 100% <abbr title="Die Anzahl an Code, die automatisch getestet wird">Testabdeckung</abbr>.
* 100% <abbr title="Python Typ Annotationen, mit dennen Ihr Editor und andere exteren Werkezuge Sie besser unterstützen können">Typen annotiert</abbr>.
* 100 % <dfn title="Der Prozentsatz an Code, der automatisch getestet wird">Testabdeckung</dfn>.
* 100 % <dfn title="Python-Typannotationen, mit denen Ihr Editor und andere externe Werkzeuge Sie besser unterstützen können">Typen annotiert</dfn>.
* Verwendet in Produktionsanwendungen.
## Starlette's Merkmale
## Starlette Merkmale { #starlette-features }
**FastAPI** ist vollkommen kompatibel (und basiert auf) <a href="https://www.starlette.io/" class="external-link" target="_blank"><strong>Starlette</strong></a>. Das bedeutet, auch ihr eigener Starlette Quellcode funktioniert.
**FastAPI** ist vollkommen kompatibel (und basiert auf) [**Starlette**](https://www.starlette.dev/). Das bedeutet, wenn Sie eigenen Starlette Quellcode haben, funktioniert der.
`FastAPI` ist eigentlich eine Unterklasse von `Starlette`. Wenn Sie also bereits Starlette kennen oder benutzen, können Sie das meiste Ihres Wissens direkt anwenden.
`FastAPI` ist tatsächlich eine Unterklasse von `Starlette`. Wenn Sie also bereits Starlette kennen oder benutzen, das meiste funktioniert genau so.
Mit **FastAPI** bekommen Sie viele von **Starlette**'s Funktionen (da FastAPI nur Starlette auf Steroiden ist):
Mit **FastAPI** bekommen Sie alles von **Starlette** (da FastAPI nur Starlette auf Steroiden ist):
* Stark beeindruckende Performanz. Es ist <a href="https://github.com/encode/starlette#performance" class="external-link" target="_blank">eines der schnellsten Python Frameworks, auf Augenhöhe mit **NodeJS** und **Go**</a>.
* Schwer beeindruckende Performanz. Es ist [eines der schnellsten Python-Frameworks, auf Augenhöhe mit **NodeJS** und **Go**](https://github.com/encode/starlette#performance).
* **WebSocket**-Unterstützung.
* Hintergrundaufgaben im selben Prozess.
* Ereignisse für das Starten und Herunterfahren.
* Hintergrundtasks im selben Prozess.
* Startup- und Shutdown-Events.
* Testclient basierend auf HTTPX.
* **CORS**, GZip, statische Dateien, Antwortfluss.
* **Sitzungs und Cookie** Unterstützung.
* 100% Testabdeckung.
* 100% Typen annotiert.
* **CORS**, GZip, statische Dateien, Responses streamen.
* **Sitzungs- und Cookie**-Unterstützung.
* 100 % Testabdeckung.
* 100 % Typen annotierte Codebasis.
## Pydantic's Merkmale
## Pydantic Merkmale { #pydantic-features }
**FastAPI** ist vollkommen kompatibel (und basiert auf) <a href="https://pydantic-docs.helpmanual.io" class="external-link" target="_blank"><strong>Pydantic</strong></a>. Das bedeutet, auch jeder zusätzliche Pydantic Quellcode funktioniert.
**FastAPI** ist vollkommen kompatibel (und basiert auf) [**Pydantic**](https://docs.pydantic.dev/). Das bedeutet, wenn Sie eigenen Pydantic Quellcode haben, funktioniert der.
Verfügbar sind ebenso externe auf Pydantic basierende Bibliotheken, wie <abbr title="Object-Relational Mapper (Abbildung von Objekten auf relationale Strukturen)">ORM</abbr>s, <abbr title="Object-Document Mapper (Abbildung von Objekten auf nicht-relationale Strukturen)">ODM</abbr>s für Datenbanken.
Inklusive externer Bibliotheken, die auf Pydantic basieren, wie <abbr title="Object-Relational Mapper - Objektrelationaler Mapper">ORM</abbr>s, <abbr title="Object-Document Mapper - Objekt-Dokument-Mapper">ODM</abbr>s für Datenbanken.
Daher können Sie in vielen Fällen das Objekt einer Anfrage **direkt zur Datenbank** schicken, weil alles automatisch validiert wird.
Daher können Sie in vielen Fällen das Objekt eines Requests **direkt zur Datenbank** schicken, weil alles automatisch validiert wird.
Das selbe gilt auch für die andere Richtung: Sie können jedes Objekt aus der Datenbank **direkt zum Klienten** schicken.
Das gleiche gilt auch für die andere Richtung: Sie können in vielen Fällen das Objekt aus der Datenbank **direkt zum Client** senden.
Mit **FastAPI** bekommen Sie alle Funktionen von **Pydantic** (da FastAPI für die gesamte Datenverarbeitung Pydantic nutzt):
* **Kein Kopfzerbrechen**:
* Sie müssen keine neue Schemadefinitionssprache lernen.
* Wenn Sie mit Python's Typisierung arbeiten können, können Sie auch mit Pydantic arbeiten.
* Gutes Zusammenspiel mit Ihrer/Ihrem **<abbr title="Integrierten Entwicklungsumgebung, ähnlich zu (Quellcode-)Editor">IDE</abbr>/<abbr title="Ein Programm, was Fehler im Quellcode sucht">linter</abbr>/Gehirn**:
* Weil Datenstrukturen von Pydantic einfach nur Instanzen ihrer definierten Klassen sind, sollten Autovervollständigung, Linting, mypy und ihre Intuition einwandfrei funktionieren.
* **Schnell**:
* In <a href="https://pydantic-docs.helpmanual.io/benchmarks/" class="external-link" target="_blank">Vergleichen</a> ist Pydantic schneller als jede andere getestete Bibliothek.
* Keine neue Schemadefinition-Mikrosprache zu lernen.
* Wenn Sie Pythons Typen kennen, wissen Sie, wie man Pydantic verwendet.
* Gutes Zusammenspiel mit Ihrer/Ihrem **<abbr title="Integrated Development Environment - Integrierte Entwicklungsumgebung: Ähnlich einem Code-Editor">IDE</abbr>/<dfn title="Ein Programm, das Fehler im Quellcode sucht">Linter</dfn>/Gehirn**:
* Weil Pydantics Datenstrukturen einfach nur Instanzen ihrer definierten Klassen sind; Autovervollständigung, Linting, mypy und Ihre Intuition sollten alle einwandfrei mit Ihren validierten Daten funktionieren.
* Validierung von **komplexen Strukturen**:
* Benutzung von hierachischen Pydantic Schemata, Python `typing`s `List` und `Dict`, etc.
* Validierungen erlauben eine klare und einfache Datenschemadefinition, überprüft und dokumentiert als JSON Schema.
* Sie können stark **verschachtelte JSON** Objekte haben und diese sind trotzdem validiert und annotiert.
* Benutzung von hierarchischen Pydantic-Modellen, Python-`typing`s `List` und `Dict`, etc.
* Die Validierer erlauben es, komplexe Datenschemen klar und einfach zu definieren, überprüft und dokumentiert als JSON Schema.
* Sie können tief **verschachtelte JSON** Objekte haben, die alle validiert und annotiert sind.
* **Erweiterbar**:
* Pydantic erlaubt die Definition von eigenen Datentypen oder sie können die Validierung mit einer `validator` dekorierten Methode erweitern.
* 100% Testabdeckung.
* Pydantic erlaubt die Definition von eigenen Datentypen oder sie können die Validierung mit einer `validator`-dekorierten Methode im Modell erweitern.
* 100 % Testabdeckung.

Some files were not shown because too many files have changed in this diff Show More