Browse Source

Merge remote-tracking branch 'upstream/master' into translate-de-update-outdated-65faf0c0

pull/15527/head
Yurii Motov 2 weeks ago
parent
commit
6c4232a0d9
  1. 2
      .github/workflows/add-to-project.yml
  2. 52
      .github/workflows/guard-dependencies.yml
  3. 2
      .github/workflows/labeler.yml
  4. 1
      README.md
  5. 3
      docs/en/data/sponsors.yml
  6. 1
      docs/en/data/sponsors_badge.yml
  7. 8
      docs/en/docs/_llm-test.md
  8. 4
      docs/en/docs/advanced/additional-responses.md
  9. 2
      docs/en/docs/advanced/advanced-dependencies.md
  10. 4
      docs/en/docs/advanced/custom-response.md
  11. 2
      docs/en/docs/advanced/dataclasses.md
  12. 4
      docs/en/docs/advanced/events.md
  13. 4
      docs/en/docs/advanced/openapi-webhooks.md
  14. 2
      docs/en/docs/advanced/response-directly.md
  15. 4
      docs/en/docs/advanced/security/oauth2-scopes.md
  16. 4
      docs/en/docs/advanced/stream-data.md
  17. 2
      docs/en/docs/advanced/strict-content-type.md
  18. 2
      docs/en/docs/advanced/websockets.md
  19. 2
      docs/en/docs/advanced/wsgi.md
  20. 44
      docs/en/docs/alternatives.md
  21. 4
      docs/en/docs/async.md
  22. 4
      docs/en/docs/deployment/docker.md
  23. 2
      docs/en/docs/deployment/server-workers.md
  24. 2
      docs/en/docs/external-links.md
  25. 2
      docs/en/docs/features.md
  26. 5
      docs/en/docs/help-fastapi.md
  27. 2
      docs/en/docs/how-to/extending-openapi.md
  28. 2
      docs/en/docs/how-to/separate-openapi-schemas.md
  29. BIN
      docs/en/docs/img/sponsors/talordata.png
  30. 8
      docs/en/docs/index.md
  31. 6
      docs/en/docs/python-types.md
  32. 14
      docs/en/docs/release-notes.md
  33. 12
      docs/en/docs/tutorial/bigger-applications.md
  34. 2
      docs/en/docs/tutorial/body-multiple-params.md
  35. 4
      docs/en/docs/tutorial/body-nested-models.md
  36. 2
      docs/en/docs/tutorial/body.md
  37. 2
      docs/en/docs/tutorial/cookie-param-models.md
  38. 4
      docs/en/docs/tutorial/cookie-params.md
  39. 2
      docs/en/docs/tutorial/debugging.md
  40. 2
      docs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md
  41. 2
      docs/en/docs/tutorial/dependencies/dependencies-with-yield.md
  42. 4
      docs/en/docs/tutorial/dependencies/index.md
  43. 2
      docs/en/docs/tutorial/dependencies/sub-dependencies.md
  44. 4
      docs/en/docs/tutorial/first-steps.md
  45. 2
      docs/en/docs/tutorial/header-params.md
  46. 2
      docs/en/docs/tutorial/metadata.md
  47. 4
      docs/en/docs/tutorial/path-operation-configuration.md
  48. 4
      docs/en/docs/tutorial/path-params-numeric-validations.md
  49. 8
      docs/en/docs/tutorial/path-params.md
  50. 4
      docs/en/docs/tutorial/query-params-str-validations.md
  51. 2
      docs/en/docs/tutorial/query-params.md
  52. 4
      docs/en/docs/tutorial/request-files.md
  53. 2
      docs/en/docs/tutorial/request-form-models.md
  54. 2
      docs/en/docs/tutorial/request-forms-and-files.md
  55. 4
      docs/en/docs/tutorial/request-forms.md
  56. 4
      docs/en/docs/tutorial/response-model.md
  57. 2
      docs/en/docs/tutorial/response-status-code.md
  58. 6
      docs/en/docs/tutorial/schema-extra-example.md
  59. 10
      docs/en/docs/tutorial/security/first-steps.md
  60. 2
      docs/en/docs/tutorial/security/get-current-user.md
  61. 4
      docs/en/docs/tutorial/security/oauth2-jwt.md
  62. 8
      docs/en/docs/tutorial/security/simple-oauth2.md
  63. 2
      docs/en/docs/tutorial/server-sent-events.md
  64. 4
      docs/en/docs/tutorial/stream-json-lines.md
  65. 4
      docs/en/docs/tutorial/testing.md
  66. 4
      docs/en/docs/virtual-environments.md
  67. 4
      docs/en/mkdocs.yml
  68. 1
      docs/es/docs/advanced/generate-clients.md
  69. 93
      docs/es/docs/index.md
  70. 4
      docs/es/docs/virtual-environments.md
  71. 1
      docs/fr/docs/advanced/generate-clients.md
  72. 89
      docs/fr/docs/index.md
  73. 2
      docs/fr/docs/virtual-environments.md
  74. 1
      docs/ko/docs/advanced/generate-clients.md
  75. 91
      docs/ko/docs/index.md
  76. 42
      docs/ko/docs/virtual-environments.md
  77. 1
      docs/ru/docs/advanced/generate-clients.md
  78. 85
      docs/ru/docs/index.md
  79. 2
      docs/ru/docs/virtual-environments.md
  80. 1
      docs/zh-hant/docs/advanced/generate-clients.md
  81. 83
      docs/zh-hant/docs/index.md
  82. 2
      docs/zh-hant/docs/virtual-environments.md
  83. 1
      docs/zh/docs/advanced/generate-clients.md
  84. 89
      docs/zh/docs/index.md
  85. 4
      docs/zh/docs/virtual-environments.md
  86. 1
      pyproject.toml

2
.github/workflows/add-to-project.yml

@ -14,7 +14,7 @@ jobs:
name: Add to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e # v1.0.2
- uses: actions/add-to-project@5afcf98fcd03f1c2f92c3c83f58ae24323cc57fd # v2.0.0
with:
project-url: https://github.com/orgs/fastapi/projects/2
github-token: ${{ secrets.PROJECTS_TOKEN }} # zizmor: ignore[secrets-outside-env]

52
.github/workflows/guard-dependencies.yml

@ -0,0 +1,52 @@
name: Guard Dependencies
on:
pull_request_target: # zizmor: ignore[dangerous-triggers] -- This workflow only reads context.payload metadata, never checks out PR code
branches: [master]
paths:
- pyproject.toml
- uv.lock
permissions:
contents: read
issues: write
pull-requests: write
jobs:
check-author:
runs-on: ubuntu-latest
steps:
- name: Check if author is org member or allowed bot
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const pr = context.payload.pull_request;
const author = pr.user.login;
const assoc = pr.author_association;
const botAllowlist = new Set(['dependabot[bot]']);
const orgAuthorAssociations = new Set(['MEMBER', 'OWNER']);
const allowed =
botAllowlist.has(author) ||
(assoc != null && orgAuthorAssociations.has(assoc));
if (!allowed) {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
body: `This PR modifies dependency files (\`pyproject.toml\` or \`uv.lock\`), which is restricted to members of the **${context.repo.owner}** organization on GitHub.\n\nIf you need a dependency change, please [open a discussion](https://github.com/${context.repo.owner}/${context.repo.repo}/discussions/new) describing what you need and why.\n\nClosing this PR automatically.`
});
await github.rest.pulls.update({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
state: 'closed'
});
core.setFailed('Dependency changes are restricted to organization members.');
} else {
console.log(`Author ${author} (author_association=${assoc}) is allowed to make dependency changes.`);
}

2
.github/workflows/labeler.yml

@ -18,7 +18,7 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
- uses: actions/labeler@f27b608878404679385c85cfa523b85ccb86e213 # v6.1.0
if: ${{ github.event.action != 'labeled' && github.event.action != 'unlabeled' }}
- run: echo "Done adding labels"
# Run this after labeler applied labels

1
README.md

@ -70,6 +70,7 @@ The key features are:
<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>
<a href="https://talordata.com/?campaignid=oh5dVZ3Zc3YGiAI2&utm_source=fastapi&utm_term=fastapi" target="_blank" title="TalorData SERP API - Multi-Engine Search Results Data"><img src="https://fastapi.tiangolo.com/img/sponsors/talordata.png"></a>
<!-- /sponsors -->

3
docs/en/data/sponsors.yml

@ -52,6 +52,9 @@ silver:
- url: https://dribia.com/en/
title: Dribia - Data Science within your reach
img: https://fastapi.tiangolo.com/img/sponsors/dribia.png
- url: https://talordata.com/?campaignid=oh5dVZ3Zc3YGiAI2&utm_source=fastapi&utm_term=fastapi
title: TalorData SERP API - Multi-Engine Search Results Data
img: https://fastapi.tiangolo.com/img/sponsors/talordata.png
bronze:
- url: https://www.exoflare.com/open-source/?utm_source=FastAPI&utm_campaign=open_source
title: Biosecurity risk assessments made easy.

1
docs/en/data/sponsors_badge.yml

@ -48,3 +48,4 @@ logins:
- subtotal
- requestly
- greptileai
- talorelowen

8
docs/en/docs/_llm-test.md

@ -124,10 +124,6 @@ See section `### Content of code blocks` in the general prompt in `scripts/trans
//// tab | Test
/// info
Some text
///
/// note
Some text
///
@ -136,10 +132,6 @@ Some text
Some text
///
/// check
Some text
///
/// tip
Some text
///

4
docs/en/docs/advanced/additional-responses.md

@ -34,7 +34,7 @@ Keep in mind that you have to return the `JSONResponse` directly.
///
/// info
/// note
The `model` key is not part of OpenAPI.
@ -183,7 +183,7 @@ Notice that you have to return the image using a `FileResponse` directly.
///
/// info
/// note
Unless you specify a different media type explicitly in your `responses` parameter, FastAPI will assume the response has the same media type as the main response class (default `application/json`).

2
docs/en/docs/advanced/advanced-dependencies.md

@ -98,7 +98,7 @@ For example, if you had a database session in a dependency with `yield`, the `St
This behavior was reverted in 0.118.0, to make the exit code after `yield` be executed after the response is sent.
/// info
/// note
As you will see below, this is very similar to the behavior before version 0.106.0, but with several improvements and bug fixes for corner cases.

4
docs/en/docs/advanced/custom-response.md

@ -41,7 +41,7 @@ To return a response with HTML directly from **FastAPI**, use `HTMLResponse`.
{* ../../docs_src/custom_response/tutorial002_py310.py hl[2,7] *}
/// info
/// note
The parameter `response_class` will also be used to define the "media type" of the response.
@ -65,7 +65,7 @@ A `Response` returned directly by your *path operation function* won't be docume
///
/// info
/// note
Of course, the actual `Content-Type` header, status code, etc, will come from the `Response` object you returned.

2
docs/en/docs/advanced/dataclasses.md

@ -18,7 +18,7 @@ And of course, it supports the same:
This works the same way as with Pydantic models. And it is actually achieved in the same way underneath, using Pydantic.
/// info
/// note
Keep in mind that dataclasses can't do everything Pydantic models can do.

4
docs/en/docs/advanced/events.md

@ -120,7 +120,7 @@ To add a function that should be run when the application is shutting down, decl
Here, the `shutdown` event handler function will write a text line `"Application shutdown"` to a file `log.txt`.
/// info
/// note
In the `open()` function, the `mode="a"` means "append", so, the line will be added after whatever is on that file, without overwriting the previous contents.
@ -152,7 +152,7 @@ Just a technical detail for the curious nerds. 🤓
Underneath, in the ASGI technical specification, this is part of the [Lifespan Protocol](https://asgi.readthedocs.io/en/latest/specs/lifespan.html), and it defines events called `startup` and `shutdown`.
/// info
/// note
You can read more about the Starlette `lifespan` handlers in [Starlette's Lifespan' docs](https://www.starlette.dev/lifespan/).

4
docs/en/docs/advanced/openapi-webhooks.md

@ -22,7 +22,7 @@ With **FastAPI**, using OpenAPI, you can define the names of these webhooks, the
This can make it a lot easier for your users to **implement their APIs** to receive your **webhook** requests, they might even be able to autogenerate some of their own API code.
/// info
/// note
Webhooks are available in OpenAPI 3.1.0 and above, supported by FastAPI `0.99.0` and above.
@ -36,7 +36,7 @@ When you create a **FastAPI** application, there is a `webhooks` attribute that
The webhooks that you define will end up in the **OpenAPI** schema and the automatic **docs UI**.
/// info
/// note
The `app.webhooks` object is actually just an `APIRouter`, the same type you would use when structuring your app with multiple files.

2
docs/en/docs/advanced/response-directly.md

@ -18,7 +18,7 @@ You will normally have much better performance using a [Response Model](../tutor
You can return a `Response` or any sub-class of it.
/// info
/// note
`JSONResponse` itself is a sub-class of `Response`.

4
docs/en/docs/advanced/security/oauth2-scopes.md

@ -46,7 +46,7 @@ They are normally used to declare specific security permissions, for example:
* `instagram_basic` is used by Facebook / Instagram.
* `https://www.googleapis.com/auth/drive` is used by Google.
/// info
/// note
In OAuth2 a "scope" is just a string that declares a specific permission required.
@ -126,7 +126,7 @@ We are doing it here to demonstrate how **FastAPI** handles scopes declared at d
{* ../../docs_src/security/tutorial005_an_py310.py hl[5,141,172] *}
/// info | Technical Details
/// note | Technical Details
`Security` is actually a subclass of `Depends`, and it has just one extra parameter that we'll see later.

4
docs/en/docs/advanced/stream-data.md

@ -4,7 +4,7 @@ If you want to stream data that can be structured as JSON, you should [Stream JS
But if you want to **stream pure binary data** or strings, here's how you can do it.
/// info
/// note
Added in FastAPI 0.134.0.
@ -90,7 +90,7 @@ For example, they don't have an `await file.read()`, or `async for chunk in file
And in many cases, reading them would be a blocking operation (that could block the event loop), because they are read from disk or from the network.
/// info
/// note
The example above is actually an exception, because the `io.BytesIO` object is already in memory, so reading it won't block anything.

2
docs/en/docs/advanced/strict-content-type.md

@ -81,7 +81,7 @@ If you need to support clients that don't send a `Content-Type` header, you can
With this setting, requests without a `Content-Type` header will have their body parsed as JSON, which is the same behavior as older versions of FastAPI.
/// info
/// note
This behavior and configuration was added in FastAPI 0.132.0.

2
docs/en/docs/advanced/websockets.md

@ -111,7 +111,7 @@ They work the same way as for other FastAPI endpoints/*path operations*:
{* ../../docs_src/websockets_/tutorial002_an_py310.py hl[68:69,82] *}
/// info
/// note
As this is a WebSocket it doesn't really make sense to raise an `HTTPException`, instead we raise a `WebSocketException`.

2
docs/en/docs/advanced/wsgi.md

@ -6,7 +6,7 @@ For that, you can use the `WSGIMiddleware` and use it to wrap your WSGI applicat
## Using `WSGIMiddleware` { #using-wsgimiddleware }
/// info
/// note
This requires installing `a2wsgi` for example with `pip install a2wsgi`.

44
docs/en/docs/alternatives.md

@ -36,7 +36,7 @@ Django REST Framework was created by Tom Christie. The same creator of Starlette
///
/// check | Inspired **FastAPI** to
/// tip | Inspired **FastAPI** to
Have an automatic API documentation web user interface.
@ -56,7 +56,7 @@ This decoupling of parts, and being a "microframework" that could be extended to
Given the simplicity of Flask, it seemed like a good match for building APIs. The next thing to find was a "Django REST Framework" for Flask.
/// check | Inspired **FastAPI** to
/// tip | Inspired **FastAPI** to
Be a micro-framework. Making it easy to mix and match the tools and parts needed.
@ -98,7 +98,7 @@ def read_url():
See the similarities in `requests.get(...)` and `@app.get(...)`.
/// check | Inspired **FastAPI** to
/// tip | Inspired **FastAPI** to
* Have a simple and intuitive API.
* Use HTTP method names (operations) directly, in a straightforward and intuitive way.
@ -118,7 +118,7 @@ At some point, Swagger was given to the Linux Foundation, to be renamed OpenAPI.
That's why when talking about version 2.0 it's common to say "Swagger", and for version 3+ "OpenAPI".
/// check | Inspired **FastAPI** to
/// tip | Inspired **FastAPI** to
Adopt and use an open standard for API specifications, instead of a custom schema.
@ -147,7 +147,7 @@ These features are what Marshmallow was built to provide. It is a great library,
But it was created before there existed Python type hints. So, to define every <dfn title="the definition of how data should be formed">schema</dfn> you need to use specific utils and classes provided by Marshmallow.
/// check | Inspired **FastAPI** to
/// tip | Inspired **FastAPI** to
Use code to define "schemas" that provide data types and validation, automatically.
@ -163,13 +163,13 @@ It uses Marshmallow underneath to do the data validation. And it was created by
It's a great tool and I have used it a lot too, before having **FastAPI**.
/// info
/// note
Webargs was created by the same Marshmallow developers.
///
/// check | Inspired **FastAPI** to
/// tip | Inspired **FastAPI** to
Have automatic validation of incoming request data.
@ -193,13 +193,13 @@ But then, we have again the problem of having a micro-syntax, inside of a Python
The editor can't help much with that. And if we modify parameters or Marshmallow schemas and forget to also modify that YAML docstring, the generated schema would be obsolete.
/// info
/// note
APISpec was created by the same Marshmallow developers.
///
/// check | Inspired **FastAPI** to
/// tip | Inspired **FastAPI** to
Support the open standard for APIs, OpenAPI.
@ -225,13 +225,13 @@ Using it led to the creation of several Flask full-stack generators. These are t
And these same full-stack generators were the base of the [**FastAPI** Project Generators](project-generation.md).
/// info
/// note
Flask-apispec was created by the same Marshmallow developers.
///
/// check | Inspired **FastAPI** to
/// tip | Inspired **FastAPI** to
Generate the OpenAPI schema automatically, from the same code that defines serialization and validation.
@ -251,7 +251,7 @@ But as TypeScript data is not preserved after compilation to JavaScript, it cann
It can't handle nested models very well. So, if the JSON body in the request is a JSON object that has inner fields that in turn are nested JSON objects, it cannot be properly documented and validated.
/// check | Inspired **FastAPI** to
/// tip | Inspired **FastAPI** to
Use Python types to have great editor support.
@ -271,7 +271,7 @@ It clearly inspired Uvicorn and Starlette, that are currently faster than Sanic
///
/// check | Inspired **FastAPI** to
/// tip | Inspired **FastAPI** to
Find a way to have a crazy performance.
@ -287,7 +287,7 @@ It is designed to have functions that receive two parameters, one "request" and
So, data validation, serialization, and documentation, have to be done in code, not automatically. Or they have to be implemented as a framework on top of Falcon, like Hug. This same distinction happens in other frameworks that are inspired by Falcon's design, of having one request object and one response object as parameters.
/// check | Inspired **FastAPI** to
/// tip | Inspired **FastAPI** to
Find ways to get great performance.
@ -313,7 +313,7 @@ The dependency injection system requires pre-registration of the dependencies an
Routes are declared in a single place, using functions declared in other places (instead of using decorators that can be placed right on top of the function that handles the endpoint). This is closer to how Django does it than to how Flask (and Starlette) does it. It separates in the code things that are relatively tightly coupled.
/// check | Inspired **FastAPI** to
/// tip | Inspired **FastAPI** to
Define extra validations for data types using the "default" value of model attributes. This improves editor support, and it was not available in Pydantic before.
@ -335,13 +335,13 @@ It has an interesting, uncommon feature: using the same framework, it's possible
As it is based on the previous standard for synchronous Python web frameworks (WSGI), it can't handle Websockets and other things, although it still has high performance too.
/// info
/// note
Hug was created by Timothy Crosley, the same creator of [`isort`](https://github.com/timothycrosley/isort), a great tool to automatically sort imports in Python files.
///
/// check | Ideas inspiring **FastAPI**
/// tip | Ideas inspiring **FastAPI**
Hug inspired parts of APIStar, and was one of the tools I found most promising, alongside APIStar.
@ -375,7 +375,7 @@ It was no longer an API web framework, as the creator needed to focus on Starlet
Now APIStar is a set of tools to validate OpenAPI specifications, not a web framework.
/// info
/// note
APIStar was created by Tom Christie. The same guy that created:
@ -385,7 +385,7 @@ APIStar was created by Tom Christie. The same guy that created:
///
/// check | Inspired **FastAPI** to
/// tip | Inspired **FastAPI** to
Exist.
@ -409,7 +409,7 @@ That makes it extremely intuitive.
It is comparable to Marshmallow. Although it's faster than Marshmallow in benchmarks. And as it is based on the same Python type hints, the editor support is great.
/// check | **FastAPI** uses it to
/// tip | **FastAPI** uses it to
Handle all the data validation, data serialization and automatic model documentation (based on JSON Schema).
@ -452,7 +452,7 @@ Nevertheless, it is already being used as a "standard" by several tools. This gr
///
/// check | **FastAPI** uses it to
/// tip | **FastAPI** uses it to
Handle all the core web parts. Adding features on top.
@ -470,7 +470,7 @@ It is not a web framework, but a server. For example, it doesn't provide tools f
It is the recommended server for Starlette and **FastAPI**.
/// check | **FastAPI** recommends it as
/// tip | **FastAPI** recommends it as
The main web server to run **FastAPI** applications.

4
docs/en/docs/async.md

@ -139,7 +139,7 @@ You and your crush eat the burgers and have a nice time. ✨
<img src="/img/async/concurrent-burgers/concurrent-burgers-07.png" class="illustration">
/// info
/// note
Beautiful illustrations by [Ketrina Thompson](https://www.instagram.com/ketrinadrawsalot). 🎨
@ -205,7 +205,7 @@ You just eat them, and you are done. ⏹
There was not much talk or flirting as most of the time was spent waiting 🕙 in front of the counter. 😞
/// info
/// note
Beautiful illustrations by [Ketrina Thompson](https://www.instagram.com/ketrinadrawsalot). 🎨

4
docs/en/docs/deployment/docker.md

@ -132,7 +132,7 @@ Successfully installed fastapi pydantic
</div>
/// info
/// note
There are other formats and tools to define and install package dependencies.
@ -556,7 +556,7 @@ If you are using containers (e.g. Docker, Kubernetes), then there are two main a
If you have **multiple containers**, probably each one running a **single process** (for example, in a **Kubernetes** cluster), then you would probably want to have a **separate container** doing the work of the **previous steps** in a single container, running a single process, **before** running the replicated worker containers.
/// info
/// note
If you are using Kubernetes, this would probably be an [Init Container](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/).

2
docs/en/docs/deployment/server-workers.md

@ -17,7 +17,7 @@ As you saw in the previous chapter about [Deployment Concepts](concepts.md), the
Here I'll show you how to use **Uvicorn** with **worker processes** using the `fastapi` command or the `uvicorn` command directly.
/// info
/// note
If you are using containers, for example with Docker or Kubernetes, I'll tell you more about that in the next chapter: [FastAPI in Containers - Docker](docker.md).

2
docs/en/docs/external-links.md

@ -6,7 +6,7 @@ There are many posts, articles, tools, and projects, related to **FastAPI**.
You could easily use a search engine or video platform to find many resources related to FastAPI.
/// info
/// note
Before, this page used to list links to external articles.

2
docs/en/docs/features.md

@ -63,7 +63,7 @@ second_user_data = {
my_second_user: User = User(**second_user_data)
```
/// info
/// note
`**second_user_data` means:

5
docs/en/docs/help-fastapi.md

@ -170,7 +170,7 @@ And if there's any other style or consistency need, I'll ask directly for that,
* Then **comment** saying that you did that, that's how I will know you really checked it.
/// info
/// note
Unfortunately, I can't simply trust PRs that just have several approvals.
@ -210,6 +210,9 @@ You can [contribute](contributing.md) to the source code with Pull Requests, for
* Make sure to add tests.
* Make sure to add documentation if it's relevant.
Note that PRs from non-team members are not allowed to modify `pyproject.toml` or `uv.lock`, to prevent supply chain risk.
If you would like to add a new dependency, create a new [Discussion](https://github.com/fastapi/fastapi/discussions/categories/questions) to explain why.
## Help Maintain FastAPI { #help-maintain-fastapi }
Help me maintain **FastAPI**! 🤓

2
docs/en/docs/how-to/extending-openapi.md

@ -27,7 +27,7 @@ And that function `get_openapi()` receives as parameters:
* `description`: The description of your API, this can include markdown and will be shown in the docs.
* `routes`: A list of routes, these are each of the registered *path operations*. They are taken from `app.routes`.
/// info
/// note
The parameter `summary` is available in OpenAPI 3.1.0 and above, supported by FastAPI 0.99.0 and above.

2
docs/en/docs/how-to/separate-openapi-schemas.md

@ -85,7 +85,7 @@ Probably the main use case for this is if you already have some autogenerated cl
In that case, you can disable this feature in **FastAPI**, with the parameter `separate_input_output_schemas=False`.
/// info
/// note
Support for `separate_input_output_schemas` was added in FastAPI `0.102.0`. 🤓

BIN
docs/en/docs/img/sponsors/talordata.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

8
docs/en/docs/index.md

@ -86,16 +86,16 @@ The key features are:
<div class="fastapi-opinions" data-fastapi-opinions>
<div class="fastapi-opinions__tabs" role="tablist" aria-label="Companies using FastAPI">
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-microsoft" aria-controls="fo-panel-microsoft" aria-selected="true" tabindex="0">
<span class="fastapi-opinions__mark"><img src="img/logos/microsoft.svg" alt="Microsoft" loading="lazy"></span>
<span class="fastapi-opinions__mark"><img src="/img/logos/microsoft.svg" alt="Microsoft" loading="lazy"></span>
</button>
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-uber" aria-controls="fo-panel-uber" aria-selected="false" tabindex="-1">
<span class="fastapi-opinions__mark"><img src="img/logos/uber.svg" alt="Uber" loading="lazy"></span>
<span class="fastapi-opinions__mark"><img src="/img/logos/uber.svg" alt="Uber" loading="lazy"></span>
</button>
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-netflix" aria-controls="fo-panel-netflix" aria-selected="false" tabindex="-1">
<span class="fastapi-opinions__mark"><img src="img/logos/netflix.svg" alt="Netflix" loading="lazy"></span>
<span class="fastapi-opinions__mark"><img src="/img/logos/netflix.svg" alt="Netflix" loading="lazy"></span>
</button>
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-cisco" aria-controls="fo-panel-cisco" aria-selected="false" tabindex="-1">
<span class="fastapi-opinions__mark"><img src="img/logos/cisco.svg" alt="Cisco" loading="lazy"></span>
<span class="fastapi-opinions__mark"><img src="/img/logos/cisco.svg" alt="Cisco" loading="lazy"></span>
</button>
</div>

6
docs/en/docs/python-types.md

@ -172,7 +172,7 @@ As the list is a type that contains some internal types, you put them in square
{* ../../docs_src/python_types/tutorial006_py310.py hl[1] *}
/// info
/// note
Those internal types in the square brackets are called "type parameters".
@ -283,7 +283,7 @@ An example from the official Pydantic docs:
{* ../../docs_src/python_types/tutorial011_py310.py *}
/// info
/// note
To learn more about [Pydantic, check its docs](https://docs.pydantic.dev/).
@ -341,7 +341,7 @@ This might all sound abstract. Don't worry. You'll see all this in action in the
The important thing is that by using standard Python types, in a single place (instead of adding more classes, decorators, etc), **FastAPI** will do a lot of the work for you.
/// info
/// note
If you already went through all the tutorial and came back to see more about types, a good resource is [the "cheat sheet" from `mypy`](https://mypy.readthedocs.io/en/latest/cheat_sheet_py3.html).

14
docs/en/docs/release-notes.md

@ -9,6 +9,8 @@ hide:
### Docs
* 📝 Update docs, simplify usage of admonitions, only default ones. PR [#15553](https://github.com/fastapi/fastapi/pull/15553) by [@tiangolo](https://github.com/tiangolo).
* 📝 Fix image URLs in `index.md`. PR [#15534](https://github.com/fastapi/fastapi/pull/15534) by [@YuriiMotov](https://github.com/YuriiMotov).
* ✏️ Fix Azkaban spelling typo in `virtual-environments.md‎`. PR [#15463](https://github.com/fastapi/fastapi/pull/15463) by [@isaacbernat](https://github.com/isaacbernat).
* 💄 Improve layout and styling. PR [#15462](https://github.com/fastapi/fastapi/pull/15462) by [@alejsdev](https://github.com/alejsdev).
* 💄 Refactor opinions section with interactive tabs and new logos. PR [#15458](https://github.com/fastapi/fastapi/pull/15458) by [@alejsdev](https://github.com/alejsdev).
@ -16,10 +18,22 @@ hide:
### Translations
* 🌐 Update translations for ko (update-outdated). PR [#15525](https://github.com/fastapi/fastapi/pull/15525) by [@tiangolo](https://github.com/tiangolo).
* 🌐 Update translations for zh-hant (update-outdated). PR [#15524](https://github.com/fastapi/fastapi/pull/15524) by [@tiangolo](https://github.com/tiangolo).
* 🌐 Update translations for fr (update-outdated). PR [#15522](https://github.com/fastapi/fastapi/pull/15522) by [@tiangolo](https://github.com/tiangolo).
* 🌐 Update translations for es (update-outdated). PR [#15523](https://github.com/fastapi/fastapi/pull/15523) by [@tiangolo](https://github.com/tiangolo).
* 🌐 Update translations for zh (update-outdated). PR [#15520](https://github.com/fastapi/fastapi/pull/15520) by [@tiangolo](https://github.com/tiangolo).
* 🌐 Update translations for ru (update-outdated). PR [#15521](https://github.com/fastapi/fastapi/pull/15521) by [@tiangolo](https://github.com/tiangolo).
* 🌐 Fix typos in Spanish LLM-prompt. PR [#15472](https://github.com/fastapi/fastapi/pull/15472) by [@crr004](https://github.com/crr004).
### Internal
* 🔒️ Only allow team members to modify dependencies. PR [#15548](https://github.com/fastapi/fastapi/pull/15548) by [@svlandeg](https://github.com/svlandeg).
* ⬆ Bump actions/add-to-project from 1.0.2 to 2.0.0. PR [#15490](https://github.com/fastapi/fastapi/pull/15490) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump actions/labeler from 6.0.1 to 6.1.0. PR [#15507](https://github.com/fastapi/fastapi/pull/15507) by [@dependabot[bot]](https://github.com/apps/dependabot).
* 🔧 Remove Ruff ignored rule for tabs. PR [#15533](https://github.com/fastapi/fastapi/pull/15533) by [@tiangolo](https://github.com/tiangolo).
* 🔧 Update sponsors badge. PR [#15532](https://github.com/fastapi/fastapi/pull/15532) by [@tiangolo](https://github.com/tiangolo).
* 🔧 Add sponsor: TalorData. PR [#15531](https://github.com/fastapi/fastapi/pull/15531) by [@tiangolo](https://github.com/tiangolo).
* ⬆ Bump ty from 0.0.21 to 0.0.34. PR [#15443](https://github.com/fastapi/fastapi/pull/15443) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump pydantic from 2.13.2 to 2.13.3. PR [#15444](https://github.com/fastapi/fastapi/pull/15444) by [@dependabot[bot]](https://github.com/apps/dependabot).
* 👷 Add pre-commit to check typos. PR [#15482](https://github.com/fastapi/fastapi/pull/15482) by [@tiangolo](https://github.com/tiangolo).

12
docs/en/docs/tutorial/bigger-applications.md

@ -4,7 +4,7 @@ If you are building an application or a web API, it's rarely the case that you c
**FastAPI** provides a convenience tool to structure your application while keeping all the flexibility.
/// info
/// note
If you come from Flask, this would be the equivalent of Flask's Blueprints.
@ -194,7 +194,7 @@ Having `dependencies` in the `APIRouter` can be used, for example, to require au
///
/// check
/// tip
The `prefix`, `tags`, `responses`, and `dependencies` parameters are (as in many other cases) just a feature from **FastAPI** to help you avoid code duplication.
@ -339,7 +339,7 @@ We could also import them like:
from app.routers import items, users
```
/// info
/// note
The first version is a "relative import":
@ -382,7 +382,7 @@ Now, let's include the `router`s from the submodules `users` and `items`:
{* ../../docs_src/bigger_applications/app_an_py310/main.py hl[10:11] title["app/main.py"] *}
/// info
/// note
`users.router` contains the `APIRouter` inside of the file `app/routers/users.py`.
@ -402,7 +402,7 @@ So, behind the scenes, it will actually work as if everything was the same singl
///
/// check
/// tip
You don't have to worry about performance when including routers.
@ -451,7 +451,7 @@ Here we do it... just to show that we can 🤷:
and it will work correctly, together with all the other *path operations* added with `app.include_router()`.
/// info | Very Technical Details
/// note | Very Technical Details
**Note**: this is a very technical detail that you probably can **just skip**.

2
docs/en/docs/tutorial/body-multiple-params.md

@ -111,7 +111,7 @@ For example:
{* ../../docs_src/body_multiple_params/tutorial004_an_py310.py hl[28] *}
/// info
/// note
`Body` also has all the same extra validation and metadata parameters as `Query`, `Path` and others you will see later.

4
docs/en/docs/tutorial/body-nested-models.md

@ -136,7 +136,7 @@ This will expect (convert, validate, document, etc.) a JSON body like:
}
```
/// info
/// note
Notice how the `images` key now has a list of image objects.
@ -148,7 +148,7 @@ You can define arbitrarily deeply nested models:
{* ../../docs_src/body_nested_models/tutorial007_py310.py hl[7,12,18,21,25] *}
/// info
/// note
Notice how `Offer` has a list of `Item`s, which in turn have an optional list of `Image`s

2
docs/en/docs/tutorial/body.md

@ -8,7 +8,7 @@ Your API almost always has to send a **response** body. But clients don't necess
To declare a **request** body, you use [Pydantic](https://docs.pydantic.dev/) models with all their power and benefits.
/// info
/// note
To send data, you should use one of: `POST` (the more common), `PUT`, `DELETE` or `PATCH`.

2
docs/en/docs/tutorial/cookie-param-models.md

@ -32,7 +32,7 @@ You can see the defined cookies in the docs UI at `/docs`:
<img src="/img/tutorial/cookie-param-models/image01.png">
</div>
/// info
/// note
Have in mind that, as **browsers handle cookies** in special ways and behind the scenes, they **don't** easily allow **JavaScript** to touch them.

4
docs/en/docs/tutorial/cookie-params.md

@ -24,13 +24,13 @@ But remember that when you import `Query`, `Path`, `Cookie` and others from `fas
///
/// info
/// note
To declare cookies, you need to use `Cookie`, because otherwise the parameters would be interpreted as query parameters.
///
/// info
/// note
Have in mind that, as **browsers handle cookies** in special ways and behind the scenes, they **don't** easily allow **JavaScript** to touch them.

2
docs/en/docs/tutorial/debugging.md

@ -72,7 +72,7 @@ So, the line:
will not be executed.
/// info
/// note
For more information, check [the official Python docs](https://docs.python.org/3/library/__main__.html).

2
docs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md

@ -28,7 +28,7 @@ It might also help avoid confusion for new developers that see an unused paramet
///
/// info
/// note
In this example we use invented custom headers `X-Key` and `X-Token`.

2
docs/en/docs/tutorial/dependencies/dependencies-with-yield.md

@ -170,7 +170,7 @@ participant tasks as Background tasks
end
```
/// info
/// note
Only **one response** will be sent to the client. It might be one of the error responses or it will be the response from the *path operation*.

4
docs/en/docs/tutorial/dependencies/index.md

@ -51,7 +51,7 @@ In this case, this dependency expects:
And then it just returns a `dict` containing those values.
/// info
/// note
FastAPI added support for `Annotated` (and started recommending it) in version 0.95.0.
@ -106,7 +106,7 @@ common_parameters --> read_users
This way you write shared code once and **FastAPI** takes care of calling it for your *path operations*.
/// check
/// tip
Notice that you don't have to create a special class and pass it somewhere to **FastAPI** to "register" it or anything similar.

2
docs/en/docs/tutorial/dependencies/sub-dependencies.md

@ -35,7 +35,7 @@ Then we can use the dependency with:
{* ../../docs_src/dependencies/tutorial005_an_py310.py hl[23] *}
/// info
/// note
Notice that we are only declaring one dependency in the *path operation function*, the `query_or_cookie_extractor`.

4
docs/en/docs/tutorial/first-steps.md

@ -270,7 +270,7 @@ https://example.com/items/foo
/items/foo
```
/// info
/// note
A "path" is also commonly called an "endpoint" or a "route".
@ -322,7 +322,7 @@ The `@app.get("/")` tells **FastAPI** that the function right below is in charge
* the path `/`
* using a <dfn title="an HTTP GET method"><code>get</code> operation</dfn>
/// info | `@decorator` Info
/// note | `@decorator` Info
That `@something` syntax in Python is called a "decorator".

2
docs/en/docs/tutorial/header-params.md

@ -24,7 +24,7 @@ But remember that when you import `Query`, `Path`, `Header`, and others from `fa
///
/// info
/// note
To declare headers, you need to use `Header`, because otherwise the parameters would be interpreted as query parameters.

2
docs/en/docs/tutorial/metadata.md

@ -74,7 +74,7 @@ Use the `tags` parameter with your *path operations* (and `APIRouter`s) to assig
{* ../../docs_src/metadata/tutorial004_py310.py hl[21,26] *}
/// info
/// note
Read more about tags in [Path Operation Configuration](path-operation-configuration.md#tags).

4
docs/en/docs/tutorial/path-operation-configuration.md

@ -72,13 +72,13 @@ You can specify the response description with the parameter `response_descriptio
{* ../../docs_src/path_operation_configuration/tutorial005_py310.py hl[18] *}
/// info
/// note
Notice that `response_description` refers specifically to the response, the `description` refers to the *path operation* in general.
///
/// check
/// tip
OpenAPI specifies that each *path operation* requires a response description.

4
docs/en/docs/tutorial/path-params-numeric-validations.md

@ -8,7 +8,7 @@ First, import `Path` from `fastapi`, and import `Annotated`:
{* ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py hl[1,3] *}
/// info
/// note
FastAPI added support for `Annotated` (and started recommending it) in version 0.95.0.
@ -131,7 +131,7 @@ And you can also declare numeric validations:
* `lt`: `l`ess `t`han
* `le`: `l`ess than or `e`qual
/// info
/// note
`Query`, `Path`, and other classes you will see later are subclasses of a common `Param` class.

8
docs/en/docs/tutorial/path-params.md

@ -20,7 +20,7 @@ You can declare the type of a path parameter in the function, using standard Pyt
In this case, `item_id` is declared to be an `int`.
/// check
/// tip
This will give you editor support inside of your function, with error checks, completion, etc.
@ -34,7 +34,7 @@ If you run this example and open your browser at [http://127.0.0.1:8000/items/3]
{"item_id":3}
```
/// check
/// tip
Notice that the value your function received (and returned) is `3`, as a Python `int`, not a string `"3"`.
@ -66,7 +66,7 @@ because the path parameter `item_id` had a value of `"foo"`, which is not an `in
The same error would appear if you provided a `float` instead of an `int`, as in: [http://127.0.0.1:8000/items/4.2](http://127.0.0.1:8000/items/4.2)
/// check
/// tip
So, with the same Python type declaration, **FastAPI** gives you data validation.
@ -82,7 +82,7 @@ And when you open your browser at [http://127.0.0.1:8000/docs](http://127.0.0.1:
<img src="/img/tutorial/path-params/image01.png">
/// check
/// tip
Again, just with that same Python type declaration, **FastAPI** gives you automatic, interactive documentation (integrating Swagger UI).

4
docs/en/docs/tutorial/query-params-str-validations.md

@ -29,7 +29,7 @@ To achieve that, first import:
{* ../../docs_src/query_params_str_validations/tutorial002_an_py310.py hl[1,3] *}
/// info
/// note
FastAPI added support for `Annotated` (and started recommending it) in version 0.95.0.
@ -382,7 +382,7 @@ For example, this custom validator checks that the item ID starts with `isbn-` f
{* ../../docs_src/query_params_str_validations/tutorial015_an_py310.py hl[5,16:19,24] *}
/// info
/// note
This is available with Pydantic version 2 or above. 😎

2
docs/en/docs/tutorial/query-params.md

@ -65,7 +65,7 @@ The same way, you can declare optional query parameters, by setting their defaul
In this case, the function parameter `q` will be optional, and will be `None` by default.
/// check
/// tip
Also notice that **FastAPI** is smart enough to notice that the path parameter `item_id` is a path parameter and `q` is not, so, it's a query parameter.

4
docs/en/docs/tutorial/request-files.md

@ -2,7 +2,7 @@
You can define files to be uploaded by the client using `File`.
/// info
/// note
To receive uploaded files, first install [`python-multipart`](https://github.com/Kludex/python-multipart).
@ -28,7 +28,7 @@ Create file parameters the same way you would for `Body` or `Form`:
{* ../../docs_src/request_files/tutorial001_an_py310.py hl[9] *}
/// info
/// note
`File` is a class that inherits directly from `Form`.

2
docs/en/docs/tutorial/request-form-models.md

@ -2,7 +2,7 @@
You can use **Pydantic models** to declare **form fields** in FastAPI.
/// info
/// note
To use forms, first install [`python-multipart`](https://github.com/Kludex/python-multipart).

2
docs/en/docs/tutorial/request-forms-and-files.md

@ -2,7 +2,7 @@
You can define files and form fields at the same time using `File` and `Form`.
/// info
/// note
To receive uploaded files and/or form data, first install [`python-multipart`](https://github.com/Kludex/python-multipart).

4
docs/en/docs/tutorial/request-forms.md

@ -2,7 +2,7 @@
When you need to receive form fields instead of JSON, you can use `Form`.
/// info
/// note
To use forms, first install [`python-multipart`](https://github.com/Kludex/python-multipart).
@ -32,7 +32,7 @@ The <dfn title="specification">spec</dfn> requires the fields to be exactly name
With `Form` you can declare the same configurations as with `Body` (and `Query`, `Path`, `Cookie`), including validation, examples, an alias (e.g. `user-name` instead of `username`), etc.
/// info
/// note
`Form` is a class that inherits directly from `Body`.

4
docs/en/docs/tutorial/response-model.md

@ -72,7 +72,7 @@ Here we are declaring a `UserIn` model, it will contain a plaintext password:
{* ../../docs_src/response_model/tutorial002_py310.py hl[7,9] *}
/// info
/// note
To use `EmailStr`, first install [`email-validator`](https://github.com/JoshData/python-email-validator).
@ -251,7 +251,7 @@ So, if you send a request to that *path operation* for the item with ID `foo`, t
}
```
/// info
/// note
You can also use:

2
docs/en/docs/tutorial/response-status-code.md

@ -18,7 +18,7 @@ Notice that `status_code` is a parameter of the "decorator" method (`get`, `post
The `status_code` parameter receives a number with the HTTP status code.
/// info
/// note
`status_code` can alternatively also receive an `IntEnum`, such as Python's [`http.HTTPStatus`](https://docs.python.org/3/library/http.html#http.HTTPStatus).

6
docs/en/docs/tutorial/schema-extra-example.md

@ -24,7 +24,7 @@ For example you could use it to add metadata for a frontend user interface, etc.
///
/// info
/// note
OpenAPI 3.1.0 (used since FastAPI 0.99.0) added support for `examples`, which is part of the **JSON Schema** standard.
@ -155,7 +155,7 @@ OpenAPI also added `example` and `examples` fields to other parts of the specifi
* `File()`
* `Form()`
/// info
/// note
This old OpenAPI-specific `examples` parameter is now `openapi_examples` since FastAPI `0.103.0`.
@ -171,7 +171,7 @@ And now this new `examples` field takes precedence over the old single (and cust
This new `examples` field in JSON Schema is **just a `list`** of examples, not a dict with extra metadata as in the other places in OpenAPI (described above).
/// info
/// note
Even after OpenAPI 3.1.0 was released with this new simpler integration with JSON Schema, for a while, Swagger UI, the tool that provides the automatic docs, didn't support OpenAPI 3.1.0 (it does since version 5.0.0 🎉).

10
docs/en/docs/tutorial/security/first-steps.md

@ -24,7 +24,7 @@ Copy the example in a file `main.py`:
## Run it { #run-it }
/// info
/// note
The [`python-multipart`](https://github.com/Kludex/python-multipart) package is automatically installed with **FastAPI** when you run the `pip install "fastapi[standard]"` command.
@ -60,7 +60,7 @@ You will see something like this:
<img src="/img/tutorial/security/image01.png">
/// check | Authorize button!
/// tip | Authorize button!
You already have a shiny new "Authorize" button.
@ -118,7 +118,7 @@ So, let's review it from that simplified point of view:
In this example we are going to use **OAuth2**, with the **Password** flow, using a **Bearer** token. We do that using the `OAuth2PasswordBearer` class.
/// info
/// note
A "bearer" token is not the only option.
@ -148,7 +148,7 @@ This parameter doesn't create that endpoint / *path operation*, but declares tha
We will soon also create the actual path operation.
/// info
/// note
If you are a very strict "Pythonista" you might dislike the style of the parameter name `tokenUrl` instead of `token_url`.
@ -176,7 +176,7 @@ This dependency will provide a `str` that is assigned to the parameter `token` o
**FastAPI** will know that it can use this dependency to define a "security scheme" in the OpenAPI schema (and the automatic API docs).
/// info | Technical Details
/// note | Technical Details
**FastAPI** will know that it can use the class `OAuth2PasswordBearer` (declared in a dependency) to define the security scheme in OpenAPI because it inherits from `fastapi.security.oauth2.OAuth2`, which in turn inherits from `fastapi.security.base.SecurityBase`.

2
docs/en/docs/tutorial/security/get-current-user.md

@ -52,7 +52,7 @@ Here **FastAPI** won't get confused because you are using `Depends`.
///
/// check
/// tip
The way this dependency system is designed allows us to have different dependencies (different "dependables") that all return a `User` model.

4
docs/en/docs/tutorial/security/oauth2-jwt.md

@ -42,7 +42,7 @@ $ pip install pyjwt
</div>
/// info
/// note
If you are planning to use digital signature algorithms like RSA or ECDSA, you should install the cryptography library dependency `pyjwt[crypto]`.
@ -213,7 +213,7 @@ Using the credentials:
Username: `johndoe`
Password: `secret`
/// check
/// tip
Notice that nowhere in the code is the plaintext password "`secret`", we only have the hashed version.

8
docs/en/docs/tutorial/security/simple-oauth2.md

@ -32,7 +32,7 @@ They are normally used to declare specific security permissions, for example:
* `instagram_basic` is used by Facebook / Instagram.
* `https://www.googleapis.com/auth/drive` is used by Google.
/// info
/// note
In OAuth2 a "scope" is just a string that declares a specific permission required.
@ -72,7 +72,7 @@ If you need to enforce it, use `OAuth2PasswordRequestFormStrict` instead of `OAu
* An optional `client_id` (we don't need it for our example).
* An optional `client_secret` (we don't need it for our example).
/// info
/// note
The `OAuth2PasswordRequestForm` is not a special class for **FastAPI** as is `OAuth2PasswordBearer`.
@ -144,7 +144,7 @@ UserInDB(
)
```
/// info
/// note
For a more complete explanation of `**user_dict` check back in [the documentation for **Extra Models**](../extra-models.md#about-user-in-dict).
@ -196,7 +196,7 @@ So, in our endpoint, we will only get a user if the user exists, was correctly a
{* ../../docs_src/security/tutorial003_an_py310.py hl[58:66,69:74,94] *}
/// info
/// note
The additional header `WWW-Authenticate` with value `Bearer` we are returning here is also part of the spec.

2
docs/en/docs/tutorial/server-sent-events.md

@ -4,7 +4,7 @@ You can stream data to the client using **Server-Sent Events** (SSE).
This is similar to [Stream JSON Lines](stream-json-lines.md), but uses the `text/event-stream` format, which is supported natively by browsers with the [`EventSource` API](https://developer.mozilla.org/en-US/docs/Web/API/EventSource).
/// info
/// note
Added in FastAPI 0.135.0.

4
docs/en/docs/tutorial/stream-json-lines.md

@ -2,7 +2,7 @@
You could have a sequence of data that you would like to send in a "**stream**", you could do it with **JSON Lines**.
/// info
/// note
Added in FastAPI 0.134.0.
@ -48,7 +48,7 @@ A response would have a content type of `application/jsonl` (instead of `applica
It's very similar to a JSON array (equivalent of a Python list), but instead of being wrapped in `[]` and having `,` between the items, it has **one JSON object per line**, they are separated by a new line character.
/// info
/// note
The important point is that your app will be able to produce each line in turn, while the client consumes the previous lines.

4
docs/en/docs/tutorial/testing.md

@ -8,7 +8,7 @@ With it, you can use [pytest](https://docs.pytest.org/) directly with **FastAPI*
## Using `TestClient` { #using-testclient }
/// info
/// note
To use `TestClient`, first install [`httpx`](https://www.python-httpx.org).
@ -144,7 +144,7 @@ E.g.:
For more information about how to pass data to the backend (using `httpx` or the `TestClient`) check the [HTTPX documentation](https://www.python-httpx.org).
/// info
/// note
Note that the `TestClient` receives data that can be converted to JSON, not Pydantic models.

4
docs/en/docs/virtual-environments.md

@ -2,7 +2,7 @@
When you work in Python projects you probably should use a **virtual environment** (or a similar mechanism) to isolate the packages you install for each project.
/// info
/// note
If you already know about virtual environments, how to create them and use them, you might want to skip this section. 🤓
@ -18,7 +18,7 @@ A **virtual environment** is a directory with some files in it.
///
/// info
/// note
This page will teach you how to use **virtual environments** and how they work.

4
docs/en/mkdocs.yml

@ -290,7 +290,10 @@ markdown_extensions:
format: !!python/name:pymdownx.superfences.fence_code_format ''
pymdownx.tilde: null
pymdownx.blocks.admonition:
# TODO: remove types section (with custom types) once translations are migrated to
# not use custom types too
types:
# Default types
- note
- attention
- caution
@ -299,6 +302,7 @@ markdown_extensions:
- tip
- hint
- warning
# Custom types
- info
- check
pymdownx.blocks.details: null

1
docs/es/docs/advanced/generate-clients.md

@ -30,7 +30,6 @@ Su sponsorship también demuestra un fuerte compromiso con la **comunidad** de F
Por ejemplo, podrías querer probar:
* [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)

93
docs/es/docs/index.md

@ -54,18 +54,27 @@ Las funcionalidades clave son:
### Sponsor Keystone { #keystone-sponsor }
<div class="fastapi-sponsors fastapi-sponsors--keystone">
{% for sponsor in sponsors.keystone -%}
<a href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
<a class="fastapi-sponsors__card fastapi-sponsors__card--keystone" href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img class="fastapi-sponsors__banner" src="{{ sponsor.img }}" alt="{{ sponsor.title }}"></a>
{% endfor -%}
</div>
### Sponsors Oro y Plata { #gold-and-silver-sponsors }
### Sponsors Oro { #gold-sponsors }
<div class="fastapi-sponsors fastapi-sponsors--gold">
{% for sponsor in sponsors.gold -%}
<a href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
<a class="fastapi-sponsors__card fastapi-sponsors__card--gold" href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img class="fastapi-sponsors__banner" src="{{ sponsor.img }}" alt="{{ sponsor.title }}" loading="lazy"></a>
{% endfor -%}
{%- for sponsor in sponsors.silver -%}
<a href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
</div>
### Sponsors Plata { #silver-sponsors }
<div class="fastapi-sponsors fastapi-sponsors--silver">
{% for sponsor in sponsors.silver -%}
<a class="fastapi-sponsors__card fastapi-sponsors__card--silver" href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img class="fastapi-sponsors__banner" src="{{ sponsor.img }}" alt="{{ sponsor.title }}" loading="lazy"></a>
{% endfor %}
</div>
<!-- /sponsors -->
@ -73,7 +82,45 @@ Las funcionalidades clave son:
## Opiniones { #opinions }
"_[...] Estoy usando **FastAPI** un montón estos días. [...] De hecho, estoy planeando usarlo para todos los servicios de **ML de mi equipo en Microsoft**. Algunos de ellos se están integrando en el núcleo del producto **Windows** y algunos productos de **Office**._"
<!-- only-mkdocs -->
<div class="fastapi-opinions" data-fastapi-opinions>
<div class="fastapi-opinions__tabs" role="tablist" aria-label="Companies using FastAPI">
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-microsoft" aria-controls="fo-panel-microsoft" aria-selected="true" tabindex="0">
<span class="fastapi-opinions__mark"><img src="/img/logos/microsoft.svg" alt="Microsoft" loading="lazy"></span>
</button>
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-uber" aria-controls="fo-panel-uber" aria-selected="false" tabindex="-1">
<span class="fastapi-opinions__mark"><img src="/img/logos/uber.svg" alt="Uber" loading="lazy"></span>
</button>
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-netflix" aria-controls="fo-panel-netflix" aria-selected="false" tabindex="-1">
<span class="fastapi-opinions__mark"><img src="/img/logos/netflix.svg" alt="Netflix" loading="lazy"></span>
</button>
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-cisco" aria-controls="fo-panel-cisco" aria-selected="false" tabindex="-1">
<span class="fastapi-opinions__mark"><img src="/img/logos/cisco.svg" alt="Cisco" loading="lazy"></span>
</button>
</div>
<div class="fastapi-opinions__panel" id="fo-panel-microsoft" role="tabpanel" aria-labelledby="fo-tab-microsoft" tabindex="0">
<blockquote class="fastapi-opinions__quote">"Estoy usando <strong>FastAPI</strong> un montón estos días. De hecho, estoy planeando usarlo para todos los <strong>servicios de ML de mi equipo en Microsoft</strong>. Algunos de ellos se están integrando en el producto principal de <strong>Windows</strong> y algunos productos de <strong>Office</strong>."</blockquote>
<div class="fastapi-opinions__attr">— Kabir Khan, <strong>Microsoft</strong> <a href="https://github.com/fastapi/fastapi/pull/26">(ref)</a></div>
</div>
<div class="fastapi-opinions__panel" id="fo-panel-uber" role="tabpanel" aria-labelledby="fo-tab-uber" tabindex="0" hidden>
<blockquote class="fastapi-opinions__quote">"Adoptamos el paquete <strong>FastAPI</strong> para crear un servidor <strong>REST</strong> que pueda ser consultado para obtener <strong>predicciones</strong>." <em>[para Ludwig]</em></blockquote>
<div class="fastapi-opinions__attr">— Piero Molino, Yaroslav Dudin, Sai Sumanth Miryala, <strong>Uber</strong> <a href="https://eng.uber.com/ludwig-v0-2/">(ref)</a></div>
</div>
<div class="fastapi-opinions__panel" id="fo-panel-netflix" role="tabpanel" aria-labelledby="fo-tab-netflix" tabindex="0" hidden>
<blockquote class="fastapi-opinions__quote">"<strong>Netflix</strong> se complace en anunciar el lanzamiento open source de nuestro framework de orquestación de <strong>gestión de crisis</strong>: <strong>Dispatch</strong>!" <em>[construido con FastAPI]</em></blockquote>
<div class="fastapi-opinions__attr">— Kevin Glisson, Marc Vilanova, Forest Monsen, <strong>Netflix</strong> <a href="https://netflixtechblog.com/introducing-dispatch-da4b8a2a8072">(ref)</a></div>
</div>
<div class="fastapi-opinions__panel" id="fo-panel-cisco" role="tabpanel" aria-labelledby="fo-tab-cisco" tabindex="0" hidden>
<blockquote class="fastapi-opinions__quote">"Si alguien está buscando construir una API de Python para producción, recomendaría altamente <strong>FastAPI</strong>. Está <strong>hermosamente diseñado</strong>, es <strong>simple de usar</strong> y <strong>altamente escalable</strong> — se ha convertido en un <strong>componente clave</strong> en nuestra estrategia de desarrollo API primero."</blockquote>
<div class="fastapi-opinions__attr">— Deon Pillsbury, <strong>Cisco</strong> <a href="https://www.linkedin.com/posts/deonpillsbury_cisco-cx-python-activity-6963242628536487936-trAp/">(ref)</a></div>
</div>
</div>
<!-- /only-mkdocs -->
<div class="only-github" markdown="1">
"_[...] Estoy usando **FastAPI** un montón estos días. [...] De hecho, estoy planeando usarlo para todos los **servicios de ML de mi equipo en Microsoft**. Algunos de ellos se están integrando en el núcleo del producto **Windows** y algunos productos de **Office**._"
<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>
@ -81,47 +128,35 @@ Las funcionalidades clave son:
"_Adoptamos el paquete **FastAPI** para crear un servidor **REST** que pueda ser consultado para obtener **predicciones**. [para Ludwig]_"
<div style="text-align: right; margin-right: 10%;">Piero Molino, Yaroslav Dudin, y Sai Sumanth Miryala - <strong>Uber</strong> <a href="https://eng.uber.com/ludwig-v0-2/"><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** se complace en anunciar el lanzamiento de código abierto de nuestro framework de orquestación de **gestión de crisis**: **Dispatch**! [construido con **FastAPI**]_"
"_**Netflix** se complace en anunciar el lanzamiento open source de nuestro framework de orquestación de **gestión de crisis**: **Dispatch**! [construido con **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"><small>(ref)</small></a></div>
---
"_Estoy súper emocionado con **FastAPI**. ¡Es tan divertido!_"
<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) host del podcast</strong> <a href="https://x.com/brianokken/status/1112220079972728832"><small>(ref)</small></a></div>
---
"_Honestamente, lo que has construido parece súper sólido y pulido. En muchos aspectos, es lo que quería que **Hug** fuera; es realmente inspirador ver a alguien construir eso._"
"_Si alguien está buscando construir una API de Python para producción, recomendaría altamente **FastAPI**. Está **hermosamente diseñado**, es **simple de usar** y **altamente escalable**, se ha convertido en un **componente clave** en nuestra estrategia de desarrollo API primero y está impulsando muchas automatizaciones y servicios como nuestro Ingeniero Virtual TAC._"
<div style="text-align: right; margin-right: 10%;">Timothy Crosley - <strong>[Hug](https://github.com/hugapi/hug) creador</strong> <a href="https://news.ycombinator.com/item?id=19455465"><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>
---
"_Si estás buscando aprender un **framework moderno** para construir APIs REST, échale un vistazo a **FastAPI** [...] Es rápido, fácil de usar y fácil de aprender [...]_"
"_Nos hemos cambiado a **FastAPI** para nuestras **APIs** [...] Creo que te gustará [...]_"
<div style="text-align: right; margin-right: 10%;">Ines Montani - Matthew Honnibal - <strong>[fundadores de Explosion AI](https://explosion.ai) - [creadores de spaCy](https://spacy.io)</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>
</div>
---
## FastAPI Conf { #fastapi-conf }
"_Si alguien está buscando construir una API de Python para producción, altamente recomendaría **FastAPI**. Está **hermosamente diseñado**, es **simple de usar** y **altamente escalable**, se ha convertido en un **componente clave** en nuestra estrategia de desarrollo API primero y está impulsando muchas automatizaciones y servicios como nuestro Ingeniero Virtual TAC._"
[**FastAPI Conf '26**](https://fastapiconf.com) se llevará a cabo el **28 de octubre de 2026** en **Ámsterdam, NL**. Todo sobre FastAPI, directo de la fuente. 🎤
<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>
---
<a class="fastapi-feature-banner" href="https://fastapiconf.com"><img src="https://fastapi.tiangolo.com/img/fastapi-conf.jpeg" alt="FastAPI Conf '26 - October 28, 2026 - Amsterdam, NL"></a>
## Mini documental de FastAPI { #fastapi-mini-documentary }
Hay un [mini documental de FastAPI](https://www.youtube.com/watch?v=mpR8ngthqiE) lanzado a finales de 2025, puedes verlo 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>
<a class="fastapi-feature-banner" href="https://www.youtube.com/watch?v=mpR8ngthqiE"><img src="https://fastapi.tiangolo.com/img/fastapi-documentary.jpg" alt="FastAPI Mini Documentary"></a>
## **Typer**, el FastAPI de las CLIs { #typer-the-fastapi-of-clis }
@ -245,7 +280,7 @@ Puedes leer más sobre esto en la [documentación del CLI de FastAPI](https://fa
</details>
### Revísalo { #check-it }
### Revisa { #check-it }
Abre tu navegador en [http://127.0.0.1:8000/items/5?q=somequery](http://127.0.0.1:8000/items/5?q=somequery).
@ -258,7 +293,7 @@ Verás el response JSON como:
Ya creaste una API que:
* Recibe requests HTTP en los _paths_ `/` y `/items/{item_id}`.
* Ambos _paths_ toman _operaciones_ `GET` (también conocidas como métodos HTTP).
* Ambos _paths_ toman `GET` <em>operaciones</em> (también conocidas como _métodos_ HTTP).
* El _path_ `/items/{item_id}` tiene un _parámetro de path_ `item_id` que debe ser un `int`.
* El _path_ `/items/{item_id}` tiene un _parámetro de query_ `q` opcional que es un `str`.

4
docs/es/docs/virtual-environments.md

@ -166,7 +166,7 @@ $ source .venv/Scripts/activate
Cada vez que instales un **nuevo paquete** en ese entorno, **activa** el entorno de nuevo.
Esto asegura que si usas un programa de **terminal (<abbr title="command line interface interfaz de línea de comandos">CLI</abbr>)** instalado por ese paquete, uses el de tu entorno virtual y no cualquier otro que podría estar instalado globalmente, probablemente con una versión diferente a la que necesitas.
Esto asegura que si usas un **programa de terminal (<abbr title="command line interface - interfaz de línea de comandos">CLI</abbr>)** instalado por ese paquete, uses el de tu entorno virtual y no cualquier otro que podría estar instalado globalmente, probablemente con una versión diferente a la que necesitas.
///
@ -817,7 +817,7 @@ Traceback (most recent call last):
</div>
Pero si desactivas el entorno virtual y activas el nuevo para `prisoner-of-askaban` entonces cuando ejecutes `python` utilizará el Python del entorno virtual en `prisoner-of-azkaban`.
Pero si desactivas el entorno virtual y activas el nuevo para `prisoner-of-azkaban` entonces cuando ejecutes `python` utilizará el Python del entorno virtual en `prisoner-of-azkaban`.
<div class="termy">

1
docs/fr/docs/advanced/generate-clients.md

@ -30,7 +30,6 @@ Leur sponsoring démontre également un fort engagement envers la **communauté*
Par exemple, vous pourriez essayer :
* [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)

89
docs/fr/docs/index.md

@ -54,18 +54,27 @@ Les principales fonctionnalités sont :
### Sponsor clé de voûte { #keystone-sponsor }
<div class="fastapi-sponsors fastapi-sponsors--keystone">
{% for sponsor in sponsors.keystone -%}
<a href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
<a class="fastapi-sponsors__card fastapi-sponsors__card--keystone" href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img class="fastapi-sponsors__banner" src="{{ sponsor.img }}" alt="{{ sponsor.title }}"></a>
{% endfor -%}
</div>
### Sponsors Or et Argent { #gold-and-silver-sponsors }
### Sponsors Or { #gold-sponsors }
<div class="fastapi-sponsors fastapi-sponsors--gold">
{% for sponsor in sponsors.gold -%}
<a href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
<a class="fastapi-sponsors__card fastapi-sponsors__card--gold" href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img class="fastapi-sponsors__banner" src="{{ sponsor.img }}" alt="{{ sponsor.title }}" loading="lazy"></a>
{% endfor -%}
{%- for sponsor in sponsors.silver -%}
<a href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
</div>
### Sponsors Argent { #silver-sponsors }
<div class="fastapi-sponsors fastapi-sponsors--silver">
{% for sponsor in sponsors.silver -%}
<a class="fastapi-sponsors__card fastapi-sponsors__card--silver" href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img class="fastapi-sponsors__banner" src="{{ sponsor.img }}" alt="{{ sponsor.title }}" loading="lazy"></a>
{% endfor %}
</div>
<!-- /sponsors -->
@ -73,55 +82,81 @@ Les principales fonctionnalités sont :
## Opinions { #opinions }
« _[...] J'utilise beaucoup **FastAPI** ces derniers temps. [...] Je prévois de l'utiliser dans mon équipe pour tous les **services de ML chez Microsoft**. Certains d'entre eux sont intégrés au cœur de **Windows** et à certains produits **Office**._ »
<!-- only-mkdocs -->
<div class="fastapi-opinions" data-fastapi-opinions>
<div class="fastapi-opinions__tabs" role="tablist" aria-label="Entreprises utilisant FastAPI">
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-microsoft" aria-controls="fo-panel-microsoft" aria-selected="true" tabindex="0">
<span class="fastapi-opinions__mark"><img src="/img/logos/microsoft.svg" alt="Microsoft" loading="lazy"></span>
</button>
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-uber" aria-controls="fo-panel-uber" aria-selected="false" tabindex="-1">
<span class="fastapi-opinions__mark"><img src="/img/logos/uber.svg" alt="Uber" loading="lazy"></span>
</button>
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-netflix" aria-controls="fo-panel-netflix" aria-selected="false" tabindex="-1">
<span class="fastapi-opinions__mark"><img src="/img/logos/netflix.svg" alt="Netflix" loading="lazy"></span>
</button>
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-cisco" aria-controls="fo-panel-cisco" aria-selected="false" tabindex="-1">
<span class="fastapi-opinions__mark"><img src="/img/logos/cisco.svg" alt="Cisco" loading="lazy"></span>
</button>
</div>
<div class="fastapi-opinions__panel" id="fo-panel-microsoft" role="tabpanel" aria-labelledby="fo-tab-microsoft" tabindex="0">
<blockquote class="fastapi-opinions__quote">« J'utilise énormément <strong>FastAPI</strong> ces derniers temps. Je prévois de l'utiliser pour tous les <strong>services de ML chez Microsoft</strong> de mon équipe. Certains d'entre eux sont intégrés au cœur de <strong>Windows</strong> et à certains produits <strong>Office</strong>. »</blockquote>
<div class="fastapi-opinions__attr">— Kabir Khan, <strong>Microsoft</strong> <a href="https://github.com/fastapi/fastapi/pull/26">(ref)</a></div>
</div>
<div class="fastapi-opinions__panel" id="fo-panel-uber" role="tabpanel" aria-labelledby="fo-tab-uber" tabindex="0" hidden>
<blockquote class="fastapi-opinions__quote">« Nous avons adopté la bibliothèque <strong>FastAPI</strong> pour lancer un serveur <strong>REST</strong> qui peut être interrogé pour obtenir des <strong>prédictions</strong>. » <em>[pour Ludwig]</em></blockquote>
<div class="fastapi-opinions__attr">— Piero Molino, Yaroslav Dudin, Sai Sumanth Miryala, <strong>Uber</strong> <a href="https://eng.uber.com/ludwig-v0-2/">(ref)</a></div>
</div>
<div class="fastapi-opinions__panel" id="fo-panel-netflix" role="tabpanel" aria-labelledby="fo-tab-netflix" tabindex="0" hidden>
<blockquote class="fastapi-opinions__quote">« <strong>Netflix</strong> est heureux d’annoncer la publication en open source de notre framework d’orchestration de <strong>gestion de crise</strong> : <strong>Dispatch</strong> ! » <em>[construit avec FastAPI]</em></blockquote>
<div class="fastapi-opinions__attr">— Kevin Glisson, Marc Vilanova, Forest Monsen, <strong>Netflix</strong> <a href="https://netflixtechblog.com/introducing-dispatch-da4b8a2a8072">(ref)</a></div>
</div>
<div class="fastapi-opinions__panel" id="fo-panel-cisco" role="tabpanel" aria-labelledby="fo-tab-cisco" tabindex="0" hidden>
<blockquote class="fastapi-opinions__quote">« Si quelqu’un cherche à construire une API Python de production, je recommande vivement <strong>FastAPI</strong>. Il est <strong>magnifiquement conçu</strong>, <strong>simple à utiliser</strong> et <strong>hautement scalable</strong> — il est devenu un <strong>composant clé</strong> de notre stratégie de développement API-first. »</blockquote>
<div class="fastapi-opinions__attr">— Deon Pillsbury, <strong>Cisco</strong> <a href="https://www.linkedin.com/posts/deonpillsbury_cisco-cx-python-activity-6963242628536487936-trAp/">(ref)</a></div>
</div>
</div>
<!-- /only-mkdocs -->
<div class="only-github" markdown="1">
« _[...] J'utilise **FastAPI** énormément ces derniers temps. [...] Je prévois de l'utiliser pour tous les **services de ML chez Microsoft** de mon équipe. Certains d'entre eux sont intégrés au cœur de **Windows** et à certains produits **Office**._ »
<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>
---
« _Nous avons adopté la bibliothèque **FastAPI** pour créer un serveur **REST** qui peut être interrogé pour obtenir des **prédictions**. [pour Ludwig]_ »
« _Nous avons adopté la bibliothèque **FastAPI** pour lancer un serveur **REST** qui peut être interrogé pour obtenir des **prédictions**. [pour Ludwig]_ »
<div style="text-align: right; margin-right: 10%;">Piero Molino, Yaroslav Dudin, et Sai Sumanth Miryala - <strong>Uber</strong> <a href="https://eng.uber.com/ludwig-v0-2/"><small>(ref)</small></a></div>
---
« _**Netflix** est heureux d'annoncer la publication en open source de notre framework d'orchestration de **gestion de crise** : **Dispatch** ! [construit avec **FastAPI**]_ »
« _**Netflix** est heureux d’annoncer la publication en open source de notre framework d’orchestration de **gestion de crise** : **Dispatch** ! [construit avec **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"><small>(ref)</small></a></div>
---
« _Je suis plus qu'enthousiaste à propos de **FastAPI**. C'est tellement fun !_ »
<div style="text-align: right; margin-right: 10%;">Brian Okken - <strong>Animateur du podcast [Python Bytes](https://pythonbytes.fm/episodes/show/123/time-to-right-the-py-wrongs?time_in_sec=855)</strong> <a href="https://x.com/brianokken/status/1112220079972728832"><small>(ref)</small></a></div>
---
« _Honnêtement, ce que vous avez construit a l'air super solide et soigné. À bien des égards, c'est ce que je voulais que **Hug** soit — c'est vraiment inspirant de voir quelqu'un construire ça._ »
« _Si quelqu’un cherche à construire une API Python de production, je recommande vivement **FastAPI**. Il est **magnifiquement conçu**, **simple à utiliser** et **hautement scalable** — il est devenu un **composant clé** de notre stratégie de développement API-first._ »
<div style="text-align: right; margin-right: 10%;">Timothy Crosley - <strong>Créateur de [Hug](https://github.com/hugapi/hug)</strong> <a href="https://news.ycombinator.com/item?id=19455465"><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>
---
« _Si vous cherchez à apprendre un **framework moderne** pour créer des APIs REST, regardez **FastAPI** [...] C'est rapide, facile à utiliser et facile à apprendre [...]_ »
« _Nous sommes passés à **FastAPI** pour nos **APIs** [...] Je pense que vous l'aimerez [...]_ »
<div style="text-align: right; margin-right: 10%;">Ines Montani - Matthew Honnibal - <strong>Fondateurs de [Explosion AI](https://explosion.ai) - Créateurs de [spaCy](https://spacy.io)</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>
</div>
---
## FastAPI Conf { #fastapi-conf }
« _Si quelqu'un cherche à construire une API Python de production, je recommande vivement **FastAPI**. Il est **magnifiquement conçu**, **simple à utiliser** et **hautement scalable**. Il est devenu un **composant clé** de notre stratégie de développement API-first et alimente de nombreuses automatisations et services tels que notre ingénieur TAC virtuel._ »
[**FastAPI Conf '26**](https://fastapiconf.com) aura lieu le **28 octobre 2026** à **Amsterdam, NL**. Tout sur FastAPI, à la source. 🎤
<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>
---
<a class="fastapi-feature-banner" href="https://fastapiconf.com"><img src="https://fastapi.tiangolo.com/img/fastapi-conf.jpeg" alt="FastAPI Conf '26 - 28 octobre 2026 - Amsterdam, NL"></a>
## Mini documentaire FastAPI { #fastapi-mini-documentary }
Un [mini documentaire FastAPI](https://www.youtube.com/watch?v=mpR8ngthqiE) est sorti fin 2025, vous pouvez le regarder en ligne :
<a href="https://www.youtube.com/watch?v=mpR8ngthqiE"><img src="https://fastapi.tiangolo.com/img/fastapi-documentary.jpg" alt="FastAPI Mini Documentary"></a>
<a class="fastapi-feature-banner" href="https://www.youtube.com/watch?v=mpR8ngthqiE"><img src="https://fastapi.tiangolo.com/img/fastapi-documentary.jpg" alt="FastAPI Mini Documentary"></a>
## **Typer**, le FastAPI des CLIs { #typer-the-fastapi-of-clis }

2
docs/fr/docs/virtual-environments.md

@ -819,7 +819,7 @@ Traceback (most recent call last):
</div>
Mais si vous désactivez l’environnement virtuel et activez le nouveau pour `prisoner-of-askaban`, alors lorsque vous exécuterez `python`, il utilisera le Python de l’environnement virtuel de `prisoner-of-azkaban`.
Mais si vous désactivez l’environnement virtuel et activez le nouveau pour `prisoner-of-azkaban`, alors lorsque vous exécuterez `python`, il utilisera le Python de l’environnement virtuel de `prisoner-of-azkaban`.
<div class="termy">

1
docs/ko/docs/advanced/generate-clients.md

@ -30,7 +30,6 @@ FastAPI는 **OpenAPI 3.1** 사양을 자동으로 생성하므로, 사용하는
예를 들어 다음을 사용해 볼 수 있습니다:
* [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)

91
docs/ko/docs/index.md

@ -54,18 +54,27 @@ FastAPI는 현대적이고, 빠르며(고성능), 파이썬 표준 타입 힌트
### 키스톤 스폰서 { #keystone-sponsor }
<div class="fastapi-sponsors fastapi-sponsors--keystone">
{% for sponsor in sponsors.keystone -%}
<a href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
<a class="fastapi-sponsors__card fastapi-sponsors__card--keystone" href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img class="fastapi-sponsors__banner" src="{{ sponsor.img }}" alt="{{ sponsor.title }}"></a>
{% endfor -%}
</div>
### 골드 및 실버 스폰서 { #gold-and-silver-sponsors }
### 골드 스폰서 { #gold-sponsors }
<div class="fastapi-sponsors fastapi-sponsors--gold">
{% for sponsor in sponsors.gold -%}
<a href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
<a class="fastapi-sponsors__card fastapi-sponsors__card--gold" href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img class="fastapi-sponsors__banner" src="{{ sponsor.img }}" alt="{{ sponsor.title }}" loading="lazy"></a>
{% endfor -%}
{%- for sponsor in sponsors.silver -%}
<a href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
</div>
### 실버 스폰서 { #silver-sponsors }
<div class="fastapi-sponsors fastapi-sponsors--silver">
{% for sponsor in sponsors.silver -%}
<a class="fastapi-sponsors__card fastapi-sponsors__card--silver" href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img class="fastapi-sponsors__banner" src="{{ sponsor.img }}" alt="{{ sponsor.title }}" loading="lazy"></a>
{% endfor %}
</div>
<!-- /sponsors -->
@ -73,55 +82,81 @@ FastAPI는 현대적이고, 빠르며(고성능), 파이썬 표준 타입 힌트
## 의견들 { #opinions }
"_[...] 저는 요즘 **FastAPI**를 많이 사용하고 있습니다. [...] 사실 우리 팀의 **마이크로소프트 ML 서비스** 전부를 바꿀 계획입니다. 그중 일부는 핵심 **Windows**와 몇몇의 **Office** 제품들이 통합되고 있습니다._"
<!-- only-mkdocs -->
<div class="fastapi-opinions" data-fastapi-opinions>
<div class="fastapi-opinions__tabs" role="tablist" aria-label="Companies using FastAPI">
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-microsoft" aria-controls="fo-panel-microsoft" aria-selected="true" tabindex="0">
<span class="fastapi-opinions__mark"><img src="/img/logos/microsoft.svg" alt="Microsoft" loading="lazy"></span>
</button>
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-uber" aria-controls="fo-panel-uber" aria-selected="false" tabindex="-1">
<span class="fastapi-opinions__mark"><img src="/img/logos/uber.svg" alt="Uber" loading="lazy"></span>
</button>
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-netflix" aria-controls="fo-panel-netflix" aria-selected="false" tabindex="-1">
<span class="fastapi-opinions__mark"><img src="/img/logos/netflix.svg" alt="Netflix" loading="lazy"></span>
</button>
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-cisco" aria-controls="fo-panel-cisco" aria-selected="false" tabindex="-1">
<span class="fastapi-opinions__mark"><img src="/img/logos/cisco.svg" alt="Cisco" loading="lazy"></span>
</button>
</div>
<div class="fastapi-opinions__panel" id="fo-panel-microsoft" role="tabpanel" aria-labelledby="fo-tab-microsoft" tabindex="0">
<blockquote class="fastapi-opinions__quote">"저는 요즘 <strong>FastAPI</strong>를 많이 사용하고 있습니다. 우리 팀의 모든 <strong>마이크로소프트 ML 서비스</strong>에 사용할 계획입니다. 그중 일부는 핵심 <strong>Windows</strong> 제품과 일부 <strong>Office</strong> 제품에 통합되고 있습니다."</blockquote>
<div class="fastapi-opinions__attr">— Kabir Khan, <strong>Microsoft</strong> <a href="https://github.com/fastapi/fastapi/pull/26">(ref)</a></div>
</div>
<div class="fastapi-opinions__panel" id="fo-panel-uber" role="tabpanel" aria-labelledby="fo-tab-uber" tabindex="0" hidden>
<blockquote class="fastapi-opinions__quote">"우리는 <strong>FastAPI</strong> 라이브러리를 채택해 <strong>예측</strong>을 얻기 위해 쿼리할 수 있는 <strong>REST</strong> 서버를 생성했습니다." <em>[Ludwig을 위해]</em></blockquote>
<div class="fastapi-opinions__attr">— Piero Molino, Yaroslav Dudin, Sai Sumanth Miryala, <strong>Uber</strong> <a href="https://eng.uber.com/ludwig-v0-2/">(ref)</a></div>
</div>
<div class="fastapi-opinions__panel" id="fo-panel-netflix" role="tabpanel" aria-labelledby="fo-tab-netflix" tabindex="0" hidden>
<blockquote class="fastapi-opinions__quote">"<strong>Netflix</strong>는 우리의 <strong>위기 관리</strong> 오케스트레이션 프레임워크인 <strong>Dispatch</strong>의 오픈 소스 공개를 발표하게 되어 기쁩니다!" <em>[FastAPI로 빌드]</em></blockquote>
<div class="fastapi-opinions__attr">— Kevin Glisson, Marc Vilanova, Forest Monsen, <strong>Netflix</strong> <a href="https://netflixtechblog.com/introducing-dispatch-da4b8a2a8072">(ref)</a></div>
</div>
<div class="fastapi-opinions__panel" id="fo-panel-cisco" role="tabpanel" aria-labelledby="fo-tab-cisco" tabindex="0" hidden>
<blockquote class="fastapi-opinions__quote">"프로덕션 Python API를 만들고자 한다면, 저는 <strong>FastAPI</strong>를 강력히 추천합니다. <strong>아름답게 설계</strong>되었고, <strong>사용이 간단</strong>하며, <strong>확장성이 매우 뛰어납니다</strong> — 우리의 API 우선 개발 전략에서 <strong>핵심 구성 요소</strong>가 되었습니다."</blockquote>
<div class="fastapi-opinions__attr">— Deon Pillsbury, <strong>Cisco</strong> <a href="https://www.linkedin.com/posts/deonpillsbury_cisco-cx-python-activity-6963242628536487936-trAp/">(ref)</a></div>
</div>
</div>
<!-- /only-mkdocs -->
<div style="text-align: right; margin-right: 10%;">Kabir Khan - <strong>마이크로소프트</strong> <a href="https://github.com/fastapi/fastapi/pull/26"><small>(ref)</small></a></div>
<div class="only-github" markdown="1">
---
"_**FastAPI** 라이브러리를 채택하여 **예측**을 얻기 위해 쿼리를 실행 할 수 있는 **REST** 서버를 생성했습니다. [Ludwig을 위해]_"
"_[...] 저는 요즘 **FastAPI**를 많이 사용하고 있습니다. [...] 사실 우리 팀의 **마이크로소프트 ML 서비스** 전부를 바꿀 계획입니다. 그중 일부는 핵심 **Windows**와 몇몇의 **Office** 제품들이 통합되고 있습니다._"
<div style="text-align: right; margin-right: 10%;">Piero Molino, Yaroslav Dudin 그리고 Sai Sumanth Miryala - <strong>우버</strong> <a href="https://eng.uber.com/ludwig-v0-2/"><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>
---
"_**Netflix**는 우리의 오픈 소스 배포판인 **위기 관리** 오케스트레이션 프레임워크를 발표할 수 있어 기쁩니다: 바로 **Dispatch**입니다! [**FastAPI**로 빌드]_"
"_**FastAPI** 라이브러리를 채택하여 **예측**을 얻기 위해 쿼리를 실행할 수 있는 **REST** 서버를 생성했습니다. [Ludwig을 위해]_"
<div style="text-align: right; margin-right: 10%;">Kevin Glisson, Marc Vilanova, Forest Monsen - <strong>넷플릭스</strong> <a href="https://netflixtechblog.com/introducing-dispatch-da4b8a2a8072"><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>
---
"_**FastAPI**가 너무 좋아서 구름 위를 걷는듯 합니다. 정말 즐겁습니다!_"
"_**Netflix**는 우리의 오픈 소스 배포판인 **위기 관리** 오케스트레이션 프레임워크를 발표할 수 있어 기쁩니다: 바로 **Dispatch**입니다! [**FastAPI**로 빌드]_"
<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>
<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>
---
"_솔직히, 당신이 만든 것은 매우 견고하고 세련되어 보입니다. 여러 면에서 **Hug**가 이렇게 되었으면 합니다 - 그걸 만든 누군가를 보는 것은 많은 영감을 줍니다._"
"_프로덕션 Python API를 만들고자 한다면, 저는 **FastAPI**를 강력히 추천합니다. **아름답게 설계**되었고, **사용이 간단**하며, **확장성이 매우 뛰어나** 우리의 API 우선 개발 전략에서 **핵심 구성 요소**가 되었습니다._"
<div style="text-align: right; margin-right: 10%;">Timothy Crosley - <strong>[Hug](https://github.com/hugapi/hug) 제작자</strong> <a href="https://news.ycombinator.com/item?id=19455465"><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>
---
"_REST API를 만들기 위해 **현대적인 프레임워크**를 찾고 있다면 **FastAPI**를 확인해 보십시오. [...] 빠르고, 쓰기 쉽고, 배우기도 쉽습니다 [...]_"
"_우리 **API**를 **FastAPI**로 바꿨습니다 [...] 아마 여러분도 좋아하실 것입니다 [...]_"
<div style="text-align: right; margin-right: 10%;">Ines Montani - Matthew Honnibal - <strong>[Explosion AI](https://explosion.ai) 설립자 - [spaCy](https://spacy.io) 제작자</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>
</div>
---
## FastAPI Conf { #fastapi-conf }
"_프로덕션 Python API를 만들고자 한다면, 저는 **FastAPI**를 강력히 추천합니다. **아름답게 설계**되었고, **사용이 간단**하며, **확장성이 매우 뛰어나**고, 우리의 API 우선 개발 전략에서 **핵심 구성 요소**가 되었으며 Virtual TAC Engineer 같은 많은 자동화와 서비스를 이끌고 있습니다._"
[**FastAPI Conf '26**](https://fastapiconf.com)은 **2026년 10월 28일**, **네덜란드 암스테르담**에서 열립니다. FastAPI에 관한 모든 것, 바로 출처에서. 🎤
<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>
---
<a class="fastapi-feature-banner" href="https://fastapiconf.com"><img src="https://fastapi.tiangolo.com/img/fastapi-conf.jpeg" alt="FastAPI Conf '26 - October 28, 2026 - Amsterdam, NL"></a>
## FastAPI 미니 다큐멘터리 { #fastapi-mini-documentary }
2025년 말에 공개된 [FastAPI 미니 다큐멘터리](https://www.youtube.com/watch?v=mpR8ngthqiE)가 있습니다. 온라인에서 시청할 수 있습니다:
<a href="https://www.youtube.com/watch?v=mpR8ngthqiE"><img src="https://fastapi.tiangolo.com/img/fastapi-documentary.jpg" alt="FastAPI Mini Documentary"></a>
<a class="fastapi-feature-banner" href="https://www.youtube.com/watch?v=mpR8ngthqiE"><img src="https://fastapi.tiangolo.com/img/fastapi-documentary.jpg" alt="FastAPI Mini Documentary"></a>
## **Typer**, CLI를 위한 FastAPI { #typer-the-fastapi-of-clis }

42
docs/ko/docs/virtual-environments.md

@ -2,13 +2,13 @@
Python 프로젝트를 작업할 때는 **가상 환경**(또는 이와 유사한 메커니즘)을 사용해 각 프로젝트마다 설치하는 패키지를 분리하는 것이 좋습니다.
/// info
/// note | 참고
이미 가상 환경에 대해 알고 있고, 어떻게 생성하고 사용하는지도 알고 있다면, 이 섹션은 건너뛰어도 괜찮습니다. 🤓
///
/// tip
/// tip | 팁
**가상 환경**은 **환경 변수**와 다릅니다.
@ -18,7 +18,7 @@ Python 프로젝트를 작업할 때는 **가상 환경**(또는 이와 유사
///
/// info
/// note | 참고
이 페이지에서는 **가상 환경**을 사용하는 방법과 작동 방식을 알려드립니다.
@ -55,7 +55,7 @@ $ cd awesome-project
Python 프로젝트를 **처음 시작할 때**, 가상 환경을 **<dfn title="다른 옵션도 있지만, 이것은 간단한 가이드라인입니다">프로젝트 내부</dfn>**에 생성하세요.
/// tip
/// tip | 팁
이 작업은 **프로젝트당 한 번만** 하면 되며, 작업할 때마다 할 필요는 없습니다.
@ -96,7 +96,7 @@ $ uv venv
</div>
/// tip
/// tip | 팁
기본적으로 `uv``.venv`라는 디렉터리에 가상 환경을 생성합니다.
@ -118,7 +118,7 @@ $ uv venv
이후 실행하는 Python 명령어와 설치하는 패키지가 새 가상 환경을 사용하도록, 새 가상 환경을 활성화하세요.
/// tip
/// tip | 팁
프로젝트 작업을 위해 **새 터미널 세션**을 시작할 때마다 **매번** 이 작업을 하세요.
@ -162,7 +162,7 @@ $ source .venv/Scripts/activate
////
/// tip
/// tip | 팁
해당 환경에 **새 패키지**를 설치할 때마다, 환경을 다시 **활성화**하세요.
@ -174,7 +174,7 @@ $ source .venv/Scripts/activate
가상 환경이 활성화되어 있는지(이전 명령어가 작동했는지) 확인합니다.
/// tip
/// tip | 팁
이 단계는 **선택 사항**이지만, 모든 것이 예상대로 작동하고 있는지, 그리고 의도한 가상 환경을 사용하고 있는지 **확인**하는 좋은 방법입니다.
@ -214,7 +214,7 @@ C:\Users\user\code\awesome-project\.venv\Scripts\python
## `pip` 업그레이드 { #upgrade-pip }
/// tip
/// tip | 팁
[`uv`](https://github.com/astral-sh/uv)를 사용한다면, `pip` 대신 `uv`로 설치하게 되므로 `pip`을 업그레이드할 필요가 없습니다. 😎
@ -224,7 +224,7 @@ C:\Users\user\code\awesome-project\.venv\Scripts\python
패키지 설치 중 발생하는 다양한 특이한 오류는 먼저 `pip`를 업그레이드하는 것만으로 해결되는 경우가 많습니다.
/// tip
/// tip | 팁
보통 이 작업은 가상 환경을 만든 직후 **한 번만** 하면 됩니다.
@ -242,7 +242,7 @@ $ python -m pip install --upgrade pip
</div>
/// tip
/// tip | 팁
때로는 pip를 업그레이드하려고 할 때 **`No module named pip`** 오류가 발생할 수 있습니다.
@ -266,13 +266,13 @@ $ python -m ensurepip --upgrade
**Git**을 사용하고 있다면(사용하는 것이 좋습니다), `.venv`의 모든 내용을 Git에서 제외하도록 `.gitignore` 파일을 추가하세요.
/// tip
/// tip | 팁
[`uv`](https://github.com/astral-sh/uv)로 가상 환경을 만들었다면, 이미 자동으로 처리되어 있으므로 이 단계는 건너뛰어도 됩니다. 😎
///
/// tip
/// tip | 팁
가상 환경을 만든 직후 **한 번만** 하면 됩니다.
@ -306,7 +306,7 @@ $ echo "*" > .venv/.gitignore
환경을 활성화한 뒤, 그 안에 패키지를 설치할 수 있습니다.
/// tip
/// tip | 팁
프로젝트에 필요한 패키지를 설치하거나 업그레이드할 때는 **한 번**만 하면 됩니다.
@ -318,7 +318,7 @@ $ echo "*" > .venv/.gitignore
급하게 작업 중이고 프로젝트의 패키지 요구사항을 선언하는 파일을 사용하고 싶지 않다면, 패키지를 직접 설치할 수 있습니다.
/// tip
/// tip | 팁
프로그램에 필요한 패키지와 버전을 파일(예: `requirements.txt` 또는 `pyproject.toml`)에 적어두는 것은 (매우) 좋은 생각입니다.
@ -419,7 +419,7 @@ Hello World
* [VS Code](https://code.visualstudio.com/docs/python/environments#_select-and-activate-an-environment)
* [PyCharm](https://www.jetbrains.com/help/pycharm/creating-virtual-environment.html)
/// tip
/// tip | 팁
보통 이 설정은 가상 환경을 만들 때 **한 번만** 하면 됩니다.
@ -445,7 +445,7 @@ $ deactivate
/// tip
/// tip | 팁
위의 내용이 무엇인지 더 이해하고 싶으신가요?
@ -536,7 +536,7 @@ flowchart LR
end
```
/// tip
/// tip | 팁
Python 패키지에서는 **새 버전**에서 **호환성을 깨뜨리는 변경(breaking changes)**을 **피하려고** 최선을 다하는 것이 매우 일반적이지만, 안전을 위해 더 최신 버전은 의도적으로 설치하고, 테스트를 실행해 모든 것이 올바르게 작동하는지 확인할 수 있을 때 설치하는 것이 좋습니다.
@ -643,7 +643,7 @@ $ source .venv/Scripts/activate
그 변수 중 하나가 `PATH` 변수입니다.
/// tip
/// tip | 팁
`PATH` 환경 변수에 대해 더 알아보려면 [환경 변수](environment-variables.md#path-environment-variable) 섹션을 참고하세요.
@ -776,7 +776,7 @@ Linux와 macOS에서는 `which`, Windows PowerShell에서는 `Get-Command`를
따라서 올바른 가상 환경에 있는지 확인할 수 있습니다.
/// tip
/// tip | 팁
가상 환경을 하나 활성화해서 Python을 사용한 다음, **다른 프로젝트로 이동**하기 쉽습니다.
@ -819,7 +819,7 @@ Traceback (most recent call last):
</div>
하지만 가상 환경을 비활성화하고 `prisoner-of-askaban`에 대한 새 가상 환경을 활성화하면, `python`을 실행할 때 `prisoner-of-azkaban`의 가상 환경에 있는 Python을 사용하게 됩니다.
하지만 가상 환경을 비활성화하고 `prisoner-of-azkaban`에 대한 새 가상 환경을 활성화하면, `python`을 실행할 때 `prisoner-of-azkaban`의 가상 환경에 있는 Python을 사용하게 됩니다.
<div class="termy">

1
docs/ru/docs/advanced/generate-clients.md

@ -30,7 +30,6 @@ FastAPI автоматически генерирует спецификации
Например, вы можете попробовать:
* [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)

85
docs/ru/docs/index.md

@ -40,7 +40,7 @@ FastAPI — это современный, быстрый (высокопрои
* **Скорость**: Очень высокая производительность, на уровне **NodeJS** и **Go** (благодаря Starlette и Pydantic). [Один из самых быстрых доступных фреймворков Python](#performance).
* **Быстрота разработки**: Увеличьте скорость разработки фич примерно на 200–300%. *
* **Меньше ошибок**: Сократите примерно на 40% количество ошибок, вызванных человеком (разработчиком). *
* **Интуитивность**: Отличная поддержка редактора кода. <dfn title="также известное как: автодополнение, автозавершение, IntelliSense">Автозавершение</dfn> везде. Меньше времени на отладку.
* **Интуитивность**: Отличная поддержка редактора кода. <dfn title="также известно как: автозавершение, IntelliSense">Автозавершение</dfn> везде. Меньше времени на отладку.
* **Простота**: Разработан так, чтобы его было легко использовать и осваивать. Меньше времени на чтение документации.
* **Краткость**: Минимизируйте дублирование кода. Несколько возможностей из каждого объявления параметров. Меньше ошибок.
* **Надежность**: Получите код, готовый к продакшн. С автоматической интерактивной документацией.
@ -54,18 +54,27 @@ FastAPI — это современный, быстрый (высокопрои
### Ключевой-спонсор { #keystone-sponsor }
<div class="fastapi-sponsors fastapi-sponsors--keystone">
{% for sponsor in sponsors.keystone -%}
<a href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
<a class="fastapi-sponsors__card fastapi-sponsors__card--keystone" href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img class="fastapi-sponsors__banner" src="{{ sponsor.img }}" alt="{{ sponsor.title }}"></a>
{% endfor -%}
</div>
### Золотые и серебряные спонсоры { #gold-and-silver-sponsors }
### Золотые спонсоры { #gold-sponsors }
<div class="fastapi-sponsors fastapi-sponsors--gold">
{% for sponsor in sponsors.gold -%}
<a href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
<a class="fastapi-sponsors__card fastapi-sponsors__card--gold" href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img class="fastapi-sponsors__banner" src="{{ sponsor.img }}" alt="{{ sponsor.title }}" loading="lazy"></a>
{% endfor -%}
{%- for sponsor in sponsors.silver -%}
<a href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
</div>
### Серебряные спонсоры { #silver-sponsors }
<div class="fastapi-sponsors fastapi-sponsors--silver">
{% for sponsor in sponsors.silver -%}
<a class="fastapi-sponsors__card fastapi-sponsors__card--silver" href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img class="fastapi-sponsors__banner" src="{{ sponsor.img }}" alt="{{ sponsor.title }}" loading="lazy"></a>
{% endfor %}
</div>
<!-- /sponsors -->
@ -73,6 +82,44 @@ FastAPI — это современный, быстрый (высокопрои
## Мнения { #opinions }
<!-- only-mkdocs -->
<div class="fastapi-opinions" data-fastapi-opinions>
<div class="fastapi-opinions__tabs" role="tablist" aria-label="Компании, использующие FastAPI">
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-microsoft" aria-controls="fo-panel-microsoft" aria-selected="true" tabindex="0">
<span class="fastapi-opinions__mark"><img src="/img/logos/microsoft.svg" alt="Microsoft" loading="lazy"></span>
</button>
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-uber" aria-controls="fo-panel-uber" aria-selected="false" tabindex="-1">
<span class="fastapi-opinions__mark"><img src="/img/logos/uber.svg" alt="Uber" loading="lazy"></span>
</button>
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-netflix" aria-controls="fo-panel-netflix" aria-selected="false" tabindex="-1">
<span class="fastapi-opinions__mark"><img src="/img/logos/netflix.svg" alt="Netflix" loading="lazy"></span>
</button>
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-cisco" aria-controls="fo-panel-cisco" aria-selected="false" tabindex="-1">
<span class="fastapi-opinions__mark"><img src="/img/logos/cisco.svg" alt="Cisco" loading="lazy"></span>
</button>
</div>
<div class="fastapi-opinions__panel" id="fo-panel-microsoft" role="tabpanel" aria-labelledby="fo-tab-microsoft" tabindex="0">
<blockquote class="fastapi-opinions__quote">«В последнее время я много где использую <strong>FastAPI</strong>. На самом деле я планирую использовать его для всех <strong>ML-сервисов моей команды в Microsoft</strong>. Некоторые из них интегрируются в основной продукт <strong>Windows</strong>, а некоторые — в продукты <strong>Office</strong>».</blockquote>
<div class="fastapi-opinions__attr">— Kabir Khan, <strong>Microsoft</strong> <a href="https://github.com/fastapi/fastapi/pull/26">(ref)</a></div>
</div>
<div class="fastapi-opinions__panel" id="fo-panel-uber" role="tabpanel" aria-labelledby="fo-tab-uber" tabindex="0" hidden>
<blockquote class="fastapi-opinions__quote">«Мы начали использовать библиотеку <strong>FastAPI</strong>, чтобы поднять <strong>REST</strong>-сервер, к которому можно обращаться за <strong>предсказаниями</strong>». <em>[для Ludwig]</em></blockquote>
<div class="fastapi-opinions__attr">— Piero Molino, Yaroslav Dudin, Sai Sumanth Miryala, <strong>Uber</strong> <a href="https://eng.uber.com/ludwig-v0-2/">(ref)</a></div>
</div>
<div class="fastapi-opinions__panel" id="fo-panel-netflix" role="tabpanel" aria-labelledby="fo-tab-netflix" tabindex="0" hidden>
<blockquote class="fastapi-opinions__quote">«<strong>Netflix</strong> рада объявить об открытом релизе нашего фреймворка оркестрации <strong>антикризисного управления</strong>: <strong>Dispatch</strong><em>[создан с помощью FastAPI]</em></blockquote>
<div class="fastapi-opinions__attr">— Kevin Glisson, Marc Vilanova, Forest Monsen, <strong>Netflix</strong> <a href="https://netflixtechblog.com/introducing-dispatch-da4b8a2a8072">(ref)</a></div>
</div>
<div class="fastapi-opinions__panel" id="fo-panel-cisco" role="tabpanel" aria-labelledby="fo-tab-cisco" tabindex="0" hidden>
<blockquote class="fastapi-opinions__quote">«Если вы собираетесь делать продакшн-API на Python, я настоятельно рекомендую <strong>FastAPI</strong>. Он <strong>прекрасно спроектирован</strong>, <strong>прост в использовании</strong> и <strong>отлично масштабируется</strong> — он стал <strong>ключевым компонентом</strong> нашей стратегии API-first».</blockquote>
<div class="fastapi-opinions__attr">— Deon Pillsbury, <strong>Cisco</strong> <a href="https://www.linkedin.com/posts/deonpillsbury_cisco-cx-python-activity-6963242628536487936-trAp/">(ref)</a></div>
</div>
</div>
<!-- /only-mkdocs -->
<div class="only-github" markdown="1">
"_[...] В последнее время я много где использую **FastAPI**. [...] На самом деле я планирую использовать его для всех **ML-сервисов моей команды в Microsoft**. Некоторые из них интегрируются в основной продукт **Windows**, а некоторые — в продукты **Office**._"
<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>
@ -91,37 +138,25 @@ FastAPI — это современный, быстрый (высокопрои
---
"_Я в полном восторге от **FastAPI**. Это так весело!_"
<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)</strong> <a href="https://x.com/brianokken/status/1112220079972728832"><small>(ref)</small></a></div>
---
"_Честно говоря, то, что вы создали, выглядит очень солидно и отполировано. Во многих смыслах это то, чем я хотел видеть **Hug** — очень вдохновляет видеть, как кто-то это создал._"
"_Если кто-то собирается делать продакшн-API на Python, я настоятельно рекомендую **FastAPI**. Он **прекрасно спроектирован**, **прост в использовании** и **отлично масштабируется**, стал **ключевым компонентом** нашей стратегии API-first и приводит в действие множество автоматизаций и сервисов, таких как наш Virtual TAC Engineer._"
<div style="text-align: right; margin-right: 10%;">Timothy Crosley - <strong>Создатель [Hug](https://github.com/hugapi/hug)</strong> <a href="https://news.ycombinator.com/item?id=19455465"><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>
---
"_Если вы хотите изучить один **современный фреймворк** для создания REST API, посмотрите **FastAPI** [...] Он быстрый, простой в использовании и лёгкий в изучении [...]_"
"_Мы переключились на **FastAPI** для наших **API** [...] Думаю, вам тоже понравится [...]_"
<div style="text-align: right; margin-right: 10%;">Ines Montani - Matthew Honnibal - <strong>Основатели [Explosion AI](https://explosion.ai) — создатели [spaCy](https://spacy.io)</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>
---
</div>
"_Если кто-то собирается делать продакшн-API на Python, я настоятельно рекомендую **FastAPI**. Он **прекрасно спроектирован**, **прост в использовании** и **отлично масштабируется**, стал **ключевым компонентом** нашей стратегии API-first и приводит в действие множество автоматизаций и сервисов, таких как наш Virtual TAC Engineer._"
## FastAPI Conf { #fastapi-conf }
<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 Conf '26**](https://fastapiconf.com) пройдёт **28 октября 2026** в **Амстердаме, Нидерланды**. Всё о FastAPI — из первых рук. 🎤
---
<a class="fastapi-feature-banner" href="https://fastapiconf.com"><img src="https://fastapi.tiangolo.com/img/fastapi-conf.jpeg" alt="FastAPI Conf '26 — 28 октября 2026 — Амстердам, Нидерланды"></a>
## Мини-документальный фильм о FastAPI { #fastapi-mini-documentary }
В конце 2025 года вышел [мини-документальный фильм о FastAPI](https://www.youtube.com/watch?v=mpR8ngthqiE), вы можете посмотреть его онлайн:
<a href="https://www.youtube.com/watch?v=mpR8ngthqiE"><img src="https://fastapi.tiangolo.com/img/fastapi-documentary.jpg" alt="FastAPI Mini Documentary"></a>
<a class="fastapi-feature-banner" href="https://www.youtube.com/watch?v=mpR8ngthqiE"><img src="https://fastapi.tiangolo.com/img/fastapi-documentary.jpg" alt="FastAPI Mini Documentary"></a>
## **Typer**, FastAPI для CLI { #typer-the-fastapi-of-clis }

2
docs/ru/docs/virtual-environments.md

@ -819,7 +819,7 @@ Traceback (most recent call last):
</div>
Но если вы деактивируете виртуальное окружение и активируете новое для `prisoner-of-askaban`, тогда при запуске `python` он будет использовать Python из виртуального окружения `prisoner-of-azkaban`.
Но если вы деактивируете виртуальное окружение и активируете новое для `prisoner-of-azkaban`, тогда при запуске `python` он будет использовать Python из виртуального окружения `prisoner-of-azkaban`.
<div class="termy">

1
docs/zh-hant/docs/advanced/generate-clients.md

@ -30,7 +30,6 @@ FastAPI 會自動產生 **OpenAPI 3.1** 規格,因此你使用的任何工具
例如,你可以嘗試:
* [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)

83
docs/zh-hant/docs/index.md

@ -54,18 +54,27 @@ FastAPI 是一個現代、快速(高效能)的 Web 框架,用於以 Python
### 基石贊助商 { #keystone-sponsor }
<div class="fastapi-sponsors fastapi-sponsors--keystone">
{% for sponsor in sponsors.keystone -%}
<a href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
<a class="fastapi-sponsors__card fastapi-sponsors__card--keystone" href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img class="fastapi-sponsors__banner" src="{{ sponsor.img }}" alt="{{ sponsor.title }}"></a>
{% endfor -%}
</div>
### 金級與銀級贊助商 { #gold-and-silver-sponsors }
### 金級贊助商 { #gold-sponsors }
<div class="fastapi-sponsors fastapi-sponsors--gold">
{% for sponsor in sponsors.gold -%}
<a href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
<a class="fastapi-sponsors__card fastapi-sponsors__card--gold" href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img class="fastapi-sponsors__banner" src="{{ sponsor.img }}" alt="{{ sponsor.title }}" loading="lazy"></a>
{% endfor -%}
{%- for sponsor in sponsors.silver -%}
<a href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
</div>
### 銀級贊助商 { #silver-sponsors }
<div class="fastapi-sponsors fastapi-sponsors--silver">
{% for sponsor in sponsors.silver -%}
<a class="fastapi-sponsors__card fastapi-sponsors__card--silver" href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img class="fastapi-sponsors__banner" src="{{ sponsor.img }}" alt="{{ sponsor.title }}" loading="lazy"></a>
{% endfor %}
</div>
<!-- /sponsors -->
@ -73,6 +82,44 @@ FastAPI 是一個現代、快速(高效能)的 Web 框架,用於以 Python
## 評價 { #opinions }
<!-- only-mkdocs -->
<div class="fastapi-opinions" data-fastapi-opinions>
<div class="fastapi-opinions__tabs" role="tablist" aria-label="Companies using FastAPI">
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-microsoft" aria-controls="fo-panel-microsoft" aria-selected="true" tabindex="0">
<span class="fastapi-opinions__mark"><img src="/img/logos/microsoft.svg" alt="Microsoft" loading="lazy"></span>
</button>
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-uber" aria-controls="fo-panel-uber" aria-selected="false" tabindex="-1">
<span class="fastapi-opinions__mark"><img src="/img/logos/uber.svg" alt="Uber" loading="lazy"></span>
</button>
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-netflix" aria-controls="fo-panel-netflix" aria-selected="false" tabindex="-1">
<span class="fastapi-opinions__mark"><img src="/img/logos/netflix.svg" alt="Netflix" loading="lazy"></span>
</button>
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-cisco" aria-controls="fo-panel-cisco" aria-selected="false" tabindex="-1">
<span class="fastapi-opinions__mark"><img src="/img/logos/cisco.svg" alt="Cisco" loading="lazy"></span>
</button>
</div>
<div class="fastapi-opinions__panel" id="fo-panel-microsoft" role="tabpanel" aria-labelledby="fo-tab-microsoft" tabindex="0">
<blockquote class="fastapi-opinions__quote">「近期大量使用 <strong>FastAPI</strong>。我實際上打算把它用在我在 <strong>微軟</strong> 團隊的所有 <strong>機器學習服務</strong> 上。其中一些正整合進核心的 <strong>Windows</strong> 與部分 <strong>Office</strong> 產品。」</blockquote>
<div class="fastapi-opinions__attr">— Kabir Khan,<strong>Microsoft</strong> <a href="https://github.com/fastapi/fastapi/pull/26">(ref)</a></div>
</div>
<div class="fastapi-opinions__panel" id="fo-panel-uber" role="tabpanel" aria-labelledby="fo-tab-uber" tabindex="0" hidden>
<blockquote class="fastapi-opinions__quote">「我們採用了 <strong>FastAPI</strong> 函式庫來啟動一個可供查詢以取得 <strong>預測</strong><strong>REST</strong> 伺服器。」 <em>[for Ludwig]</em></blockquote>
<div class="fastapi-opinions__attr">— Piero Molino、Yaroslav Dudin、Sai Sumanth Miryala,<strong>Uber</strong> <a href="https://eng.uber.com/ludwig-v0-2/">(ref)</a></div>
</div>
<div class="fastapi-opinions__panel" id="fo-panel-netflix" role="tabpanel" aria-labelledby="fo-tab-netflix" tabindex="0" hidden>
<blockquote class="fastapi-opinions__quote"><strong>Netflix</strong> 很高興宣布我們的 <strong>危機管理</strong> 協調框架 <strong>Dispatch</strong> 開源!」 <em>[使用 FastAPI 建構]</em></blockquote>
<div class="fastapi-opinions__attr">— Kevin Glisson、Marc Vilanova、Forest Monsen,<strong>Netflix</strong> <a href="https://netflixtechblog.com/introducing-dispatch-da4b8a2a8072">(ref)</a></div>
</div>
<div class="fastapi-opinions__panel" id="fo-panel-cisco" role="tabpanel" aria-labelledby="fo-tab-cisco" tabindex="0" hidden>
<blockquote class="fastapi-opinions__quote">「如果有人想要打造一個可用於生產環境的 Python API,我強力推薦 <strong>FastAPI</strong>。它 <strong>設計優雅</strong><strong>簡單易用</strong><strong>高度可擴展</strong>——已成為我們 API-first 開發策略中的 <strong>關鍵元件</strong>。」</blockquote>
<div class="fastapi-opinions__attr">— Deon Pillsbury,<strong>Cisco</strong> <a href="https://www.linkedin.com/posts/deonpillsbury_cisco-cx-python-activity-6963242628536487936-trAp/">(ref)</a></div>
</div>
</div>
<!-- /only-mkdocs -->
<div class="only-github" markdown="1">
"_[...] 近期大量使用 **FastAPI**。[...] 我實際上打算在我在**微軟**團隊的所有**機器學習**服務上使用它。其中一些正在整合到核心的 **Windows** 產品,以及一些 **Office** 產品。_"
<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>
@ -91,37 +138,25 @@ FastAPI 是一個現代、快速(高效能)的 Web 框架,用於以 Python
---
"_我對 **FastAPI** 興奮得不得了。超好玩!_"
<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 主持人</strong> <a href="https://x.com/brianokken/status/1112220079972728832"><small>(ref)</small></a></div>
---
"_老實說,你們做的看起來非常穩健又精緻。很多方面都正是我希望 **Hug** 成為的樣子——看到有人把它建出來真的很鼓舞人心。_"
"_如果有人想要打造一個可用於生產環境的 Python API,我強力推薦 **FastAPI**。它**設計優雅**、**簡單易用**且**高度可擴展**,已經成為我們 API first 開發策略中的**關鍵元件**,推動了許多自動化與服務,例如我們的 Virtual TAC Engineer._"
<div style="text-align: right; margin-right: 10%;">Timothy Crosley - <strong>[Hug](https://github.com/hugapi/hug) 創作者</strong> <a href="https://news.ycombinator.com/item?id=19455465"><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>
---
"_如果你想學一個用於構建 REST API 的**現代框架**,看看 **FastAPI** [...] 它很快、易用、也容易學習 [...]_"
"_我們的 **API** 已經改用 **FastAPI** [...] 我想你會喜歡它 [...]_"
<div style="text-align: right; margin-right: 10%;">Ines Montani - Matthew Honnibal - <strong>[Explosion AI](https://explosion.ai) 創辦人 - [spaCy](https://spacy.io) 創作者</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>
</div>
---
## FastAPI 大會 { #fastapi-conf }
"_如果有人想要打造一個可用於生產環境的 Python API,我強力推薦 **FastAPI**。它**設計優雅**、**簡單易用**且**高度可擴展**,已經成為我們 API first 開發策略中的**關鍵元件**,推動了許多自動化與服務,例如我們的 Virtual TAC Engineer。_"
[**FastAPI Conf '26**](https://fastapiconf.com) 將於 **2026 年 10 月 28 日****荷蘭阿姆斯特丹** 舉行。全部關於 FastAPI,來自第一手來源。🎤
<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>
---
<a class="fastapi-feature-banner" href="https://fastapiconf.com"><img src="https://fastapi.tiangolo.com/img/fastapi-conf.jpeg" alt="FastAPI Conf '26 - October 28, 2026 - Amsterdam, NL"></a>
## FastAPI 迷你紀錄片 { #fastapi-mini-documentary }
在 2025 年底發布了一支 [FastAPI 迷你紀錄片](https://www.youtube.com/watch?v=mpR8ngthqiE),你可以在線上觀看:
<a href="https://www.youtube.com/watch?v=mpR8ngthqiE"><img src="https://fastapi.tiangolo.com/img/fastapi-documentary.jpg" alt="FastAPI Mini Documentary"></a>
<a class="fastapi-feature-banner" href="https://www.youtube.com/watch?v=mpR8ngthqiE"><img src="https://fastapi.tiangolo.com/img/fastapi-documentary.jpg" alt="FastAPI Mini Documentary"></a>
## **Typer**,命令列的 FastAPI { #typer-the-fastapi-of-clis }

2
docs/zh-hant/docs/virtual-environments.md

@ -294,7 +294,7 @@ $ echo "*" > .venv/.gitignore
`*` 對於 Git 來說意味著「所有內容」。所以,它會忽略 `.venv` 目錄中的所有內容。
該指令會建立一個名為 .gitignore 的檔案,內容如下:
該指令會建立一個名為 `.gitignore` 的檔案,內容如下:
```gitignore
*

1
docs/zh/docs/advanced/generate-clients.md

@ -30,7 +30,6 @@ FastAPI 会自动生成 **OpenAPI 3.1** 规范,因此你使用的任何工具
例如,你可以尝试:
* [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)

89
docs/zh/docs/index.md

@ -54,18 +54,27 @@ FastAPI 是一个用于构建 API 的现代、快速(高性能)的 Web 框
### Keystone 赞助商 { #keystone-sponsor }
<div class="fastapi-sponsors fastapi-sponsors--keystone">
{% for sponsor in sponsors.keystone -%}
<a href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
<a class="fastapi-sponsors__card fastapi-sponsors__card--keystone" href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img class="fastapi-sponsors__banner" src="{{ sponsor.img }}" alt="{{ sponsor.title }}"></a>
{% endfor -%}
</div>
### 金牌和银牌赞助商 { #gold-and-silver-sponsors }
### 金牌赞助商 { #gold-sponsors }
<div class="fastapi-sponsors fastapi-sponsors--gold">
{% for sponsor in sponsors.gold -%}
<a href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
<a class="fastapi-sponsors__card fastapi-sponsors__card--gold" href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img class="fastapi-sponsors__banner" src="{{ sponsor.img }}" alt="{{ sponsor.title }}" loading="lazy"></a>
{% endfor -%}
{%- for sponsor in sponsors.silver -%}
<a href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
</div>
### 银牌赞助商 { #silver-sponsors }
<div class="fastapi-sponsors fastapi-sponsors--silver">
{% for sponsor in sponsors.silver -%}
<a class="fastapi-sponsors__card fastapi-sponsors__card--silver" href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img class="fastapi-sponsors__banner" src="{{ sponsor.img }}" alt="{{ sponsor.title }}" loading="lazy"></a>
{% endfor %}
</div>
<!-- /sponsors -->
@ -73,13 +82,51 @@ FastAPI 是一个用于构建 API 的现代、快速(高性能)的 Web 框
## 评价 { #opinions }
「_[...] 最近我大量使用 **FastAPI**。[...] 我实际上计划把它用于我团队在 **微软** 的所有 **机器学习服务**。其中一些正在集成进核心 **Windows** 产品以及一些 **Office** 产品。_」
<!-- only-mkdocs -->
<div class="fastapi-opinions" data-fastapi-opinions>
<div class="fastapi-opinions__tabs" role="tablist" aria-label="Companies using FastAPI">
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-microsoft" aria-controls="fo-panel-microsoft" aria-selected="true" tabindex="0">
<span class="fastapi-opinions__mark"><img src="/img/logos/microsoft.svg" alt="Microsoft" loading="lazy"></span>
</button>
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-uber" aria-controls="fo-panel-uber" aria-selected="false" tabindex="-1">
<span class="fastapi-opinions__mark"><img src="/img/logos/uber.svg" alt="Uber" loading="lazy"></span>
</button>
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-netflix" aria-controls="fo-panel-netflix" aria-selected="false" tabindex="-1">
<span class="fastapi-opinions__mark"><img src="/img/logos/netflix.svg" alt="Netflix" loading="lazy"></span>
</button>
<button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-cisco" aria-controls="fo-panel-cisco" aria-selected="false" tabindex="-1">
<span class="fastapi-opinions__mark"><img src="/img/logos/cisco.svg" alt="Cisco" loading="lazy"></span>
</button>
</div>
<div class="fastapi-opinions__panel" id="fo-panel-microsoft" role="tabpanel" aria-labelledby="fo-tab-microsoft" tabindex="0">
<blockquote class="fastapi-opinions__quote">“我最近大量使用 <strong>FastAPI</strong>。我实际上计划把它用于我团队在 <strong>微软的机器学习(ML)服务</strong>。其中一些正在集成进核心 <strong>Windows</strong> 产品以及一些 <strong>Office</strong> 产品。”</blockquote>
<div class="fastapi-opinions__attr">— Kabir Khan,<strong>Microsoft</strong> <a href="https://github.com/fastapi/fastapi/pull/26">(ref)</a></div>
</div>
<div class="fastapi-opinions__panel" id="fo-panel-uber" role="tabpanel" aria-labelledby="fo-tab-uber" tabindex="0" hidden>
<blockquote class="fastapi-opinions__quote">“我们采用了 <strong>FastAPI</strong> 库来启动一个可查询获取<strong>预测结果</strong><strong>REST</strong> 服务器。” <em>[用于 Ludwig]</em></blockquote>
<div class="fastapi-opinions__attr">— Piero Molino,Yaroslav Dudin,Sai Sumanth Miryala,<strong>Uber</strong> <a href="https://eng.uber.com/ludwig-v0-2/">(ref)</a></div>
</div>
<div class="fastapi-opinions__panel" id="fo-panel-netflix" role="tabpanel" aria-labelledby="fo-tab-netflix" tabindex="0" hidden>
<blockquote class="fastapi-opinions__quote"><strong>Netflix</strong> 很高兴宣布开源我们的<strong>危机管理</strong>编排框架:<strong>Dispatch</strong>!” <em>[使用 FastAPI 构建]</em></blockquote>
<div class="fastapi-opinions__attr">— Kevin Glisson,Marc Vilanova,Forest Monsen,<strong>Netflix</strong> <a href="https://netflixtechblog.com/introducing-dispatch-da4b8a2a8072">(ref)</a></div>
</div>
<div class="fastapi-opinions__panel" id="fo-panel-cisco" role="tabpanel" aria-labelledby="fo-tab-cisco" tabindex="0" hidden>
<blockquote class="fastapi-opinions__quote">“如果有人正在构建生产级的 Python API,我强烈推荐 <strong>FastAPI</strong>。它<strong>设计优雅</strong><strong>使用简单</strong><strong>高度可扩展</strong> —— 它已经成为我们 API 优先开发战略中的<strong>关键组件</strong>。”</blockquote>
<div class="fastapi-opinions__attr">— Deon Pillsbury,<strong>Cisco</strong> <a href="https://www.linkedin.com/posts/deonpillsbury_cisco-cx-python-activity-6963242628536487936-trAp/">(ref)</a></div>
</div>
</div>
<!-- /only-mkdocs -->
<div class="only-github" markdown="1">
「_[...] 我最近大量使用 **FastAPI**。[...] 我实际上计划把它用于我团队在 **微软的机器学习(ML)服务**。其中一些正在集成进核心 **Windows** 产品以及一些 **Office** 产品。_」
<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>
---
「_我们采用 **FastAPI** 来构建可查询以获取**预测结果**的 **REST** 服务器。[用于 Ludwig]_」
「_我们采用 **FastAPI** 库来启动一个可查询以获取**预测结果**的 **REST** 服务器。[用于 Ludwig]_」
<div style="text-align: right; margin-right: 10%;">Piero Molino,Yaroslav Dudin,Sai Sumanth Miryala - <strong>Uber</strong> <a href="https://eng.uber.com/ludwig-v0-2/"><small>(ref)</small></a></div>
@ -91,43 +138,31 @@ FastAPI 是一个用于构建 API 的现代、快速(高性能)的 Web 框
---
「_我对 **FastAPI** 兴奋到飞起。它太有趣了!_」
<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) 播客主持人</strong> <a href="https://x.com/brianokken/status/1112220079972728832"><small>(ref)</small></a></div>
---
「_老实说,你构建的东西非常稳健而且打磨得很好。从很多方面看,这就是我想让 **Hug** 成为的样子 —— 看到有人把它做出来真的很鼓舞人心。_」
「_如果有人正在构建生产级的 Python API,我强烈推荐 **FastAPI**。它**设计优雅**、**使用简单**且**高度可扩展**,它已经成为我们 API 优先开发战略中的**关键组件**,并驱动了许多自动化和服务,比如我们的 Virtual TAC Engineer。_」
<div style="text-align: right; margin-right: 10%;">Timothy Crosley - <strong>[Hug](https://github.com/hugapi/hug) 作者</strong> <a href="https://news.ycombinator.com/item?id=19455465"><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>
---
「_如果你想学一个用于构建 REST API 的**现代框架**,看看 **FastAPI** [...] 它快速、易用且易学 [...]_」
「_我们已经把我们的 **API** 切换到 **FastAPI** [...] 我想你会喜欢它 [...]_」
<div style="text-align: right; margin-right: 10%;">Ines Montani - Matthew Honnibal - <strong>[Explosion AI](https://explosion.ai) 创始人 - [spaCy](https://spacy.io) 作者</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>
</div>
---
## FastAPI 大会 { #fastapi-conf }
「_如果有人正在构建生产级的 Python API,我强烈推荐 **FastAPI**。它**设计优雅**、**使用简单**且**高度可扩展**,已经成为我们 API 优先开发战略中的**关键组件**,并驱动了许多自动化和服务,比如我们的 Virtual TAC Engineer。_」
[**FastAPI Conf '26**](https://fastapiconf.com) 将于 **2026 年 10 月 28 日****荷兰阿姆斯特丹** 举行。来自源头的 FastAPI 干货。🎤
<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>
---
<a class="fastapi-feature-banner" href="https://fastapiconf.com"><img src="https://fastapi.tiangolo.com/img/fastapi-conf.jpeg" alt="FastAPI Conf '26 - 2026 年 10 月 28 日 - 荷兰阿姆斯特丹"></a>
## FastAPI 迷你纪录片 { #fastapi-mini-documentary }
在 2025 年末发布了一部 [FastAPI 迷你纪录片](https://www.youtube.com/watch?v=mpR8ngthqiE),你可以在线观看:
<a href="https://www.youtube.com/watch?v=mpR8ngthqiE"><img src="https://fastapi.tiangolo.com/img/fastapi-documentary.jpg" alt="FastAPI Mini Documentary"></a>
<a class="fastapi-feature-banner" href="https://www.youtube.com/watch?v=mpR8ngthqiE"><img src="https://fastapi.tiangolo.com/img/fastapi-documentary.jpg" alt="FastAPI 迷你纪录片"></a>
## **Typer**,命令行中的 FastAPI { #typer-the-fastapi-of-clis }
<a href="https://typer.tiangolo.com"><img src="https://typer.tiangolo.com/img/logo-margin/logo-margin-vector.svg" style="width: 20%;"></a>
如果你要开发一个用于终端的 <abbr title="Command Line Interface - 命令行界面">命令行</abbr>应用而不是 Web API,看看 [**Typer**](https://typer.tiangolo.com/)。
如果你要开发一个用于终端而不是 Web API <abbr title="Command Line Interface - 命令行界面">CLI</abbr> 应用,看看 [**Typer**](https://typer.tiangolo.com/)。
**Typer** 是 FastAPI 的小同胞。它的目标是成为**命令行中的 FastAPI**。⌨️ 🚀

4
docs/zh/docs/virtual-environments.md

@ -819,7 +819,7 @@ Traceback (most recent call last):
</div>
但是如果你停用虚拟环境并激活 `prisoner-of-askaban` 的新虚拟环境,那么当你运行 `python` 时,它会使用 `prisoner-of-askaban` 中的虚拟环境中的 Python。
但是如果你停用虚拟环境并激活 `prisoner-of-azkaban` 的新虚拟环境,那么当你运行 `python` 时,它会使用 `prisoner-of-azkaban` 中的虚拟环境中的 Python。
<div class="termy">
@ -861,4 +861,4 @@ I solemnly swear 🐺
如果你读过并理解了所有这些,现在**你对虚拟环境的了解比很多开发者都要多**。🤓
在未来当你调看起来复杂的东西时,了解这些细节很可能会有用,你会知道**它是如何在底层工作的**。😎
在未来当你调看起来复杂的东西时,了解这些细节很可能会有用,你会知道**它是如何在底层工作的**。😎

1
pyproject.toml

@ -278,7 +278,6 @@ ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"C901", # too complex
"W191", # indentation contains tabs
]
[tool.ruff.lint.per-file-ignores]

Loading…
Cancel
Save