From 42e0e368bca7bf94f425c4bd2eca0b4ac4b5cab0 Mon Sep 17 00:00:00 2001 From: Sofie Van Landeghem Date: Wed, 18 Sep 2024 18:09:57 +0200 Subject: [PATCH 01/90] =?UTF-8?q?=F0=9F=93=9D=20Fix=20small=20typos=20in?= =?UTF-8?q?=20the=20documentation=20(#12213)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/advanced/additional-responses.md | 2 +- docs/en/docs/advanced/async-tests.md | 2 +- docs/en/docs/advanced/behind-a-proxy.md | 2 +- docs/en/docs/advanced/custom-response.md | 6 +++--- docs/en/docs/advanced/middleware.md | 4 ++-- .../docs/advanced/path-operation-advanced-configuration.md | 2 +- docs/en/docs/advanced/response-directly.md | 2 +- docs/en/docs/advanced/security/http-basic-auth.md | 2 +- docs/en/docs/advanced/security/oauth2-scopes.md | 2 +- docs/en/docs/advanced/settings.md | 2 +- docs/en/docs/deployment/concepts.md | 2 +- docs/en/docs/deployment/docker.md | 2 +- docs/en/docs/deployment/server-workers.md | 2 +- docs/en/docs/release-notes.md | 2 +- 14 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/en/docs/advanced/additional-responses.md b/docs/en/docs/advanced/additional-responses.md index 674f0672c..4fec41213 100644 --- a/docs/en/docs/advanced/additional-responses.md +++ b/docs/en/docs/advanced/additional-responses.md @@ -18,7 +18,7 @@ But for those additional responses you have to make sure you return a `Response` You can pass to your *path operation decorators* a parameter `responses`. -It receives a `dict`, the keys are status codes for each response, like `200`, and the values are other `dict`s with the information for each of them. +It receives a `dict`: the keys are status codes for each response (like `200`), and the values are other `dict`s with the information for each of them. Each of those response `dict`s can have a key `model`, containing a Pydantic model, just like `response_model`. diff --git a/docs/en/docs/advanced/async-tests.md b/docs/en/docs/advanced/async-tests.md index 580d9142c..a528c80fe 100644 --- a/docs/en/docs/advanced/async-tests.md +++ b/docs/en/docs/advanced/async-tests.md @@ -102,6 +102,6 @@ As the testing function is now asynchronous, you can now also call (and `await`) /// tip -If you encounter a `RuntimeError: Task attached to a different loop` when integrating asynchronous function calls in your tests (e.g. when using MongoDB's MotorClient) Remember to instantiate objects that need an event loop only within async functions, e.g. an `'@app.on_event("startup")` callback. +If you encounter a `RuntimeError: Task attached to a different loop` when integrating asynchronous function calls in your tests (e.g. when using MongoDB's MotorClient), remember to instantiate objects that need an event loop only within async functions, e.g. an `'@app.on_event("startup")` callback. /// diff --git a/docs/en/docs/advanced/behind-a-proxy.md b/docs/en/docs/advanced/behind-a-proxy.md index 5ff64016c..e642b1910 100644 --- a/docs/en/docs/advanced/behind-a-proxy.md +++ b/docs/en/docs/advanced/behind-a-proxy.md @@ -303,7 +303,7 @@ This is a more advanced use case. Feel free to skip it. By default, **FastAPI** will create a `server` in the OpenAPI schema with the URL for the `root_path`. -But you can also provide other alternative `servers`, for example if you want *the same* docs UI to interact with a staging and production environments. +But you can also provide other alternative `servers`, for example if you want *the same* docs UI to interact with both a staging and a production environment. If you pass a custom list of `servers` and there's a `root_path` (because your API lives behind a proxy), **FastAPI** will insert a "server" with this `root_path` at the beginning of the list. diff --git a/docs/en/docs/advanced/custom-response.md b/docs/en/docs/advanced/custom-response.md index 79f755815..1cefe979f 100644 --- a/docs/en/docs/advanced/custom-response.md +++ b/docs/en/docs/advanced/custom-response.md @@ -142,7 +142,7 @@ It accepts the following parameters: * `headers` - A `dict` of strings. * `media_type` - A `str` giving the media type. E.g. `"text/html"`. -FastAPI (actually Starlette) will automatically include a Content-Length header. It will also include a Content-Type header, based on the media_type and appending a charset for text types. +FastAPI (actually Starlette) will automatically include a Content-Length header. It will also include a Content-Type header, based on the `media_type` and appending a charset for text types. ```Python hl_lines="1 18" {!../../../docs_src/response_directly/tutorial002.py!} @@ -154,7 +154,7 @@ Takes some text or bytes and returns an HTML response, as you read above. ### `PlainTextResponse` -Takes some text or bytes and returns an plain text response. +Takes some text or bytes and returns a plain text response. ```Python hl_lines="2 7 9" {!../../../docs_src/custom_response/tutorial005.py!} @@ -273,7 +273,7 @@ Asynchronously streams a file as the response. Takes a different set of arguments to instantiate than the other response types: -* `path` - The filepath to the file to stream. +* `path` - The file path to the file to stream. * `headers` - Any custom headers to include, as a dictionary. * `media_type` - A string giving the media type. If unset, the filename or path will be used to infer a media type. * `filename` - If set, this will be included in the response `Content-Disposition`. diff --git a/docs/en/docs/advanced/middleware.md b/docs/en/docs/advanced/middleware.md index 70415adca..ab7778db0 100644 --- a/docs/en/docs/advanced/middleware.md +++ b/docs/en/docs/advanced/middleware.md @@ -24,7 +24,7 @@ app = SomeASGIApp() new_app = UnicornMiddleware(app, some_config="rainbow") ``` -But FastAPI (actually Starlette) provides a simpler way to do it that makes sure that the internal middlewares to handle server errors and custom exception handlers work properly. +But FastAPI (actually Starlette) provides a simpler way to do it that makes sure that the internal middlewares handle server errors and custom exception handlers work properly. For that, you use `app.add_middleware()` (as in the example for CORS). @@ -55,7 +55,7 @@ For the next examples, you could also use `from starlette.middleware.something i Enforces that all incoming requests must either be `https` or `wss`. -Any incoming requests to `http` or `ws` will be redirected to the secure scheme instead. +Any incoming request to `http` or `ws` will be redirected to the secure scheme instead. ```Python hl_lines="2 6" {!../../../docs_src/advanced_middleware/tutorial001.py!} diff --git a/docs/en/docs/advanced/path-operation-advanced-configuration.md b/docs/en/docs/advanced/path-operation-advanced-configuration.md index c8874bad9..d599006d2 100644 --- a/docs/en/docs/advanced/path-operation-advanced-configuration.md +++ b/docs/en/docs/advanced/path-operation-advanced-configuration.md @@ -149,7 +149,7 @@ For example, you could decide to read and validate the request with your own cod You could do that with `openapi_extra`: -```Python hl_lines="20-37 39-40" +```Python hl_lines="19-36 39-40" {!../../../docs_src/path_operation_advanced_configuration/tutorial006.py!} ``` diff --git a/docs/en/docs/advanced/response-directly.md b/docs/en/docs/advanced/response-directly.md index 2251659c5..092aeceb1 100644 --- a/docs/en/docs/advanced/response-directly.md +++ b/docs/en/docs/advanced/response-directly.md @@ -28,7 +28,7 @@ This gives you a lot of flexibility. You can return any data type, override any ## Using the `jsonable_encoder` in a `Response` -Because **FastAPI** doesn't do any change to a `Response` you return, you have to make sure its contents are ready for it. +Because **FastAPI** doesn't make any changes to a `Response` you return, you have to make sure its contents are ready for it. For example, you cannot put a Pydantic model in a `JSONResponse` without first converting it to a `dict` with all the data types (like `datetime`, `UUID`, etc) converted to JSON-compatible types. diff --git a/docs/en/docs/advanced/security/http-basic-auth.md b/docs/en/docs/advanced/security/http-basic-auth.md index c302bf8dc..e669d10d8 100644 --- a/docs/en/docs/advanced/security/http-basic-auth.md +++ b/docs/en/docs/advanced/security/http-basic-auth.md @@ -144,7 +144,7 @@ And then they can try again knowing that it's probably something more similar to #### A "professional" attack -Of course, the attackers would not try all this by hand, they would write a program to do it, possibly with thousands or millions of tests per second. And would get just one extra correct letter at a time. +Of course, the attackers would not try all this by hand, they would write a program to do it, possibly with thousands or millions of tests per second. And they would get just one extra correct letter at a time. But doing that, in some minutes or hours the attackers would have guessed the correct username and password, with the "help" of our application, just using the time taken to answer. diff --git a/docs/en/docs/advanced/security/oauth2-scopes.md b/docs/en/docs/advanced/security/oauth2-scopes.md index ff52d7bb8..fdd8db7b9 100644 --- a/docs/en/docs/advanced/security/oauth2-scopes.md +++ b/docs/en/docs/advanced/security/oauth2-scopes.md @@ -769,7 +769,7 @@ But if you are building an OAuth2 application that others would connect to (i.e. The most common is the implicit flow. -The most secure is the code flow, but is more complex to implement as it requires more steps. As it is more complex, many providers end up suggesting the implicit flow. +The most secure is the code flow, but it's more complex to implement as it requires more steps. As it is more complex, many providers end up suggesting the implicit flow. /// note diff --git a/docs/en/docs/advanced/settings.md b/docs/en/docs/advanced/settings.md index 22bf7de20..8c04d2507 100644 --- a/docs/en/docs/advanced/settings.md +++ b/docs/en/docs/advanced/settings.md @@ -374,7 +374,7 @@ Prefer to use the `Annotated` version if possible. //// -Then for any subsequent calls of `get_settings()` in the dependencies for the next requests, instead of executing the internal code of `get_settings()` and creating a new `Settings` object, it will return the same object that was returned on the first call, again and again. +Then for any subsequent call of `get_settings()` in the dependencies for the next requests, instead of executing the internal code of `get_settings()` and creating a new `Settings` object, it will return the same object that was returned on the first call, again and again. #### `lru_cache` Technical Details diff --git a/docs/en/docs/deployment/concepts.md b/docs/en/docs/deployment/concepts.md index 69ee71a73..e71a7487a 100644 --- a/docs/en/docs/deployment/concepts.md +++ b/docs/en/docs/deployment/concepts.md @@ -257,7 +257,7 @@ But in most cases, you will want to perform these steps only **once**. So, you will want to have a **single process** to perform those **previous steps**, before starting the application. -And you will have to make sure that it's a single process running those previous steps *even* if afterwards, you start **multiple processes** (multiple workers) for the application itself. If those steps were run by **multiple processes**, they would **duplicate** the work by running it on **parallel**, and if the steps were something delicate like a database migration, they could cause conflicts with each other. +And you will have to make sure that it's a single process running those previous steps *even* if afterwards, you start **multiple processes** (multiple workers) for the application itself. If those steps were run by **multiple processes**, they would **duplicate** the work by running it in **parallel**, and if the steps were something delicate like a database migration, they could cause conflicts with each other. Of course, there are some cases where there's no problem in running the previous steps multiple times, in that case, it's a lot easier to handle. diff --git a/docs/en/docs/deployment/docker.md b/docs/en/docs/deployment/docker.md index 2d832a238..b106f7ac3 100644 --- a/docs/en/docs/deployment/docker.md +++ b/docs/en/docs/deployment/docker.md @@ -615,6 +615,6 @@ Using container systems (e.g. with **Docker** and **Kubernetes**) it becomes fai * Memory * Previous steps before starting -In most cases, you probably won't want to use any base image, and instead **build a container image from scratch** one based on the official Python Docker image. +In most cases, you probably won't want to use any base image, and instead **build a container image from scratch** based on the official Python Docker image. Taking care of the **order** of instructions in the `Dockerfile` and the **Docker cache** you can **minimize build times**, to maximize your productivity (and avoid boredom). 😎 diff --git a/docs/en/docs/deployment/server-workers.md b/docs/en/docs/deployment/server-workers.md index 5e369e071..622c10a30 100644 --- a/docs/en/docs/deployment/server-workers.md +++ b/docs/en/docs/deployment/server-workers.md @@ -139,7 +139,7 @@ From the list of deployment concepts from above, using workers would mainly help ## Containers and Docker -In the next chapter about [FastAPI in Containers - Docker](docker.md){.internal-link target=_blank} I'll tell some strategies you could use to handle the other **deployment concepts**. +In the next chapter about [FastAPI in Containers - Docker](docker.md){.internal-link target=_blank} I'll explain some strategies you could use to handle the other **deployment concepts**. I'll show you how to **build your own image from scratch** to run a single Uvicorn process. It is a simple process and is probably what you would want to do when using a distributed container management system like **Kubernetes**. diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index ea7ac9215..5e8815e65 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -494,7 +494,7 @@ Discussed here: [#11522](https://github.com/fastapi/fastapi/pull/11522) and here ### Upgrades * ➖ Remove `orjson` and `ujson` from default dependencies. PR [#11842](https://github.com/tiangolo/fastapi/pull/11842) by [@tiangolo](https://github.com/tiangolo). - * These dependencies are still installed when you install with `pip install "fastapi[all]"`. But they not included in `pip install fastapi`. + * These dependencies are still installed when you install with `pip install "fastapi[all]"`. But they are not included in `pip install fastapi`. * 📝 Restored Swagger-UI links to use the latest version possible. PR [#11459](https://github.com/tiangolo/fastapi/pull/11459) by [@UltimateLobster](https://github.com/UltimateLobster). ### Docs From 4d6cab3ec619ee1186b975f9520d1f396010f9a4 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 18 Sep 2024 16:10:21 +0000 Subject: [PATCH 02/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 5e8815e65..0411bbdda 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -7,6 +7,10 @@ hide: ## Latest Changes +### Docs + +* 📝 Fix small typos in the documentation. PR [#12213](https://github.com/fastapi/fastapi/pull/12213) by [@svlandeg](https://github.com/svlandeg). + ## 0.115.0 ### Highlights From 6cc24416e22845ef8d188e94993a6285afaf255d Mon Sep 17 00:00:00 2001 From: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:47:28 +0200 Subject: [PATCH 03/90] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20Fix=20docstring=20ty?= =?UTF-8?q?pos=20in=20http=20security=20(#12223)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix docstring typos in http security --- fastapi/security/http.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fastapi/security/http.py b/fastapi/security/http.py index a142b135d..e06f3d66d 100644 --- a/fastapi/security/http.py +++ b/fastapi/security/http.py @@ -277,7 +277,7 @@ class HTTPBearer(HTTPBase): bool, Doc( """ - By default, if the HTTP Bearer token not provided (in an + By default, if the HTTP Bearer token is not provided (in an `Authorization` header), `HTTPBearer` will automatically cancel the request and send the client an error. @@ -380,7 +380,7 @@ class HTTPDigest(HTTPBase): bool, Doc( """ - By default, if the HTTP Digest not provided, `HTTPDigest` will + By default, if the HTTP Digest is not provided, `HTTPDigest` will automatically cancel the request and send the client an error. If `auto_error` is set to `False`, when the HTTP Digest is not From 7c6f2f8fde68f488163376c9e92a59d46c491298 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 19 Sep 2024 09:47:54 +0000 Subject: [PATCH 04/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 0411bbdda..a8566ceaa 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -11,6 +11,10 @@ hide: * 📝 Fix small typos in the documentation. PR [#12213](https://github.com/fastapi/fastapi/pull/12213) by [@svlandeg](https://github.com/svlandeg). +### Internal + +* ✏ Fix docstring typos in http security. PR [#12223](https://github.com/fastapi/fastapi/pull/12223) by [@albertvillanova](https://github.com/albertvillanova). + ## 0.115.0 ### Highlights From 97ac2286aaa9be8289b43f23cf8e8ddd3356aadb Mon Sep 17 00:00:00 2001 From: marcelomarkus Date: Fri, 20 Sep 2024 08:00:08 -0300 Subject: [PATCH 05/90] =?UTF-8?q?=F0=9F=8C=90=20Add=20Portuguese=20transla?= =?UTF-8?q?tion=20for=20`docs/pt/docs/how-to/configure-swagger-ui.md`=20(#?= =?UTF-8?q?12222)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/pt/docs/how-to/configure-swagger-ui.md | 78 +++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 docs/pt/docs/how-to/configure-swagger-ui.md diff --git a/docs/pt/docs/how-to/configure-swagger-ui.md b/docs/pt/docs/how-to/configure-swagger-ui.md new file mode 100644 index 000000000..b40dad695 --- /dev/null +++ b/docs/pt/docs/how-to/configure-swagger-ui.md @@ -0,0 +1,78 @@ +# Configurar Swagger UI + +VocĂȘ pode configurar alguns parĂąmetros extras da UI do Swagger. + +Para configurĂĄ-los, passe o argumento `swagger_ui_parameters` ao criar o objeto de aplicativo `FastAPI()` ou para a função `get_swagger_ui_html()`. + +`swagger_ui_parameters` recebe um dicionĂĄrio com as configuraçÔes passadas diretamente para o Swagger UI. + +O FastAPI converte as configuraçÔes para **JSON** para tornĂĄ-las compatĂ­veis com JavaScript, pois Ă© disso que o Swagger UI precisa. + +## Desabilitar realce de sintaxe + +Por exemplo, vocĂȘ pode desabilitar o destaque de sintaxe na UI do Swagger. + +Sem alterar as configuraçÔes, o destaque de sintaxe Ă© habilitado por padrĂŁo: + + + +Mas vocĂȘ pode desabilitĂĄ-lo definindo `syntaxHighlight` como `False`: + +```Python hl_lines="3" +{!../../../docs_src/configure_swagger_ui/tutorial001.py!} +``` + +...e entĂŁo o Swagger UI nĂŁo mostrarĂĄ mais o destaque de sintaxe: + + + +## Alterar o tema + +Da mesma forma que vocĂȘ pode definir o tema de destaque de sintaxe com a chave `"syntaxHighlight.theme"` (observe que hĂĄ um ponto no meio): + +```Python hl_lines="3" +{!../../../docs_src/configure_swagger_ui/tutorial002.py!} +``` + +Essa configuração alteraria o tema de cores de destaque de sintaxe: + + + +## Alterar parĂąmetros de UI padrĂŁo do Swagger + +O FastAPI inclui alguns parĂąmetros de configuração padrĂŁo apropriados para a maioria dos casos de uso. + +Inclui estas configuraçÔes padrĂŁo: + +```Python +{!../../../fastapi/openapi/docs.py[ln:7-23]!} +``` + +VocĂȘ pode substituir qualquer um deles definindo um valor diferente no argumento `swagger_ui_parameters`. + +Por exemplo, para desabilitar `deepLinking` vocĂȘ pode passar essas configuraçÔes para `swagger_ui_parameters`: + +```Python hl_lines="3" +{!../../../docs_src/configure_swagger_ui/tutorial003.py!} +``` + +## Outros parĂąmetros da UI do Swagger + +Para ver todas as outras configuraçÔes possĂ­veis que vocĂȘ pode usar, leia a documentação oficial dos parĂąmetros da UI do Swagger. + +## ConfiguraçÔes somente JavaScript + +A interface do usuĂĄrio do Swagger tambĂ©m permite que outras configuraçÔes sejam objetos **somente JavaScript** (por exemplo, funçÔes JavaScript). + +O FastAPI tambĂ©m inclui estas configuraçÔes de `predefiniçÔes` somente para JavaScript: + +```JavaScript +presets: [ + SwaggerUIBundle.presets.apis, + SwaggerUIBundle.SwaggerUIStandalonePreset +] +``` + +Esses sĂŁo objetos **JavaScript**, nĂŁo strings, entĂŁo vocĂȘ nĂŁo pode passĂĄ-los diretamente do cĂłdigo Python. + +Se vocĂȘ precisar usar configuraçÔes somente JavaScript como essas, vocĂȘ pode usar um dos mĂ©todos acima. Sobrescreva todas as *operaçÔes de rotas* do Swagger UI e escreva manualmente qualquer JavaScript que vocĂȘ precisar. From cf93157be74bc4a8d90846938b5ca2dab1ef60b2 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 20 Sep 2024 11:00:31 +0000 Subject: [PATCH 06/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index a8566ceaa..79fbdf1b8 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -11,6 +11,10 @@ hide: * 📝 Fix small typos in the documentation. PR [#12213](https://github.com/fastapi/fastapi/pull/12213) by [@svlandeg](https://github.com/svlandeg). +### Translations + +* 🌐 Add Portuguese translation for `docs/pt/docs/how-to/configure-swagger-ui.md`. PR [#12222](https://github.com/fastapi/fastapi/pull/12222) by [@marcelomarkus](https://github.com/marcelomarkus). + ### Internal * ✏ Fix docstring typos in http security. PR [#12223](https://github.com/fastapi/fastapi/pull/12223) by [@albertvillanova](https://github.com/albertvillanova). From 0b1da2d9101d1bceefb62f77be83debc450135ec Mon Sep 17 00:00:00 2001 From: marcelomarkus Date: Fri, 20 Sep 2024 08:01:03 -0300 Subject: [PATCH 07/90] =?UTF-8?q?=F0=9F=8C=90=20Add=20Portuguese=20transla?= =?UTF-8?q?tion=20for=20`docs/pt/docs/deployment/server-workers.md`=20(#12?= =?UTF-8?q?220)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/pt/docs/deployment/server-workers.md | 152 ++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 docs/pt/docs/deployment/server-workers.md diff --git a/docs/pt/docs/deployment/server-workers.md b/docs/pt/docs/deployment/server-workers.md new file mode 100644 index 000000000..0d6cd5b39 --- /dev/null +++ b/docs/pt/docs/deployment/server-workers.md @@ -0,0 +1,152 @@ +# Trabalhadores do Servidor - Uvicorn com Trabalhadores + +Vamos rever os conceitos de implantação anteriores: + +* Segurança - HTTPS +* Executando na inicialização +* ReinicializaçÔes +* **Replicação (o nĂșmero de processos em execução)** +* MemĂłria +* Etapas anteriores antes de iniciar + +AtĂ© este ponto, com todos os tutoriais nos documentos, vocĂȘ provavelmente estava executando um **programa de servidor**, por exemplo, usando o comando `fastapi`, que executa o Uvicorn, executando um **Ășnico processo**. + +Ao implantar aplicativos, vocĂȘ provavelmente desejarĂĄ ter alguma **replicação de processos** para aproveitar **vĂĄrios nĂșcleos** e poder lidar com mais solicitaçÔes. + +Como vocĂȘ viu no capĂ­tulo anterior sobre [Conceitos de implantação](concepts.md){.internal-link target=_blank}, hĂĄ vĂĄrias estratĂ©gias que vocĂȘ pode usar. + +Aqui mostrarei como usar o **Uvicorn** com **processos de trabalho** usando o comando `fastapi` ou o comando `uvicorn` diretamente. + +/// info | "Informação" + +Se vocĂȘ estiver usando contĂȘineres, por exemplo com Docker ou Kubernetes, falarei mais sobre isso no prĂłximo capĂ­tulo: [FastAPI em contĂȘineres - Docker](docker.md){.internal-link target=_blank}. + +Em particular, ao executar no **Kubernetes** vocĂȘ provavelmente **nĂŁo** vai querer usar vĂĄrios trabalhadores e, em vez disso, executar **um Ășnico processo Uvicorn por contĂȘiner**, mas falarei sobre isso mais adiante neste capĂ­tulo. + +/// + +## VĂĄrios trabalhadores + +VocĂȘ pode iniciar vĂĄrios trabalhadores com a opção de linha de comando `--workers`: + +//// tab | `fastapi` + +Se vocĂȘ usar o comando `fastapi`: + +
+ +```console +$
 fastapi run --workers 4 main.py
+INFO     Using path main.py
+INFO     Resolved absolute path /home/user/code/awesomeapp/main.py
+INFO     Searching for package file structure from directories with __init__.py files
+INFO     Importing from /home/user/code/awesomeapp
+
+ ╭─ Python module file ─╼
+ │                      │
+ │  🐍 main.py          │
+ │                      │
+ ╰──────────────────────╯
+
+INFO     Importing module main
+INFO     Found importable FastAPI app
+
+ ╭─ Importable FastAPI app ─╼
+ │                          │
+ │  from main import app    │
+ │                          │
+ ╰──────────────────────────╯
+
+INFO     Using import string main:app
+
+ ╭─────────── FastAPI CLI - Production mode ───────────╼
+ │                                                     │
+ │  Serving at: http://0.0.0.0:8000                    │
+ │                                                     │
+ │  API docs: http://0.0.0.0:8000/docs                 │
+ │                                                     │
+ │  Running in production mode, for development use:   │
+ │                                                     │
+ │  fastapi dev                                        │
+ │                                                     │
+ ╰─────────────────────────────────────────────────────╯
+
+INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
+INFO:     Started parent process [27365]
+INFO:     Started server process [27368]
+INFO:     Waiting for application startup.
+INFO:     Application startup complete.
+INFO:     Started server process [27369]
+INFO:     Waiting for application startup.
+INFO:     Application startup complete.
+INFO:     Started server process [27370]
+INFO:     Waiting for application startup.
+INFO:     Application startup complete.
+INFO:     Started server process [27367]
+INFO:     Waiting for application startup.
+INFO:     Application startup complete.
+
+``` + +
+ +//// + +//// tab | `uvicorn` + +Se vocĂȘ preferir usar o comando `uvicorn` diretamente: + +
+ +```console +$ uvicorn main:app --host 0.0.0.0 --port 8080 --workers 4 +INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit) +INFO: Started parent process [27365] +INFO: Started server process [27368] +INFO: Waiting for application startup. +INFO: Application startup complete. +INFO: Started server process [27369] +INFO: Waiting for application startup. +INFO: Application startup complete. +INFO: Started server process [27370] +INFO: Waiting for application startup. +INFO: Application startup complete. +INFO: Started server process [27367] +INFO: Waiting for application startup. +INFO: Application startup complete. +``` + +
+ +//// + +A Ășnica opção nova aqui Ă© `--workers` informando ao Uvicorn para iniciar 4 processos de trabalho. + +VocĂȘ tambĂ©m pode ver que ele mostra o **PID** de cada processo, `27365` para o processo pai (este Ă© o **gerenciador de processos**) e um para cada processo de trabalho: `27368`, `27369`, `27370` e `27367`. + +## Conceitos de Implantação + +Aqui vocĂȘ viu como usar vĂĄrios **trabalhadores** para **paralelizar** a execução do aplicativo, aproveitar **vĂĄrios nĂșcleos** na CPU e conseguir atender **mais solicitaçÔes**. + +Da lista de conceitos de implantação acima, o uso de trabalhadores ajudaria principalmente com a parte da **replicação** e um pouco com as **reinicializaçÔes**, mas vocĂȘ ainda precisa cuidar dos outros: + +* **Segurança - HTTPS** +* **Executando na inicialização** +* ***ReinicializaçÔes*** +* Replicação (o nĂșmero de processos em execução) +* **MemĂłria** +* **Etapas anteriores antes de iniciar** + +## ContĂȘineres e Docker + +No prĂłximo capĂ­tulo sobre [FastAPI em contĂȘineres - Docker](docker.md){.internal-link target=_blank}, explicarei algumas estratĂ©gias que vocĂȘ pode usar para lidar com os outros **conceitos de implantação**. + +Vou mostrar como **construir sua prĂłpria imagem do zero** para executar um Ășnico processo Uvicorn. É um processo simples e provavelmente Ă© o que vocĂȘ gostaria de fazer ao usar um sistema de gerenciamento de contĂȘineres distribuĂ­dos como o **Kubernetes**. + +## Recapitular + +VocĂȘ pode usar vĂĄrios processos de trabalho com a opção CLI `--workers` com os comandos `fastapi` ou `uvicorn` para aproveitar as vantagens de **CPUs multi-core** e executar **vĂĄrios processos em paralelo**. + +VocĂȘ pode usar essas ferramentas e ideias se estiver configurando **seu prĂłprio sistema de implantação** enquanto cuida dos outros conceitos de implantação. + +Confira o prĂłximo capĂ­tulo para aprender sobre **FastAPI** com contĂȘineres (por exemplo, Docker e Kubernetes). VocĂȘ verĂĄ que essas ferramentas tĂȘm maneiras simples de resolver os outros **conceitos de implantação** tambĂ©m. ✹ From 4e3db0b6890277149cf87553bf6967c992cdb392 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 20 Sep 2024 11:03:12 +0000 Subject: [PATCH 08/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 79fbdf1b8..161eef6ae 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -13,6 +13,7 @@ hide: ### Translations +* 🌐 Add Portuguese translation for `docs/pt/docs/deployment/server-workers.md`. PR [#12220](https://github.com/fastapi/fastapi/pull/12220) by [@marcelomarkus](https://github.com/marcelomarkus). * 🌐 Add Portuguese translation for `docs/pt/docs/how-to/configure-swagger-ui.md`. PR [#12222](https://github.com/fastapi/fastapi/pull/12222) by [@marcelomarkus](https://github.com/marcelomarkus). ### Internal From b1024e73bebcda280839989e4d0461f46de1096e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Gustavo=20Rogel=20de=20Oliveira?= Date: Fri, 20 Sep 2024 08:10:02 -0300 Subject: [PATCH 09/90] =?UTF-8?q?=F0=9F=8C=90=20Add=20Portuguese=20transla?= =?UTF-8?q?tion=20for=20`docs/pt/docs/deployment/manually.md`=20(#12210)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/pt/docs/deployment/manually.md | 169 ++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 docs/pt/docs/deployment/manually.md diff --git a/docs/pt/docs/deployment/manually.md b/docs/pt/docs/deployment/manually.md new file mode 100644 index 000000000..9eff3daaa --- /dev/null +++ b/docs/pt/docs/deployment/manually.md @@ -0,0 +1,169 @@ +# Execute um Servidor Manualmente + +## Utilize o comando `fastapi run` + +Em resumo, utilize o comando `fastapi run` para inicializar sua aplicação FastAPI: + +
+ +```console +$ fastapi run main.py +INFO Using path main.py +INFO Resolved absolute path /home/user/code/awesomeapp/main.py +INFO Searching for package file structure from directories with __init__.py files +INFO Importing from /home/user/code/awesomeapp + + ╭─ Python module file ─╼ + │ │ + │ 🐍 main.py │ + │ │ + ╰──────────────────────╯ + +INFO Importing module main +INFO Found importable FastAPI app + + ╭─ Importable FastAPI app ─╼ + │ │ + │ from main import app │ + │ │ + ╰──────────────────────────╯ + +INFO Using import string main:app + + ╭─────────── FastAPI CLI - Production mode ───────────╼ + │ │ + │ Serving at: http://0.0.0.0:8000 │ + │ │ + │ API docs: http://0.0.0.0:8000/docs │ + │ │ + │ Running in production mode, for development use: │ + │ │ + │ fastapi dev │ + │ │ + ╰─────────────────────────────────────────────────────╯ + +INFO: Started server process [2306215] +INFO: Waiting for application startup. +INFO: Application startup complete. +INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit) +``` + +
+ +Isto deve funcionar para a maioria dos casos. 😎 + +VocĂȘ pode utilizar esse comando, por exemplo, para iniciar sua aplicação **FastAPI** em um contĂȘiner, em um servidor, etc. + +## Servidores ASGI + +Vamos nos aprofundar um pouco mais em detalhes. + +FastAPI utiliza um padrĂŁo para construir frameworks e servidores web em Python chamado ASGI. FastAPI Ă© um framework web ASGI. + +A principal coisa que vocĂȘ precisa para executar uma aplicação **FastAPI** (ou qualquer outra aplicação ASGI) em uma mĂĄquina de servidor remoto Ă© um programa de servidor ASGI como o **Uvicorn**, que Ă© o que vem por padrĂŁo no comando `fastapi`. + +Existem diversas alternativas, incluindo: + +* Uvicorn: um servidor ASGI de alta performance. +* Hypercorn: um servidor ASGI compĂĄtivel com HTTP/2, Trio e outros recursos. +* Daphne: servidor ASGI construĂ­do para Django Channels. +* Granian: um servidor HTTP Rust para aplicaçÔes Python. +* NGINX Unit: NGINX Unit Ă© um runtime de aplicação web leve e versĂĄtil. + +## MĂĄquina Servidora e Programa Servidor + +Existe um pequeno detalhe sobre estes nomes para se manter em mente. 💡 + +A palavra "**servidor**" Ă© comumente usada para se referir tanto ao computador remoto/nuvem (a mĂĄquina fĂ­sica ou virtual) quanto ao programa que estĂĄ sendo executado nessa mĂĄquina (por exemplo, Uvicorn). + +Apenas tenha em mente que quando vocĂȘ ler "servidor" em geral, isso pode se referir a uma dessas duas coisas. + +Quando se refere Ă  mĂĄquina remota, Ă© comum chamĂĄ-la de **servidor**, mas tambĂ©m de **mĂĄquina**, **VM** (mĂĄquina virtual), **nĂł**. Todos esses termos se referem a algum tipo de mĂĄquina remota, normalmente executando Linux, onde vocĂȘ executa programas. + +## Instale o Programa Servidor + +Quando vocĂȘ instala o FastAPI, ele vem com um servidor de produção, o Uvicorn, e vocĂȘ pode iniciĂĄ-lo com o comando `fastapi run`. + +Mas vocĂȘ tambĂ©m pode instalar um servidor ASGI manualmente. + +Certifique-se de criar um [ambiente virtual](../virtual-environments.md){.internal-link target=_blank}, ativĂĄ-lo e, em seguida, vocĂȘ pode instalar a aplicação do servidor. + +Por exemplo, para instalar o Uvicorn: + +
+ +```console +$ pip install "uvicorn[standard]" + +---> 100% +``` + +
+ +Um processo semelhante se aplicaria a qualquer outro programa de servidor ASGI. + +/// tip | "Dica" + +Adicionando o `standard`, o Uvicorn instalarĂĄ e usarĂĄ algumas dependĂȘncias extras recomendadas. + +Isso inclui o `uvloop`, a substituição de alto desempenho para `asyncio`, que fornece um grande aumento de desempenho de concorrĂȘncia. + +Quando vocĂȘ instala o FastAPI com algo como `pip install "fastapi[standard]"`, vocĂȘ jĂĄ obtĂ©m `uvicorn[standard]` tambĂ©m. + +/// + +## Execute o Programa Servidor + +Se vocĂȘ instalou um servidor ASGI manualmente, normalmente precisarĂĄ passar uma string de importação em um formato especial para que ele importe sua aplicação FastAPI: + +
+ +```console +$ uvicorn main:app --host 0.0.0.0 --port 80 + +INFO: Uvicorn running on http://0.0.0.0:80 (Press CTRL+C to quit) +``` + +
+ +/// note | "Nota" + +O comando `uvicorn main:app` refere-se a: + +* `main`: o arquivo `main.py` (o "mĂłdulo" Python). +* `app`: o objeto criado dentro de `main.py` com a linha `app = FastAPI()`. + +É equivalente a: + +```Python +from main import app +``` + +/// + +Cada programa de servidor ASGI alternativo teria um comando semelhante, vocĂȘ pode ler mais na documentação respectiva. + +/// warning | "Aviso" + +Uvicorn e outros servidores suportam a opção `--reload` que Ă© Ăștil durante o desenvolvimento. + +A opção `--reload` consome muito mais recursos, Ă© mais instĂĄvel, etc. + +Ela ajuda muito durante o **desenvolvimento**, mas vocĂȘ **nĂŁo deve** usĂĄ-la em **produção**. + +/// + +## Conceitos de Implantação + +Esses exemplos executam o programa do servidor (por exemplo, Uvicorn), iniciando **um Ășnico processo**, ouvindo em todos os IPs (`0.0.0.0`) em uma porta predefinida (por exemplo, `80`). + +Esta Ă© a ideia bĂĄsica. Mas vocĂȘ provavelmente vai querer cuidar de algumas coisas adicionais, como: + +* Segurança - HTTPS +* Executando na inicialização +* ReinicializaçÔes +* Replicação (o nĂșmero de processos em execução) +* MemĂłria +* Passos anteriores antes de começar + +Vou te contar mais sobre cada um desses conceitos, como pensar sobre eles e alguns exemplos concretos com estratĂ©gias para lidar com eles nos prĂłximos capĂ­tulos. 🚀 From 2459a009f43b96dc86e04e94d2a996983626ffce Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 20 Sep 2024 11:11:21 +0000 Subject: [PATCH 10/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 161eef6ae..9e44bbf45 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -13,6 +13,7 @@ hide: ### Translations +* 🌐 Add Portuguese translation for `docs/pt/docs/deployment/manually.md`. PR [#12210](https://github.com/fastapi/fastapi/pull/12210) by [@JoaoGustavoRogel](https://github.com/JoaoGustavoRogel). * 🌐 Add Portuguese translation for `docs/pt/docs/deployment/server-workers.md`. PR [#12220](https://github.com/fastapi/fastapi/pull/12220) by [@marcelomarkus](https://github.com/marcelomarkus). * 🌐 Add Portuguese translation for `docs/pt/docs/how-to/configure-swagger-ui.md`. PR [#12222](https://github.com/fastapi/fastapi/pull/12222) by [@marcelomarkus](https://github.com/marcelomarkus). From 6aefc316008fa920a93493b6f458b1fe3b5c1324 Mon Sep 17 00:00:00 2001 From: Max Scheijen <47034840+maxscheijen@users.noreply.github.com> Date: Fri, 20 Sep 2024 13:13:32 +0200 Subject: [PATCH 11/90] =?UTF-8?q?=F0=9F=8C=90=20Add=20Dutch=20translation?= =?UTF-8?q?=20for=20`docs/nl/docs/environment-variables.md`=20(#12200)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/nl/docs/environment-variables.md | 298 ++++++++++++++++++++++++++ 1 file changed, 298 insertions(+) create mode 100644 docs/nl/docs/environment-variables.md diff --git a/docs/nl/docs/environment-variables.md b/docs/nl/docs/environment-variables.md new file mode 100644 index 000000000..f6b3d285b --- /dev/null +++ b/docs/nl/docs/environment-variables.md @@ -0,0 +1,298 @@ +# Omgevingsvariabelen + +/// tip + +Als je al weet wat "omgevingsvariabelen" zijn en hoe je ze kunt gebruiken, kun je deze stap gerust overslaan. + +/// + +Een omgevingsvariabele (ook bekend als "**env var**") is een variabele die **buiten** de Python-code leeft, in het **besturingssysteem** en die door je Python-code (of door andere programma's) kan worden gelezen. + +Omgevingsvariabelen kunnen nuttig zijn voor het bijhouden van applicatie **instellingen**, als onderdeel van de **installatie** van Python, enz. + +## Omgevingsvariabelen maken en gebruiken + +Je kunt omgevingsvariabelen **maken** en gebruiken in de **shell (terminal)**, zonder dat je Python nodig hebt: + +//// tab | Linux, macOS, Windows Bash + +
+ +```console +// Je zou een omgevingsvariabele MY_NAME kunnen maken met +$ export MY_NAME="Wade Wilson" + +// Dan zou je deze met andere programma's kunnen gebruiken, zoals +$ echo "Hello $MY_NAME" + +Hello Wade Wilson +``` + +
+ +//// + +//// tab | Windows PowerShell + +
+ +```console +// Maak een omgevingsvariabel MY_NAME +$ $Env:MY_NAME = "Wade Wilson" + +// Gebruik het met andere programma's, zoals +$ echo "Hello $Env:MY_NAME" + +Hello Wade Wilson +``` + +
+ +//// + +## Omgevingsvariabelen uitlezen in Python + +Je kunt omgevingsvariabelen **buiten** Python aanmaken, in de terminal (of met een andere methode) en ze vervolgens **in Python uitlezen**. + +Je kunt bijvoorbeeld een bestand `main.py` hebben met: + +```Python hl_lines="3" +import os + +name = os.getenv("MY_NAME", "World") +print(f"Hello {name} from Python") +``` + +/// tip + +Het tweede argument van `os.getenv()` is de standaardwaarde die wordt geretourneerd. + +Als je dit niet meegeeft, is de standaardwaarde `None`. In dit geval gebruiken we standaard `"World"`. + +/// + +Dan zou je dat Python-programma kunnen aanroepen: + +//// tab | Linux, macOS, Windows Bash + +
+ +```console +// Hier stellen we de omgevingsvariabelen nog niet in +$ python main.py + +// Omdat we de omgevingsvariabelen niet hebben ingesteld, krijgen we de standaardwaarde + +Hello World from Python + +// Maar als we eerst een omgevingsvariabele aanmaken +$ export MY_NAME="Wade Wilson" + +// en het programma dan opnieuw aanroepen +$ python main.py + +// kan het de omgevingsvariabele nu wel uitlezen + +Hello Wade Wilson from Python +``` + +
+ +//// + +//// tab | Windows PowerShell + +
+ +```console +// Hier stellen we de omgevingsvariabelen nog niet in +$ python main.py + +// Omdat we de omgevingsvariabelen niet hebben ingesteld, krijgen we de standaardwaarde + +Hello World from Python + +// Maar als we eerst een omgevingsvariabele aanmaken +$ $Env:MY_NAME = "Wade Wilson" + +// en het programma dan opnieuw aanroepen +$ python main.py + +// kan het de omgevingsvariabele nu wel uitlezen + +Hello Wade Wilson from Python +``` + +
+ +//// + +Omdat omgevingsvariabelen buiten de code kunnen worden ingesteld, maar wel door de code kunnen worden gelezen en niet hoeven te worden opgeslagen (gecommit naar `git`) met de rest van de bestanden, worden ze vaak gebruikt voor configuraties of **instellingen**. + +Je kunt ook een omgevingsvariabele maken die alleen voor een **specifieke programma-aanroep** beschikbaar is, die alleen voor dat programma beschikbaar is en alleen voor de duur van dat programma. + +Om dat te doen, maak je het vlak voor het programma zelf aan, op dezelfde regel: + +
+ +```console +// Maak een omgevingsvariabele MY_NAME in de regel voor deze programma-aanroep +$ MY_NAME="Wade Wilson" python main.py + +// Nu kan het de omgevingsvariabele lezen + +Hello Wade Wilson from Python + +// De omgevingsvariabelen bestaan daarna niet meer +$ python main.py + +Hello World from Python +``` + +
+ +/// tip + +Je kunt er meer over lezen op The Twelve-Factor App: Config. + +/// + +## Types en Validatie + +Deze omgevingsvariabelen kunnen alleen **tekstuele gegevens** verwerken, omdat ze extern zijn aan Python, compatibel moeten zijn met andere programma's en de rest van het systeem (zelfs met verschillende besturingssystemen, zoals Linux, Windows en macOS). + +Dat betekent dat **elke waarde** die in Python uit een omgevingsvariabele wordt gelezen **een `str` zal zijn** en dat elke conversie naar een ander type of elke validatie in de code moet worden uitgevoerd. + +Meer informatie over het gebruik van omgevingsvariabelen voor het verwerken van **applicatie instellingen** vind je in de [Geavanceerde gebruikershandleiding - Instellingen en Omgevingsvariabelen](./advanced/settings.md){.internal-link target=_blank}. + +## `PATH` Omgevingsvariabele + +Er is een **speciale** omgevingsvariabele met de naam **`PATH`**, die door de besturingssystemen (Linux, macOS, Windows) wordt gebruikt om programma's te vinden die uitgevoerd kunnen worden. + +De waarde van de variabele `PATH` is een lange string die bestaat uit mappen die gescheiden worden door een dubbele punt `:` op Linux en macOS en door een puntkomma `;` op Windows. + +De omgevingsvariabele `PATH` zou er bijvoorbeeld zo uit kunnen zien: + +//// tab | Linux, macOS + +```plaintext +/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin +``` + +Dit betekent dat het systeem naar programma's zoekt in de mappen: + +* `/usr/local/bin` +* `/usr/bin` +* `/bin` +* `/usr/sbin` +* `/sbin` + +//// + +//// tab | Windows + +```plaintext +C:\Program Files\Python312\Scripts;C:\Program Files\Python312;C:\Windows\System32 +``` + +Dit betekent dat het systeem naar programma's zoekt in de mappen: + +* `C:\Program Files\Python312\Scripts` +* `C:\Program Files\Python312` +* `C:\Windows\System32` + +//// + +Wanneer je een **opdracht** in de terminal typt, **zoekt** het besturingssysteem naar het programma in **elk van de mappen** die vermeld staan in de omgevingsvariabele `PATH`. + +Wanneer je bijvoorbeeld `python` in de terminal typt, zoekt het besturingssysteem naar een programma met de naam `python` in de **eerste map** in die lijst. + +Zodra het gevonden wordt, zal het dat programma **gebruiken**. Anders blijft het in de **andere mappen** zoeken. + +### Python installeren en `PATH` bijwerken + +Wanneer je Python installeert, word je mogelijk gevraagd of je de omgevingsvariabele `PATH` wilt bijwerken. + +//// tab | Linux, macOS + +Stel dat je Python installeert en het komt terecht in de map `/opt/custompython/bin`. + +Als je kiest om de `PATH` omgevingsvariabele bij te werken, zal het installatieprogramma `/opt/custompython/bin` toevoegen aan de `PATH` omgevingsvariabele. + +Dit zou er zo uit kunnen zien: + +```plaintext +/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/custompython/bin +``` + +Op deze manier zal het systeem, wanneer je `python` in de terminal typt, het Python-programma in `/opt/custompython/bin` (de laatste map) vinden en dat gebruiken. + +//// + +//// tab | Windows + +Stel dat je Python installeert en het komt terecht in de map `C:\opt\custompython\bin`. + +Als je kiest om de `PATH` omgevingsvariabele bij te werken, zal het installatieprogramma `C:\opt\custompython\bin` toevoegen aan de `PATH` omgevingsvariabele. + +```plaintext +C:\Program Files\Python312\Scripts;C:\Program Files\Python312;C:\Windows\System32;C:\opt\custompython\bin +``` + +Op deze manier zal het systeem, wanneer je `python` in de terminal typt, het Python-programma in `C:\opt\custompython\bin` (de laatste map) vinden en dat gebruiken. + +//// + +Dus als je typt: + +
+ +```console +$ python +``` + +
+ +//// tab | Linux, macOS + +Zal het systeem het `python`-programma in `/opt/custompython/bin` **vinden** en uitvoeren. + +Het zou ongeveer hetzelfde zijn als het typen van: + +
+ +```console +$ /opt/custompython/bin/python +``` + +
+ +//// + +//// tab | Windows + +Zal het systeem het `python`-programma in `C:\opt\custompython\bin\python` **vinden** en uitvoeren. + +Het zou ongeveer hetzelfde zijn als het typen van: + +
+ +```console +$ C:\opt\custompython\bin\python +``` + +
+ +//// + +Deze informatie is handig wanneer je meer wilt weten over [virtuele omgevingen](virtual-environments.md){.internal-link target=_blank}. + +## Conclusion + +Hiermee heb je basiskennis van wat **omgevingsvariabelen** zijn en hoe je ze in Python kunt gebruiken. + +Je kunt er ook meer over lezen op de Wikipedia over omgevingsvariabelen. + +In veel gevallen is het niet direct duidelijk hoe omgevingsvariabelen nuttig zijn en hoe je ze moet toepassen. Maar ze blijven in veel verschillende scenario's opduiken als je aan het ontwikkelen bent, dus het is goed om er meer over te weten. + +Je hebt deze informatie bijvoorbeeld nodig in de volgende sectie, over [Virtuele Omgevingen](virtual-environments.md). From 13e20228a92acadac0175ec61a7dd50c695708b0 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 20 Sep 2024 11:15:35 +0000 Subject: [PATCH 12/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 9e44bbf45..30d9280a3 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -13,6 +13,7 @@ hide: ### Translations +* 🌐 Add Dutch translation for `docs/nl/docs/environment-variables.md`. PR [#12200](https://github.com/fastapi/fastapi/pull/12200) by [@maxscheijen](https://github.com/maxscheijen). * 🌐 Add Portuguese translation for `docs/pt/docs/deployment/manually.md`. PR [#12210](https://github.com/fastapi/fastapi/pull/12210) by [@JoaoGustavoRogel](https://github.com/JoaoGustavoRogel). * 🌐 Add Portuguese translation for `docs/pt/docs/deployment/server-workers.md`. PR [#12220](https://github.com/fastapi/fastapi/pull/12220) by [@marcelomarkus](https://github.com/marcelomarkus). * 🌐 Add Portuguese translation for `docs/pt/docs/how-to/configure-swagger-ui.md`. PR [#12222](https://github.com/fastapi/fastapi/pull/12222) by [@marcelomarkus](https://github.com/marcelomarkus). From 2cdf111e61a6ef8499be8722f2a036f3cd82b46a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20S=C3=A1nchez=20Castro?= <72013291+JavierSanchezCastro@users.noreply.github.com> Date: Fri, 20 Sep 2024 13:34:07 +0200 Subject: [PATCH 13/90] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20Fix=20typo=20in=20`d?= =?UTF-8?q?ocs/es/docs/python-types.md`=20(#12235)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/es/docs/python-types.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/es/docs/python-types.md b/docs/es/docs/python-types.md index 4015dbb05..c873385bc 100644 --- a/docs/es/docs/python-types.md +++ b/docs/es/docs/python-types.md @@ -46,7 +46,7 @@ La funciĂłn hace lo siguiente: Es un programa muy simple. -Ahora, imagina que lo estĂĄs escribiendo desde ceros. +Ahora, imagina que lo estĂĄs escribiendo desde cero. En algĂșn punto habrĂ­as comenzado con la definiciĂłn de la funciĂłn, tenĂ­as los parĂĄmetros listos... From f6dfb832c59c1bdacbad6dc2ee7bb97d08381339 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 20 Sep 2024 11:34:29 +0000 Subject: [PATCH 14/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 30d9280a3..3ca428393 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -13,6 +13,7 @@ hide: ### Translations +* ✏ Fix typo in `docs/es/docs/python-types.md`. PR [#12235](https://github.com/fastapi/fastapi/pull/12235) by [@JavierSanchezCastro](https://github.com/JavierSanchezCastro). * 🌐 Add Dutch translation for `docs/nl/docs/environment-variables.md`. PR [#12200](https://github.com/fastapi/fastapi/pull/12200) by [@maxscheijen](https://github.com/maxscheijen). * 🌐 Add Portuguese translation for `docs/pt/docs/deployment/manually.md`. PR [#12210](https://github.com/fastapi/fastapi/pull/12210) by [@JoaoGustavoRogel](https://github.com/JoaoGustavoRogel). * 🌐 Add Portuguese translation for `docs/pt/docs/deployment/server-workers.md`. PR [#12220](https://github.com/fastapi/fastapi/pull/12220) by [@marcelomarkus](https://github.com/marcelomarkus). From 6a2ad7031cb8e073fc11b3349816a8f48fca1864 Mon Sep 17 00:00:00 2001 From: marcelomarkus Date: Sat, 21 Sep 2024 18:37:48 -0300 Subject: [PATCH 15/90] =?UTF-8?q?=F0=9F=8C=90=20Add=20Portuguese=20transla?= =?UTF-8?q?tion=20for=20`docs/pt/docs/deployment/cloud.md`=20(#12217)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/pt/docs/deployment/cloud.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 docs/pt/docs/deployment/cloud.md diff --git a/docs/pt/docs/deployment/cloud.md b/docs/pt/docs/deployment/cloud.md new file mode 100644 index 000000000..e6522f50f --- /dev/null +++ b/docs/pt/docs/deployment/cloud.md @@ -0,0 +1,17 @@ +# Implantar FastAPI em provedores de nuvem + +VocĂȘ pode usar praticamente **qualquer provedor de nuvem** para implantar seu aplicativo FastAPI. + +Na maioria dos casos, os principais provedores de nuvem tĂȘm guias para implantar o FastAPI com eles. + +## Provedores de Nuvem - Patrocinadores + +Alguns provedores de nuvem ✹ [**patrocinam o FastAPI**](../help-fastapi.md#sponsor-the-author){.internal-link target=_blank} ✹, o que garante o **desenvolvimento** contĂ­nuo e saudĂĄvel do FastAPI e seu **ecossistema**. + +E isso mostra seu verdadeiro comprometimento com o FastAPI e sua **comunidade** (vocĂȘ), pois eles nĂŁo querem apenas fornecer a vocĂȘ um **bom serviço**, mas tambĂ©m querem ter certeza de que vocĂȘ tenha uma **estrutura boa e saudĂĄvel**, o FastAPI. 🙇 + +Talvez vocĂȘ queira experimentar os serviços deles e seguir os guias: + +* Platform.sh +* Porter +* Coherence From 9606b916ef7c883f5ebeac1bf3db9adf5ae646a9 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 21 Sep 2024 21:38:11 +0000 Subject: [PATCH 16/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 3ca428393..c345b6045 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -13,6 +13,7 @@ hide: ### Translations +* 🌐 Add Portuguese translation for `docs/pt/docs/deployment/cloud.md`. PR [#12217](https://github.com/fastapi/fastapi/pull/12217) by [@marcelomarkus](https://github.com/marcelomarkus). * ✏ Fix typo in `docs/es/docs/python-types.md`. PR [#12235](https://github.com/fastapi/fastapi/pull/12235) by [@JavierSanchezCastro](https://github.com/JavierSanchezCastro). * 🌐 Add Dutch translation for `docs/nl/docs/environment-variables.md`. PR [#12200](https://github.com/fastapi/fastapi/pull/12200) by [@maxscheijen](https://github.com/maxscheijen). * 🌐 Add Portuguese translation for `docs/pt/docs/deployment/manually.md`. PR [#12210](https://github.com/fastapi/fastapi/pull/12210) by [@JoaoGustavoRogel](https://github.com/JoaoGustavoRogel). From d9e989e274e9224c20f1847c2110896c2a4cc23d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2024 12:14:00 +0200 Subject: [PATCH 17/90] =?UTF-8?q?=E2=AC=86=20[pre-commit.ci]=20pre-commit?= =?UTF-8?q?=20autoupdate=20(#12253)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.6.5 → v0.6.7](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.5...v0.6.7) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4b1b10a68..1502f0abd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.5 + rev: v0.6.7 hooks: - id: ruff args: From 10f3cb5ab1d5e2848146b85256df056c1bcc9753 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 24 Sep 2024 10:14:28 +0000 Subject: [PATCH 18/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index c345b6045..8a6f2d8be 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -22,6 +22,7 @@ hide: ### Internal +* ⬆ [pre-commit.ci] pre-commit autoupdate. PR [#12253](https://github.com/fastapi/fastapi/pull/12253) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci). * ✏ Fix docstring typos in http security. PR [#12223](https://github.com/fastapi/fastapi/pull/12223) by [@albertvillanova](https://github.com/albertvillanova). ## 0.115.0 From bb018fc46cac48fd51675dfbbeb8d9b3b204fdc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Thu, 26 Sep 2024 19:17:21 +0200 Subject: [PATCH 19/90] =?UTF-8?q?=F0=9F=94=A7=20Update=20sponsors,=20remov?= =?UTF-8?q?e=20Fine.dev=20(#12271)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 - docs/en/data/sponsors.yml | 3 --- docs/en/overrides/main.html | 6 ------ 3 files changed, 10 deletions(-) diff --git a/README.md b/README.md index 3b01b713a..f274265de 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,6 @@ The key features are: - diff --git a/docs/en/data/sponsors.yml b/docs/en/data/sponsors.yml index d96646fb3..6db9c509a 100644 --- a/docs/en/data/sponsors.yml +++ b/docs/en/data/sponsors.yml @@ -26,9 +26,6 @@ gold: - url: https://zuplo.link/fastapi-gh title: 'Zuplo: Scale, Protect, Document, and Monetize your FastAPI' img: https://fastapi.tiangolo.com/img/sponsors/zuplo.png - - url: https://fine.dev?ref=fastapibadge - title: "Fine's AI FastAPI Workflow: Effortlessly Deploy and Integrate FastAPI into Your Project" - img: https://fastapi.tiangolo.com/img/sponsors/fine.png - url: https://liblab.com?utm_source=fastapi title: liblab - Generate SDKs from FastAPI img: https://fastapi.tiangolo.com/img/sponsors/liblab.png diff --git a/docs/en/overrides/main.html b/docs/en/overrides/main.html index 463c5af3b..462907e7c 100644 --- a/docs/en/overrides/main.html +++ b/docs/en/overrides/main.html @@ -76,12 +76,6 @@ -
From 847296e885ed83bc333b6cc0a3000d6242083b87 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 26 Sep 2024 17:17:48 +0000 Subject: [PATCH 20/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 8a6f2d8be..885112a6a 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -22,6 +22,7 @@ hide: ### Internal +* 🔧 Update sponsors, remove Fine.dev. PR [#12271](https://github.com/fastapi/fastapi/pull/12271) by [@tiangolo](https://github.com/tiangolo). * ⬆ [pre-commit.ci] pre-commit autoupdate. PR [#12253](https://github.com/fastapi/fastapi/pull/12253) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci). * ✏ Fix docstring typos in http security. PR [#12223](https://github.com/fastapi/fastapi/pull/12223) by [@albertvillanova](https://github.com/albertvillanova). From f0ebae6e9ec1fdbef7720968ee9eadf5d9ad8045 Mon Sep 17 00:00:00 2001 From: Anderson Rocha Date: Fri, 4 Oct 2024 11:55:49 +0100 Subject: [PATCH 21/90] =?UTF-8?q?=20=F0=9F=8C=90=20Update=20Portuguese=20t?= =?UTF-8?q?ranslation=20for=20`docs/pt/docs/advanced/security/http-basic-a?= =?UTF-8?q?uth.md`=20(#12275)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../docs/advanced/security/http-basic-auth.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/pt/docs/advanced/security/http-basic-auth.md b/docs/pt/docs/advanced/security/http-basic-auth.md index 12b8ab01c..103d622c7 100644 --- a/docs/pt/docs/advanced/security/http-basic-auth.md +++ b/docs/pt/docs/advanced/security/http-basic-auth.md @@ -62,7 +62,7 @@ Utilize uma dependĂȘncia para verificar se o usuĂĄrio e a senha estĂŁo corretos. Para isso, utilize o mĂłdulo padrĂŁo do Python `secrets` para verificar o usuĂĄrio e senha. -O `secrets.compare_digest()` necessita receber `bytes` ou `str` que possuem apenas caracteres ASCII (os em InglĂȘs). Isso significa que nĂŁo funcionaria com caracteres como o `ĂĄ`, como em `SebastiĂĄn`. +O `secrets.compare_digest()` necessita receber `bytes` ou `str` que possuem apenas caracteres ASCII (os em inglĂȘs). Isso significa que nĂŁo funcionaria com caracteres como o `ĂĄ`, como em `SebastiĂĄn`. Para lidar com isso, primeiramente nĂłs convertemos o `username` e o `password` para `bytes`, codificando-os com UTF-8. @@ -106,11 +106,11 @@ if not (credentials.username == "stanleyjobson") or not (credentials.password == ... ``` -PorĂ©m ao utilizar o `secrets.compare_digest()`, isso estarĂĄ seguro contra um tipo de ataque chamado "ataque de temporização (timing attacks)". +PorĂ©m, ao utilizar o `secrets.compare_digest()`, isso estarĂĄ seguro contra um tipo de ataque chamado "timing attacks" (ataques de temporização). ### Ataques de Temporização -Mas o que Ă© um "ataque de temporização"? +Mas o que Ă© um "timing attack" (ataque de temporização)? Vamos imaginar que alguns invasores estĂŁo tentando adivinhar o usuĂĄrio e a senha. @@ -125,7 +125,7 @@ if "johndoe" == "stanleyjobson" and "love123" == "swordfish": Mas no exato momento que o Python compara o primeiro `j` em `johndoe` contra o primeiro `s` em `stanleyjobson`, ele retornarĂĄ `False`, porque ele jĂĄ sabe que aquelas duas strings nĂŁo sĂŁo a mesma, pensando que "nĂŁo existe a necessidade de desperdiçar mais poder computacional comparando o resto das letras". E a sua aplicação dirĂĄ "UsuĂĄrio ou senha incorretos". -Mas entĂŁo os invasores vĂŁo tentar com o usuĂĄrio `stanleyjobsox` e a senha `love123`. +EntĂŁo os invasores vĂŁo tentar com o usuĂĄrio `stanleyjobsox` e a senha `love123`. E a sua aplicação faz algo como: @@ -134,11 +134,11 @@ if "stanleyjobsox" == "stanleyjobson" and "love123" == "swordfish": ... ``` -O Python terĂĄ que comparar todo o `stanleyjobso` tanto em `stanleyjobsox` como em `stanleyjobson` antes de perceber que as strings nĂŁo sĂŁo a mesma. EntĂŁo isso levarĂĄ alguns microsegundos a mais para retornar "UsuĂĄrio ou senha incorretos". +O Python terĂĄ que comparar todo o `stanleyjobso` tanto em `stanleyjobsox` como em `stanleyjobson` antes de perceber que as strings nĂŁo sĂŁo a mesma. EntĂŁo isso levarĂĄ alguns microssegundos a mais para retornar "UsuĂĄrio ou senha incorretos". #### O tempo para responder ajuda os invasores -Neste ponto, ao perceber que o servidor demorou alguns microsegundos a mais para enviar o retorno "UsuĂĄrio ou senha incorretos", os invasores irĂŁo saber que eles acertaram _alguma coisa_, algumas das letras iniciais estavam certas. +Neste ponto, ao perceber que o servidor demorou alguns microssegundos a mais para enviar o retorno "UsuĂĄrio ou senha incorretos", os invasores irĂŁo saber que eles acertaram _alguma coisa_, algumas das letras iniciais estavam certas. E eles podem tentar de novo sabendo que provavelmente Ă© algo mais parecido com `stanleyjobsox` do que com `johndoe`. @@ -150,16 +150,16 @@ Mas fazendo isso, em alguns minutos ou horas os invasores teriam adivinhado o us #### Corrija com o `secrets.compare_digest()` -Mas em nosso cĂłdigo nĂłs estamos utilizando o `secrets.compare_digest()`. +Mas em nosso cĂłdigo jĂĄ estamos utilizando o `secrets.compare_digest()`. Resumindo, levarĂĄ o mesmo tempo para comparar `stanleyjobsox` com `stanleyjobson` do que comparar `johndoe` com `stanleyjobson`. E o mesmo para a senha. -Deste modo, ao utilizar `secrets.compare_digest()` no cĂłdigo de sua aplicação, ela esterĂĄ a salvo contra toda essa gama de ataques de segurança. +Deste modo, ao utilizar `secrets.compare_digest()` no cĂłdigo de sua aplicação, ela estarĂĄ a salvo contra toda essa gama de ataques de segurança. ### Retorne o erro -Depois de detectar que as credenciais estĂŁo incorretas, retorne um `HTTPException` com o status 401 (o mesmo retornado quando nenhuma credencial foi informada) e adicione o cabeçalho `WWW-Authenticate` para fazer com que o navegador mostre o prompt de login novamente: +ApĂłs detectar que as credenciais estĂŁo incorretas, retorne um `HTTPException` com o status 401 (o mesmo retornado quando nenhuma credencial foi informada) e adicione o cabeçalho `WWW-Authenticate` para fazer com que o navegador mostre o prompt de login novamente: //// tab | Python 3.9+ From 919721ce8d08c04e5dbf657481502539a92ddad0 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 4 Oct 2024 10:56:12 +0000 Subject: [PATCH 22/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 885112a6a..242981548 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -13,6 +13,7 @@ hide: ### Translations +* 🌐 Update Portuguese translation for `docs/pt/docs/advanced/security/http-basic-auth.md`. PR [#12275](https://github.com/fastapi/fastapi/pull/12275) by [@andersonrocha0](https://github.com/andersonrocha0). * 🌐 Add Portuguese translation for `docs/pt/docs/deployment/cloud.md`. PR [#12217](https://github.com/fastapi/fastapi/pull/12217) by [@marcelomarkus](https://github.com/marcelomarkus). * ✏ Fix typo in `docs/es/docs/python-types.md`. PR [#12235](https://github.com/fastapi/fastapi/pull/12235) by [@JavierSanchezCastro](https://github.com/JavierSanchezCastro). * 🌐 Add Dutch translation for `docs/nl/docs/environment-variables.md`. PR [#12200](https://github.com/fastapi/fastapi/pull/12200) by [@maxscheijen](https://github.com/maxscheijen). From 0030f1749e4e74a4cfd58f59d85f7c4c279d239d Mon Sep 17 00:00:00 2001 From: kkotipy Date: Fri, 4 Oct 2024 19:57:17 +0900 Subject: [PATCH 23/90] =?UTF-8?q?=F0=9F=8C=90=20Fix=20Korean=20translation?= =?UTF-8?q?=20for=20`docs/ko/docs/tutorial/index.md`=20(#12278)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/ko/docs/tutorial/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ko/docs/tutorial/index.md b/docs/ko/docs/tutorial/index.md index d00a942f0..a148bc76e 100644 --- a/docs/ko/docs/tutorial/index.md +++ b/docs/ko/docs/tutorial/index.md @@ -30,7 +30,7 @@ $ uvicorn main:app --reload 윔드넌 작성하거나 ëł”ì‚Ź, 펞집할 때, ëĄœì»Ź 환êČœì—ì„œ 싀행하는 êČƒì„ **강렄히 권임**합니닀. -ëĄœì»Ź 펞집Ʞ에서 ì‚Źìš©í•œë‹€ë©Ž, ëȘšë“  타입 êČ€ì‚Źì™€ 자동완성 등 작성핎알 하는 윔드가 얌마나 적은지 ëłŽë©Žì„œ FastAPI의 ëč„ëĄœì†Œ êČœí—˜í•  수 있슔니닀. +ëĄœì»Ź 펞집Ʞ에서 ì‚Źìš©í•œë‹€ë©Ž, ëȘšë“  타입 êČ€ì‚Źì™€ 자동완성 등 작성핎알 하는 윔드가 얌마나 적은지 ëłŽë©Žì„œ FastAPI의 읎점을 ëč„ëĄœì†Œ êČœí—˜í•  수 있슔니닀. --- From ca68c99a6eebec8d665517a88e34a514255aa36b Mon Sep 17 00:00:00 2001 From: Rafael de Oliveira Marques Date: Fri, 4 Oct 2024 07:58:03 -0300 Subject: [PATCH 24/90] =?UTF-8?q?=F0=9F=8C=90=20Update=20Portuguese=20tran?= =?UTF-8?q?slation=20for=20`docs/pt/docs/tutorial/cookie-params.md`=20(#12?= =?UTF-8?q?297)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/pt/docs/tutorial/cookie-params.md | 109 +++++++++++++++++++++++-- 1 file changed, 103 insertions(+), 6 deletions(-) diff --git a/docs/pt/docs/tutorial/cookie-params.md b/docs/pt/docs/tutorial/cookie-params.md index caed17632..bb59dcd2c 100644 --- a/docs/pt/docs/tutorial/cookie-params.md +++ b/docs/pt/docs/tutorial/cookie-params.md @@ -6,21 +6,118 @@ VocĂȘ pode definir parĂąmetros de Cookie da mesma maneira que define paramĂȘtros Primeiro importe `Cookie`: +//// tab | Python 3.10+ + +```Python hl_lines="3" +{!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!} +``` + +//// + +//// tab | Python 3.9+ + ```Python hl_lines="3" -{!../../../docs_src/cookie_params/tutorial001.py!} +{!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!} ``` +//// + +//// tab | Python 3.8+ + +```Python hl_lines="3" +{!> ../../../docs_src/cookie_params/tutorial001_an.py!} +``` + +//// + +//// tab | Python 3.10+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="1" +{!> ../../../docs_src/cookie_params/tutorial001_py310.py!} +``` + +//// + +//// tab | Python 3.8+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="3" +{!> ../../../docs_src/cookie_params/tutorial001.py!} +``` + +//// + ## Declare parĂąmetros de `Cookie` EntĂŁo declare os paramĂȘtros de cookie usando a mesma estrutura que em `Path` e `Query`. -O primeiro valor Ă© o valor padrĂŁo, vocĂȘ pode passar todas as validaçÔes adicionais ou parĂąmetros de anotação: +VocĂȘ pode definir o valor padrĂŁo, assim como todas as validaçÔes extras ou parĂąmetros de anotação: + + +//// tab | Python 3.10+ + +```Python hl_lines="9" +{!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!} +``` + +//// + +//// tab | Python 3.9+ ```Python hl_lines="9" -{!../../../docs_src/cookie_params/tutorial001.py!} +{!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!} ``` -/// note | "Detalhes TĂ©cnicos" +//// + +//// tab | Python 3.8+ + +```Python hl_lines="10" +{!> ../../../docs_src/cookie_params/tutorial001_an.py!} +``` + +//// + +//// tab | Python 3.10+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="7" +{!> ../../../docs_src/cookie_params/tutorial001_py310.py!} +``` + +//// + +//// tab | Python 3.8+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="9" +{!> ../../../docs_src/cookie_params/tutorial001.py!} +``` + +//// + +/// note | Detalhes TĂ©cnicos `Cookie` Ă© uma classe "irmĂŁ" de `Path` e `Query`. Ela tambĂ©m herda da mesma classe em comum `Param`. @@ -28,9 +125,9 @@ Mas lembre-se que quando vocĂȘ importa `Query`, `Path`, `Cookie` e outras de `fa /// -/// info | "Informação" +/// info | Informação -Para declarar cookies, vocĂȘ precisa usar `Cookie`, caso contrĂĄrio, os parĂąmetros seriam interpretados como parĂąmetros de consulta. +Para declarar cookies, vocĂȘ precisa usar `Cookie`, pois caso contrĂĄrio, os parĂąmetros seriam interpretados como parĂąmetros de consulta. /// From ed477ee8873219398289b0ef7e2a750151410a0b Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 4 Oct 2024 10:58:40 +0000 Subject: [PATCH 25/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 242981548..d7482cc46 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -13,6 +13,7 @@ hide: ### Translations +* 🌐 Fix Korean translation for `docs/ko/docs/tutorial/index.md`. PR [#12278](https://github.com/fastapi/fastapi/pull/12278) by [@kkotipy](https://github.com/kkotipy). * 🌐 Update Portuguese translation for `docs/pt/docs/advanced/security/http-basic-auth.md`. PR [#12275](https://github.com/fastapi/fastapi/pull/12275) by [@andersonrocha0](https://github.com/andersonrocha0). * 🌐 Add Portuguese translation for `docs/pt/docs/deployment/cloud.md`. PR [#12217](https://github.com/fastapi/fastapi/pull/12217) by [@marcelomarkus](https://github.com/marcelomarkus). * ✏ Fix typo in `docs/es/docs/python-types.md`. PR [#12235](https://github.com/fastapi/fastapi/pull/12235) by [@JavierSanchezCastro](https://github.com/JavierSanchezCastro). From 69921b463ef1669807cc2d793cc9f0193da403cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pedro=20Pereira=20Holanda?= Date: Fri, 4 Oct 2024 08:00:29 -0300 Subject: [PATCH 26/90] =?UTF-8?q?=F0=9F=8C=90=20Add=20Portuguese=20transla?= =?UTF-8?q?tion=20for=20`docs/pt/docs/advanced/response-directly.md`=20(#1?= =?UTF-8?q?2266)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/pt/docs/advanced/response-directly.md | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 docs/pt/docs/advanced/response-directly.md diff --git a/docs/pt/docs/advanced/response-directly.md b/docs/pt/docs/advanced/response-directly.md new file mode 100644 index 000000000..fc571d39b --- /dev/null +++ b/docs/pt/docs/advanced/response-directly.md @@ -0,0 +1,70 @@ +# Retornando uma Resposta Diretamente + +Quando vocĂȘ cria uma *operação de rota* no **FastAPI** vocĂȘ pode retornar qualquer dado nela: um dicionĂĄrio (`dict`), uma lista (`list`), um modelo do Pydantic ou do seu banco de dados, etc. + +Por padrĂŁo, o **FastAPI** irĂĄ converter automaticamente o valor do retorno para JSON utilizando o `jsonable_encoder` explicado em [JSON Compatible Encoder](../tutorial/encoder.md){.internal-link target=_blank}. + +EntĂŁo, por baixo dos panos, ele incluiria esses dados compatĂ­veis com JSON (e.g. um `dict`) dentro de uma `JSONResponse` que Ă© utilizada para enviar uma resposta para o cliente. + +Mas vocĂȘ pode retornar a `JSONResponse` diretamente nas suas *operaçÔes de rota*. + +Pode ser Ăștil para retornar cabeçalhos e cookies personalizados, por exemplo. + +## Retornando uma `Response` + +Na verdade, vocĂȘ pode retornar qualquer `Response` ou subclasse dela. + +/// tip | Dica + +A prĂłpria `JSONResponse` Ă© uma subclasse de `Response`. + +/// + +E quando vocĂȘ retorna uma `Response`, o **FastAPI** vai repassĂĄ-la diretamente. + +Ele nĂŁo vai fazer conversĂ”es de dados com modelos do Pydantic, nĂŁo irĂĄ converter a tipagem de nenhum conteĂșdo, etc. + +Isso te dĂĄ bastante flexibilidade. VocĂȘ pode retornar qualquer tipo de dado, sobrescrever qualquer declaração e validação nos dados, etc. + +## Utilizando o `jsonable_encoder` em uma `Response` + +Como o **FastAPI** nĂŁo realiza nenhuma mudança na `Response` que vocĂȘ retorna, vocĂȘ precisa garantir que o conteĂșdo dela estĂĄ pronto para uso. + +Por exemplo, vocĂȘ nĂŁo pode colocar um modelo do Pydantic em uma `JSONResponse` sem antes convertĂȘ-lo em um `dict` com todos os tipos de dados (como `datetime`, `UUID`, etc) convertidos para tipos compatĂ­veis com JSON. + +Para esses casos, vocĂȘ pode usar o `jsonable_encoder` para converter seus dados antes de repassĂĄ-los para a resposta: + +```Python hl_lines="6-7 21-22" +{!../../../docs_src/response_directly/tutorial001.py!} +``` + +/// note | Detalhes TĂ©cnicos + +VocĂȘ tambĂ©m pode utilizar `from starlette.responses import JSONResponse`. + +**FastAPI** utiliza a mesma `starlette.responses` como `fastapi.responses` apenas como uma conveniĂȘncia para vocĂȘ, desenvolvedor. Mas maior parte das respostas disponĂ­veis vem diretamente do Starlette. + +/// + +## Retornando uma `Response` + +O exemplo acima mostra todas as partes que vocĂȘ precisa, mas ainda nĂŁo Ă© muito Ăștil, jĂĄ que vocĂȘ poderia ter retornado o `item` diretamente, e o **FastAPI** colocaria em uma `JSONResponse` para vocĂȘ, convertendo em um `dict`, etc. Tudo isso por padrĂŁo. + +Agora, vamos ver como vocĂȘ pode usar isso para retornar uma resposta personalizada. + +Vamos dizer quer retornar uma resposta XML. + +VocĂȘ pode colocar o seu conteĂșdo XML em uma string, colocar em uma `Response`, e retornĂĄ-lo: + +```Python hl_lines="1 18" +{!../../../docs_src/response_directly/tutorial002.py!} +``` + +## Notas + +Quando vocĂȘ retorna uma `Response` diretamente os dados nĂŁo sĂŁo validados, convertidos (serializados) ou documentados automaticamente. + +Mas vocĂȘ ainda pode documentar como descrito em [Retornos Adicionais no OpenAPI +](additional-responses.md){.internal-link target=_blank}. + +VocĂȘ pode ver nas prĂłximas seçÔes como usar/declarar essas `Responses` customizadas enquanto mantĂ©m a conversĂŁo e documentação automĂĄtica dos dados. From 98d190f780691fa3a8cc3abdc9805f05e6a1b751 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 4 Oct 2024 11:01:25 +0000 Subject: [PATCH 27/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index d7482cc46..f66e72753 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -13,6 +13,7 @@ hide: ### Translations +* 🌐 Update Portuguese translation for `docs/pt/docs/tutorial/cookie-params.md`. PR [#12297](https://github.com/fastapi/fastapi/pull/12297) by [@ceb10n](https://github.com/ceb10n). * 🌐 Fix Korean translation for `docs/ko/docs/tutorial/index.md`. PR [#12278](https://github.com/fastapi/fastapi/pull/12278) by [@kkotipy](https://github.com/kkotipy). * 🌐 Update Portuguese translation for `docs/pt/docs/advanced/security/http-basic-auth.md`. PR [#12275](https://github.com/fastapi/fastapi/pull/12275) by [@andersonrocha0](https://github.com/andersonrocha0). * 🌐 Add Portuguese translation for `docs/pt/docs/deployment/cloud.md`. PR [#12217](https://github.com/fastapi/fastapi/pull/12217) by [@marcelomarkus](https://github.com/marcelomarkus). From b1c03ba57e50c25c6e40501bb87ce4063a91e885 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 4 Oct 2024 11:03:27 +0000 Subject: [PATCH 28/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index f66e72753..c871e1c71 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -13,6 +13,7 @@ hide: ### Translations +* 🌐 Add Portuguese translation for `docs/pt/docs/advanced/response-directly.md`. PR [#12266](https://github.com/fastapi/fastapi/pull/12266) by [@Joao-Pedro-P-Holanda](https://github.com/Joao-Pedro-P-Holanda). * 🌐 Update Portuguese translation for `docs/pt/docs/tutorial/cookie-params.md`. PR [#12297](https://github.com/fastapi/fastapi/pull/12297) by [@ceb10n](https://github.com/ceb10n). * 🌐 Fix Korean translation for `docs/ko/docs/tutorial/index.md`. PR [#12278](https://github.com/fastapi/fastapi/pull/12278) by [@kkotipy](https://github.com/kkotipy). * 🌐 Update Portuguese translation for `docs/pt/docs/advanced/security/http-basic-auth.md`. PR [#12275](https://github.com/fastapi/fastapi/pull/12275) by [@andersonrocha0](https://github.com/andersonrocha0). From fa50b0c73cbf2bc298c596dda8f79e4789608341 Mon Sep 17 00:00:00 2001 From: marcelomarkus Date: Fri, 4 Oct 2024 08:03:46 -0300 Subject: [PATCH 29/90] =?UTF-8?q?=F0=9F=8C=90=20Add=20Portuguese=20transla?= =?UTF-8?q?tion=20for=20`docs/pt/docs/how-to/conditional-openapi.md`=20(#1?= =?UTF-8?q?2221)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/pt/docs/how-to/conditional-openapi.md | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 docs/pt/docs/how-to/conditional-openapi.md diff --git a/docs/pt/docs/how-to/conditional-openapi.md b/docs/pt/docs/how-to/conditional-openapi.md new file mode 100644 index 000000000..cfa652fa5 --- /dev/null +++ b/docs/pt/docs/how-to/conditional-openapi.md @@ -0,0 +1,58 @@ +# OpenAPI condicional + +Se necessĂĄrio, vocĂȘ pode usar configuraçÔes e variĂĄveis ​​de ambiente para configurar o OpenAPI condicionalmente, dependendo do ambiente, e atĂ© mesmo desativĂĄ-lo completamente. + +## Sobre segurança, APIs e documentos + +Ocultar suas interfaces de usuĂĄrio de documentação na produção *nĂŁo deveria* ser a maneira de proteger sua API. + +Isso nĂŁo adiciona nenhuma segurança extra Ă  sua API; as *operaçÔes de rotas* ainda estarĂŁo disponĂ­veis onde estĂŁo. + +Se houver uma falha de segurança no seu cĂłdigo, ela ainda existirĂĄ. + +Ocultar a documentação apenas torna mais difĂ­cil entender como interagir com sua API e pode dificultar sua depuração na produção. Pode ser considerado simplesmente uma forma de Segurança atravĂ©s da obscuridade. + +Se vocĂȘ quiser proteger sua API, hĂĄ vĂĄrias coisas melhores que vocĂȘ pode fazer, por exemplo: + +* Certifique-se de ter modelos Pydantic bem definidos para seus corpos de solicitação e respostas. +* Configure quaisquer permissĂ”es e funçÔes necessĂĄrias usando dependĂȘncias. +* Nunca armazene senhas em texto simples, apenas hashes de senha. +* Implemente e use ferramentas criptogrĂĄficas bem conhecidas, como tokens JWT e Passlib, etc. +* Adicione controles de permissĂŁo mais granulares com escopos OAuth2 quando necessĂĄrio. +* ...etc. + +No entanto, vocĂȘ pode ter um caso de uso muito especĂ­fico em que realmente precisa desabilitar a documentação da API para algum ambiente (por exemplo, para produção) ou dependendo de configuraçÔes de variĂĄveis ​​de ambiente. + +## OpenAPI condicional com configuraçÔes e variĂĄveis ​​de ambiente + +VocĂȘ pode usar facilmente as mesmas configuraçÔes do Pydantic para configurar sua OpenAPI gerada e as interfaces de usuĂĄrio de documentos. + +Por exemplo: + +```Python hl_lines="6 11" +{!../../../docs_src/conditional_openapi/tutorial001.py!} +``` + +Aqui declaramos a configuração `openapi_url` com o mesmo padrĂŁo de `"/openapi.json"`. + +E entĂŁo o usamos ao criar o aplicativo `FastAPI`. + +EntĂŁo vocĂȘ pode desabilitar o OpenAPI (incluindo os documentos da interface do usuĂĄrio) definindo a variĂĄvel de ambiente `OPENAPI_URL` como uma string vazia, como: + +
+ +```console +$ OPENAPI_URL= uvicorn main:app + +INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) +``` + +
+ +EntĂŁo, se vocĂȘ acessar as URLs em `/openapi.json`, `/docs` ou `/redoc`, vocĂȘ receberĂĄ apenas um erro `404 NĂŁo Encontrado` como: + +```JSON +{ + "detail": "Not Found" +} +``` From 17e234452abc3dce895e2e2e93c48f856dd43da3 Mon Sep 17 00:00:00 2001 From: marcelomarkus Date: Fri, 4 Oct 2024 08:04:50 -0300 Subject: [PATCH 30/90] =?UTF-8?q?=F0=9F=8C=90=20Add=20Portuguese=20transla?= =?UTF-8?q?tion=20for=20`docs/pt/docs/deployment/concepts.md`=20(#12219)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/pt/docs/deployment/concepts.md | 321 ++++++++++++++++++++++++++++ 1 file changed, 321 insertions(+) create mode 100644 docs/pt/docs/deployment/concepts.md diff --git a/docs/pt/docs/deployment/concepts.md b/docs/pt/docs/deployment/concepts.md new file mode 100644 index 000000000..20513c366 --- /dev/null +++ b/docs/pt/docs/deployment/concepts.md @@ -0,0 +1,321 @@ +# Conceitos de ImplantaçÔes + +Ao implantar um aplicativo **FastAPI**, ou na verdade, qualquer tipo de API da web, hĂĄ vĂĄrios conceitos com os quais vocĂȘ provavelmente se importa e, usando-os, vocĂȘ pode encontrar a maneira **mais apropriada** de **implantar seu aplicativo**. + +Alguns dos conceitos importantes sĂŁo: + +* Segurança - HTTPS +* Executando na inicialização +* ReinicializaçÔes +* Replicação (o nĂșmero de processos em execução) +* MemĂłria +* Etapas anteriores antes de iniciar + +Veremos como eles afetariam as **implantaçÔes**. + +No final, o principal objetivo Ă© ser capaz de **atender seus clientes de API** de uma forma **segura**, **evitar interrupçÔes** e usar os **recursos de computação** (por exemplo, servidores remotos/mĂĄquinas virtuais) da forma mais eficiente possĂ­vel. 🚀 + +Vou lhe contar um pouco mais sobre esses **conceitos** aqui, e espero que isso lhe dĂȘ a **intuição** necessĂĄria para decidir como implantar sua API em ambientes muito diferentes, possivelmente atĂ© mesmo em **futuros** ambientes que ainda nĂŁo existem. + +Ao considerar esses conceitos, vocĂȘ serĂĄ capaz de **avaliar e projetar** a melhor maneira de implantar **suas prĂłprias APIs**. + +Nos prĂłximos capĂ­tulos, darei a vocĂȘ mais **receitas concretas** para implantar aplicativos FastAPI. + +Mas por enquanto, vamos verificar essas importantes **ideias conceituais**. Esses conceitos tambĂ©m se aplicam a qualquer outro tipo de API da web. 💡 + +## Segurança - HTTPS + +No [capĂ­tulo anterior sobre HTTPS](https.md){.internal-link target=_blank} aprendemos como o HTTPS fornece criptografia para sua API. + +TambĂ©m vimos que o HTTPS normalmente Ă© fornecido por um componente **externo** ao seu servidor de aplicativos, um **Proxy de terminação TLS**. + +E tem que haver algo responsĂĄvel por **renovar os certificados HTTPS**, pode ser o mesmo componente ou pode ser algo diferente. + +### Ferramentas de exemplo para HTTPS + +Algumas das ferramentas que vocĂȘ pode usar como um proxy de terminação TLS sĂŁo: + +* Traefik + * Lida automaticamente com renovaçÔes de certificados ✹ +* Caddy + * Lida automaticamente com renovaçÔes de certificados ✹ +* Nginx + * Com um componente externo como o Certbot para renovaçÔes de certificados +* HAProxy + * Com um componente externo como o Certbot para renovaçÔes de certificados +* Kubernetes com um controlador Ingress como o Nginx + * Com um componente externo como cert-manager para renovaçÔes de certificados +* Gerenciado internamente por um provedor de nuvem como parte de seus serviços (leia abaixo 👇) + +Outra opção Ă© que vocĂȘ poderia usar um **serviço de nuvem** que faz mais do trabalho, incluindo a configuração de HTTPS. Ele pode ter algumas restriçÔes ou cobrar mais, etc. Mas, nesse caso, vocĂȘ nĂŁo teria que configurar um Proxy de terminação TLS sozinho. + +Mostrarei alguns exemplos concretos nos prĂłximos capĂ­tulos. + +--- + +Os prĂłximos conceitos a serem considerados sĂŁo todos sobre o programa que executa sua API real (por exemplo, Uvicorn). + +## Programa e Processo + +Falaremos muito sobre o "**processo**" em execução, entĂŁo Ă© Ăștil ter clareza sobre o que ele significa e qual Ă© a diferença com a palavra "**programa**". + +### O que Ă© um Programa + +A palavra **programa** Ă© comumente usada para descrever muitas coisas: + +* O **cĂłdigo** que vocĂȘ escreve, os **arquivos Python**. +* O **arquivo** que pode ser **executado** pelo sistema operacional, por exemplo: `python`, `python.exe` ou `uvicorn`. +* Um programa especĂ­fico enquanto estĂĄ **em execução** no sistema operacional, usando a CPU e armazenando coisas na memĂłria. Isso tambĂ©m Ă© chamado de **processo**. + +### O que Ă© um Processo + +A palavra **processo** normalmente Ă© usada de forma mais especĂ­fica, referindo-se apenas ao que estĂĄ sendo executado no sistema operacional (como no Ășltimo ponto acima): + +* Um programa especĂ­fico enquanto estĂĄ **em execução** no sistema operacional. + * Isso nĂŁo se refere ao arquivo, nem ao cĂłdigo, refere-se **especificamente** Ă  coisa que estĂĄ sendo **executada** e gerenciada pelo sistema operacional. +* Qualquer programa, qualquer cĂłdigo, **sĂł pode fazer coisas** quando estĂĄ sendo **executado**. EntĂŁo, quando hĂĄ um **processo em execução**. +* O processo pode ser **terminado** (ou "morto") por vocĂȘ, ou pelo sistema operacional. Nesse ponto, ele para de rodar/ser executado, e ele **nĂŁo pode mais fazer coisas**. +* Cada aplicativo que vocĂȘ tem em execução no seu computador tem algum processo por trĂĄs dele, cada programa em execução, cada janela, etc. E normalmente hĂĄ muitos processos em execução **ao mesmo tempo** enquanto um computador estĂĄ ligado. +* Pode haver **vĂĄrios processos** do **mesmo programa** em execução ao mesmo tempo. + +Se vocĂȘ verificar o "gerenciador de tarefas" ou o "monitor do sistema" (ou ferramentas semelhantes) no seu sistema operacional, poderĂĄ ver muitos desses processos em execução. + +E, por exemplo, vocĂȘ provavelmente verĂĄ que hĂĄ vĂĄrios processos executando o mesmo programa de navegador (Firefox, Chrome, Edge, etc.). Eles normalmente executam um processo por aba, alĂ©m de alguns outros processos extras. + + + +--- + +Agora que sabemos a diferença entre os termos **processo** e **programa**, vamos continuar falando sobre implantaçÔes. + +## Executando na inicialização + +Na maioria dos casos, quando vocĂȘ cria uma API web, vocĂȘ quer que ela esteja **sempre em execução**, ininterrupta, para que seus clientes possam sempre acessĂĄ-la. Isso Ă© claro, a menos que vocĂȘ tenha um motivo especĂ­fico para querer que ela seja executada somente em certas situaçÔes, mas na maioria das vezes vocĂȘ quer que ela esteja constantemente em execução e **disponĂ­vel**. + +### Em um servidor remoto + +Ao configurar um servidor remoto (um servidor em nuvem, uma mĂĄquina virtual, etc.), a coisa mais simples que vocĂȘ pode fazer Ă© usar `fastapi run` (que usa Uvicorn) ou algo semelhante, manualmente, da mesma forma que vocĂȘ faz ao desenvolver localmente. + +E funcionarĂĄ e serĂĄ Ăștil **durante o desenvolvimento**. + +Mas se sua conexĂŁo com o servidor for perdida, o **processo em execução** provavelmente morrerĂĄ. + +E se o servidor for reiniciado (por exemplo, apĂłs atualizaçÔes ou migraçÔes do provedor de nuvem), vocĂȘ provavelmente **nĂŁo notarĂĄ**. E por causa disso, vocĂȘ nem saberĂĄ que precisa reiniciar o processo manualmente. EntĂŁo, sua API simplesmente permanecerĂĄ inativa. đŸ˜± + +### Executar automaticamente na inicialização + +Em geral, vocĂȘ provavelmente desejarĂĄ que o programa do servidor (por exemplo, Uvicorn) seja iniciado automaticamente na inicialização do servidor e, sem precisar de nenhuma **intervenção humana**, tenha um processo sempre em execução com sua API (por exemplo, Uvicorn executando seu aplicativo FastAPI). + +### Programa separado + +Para conseguir isso, vocĂȘ normalmente terĂĄ um **programa separado** que garantiria que seu aplicativo fosse executado na inicialização. E em muitos casos, ele tambĂ©m garantiria que outros componentes ou aplicativos tambĂ©m fossem executados, por exemplo, um banco de dados. + +### Ferramentas de exemplo para executar na inicialização + +Alguns exemplos de ferramentas que podem fazer esse trabalho sĂŁo: + +* Docker +* Kubernetes +* Docker Compose +* Docker em Modo Swarm +* Systemd +* Supervisor +* Gerenciado internamente por um provedor de nuvem como parte de seus serviços +* Outros... + +Darei exemplos mais concretos nos prĂłximos capĂ­tulos. + +## ReinicializaçÔes + +Semelhante a garantir que seu aplicativo seja executado na inicialização, vocĂȘ provavelmente tambĂ©m deseja garantir que ele seja **reiniciado** apĂłs falhas. + +### NĂłs cometemos erros + +NĂłs, como humanos, cometemos **erros** o tempo todo. O software quase *sempre* tem **bugs** escondidos em lugares diferentes. 🐛 + +E nĂłs, como desenvolvedores, continuamos aprimorando o cĂłdigo Ă  medida que encontramos esses bugs e implementamos novos recursos (possivelmente adicionando novos bugs tambĂ©m 😅). + +### Pequenos erros sĂŁo tratados automaticamente + +Ao criar APIs da web com FastAPI, se houver um erro em nosso cĂłdigo, o FastAPI normalmente o conterĂĄ na Ășnica solicitação que acionou o erro. 🛡 + +O cliente receberĂĄ um **Erro Interno do Servidor 500** para essa solicitação, mas o aplicativo continuarĂĄ funcionando para as prĂłximas solicitaçÔes em vez de travar completamente. + +### Erros maiores - Travamentos + +No entanto, pode haver casos em que escrevemos algum cĂłdigo que **trava todo o aplicativo**, fazendo com que o Uvicorn e o Python travem. đŸ’„ + +E ainda assim, vocĂȘ provavelmente nĂŁo gostaria que o aplicativo permanecesse inativo porque houve um erro em um lugar, vocĂȘ provavelmente quer que ele **continue em execução** pelo menos para as *operaçÔes de caminho* que nĂŁo estĂŁo quebradas. + +### Reiniciar apĂłs falha + +Mas nos casos com erros realmente graves que travam o **processo** em execução, vocĂȘ vai querer um componente externo que seja responsĂĄvel por **reiniciar** o processo, pelo menos algumas vezes... + +/// tip | "Dica" + +...Embora se o aplicativo inteiro estiver **travando imediatamente**, provavelmente nĂŁo faça sentido reiniciĂĄ-lo para sempre. Mas nesses casos, vocĂȘ provavelmente notarĂĄ isso durante o desenvolvimento, ou pelo menos logo apĂłs a implantação. + +EntĂŁo, vamos nos concentrar nos casos principais, onde ele pode travar completamente em alguns casos especĂ­ficos **no futuro**, e ainda faz sentido reiniciĂĄ-lo. + +/// + +VocĂȘ provavelmente gostaria de ter a coisa responsĂĄvel por reiniciar seu aplicativo como um **componente externo**, porque a essa altura, o mesmo aplicativo com Uvicorn e Python jĂĄ havia travado, entĂŁo nĂŁo hĂĄ nada no mesmo cĂłdigo do mesmo aplicativo que possa fazer algo a respeito. + +### Ferramentas de exemplo para reiniciar automaticamente + +Na maioria dos casos, a mesma ferramenta usada para **executar o programa na inicialização** tambĂ©m Ă© usada para lidar com **reinicializaçÔes** automĂĄticas. + +Por exemplo, isso poderia ser resolvido por: + +* Docker +* Kubernetes +* Docker Compose +* Docker no Modo Swarm +* Systemd +* Supervisor +* Gerenciado internamente por um provedor de nuvem como parte de seus serviços +* Outros... + +## Replicação - Processos e MemĂłria + +Com um aplicativo FastAPI, usando um programa de servidor como o comando `fastapi` que executa o Uvicorn, executĂĄ-lo uma vez em **um processo** pode atender a vĂĄrios clientes simultaneamente. + +Mas em muitos casos, vocĂȘ desejarĂĄ executar vĂĄrios processos de trabalho ao mesmo tempo. + +### Processos MĂșltiplos - Trabalhadores + +Se vocĂȘ tiver mais clientes do que um Ășnico processo pode manipular (por exemplo, se a mĂĄquina virtual nĂŁo for muito grande) e tiver **vĂĄrios nĂșcleos** na CPU do servidor, vocĂȘ poderĂĄ ter **vĂĄrios processos** em execução com o mesmo aplicativo ao mesmo tempo e distribuir todas as solicitaçÔes entre eles. + +Quando vocĂȘ executa **vĂĄrios processos** do mesmo programa de API, eles sĂŁo comumente chamados de **trabalhadores**. + +### Processos do Trabalhador e Portas + +Lembra da documentação [Sobre HTTPS](https.md){.internal-link target=_blank} que diz que apenas um processo pode escutar em uma combinação de porta e endereço IP em um servidor? + +Isso ainda Ă© verdade. + +EntĂŁo, para poder ter **vĂĄrios processos** ao mesmo tempo, tem que haver um **Ășnico processo escutando em uma porta** que entĂŁo transmite a comunicação para cada processo de trabalho de alguma forma. + +### MemĂłria por Processo + +Agora, quando o programa carrega coisas na memĂłria, por exemplo, um modelo de aprendizado de mĂĄquina em uma variĂĄvel, ou o conteĂșdo de um arquivo grande em uma variĂĄvel, tudo isso **consome um pouco da memĂłria (RAM)** do servidor. + +E vĂĄrios processos normalmente **nĂŁo compartilham nenhuma memĂłria**. Isso significa que cada processo em execução tem suas prĂłprias coisas, variĂĄveis ​​e memĂłria. E se vocĂȘ estiver consumindo uma grande quantidade de memĂłria em seu cĂłdigo, **cada processo** consumirĂĄ uma quantidade equivalente de memĂłria. + +### MemĂłria do servidor + +Por exemplo, se seu cĂłdigo carrega um modelo de Machine Learning com **1 GB de tamanho**, quando vocĂȘ executa um processo com sua API, ele consumirĂĄ pelo menos 1 GB de RAM. E se vocĂȘ iniciar **4 processos** (4 trabalhadores), cada um consumirĂĄ 1 GB de RAM. EntĂŁo, no total, sua API consumirĂĄ **4 GB de RAM**. + +E se o seu servidor remoto ou mĂĄquina virtual tiver apenas 3 GB de RAM, tentar carregar mais de 4 GB de RAM causarĂĄ problemas. 🚹 + +### Processos MĂșltiplos - Um Exemplo + +Neste exemplo, hĂĄ um **Processo Gerenciador** que inicia e controla dois **Processos de Trabalhadores**. + +Este Processo de Gerenciador provavelmente seria o que escutaria na **porta** no IP. E ele transmitiria toda a comunicação para os processos de trabalho. + +Esses processos de trabalho seriam aqueles que executariam seu aplicativo, eles executariam os cĂĄlculos principais para receber uma **solicitação** e retornar uma **resposta**, e carregariam qualquer coisa que vocĂȘ colocasse em variĂĄveis ​​na RAM. + + + +E, claro, a mesma mĂĄquina provavelmente teria **outros processos** em execução, alĂ©m do seu aplicativo. + +Um detalhe interessante Ă© que a porcentagem da **CPU usada** por cada processo pode **variar** muito ao longo do tempo, mas a **memĂłria (RAM)** normalmente fica mais ou menos **estĂĄvel**. + +Se vocĂȘ tiver uma API que faz uma quantidade comparĂĄvel de cĂĄlculos todas as vezes e tiver muitos clientes, entĂŁo a **utilização da CPU** provavelmente *tambĂ©m serĂĄ estĂĄvel* (em vez de ficar constantemente subindo e descendo rapidamente). + +### Exemplos de ferramentas e estratĂ©gias de replicação + +Pode haver vĂĄrias abordagens para conseguir isso, e falarei mais sobre estratĂ©gias especĂ­ficas nos prĂłximos capĂ­tulos, por exemplo, ao falar sobre Docker e contĂȘineres. + +A principal restrição a ser considerada Ă© que tem que haver um **Ășnico** componente manipulando a **porta** no **IP pĂșblico**. E entĂŁo tem que ter uma maneira de **transmitir** a comunicação para os **processos/trabalhadores** replicados. + +Aqui estĂŁo algumas combinaçÔes e estratĂ©gias possĂ­veis: + +* **Uvicorn** com `--workers` + * Um **gerenciador de processos** Uvicorn escutaria no **IP** e na **porta** e iniciaria **vĂĄrios processos de trabalho Uvicorn**. +* **Kubernetes** e outros **sistemas de contĂȘineres** distribuĂ­dos + * Algo na camada **Kubernetes** escutaria no **IP** e na **porta**. A replicação seria por ter **vĂĄrios contĂȘineres**, cada um com **um processo Uvicorn** em execução. +* **Serviços de nuvem** que cuidam disso para vocĂȘ + * O serviço de nuvem provavelmente **cuidarĂĄ da replicação para vocĂȘ**. Ele possivelmente deixaria vocĂȘ definir **um processo para executar**, ou uma **imagem de contĂȘiner** para usar, em qualquer caso, provavelmente seria **um Ășnico processo Uvicorn**, e o serviço de nuvem seria responsĂĄvel por replicĂĄ-lo. + +/// tip | "Dica" + +NĂŁo se preocupe se alguns desses itens sobre **contĂȘineres**, Docker ou Kubernetes ainda nĂŁo fizerem muito sentido. + +Falarei mais sobre imagens de contĂȘiner, Docker, Kubernetes, etc. em um capĂ­tulo futuro: [FastAPI em contĂȘineres - Docker](docker.md){.internal-link target=_blank}. + +/// + +## Etapas anteriores antes de começar + +HĂĄ muitos casos em que vocĂȘ deseja executar algumas etapas **antes de iniciar** sua aplicação. + +Por exemplo, vocĂȘ pode querer executar **migraçÔes de banco de dados**. + +Mas na maioria dos casos, vocĂȘ precisarĂĄ executar essas etapas apenas **uma vez**. + +Portanto, vocĂȘ vai querer ter um **processo Ășnico** para executar essas **etapas anteriores** antes de iniciar o aplicativo. + +E vocĂȘ terĂĄ que se certificar de que Ă© um Ășnico processo executando essas etapas anteriores *mesmo* se depois, vocĂȘ iniciar **vĂĄrios processos** (vĂĄrios trabalhadores) para o prĂłprio aplicativo. Se essas etapas fossem executadas por **vĂĄrios processos**, eles **duplicariam** o trabalho executando-o em **paralelo**, e se as etapas fossem algo delicado como uma migração de banco de dados, elas poderiam causar conflitos entre si. + +Claro, hĂĄ alguns casos em que nĂŁo hĂĄ problema em executar as etapas anteriores vĂĄrias vezes; nesse caso, Ă© muito mais fĂĄcil de lidar. + +/// tip | "Dica" + +AlĂ©m disso, tenha em mente que, dependendo da sua configuração, em alguns casos vocĂȘ **pode nem precisar de nenhuma etapa anterior** antes de iniciar sua aplicação. + +Nesse caso, vocĂȘ nĂŁo precisaria se preocupar com nada disso. đŸ€· + +/// + +### Exemplos de estratĂ©gias de etapas anteriores + +Isso **dependerĂĄ muito** da maneira como vocĂȘ **implanta seu sistema** e provavelmente estarĂĄ conectado Ă  maneira como vocĂȘ inicia programas, lida com reinicializaçÔes, etc. + +Aqui estĂŁo algumas ideias possĂ­veis: + +* Um "Init Container" no Kubernetes que roda antes do seu app container +* Um script bash que roda os passos anteriores e entĂŁo inicia seu aplicativo + * VocĂȘ ainda precisaria de uma maneira de iniciar/reiniciar *aquele* script bash, detectar erros, etc. + +/// tip | "Dica" + +Darei exemplos mais concretos de como fazer isso com contĂȘineres em um capĂ­tulo futuro: [FastAPI em contĂȘineres - Docker](docker.md){.internal-link target=_blank}. + +/// + +## Utilização de recursos + +Seu(s) servidor(es) Ă©(sĂŁo) um **recurso** que vocĂȘ pode consumir ou **utilizar**, com seus programas, o tempo de computação nas CPUs e a memĂłria RAM disponĂ­vel. + +Quanto dos recursos do sistema vocĂȘ quer consumir/utilizar? Pode ser fĂĄcil pensar "nĂŁo muito", mas, na realidade, vocĂȘ provavelmente vai querer consumir **o mĂĄximo possĂ­vel sem travar**. + +Se vocĂȘ estĂĄ pagando por 3 servidores, mas estĂĄ usando apenas um pouco de RAM e CPU, vocĂȘ provavelmente estĂĄ **desperdiçando dinheiro** 💾, e provavelmente **desperdiçando energia elĂ©trica do servidor** 🌎, etc. + +Nesse caso, seria melhor ter apenas 2 servidores e usar uma porcentagem maior de seus recursos (CPU, memĂłria, disco, largura de banda de rede, etc). + +Por outro lado, se vocĂȘ tem 2 servidores e estĂĄ usando **100% da CPU e RAM deles**, em algum momento um processo pedirĂĄ mais memĂłria, e o servidor terĂĄ que usar o disco como "memĂłria" (o que pode ser milhares de vezes mais lento), ou atĂ© mesmo **travar**. Ou um processo pode precisar fazer alguma computação e teria que esperar atĂ© que a CPU esteja livre novamente. + +Nesse caso, seria melhor obter **um servidor extra** e executar alguns processos nele para que todos tenham **RAM e tempo de CPU suficientes**. + +TambĂ©m hĂĄ a chance de que, por algum motivo, vocĂȘ tenha um **pico** de uso da sua API. Talvez ela tenha se tornado viral, ou talvez alguns outros serviços ou bots comecem a usĂĄ-la. E vocĂȘ pode querer ter recursos extras para estar seguro nesses casos. + +VocĂȘ poderia colocar um **nĂșmero arbitrĂĄrio** para atingir, por exemplo, algo **entre 50% a 90%** da utilização de recursos. O ponto Ă© que essas sĂŁo provavelmente as principais coisas que vocĂȘ vai querer medir e usar para ajustar suas implantaçÔes. + +VocĂȘ pode usar ferramentas simples como `htop` para ver a CPU e a RAM usadas no seu servidor ou a quantidade usada por cada processo. Ou vocĂȘ pode usar ferramentas de monitoramento mais complexas, que podem ser distribuĂ­das entre servidores, etc. + +## Recapitular + +VocĂȘ leu aqui alguns dos principais conceitos que provavelmente precisa ter em mente ao decidir como implantar seu aplicativo: + +* Segurança - HTTPS +* Executando na inicialização +* ReinicializaçÔes +* Replicação (o nĂșmero de processos em execução) +* MemĂłria +* Etapas anteriores antes de iniciar + +Entender essas ideias e como aplicĂĄ-las deve lhe dar a intuição necessĂĄria para tomar qualquer decisĂŁo ao configurar e ajustar suas implantaçÔes. đŸ€“ + +Nas prĂłximas seçÔes, darei exemplos mais concretos de possĂ­veis estratĂ©gias que vocĂȘ pode seguir. 🚀 From 304f514ed95107a32e7b1f263003720b9475c580 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 4 Oct 2024 11:08:00 +0000 Subject: [PATCH 31/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index c871e1c71..ca8dcedb0 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -13,6 +13,7 @@ hide: ### Translations +* 🌐 Add Portuguese translation for `docs/pt/docs/how-to/conditional-openapi.md`. PR [#12221](https://github.com/fastapi/fastapi/pull/12221) by [@marcelomarkus](https://github.com/marcelomarkus). * 🌐 Add Portuguese translation for `docs/pt/docs/advanced/response-directly.md`. PR [#12266](https://github.com/fastapi/fastapi/pull/12266) by [@Joao-Pedro-P-Holanda](https://github.com/Joao-Pedro-P-Holanda). * 🌐 Update Portuguese translation for `docs/pt/docs/tutorial/cookie-params.md`. PR [#12297](https://github.com/fastapi/fastapi/pull/12297) by [@ceb10n](https://github.com/ceb10n). * 🌐 Fix Korean translation for `docs/ko/docs/tutorial/index.md`. PR [#12278](https://github.com/fastapi/fastapi/pull/12278) by [@kkotipy](https://github.com/kkotipy). From 5820d4261e2784cfabbe5358015142d71039555a Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 4 Oct 2024 11:10:09 +0000 Subject: [PATCH 32/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index ca8dcedb0..7188a698f 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -13,6 +13,7 @@ hide: ### Translations +* 🌐 Add Portuguese translation for `docs/pt/docs/deployment/concepts.md`. PR [#12219](https://github.com/fastapi/fastapi/pull/12219) by [@marcelomarkus](https://github.com/marcelomarkus). * 🌐 Add Portuguese translation for `docs/pt/docs/how-to/conditional-openapi.md`. PR [#12221](https://github.com/fastapi/fastapi/pull/12221) by [@marcelomarkus](https://github.com/marcelomarkus). * 🌐 Add Portuguese translation for `docs/pt/docs/advanced/response-directly.md`. PR [#12266](https://github.com/fastapi/fastapi/pull/12266) by [@Joao-Pedro-P-Holanda](https://github.com/Joao-Pedro-P-Holanda). * 🌐 Update Portuguese translation for `docs/pt/docs/tutorial/cookie-params.md`. PR [#12297](https://github.com/fastapi/fastapi/pull/12297) by [@ceb10n](https://github.com/ceb10n). From 0e7806e3f97ad16a526e77488a72be62359890e1 Mon Sep 17 00:00:00 2001 From: Rafael de Oliveira Marques Date: Fri, 4 Oct 2024 08:11:41 -0300 Subject: [PATCH 33/90] =?UTF-8?q?=F0=9F=8C=90=20Add=20Portuguese=20transla?= =?UTF-8?q?tion=20for=20`docs/pt/docs/advanced/security/oauth2-scopes.md`?= =?UTF-8?q?=20(#12263)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../docs/advanced/security/oauth2-scopes.md | 786 ++++++++++++++++++ 1 file changed, 786 insertions(+) create mode 100644 docs/pt/docs/advanced/security/oauth2-scopes.md diff --git a/docs/pt/docs/advanced/security/oauth2-scopes.md b/docs/pt/docs/advanced/security/oauth2-scopes.md new file mode 100644 index 000000000..4ad7c807e --- /dev/null +++ b/docs/pt/docs/advanced/security/oauth2-scopes.md @@ -0,0 +1,786 @@ +# Escopos OAuth2 + +VocĂȘ pode utilizar escopos do OAuth2 diretamente com o **FastAPI**, eles sĂŁo integrados para funcionar perfeitamente. + +Isso permitiria que vocĂȘ tivesse um sistema de permissionamento mais refinado, seguindo o padrĂŁo do OAuth2 integrado na sua aplicação OpenAPI (e as documentaçÔes da API). + +OAuth2 com escopos Ă© o mecanismo utilizado por muitos provedores de autenticação, como o Facebook, Google, GitHub, Microsoft, Twitter, etc. Eles utilizam isso para prover permissĂ”es especĂ­ficas para os usuĂĄrios e aplicaçÔes. + +Toda vez que vocĂȘ "se autentica com" Facebook, Google, GitHub, Microsoft, Twitter, aquela aplicação estĂĄ utilizando o OAuth2 com escopos. + +Nesta seção, vocĂȘ verĂĄ como gerenciar a autenticação e autorização com os mesmos escopos do OAuth2 em sua aplicação **FastAPI**. + +/// warning | "Aviso" + +Isso Ă© uma seção mais ou menos avançada. Se vocĂȘ estĂĄ apenas começando, vocĂȘ pode pular. + +VocĂȘ nĂŁo necessariamente precisa de escopos do OAuth2, e vocĂȘ pode lidar com autenticação e autorização da maneira que vocĂȘ achar melhor. + +Mas o OAuth2 com escopos pode ser integrado de maneira fĂĄcil em sua API (com OpenAPI) e a sua documentação de API. + +No entando, vocĂȘ ainda aplica estes escopos, ou qualquer outro requisito de segurança/autorização, conforme necessĂĄrio, em seu cĂłdigo. + +Em muitos casos, OAuth2 com escopos pode ser um exagero. + +Mas se vocĂȘ sabe que precisa, ou estĂĄ curioso, continue lendo. + +/// + +## Escopos OAuth2 e OpenAPI + +A especificação OAuth2 define "escopos" como uma lista de strings separadas por espaços. + +O conteĂșdo de cada uma dessas strings pode ter qualquer formato, mas nĂŁo devem possuir espaços. + +Estes escopos representam "permissĂ”es". + +No OpenAPI (e.g. os documentos da API), vocĂȘ pode definir "esquemas de segurança". + +Quando um desses esquemas de segurança utiliza OAuth2, vocĂȘ pode tambĂ©m declarar e utilizar escopos. + +Cada "escopo" Ă© apenas uma string (sem espaços). + +Eles sĂŁo normalmente utilizados para declarar permissĂ”es de segurança especĂ­ficas, como por exemplo: + +* `users:read` or `users:write` sĂŁo exemplos comuns. +* `instagram_basic` Ă© utilizado pelo Facebook / Instagram. +* `https://www.googleapis.com/auth/drive` Ă© utilizado pelo Google. + +/// info | Informação + +No OAuth2, um "escopo" Ă© apenas uma string que declara uma permissĂŁo especĂ­fica necessĂĄria. + +NĂŁo importa se ela contĂ©m outros caracteres como `:` ou se ela Ă© uma URL. + +Estes detalhes sĂŁo especĂ­ficos da implementação. + +Para o OAuth2, eles sĂŁo apenas strings. + +/// + +## VisĂŁo global + +Primeiro, vamos olhar rapidamente as partes que mudam dos exemplos do **Tutorial - Guia de UsuĂĄrio** para [OAuth2 com Senha (e hash), Bearer com tokens JWT](../../tutorial/security/oauth2-jwt.md){.internal-link target=_blank}. Agora utilizando escopos OAuth2: + +//// tab | Python 3.10+ + +```Python hl_lines="5 9 13 47 65 106 108-116 122-125 129-135 140 156" +{!> ../../../docs_src/security/tutorial005_an_py310.py!} +``` + +//// + +//// tab | Python 3.9+ + +```Python hl_lines="2 5 9 13 47 65 106 108-116 122-125 129-135 140 156" +{!> ../../../docs_src/security/tutorial005_an_py39.py!} +``` + +//// + +//// tab | Python 3.8+ + +```Python hl_lines="2 5 9 13 48 66 107 109-117 123-126 130-136 141 157" +{!> ../../../docs_src/security/tutorial005_an.py!} +``` + +//// + +//// tab | Python 3.10+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="4 8 12 46 64 105 107-115 121-124 128-134 139 155" +{!> ../../../docs_src/security/tutorial005_py310.py!} +``` + +//// + +//// tab | Python 3.9+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="2 5 9 13 47 65 106 108-116 122-125 129-135 140 156" +{!> ../../../docs_src/security/tutorial005_py39.py!} +``` + +//// + +//// tab | Python 3.8+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="2 5 9 13 47 65 106 108-116 122-125 129-135 140 156" +{!> ../../../docs_src/security/tutorial005.py!} +``` + +//// + +Agora vamos revisar essas mudanças passo a passo. + +## Esquema de segurança OAuth2 + +A primeira mudança Ă© que agora nĂłs estamos declarando o esquema de segurança OAuth2 com dois escopos disponĂ­veis, `me` e `items`. + +O parĂąmetro `scopes` recebe um `dict` contendo cada escopo como chave e a descrição como valor: + +//// tab | Python 3.10+ + +```Python hl_lines="63-66" +{!> ../../../docs_src/security/tutorial005_an_py310.py!} +``` + +//// + +//// tab | Python 3.9+ + +```Python hl_lines="63-66" +{!> ../../../docs_src/security/tutorial005_an_py39.py!} +``` + +//// + +//// tab | Python 3.8+ + +```Python hl_lines="64-67" +{!> ../../../docs_src/security/tutorial005_an.py!} +``` + +//// + +//// tab | Python 3.10+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="62-65" +{!> ../../../docs_src/security/tutorial005_py310.py!} +``` + +//// + +//// tab | Python 3.9+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="63-66" +{!> ../../../docs_src/security/tutorial005_py39.py!} +``` + +//// + +//// tab | Python 3.8+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="63-66" +{!> ../../../docs_src/security/tutorial005.py!} +``` + +//// + +Pelo motivo de estarmos declarando estes escopos, eles aparecerĂŁo nos documentos da API quando vocĂȘ se autenticar/autorizar. + +E vocĂȘ poderĂĄ selecionar quais escopos vocĂȘ deseja dar acesso: `me` e `items`. + +Este Ă© o mesmo mecanismo utilizado quando vocĂȘ adiciona permissĂ”es enquanto se autentica com o Facebook, Google, GitHub, etc: + + + +## Token JWT com escopos + +Agora, modifique o *caminho de rota* para retornar os escopos solicitados. + +NĂłs ainda estamos utilizando o mesmo `OAuth2PasswordRequestForm`. Ele inclui a propriedade `scopes` com uma `list` de `str`, com cada escopo que ele recebeu na requisição. + +E nĂłs retornamos os escopos como parte do token JWT. + +/// danger | Cuidado + +Para manter as coisas simples, aqui nĂłs estamos apenas adicionando os escopos recebidos diretamente ao token. + +PorĂ©m em sua aplicação, por segurança, vocĂȘ deve garantir que vocĂȘ apenas adiciona os escopos que o usuĂĄrio possui permissĂŁo de fato, ou aqueles que vocĂȘ predefiniu. + +/// + +//// tab | Python 3.10+ + +```Python hl_lines="156" +{!> ../../../docs_src/security/tutorial005_an_py310.py!} +``` + +//// + +//// tab | Python 3.9+ + +```Python hl_lines="156" +{!> ../../../docs_src/security/tutorial005_an_py39.py!} +``` + +//// + +//// tab | Python 3.8+ + +```Python hl_lines="157" +{!> ../../../docs_src/security/tutorial005_an.py!} +``` + +//// + +//// tab | Python 3.10+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="155" +{!> ../../../docs_src/security/tutorial005_py310.py!} +``` + +//// + +//// tab | Python 3.9+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="156" +{!> ../../../docs_src/security/tutorial005_py39.py!} +``` + +//// + +//// tab | Python 3.8+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="156" +{!> ../../../docs_src/security/tutorial005.py!} +``` + +//// + +## Declare escopos em *operaçÔes de rota* e dependĂȘncias + +Agora nĂłs declaramos que a *operação de rota* para `/users/me/items/` exige o escopo `items`. + +Para isso, nĂłs importamos e utilizamos `Security` de `fastapi`. + +VocĂȘ pode utilizar `Security` para declarar dependĂȘncias (assim como `Depends`), porĂ©m o `Security` tambĂ©m recebe o parĂąmetros `scopes` com uma lista de escopos (strings). + +Neste caso, nĂłs passamos a função `get_current_active_user` como dependĂȘncia para `Security` (da mesma forma que nĂłs farĂ­amos com `Depends`). + +Mas nĂłs tambĂ©m passamos uma `list` de escopos, neste caso com apenas um escopo: `items` (poderia ter mais). + +E a função de dependĂȘncia `get_current_active_user` tambĂ©m pode declarar subdependĂȘncias, nĂŁo apenas com `Depends`, mas tambĂ©m com `Security`. Ao declarar sua prĂłpria função de subdependĂȘncia (`get_current_user`), e mais requisitos de escopo. + +Neste caso, ele requer o escopo `me` (poderia requerer mais de um escopo). + +/// note | "Nota" + +VocĂȘ nĂŁo necessariamente precisa adicionar diferentes escopos em diferentes lugares. + +NĂłs estamos fazendo isso aqui para demonstrar como o **FastAPI** lida com escopos declarados em diferentes nĂ­veis. + +/// + +//// tab | Python 3.10+ + +```Python hl_lines="5 140 171" +{!> ../../../docs_src/security/tutorial005_an_py310.py!} +``` + +//// + +//// tab | Python 3.9+ + +```Python hl_lines="5 140 171" +{!> ../../../docs_src/security/tutorial005_an_py39.py!} +``` + +//// + +//// tab | Python 3.8+ + +```Python hl_lines="5 141 172" +{!> ../../../docs_src/security/tutorial005_an.py!} +``` + +//// + +//// tab | Python 3.10+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="4 139 168" +{!> ../../../docs_src/security/tutorial005_py310.py!} +``` + +//// + +//// tab | Python 3.9+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="5 140 169" +{!> ../../../docs_src/security/tutorial005_py39.py!} +``` + +//// + +//// tab | Python 3.8+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="5 140 169" +{!> ../../../docs_src/security/tutorial005.py!} +``` + +//// + +/// info | InformaçÔes TĂ©cnicas + +`Security` Ă© na verdade uma subclasse de `Depends`, e ele possui apenas um parĂąmetro extra que veremos depois. + +PorĂ©m ao utilizar `Security` no lugar de `Depends`, o **FastAPI** saberĂĄ que ele pode declarar escopos de segurança, utilizĂĄ-los internamente, e documentar a API com o OpenAPI. + +Mas quando vocĂȘ importa `Query`, `Path`, `Depends`, `Security` entre outros de `fastapi`, eles sĂŁo na verdade funçÔes que retornam classes especiais. + +/// + +## Utilize `SecurityScopes` + +Agora atualize a dependĂȘncia `get_current_user`. + +Este Ă© o usado pelas dependĂȘncias acima. + +Aqui Ă© onde estamos utilizando o mesmo esquema OAuth2 que nĂłs declaramos antes, declarando-o como uma dependĂȘncia: `oauth2_scheme`. + +Porque esta função de dependĂȘncia nĂŁo possui nenhum requerimento de escopo, nĂłs podemos utilizar `Depends` com o `oauth2_scheme`. NĂłs nĂŁo precisamos utilizar `Security` quando nĂłs nĂŁo precisamos especificar escopos de segurança. + +NĂłs tambĂ©m declaramos um parĂąmetro especial do tipo `SecurityScopes`, importado de `fastapi.security`. + +A classe `SecurityScopes` Ă© semelhante Ă  classe `Request` (`Request` foi utilizada para obter o objeto da requisição diretamente). + +//// tab | Python 3.10+ + +```Python hl_lines="9 106" +{!> ../../../docs_src/security/tutorial005_an_py310.py!} +``` + +//// + +//// tab | Python 3.9+ + +```Python hl_lines="9 106" +{!> ../../../docs_src/security/tutorial005_an_py39.py!} +``` + +//// + +//// tab | Python 3.8+ + +```Python hl_lines="9 107" +{!> ../../../docs_src/security/tutorial005_an.py!} +``` + +//// + +//// tab | Python 3.10+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="8 105" +{!> ../../../docs_src/security/tutorial005_py310.py!} +``` + +//// + +//// tab | Python 3.9+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="9 106" +{!> ../../../docs_src/security/tutorial005_py39.py!} +``` + +//// + +//// tab | Python 3.8+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="9 106" +{!> ../../../docs_src/security/tutorial005.py!} +``` + +//// + +## Utilize os `scopes` + +O parĂąmetro `security_scopes` serĂĄ do tipo `SecurityScopes`. + +Ele terĂĄ a propriedade `scopes` com uma lista contendo todos os escopos requeridos por ele e todas as dependĂȘncias que utilizam ele como uma subdependĂȘncia. Isso significa, todos os "dependentes"... pode soar meio confuso, e isso serĂĄ explicado novamente mais adiante. + +O objeto `security_scopes` (da classe `SecurityScopes`) tambĂ©m oferece um atributo `scope_str` com uma Ășnica string, contendo os escopos separados por espaços (nĂłs vamos utilizar isso). + +NĂłs criamos uma `HTTPException` que nĂłs podemos reutilizar (`raise`) mais tarde em diversos lugares. + +Nesta exceção, nĂłs incluĂ­mos os escopos necessĂĄrios (se houver algum) como uma string separada por espaços (utilizando `scope_str`). NĂłs colocamos esta string contendo os escopos no cabeçalho `WWW-Authenticate` (isso Ă© parte da especificação). + +//// tab | Python 3.10+ + +```Python hl_lines="106 108-116" +{!> ../../../docs_src/security/tutorial005_an_py310.py!} +``` + +//// + +//// tab | Python 3.9+ + +```Python hl_lines="106 108-116" +{!> ../../../docs_src/security/tutorial005_an_py39.py!} +``` + +//// + +//// tab | Python 3.8+ + +```Python hl_lines="107 109-117" +{!> ../../../docs_src/security/tutorial005_an.py!} +``` + +//// + +//// tab | Python 3.10+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="105 107-115" +{!> ../../../docs_src/security/tutorial005_py310.py!} +``` + +//// + +//// tab | Python 3.9+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="106 108-116" +{!> ../../../docs_src/security/tutorial005_py39.py!} +``` + +//// + +//// tab | Python 3.8+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="106 108-116" +{!> ../../../docs_src/security/tutorial005.py!} +``` + +//// + +## Verifique o `username` e o formato dos dados + +NĂłs verificamos que nĂłs obtemos um `username`, e extraĂ­mos os escopos. + +E depois nĂłs validamos esse dado com o modelo Pydantic (capturando a exceção `ValidationError`), e se nĂłs obtemos um erro ao ler o token JWT ou validando os dados com o Pydantic, nĂłs levantamos a exceção `HTTPException` que criamos anteriormente. + +Para isso, nĂłs atualizamos o modelo Pydantic `TokenData` com a nova propriedade `scopes`. + +Ao validar os dados com o Pydantic nĂłs podemos garantir que temos, por exemplo, exatamente uma `list` de `str` com os escopos e uma `str` com o `username`. + +No lugar de, por exemplo, um `dict`, ou alguma outra coisa, que poderia quebrar a aplicação em algum lugar mais tarde, tornando isso um risco de segurança. + +NĂłs tambĂ©m verificamos que nĂłs temos um usuĂĄrio com o "*username*", e caso contrĂĄrio, nĂłs levantamos a mesma exceção que criamos anteriormente. + +//// tab | Python 3.10+ + +```Python hl_lines="47 117-128" +{!> ../../../docs_src/security/tutorial005_an_py310.py!} +``` + +//// + +//// tab | Python 3.9+ + +```Python hl_lines="47 117-128" +{!> ../../../docs_src/security/tutorial005_an_py39.py!} +``` + +//// + +//// tab | Python 3.8+ + +```Python hl_lines="48 118-129" +{!> ../../../docs_src/security/tutorial005_an.py!} +``` + +//// + +//// tab | Python 3.10+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="46 116-127" +{!> ../../../docs_src/security/tutorial005_py310.py!} +``` + +//// + +//// tab | Python 3.9+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="47 117-128" +{!> ../../../docs_src/security/tutorial005_py39.py!} +``` + +//// + +//// tab | Python 3.8+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="47 117-128" +{!> ../../../docs_src/security/tutorial005.py!} +``` + +//// + +## Verifique os `scopes` + +NĂłs verificamos agora que todos os escopos necessĂĄrios, por essa dependĂȘncia e todos os dependentes (incluindo as *operaçÔes de rota*) estĂŁo incluĂ­das nos escopos fornecidos pelo token recebido, caso contrĂĄrio, levantamos uma `HTTPException`. + +Para isso, nĂłs utilizamos `security_scopes.scopes`, que contĂ©m uma `list` com todos esses escopos como uma `str`. + +//// tab | Python 3.10+ + +```Python hl_lines="129-135" +{!> ../../../docs_src/security/tutorial005_an_py310.py!} +``` + +//// + +//// tab | Python 3.9+ + +```Python hl_lines="129-135" +{!> ../../../docs_src/security/tutorial005_an_py39.py!} +``` + +//// + +//// tab | Python 3.8+ + +```Python hl_lines="130-136" +{!> ../../../docs_src/security/tutorial005_an.py!} +``` + +//// + +//// tab | Python 3.10+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="128-134" +{!> ../../../docs_src/security/tutorial005_py310.py!} +``` + +//// + +//// tab | Python 3.9+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="129-135" +{!> ../../../docs_src/security/tutorial005_py39.py!} +``` + +//// + +//// tab | Python 3.8+ non-Annotated + +/// tip | Dica + +Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. + +/// + +```Python hl_lines="129-135" +{!> ../../../docs_src/security/tutorial005.py!} +``` + +//// + +## Árvore de dependĂȘncia e escopos + +Vamos rever novamente essa ĂĄrvore de dependĂȘncia e os escopos. + +Como a dependĂȘncia `get_current_active_user` possui uma subdependĂȘncia em `get_current_user`, o escopo `"me"` declarado em `get_current_active_user` serĂĄ incluĂ­do na lista de escopos necessĂĄrios em `security_scopes.scopes` passado para `get_current_user`. + +A prĂłpria *operação de rota* tambĂ©m declara o escopo, `"items"`, entĂŁo ele tambĂ©m estarĂĄ na lista de `security_scopes.scopes` passado para o `get_current_user`. + +Aqui estĂĄ como a hierarquia de dependĂȘncias e escopos parecem: + +* A *operação de rota* `read_own_items` possui: + * Escopos necessĂĄrios `["items"]` com a dependĂȘncia: + * `get_current_active_user`: + * A função de dependĂȘncia `get_current_active_user` possui: + * Escopos necessĂĄrios `["me"]` com a dependĂȘncia: + * `get_current_user`: + * A função de dependĂȘncia `get_current_user` possui: + * Nenhum escopo necessĂĄrio. + * Uma dependĂȘncia utilizando `oauth2_scheme`. + * Um parĂąmetro `security_scopes` do tipo `SecurityScopes`: + * Este parĂąmetro `security_scopes` possui uma propriedade `scopes` com uma `list` contendo todos estes escopos declarados acima, entĂŁo: + * `security_scopes.scopes` terĂĄ `["me", "items"]` para a *operação de rota* `read_own_items`. + * `security_scopes.scopes` terĂĄ `["me"]` para a *operação de rota* `read_users_me`, porque ela declarou na dependĂȘncia `get_current_active_user`. + * `security_scopes.scopes` terĂĄ `[]` (nada) para a *operação de rota* `read_system_status`, porque ele nĂŁo declarou nenhum `Security` com `scopes`, e sua dependĂȘncia, `get_current_user`, nĂŁo declara nenhum `scopes` tambĂ©m. + +/// tip | Dica + +A coisa importante e "mĂĄgica" aqui Ă© que `get_current_user` terĂĄ diferentes listas de `scopes` para validar para cada *operação de rota*. + +Tudo depende dos `scopes` declarados em cada *operação de rota* e cada dependĂȘncia da ĂĄrvore de dependĂȘncias para aquela *operação de rota* especĂ­fica. + +/// + +## Mais detalhes sobre `SecurityScopes` + +VocĂȘ pode utilizar `SecurityScopes` em qualquer lugar, e em diversos lugares. Ele nĂŁo precisa estar na dependĂȘncia "raiz". + +Ele sempre terĂĄ os escopos de segurança declarados nas dependĂȘncias atuais de `Security` e todos os dependentes para **aquela** *operação de rota* **especĂ­fica** e **aquela** ĂĄrvore de dependĂȘncia **especĂ­fica**. + +Porque o `SecurityScopes` terĂĄ todos os escopos declarados por dependentes, vocĂȘ pode utilizĂĄ-lo para verificar se o token possui os escopos necessĂĄrios em uma função de dependĂȘncia central, e depois declarar diferentes requisitos de escopo em diferentes *operaçÔes de rota*. + +Todos eles serĂŁo validados independentemente para cada *operação de rota*. + +## Verifique + +Se vocĂȘ abrir os documentos da API, vocĂȘ pode antenticar e especificar quais escopos vocĂȘ quer autorizar. + + + +Se vocĂȘ nĂŁo selecionar nenhum escopo, vocĂȘ terĂĄ "autenticado", mas quando vocĂȘ tentar acessar `/users/me/` ou `/users/me/items/`, vocĂȘ vai obter um erro dizendo que vocĂȘ nĂŁo possui as permissĂ”es necessĂĄrias. VocĂȘ ainda poderĂĄ acessar `/status/`. + +E se vocĂȘ selecionar o escopo `me`, mas nĂŁo o escopo `items`, vocĂȘ poderĂĄ acessar `/users/me/`, mas nĂŁo `/users/me/items/`. + +Isso Ă© o que aconteceria se uma aplicação terceira que tentou acessar uma dessas *operaçÔes de rota* com um token fornecido por um usuĂĄrio, dependendo de quantas permissĂ”es o usuĂĄrio forneceu para a aplicação. + +## Sobre integraçÔes de terceiros + +Neste exemplos nĂłs estamos utilizando o fluxo de senha do OAuth2. + +Isso Ă© apropriado quando nĂłs estamos autenticando em nossa prĂłpria aplicação, provavelmente com o nosso prĂłprio "*frontend*". + +Porque nĂłs podemos confiar nele para receber o `username` e o `password`, pois nĂłs controlamos isso. + +Mas se nĂłs estamos construindo uma aplicação OAuth2 que outros poderiam conectar (i.e., se vocĂȘ estĂĄ construindo um provedor de autenticação equivalente ao Facebook, Google, GitHub, etc.) vocĂȘ deveria utilizar um dos outros fluxos. + +O mais comum Ă© o fluxo implĂ­cito. + +O mais seguro Ă© o fluxo de cĂłdigo, mas ele Ă© mais complexo para implementar, pois ele necessita mais passos. Como ele Ă© mais complexo, muitos provedores terminam sugerindo o fluxo implĂ­cito. + +/// note | "Nota" + +É comum que cada provedor de autenticação nomeie os seus fluxos de forma diferente, para tornĂĄ-lo parte de sua marca. + +Mas no final, eles estĂŁo implementando o mesmo padrĂŁo OAuth2. + +/// + +O **FastAPI** inclui utilitĂĄrios para todos esses fluxos de autenticação OAuth2 em `fastapi.security.oauth2`. + +## `Security` em docoradores de `dependĂȘncias` + +Da mesma forma que vocĂȘ pode definir uma `list` de `Depends` no parĂąmetro de `dependencias` do decorador (como explicado em [DependĂȘncias em decoradores de operaçÔes de rota](../../tutorial/dependencies/dependencies-in-path-operation-decorators.md){.internal-link target=_blank}), vocĂȘ tambĂ©m pode utilizar `Security` com escopos lĂĄ. From e2217e24b9895adf5d6f8ef25c491fca4f1bdafb Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 4 Oct 2024 11:14:33 +0000 Subject: [PATCH 34/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 7188a698f..e2b5808a4 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -13,6 +13,7 @@ hide: ### Translations +* 🌐 Add Portuguese translation for `docs/pt/docs/advanced/security/oauth2-scopes.md`. PR [#12263](https://github.com/fastapi/fastapi/pull/12263) by [@ceb10n](https://github.com/ceb10n). * 🌐 Add Portuguese translation for `docs/pt/docs/deployment/concepts.md`. PR [#12219](https://github.com/fastapi/fastapi/pull/12219) by [@marcelomarkus](https://github.com/marcelomarkus). * 🌐 Add Portuguese translation for `docs/pt/docs/how-to/conditional-openapi.md`. PR [#12221](https://github.com/fastapi/fastapi/pull/12221) by [@marcelomarkus](https://github.com/marcelomarkus). * 🌐 Add Portuguese translation for `docs/pt/docs/advanced/response-directly.md`. PR [#12266](https://github.com/fastapi/fastapi/pull/12266) by [@Joao-Pedro-P-Holanda](https://github.com/Joao-Pedro-P-Holanda). From a681aeba6d7112b9351a11ca5a1756de4e27d370 Mon Sep 17 00:00:00 2001 From: AnandaCampelo <103457620+AnandaCampelo@users.noreply.github.com> Date: Fri, 4 Oct 2024 08:15:21 -0300 Subject: [PATCH 35/90] =?UTF-8?q?=F0=9F=8C=90=20Add=20Portuguese=20transla?= =?UTF-8?q?tion=20for=20`docs/pt/docs/how-to/graphql.md`=20(#12215)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/pt/docs/how-to/graphql.md | 62 ++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 docs/pt/docs/how-to/graphql.md diff --git a/docs/pt/docs/how-to/graphql.md b/docs/pt/docs/how-to/graphql.md new file mode 100644 index 000000000..0b711aa5e --- /dev/null +++ b/docs/pt/docs/how-to/graphql.md @@ -0,0 +1,62 @@ +# GraphQL + +Como o **FastAPI** Ă© baseado no padrĂŁo **ASGI**, Ă© muito fĂĄcil integrar qualquer biblioteca **GraphQL** tambĂ©m compatĂ­vel com ASGI. + +VocĂȘ pode combinar *operaçÔes de rota* normais do FastAPI com GraphQL na mesma aplicação. + +/// tip | "Dica" + +**GraphQL** resolve alguns casos de uso muito especĂ­ficos. + +Ele tem **vantagens** e **desvantagens** quando comparado a **web APIs** comuns. + +Certifique-se de avaliar se os **benefĂ­cios** para o seu caso de uso compensam as **desvantagens**. đŸ€“ + +/// + +## Bibliotecas GraphQL + +Aqui estĂŁo algumas das bibliotecas **GraphQL** que tĂȘm suporte **ASGI**. VocĂȘ pode usĂĄ-las com **FastAPI**: + +* Strawberry 🍓 + * Com docs para FastAPI +* Ariadne + * Com docs para FastAPI +* Tartiflette + * Com Tartiflette ASGI para fornecer integração ASGI +* Graphene + * Com starlette-graphene3 + +## GraphQL com Strawberry + +Se vocĂȘ precisar ou quiser trabalhar com **GraphQL**, **Strawberry** Ă© a biblioteca **recomendada** pois tem o design mais prĂłximo ao design do **FastAPI**, ela Ă© toda baseada em **type annotations**. + +Dependendo do seu caso de uso, vocĂȘ pode preferir usar uma biblioteca diferente, mas se vocĂȘ me perguntasse, eu provavelmente sugeriria que vocĂȘ experimentasse o **Strawberry**. + +Aqui estĂĄ uma pequena prĂ©via de como vocĂȘ poderia integrar Strawberry com FastAPI: + +```Python hl_lines="3 22 25-26" +{!../../../docs_src/graphql/tutorial001.py!} +``` + +VocĂȘ pode aprender mais sobre Strawberry na documentação do Strawberry. + +E tambĂ©m na documentação sobre Strawberry com FastAPI. + +## Antigo `GraphQLApp` do Starlette + +VersĂ”es anteriores do Starlette incluiam uma classe `GraphQLApp` para integrar com Graphene. + +Ela foi descontinuada do Starlette, mas se vocĂȘ tem cĂłdigo que a utilizava, vocĂȘ pode facilmente **migrar** para starlette-graphene3, que cobre o mesmo caso de uso e tem uma **interface quase idĂȘntica**. + +/// tip | "Dica" + +Se vocĂȘ precisa de GraphQL, eu ainda recomendaria que vocĂȘ desse uma olhada no Strawberry, pois ele Ă© baseado em type annotations em vez de classes e tipos personalizados. + +/// + +## Saiba Mais + +VocĂȘ pode aprender mais sobre **GraphQL** na documentação oficial do GraphQL. + +VocĂȘ tambĂ©m pode ler mais sobre cada uma das bibliotecas descritas acima em seus links. From c93810e0975a1f488f9d9d0a5b7a845b4d447a96 Mon Sep 17 00:00:00 2001 From: Kayque Govetri <59173212+kayqueGovetri@users.noreply.github.com> Date: Fri, 4 Oct 2024 08:16:34 -0300 Subject: [PATCH 36/90] =?UTF-8?q?=F0=9F=93=9D=20Adding=20links=20for=20Pla?= =?UTF-8?q?ywright=20and=20Vite=20in=20`docs/project-generation.md`=20(#12?= =?UTF-8?q?274)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/project-generation.md | 4 ++-- docs/es/docs/project-generation.md | 4 ++-- docs/ko/docs/project-generation.md | 4 ++-- docs/zh/docs/project-generation.md | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/en/docs/project-generation.md b/docs/en/docs/project-generation.md index 61459ba53..665bc54f9 100644 --- a/docs/en/docs/project-generation.md +++ b/docs/en/docs/project-generation.md @@ -13,10 +13,10 @@ GitHub Repository: Date: Fri, 4 Oct 2024 11:20:35 +0000 Subject: [PATCH 37/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index e2b5808a4..d205d96ac 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -13,6 +13,7 @@ hide: ### Translations +* 🌐 Add Portuguese translation for `docs/pt/docs/how-to/graphql.md`. PR [#12215](https://github.com/fastapi/fastapi/pull/12215) by [@AnandaCampelo](https://github.com/AnandaCampelo). * 🌐 Add Portuguese translation for `docs/pt/docs/advanced/security/oauth2-scopes.md`. PR [#12263](https://github.com/fastapi/fastapi/pull/12263) by [@ceb10n](https://github.com/ceb10n). * 🌐 Add Portuguese translation for `docs/pt/docs/deployment/concepts.md`. PR [#12219](https://github.com/fastapi/fastapi/pull/12219) by [@marcelomarkus](https://github.com/marcelomarkus). * 🌐 Add Portuguese translation for `docs/pt/docs/how-to/conditional-openapi.md`. PR [#12221](https://github.com/fastapi/fastapi/pull/12221) by [@marcelomarkus](https://github.com/marcelomarkus). From 3d2483327234182791cd6855b180aa61936eaf05 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 4 Oct 2024 11:20:57 +0000 Subject: [PATCH 38/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index d205d96ac..bbc8ac14e 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -9,6 +9,7 @@ hide: ### Docs +* 📝 Adding links for Playwright and Vite in `docs/project-generation.md`. PR [#12274](https://github.com/fastapi/fastapi/pull/12274) by [@kayqueGovetri](https://github.com/kayqueGovetri). * 📝 Fix small typos in the documentation. PR [#12213](https://github.com/fastapi/fastapi/pull/12213) by [@svlandeg](https://github.com/svlandeg). ### Translations From a096615f79cb428b68b4478fe5d53e2cf43f6ca2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 4 Oct 2024 13:21:41 +0200 Subject: [PATCH 39/90] =?UTF-8?q?=E2=AC=86=20[pre-commit.ci]=20pre-commit?= =?UTF-8?q?=20autoupdate=20(#12331)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.6.7 → v0.6.8](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.7...v0.6.8) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1502f0abd..48a7d495c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.7 + rev: v0.6.8 hooks: - id: ruff args: From f2fb0251cc22b1a7c7a2a65b3f6ee68750353af5 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 4 Oct 2024 11:26:21 +0000 Subject: [PATCH 40/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index bbc8ac14e..82012b1af 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -31,6 +31,7 @@ hide: ### Internal +* ⬆ [pre-commit.ci] pre-commit autoupdate. PR [#12331](https://github.com/fastapi/fastapi/pull/12331) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci). * 🔧 Update sponsors, remove Fine.dev. PR [#12271](https://github.com/fastapi/fastapi/pull/12271) by [@tiangolo](https://github.com/tiangolo). * ⬆ [pre-commit.ci] pre-commit autoupdate. PR [#12253](https://github.com/fastapi/fastapi/pull/12253) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci). * ✏ Fix docstring typos in http security. PR [#12223](https://github.com/fastapi/fastapi/pull/12223) by [@albertvillanova](https://github.com/albertvillanova). From 3f3a3dd6640f0639f27202cf049fb9b24b6c53a6 Mon Sep 17 00:00:00 2001 From: Pavlo Pohorieltsev <49622129+makisukurisu@users.noreply.github.com> Date: Fri, 4 Oct 2024 14:34:57 +0300 Subject: [PATCH 41/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20link=20to=20Swagg?= =?UTF-8?q?er=20UI=20configuration=20docs=20(#12264)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/de/docs/how-to/configure-swagger-ui.md | 4 ++-- docs/en/docs/how-to/configure-swagger-ui.md | 4 ++-- docs/pt/docs/how-to/configure-swagger-ui.md | 4 ++-- docs/zh/docs/how-to/configure-swagger-ui.md | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/de/docs/how-to/configure-swagger-ui.md b/docs/de/docs/how-to/configure-swagger-ui.md index c18091efd..7d62a14d3 100644 --- a/docs/de/docs/how-to/configure-swagger-ui.md +++ b/docs/de/docs/how-to/configure-swagger-ui.md @@ -1,6 +1,6 @@ # Swagger-OberflĂ€che konfigurieren -Sie können einige zusĂ€tzliche Parameter der Swagger-OberflĂ€che konfigurieren. +Sie können einige zusĂ€tzliche Parameter der Swagger-OberflĂ€che konfigurieren. Um diese zu konfigurieren, ĂŒbergeben Sie das Argument `swagger_ui_parameters` beim Erstellen des `FastAPI()`-App-Objekts oder an die Funktion `get_swagger_ui_html()`. @@ -58,7 +58,7 @@ Um beispielsweise `deepLinking` zu deaktivieren, könnten Sie folgende Einstellu ## Andere Parameter der Swagger-OberflĂ€che -Um alle anderen möglichen Konfigurationen zu sehen, die Sie verwenden können, lesen Sie die offizielle Dokumentation fĂŒr die Parameter der Swagger-OberflĂ€che. +Um alle anderen möglichen Konfigurationen zu sehen, die Sie verwenden können, lesen Sie die offizielle Dokumentation fĂŒr die Parameter der Swagger-OberflĂ€che. ## JavaScript-basierte Einstellungen diff --git a/docs/en/docs/how-to/configure-swagger-ui.md b/docs/en/docs/how-to/configure-swagger-ui.md index 108afb929..040c3926b 100644 --- a/docs/en/docs/how-to/configure-swagger-ui.md +++ b/docs/en/docs/how-to/configure-swagger-ui.md @@ -1,6 +1,6 @@ # Configure Swagger UI -You can configure some extra Swagger UI parameters. +You can configure some extra Swagger UI parameters. To configure them, pass the `swagger_ui_parameters` argument when creating the `FastAPI()` app object or to the `get_swagger_ui_html()` function. @@ -58,7 +58,7 @@ For example, to disable `deepLinking` you could pass these settings to `swagger_ ## Other Swagger UI Parameters -To see all the other possible configurations you can use, read the official docs for Swagger UI parameters. +To see all the other possible configurations you can use, read the official docs for Swagger UI parameters. ## JavaScript-only settings diff --git a/docs/pt/docs/how-to/configure-swagger-ui.md b/docs/pt/docs/how-to/configure-swagger-ui.md index b40dad695..ceb8c634e 100644 --- a/docs/pt/docs/how-to/configure-swagger-ui.md +++ b/docs/pt/docs/how-to/configure-swagger-ui.md @@ -1,6 +1,6 @@ # Configurar Swagger UI -VocĂȘ pode configurar alguns parĂąmetros extras da UI do Swagger. +VocĂȘ pode configurar alguns parĂąmetros extras da UI do Swagger. Para configurĂĄ-los, passe o argumento `swagger_ui_parameters` ao criar o objeto de aplicativo `FastAPI()` ou para a função `get_swagger_ui_html()`. @@ -58,7 +58,7 @@ Por exemplo, para desabilitar `deepLinking` vocĂȘ pode passar essas configuraç ## Outros parĂąmetros da UI do Swagger -Para ver todas as outras configuraçÔes possĂ­veis que vocĂȘ pode usar, leia a documentação oficial dos parĂąmetros da UI do Swagger. +Para ver todas as outras configuraçÔes possĂ­veis que vocĂȘ pode usar, leia a documentação oficial dos parĂąmetros da UI do Swagger. ## ConfiguraçÔes somente JavaScript diff --git a/docs/zh/docs/how-to/configure-swagger-ui.md b/docs/zh/docs/how-to/configure-swagger-ui.md index c0d09f943..17f89b22f 100644 --- a/docs/zh/docs/how-to/configure-swagger-ui.md +++ b/docs/zh/docs/how-to/configure-swagger-ui.md @@ -1,6 +1,6 @@ # é…çœź Swagger UI -äœ ćŻä»„é…çœźäž€äș›éąć€–çš„ Swagger UI ć‚æ•°. +äœ ćŻä»„é…çœźäž€äș›éąć€–çš„ Swagger UI ć‚æ•°. ćŠ‚æžœéœ€èŠé…çœźćźƒä»ŹïŒŒćŻä»„ćœšćˆ›ć»ș `FastAPI()` ćș”甚ćŻčè±Ąæ—¶æˆ–è°ƒç”š `get_swagger_ui_html()` ć‡œæ•°æ—¶äŒ é€’ `swagger_ui_parameters` ć‚æ•°ă€‚ @@ -58,7 +58,7 @@ FastAPI ćŒ…ć«äș†äž€äș›é»˜èź€é…çœźć‚数适甚äșŽć€§ć€šæ•°ç”šäŸ‹ă€‚ ## ć…¶ä»– Swagger UI ć‚æ•° -æŸ„çœ‹ć…¶ä»– Swagger UI ć‚æ•°ïŒŒèŻ·é˜…èŻ» docs for Swagger UI parameters。 +æŸ„çœ‹ć…¶ä»– Swagger UI ć‚æ•°ïŒŒèŻ·é˜…èŻ» docs for Swagger UI parameters。 ## JavaScript-only é…çœź From d12db0b26c11d338bba3f0099a6236b5931224dd Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 4 Oct 2024 11:36:26 +0000 Subject: [PATCH 42/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 82012b1af..744377757 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -9,6 +9,7 @@ hide: ### Docs +* 📝 Update link to Swagger UI configuration docs. PR [#12264](https://github.com/fastapi/fastapi/pull/12264) by [@makisukurisu](https://github.com/makisukurisu). * 📝 Adding links for Playwright and Vite in `docs/project-generation.md`. PR [#12274](https://github.com/fastapi/fastapi/pull/12274) by [@kayqueGovetri](https://github.com/kayqueGovetri). * 📝 Fix small typos in the documentation. PR [#12213](https://github.com/fastapi/fastapi/pull/12213) by [@svlandeg](https://github.com/svlandeg). From 8953d9a3234968d3673eddbeb947e42f34d3536a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Oct 2024 13:37:26 +0200 Subject: [PATCH 43/90] =?UTF-8?q?=E2=AC=86=20Bump=20griffe-typingdoc=20fro?= =?UTF-8?q?m=200.2.6=20to=200.2.7=20(#12370)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [griffe-typingdoc](https://github.com/mkdocstrings/griffe-typingdoc) from 0.2.6 to 0.2.7. - [Release notes](https://github.com/mkdocstrings/griffe-typingdoc/releases) - [Changelog](https://github.com/mkdocstrings/griffe-typingdoc/blob/main/CHANGELOG.md) - [Commits](https://github.com/mkdocstrings/griffe-typingdoc/compare/0.2.6...0.2.7) --- updated-dependencies: - dependency-name: griffe-typingdoc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-docs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-docs.txt b/requirements-docs.txt index 332fd1857..70dca9f2f 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -12,7 +12,7 @@ pillow==10.4.0 # For image processing by Material for MkDocs cairosvg==2.7.1 mkdocstrings[python]==0.25.1 -griffe-typingdoc==0.2.6 +griffe-typingdoc==0.2.7 # For griffe, it formats with black black==24.3.0 mkdocs-macros-plugin==1.0.5 From deec2e591e6fb506c4249340b1b96c0b2afd4b07 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 4 Oct 2024 11:39:01 +0000 Subject: [PATCH 44/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 744377757..8fbb26bb0 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -32,6 +32,7 @@ hide: ### Internal +* ⬆ Bump griffe-typingdoc from 0.2.6 to 0.2.7. PR [#12370](https://github.com/fastapi/fastapi/pull/12370) by [@dependabot[bot]](https://github.com/apps/dependabot). * ⬆ [pre-commit.ci] pre-commit autoupdate. PR [#12331](https://github.com/fastapi/fastapi/pull/12331) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci). * 🔧 Update sponsors, remove Fine.dev. PR [#12271](https://github.com/fastapi/fastapi/pull/12271) by [@tiangolo](https://github.com/tiangolo). * ⬆ [pre-commit.ci] pre-commit autoupdate. PR [#12253](https://github.com/fastapi/fastapi/pull/12253) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci). From 757eaacd5950ab355807ebf4f9e80dd17bd56b20 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Oct 2024 13:56:35 +0200 Subject: [PATCH 45/90] =?UTF-8?q?=E2=AC=86=20Bump=20mkdocstrings[python]?= =?UTF-8?q?=20from=200.25.1=20to=200.26.1=20(#12371)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [mkdocstrings[python]](https://github.com/mkdocstrings/mkdocstrings) from 0.25.1 to 0.26.1. - [Release notes](https://github.com/mkdocstrings/mkdocstrings/releases) - [Changelog](https://github.com/mkdocstrings/mkdocstrings/blob/main/CHANGELOG.md) - [Commits](https://github.com/mkdocstrings/mkdocstrings/compare/0.25.1...0.26.1) --- updated-dependencies: - dependency-name: mkdocstrings[python] dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com> --- requirements-docs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-docs.txt b/requirements-docs.txt index 70dca9f2f..16b2998b9 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -11,7 +11,7 @@ jieba==0.42.1 pillow==10.4.0 # For image processing by Material for MkDocs cairosvg==2.7.1 -mkdocstrings[python]==0.25.1 +mkdocstrings[python]==0.26.1 griffe-typingdoc==0.2.7 # For griffe, it formats with black black==24.3.0 From 82b95dcef8d032628217599ea8700260d1ecc670 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 4 Oct 2024 11:56:57 +0000 Subject: [PATCH 46/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 8fbb26bb0..77daba91c 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -32,6 +32,7 @@ hide: ### Internal +* ⬆ Bump mkdocstrings[python] from 0.25.1 to 0.26.1. PR [#12371](https://github.com/fastapi/fastapi/pull/12371) by [@dependabot[bot]](https://github.com/apps/dependabot). * ⬆ Bump griffe-typingdoc from 0.2.6 to 0.2.7. PR [#12370](https://github.com/fastapi/fastapi/pull/12370) by [@dependabot[bot]](https://github.com/apps/dependabot). * ⬆ [pre-commit.ci] pre-commit autoupdate. PR [#12331](https://github.com/fastapi/fastapi/pull/12331) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci). * 🔧 Update sponsors, remove Fine.dev. PR [#12271](https://github.com/fastapi/fastapi/pull/12271) by [@tiangolo](https://github.com/tiangolo). From caa298aefea0ddbd373368b87a740b3bd08e4e42 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Oct 2024 13:57:23 +0200 Subject: [PATCH 47/90] =?UTF-8?q?=E2=AC=86=20Bump=20pypa/gh-action-pypi-pu?= =?UTF-8?q?blish=20from=201.10.1=20to=201.10.3=20(#12386)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.10.1 to 1.10.3. - [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases) - [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.10.1...v1.10.3) --- updated-dependencies: - dependency-name: pypa/gh-action-pypi-publish dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5004b94dd..c8ea4e18c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -35,7 +35,7 @@ jobs: TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }} run: python -m build - name: Publish - uses: pypa/gh-action-pypi-publish@v1.10.1 + uses: pypa/gh-action-pypi-publish@v1.10.3 - name: Dump GitHub context env: GITHUB_CONTEXT: ${{ toJson(github) }} From ea1265b78beb2a7a1991a6dd4e8f19852ffa3196 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 4 Oct 2024 11:58:03 +0000 Subject: [PATCH 48/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 77daba91c..6660ea894 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -32,6 +32,7 @@ hide: ### Internal +* ⬆ Bump pypa/gh-action-pypi-publish from 1.10.1 to 1.10.3. PR [#12386](https://github.com/fastapi/fastapi/pull/12386) by [@dependabot[bot]](https://github.com/apps/dependabot). * ⬆ Bump mkdocstrings[python] from 0.25.1 to 0.26.1. PR [#12371](https://github.com/fastapi/fastapi/pull/12371) by [@dependabot[bot]](https://github.com/apps/dependabot). * ⬆ Bump griffe-typingdoc from 0.2.6 to 0.2.7. PR [#12370](https://github.com/fastapi/fastapi/pull/12370) by [@dependabot[bot]](https://github.com/apps/dependabot). * ⬆ [pre-commit.ci] pre-commit autoupdate. PR [#12331](https://github.com/fastapi/fastapi/pull/12331) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci). From 9d6ec4aa77f613a99c8f05d8f8a0d2088a2a2d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sat, 5 Oct 2024 14:49:04 +0200 Subject: [PATCH 49/90] =?UTF-8?q?=F0=9F=91=B7=20Update=20Cloudflare=20GitH?= =?UTF-8?q?ub=20Action=20(#12387)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-docs.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index d2953f284..c7827f132 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -55,14 +55,14 @@ jobs: # hashFiles returns an empty string if there are no files if: hashFiles('./site/*') id: deploy - uses: cloudflare/pages-action@v1 + env: + PROJECT_NAME: fastapitiangolo + BRANCH: ${{ ( github.event.workflow_run.head_repository.full_name == github.repository && github.event.workflow_run.head_branch == 'master' && 'main' ) || ( github.event.workflow_run.head_sha ) }} + uses: cloudflare/wrangler-action@v3 with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - projectName: fastapitiangolo - directory: './site' - gitHubToken: ${{ secrets.GITHUB_TOKEN }} - branch: ${{ ( github.event.workflow_run.head_repository.full_name == github.repository && github.event.workflow_run.head_branch == 'master' && 'main' ) || ( github.event.workflow_run.head_sha ) }} + command: pages deploy ./site --project-name=${{ env.PROJECT_NAME }} --branch=${{ env.BRANCH }} - name: Comment Deploy run: python ./scripts/deploy_docs_status.py env: From ad8b3ba3ec5e41f7ebf85791870cab40f0429517 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 5 Oct 2024 12:49:28 +0000 Subject: [PATCH 50/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 6660ea894..ddbaee46b 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -32,6 +32,7 @@ hide: ### Internal +* đŸ‘· Update Cloudflare GitHub Action. PR [#12387](https://github.com/fastapi/fastapi/pull/12387) by [@tiangolo](https://github.com/tiangolo). * ⬆ Bump pypa/gh-action-pypi-publish from 1.10.1 to 1.10.3. PR [#12386](https://github.com/fastapi/fastapi/pull/12386) by [@dependabot[bot]](https://github.com/apps/dependabot). * ⬆ Bump mkdocstrings[python] from 0.25.1 to 0.26.1. PR [#12371](https://github.com/fastapi/fastapi/pull/12371) by [@dependabot[bot]](https://github.com/apps/dependabot). * ⬆ Bump griffe-typingdoc from 0.2.6 to 0.2.7. PR [#12370](https://github.com/fastapi/fastapi/pull/12370) by [@dependabot[bot]](https://github.com/apps/dependabot). From 1705a8c37f047df61564e47dd8c050d6213def81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sun, 6 Oct 2024 22:14:05 +0200 Subject: [PATCH 51/90] =?UTF-8?q?=F0=9F=91=B7=20Update=20deploy-docs-notif?= =?UTF-8?q?y=20URL=20(#12392)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index c7827f132..22dc89dff 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -67,7 +67,7 @@ jobs: run: python ./scripts/deploy_docs_status.py env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DEPLOY_URL: ${{ steps.deploy.outputs.url }} + DEPLOY_URL: ${{ steps.deploy.outputs.deployment-url }} COMMIT_SHA: ${{ github.event.workflow_run.head_sha }} RUN_ID: ${{ github.run_id }} IS_DONE: "true" From c67b41546cd322cb61e25cc275e995902519ca68 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 6 Oct 2024 20:14:33 +0000 Subject: [PATCH 52/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index ddbaee46b..2995aa8df 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -32,6 +32,7 @@ hide: ### Internal +* đŸ‘· Update worfkow deploy-docs-notify URL. PR [#12392](https://github.com/fastapi/fastapi/pull/12392) by [@tiangolo](https://github.com/tiangolo). * đŸ‘· Update Cloudflare GitHub Action. PR [#12387](https://github.com/fastapi/fastapi/pull/12387) by [@tiangolo](https://github.com/tiangolo). * ⬆ Bump pypa/gh-action-pypi-publish from 1.10.1 to 1.10.3. PR [#12386](https://github.com/fastapi/fastapi/pull/12386) by [@dependabot[bot]](https://github.com/apps/dependabot). * ⬆ Bump mkdocstrings[python] from 0.25.1 to 0.26.1. PR [#12371](https://github.com/fastapi/fastapi/pull/12371) by [@dependabot[bot]](https://github.com/apps/dependabot). From 0f7d67e85c9b99c82821c9cfde51721dd98698a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sun, 6 Oct 2024 22:36:54 +0200 Subject: [PATCH 53/90] =?UTF-8?q?=F0=9F=94=A7=20Remove=20`base=5Fpath`=20f?= =?UTF-8?q?or=20`mdx=5Finclude`=20Markdown=20extension=20in=20MkDocs=20(#1?= =?UTF-8?q?2391)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/bn/docs/python-types.md | 56 +++---- docs/de/docs/advanced/additional-responses.md | 8 +- .../docs/advanced/additional-status-codes.md | 10 +- .../de/docs/advanced/advanced-dependencies.md | 24 +-- docs/de/docs/advanced/async-tests.md | 8 +- docs/de/docs/advanced/behind-a-proxy.md | 10 +- docs/de/docs/advanced/custom-response.md | 32 ++-- docs/de/docs/advanced/dataclasses.md | 6 +- docs/de/docs/advanced/events.md | 12 +- docs/de/docs/advanced/generate-clients.md | 16 +- docs/de/docs/advanced/middleware.md | 6 +- docs/de/docs/advanced/openapi-callbacks.md | 8 +- docs/de/docs/advanced/openapi-webhooks.md | 2 +- .../path-operation-advanced-configuration.md | 20 +-- .../advanced/response-change-status-code.md | 2 +- docs/de/docs/advanced/response-cookies.md | 4 +- docs/de/docs/advanced/response-directly.md | 4 +- docs/de/docs/advanced/response-headers.md | 4 +- .../docs/advanced/security/http-basic-auth.md | 18 +-- .../docs/advanced/security/oauth2-scopes.md | 96 ++++++------ docs/de/docs/advanced/settings.md | 36 ++--- docs/de/docs/advanced/sub-applications.md | 6 +- docs/de/docs/advanced/templates.md | 8 +- docs/de/docs/advanced/testing-dependencies.md | 10 +- docs/de/docs/advanced/testing-events.md | 2 +- docs/de/docs/advanced/testing-websockets.md | 2 +- .../docs/advanced/using-request-directly.md | 2 +- docs/de/docs/advanced/websockets.md | 20 +-- docs/de/docs/advanced/wsgi.md | 2 +- docs/de/docs/how-to/conditional-openapi.md | 2 +- docs/de/docs/how-to/configure-swagger-ui.md | 8 +- docs/de/docs/how-to/custom-docs-ui-assets.md | 14 +- .../docs/how-to/custom-request-and-route.md | 12 +- docs/de/docs/how-to/extending-openapi.md | 10 +- docs/de/docs/how-to/graphql.md | 2 +- .../docs/how-to/separate-openapi-schemas.md | 36 ++--- docs/de/docs/python-types.md | 56 +++---- docs/de/docs/tutorial/background-tasks.md | 16 +- docs/de/docs/tutorial/bigger-applications.md | 30 ++-- docs/de/docs/tutorial/body-fields.md | 20 +-- docs/de/docs/tutorial/body-multiple-params.md | 44 +++--- docs/de/docs/tutorial/body-nested-models.md | 56 +++---- docs/de/docs/tutorial/body-updates.md | 24 +-- docs/de/docs/tutorial/body.md | 24 +-- docs/de/docs/tutorial/cookie-params.md | 20 +-- .../dependencies/classes-as-dependencies.md | 70 ++++----- ...pendencies-in-path-operation-decorators.md | 24 +-- .../dependencies/dependencies-with-yield.md | 28 ++-- .../dependencies/global-dependencies.md | 6 +- docs/de/docs/tutorial/dependencies/index.md | 36 ++--- .../tutorial/dependencies/sub-dependencies.md | 30 ++-- docs/de/docs/tutorial/encoder.md | 4 +- docs/de/docs/tutorial/extra-data-types.md | 20 +-- docs/de/docs/tutorial/extra-models.md | 20 +-- docs/de/docs/tutorial/first-steps.md | 16 +- docs/de/docs/tutorial/handling-errors.md | 16 +- docs/de/docs/tutorial/header-params.md | 42 ++--- docs/de/docs/tutorial/metadata.md | 12 +- docs/de/docs/tutorial/middleware.md | 4 +- .../tutorial/path-operation-configuration.md | 34 ++-- .../path-params-numeric-validations.md | 50 +++--- docs/de/docs/tutorial/path-params.md | 20 +-- .../tutorial/query-params-str-validations.md | 142 ++++++++--------- docs/de/docs/tutorial/query-params.md | 20 +-- docs/de/docs/tutorial/request-files.md | 50 +++--- .../docs/tutorial/request-forms-and-files.md | 12 +- docs/de/docs/tutorial/request-forms.md | 12 +- docs/de/docs/tutorial/response-model.md | 68 ++++---- docs/de/docs/tutorial/response-status-code.md | 6 +- docs/de/docs/tutorial/schema-extra-example.md | 42 ++--- docs/de/docs/tutorial/security/first-steps.md | 18 +-- .../tutorial/security/get-current-user.md | 56 +++---- docs/de/docs/tutorial/security/oauth2-jwt.md | 40 ++--- .../docs/tutorial/security/simple-oauth2.md | 50 +++--- docs/de/docs/tutorial/static-files.md | 2 +- docs/de/docs/tutorial/testing.md | 18 +-- docs/em/docs/advanced/additional-responses.md | 8 +- .../docs/advanced/additional-status-codes.md | 2 +- .../em/docs/advanced/advanced-dependencies.md | 8 +- docs/em/docs/advanced/async-tests.md | 8 +- docs/em/docs/advanced/behind-a-proxy.md | 8 +- docs/em/docs/advanced/custom-response.md | 32 ++-- docs/em/docs/advanced/dataclasses.md | 6 +- docs/em/docs/advanced/events.md | 12 +- docs/em/docs/advanced/generate-clients.md | 14 +- docs/em/docs/advanced/middleware.md | 6 +- docs/em/docs/advanced/openapi-callbacks.md | 8 +- .../path-operation-advanced-configuration.md | 16 +- .../advanced/response-change-status-code.md | 2 +- docs/em/docs/advanced/response-cookies.md | 4 +- docs/em/docs/advanced/response-directly.md | 4 +- docs/em/docs/advanced/response-headers.md | 4 +- .../docs/advanced/security/http-basic-auth.md | 6 +- .../docs/advanced/security/oauth2-scopes.md | 16 +- docs/em/docs/advanced/settings.md | 20 +-- docs/em/docs/advanced/sub-applications.md | 6 +- docs/em/docs/advanced/templates.md | 8 +- docs/em/docs/advanced/testing-database.md | 8 +- docs/em/docs/advanced/testing-dependencies.md | 2 +- docs/em/docs/advanced/testing-events.md | 2 +- docs/em/docs/advanced/testing-websockets.md | 2 +- .../docs/advanced/using-request-directly.md | 2 +- docs/em/docs/advanced/websockets.md | 10 +- docs/em/docs/advanced/wsgi.md | 2 +- docs/em/docs/how-to/conditional-openapi.md | 2 +- .../docs/how-to/custom-request-and-route.md | 12 +- docs/em/docs/how-to/extending-openapi.md | 10 +- docs/em/docs/how-to/graphql.md | 2 +- docs/em/docs/how-to/sql-databases-peewee.md | 34 ++-- docs/em/docs/python-types.md | 52 +++---- docs/em/docs/tutorial/background-tasks.md | 10 +- docs/em/docs/tutorial/bigger-applications.md | 26 ++-- docs/em/docs/tutorial/body-fields.md | 8 +- docs/em/docs/tutorial/body-multiple-params.md | 20 +-- docs/em/docs/tutorial/body-nested-models.md | 56 +++---- docs/em/docs/tutorial/body-updates.md | 24 +-- docs/em/docs/tutorial/body.md | 24 +-- docs/em/docs/tutorial/cookie-params.md | 8 +- docs/em/docs/tutorial/cors.md | 2 +- docs/em/docs/tutorial/debugging.md | 2 +- .../dependencies/classes-as-dependencies.md | 28 ++-- ...pendencies-in-path-operation-decorators.md | 8 +- .../dependencies/dependencies-with-yield.md | 14 +- .../dependencies/global-dependencies.md | 2 +- docs/em/docs/tutorial/dependencies/index.md | 12 +- .../tutorial/dependencies/sub-dependencies.md | 12 +- docs/em/docs/tutorial/encoder.md | 4 +- docs/em/docs/tutorial/extra-data-types.md | 8 +- docs/em/docs/tutorial/extra-models.md | 20 +-- docs/em/docs/tutorial/first-steps.md | 16 +- docs/em/docs/tutorial/handling-errors.md | 16 +- docs/em/docs/tutorial/header-params.md | 18 +-- docs/em/docs/tutorial/metadata.md | 10 +- docs/em/docs/tutorial/middleware.md | 4 +- .../tutorial/path-operation-configuration.md | 34 ++-- .../path-params-numeric-validations.md | 18 +-- docs/em/docs/tutorial/path-params.md | 20 +-- .../tutorial/query-params-str-validations.md | 64 ++++---- docs/em/docs/tutorial/query-params.md | 20 +-- docs/em/docs/tutorial/request-files.md | 20 +-- .../docs/tutorial/request-forms-and-files.md | 4 +- docs/em/docs/tutorial/request-forms.md | 4 +- docs/em/docs/tutorial/response-model.md | 68 ++++---- docs/em/docs/tutorial/response-status-code.md | 6 +- docs/em/docs/tutorial/schema-extra-example.md | 16 +- docs/em/docs/tutorial/security/first-steps.md | 6 +- .../tutorial/security/get-current-user.md | 22 +-- docs/em/docs/tutorial/security/oauth2-jwt.md | 16 +- .../docs/tutorial/security/simple-oauth2.md | 20 +-- docs/em/docs/tutorial/sql-databases.md | 74 ++++----- docs/em/docs/tutorial/static-files.md | 2 +- docs/em/docs/tutorial/testing.md | 12 +- docs/en/docs/advanced/additional-responses.md | 8 +- .../docs/advanced/additional-status-codes.md | 10 +- .../en/docs/advanced/advanced-dependencies.md | 24 +-- docs/en/docs/advanced/async-tests.md | 8 +- docs/en/docs/advanced/behind-a-proxy.md | 10 +- docs/en/docs/advanced/custom-response.md | 32 ++-- docs/en/docs/advanced/dataclasses.md | 6 +- docs/en/docs/advanced/events.md | 12 +- docs/en/docs/advanced/generate-clients.md | 16 +- docs/en/docs/advanced/middleware.md | 6 +- docs/en/docs/advanced/openapi-callbacks.md | 8 +- docs/en/docs/advanced/openapi-webhooks.md | 2 +- .../path-operation-advanced-configuration.md | 20 +-- .../advanced/response-change-status-code.md | 2 +- docs/en/docs/advanced/response-cookies.md | 4 +- docs/en/docs/advanced/response-directly.md | 4 +- docs/en/docs/advanced/response-headers.md | 4 +- .../docs/advanced/security/http-basic-auth.md | 18 +-- .../docs/advanced/security/oauth2-scopes.md | 96 ++++++------ docs/en/docs/advanced/settings.md | 36 ++--- docs/en/docs/advanced/sub-applications.md | 6 +- docs/en/docs/advanced/templates.md | 8 +- docs/en/docs/advanced/testing-database.md | 8 +- docs/en/docs/advanced/testing-dependencies.md | 10 +- docs/en/docs/advanced/testing-events.md | 2 +- docs/en/docs/advanced/testing-websockets.md | 2 +- .../docs/advanced/using-request-directly.md | 2 +- docs/en/docs/advanced/websockets.md | 20 +-- docs/en/docs/advanced/wsgi.md | 2 +- .../docs/how-to/async-sql-encode-databases.md | 14 +- docs/en/docs/how-to/conditional-openapi.md | 2 +- docs/en/docs/how-to/configure-swagger-ui.md | 8 +- docs/en/docs/how-to/custom-docs-ui-assets.md | 14 +- .../docs/how-to/custom-request-and-route.md | 12 +- docs/en/docs/how-to/extending-openapi.md | 10 +- docs/en/docs/how-to/graphql.md | 2 +- .../docs/how-to/nosql-databases-couchbase.md | 16 +- .../docs/how-to/separate-openapi-schemas.md | 36 ++--- docs/en/docs/how-to/sql-databases-peewee.md | 34 ++-- docs/en/docs/python-types.md | 56 +++---- docs/en/docs/tutorial/background-tasks.md | 16 +- docs/en/docs/tutorial/bigger-applications.md | 30 ++-- docs/en/docs/tutorial/body-fields.md | 20 +-- docs/en/docs/tutorial/body-multiple-params.md | 44 +++--- docs/en/docs/tutorial/body-nested-models.md | 56 +++---- docs/en/docs/tutorial/body-updates.md | 24 +-- docs/en/docs/tutorial/body.md | 24 +-- docs/en/docs/tutorial/cookie-param-models.md | 16 +- docs/en/docs/tutorial/cookie-params.md | 20 +-- docs/en/docs/tutorial/cors.md | 2 +- docs/en/docs/tutorial/debugging.md | 2 +- .../dependencies/classes-as-dependencies.md | 70 ++++----- ...pendencies-in-path-operation-decorators.md | 24 +-- .../dependencies/dependencies-with-yield.md | 40 ++--- .../dependencies/global-dependencies.md | 6 +- docs/en/docs/tutorial/dependencies/index.md | 36 ++--- .../tutorial/dependencies/sub-dependencies.md | 30 ++-- docs/en/docs/tutorial/encoder.md | 4 +- docs/en/docs/tutorial/extra-data-types.md | 20 +-- docs/en/docs/tutorial/extra-models.md | 20 +-- docs/en/docs/tutorial/first-steps.md | 14 +- docs/en/docs/tutorial/handling-errors.md | 16 +- docs/en/docs/tutorial/header-param-models.md | 24 +-- docs/en/docs/tutorial/header-params.md | 42 ++--- docs/en/docs/tutorial/metadata.md | 12 +- docs/en/docs/tutorial/middleware.md | 4 +- .../tutorial/path-operation-configuration.md | 34 ++-- .../path-params-numeric-validations.md | 50 +++--- docs/en/docs/tutorial/path-params.md | 20 +-- docs/en/docs/tutorial/query-param-models.md | 24 +-- .../tutorial/query-params-str-validations.md | 142 ++++++++--------- docs/en/docs/tutorial/query-params.md | 20 +-- docs/en/docs/tutorial/request-files.md | 50 +++--- docs/en/docs/tutorial/request-form-models.md | 12 +- .../docs/tutorial/request-forms-and-files.md | 12 +- docs/en/docs/tutorial/request-forms.md | 12 +- docs/en/docs/tutorial/response-model.md | 68 ++++---- docs/en/docs/tutorial/response-status-code.md | 6 +- docs/en/docs/tutorial/schema-extra-example.md | 42 ++--- docs/en/docs/tutorial/security/first-steps.md | 18 +-- .../tutorial/security/get-current-user.md | 56 +++---- docs/en/docs/tutorial/security/oauth2-jwt.md | 40 ++--- .../docs/tutorial/security/simple-oauth2.md | 50 +++--- docs/en/docs/tutorial/sql-databases.md | 26 ++-- docs/en/docs/tutorial/static-files.md | 2 +- docs/en/docs/tutorial/testing.md | 18 +-- docs/en/mkdocs.yml | 1 - .../docs/advanced/additional-status-codes.md | 2 +- .../path-operation-advanced-configuration.md | 8 +- .../advanced/response-change-status-code.md | 2 +- docs/es/docs/advanced/response-directly.md | 4 +- docs/es/docs/advanced/response-headers.md | 4 +- docs/es/docs/how-to/graphql.md | 2 +- docs/es/docs/python-types.md | 26 ++-- docs/es/docs/tutorial/cookie-params.md | 20 +-- docs/es/docs/tutorial/first-steps.md | 16 +- docs/es/docs/tutorial/path-params.md | 18 +-- docs/es/docs/tutorial/query-params.md | 12 +- docs/fa/docs/advanced/sub-applications.md | 6 +- docs/fa/docs/tutorial/middleware.md | 4 +- docs/fr/docs/advanced/additional-responses.md | 8 +- .../docs/advanced/additional-status-codes.md | 2 +- .../path-operation-advanced-configuration.md | 16 +- docs/fr/docs/advanced/response-directly.md | 4 +- docs/fr/docs/python-types.md | 28 ++-- docs/fr/docs/tutorial/background-tasks.md | 8 +- docs/fr/docs/tutorial/body-multiple-params.md | 44 +++--- docs/fr/docs/tutorial/body.md | 12 +- docs/fr/docs/tutorial/debugging.md | 2 +- docs/fr/docs/tutorial/first-steps.md | 16 +- .../path-params-numeric-validations.md | 56 +++---- docs/fr/docs/tutorial/path-params.md | 18 +-- .../tutorial/query-params-str-validations.md | 28 ++-- docs/fr/docs/tutorial/query-params.md | 12 +- .../docs/advanced/additional-status-codes.md | 2 +- docs/ja/docs/advanced/custom-response.md | 24 +-- .../path-operation-advanced-configuration.md | 8 +- docs/ja/docs/advanced/response-directly.md | 4 +- docs/ja/docs/advanced/websockets.md | 10 +- docs/ja/docs/how-to/conditional-openapi.md | 2 +- docs/ja/docs/python-types.md | 28 ++-- docs/ja/docs/tutorial/background-tasks.md | 8 +- docs/ja/docs/tutorial/body-fields.md | 4 +- docs/ja/docs/tutorial/body-multiple-params.md | 10 +- docs/ja/docs/tutorial/body-nested-models.md | 22 +-- docs/ja/docs/tutorial/body-updates.md | 8 +- docs/ja/docs/tutorial/body.md | 12 +- docs/ja/docs/tutorial/cookie-params.md | 4 +- docs/ja/docs/tutorial/cors.md | 2 +- docs/ja/docs/tutorial/debugging.md | 2 +- .../dependencies/classes-as-dependencies.md | 14 +- ...pendencies-in-path-operation-decorators.md | 8 +- .../dependencies/dependencies-with-yield.md | 14 +- docs/ja/docs/tutorial/dependencies/index.md | 6 +- .../tutorial/dependencies/sub-dependencies.md | 6 +- docs/ja/docs/tutorial/encoder.md | 2 +- docs/ja/docs/tutorial/extra-data-types.md | 4 +- docs/ja/docs/tutorial/extra-models.md | 10 +- docs/ja/docs/tutorial/first-steps.md | 16 +- docs/ja/docs/tutorial/handling-errors.md | 16 +- docs/ja/docs/tutorial/header-params.md | 8 +- docs/ja/docs/tutorial/metadata.md | 10 +- docs/ja/docs/tutorial/middleware.md | 4 +- .../tutorial/path-operation-configuration.md | 12 +- .../path-params-numeric-validations.md | 14 +- docs/ja/docs/tutorial/path-params.md | 18 +-- .../tutorial/query-params-str-validations.md | 28 ++-- docs/ja/docs/tutorial/query-params.md | 12 +- .../docs/tutorial/request-forms-and-files.md | 4 +- docs/ja/docs/tutorial/request-forms.md | 4 +- docs/ja/docs/tutorial/response-model.md | 20 +-- docs/ja/docs/tutorial/response-status-code.md | 6 +- docs/ja/docs/tutorial/schema-extra-example.md | 6 +- docs/ja/docs/tutorial/security/first-steps.md | 6 +- .../tutorial/security/get-current-user.md | 12 +- docs/ja/docs/tutorial/security/oauth2-jwt.md | 8 +- docs/ja/docs/tutorial/static-files.md | 2 +- docs/ja/docs/tutorial/testing.md | 12 +- docs/ko/docs/advanced/events.md | 4 +- docs/ko/docs/python-types.md | 28 ++-- docs/ko/docs/tutorial/background-tasks.md | 10 +- docs/ko/docs/tutorial/body-fields.md | 20 +-- docs/ko/docs/tutorial/body-multiple-params.md | 10 +- docs/ko/docs/tutorial/body-nested-models.md | 22 +-- docs/ko/docs/tutorial/body.md | 24 +-- docs/ko/docs/tutorial/cookie-params.md | 20 +-- docs/ko/docs/tutorial/cors.md | 2 +- docs/ko/docs/tutorial/debugging.md | 2 +- .../dependencies/classes-as-dependencies.md | 28 ++-- ...pendencies-in-path-operation-decorators.md | 24 +-- .../dependencies/global-dependencies.md | 6 +- docs/ko/docs/tutorial/dependencies/index.md | 36 ++--- docs/ko/docs/tutorial/encoder.md | 2 +- docs/ko/docs/tutorial/extra-data-types.md | 20 +-- docs/ko/docs/tutorial/first-steps.md | 16 +- docs/ko/docs/tutorial/header-params.md | 8 +- docs/ko/docs/tutorial/middleware.md | 4 +- .../tutorial/path-operation-configuration.md | 12 +- .../path-params-numeric-validations.md | 14 +- docs/ko/docs/tutorial/path-params.md | 18 +-- .../tutorial/query-params-str-validations.md | 28 ++-- docs/ko/docs/tutorial/query-params.md | 12 +- docs/ko/docs/tutorial/request-files.md | 8 +- .../docs/tutorial/request-forms-and-files.md | 4 +- docs/ko/docs/tutorial/response-model.md | 20 +-- docs/ko/docs/tutorial/response-status-code.md | 6 +- docs/ko/docs/tutorial/schema-extra-example.md | 42 ++--- .../tutorial/security/get-current-user.md | 22 +-- .../docs/tutorial/security/simple-oauth2.md | 20 +-- docs/ko/docs/tutorial/static-files.md | 2 +- docs/nl/docs/python-types.md | 56 +++---- docs/pl/docs/tutorial/first-steps.md | 16 +- docs/pt/docs/advanced/additional-responses.md | 8 +- .../docs/advanced/additional-status-codes.md | 10 +- .../pt/docs/advanced/advanced-dependencies.md | 24 +-- docs/pt/docs/advanced/async-tests.md | 8 +- docs/pt/docs/advanced/behind-a-proxy.md | 10 +- docs/pt/docs/advanced/events.md | 12 +- docs/pt/docs/advanced/openapi-webhooks.md | 2 +- .../advanced/response-change-status-code.md | 2 +- docs/pt/docs/advanced/response-directly.md | 4 +- .../docs/advanced/security/http-basic-auth.md | 18 +-- .../docs/advanced/security/oauth2-scopes.md | 96 ++++++------ docs/pt/docs/advanced/settings.md | 36 ++--- docs/pt/docs/advanced/sub-applications.md | 6 +- docs/pt/docs/advanced/templates.md | 8 +- docs/pt/docs/advanced/testing-dependencies.md | 10 +- docs/pt/docs/advanced/testing-events.md | 2 +- docs/pt/docs/advanced/testing-websockets.md | 2 +- .../docs/advanced/using-request-directly.md | 2 +- docs/pt/docs/advanced/wsgi.md | 2 +- docs/pt/docs/how-to/conditional-openapi.md | 2 +- docs/pt/docs/how-to/configure-swagger-ui.md | 8 +- docs/pt/docs/how-to/graphql.md | 2 +- docs/pt/docs/python-types.md | 28 ++-- docs/pt/docs/tutorial/background-tasks.md | 8 +- docs/pt/docs/tutorial/bigger-applications.md | 30 ++-- docs/pt/docs/tutorial/body-fields.md | 4 +- docs/pt/docs/tutorial/body-multiple-params.md | 20 +-- docs/pt/docs/tutorial/body-nested-models.md | 22 +-- docs/pt/docs/tutorial/body.md | 12 +- docs/pt/docs/tutorial/cookie-params.md | 20 +-- docs/pt/docs/tutorial/cors.md | 2 +- docs/pt/docs/tutorial/debugging.md | 2 +- .../dependencies/classes-as-dependencies.md | 70 ++++----- ...pendencies-in-path-operation-decorators.md | 24 +-- .../dependencies/dependencies-with-yield.md | 40 ++--- .../dependencies/global-dependencies.md | 6 +- docs/pt/docs/tutorial/dependencies/index.md | 36 ++--- .../tutorial/dependencies/sub-dependencies.md | 30 ++-- docs/pt/docs/tutorial/encoder.md | 4 +- docs/pt/docs/tutorial/extra-data-types.md | 4 +- docs/pt/docs/tutorial/extra-models.md | 20 +-- docs/pt/docs/tutorial/first-steps.md | 16 +- docs/pt/docs/tutorial/handling-errors.md | 14 +- docs/pt/docs/tutorial/header-params.md | 18 +-- docs/pt/docs/tutorial/middleware.md | 4 +- .../tutorial/path-operation-configuration.md | 34 ++-- .../path-params-numeric-validations.md | 18 +-- docs/pt/docs/tutorial/path-params.md | 18 +-- .../tutorial/query-params-str-validations.md | 28 ++-- docs/pt/docs/tutorial/query-params.md | 20 +-- docs/pt/docs/tutorial/request-form-models.md | 12 +- .../docs/tutorial/request-forms-and-files.md | 4 +- docs/pt/docs/tutorial/request-forms.md | 4 +- docs/pt/docs/tutorial/request_files.md | 50 +++--- docs/pt/docs/tutorial/response-status-code.md | 6 +- docs/pt/docs/tutorial/schema-extra-example.md | 8 +- docs/pt/docs/tutorial/security/first-steps.md | 6 +- docs/pt/docs/tutorial/static-files.md | 2 +- docs/pt/docs/tutorial/testing.md | 18 +-- docs/ru/docs/python-types.md | 28 ++-- docs/ru/docs/tutorial/background-tasks.md | 10 +- docs/ru/docs/tutorial/body-fields.md | 8 +- docs/ru/docs/tutorial/body-multiple-params.md | 44 +++--- docs/ru/docs/tutorial/body-nested-models.md | 56 +++---- docs/ru/docs/tutorial/body-updates.md | 24 +-- docs/ru/docs/tutorial/body.md | 12 +- docs/ru/docs/tutorial/cookie-params.md | 8 +- docs/ru/docs/tutorial/cors.md | 2 +- docs/ru/docs/tutorial/debugging.md | 2 +- .../dependencies/classes-as-dependencies.md | 70 ++++----- ...pendencies-in-path-operation-decorators.md | 24 +-- .../dependencies/dependencies-with-yield.md | 22 +-- .../dependencies/global-dependencies.md | 6 +- docs/ru/docs/tutorial/dependencies/index.md | 36 ++--- .../tutorial/dependencies/sub-dependencies.md | 30 ++-- docs/ru/docs/tutorial/encoder.md | 4 +- docs/ru/docs/tutorial/extra-data-types.md | 8 +- docs/ru/docs/tutorial/extra-models.md | 20 +-- docs/ru/docs/tutorial/first-steps.md | 16 +- docs/ru/docs/tutorial/handling-errors.md | 16 +- docs/ru/docs/tutorial/header-params.md | 42 ++--- docs/ru/docs/tutorial/metadata.md | 10 +- .../tutorial/path-operation-configuration.md | 34 ++-- .../path-params-numeric-validations.md | 50 +++--- docs/ru/docs/tutorial/path-params.md | 20 +-- .../tutorial/query-params-str-validations.md | 146 +++++++++--------- docs/ru/docs/tutorial/query-params.md | 20 +-- docs/ru/docs/tutorial/request-files.md | 50 +++--- .../docs/tutorial/request-forms-and-files.md | 12 +- docs/ru/docs/tutorial/request-forms.md | 12 +- docs/ru/docs/tutorial/response-model.md | 68 ++++---- docs/ru/docs/tutorial/response-status-code.md | 6 +- docs/ru/docs/tutorial/schema-extra-example.md | 28 ++-- docs/ru/docs/tutorial/security/first-steps.md | 18 +-- docs/ru/docs/tutorial/static-files.md | 2 +- docs/ru/docs/tutorial/testing.md | 18 +-- docs/tr/docs/advanced/testing-websockets.md | 2 +- docs/tr/docs/advanced/wsgi.md | 2 +- docs/tr/docs/python-types.md | 28 ++-- docs/tr/docs/tutorial/cookie-params.md | 20 +-- docs/tr/docs/tutorial/first-steps.md | 16 +- docs/tr/docs/tutorial/path-params.md | 20 +-- docs/tr/docs/tutorial/query-params.md | 20 +-- docs/tr/docs/tutorial/request-forms.md | 12 +- docs/tr/docs/tutorial/static-files.md | 2 +- docs/uk/docs/python-types.md | 48 +++--- docs/uk/docs/tutorial/body-fields.md | 20 +-- docs/uk/docs/tutorial/body.md | 24 +-- docs/uk/docs/tutorial/cookie-params.md | 20 +-- docs/uk/docs/tutorial/encoder.md | 4 +- docs/uk/docs/tutorial/extra-data-types.md | 20 +-- docs/uk/docs/tutorial/first-steps.md | 14 +- docs/vi/docs/python-types.md | 56 +++---- docs/vi/docs/tutorial/first-steps.md | 16 +- docs/zh/docs/advanced/additional-responses.md | 8 +- .../docs/advanced/additional-status-codes.md | 2 +- .../zh/docs/advanced/advanced-dependencies.md | 8 +- docs/zh/docs/advanced/behind-a-proxy.md | 8 +- docs/zh/docs/advanced/custom-response.md | 22 +-- docs/zh/docs/advanced/dataclasses.md | 6 +- docs/zh/docs/advanced/events.md | 4 +- docs/zh/docs/advanced/generate-clients.md | 14 +- docs/zh/docs/advanced/middleware.md | 6 +- docs/zh/docs/advanced/openapi-callbacks.md | 8 +- .../path-operation-advanced-configuration.md | 8 +- .../advanced/response-change-status-code.md | 2 +- docs/zh/docs/advanced/response-cookies.md | 4 +- docs/zh/docs/advanced/response-directly.md | 4 +- docs/zh/docs/advanced/response-headers.md | 4 +- .../docs/advanced/security/http-basic-auth.md | 18 +-- .../docs/advanced/security/oauth2-scopes.md | 16 +- docs/zh/docs/advanced/settings.md | 32 ++-- docs/zh/docs/advanced/sub-applications.md | 6 +- docs/zh/docs/advanced/templates.md | 8 +- docs/zh/docs/advanced/testing-database.md | 8 +- docs/zh/docs/advanced/testing-dependencies.md | 2 +- docs/zh/docs/advanced/testing-events.md | 2 +- docs/zh/docs/advanced/testing-websockets.md | 2 +- .../docs/advanced/using-request-directly.md | 2 +- docs/zh/docs/advanced/websockets.md | 20 +-- docs/zh/docs/advanced/wsgi.md | 2 +- docs/zh/docs/how-to/configure-swagger-ui.md | 8 +- docs/zh/docs/python-types.md | 26 ++-- docs/zh/docs/tutorial/background-tasks.md | 16 +- docs/zh/docs/tutorial/bigger-applications.md | 26 ++-- docs/zh/docs/tutorial/body-fields.md | 20 +-- docs/zh/docs/tutorial/body-multiple-params.md | 44 +++--- docs/zh/docs/tutorial/body-nested-models.md | 56 +++---- docs/zh/docs/tutorial/body-updates.md | 8 +- docs/zh/docs/tutorial/body.md | 24 +-- docs/zh/docs/tutorial/cookie-params.md | 20 +-- docs/zh/docs/tutorial/cors.md | 2 +- docs/zh/docs/tutorial/debugging.md | 2 +- .../dependencies/classes-as-dependencies.md | 28 ++-- ...pendencies-in-path-operation-decorators.md | 8 +- .../dependencies/dependencies-with-yield.md | 40 ++--- .../dependencies/global-dependencies.md | 2 +- docs/zh/docs/tutorial/dependencies/index.md | 6 +- .../tutorial/dependencies/sub-dependencies.md | 6 +- docs/zh/docs/tutorial/encoder.md | 4 +- docs/zh/docs/tutorial/extra-data-types.md | 20 +-- docs/zh/docs/tutorial/extra-models.md | 20 +-- docs/zh/docs/tutorial/first-steps.md | 16 +- docs/zh/docs/tutorial/handling-errors.md | 16 +- docs/zh/docs/tutorial/header-params.md | 42 ++--- docs/zh/docs/tutorial/metadata.md | 10 +- docs/zh/docs/tutorial/middleware.md | 4 +- .../tutorial/path-operation-configuration.md | 12 +- .../path-params-numeric-validations.md | 30 ++-- docs/zh/docs/tutorial/path-params.md | 18 +-- .../tutorial/query-params-str-validations.md | 36 ++--- docs/zh/docs/tutorial/query-params.md | 20 +-- docs/zh/docs/tutorial/request-files.md | 20 +-- .../docs/tutorial/request-forms-and-files.md | 4 +- docs/zh/docs/tutorial/request-forms.md | 4 +- docs/zh/docs/tutorial/response-model.md | 30 ++-- docs/zh/docs/tutorial/response-status-code.md | 6 +- docs/zh/docs/tutorial/schema-extra-example.md | 18 +-- docs/zh/docs/tutorial/security/first-steps.md | 10 +- .../tutorial/security/get-current-user.md | 12 +- docs/zh/docs/tutorial/security/oauth2-jwt.md | 32 ++-- .../docs/tutorial/security/simple-oauth2.md | 10 +- docs/zh/docs/tutorial/sql-databases.md | 74 ++++----- docs/zh/docs/tutorial/static-files.md | 2 +- docs/zh/docs/tutorial/testing.md | 18 +-- 529 files changed, 4747 insertions(+), 4748 deletions(-) diff --git a/docs/bn/docs/python-types.md b/docs/bn/docs/python-types.md index d5304a65e..4a602b679 100644 --- a/docs/bn/docs/python-types.md +++ b/docs/bn/docs/python-types.md @@ -23,7 +23,7 @@ Python-àŠ àŠàŠšà§àŠ›àŠżàŠ• "àŠŸàŠŸàŠ‡àŠȘ àŠčàŠżàŠšà§àŠŸ" (àŠŻàŠŸ "àŠŸàŠŸàŠ‡ àŠšàŠČà§àŠš àŠàŠ•àŠŸàŠż àŠžàŠŸàŠ§àŠŸàŠ°àŠŁ àŠ‰àŠŠàŠŸàŠčàŠ°àŠŁ àŠŠàŠżàŠŻàŠŒà§‡ àŠ¶à§àŠ°à§ àŠ•àŠ°àŠż: ```Python -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` àŠàŠ‡ àŠȘà§àŠ°à§‹àŠ—à§àŠ°àŠŸàŠźàŠŸàŠż àŠ•àŠČ àŠ•àŠ°àŠČে àŠ†àŠ‰àŠŸàŠȘà§àŠŸ àŠčàŠŻàŠŒ: @@ -39,7 +39,7 @@ John Doe * àŠ€àŠŸàŠŠà§‡àŠ°àŠ•à§‡ àŠźàŠŸàŠàŠ–àŠŸàŠšà§‡ àŠàŠ•àŠŸàŠż àŠžà§àŠȘà§‡àŠž àŠŠàŠżàŠŻàŠŒà§‡ concatenate àŠ•àŠ°à§‡à„€ ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` ### àŠàŠŸàŠż àŠžàŠźà§àŠȘàŠŸàŠŠàŠšàŠŸ àŠ•àŠ°à§àŠš @@ -83,7 +83,7 @@ John Doe àŠàŠ—à§àŠČàŠżàŠ‡ "àŠŸàŠŸàŠ‡àŠȘ àŠčàŠżàŠšà§àŠŸ": ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial002.py!} +{!../../docs_src/python_types/tutorial002.py!} ``` àŠàŠŸàŠż àŠĄàŠżàŠ«àŠČà§àŠŸ àŠ­à§àŠŻàŠŸàŠČু àŠ˜à§‹àŠ·àŠŁàŠŸ àŠ•àŠ°àŠŸàŠ° àŠźàŠ€ àŠšàŠŻàŠŒ àŠŻà§‡àŠźàŠš: @@ -113,7 +113,7 @@ John Doe àŠàŠ‡ àŠ«àŠŸàŠ‚àŠ¶àŠšàŠŸàŠż àŠŠà§‡àŠ–à§àŠš, àŠàŠŸàŠżàŠ€à§‡ àŠ‡àŠ€àŠżàŠźàŠ§à§àŠŻà§‡ àŠŸàŠŸàŠ‡àŠȘ àŠčàŠżàŠšà§àŠŸ àŠ°àŠŻàŠŒà§‡àŠ›à§‡: ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial003.py!} +{!../../docs_src/python_types/tutorial003.py!} ``` àŠàŠĄàŠżàŠŸàŠ° àŠ­à§‡àŠ°àŠżàŠŻàŠŒà§‡àŠŹàŠČàŠ—à§àŠČàŠżàŠ° àŠŸàŠŸàŠ‡àŠȘ àŠœàŠŸàŠšàŠŸàŠ° àŠ•àŠŸàŠ°àŠŁà§‡, àŠ†àŠȘàŠšàŠż àŠ¶à§àŠ§à§àŠźàŠŸàŠ€à§àŠ° àŠ…àŠŸà§‹àŠ•àŠźàŠȘ্àŠČàŠżàŠ¶àŠšàŠ‡ àŠȘàŠŸàŠš àŠšàŠŸ, àŠ†àŠȘàŠšàŠż àŠàŠ°àŠ° àŠšà§‡àŠ•àŠ“ àŠȘàŠŸàŠš: @@ -123,7 +123,7 @@ John Doe àŠàŠ–àŠš àŠ†àŠȘàŠšàŠż àŠœàŠŸàŠšà§‡àŠš àŠŻà§‡ àŠ†àŠȘàŠšàŠŸàŠ•à§‡ àŠàŠŸàŠż àŠ àŠżàŠ• àŠ•àŠ°àŠ€à§‡ àŠčàŠŹà§‡, `age`-àŠ•à§‡ àŠàŠ•àŠŸàŠż àŠžà§àŠŸà§àŠ°àŠżàŠ‚ àŠčàŠżàŠžà§‡àŠŹà§‡ àŠ°à§‚àŠȘàŠŸàŠšà§àŠ€àŠ° àŠ•àŠ°àŠ€à§‡ `str(age)` àŠŹà§àŠŻàŠŹàŠčàŠŸàŠ° àŠ•àŠ°àŠ€à§‡ àŠčàŠŹà§‡: ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial004.py!} +{!../../docs_src/python_types/tutorial004.py!} ``` ## àŠŸàŠŸàŠ‡àŠȘ àŠ˜à§‹àŠ·àŠŁàŠŸ @@ -144,7 +144,7 @@ John Doe * `bytes` ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial005.py!} +{!../../docs_src/python_types/tutorial005.py!} ``` ### àŠŸàŠŸàŠ‡àŠȘ àŠȘà§àŠŻàŠŸàŠ°àŠŸàŠźàŠżàŠŸàŠŸàŠ° àŠžàŠč àŠœà§‡àŠšà§‡àŠ°àŠżàŠ• àŠŸàŠŸàŠ‡àŠȘ @@ -182,7 +182,7 @@ Python àŠŻàŠ€ àŠàŠ—àŠżàŠŻàŠŒà§‡ àŠŻàŠŸàŠšà§àŠ›à§‡, **àŠšàŠ€à§àŠš àŠžàŠ‚àŠžà§ àŠŻà§‡àŠčà§‡àŠ€à§ àŠČàŠżàŠžà§àŠŸ àŠàŠźàŠš àŠàŠ•àŠŸàŠż àŠŸàŠŸàŠ‡àŠȘ àŠŻàŠŸ àŠ…àŠ­à§àŠŻàŠšà§àŠ€àŠ°à§€àŠŁ àŠŸàŠŸàŠ‡àŠȘàŠ—à§àŠČàŠż àŠ§àŠŸàŠ°àŠŁ àŠ•àŠ°à§‡, àŠ†àŠȘàŠšàŠż àŠ€àŠŸàŠŠà§‡àŠ° àŠžà§àŠ•à§‹àŠŻàŠŒàŠŸàŠ° àŠŹà§àŠ°àŠŸàŠ•à§‡àŠŸà§‡àŠ° àŠ­àŠżàŠ€àŠ°à§‡ àŠŹà§àŠŻàŠŹàŠčàŠŸàŠ° àŠ•àŠ°à§àŠš: ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial006_py39.py!} +{!> ../../docs_src/python_types/tutorial006_py39.py!} ``` //// @@ -192,7 +192,7 @@ Python àŠŻàŠ€ àŠàŠ—àŠżàŠŻàŠŒà§‡ àŠŻàŠŸàŠšà§àŠ›à§‡, **àŠšàŠ€à§àŠš àŠžàŠ‚àŠžà§ `typing` àŠ„à§‡àŠ•à§‡ `List` (àŠŹàŠĄàŠŒ àŠčàŠŸàŠ€à§‡àŠ° `L` àŠŠàŠżàŠŻàŠŒà§‡) àŠ‡àŠźàŠȘà§‹àŠ°à§àŠŸ àŠ•àŠ°à§àŠš: ``` Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial006.py!} +{!> ../../docs_src/python_types/tutorial006.py!} ``` àŠ­à§‡àŠ°àŠżàŠŻàŠŒà§‡àŠŹàŠČàŠŸàŠż àŠ˜à§‹àŠ·àŠŁàŠŸ àŠ•àŠ°à§àŠš, àŠàŠ•àŠ‡ àŠ•à§‹àŠČàŠš (`:`) àŠžàŠżàŠšàŠŸà§àŠŻàŠŸàŠ•à§àŠž àŠŹà§àŠŻàŠŹàŠčàŠŸàŠ° àŠ•àŠ°à§‡à„€ @@ -202,7 +202,7 @@ Python àŠŻàŠ€ àŠàŠ—àŠżàŠŻàŠŒà§‡ àŠŻàŠŸàŠšà§àŠ›à§‡, **àŠšàŠ€à§àŠš àŠžàŠ‚àŠžà§ àŠŻà§‡àŠčà§‡àŠ€à§ àŠČàŠżàŠžà§àŠŸ àŠàŠźàŠš àŠàŠ•àŠŸàŠż àŠŸàŠŸàŠ‡àŠȘ àŠŻàŠŸ àŠ…àŠ­à§àŠŻàŠšà§àŠ€àŠ°à§€àŠŁ àŠŸàŠŸàŠ‡àŠȘàŠ—à§àŠČàŠż àŠ§àŠŸàŠ°àŠŁ àŠ•àŠ°à§‡, àŠ†àŠȘàŠšàŠż àŠ€àŠŸàŠŠà§‡àŠ° àŠžà§àŠ•à§‹àŠŻàŠŒàŠŸàŠ° àŠŹà§àŠ°àŠŸàŠ•à§‡àŠŸà§‡àŠ° àŠ­àŠżàŠ€àŠ°à§‡ àŠ•àŠ°à§àŠš: ```Python hl_lines="4" -{!> ../../../docs_src/python_types/tutorial006.py!} +{!> ../../docs_src/python_types/tutorial006.py!} ``` //// @@ -240,7 +240,7 @@ Python àŠŻàŠ€ àŠàŠ—àŠżàŠŻàŠŒà§‡ àŠŻàŠŸàŠšà§àŠ›à§‡, **àŠšàŠ€à§àŠš àŠžàŠ‚àŠžà§ //// tab | Python 3.9+ ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial007_py39.py!} +{!> ../../docs_src/python_types/tutorial007_py39.py!} ``` //// @@ -248,7 +248,7 @@ Python àŠŻàŠ€ àŠàŠ—àŠżàŠŻàŠŒà§‡ àŠŻàŠŸàŠšà§àŠ›à§‡, **àŠšàŠ€à§àŠš àŠžàŠ‚àŠžà§ //// tab | Python 3.8+ ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial007.py!} +{!> ../../docs_src/python_types/tutorial007.py!} ``` //// @@ -269,7 +269,7 @@ Python àŠŻàŠ€ àŠàŠ—àŠżàŠŻàŠŒà§‡ àŠŻàŠŸàŠšà§àŠ›à§‡, **àŠšàŠ€à§àŠš àŠžàŠ‚àŠžà§ //// tab | Python 3.9+ ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial008_py39.py!} +{!> ../../docs_src/python_types/tutorial008_py39.py!} ``` //// @@ -277,7 +277,7 @@ Python àŠŻàŠ€ àŠàŠ—àŠżàŠŻàŠŒà§‡ àŠŻàŠŸàŠšà§àŠ›à§‡, **àŠšàŠ€à§àŠš àŠžàŠ‚àŠžà§ //// tab | Python 3.8+ ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial008.py!} +{!> ../../docs_src/python_types/tutorial008.py!} ``` //// @@ -299,7 +299,7 @@ Python 3.10-àŠ àŠàŠ•àŠŸàŠż **àŠšàŠ€à§àŠš àŠžàŠżàŠšàŠŸà§àŠŻàŠŸàŠ•à§àŠž** àŠ† //// tab | Python 3.10+ ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial008b_py310.py!} +{!> ../../docs_src/python_types/tutorial008b_py310.py!} ``` //// @@ -307,7 +307,7 @@ Python 3.10-àŠ àŠàŠ•àŠŸàŠż **àŠšàŠ€à§àŠš àŠžàŠżàŠšàŠŸà§àŠŻàŠŸàŠ•à§àŠž** àŠ† //// tab | Python 3.8+ ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial008b.py!} +{!> ../../docs_src/python_types/tutorial008b.py!} ``` //// @@ -321,7 +321,7 @@ Python 3.10-àŠ àŠàŠ•àŠŸàŠż **àŠšàŠ€à§àŠš àŠžàŠżàŠšàŠŸà§àŠŻàŠŸàŠ•à§àŠž** àŠ† Python 3.6 àŠàŠŹàŠ‚ àŠ€àŠŸàŠ° àŠ‰àŠȘàŠ°à§‡àŠ° àŠžàŠ‚àŠžà§àŠ•àŠ°àŠŁàŠ—à§àŠČàŠżàŠ€à§‡ (Python 3.10 àŠ…àŠšàŠ€àŠ°à§àŠ­à§àŠ•à§àŠ€) àŠ†àŠȘàŠšàŠż `typing` àŠźàŠĄàŠżàŠ‰àŠČ àŠ„à§‡àŠ•à§‡ `Optional` àŠ‡àŠźàŠȘà§‹àŠ°à§àŠŸ àŠ•àŠ°à§‡ àŠàŠŸàŠż àŠ˜à§‹àŠ·àŠŁàŠŸ àŠàŠŹàŠ‚ àŠŹà§àŠŻàŠŹàŠčàŠŸàŠ° àŠ•àŠ°àŠ€à§‡ àŠȘàŠŸàŠ°à§‡àŠšà„€ ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009.py!} +{!../../docs_src/python_types/tutorial009.py!} ``` `Optional[str]` àŠŹà§àŠŻàŠŹàŠčàŠŸàŠ° àŠ•àŠ°àŠŸ àŠźàŠŸàŠšà§‡ àŠčàŠČ àŠ¶à§àŠ§à§ `str` àŠšàŠŻàŠŒ, àŠàŠŸàŠż àŠčàŠ€à§‡ àŠȘàŠŸàŠ°à§‡ `None`-àŠ“, àŠŻàŠŸ àŠ†àŠȘàŠšàŠŸàŠ° àŠàŠĄàŠżàŠŸàŠ°àŠ•à§‡ àŠžà§‡àŠ‡ àŠ€à§àŠ°à§àŠŸàŠżàŠ—à§àŠČàŠż àŠ¶àŠšàŠŸàŠ•à§àŠ€ àŠ•àŠ°àŠ€à§‡ àŠžàŠŸàŠčàŠŸàŠŻà§àŠŻ àŠ•àŠ°àŠŹà§‡ àŠŻà§‡àŠ–àŠŸàŠšà§‡ àŠ†àŠȘàŠšàŠż àŠ§àŠ°à§‡ àŠšàŠżàŠšà§àŠ›à§‡àŠš àŠŻà§‡ àŠàŠ•àŠŸàŠż àŠźàŠŸàŠš àŠžàŠŹàŠžàŠźàŠŻàŠŒ `str` àŠčàŠŹà§‡, àŠ…àŠ„àŠš àŠàŠŸàŠż `None`-àŠ“ àŠčàŠ€à§‡ àŠȘàŠŸàŠ°à§‡àŠ“à„€ @@ -333,7 +333,7 @@ Python 3.6 àŠàŠŹàŠ‚ àŠ€àŠŸàŠ° àŠ‰àŠȘàŠ°à§‡àŠ° àŠžàŠ‚àŠžà§àŠ•àŠ°àŠŁàŠ—à§àŠČàŠż //// tab | Python 3.10+ ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial009_py310.py!} +{!> ../../docs_src/python_types/tutorial009_py310.py!} ``` //// @@ -341,7 +341,7 @@ Python 3.6 àŠàŠŹàŠ‚ àŠ€àŠŸàŠ° àŠ‰àŠȘàŠ°à§‡àŠ° àŠžàŠ‚àŠžà§àŠ•àŠ°àŠŁàŠ—à§àŠČàŠż //// tab | Python 3.8+ ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial009.py!} +{!> ../../docs_src/python_types/tutorial009.py!} ``` //// @@ -349,7 +349,7 @@ Python 3.6 àŠàŠŹàŠ‚ àŠ€àŠŸàŠ° àŠ‰àŠȘàŠ°à§‡àŠ° àŠžàŠ‚àŠžà§àŠ•àŠ°àŠŁàŠ—à§àŠČàŠż //// tab | Python 3.8+ àŠŹàŠżàŠ•àŠČ্àŠȘ ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial009b.py!} +{!> ../../docs_src/python_types/tutorial009b.py!} ``` //// @@ -370,7 +370,7 @@ Python 3.6 àŠàŠŹàŠ‚ àŠ€àŠŸàŠ° àŠ‰àŠȘàŠ°à§‡àŠ° àŠžàŠ‚àŠžà§àŠ•àŠ°àŠŁàŠ—à§àŠČàŠż àŠàŠ•àŠŸàŠż àŠ‰àŠŠàŠŸàŠčàŠ°àŠŁ àŠčàŠżàŠžà§‡àŠŹà§‡, àŠàŠ‡ àŠ«àŠŸàŠ‚àŠ¶àŠšàŠŸàŠż àŠšàŠżàŠš: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009c.py!} +{!../../docs_src/python_types/tutorial009c.py!} ``` `name` àŠȘà§àŠŻàŠŸàŠ°àŠŸàŠźàŠżàŠŸàŠŸàŠ°àŠŸàŠż `Optional[str]` àŠčàŠżàŠžà§‡àŠŹà§‡ àŠžàŠ‚àŠœà§àŠžàŠŸàŠŻàŠŒàŠżàŠ€ àŠčàŠŻàŠŒà§‡àŠ›à§‡, àŠ•àŠżàŠšà§àŠ€à§ àŠàŠŸàŠż **àŠ…àŠȘàŠ¶àŠšàŠŸàŠČ àŠšàŠŻàŠŒ**, àŠ†àŠȘàŠšàŠż àŠȘà§àŠŻàŠŸàŠ°àŠŸàŠźàŠżàŠŸàŠŸàŠ° àŠ›àŠŸàŠĄàŠŒàŠŸ àŠ«àŠŸàŠ‚àŠ¶àŠšàŠŸàŠż àŠ•àŠČ àŠ•àŠ°àŠ€à§‡ àŠȘàŠŸàŠ°àŠŹà§‡àŠš àŠšàŠŸ: @@ -388,7 +388,7 @@ say_hi(name=None) # àŠàŠŸàŠż àŠ•àŠŸàŠœ àŠ•àŠ°à§‡, None àŠŹà§ˆàŠ§ 🎉 àŠžà§àŠ–àŠŹàŠ° àŠčàŠČ, àŠàŠ•àŠŹàŠŸàŠ° àŠ†àŠȘàŠšàŠż Python 3.10 àŠŹà§àŠŻàŠŹàŠčàŠŸàŠ° àŠ•àŠ°àŠŸ àŠ¶à§àŠ°à§ àŠ•àŠ°àŠČে, àŠ†àŠȘàŠšàŠŸàŠ•à§‡ àŠàŠ—à§àŠČà§‹àŠ° àŠŹà§àŠŻàŠŸàŠȘàŠŸàŠ°à§‡ àŠ†àŠ° àŠšàŠżàŠšà§àŠ€àŠŸ àŠ•àŠ°àŠ€à§‡ àŠčàŠŹà§‡ àŠšàŠŸ, àŠŻà§‡àŠčà§àŠ€à§ àŠ†àŠȘàŠšàŠż | àŠŹà§àŠŻàŠŹàŠčàŠŸàŠ° àŠ•àŠ°à§‡àŠ‡ àŠ‡àŠ‰àŠšàŠżàŠŻàŠŒàŠš àŠ˜à§‹àŠ·àŠŁàŠŸ àŠ•àŠ°àŠ€à§‡ àŠȘàŠŸàŠ°àŠŹà§‡àŠš: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009c_py310.py!} +{!../../docs_src/python_types/tutorial009c_py310.py!} ``` àŠàŠŹàŠ‚ àŠ€àŠŸàŠ°àŠȘàŠ° àŠ†àŠȘàŠšàŠŸàŠ•à§‡ àŠšàŠŸàŠźàŠ—à§àŠČàŠż àŠŻà§‡àŠźàŠš `Optional` àŠàŠŹàŠ‚ `Union` àŠšàŠżàŠŻàŠŒà§‡ àŠ†àŠ° àŠšàŠżàŠšà§àŠ€àŠŸ àŠ•àŠ°àŠ€à§‡ àŠčàŠŹà§‡ àŠšàŠŸà„€ 😎 @@ -452,13 +452,13 @@ Python 3.10-àŠ, `Union` àŠàŠŹàŠ‚ `Optional` àŠœà§‡àŠšà§‡àŠ°àŠżàŠ•àŠž àŠŹà§àŠŻ àŠ§àŠ°à§àŠš àŠ†àŠȘàŠšàŠŸàŠ° àŠ•àŠŸàŠ›à§‡ `Person` àŠšàŠŸàŠźà§‡ àŠàŠ•àŠŸàŠż àŠ•à§àŠČàŠŸàŠž àŠ†àŠ›à§‡, àŠŻàŠŸàŠ° àŠàŠ•àŠŸàŠż àŠšàŠŸàŠź àŠ†àŠ›à§‡: ```Python hl_lines="1-3" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` àŠ€àŠŸàŠ°àŠȘàŠ° àŠ†àŠȘàŠšàŠż àŠàŠ•àŠŸàŠż àŠ­à§‡àŠ°àŠżàŠŻàŠŒà§‡àŠŹàŠČàŠ•à§‡ `Person` àŠŸàŠŸàŠ‡àŠȘà§‡àŠ° àŠčàŠżàŠžà§‡àŠŹà§‡ àŠ˜à§‹àŠ·àŠŁàŠŸ àŠ•àŠ°àŠ€à§‡ àŠȘàŠŸàŠ°à§‡àŠš: ```Python hl_lines="6" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` àŠàŠŹàŠ‚ àŠ€àŠŸàŠ°àŠȘàŠ°, àŠ†àŠŹàŠŸàŠ°, àŠ†àŠȘàŠšàŠż àŠàŠĄàŠżàŠŸàŠ° àŠžàŠŸàŠȘà§‹àŠ°à§àŠŸ àŠȘà§‡àŠŻàŠŒà§‡ àŠŻàŠŸàŠŹà§‡àŠš: @@ -486,7 +486,7 @@ Python 3.10-àŠ, `Union` àŠàŠŹàŠ‚ `Optional` àŠœà§‡àŠšà§‡àŠ°àŠżàŠ•àŠž àŠŹà§àŠŻ //// tab | Python 3.10+ ```Python -{!> ../../../docs_src/python_types/tutorial011_py310.py!} +{!> ../../docs_src/python_types/tutorial011_py310.py!} ``` //// @@ -494,7 +494,7 @@ Python 3.10-àŠ, `Union` àŠàŠŹàŠ‚ `Optional` àŠœà§‡àŠšà§‡àŠ°àŠżàŠ•àŠž àŠŹà§àŠŻ //// tab | Python 3.9+ ```Python -{!> ../../../docs_src/python_types/tutorial011_py39.py!} +{!> ../../docs_src/python_types/tutorial011_py39.py!} ``` //// @@ -502,7 +502,7 @@ Python 3.10-àŠ, `Union` àŠàŠŹàŠ‚ `Optional` àŠœà§‡àŠšà§‡àŠ°àŠżàŠ•àŠž àŠŹà§àŠŻ //// tab | Python 3.8+ ```Python -{!> ../../../docs_src/python_types/tutorial011.py!} +{!> ../../docs_src/python_types/tutorial011.py!} ``` //// @@ -532,7 +532,7 @@ Python-àŠ àŠàŠźàŠš àŠàŠ•àŠŸàŠż àŠ«àŠżàŠšàŠŸàŠ° àŠ†àŠ›à§‡ àŠŻàŠŸ `Annotated` Python 3.9-àŠ, `Annotated` àŠžà§àŠŸà§àŠŻàŠŸàŠšà§àŠĄàŠŸàŠ°à§àŠĄ àŠČàŠŸàŠ‡àŠŹà§àŠ°à§‡àŠ°àŠżàŠ€à§‡ àŠ…àŠšà§àŠ€àŠ°à§àŠ­à§àŠ•à§àŠ€, àŠ€àŠŸàŠ‡ àŠ†àŠȘàŠšàŠż àŠàŠŸàŠż `typing` àŠ„à§‡àŠ•à§‡ àŠ‡àŠźàŠȘà§‹àŠ°à§àŠŸ àŠ•àŠ°àŠ€à§‡ àŠȘàŠŸàŠ°à§‡àŠšà„€ ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial013_py39.py!} +{!> ../../docs_src/python_types/tutorial013_py39.py!} ``` //// @@ -544,7 +544,7 @@ Python 3.9-àŠàŠ° àŠšà§€àŠšà§‡àŠ° àŠžàŠ‚àŠžà§àŠ•àŠ°àŠŁàŠ—à§àŠČàŠżàŠ€à§‡, àŠ† àŠàŠŸàŠż **FastAPI** àŠàŠ° àŠžàŠŸàŠ„à§‡ àŠ‡àŠ€àŠżàŠźàŠŠà§àŠ§à§‡ àŠ‡àŠšàŠžà§àŠŸàŠČ àŠčàŠŻàŠŒà§‡ àŠ„àŠŸàŠ•àŠŹà§‡à„€ ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial013.py!} +{!> ../../docs_src/python_types/tutorial013.py!} ``` //// diff --git a/docs/de/docs/advanced/additional-responses.md b/docs/de/docs/advanced/additional-responses.md index 6f2c4b2dd..a87c56491 100644 --- a/docs/de/docs/advanced/additional-responses.md +++ b/docs/de/docs/advanced/additional-responses.md @@ -27,7 +27,7 @@ Jedes dieser Response-`dict`s kann einen SchlĂŒssel `model` haben, welcher ein P Um beispielsweise eine weitere Response mit dem Statuscode `404` und einem Pydantic-Modell `Message` zu deklarieren, können Sie schreiben: ```Python hl_lines="18 22" -{!../../../docs_src/additional_responses/tutorial001.py!} +{!../../docs_src/additional_responses/tutorial001.py!} ``` /// note | "Hinweis" @@ -178,7 +178,7 @@ Sie können denselben `responses`-Parameter verwenden, um verschiedene Medientyp Sie können beispielsweise einen zusĂ€tzlichen Medientyp `image/png` hinzufĂŒgen und damit deklarieren, dass Ihre *Pfadoperation* ein JSON-Objekt (mit dem Medientyp `application/json`) oder ein PNG-Bild zurĂŒckgeben kann: ```Python hl_lines="19-24 28" -{!../../../docs_src/additional_responses/tutorial002.py!} +{!../../docs_src/additional_responses/tutorial002.py!} ``` /// note | "Hinweis" @@ -208,7 +208,7 @@ Sie können beispielsweise eine Response mit dem Statuscode `404` deklarieren, d Und eine Response mit dem Statuscode `200`, die Ihr `response_model` verwendet, aber ein benutzerdefiniertes Beispiel (`example`) enthĂ€lt: ```Python hl_lines="20-31" -{!../../../docs_src/additional_responses/tutorial003.py!} +{!../../docs_src/additional_responses/tutorial003.py!} ``` Es wird alles kombiniert und in Ihre OpenAPI eingebunden und in der API-Dokumentation angezeigt: @@ -244,7 +244,7 @@ Mit dieser Technik können Sie einige vordefinierte Responses in Ihren *Pfadoper Zum Beispiel: ```Python hl_lines="13-17 26" -{!../../../docs_src/additional_responses/tutorial004.py!} +{!../../docs_src/additional_responses/tutorial004.py!} ``` ## Weitere Informationen zu OpenAPI-Responses diff --git a/docs/de/docs/advanced/additional-status-codes.md b/docs/de/docs/advanced/additional-status-codes.md index 672efee51..fc8d09e4c 100644 --- a/docs/de/docs/advanced/additional-status-codes.md +++ b/docs/de/docs/advanced/additional-status-codes.md @@ -17,7 +17,7 @@ Um dies zu erreichen, importieren Sie `JSONResponse`, und geben Sie Ihren Inhalt //// tab | Python 3.10+ ```Python hl_lines="4 25" -{!> ../../../docs_src/additional_status_codes/tutorial001_an_py310.py!} +{!> ../../docs_src/additional_status_codes/tutorial001_an_py310.py!} ``` //// @@ -25,7 +25,7 @@ Um dies zu erreichen, importieren Sie `JSONResponse`, und geben Sie Ihren Inhalt //// tab | Python 3.9+ ```Python hl_lines="4 25" -{!> ../../../docs_src/additional_status_codes/tutorial001_an_py39.py!} +{!> ../../docs_src/additional_status_codes/tutorial001_an_py39.py!} ``` //// @@ -33,7 +33,7 @@ Um dies zu erreichen, importieren Sie `JSONResponse`, und geben Sie Ihren Inhalt //// tab | Python 3.8+ ```Python hl_lines="4 26" -{!> ../../../docs_src/additional_status_codes/tutorial001_an.py!} +{!> ../../docs_src/additional_status_codes/tutorial001_an.py!} ``` //// @@ -47,7 +47,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="2 23" -{!> ../../../docs_src/additional_status_codes/tutorial001_py310.py!} +{!> ../../docs_src/additional_status_codes/tutorial001_py310.py!} ``` //// @@ -61,7 +61,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="4 25" -{!> ../../../docs_src/additional_status_codes/tutorial001.py!} +{!> ../../docs_src/additional_status_codes/tutorial001.py!} ``` //// diff --git a/docs/de/docs/advanced/advanced-dependencies.md b/docs/de/docs/advanced/advanced-dependencies.md index f29970872..54351714e 100644 --- a/docs/de/docs/advanced/advanced-dependencies.md +++ b/docs/de/docs/advanced/advanced-dependencies.md @@ -21,7 +21,7 @@ Dazu deklarieren wir eine Methode `__call__`: //// tab | Python 3.9+ ```Python hl_lines="12" -{!> ../../../docs_src/dependencies/tutorial011_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial011_an_py39.py!} ``` //// @@ -29,7 +29,7 @@ Dazu deklarieren wir eine Methode `__call__`: //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/dependencies/tutorial011_an.py!} +{!> ../../docs_src/dependencies/tutorial011_an.py!} ``` //// @@ -43,7 +43,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="10" -{!> ../../../docs_src/dependencies/tutorial011.py!} +{!> ../../docs_src/dependencies/tutorial011.py!} ``` //// @@ -57,7 +57,7 @@ Und jetzt können wir `__init__` verwenden, um die Parameter der Instanz zu dekl //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/dependencies/tutorial011_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial011_an_py39.py!} ``` //// @@ -65,7 +65,7 @@ Und jetzt können wir `__init__` verwenden, um die Parameter der Instanz zu dekl //// tab | Python 3.8+ ```Python hl_lines="8" -{!> ../../../docs_src/dependencies/tutorial011_an.py!} +{!> ../../docs_src/dependencies/tutorial011_an.py!} ``` //// @@ -79,7 +79,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="7" -{!> ../../../docs_src/dependencies/tutorial011.py!} +{!> ../../docs_src/dependencies/tutorial011.py!} ``` //// @@ -93,7 +93,7 @@ Wir könnten eine Instanz dieser Klasse erstellen mit: //// tab | Python 3.9+ ```Python hl_lines="18" -{!> ../../../docs_src/dependencies/tutorial011_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial011_an_py39.py!} ``` //// @@ -101,7 +101,7 @@ Wir könnten eine Instanz dieser Klasse erstellen mit: //// tab | Python 3.8+ ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial011_an.py!} +{!> ../../docs_src/dependencies/tutorial011_an.py!} ``` //// @@ -115,7 +115,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="16" -{!> ../../../docs_src/dependencies/tutorial011.py!} +{!> ../../docs_src/dependencies/tutorial011.py!} ``` //// @@ -137,7 +137,7 @@ checker(q="somequery") //// tab | Python 3.9+ ```Python hl_lines="22" -{!> ../../../docs_src/dependencies/tutorial011_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial011_an_py39.py!} ``` //// @@ -145,7 +145,7 @@ checker(q="somequery") //// tab | Python 3.8+ ```Python hl_lines="21" -{!> ../../../docs_src/dependencies/tutorial011_an.py!} +{!> ../../docs_src/dependencies/tutorial011_an.py!} ``` //// @@ -159,7 +159,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="20" -{!> ../../../docs_src/dependencies/tutorial011.py!} +{!> ../../docs_src/dependencies/tutorial011.py!} ``` //// diff --git a/docs/de/docs/advanced/async-tests.md b/docs/de/docs/advanced/async-tests.md index e56841faa..93ff84b8a 100644 --- a/docs/de/docs/advanced/async-tests.md +++ b/docs/de/docs/advanced/async-tests.md @@ -33,13 +33,13 @@ Betrachten wir als einfaches Beispiel eine Dateistruktur Ă€hnlich der in [GrĂ¶ĂŸ Die Datei `main.py` hĂ€tte als Inhalt: ```Python -{!../../../docs_src/async_tests/main.py!} +{!../../docs_src/async_tests/main.py!} ``` Die Datei `test_main.py` hĂ€tte die Tests fĂŒr `main.py`, das könnte jetzt so aussehen: ```Python -{!../../../docs_src/async_tests/test_main.py!} +{!../../docs_src/async_tests/test_main.py!} ``` ## Es ausfĂŒhren @@ -61,7 +61,7 @@ $ pytest Der Marker `@pytest.mark.anyio` teilt pytest mit, dass diese Testfunktion asynchron aufgerufen werden soll: ```Python hl_lines="7" -{!../../../docs_src/async_tests/test_main.py!} +{!../../docs_src/async_tests/test_main.py!} ``` /// tip | "Tipp" @@ -73,7 +73,7 @@ Beachten Sie, dass die Testfunktion jetzt `async def` ist und nicht nur `def` wi Dann können wir einen `AsyncClient` mit der App erstellen und mit `await` asynchrone Requests an ihn senden. ```Python hl_lines="9-12" -{!../../../docs_src/async_tests/test_main.py!} +{!../../docs_src/async_tests/test_main.py!} ``` Das ist das Äquivalent zu: diff --git a/docs/de/docs/advanced/behind-a-proxy.md b/docs/de/docs/advanced/behind-a-proxy.md index 18f90ebde..74b25308a 100644 --- a/docs/de/docs/advanced/behind-a-proxy.md +++ b/docs/de/docs/advanced/behind-a-proxy.md @@ -19,7 +19,7 @@ In diesem Fall wĂŒrde der ursprĂŒngliche Pfad `/app` tatsĂ€chlich unter `/api/v1 Auch wenn Ihr gesamter Code unter der Annahme geschrieben ist, dass es nur `/app` gibt. ```Python hl_lines="6" -{!../../../docs_src/behind_a_proxy/tutorial001.py!} +{!../../docs_src/behind_a_proxy/tutorial001.py!} ``` Und der Proxy wĂŒrde das **PfadprĂ€fix** on-the-fly **"entfernen**", bevor er die Anfrage an Uvicorn ĂŒbermittelt, dafĂŒr sorgend, dass Ihre Anwendung davon ĂŒberzeugt ist, dass sie unter `/app` bereitgestellt wird, sodass Sie nicht Ihren gesamten Code dahingehend aktualisieren mĂŒssen, das PrĂ€fix `/api/v1` zu verwenden. @@ -99,7 +99,7 @@ Sie können den aktuellen `root_path` abrufen, der von Ihrer Anwendung fĂŒr jede Hier fĂŒgen wir ihn, nur zu Demonstrationszwecken, in die Nachricht ein. ```Python hl_lines="8" -{!../../../docs_src/behind_a_proxy/tutorial001.py!} +{!../../docs_src/behind_a_proxy/tutorial001.py!} ``` Wenn Sie Uvicorn dann starten mit: @@ -128,7 +128,7 @@ wĂ€re die Response etwa: Falls Sie keine Möglichkeit haben, eine Kommandozeilenoption wie `--root-path` oder Ă€hnlich zu ĂŒbergeben, können Sie als Alternative beim Erstellen Ihrer FastAPI-Anwendung den Parameter `root_path` setzen: ```Python hl_lines="3" -{!../../../docs_src/behind_a_proxy/tutorial002.py!} +{!../../docs_src/behind_a_proxy/tutorial002.py!} ``` Die Übergabe des `root_path` an `FastAPI` wĂ€re das Äquivalent zur Übergabe der `--root-path`-Kommandozeilenoption an Uvicorn oder Hypercorn. @@ -310,7 +310,7 @@ Wenn Sie eine benutzerdefinierte Liste von Servern (`servers`) ĂŒbergeben und es Zum Beispiel: ```Python hl_lines="4-7" -{!../../../docs_src/behind_a_proxy/tutorial003.py!} +{!../../docs_src/behind_a_proxy/tutorial003.py!} ``` Erzeugt ein OpenAPI-Schema, wie: @@ -359,7 +359,7 @@ Die DokumentationsoberflĂ€che interagiert mit dem von Ihnen ausgewĂ€hlten Server Wenn Sie nicht möchten, dass **FastAPI** einen automatischen Server inkludiert, welcher `root_path` verwendet, können Sie den Parameter `root_path_in_servers=False` verwenden: ```Python hl_lines="9" -{!../../../docs_src/behind_a_proxy/tutorial004.py!} +{!../../docs_src/behind_a_proxy/tutorial004.py!} ``` Dann wird er nicht in das OpenAPI-Schema aufgenommen. diff --git a/docs/de/docs/advanced/custom-response.md b/docs/de/docs/advanced/custom-response.md index 20d6a039a..357d2c562 100644 --- a/docs/de/docs/advanced/custom-response.md +++ b/docs/de/docs/advanced/custom-response.md @@ -31,7 +31,7 @@ Das liegt daran, dass FastAPI standardmĂ€ĂŸig jedes enthaltene Element ĂŒberprĂŒ Wenn Sie jedoch sicher sind, dass der von Ihnen zurĂŒckgegebene Inhalt **mit JSON serialisierbar** ist, können Sie ihn direkt an die Response-Klasse ĂŒbergeben und die zusĂ€tzliche Arbeit vermeiden, die FastAPI hĂ€tte, indem es Ihren zurĂŒckgegebenen Inhalt durch den `jsonable_encoder` leitet, bevor es ihn an die Response-Klasse ĂŒbergibt. ```Python hl_lines="2 7" -{!../../../docs_src/custom_response/tutorial001b.py!} +{!../../docs_src/custom_response/tutorial001b.py!} ``` /// info @@ -58,7 +58,7 @@ Um eine Response mit HTML direkt von **FastAPI** zurĂŒckzugeben, verwenden Sie ` * Übergeben Sie `HTMLResponse` als den Parameter `response_class` Ihres *Pfadoperation-Dekorators*. ```Python hl_lines="2 7" -{!../../../docs_src/custom_response/tutorial002.py!} +{!../../docs_src/custom_response/tutorial002.py!} ``` /// info @@ -78,7 +78,7 @@ Wie in [Eine Response direkt zurĂŒckgeben](response-directly.md){.internal-link Das gleiche Beispiel von oben, das eine `HTMLResponse` zurĂŒckgibt, könnte so aussehen: ```Python hl_lines="2 7 19" -{!../../../docs_src/custom_response/tutorial003.py!} +{!../../docs_src/custom_response/tutorial003.py!} ``` /// warning | "Achtung" @@ -104,7 +104,7 @@ Die `response_class` wird dann nur zur Dokumentation der OpenAPI-Pfadoperation* Es könnte zum Beispiel so etwas sein: ```Python hl_lines="7 21 23" -{!../../../docs_src/custom_response/tutorial004.py!} +{!../../docs_src/custom_response/tutorial004.py!} ``` In diesem Beispiel generiert die Funktion `generate_html_response()` bereits eine `Response` und gibt sie zurĂŒck, anstatt das HTML in einem `str` zurĂŒckzugeben. @@ -145,7 +145,7 @@ Sie akzeptiert die folgenden Parameter: FastAPI (eigentlich Starlette) fĂŒgt automatisch einen Content-Length-Header ein. Außerdem wird es einen Content-Type-Header einfĂŒgen, der auf dem media_type basiert, und fĂŒr Texttypen einen Zeichensatz (charset) anfĂŒgen. ```Python hl_lines="1 18" -{!../../../docs_src/response_directly/tutorial002.py!} +{!../../docs_src/response_directly/tutorial002.py!} ``` ### `HTMLResponse` @@ -157,7 +157,7 @@ Nimmt Text oder Bytes entgegen und gibt eine HTML-Response zurĂŒck, wie Sie oben Nimmt Text oder Bytes entgegen und gibt eine Plain-Text-Response zurĂŒck. ```Python hl_lines="2 7 9" -{!../../../docs_src/custom_response/tutorial005.py!} +{!../../docs_src/custom_response/tutorial005.py!} ``` ### `JSONResponse` @@ -181,7 +181,7 @@ Eine alternative JSON-Response mit `dataclasses`: ```Python hl_lines="1 7-12 19-20" -{!../../../docs_src/dataclasses/tutorial001.py!} +{!../../docs_src/dataclasses/tutorial001.py!} ``` Das ist dank **Pydantic** ebenfalls möglich, da es `dataclasses` intern unterstĂŒtzt. @@ -35,7 +35,7 @@ Wenn Sie jedoch eine Menge Datenklassen herumliegen haben, ist dies ein guter Tr Sie können `dataclasses` auch im Parameter `response_model` verwenden: ```Python hl_lines="1 7-13 19" -{!../../../docs_src/dataclasses/tutorial002.py!} +{!../../docs_src/dataclasses/tutorial002.py!} ``` Die Datenklasse wird automatisch in eine Pydantic-Datenklasse konvertiert. @@ -53,7 +53,7 @@ In einigen FĂ€llen mĂŒssen Sie möglicherweise immer noch Pydantics Version von In diesem Fall können Sie einfach die Standard-`dataclasses` durch `pydantic.dataclasses` ersetzen, was einen direkten Ersatz darstellt: ```{ .python .annotate hl_lines="1 5 8-11 14-17 23-25 28" } -{!../../../docs_src/dataclasses/tutorial003.py!} +{!../../docs_src/dataclasses/tutorial003.py!} ``` 1. Wir importieren `field` weiterhin von Standard-`dataclasses`. diff --git a/docs/de/docs/advanced/events.md b/docs/de/docs/advanced/events.md index e898db49b..b0c4d3922 100644 --- a/docs/de/docs/advanced/events.md +++ b/docs/de/docs/advanced/events.md @@ -31,7 +31,7 @@ Beginnen wir mit einem Beispiel und sehen es uns dann im Detail an. Wir erstellen eine asynchrone Funktion `lifespan()` mit `yield` wie folgt: ```Python hl_lines="16 19" -{!../../../docs_src/events/tutorial003.py!} +{!../../docs_src/events/tutorial003.py!} ``` Hier simulieren wir das langsame *Hochfahren*, das Laden des Modells, indem wir die (Fake-)Modellfunktion vor dem `yield` in das Dictionary mit Modellen fĂŒr maschinelles Lernen einfĂŒgen. Dieser Code wird ausgefĂŒhrt, **bevor** die Anwendung **beginnt, Requests entgegenzunehmen**, wĂ€hrend des *Hochfahrens*. @@ -51,7 +51,7 @@ Möglicherweise mĂŒssen Sie eine neue Version starten, oder Sie haben es einfach Das Erste, was auffĂ€llt, ist, dass wir eine asynchrone Funktion mit `yield` definieren. Das ist sehr Ă€hnlich zu AbhĂ€ngigkeiten mit `yield`. ```Python hl_lines="14-19" -{!../../../docs_src/events/tutorial003.py!} +{!../../docs_src/events/tutorial003.py!} ``` Der erste Teil der Funktion, vor dem `yield`, wird ausgefĂŒhrt **bevor** die Anwendung startet. @@ -65,7 +65,7 @@ Wie Sie sehen, ist die Funktion mit einem `@asynccontextmanager` versehen. Dadurch wird die Funktion in einen sogenannten „**asynchronen Kontextmanager**“ umgewandelt. ```Python hl_lines="1 13" -{!../../../docs_src/events/tutorial003.py!} +{!../../docs_src/events/tutorial003.py!} ``` Ein **Kontextmanager** in Python ist etwas, das Sie in einer `with`-Anweisung verwenden können, zum Beispiel kann `open()` als Kontextmanager verwendet werden: @@ -89,7 +89,7 @@ In unserem obigen Codebeispiel verwenden wir ihn nicht direkt, sondern ĂŒbergebe Der Parameter `lifespan` der `FastAPI`-App benötigt einen **asynchronen Kontextmanager**, wir können ihm also unseren neuen asynchronen Kontextmanager `lifespan` ĂŒbergeben. ```Python hl_lines="22" -{!../../../docs_src/events/tutorial003.py!} +{!../../docs_src/events/tutorial003.py!} ``` ## Alternative Events (deprecated) @@ -113,7 +113,7 @@ Diese Funktionen können mit `async def` oder normalem `def` deklariert werden. Um eine Funktion hinzuzufĂŒgen, die vor dem Start der Anwendung ausgefĂŒhrt werden soll, deklarieren Sie diese mit dem Event `startup`: ```Python hl_lines="8" -{!../../../docs_src/events/tutorial001.py!} +{!../../docs_src/events/tutorial001.py!} ``` In diesem Fall initialisiert die Eventhandler-Funktion `startup` die „Datenbank“ der Items (nur ein `dict`) mit einigen Werten. @@ -127,7 +127,7 @@ Und Ihre Anwendung empfĂ€ngt erst dann Anfragen, wenn alle `startup`-Eventhandle Um eine Funktion hinzuzufĂŒgen, die beim Herunterfahren der Anwendung ausgefĂŒhrt werden soll, deklarieren Sie sie mit dem Event `shutdown`: ```Python hl_lines="6" -{!../../../docs_src/events/tutorial002.py!} +{!../../docs_src/events/tutorial002.py!} ``` Hier schreibt die `shutdown`-Eventhandler-Funktion eine Textzeile `"Application shutdown"` in eine Datei `log.txt`. diff --git a/docs/de/docs/advanced/generate-clients.md b/docs/de/docs/advanced/generate-clients.md index b8d66fdd7..80c44b3f9 100644 --- a/docs/de/docs/advanced/generate-clients.md +++ b/docs/de/docs/advanced/generate-clients.md @@ -31,7 +31,7 @@ Beginnen wir mit einer einfachen FastAPI-Anwendung: //// tab | Python 3.9+ ```Python hl_lines="7-9 12-13 16-17 21" -{!> ../../../docs_src/generate_clients/tutorial001_py39.py!} +{!> ../../docs_src/generate_clients/tutorial001_py39.py!} ``` //// @@ -39,7 +39,7 @@ Beginnen wir mit einer einfachen FastAPI-Anwendung: //// tab | Python 3.8+ ```Python hl_lines="9-11 14-15 18 19 23" -{!> ../../../docs_src/generate_clients/tutorial001.py!} +{!> ../../docs_src/generate_clients/tutorial001.py!} ``` //// @@ -150,7 +150,7 @@ Beispielsweise könnten Sie einen Abschnitt fĂŒr **Items (Artikel)** und einen w //// tab | Python 3.9+ ```Python hl_lines="21 26 34" -{!> ../../../docs_src/generate_clients/tutorial002_py39.py!} +{!> ../../docs_src/generate_clients/tutorial002_py39.py!} ``` //// @@ -158,7 +158,7 @@ Beispielsweise könnten Sie einen Abschnitt fĂŒr **Items (Artikel)** und einen w //// tab | Python 3.8+ ```Python hl_lines="23 28 36" -{!> ../../../docs_src/generate_clients/tutorial002.py!} +{!> ../../docs_src/generate_clients/tutorial002.py!} ``` //// @@ -211,7 +211,7 @@ Anschließend können Sie diese benutzerdefinierte Funktion als Parameter `gener //// tab | Python 3.9+ ```Python hl_lines="6-7 10" -{!> ../../../docs_src/generate_clients/tutorial003_py39.py!} +{!> ../../docs_src/generate_clients/tutorial003_py39.py!} ``` //// @@ -219,7 +219,7 @@ Anschließend können Sie diese benutzerdefinierte Funktion als Parameter `gener //// tab | Python 3.8+ ```Python hl_lines="8-9 12" -{!> ../../../docs_src/generate_clients/tutorial003.py!} +{!> ../../docs_src/generate_clients/tutorial003.py!} ``` //// @@ -247,7 +247,7 @@ Wir könnten das OpenAPI-JSON in eine Datei `openapi.json` herunterladen und dan //// tab | Python ```Python -{!> ../../../docs_src/generate_clients/tutorial004.py!} +{!> ../../docs_src/generate_clients/tutorial004.py!} ``` //// @@ -255,7 +255,7 @@ Wir könnten das OpenAPI-JSON in eine Datei `openapi.json` herunterladen und dan //// tab | Node.js ```Javascript -{!> ../../../docs_src/generate_clients/tutorial004.js!} +{!> ../../docs_src/generate_clients/tutorial004.js!} ``` //// diff --git a/docs/de/docs/advanced/middleware.md b/docs/de/docs/advanced/middleware.md index 8912225fb..b4001efda 100644 --- a/docs/de/docs/advanced/middleware.md +++ b/docs/de/docs/advanced/middleware.md @@ -58,7 +58,7 @@ Erzwingt, dass alle eingehenden Requests entweder `https` oder `wss` sein mĂŒsse Alle eingehenden Requests an `http` oder `ws` werden stattdessen an das sichere Schema umgeleitet. ```Python hl_lines="2 6" -{!../../../docs_src/advanced_middleware/tutorial001.py!} +{!../../docs_src/advanced_middleware/tutorial001.py!} ``` ## `TrustedHostMiddleware` @@ -66,7 +66,7 @@ Alle eingehenden Requests an `http` oder `ws` werden stattdessen an das sichere Erzwingt, dass alle eingehenden Requests einen korrekt gesetzten `Host`-Header haben, um sich vor HTTP-Host-Header-Angriffen zu schĂŒtzen. ```Python hl_lines="2 6-8" -{!../../../docs_src/advanced_middleware/tutorial002.py!} +{!../../docs_src/advanced_middleware/tutorial002.py!} ``` Die folgenden Argumente werden unterstĂŒtzt: @@ -82,7 +82,7 @@ Verarbeitet GZip-Responses fĂŒr alle Requests, die `"gzip"` im `Accept-Encoding` Diese Middleware verarbeitet sowohl Standard- als auch Streaming-Responses. ```Python hl_lines="2 6" -{!../../../docs_src/advanced_middleware/tutorial003.py!} +{!../../docs_src/advanced_middleware/tutorial003.py!} ``` Die folgenden Argumente werden unterstĂŒtzt: diff --git a/docs/de/docs/advanced/openapi-callbacks.md b/docs/de/docs/advanced/openapi-callbacks.md index d7b5bc885..f407d5450 100644 --- a/docs/de/docs/advanced/openapi-callbacks.md +++ b/docs/de/docs/advanced/openapi-callbacks.md @@ -32,7 +32,7 @@ Sie verfĂŒgt ĂŒber eine *Pfadoperation*, die einen `Invoice`-Body empfĂ€ngt, und Dieser Teil ist ziemlich normal, der grĂ¶ĂŸte Teil des Codes ist Ihnen wahrscheinlich bereits bekannt: ```Python hl_lines="9-13 36-53" -{!../../../docs_src/openapi_callbacks/tutorial001.py!} +{!../../docs_src/openapi_callbacks/tutorial001.py!} ``` /// tip | "Tipp" @@ -93,7 +93,7 @@ Wenn Sie diese Sichtweise (des *externen Entwicklers*) vorĂŒbergehend ĂŒbernehme Erstellen Sie zunĂ€chst einen neuen `APIRouter`, der einen oder mehrere Callbacks enthĂ€lt. ```Python hl_lines="3 25" -{!../../../docs_src/openapi_callbacks/tutorial001.py!} +{!../../docs_src/openapi_callbacks/tutorial001.py!} ``` ### Die Callback-*Pfadoperation* erstellen @@ -106,7 +106,7 @@ Sie sollte wie eine normale FastAPI-*Pfadoperation* aussehen: * Und sie könnte auch eine Deklaration der Response enthalten, die zurĂŒckgegeben werden soll, z. B. `response_model=InvoiceEventReceived`. ```Python hl_lines="16-18 21-22 28-32" -{!../../../docs_src/openapi_callbacks/tutorial001.py!} +{!../../docs_src/openapi_callbacks/tutorial001.py!} ``` Es gibt zwei Hauptunterschiede zu einer normalen *Pfadoperation*: @@ -176,7 +176,7 @@ An diesem Punkt haben Sie die benötigte(n) *Callback-Pfadoperation(en)* (diejen Verwenden Sie nun den Parameter `callbacks` im *Pfadoperation-Dekorator Ihrer API*, um das Attribut `.routes` (das ist eigentlich nur eine `list`e von Routen/*Pfadoperationen*) dieses Callback-Routers zu ĂŒbergeben: ```Python hl_lines="35" -{!../../../docs_src/openapi_callbacks/tutorial001.py!} +{!../../docs_src/openapi_callbacks/tutorial001.py!} ``` /// tip | "Tipp" diff --git a/docs/de/docs/advanced/openapi-webhooks.md b/docs/de/docs/advanced/openapi-webhooks.md index fb0daa908..9f1bb6959 100644 --- a/docs/de/docs/advanced/openapi-webhooks.md +++ b/docs/de/docs/advanced/openapi-webhooks.md @@ -33,7 +33,7 @@ Webhooks sind in OpenAPI 3.1.0 und höher verfĂŒgbar und werden von FastAPI `0.9 Wenn Sie eine **FastAPI**-Anwendung erstellen, gibt es ein `webhooks`-Attribut, mit dem Sie *Webhooks* definieren können, genauso wie Sie *Pfadoperationen* definieren wĂŒrden, zum Beispiel mit `@app.webhooks.post()`. ```Python hl_lines="9-13 36-53" -{!../../../docs_src/openapi_webhooks/tutorial001.py!} +{!../../docs_src/openapi_webhooks/tutorial001.py!} ``` Die von Ihnen definierten Webhooks landen im **OpenAPI**-Schema und der automatischen **Dokumentations-OberflĂ€che**. diff --git a/docs/de/docs/advanced/path-operation-advanced-configuration.md b/docs/de/docs/advanced/path-operation-advanced-configuration.md index c9cb82fe3..2d8b88be5 100644 --- a/docs/de/docs/advanced/path-operation-advanced-configuration.md +++ b/docs/de/docs/advanced/path-operation-advanced-configuration.md @@ -13,7 +13,7 @@ Mit dem Parameter `operation_id` können Sie die OpenAPI `operationId` festlegen Sie mĂŒssten sicherstellen, dass sie fĂŒr jede Operation eindeutig ist. ```Python hl_lines="6" -{!../../../docs_src/path_operation_advanced_configuration/tutorial001.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial001.py!} ``` ### Verwendung des Namens der *Pfadoperation-Funktion* als operationId @@ -23,7 +23,7 @@ Wenn Sie die Funktionsnamen Ihrer API als `operationId`s verwenden möchten, kö Sie sollten dies tun, nachdem Sie alle Ihre *Pfadoperationen* hinzugefĂŒgt haben. ```Python hl_lines="2 12-21 24" -{!../../../docs_src/path_operation_advanced_configuration/tutorial002.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial002.py!} ``` /// tip | "Tipp" @@ -45,7 +45,7 @@ Auch wenn diese sich in unterschiedlichen Modulen (Python-Dateien) befinden. Um eine *Pfadoperation* aus dem generierten OpenAPI-Schema (und damit aus den automatischen Dokumentationssystemen) auszuschließen, verwenden Sie den Parameter `include_in_schema` und setzen Sie ihn auf `False`: ```Python hl_lines="6" -{!../../../docs_src/path_operation_advanced_configuration/tutorial003.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial003.py!} ``` ## Fortgeschrittene Beschreibung mittels Docstring @@ -57,7 +57,7 @@ Das HinzufĂŒgen eines `\f` (ein maskiertes „Form Feed“-Zeichen) fĂŒhrt dazu, Sie wird nicht in der Dokumentation angezeigt, aber andere Tools (z. B. Sphinx) können den Rest verwenden. ```Python hl_lines="19-29" -{!../../../docs_src/path_operation_advanced_configuration/tutorial004.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial004.py!} ``` ## ZusĂ€tzliche Responses @@ -101,7 +101,7 @@ Sie können das OpenAPI-Schema fĂŒr eine *Pfadoperation* erweitern, indem Sie de Dieses `openapi_extra` kann beispielsweise hilfreich sein, um OpenAPI-Erweiterungen zu deklarieren: ```Python hl_lines="6" -{!../../../docs_src/path_operation_advanced_configuration/tutorial005.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial005.py!} ``` Wenn Sie die automatische API-Dokumentation öffnen, wird Ihre Erweiterung am Ende der spezifischen *Pfadoperation* angezeigt. @@ -150,7 +150,7 @@ Sie könnten sich beispielsweise dafĂŒr entscheiden, den Request mit Ihrem eigen Das könnte man mit `openapi_extra` machen: ```Python hl_lines="20-37 39-40" -{!../../../docs_src/path_operation_advanced_configuration/tutorial006.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial006.py!} ``` In diesem Beispiel haben wir kein Pydantic-Modell deklariert. TatsĂ€chlich wird der Requestbody nicht einmal als JSON geparst, sondern direkt als `bytes` gelesen und die Funktion `magic_data_reader ()` wĂ€re dafĂŒr verantwortlich, ihn in irgendeiner Weise zu parsen. @@ -168,7 +168,7 @@ In der folgenden Anwendung verwenden wir beispielsweise weder die integrierte Fu //// tab | Pydantic v2 ```Python hl_lines="17-22 24" -{!> ../../../docs_src/path_operation_advanced_configuration/tutorial007.py!} +{!> ../../docs_src/path_operation_advanced_configuration/tutorial007.py!} ``` //// @@ -176,7 +176,7 @@ In der folgenden Anwendung verwenden wir beispielsweise weder die integrierte Fu //// tab | Pydantic v1 ```Python hl_lines="17-22 24" -{!> ../../../docs_src/path_operation_advanced_configuration/tutorial007_pv1.py!} +{!> ../../docs_src/path_operation_advanced_configuration/tutorial007_pv1.py!} ``` //// @@ -196,7 +196,7 @@ Und dann parsen wir in unserem Code diesen YAML-Inhalt direkt und verwenden dann //// tab | Pydantic v2 ```Python hl_lines="26-33" -{!> ../../../docs_src/path_operation_advanced_configuration/tutorial007.py!} +{!> ../../docs_src/path_operation_advanced_configuration/tutorial007.py!} ``` //// @@ -204,7 +204,7 @@ Und dann parsen wir in unserem Code diesen YAML-Inhalt direkt und verwenden dann //// tab | Pydantic v1 ```Python hl_lines="26-33" -{!> ../../../docs_src/path_operation_advanced_configuration/tutorial007_pv1.py!} +{!> ../../docs_src/path_operation_advanced_configuration/tutorial007_pv1.py!} ``` //// diff --git a/docs/de/docs/advanced/response-change-status-code.md b/docs/de/docs/advanced/response-change-status-code.md index bba908a3e..202df0d87 100644 --- a/docs/de/docs/advanced/response-change-status-code.md +++ b/docs/de/docs/advanced/response-change-status-code.md @@ -21,7 +21,7 @@ Sie können einen Parameter vom Typ `Response` in Ihrer *Pfadoperation-Funktion* Anschließend können Sie den `status_code` in diesem *vorĂŒbergehenden* Response-Objekt festlegen. ```Python hl_lines="1 9 12" -{!../../../docs_src/response_change_status_code/tutorial001.py!} +{!../../docs_src/response_change_status_code/tutorial001.py!} ``` Und dann können Sie wie gewohnt jedes benötigte Objekt zurĂŒckgeben (ein `dict`, ein Datenbankmodell usw.). diff --git a/docs/de/docs/advanced/response-cookies.md b/docs/de/docs/advanced/response-cookies.md index 3d2043565..ba100870d 100644 --- a/docs/de/docs/advanced/response-cookies.md +++ b/docs/de/docs/advanced/response-cookies.md @@ -7,7 +7,7 @@ Sie können einen Parameter vom Typ `Response` in Ihrer *Pfadoperation-Funktion* Und dann können Sie Cookies in diesem *vorĂŒbergehenden* Response-Objekt setzen. ```Python hl_lines="1 8-9" -{!../../../docs_src/response_cookies/tutorial002.py!} +{!../../docs_src/response_cookies/tutorial002.py!} ``` Anschließend können Sie wie gewohnt jedes gewĂŒnschte Objekt zurĂŒckgeben (ein `dict`, ein Datenbankmodell, usw.). @@ -27,7 +27,7 @@ Dazu können Sie eine Response erstellen, wie unter [Eine Response direkt zurĂŒc Setzen Sie dann Cookies darin und geben Sie sie dann zurĂŒck: ```Python hl_lines="10-12" -{!../../../docs_src/response_cookies/tutorial001.py!} +{!../../docs_src/response_cookies/tutorial001.py!} ``` /// tip | "Tipp" diff --git a/docs/de/docs/advanced/response-directly.md b/docs/de/docs/advanced/response-directly.md index 377490b56..70c045f57 100644 --- a/docs/de/docs/advanced/response-directly.md +++ b/docs/de/docs/advanced/response-directly.md @@ -35,7 +35,7 @@ Sie können beispielsweise kein Pydantic-Modell in eine `JSONResponse` einfĂŒgen In diesen FĂ€llen können Sie den `jsonable_encoder` verwenden, um Ihre Daten zu konvertieren, bevor Sie sie an eine Response ĂŒbergeben: ```Python hl_lines="6-7 21-22" -{!../../../docs_src/response_directly/tutorial001.py!} +{!../../docs_src/response_directly/tutorial001.py!} ``` /// note | "Technische Details" @@ -57,7 +57,7 @@ Nehmen wir an, Sie möchten eine ../../../docs_src/security/tutorial006_an_py39.py!} +{!> ../../docs_src/security/tutorial006_an_py39.py!} ``` //// @@ -31,7 +31,7 @@ Wenn Sie dann den Benutzernamen und das Passwort eingeben, sendet der Browser di //// tab | Python 3.8+ ```Python hl_lines="2 7 11" -{!> ../../../docs_src/security/tutorial006_an.py!} +{!> ../../docs_src/security/tutorial006_an.py!} ``` //// @@ -45,7 +45,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="2 6 10" -{!> ../../../docs_src/security/tutorial006.py!} +{!> ../../docs_src/security/tutorial006.py!} ``` //// @@ -71,7 +71,7 @@ Dann können wir `secrets.compare_digest()` verwenden, um sicherzustellen, dass //// tab | Python 3.9+ ```Python hl_lines="1 12-24" -{!> ../../../docs_src/security/tutorial007_an_py39.py!} +{!> ../../docs_src/security/tutorial007_an_py39.py!} ``` //// @@ -79,7 +79,7 @@ Dann können wir `secrets.compare_digest()` verwenden, um sicherzustellen, dass //// tab | Python 3.8+ ```Python hl_lines="1 12-24" -{!> ../../../docs_src/security/tutorial007_an.py!} +{!> ../../docs_src/security/tutorial007_an.py!} ``` //// @@ -93,7 +93,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="1 11-21" -{!> ../../../docs_src/security/tutorial007.py!} +{!> ../../docs_src/security/tutorial007.py!} ``` //// @@ -163,7 +163,7 @@ Nachdem Sie festgestellt haben, dass die Anmeldeinformationen falsch sind, geben //// tab | Python 3.9+ ```Python hl_lines="26-30" -{!> ../../../docs_src/security/tutorial007_an_py39.py!} +{!> ../../docs_src/security/tutorial007_an_py39.py!} ``` //// @@ -171,7 +171,7 @@ Nachdem Sie festgestellt haben, dass die Anmeldeinformationen falsch sind, geben //// tab | Python 3.8+ ```Python hl_lines="26-30" -{!> ../../../docs_src/security/tutorial007_an.py!} +{!> ../../docs_src/security/tutorial007_an.py!} ``` //// @@ -185,7 +185,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="23-27" -{!> ../../../docs_src/security/tutorial007.py!} +{!> ../../docs_src/security/tutorial007.py!} ``` //// diff --git a/docs/de/docs/advanced/security/oauth2-scopes.md b/docs/de/docs/advanced/security/oauth2-scopes.md index f02707698..c0af2560a 100644 --- a/docs/de/docs/advanced/security/oauth2-scopes.md +++ b/docs/de/docs/advanced/security/oauth2-scopes.md @@ -65,7 +65,7 @@ Sehen wir uns zunĂ€chst kurz die Teile an, die sich gegenĂŒber den Beispielen im //// tab | Python 3.10+ ```Python hl_lines="4 8 12 46 64 105 107-115 121-124 128-134 139 155" -{!> ../../../docs_src/security/tutorial005_an_py310.py!} +{!> ../../docs_src/security/tutorial005_an_py310.py!} ``` //// @@ -73,7 +73,7 @@ Sehen wir uns zunĂ€chst kurz die Teile an, die sich gegenĂŒber den Beispielen im //// tab | Python 3.9+ ```Python hl_lines="2 4 8 12 46 64 105 107-115 121-124 128-134 139 155" -{!> ../../../docs_src/security/tutorial005_an_py39.py!} +{!> ../../docs_src/security/tutorial005_an_py39.py!} ``` //// @@ -81,7 +81,7 @@ Sehen wir uns zunĂ€chst kurz die Teile an, die sich gegenĂŒber den Beispielen im //// tab | Python 3.8+ ```Python hl_lines="2 4 8 12 47 65 106 108-116 122-125 129-135 140 156" -{!> ../../../docs_src/security/tutorial005_an.py!} +{!> ../../docs_src/security/tutorial005_an.py!} ``` //// @@ -95,7 +95,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="3 7 11 45 63 104 106-114 120-123 127-133 138 154" -{!> ../../../docs_src/security/tutorial005_py310.py!} +{!> ../../docs_src/security/tutorial005_py310.py!} ``` //// @@ -109,7 +109,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="2 4 8 12 46 64 105 107-115 121-124 128-134 139 155" -{!> ../../../docs_src/security/tutorial005_py39.py!} +{!> ../../docs_src/security/tutorial005_py39.py!} ``` //// @@ -123,7 +123,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="2 4 8 12 46 64 105 107-115 121-124 128-134 139 155" -{!> ../../../docs_src/security/tutorial005.py!} +{!> ../../docs_src/security/tutorial005.py!} ``` //// @@ -139,7 +139,7 @@ Der `scopes`-Parameter erhĂ€lt ein `dict` mit jedem Scope als SchlĂŒssel und des //// tab | Python 3.10+ ```Python hl_lines="62-65" -{!> ../../../docs_src/security/tutorial005_an_py310.py!} +{!> ../../docs_src/security/tutorial005_an_py310.py!} ``` //// @@ -147,7 +147,7 @@ Der `scopes`-Parameter erhĂ€lt ein `dict` mit jedem Scope als SchlĂŒssel und des //// tab | Python 3.9+ ```Python hl_lines="62-65" -{!> ../../../docs_src/security/tutorial005_an_py39.py!} +{!> ../../docs_src/security/tutorial005_an_py39.py!} ``` //// @@ -155,7 +155,7 @@ Der `scopes`-Parameter erhĂ€lt ein `dict` mit jedem Scope als SchlĂŒssel und des //// tab | Python 3.8+ ```Python hl_lines="63-66" -{!> ../../../docs_src/security/tutorial005_an.py!} +{!> ../../docs_src/security/tutorial005_an.py!} ``` //// @@ -169,7 +169,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="61-64" -{!> ../../../docs_src/security/tutorial005_py310.py!} +{!> ../../docs_src/security/tutorial005_py310.py!} ``` //// @@ -183,7 +183,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="62-65" -{!> ../../../docs_src/security/tutorial005_py39.py!} +{!> ../../docs_src/security/tutorial005_py39.py!} ``` //// @@ -197,7 +197,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="62-65" -{!> ../../../docs_src/security/tutorial005.py!} +{!> ../../docs_src/security/tutorial005.py!} ``` //// @@ -229,7 +229,7 @@ Aus SicherheitsgrĂŒnden sollten Sie jedoch sicherstellen, dass Sie in Ihrer Anwe //// tab | Python 3.10+ ```Python hl_lines="155" -{!> ../../../docs_src/security/tutorial005_an_py310.py!} +{!> ../../docs_src/security/tutorial005_an_py310.py!} ``` //// @@ -237,7 +237,7 @@ Aus SicherheitsgrĂŒnden sollten Sie jedoch sicherstellen, dass Sie in Ihrer Anwe //// tab | Python 3.9+ ```Python hl_lines="155" -{!> ../../../docs_src/security/tutorial005_an_py39.py!} +{!> ../../docs_src/security/tutorial005_an_py39.py!} ``` //// @@ -245,7 +245,7 @@ Aus SicherheitsgrĂŒnden sollten Sie jedoch sicherstellen, dass Sie in Ihrer Anwe //// tab | Python 3.8+ ```Python hl_lines="156" -{!> ../../../docs_src/security/tutorial005_an.py!} +{!> ../../docs_src/security/tutorial005_an.py!} ``` //// @@ -259,7 +259,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="154" -{!> ../../../docs_src/security/tutorial005_py310.py!} +{!> ../../docs_src/security/tutorial005_py310.py!} ``` //// @@ -273,7 +273,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="155" -{!> ../../../docs_src/security/tutorial005_py39.py!} +{!> ../../docs_src/security/tutorial005_py39.py!} ``` //// @@ -287,7 +287,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="155" -{!> ../../../docs_src/security/tutorial005.py!} +{!> ../../docs_src/security/tutorial005.py!} ``` //// @@ -319,7 +319,7 @@ Wir tun dies hier, um zu demonstrieren, wie **FastAPI** auf verschiedenen Ebenen //// tab | Python 3.10+ ```Python hl_lines="4 139 170" -{!> ../../../docs_src/security/tutorial005_an_py310.py!} +{!> ../../docs_src/security/tutorial005_an_py310.py!} ``` //// @@ -327,7 +327,7 @@ Wir tun dies hier, um zu demonstrieren, wie **FastAPI** auf verschiedenen Ebenen //// tab | Python 3.9+ ```Python hl_lines="4 139 170" -{!> ../../../docs_src/security/tutorial005_an_py39.py!} +{!> ../../docs_src/security/tutorial005_an_py39.py!} ``` //// @@ -335,7 +335,7 @@ Wir tun dies hier, um zu demonstrieren, wie **FastAPI** auf verschiedenen Ebenen //// tab | Python 3.8+ ```Python hl_lines="4 140 171" -{!> ../../../docs_src/security/tutorial005_an.py!} +{!> ../../docs_src/security/tutorial005_an.py!} ``` //// @@ -349,7 +349,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="3 138 167" -{!> ../../../docs_src/security/tutorial005_py310.py!} +{!> ../../docs_src/security/tutorial005_py310.py!} ``` //// @@ -363,7 +363,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="4 139 168" -{!> ../../../docs_src/security/tutorial005_py39.py!} +{!> ../../docs_src/security/tutorial005_py39.py!} ``` //// @@ -377,7 +377,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="4 139 168" -{!> ../../../docs_src/security/tutorial005.py!} +{!> ../../docs_src/security/tutorial005.py!} ``` //// @@ -409,7 +409,7 @@ Diese `SecurityScopes`-Klasse Ă€hnelt `Request` (`Request` wurde verwendet, um d //// tab | Python 3.10+ ```Python hl_lines="8 105" -{!> ../../../docs_src/security/tutorial005_an_py310.py!} +{!> ../../docs_src/security/tutorial005_an_py310.py!} ``` //// @@ -417,7 +417,7 @@ Diese `SecurityScopes`-Klasse Ă€hnelt `Request` (`Request` wurde verwendet, um d //// tab | Python 3.9+ ```Python hl_lines="8 105" -{!> ../../../docs_src/security/tutorial005_an_py39.py!} +{!> ../../docs_src/security/tutorial005_an_py39.py!} ``` //// @@ -425,7 +425,7 @@ Diese `SecurityScopes`-Klasse Ă€hnelt `Request` (`Request` wurde verwendet, um d //// tab | Python 3.8+ ```Python hl_lines="8 106" -{!> ../../../docs_src/security/tutorial005_an.py!} +{!> ../../docs_src/security/tutorial005_an.py!} ``` //// @@ -439,7 +439,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="7 104" -{!> ../../../docs_src/security/tutorial005_py310.py!} +{!> ../../docs_src/security/tutorial005_py310.py!} ``` //// @@ -453,7 +453,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="8 105" -{!> ../../../docs_src/security/tutorial005_py39.py!} +{!> ../../docs_src/security/tutorial005_py39.py!} ``` //// @@ -467,7 +467,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="8 105" -{!> ../../../docs_src/security/tutorial005.py!} +{!> ../../docs_src/security/tutorial005.py!} ``` //// @@ -487,7 +487,7 @@ In diese Exception fĂŒgen wir (falls vorhanden) die erforderlichen Scopes als du //// tab | Python 3.10+ ```Python hl_lines="105 107-115" -{!> ../../../docs_src/security/tutorial005_an_py310.py!} +{!> ../../docs_src/security/tutorial005_an_py310.py!} ``` //// @@ -495,7 +495,7 @@ In diese Exception fĂŒgen wir (falls vorhanden) die erforderlichen Scopes als du //// tab | Python 3.9+ ```Python hl_lines="105 107-115" -{!> ../../../docs_src/security/tutorial005_an_py39.py!} +{!> ../../docs_src/security/tutorial005_an_py39.py!} ``` //// @@ -503,7 +503,7 @@ In diese Exception fĂŒgen wir (falls vorhanden) die erforderlichen Scopes als du //// tab | Python 3.8+ ```Python hl_lines="106 108-116" -{!> ../../../docs_src/security/tutorial005_an.py!} +{!> ../../docs_src/security/tutorial005_an.py!} ``` //// @@ -517,7 +517,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="104 106-114" -{!> ../../../docs_src/security/tutorial005_py310.py!} +{!> ../../docs_src/security/tutorial005_py310.py!} ``` //// @@ -531,7 +531,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="105 107-115" -{!> ../../../docs_src/security/tutorial005_py39.py!} +{!> ../../docs_src/security/tutorial005_py39.py!} ``` //// @@ -545,7 +545,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="105 107-115" -{!> ../../../docs_src/security/tutorial005.py!} +{!> ../../docs_src/security/tutorial005.py!} ``` //// @@ -567,7 +567,7 @@ Wir verifizieren auch, dass wir einen Benutzer mit diesem Benutzernamen haben, u //// tab | Python 3.10+ ```Python hl_lines="46 116-127" -{!> ../../../docs_src/security/tutorial005_an_py310.py!} +{!> ../../docs_src/security/tutorial005_an_py310.py!} ``` //// @@ -575,7 +575,7 @@ Wir verifizieren auch, dass wir einen Benutzer mit diesem Benutzernamen haben, u //// tab | Python 3.9+ ```Python hl_lines="46 116-127" -{!> ../../../docs_src/security/tutorial005_an_py39.py!} +{!> ../../docs_src/security/tutorial005_an_py39.py!} ``` //// @@ -583,7 +583,7 @@ Wir verifizieren auch, dass wir einen Benutzer mit diesem Benutzernamen haben, u //// tab | Python 3.8+ ```Python hl_lines="47 117-128" -{!> ../../../docs_src/security/tutorial005_an.py!} +{!> ../../docs_src/security/tutorial005_an.py!} ``` //// @@ -597,7 +597,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="45 115-126" -{!> ../../../docs_src/security/tutorial005_py310.py!} +{!> ../../docs_src/security/tutorial005_py310.py!} ``` //// @@ -611,7 +611,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="46 116-127" -{!> ../../../docs_src/security/tutorial005_py39.py!} +{!> ../../docs_src/security/tutorial005_py39.py!} ``` //// @@ -625,7 +625,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="46 116-127" -{!> ../../../docs_src/security/tutorial005.py!} +{!> ../../docs_src/security/tutorial005.py!} ``` //// @@ -639,7 +639,7 @@ Hierzu verwenden wir `security_scopes.scopes`, das eine `list`e mit allen diesen //// tab | Python 3.10+ ```Python hl_lines="128-134" -{!> ../../../docs_src/security/tutorial005_an_py310.py!} +{!> ../../docs_src/security/tutorial005_an_py310.py!} ``` //// @@ -647,7 +647,7 @@ Hierzu verwenden wir `security_scopes.scopes`, das eine `list`e mit allen diesen //// tab | Python 3.9+ ```Python hl_lines="128-134" -{!> ../../../docs_src/security/tutorial005_an_py39.py!} +{!> ../../docs_src/security/tutorial005_an_py39.py!} ``` //// @@ -655,7 +655,7 @@ Hierzu verwenden wir `security_scopes.scopes`, das eine `list`e mit allen diesen //// tab | Python 3.8+ ```Python hl_lines="129-135" -{!> ../../../docs_src/security/tutorial005_an.py!} +{!> ../../docs_src/security/tutorial005_an.py!} ``` //// @@ -669,7 +669,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="127-133" -{!> ../../../docs_src/security/tutorial005_py310.py!} +{!> ../../docs_src/security/tutorial005_py310.py!} ``` //// @@ -683,7 +683,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="128-134" -{!> ../../../docs_src/security/tutorial005_py39.py!} +{!> ../../docs_src/security/tutorial005_py39.py!} ``` //// @@ -697,7 +697,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="128-134" -{!> ../../../docs_src/security/tutorial005.py!} +{!> ../../docs_src/security/tutorial005.py!} ``` //// diff --git a/docs/de/docs/advanced/settings.md b/docs/de/docs/advanced/settings.md index 3cd4c6c7d..8b9ba2f48 100644 --- a/docs/de/docs/advanced/settings.md +++ b/docs/de/docs/advanced/settings.md @@ -181,7 +181,7 @@ Sie können dieselben Validierungs-Funktionen und -Tools verwenden, die Sie fĂŒr //// tab | Pydantic v2 ```Python hl_lines="2 5-8 11" -{!> ../../../docs_src/settings/tutorial001.py!} +{!> ../../docs_src/settings/tutorial001.py!} ``` //// @@ -195,7 +195,7 @@ In Pydantic v1 wĂŒrden Sie `BaseSettings` direkt von `pydantic` statt von `pydan /// ```Python hl_lines="2 5-8 11" -{!> ../../../docs_src/settings/tutorial001_pv1.py!} +{!> ../../docs_src/settings/tutorial001_pv1.py!} ``` //// @@ -215,7 +215,7 @@ Als NĂ€chstes werden die Daten konvertiert und validiert. Wenn Sie also dieses ` Dann können Sie das neue `settings`-Objekt in Ihrer Anwendung verwenden: ```Python hl_lines="18-20" -{!../../../docs_src/settings/tutorial001.py!} +{!../../docs_src/settings/tutorial001.py!} ``` ### Den Server ausfĂŒhren @@ -251,13 +251,13 @@ Sie könnten diese Einstellungen in eine andere Moduldatei einfĂŒgen, wie Sie in Sie könnten beispielsweise eine Datei `config.py` haben mit: ```Python -{!../../../docs_src/settings/app01/config.py!} +{!../../docs_src/settings/app01/config.py!} ``` Und dann verwenden Sie diese in einer Datei `main.py`: ```Python hl_lines="3 11-13" -{!../../../docs_src/settings/app01/main.py!} +{!../../docs_src/settings/app01/main.py!} ``` /// tip | "Tipp" @@ -277,7 +277,7 @@ Dies könnte besonders beim Testen nĂŒtzlich sein, da es sehr einfach ist, eine Ausgehend vom vorherigen Beispiel könnte Ihre Datei `config.py` so aussehen: ```Python hl_lines="10" -{!../../../docs_src/settings/app02/config.py!} +{!../../docs_src/settings/app02/config.py!} ``` Beachten Sie, dass wir jetzt keine Standardinstanz `settings = Settings()` erstellen. @@ -289,7 +289,7 @@ Jetzt erstellen wir eine AbhĂ€ngigkeit, die ein neues `config.Settings()` zurĂŒc //// tab | Python 3.9+ ```Python hl_lines="6 12-13" -{!> ../../../docs_src/settings/app02_an_py39/main.py!} +{!> ../../docs_src/settings/app02_an_py39/main.py!} ``` //// @@ -297,7 +297,7 @@ Jetzt erstellen wir eine AbhĂ€ngigkeit, die ein neues `config.Settings()` zurĂŒc //// tab | Python 3.8+ ```Python hl_lines="6 12-13" -{!> ../../../docs_src/settings/app02_an/main.py!} +{!> ../../docs_src/settings/app02_an/main.py!} ``` //// @@ -311,7 +311,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="5 11-12" -{!> ../../../docs_src/settings/app02/main.py!} +{!> ../../docs_src/settings/app02/main.py!} ``` //// @@ -329,7 +329,7 @@ Und dann können wir das von der *Pfadoperation-Funktion* als AbhĂ€ngigkeit einf //// tab | Python 3.9+ ```Python hl_lines="17 19-21" -{!> ../../../docs_src/settings/app02_an_py39/main.py!} +{!> ../../docs_src/settings/app02_an_py39/main.py!} ``` //// @@ -337,7 +337,7 @@ Und dann können wir das von der *Pfadoperation-Funktion* als AbhĂ€ngigkeit einf //// tab | Python 3.8+ ```Python hl_lines="17 19-21" -{!> ../../../docs_src/settings/app02_an/main.py!} +{!> ../../docs_src/settings/app02_an/main.py!} ``` //// @@ -351,7 +351,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="16 18-20" -{!> ../../../docs_src/settings/app02/main.py!} +{!> ../../docs_src/settings/app02/main.py!} ``` //// @@ -361,7 +361,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. Dann wĂ€re es sehr einfach, beim Testen ein anderes Einstellungsobjekt bereitzustellen, indem man eine AbhĂ€ngigkeitsĂŒberschreibung fĂŒr `get_settings` erstellt: ```Python hl_lines="9-10 13 21" -{!../../../docs_src/settings/app02/test_main.py!} +{!../../docs_src/settings/app02/test_main.py!} ``` Bei der AbhĂ€ngigkeitsĂŒberschreibung legen wir einen neuen Wert fĂŒr `admin_email` fest, wenn wir das neue `Settings`-Objekt erstellen, und geben dann dieses neue Objekt zurĂŒck. @@ -406,7 +406,7 @@ Und dann aktualisieren Sie Ihre `config.py` mit: //// tab | Pydantic v2 ```Python hl_lines="9" -{!> ../../../docs_src/settings/app03_an/config.py!} +{!> ../../docs_src/settings/app03_an/config.py!} ``` /// tip | "Tipp" @@ -420,7 +420,7 @@ Das Attribut `model_config` wird nur fĂŒr die Pydantic-Konfiguration verwendet. //// tab | Pydantic v1 ```Python hl_lines="9-10" -{!> ../../../docs_src/settings/app03_an/config_pv1.py!} +{!> ../../docs_src/settings/app03_an/config_pv1.py!} ``` /// tip | "Tipp" @@ -465,7 +465,7 @@ Da wir jedoch den `@lru_cache`-Dekorator oben verwenden, wird das `Settings`-Obj //// tab | Python 3.9+ ```Python hl_lines="1 11" -{!> ../../../docs_src/settings/app03_an_py39/main.py!} +{!> ../../docs_src/settings/app03_an_py39/main.py!} ``` //// @@ -473,7 +473,7 @@ Da wir jedoch den `@lru_cache`-Dekorator oben verwenden, wird das `Settings`-Obj //// tab | Python 3.8+ ```Python hl_lines="1 11" -{!> ../../../docs_src/settings/app03_an/main.py!} +{!> ../../docs_src/settings/app03_an/main.py!} ``` //// @@ -487,7 +487,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="1 10" -{!> ../../../docs_src/settings/app03/main.py!} +{!> ../../docs_src/settings/app03/main.py!} ``` //// diff --git a/docs/de/docs/advanced/sub-applications.md b/docs/de/docs/advanced/sub-applications.md index 7dfaaa0cd..172b8d3c1 100644 --- a/docs/de/docs/advanced/sub-applications.md +++ b/docs/de/docs/advanced/sub-applications.md @@ -11,7 +11,7 @@ Wenn Sie zwei unabhĂ€ngige FastAPI-Anwendungen mit deren eigenen unabhĂ€ngigen O Erstellen Sie zunĂ€chst die Hauptanwendung **FastAPI** und deren *Pfadoperationen*: ```Python hl_lines="3 6-8" -{!../../../docs_src/sub_applications/tutorial001.py!} +{!../../docs_src/sub_applications/tutorial001.py!} ``` ### Unteranwendung @@ -21,7 +21,7 @@ Erstellen Sie dann Ihre Unteranwendung und deren *Pfadoperationen*. Diese Unteranwendung ist nur eine weitere Standard-FastAPI-Anwendung, aber diese wird „gemountet“: ```Python hl_lines="11 14-16" -{!../../../docs_src/sub_applications/tutorial001.py!} +{!../../docs_src/sub_applications/tutorial001.py!} ``` ### Die Unteranwendung mounten @@ -31,7 +31,7 @@ Mounten Sie in Ihrer Top-Level-Anwendung `app` die Unteranwendung `subapi`. In diesem Fall wird sie im Pfad `/subapi` gemountet: ```Python hl_lines="11 19" -{!../../../docs_src/sub_applications/tutorial001.py!} +{!../../docs_src/sub_applications/tutorial001.py!} ``` ### Es in der automatischen API-Dokumentation betrachten diff --git a/docs/de/docs/advanced/templates.md b/docs/de/docs/advanced/templates.md index abc7624f1..6cb3fcf6c 100644 --- a/docs/de/docs/advanced/templates.md +++ b/docs/de/docs/advanced/templates.md @@ -28,7 +28,7 @@ $ pip install jinja2 * Verwenden Sie die von Ihnen erstellten `templates`, um eine `TemplateResponse` zu rendern und zurĂŒckzugeben, ĂŒbergeben Sie den Namen des Templates, das Requestobjekt und ein „Kontext“-Dictionary mit SchlĂŒssel-Wert-Paaren, die innerhalb des Jinja2-Templates verwendet werden sollen. ```Python hl_lines="4 11 15-18" -{!../../../docs_src/templates/tutorial001.py!} +{!../../docs_src/templates/tutorial001.py!} ``` /// note | "Hinweis" @@ -58,7 +58,7 @@ Sie können auch `from starlette.templating import Jinja2Templates` verwenden. Dann können Sie unter `templates/item.html` ein Template erstellen, mit z. B. folgendem Inhalt: ```jinja hl_lines="7" -{!../../../docs_src/templates/templates/item.html!} +{!../../docs_src/templates/templates/item.html!} ``` ### Template-Kontextwerte @@ -112,13 +112,13 @@ Mit beispielsweise der ID `42` wĂŒrde dies Folgendes ergeben: Sie können `url_for()` innerhalb des Templates auch beispielsweise mit den `StaticFiles` verwenden, die Sie mit `name="static"` gemountet haben. ```jinja hl_lines="4" -{!../../../docs_src/templates/templates/item.html!} +{!../../docs_src/templates/templates/item.html!} ``` In diesem Beispiel wĂŒrde das zu einer CSS-Datei unter `static/styles.css` verlinken, mit folgendem Inhalt: ```CSS hl_lines="4" -{!../../../docs_src/templates/static/styles.css!} +{!../../docs_src/templates/static/styles.css!} ``` Und da Sie `StaticFiles` verwenden, wird diese CSS-Datei automatisch von Ihrer **FastAPI**-Anwendung unter der URL `/static/styles.css` bereitgestellt. diff --git a/docs/de/docs/advanced/testing-dependencies.md b/docs/de/docs/advanced/testing-dependencies.md index f131d27cd..c565b30f2 100644 --- a/docs/de/docs/advanced/testing-dependencies.md +++ b/docs/de/docs/advanced/testing-dependencies.md @@ -31,7 +31,7 @@ Und dann ruft **FastAPI** diese Überschreibung anstelle der ursprĂŒnglichen Abh //// tab | Python 3.10+ ```Python hl_lines="26-27 30" -{!> ../../../docs_src/dependency_testing/tutorial001_an_py310.py!} +{!> ../../docs_src/dependency_testing/tutorial001_an_py310.py!} ``` //// @@ -39,7 +39,7 @@ Und dann ruft **FastAPI** diese Überschreibung anstelle der ursprĂŒnglichen Abh //// tab | Python 3.9+ ```Python hl_lines="28-29 32" -{!> ../../../docs_src/dependency_testing/tutorial001_an_py39.py!} +{!> ../../docs_src/dependency_testing/tutorial001_an_py39.py!} ``` //// @@ -47,7 +47,7 @@ Und dann ruft **FastAPI** diese Überschreibung anstelle der ursprĂŒnglichen Abh //// tab | Python 3.8+ ```Python hl_lines="29-30 33" -{!> ../../../docs_src/dependency_testing/tutorial001_an.py!} +{!> ../../docs_src/dependency_testing/tutorial001_an.py!} ``` //// @@ -61,7 +61,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="24-25 28" -{!> ../../../docs_src/dependency_testing/tutorial001_py310.py!} +{!> ../../docs_src/dependency_testing/tutorial001_py310.py!} ``` //// @@ -75,7 +75,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="28-29 32" -{!> ../../../docs_src/dependency_testing/tutorial001.py!} +{!> ../../docs_src/dependency_testing/tutorial001.py!} ``` //// diff --git a/docs/de/docs/advanced/testing-events.md b/docs/de/docs/advanced/testing-events.md index f50093548..3e63791c6 100644 --- a/docs/de/docs/advanced/testing-events.md +++ b/docs/de/docs/advanced/testing-events.md @@ -3,5 +3,5 @@ Wenn Sie in Ihren Tests Ihre Event-Handler (`startup` und `shutdown`) ausfĂŒhren wollen, können Sie den `TestClient` mit einer `with`-Anweisung verwenden: ```Python hl_lines="9-12 20-24" -{!../../../docs_src/app_testing/tutorial003.py!} +{!../../docs_src/app_testing/tutorial003.py!} ``` diff --git a/docs/de/docs/advanced/testing-websockets.md b/docs/de/docs/advanced/testing-websockets.md index 4cbc45c17..7ae7d92d6 100644 --- a/docs/de/docs/advanced/testing-websockets.md +++ b/docs/de/docs/advanced/testing-websockets.md @@ -5,7 +5,7 @@ Sie können den schon bekannten `TestClient` zum Testen von WebSockets verwenden Dazu verwenden Sie den `TestClient` in einer `with`-Anweisung, eine Verbindung zum WebSocket herstellend: ```Python hl_lines="27-31" -{!../../../docs_src/app_testing/tutorial002.py!} +{!../../docs_src/app_testing/tutorial002.py!} ``` /// note | "Hinweis" diff --git a/docs/de/docs/advanced/using-request-directly.md b/docs/de/docs/advanced/using-request-directly.md index 1d575a7cb..6a0b96680 100644 --- a/docs/de/docs/advanced/using-request-directly.md +++ b/docs/de/docs/advanced/using-request-directly.md @@ -30,7 +30,7 @@ Angenommen, Sie möchten auf die IP-Adresse/den Host des Clients in Ihrer *Pfado Dazu mĂŒssen Sie direkt auf den Request zugreifen. ```Python hl_lines="1 7-8" -{!../../../docs_src/using_request_directly/tutorial001.py!} +{!../../docs_src/using_request_directly/tutorial001.py!} ``` Durch die Deklaration eines *Pfadoperation-Funktionsparameters*, dessen Typ der `Request` ist, weiß **FastAPI**, dass es den `Request` diesem Parameter ĂŒbergeben soll. diff --git a/docs/de/docs/advanced/websockets.md b/docs/de/docs/advanced/websockets.md index 6d772b6c9..cf13fa23c 100644 --- a/docs/de/docs/advanced/websockets.md +++ b/docs/de/docs/advanced/websockets.md @@ -39,7 +39,7 @@ In der Produktion hĂ€tten Sie eine der oben genannten Optionen. Aber es ist die einfachste Möglichkeit, sich auf die Serverseite von WebSockets zu konzentrieren und ein funktionierendes Beispiel zu haben: ```Python hl_lines="2 6-38 41-43" -{!../../../docs_src/websockets/tutorial001.py!} +{!../../docs_src/websockets/tutorial001.py!} ``` ## Einen `websocket` erstellen @@ -47,7 +47,7 @@ Aber es ist die einfachste Möglichkeit, sich auf die Serverseite von WebSockets Erstellen Sie in Ihrer **FastAPI**-Anwendung einen `websocket`: ```Python hl_lines="1 46-47" -{!../../../docs_src/websockets/tutorial001.py!} +{!../../docs_src/websockets/tutorial001.py!} ``` /// note | "Technische Details" @@ -63,7 +63,7 @@ Sie können auch `from starlette.websockets import WebSocket` verwenden. In Ihrer WebSocket-Route können Sie Nachrichten `await`en und Nachrichten senden. ```Python hl_lines="48-52" -{!../../../docs_src/websockets/tutorial001.py!} +{!../../docs_src/websockets/tutorial001.py!} ``` Sie können BinĂ€r-, Text- und JSON-Daten empfangen und senden. @@ -118,7 +118,7 @@ Diese funktionieren auf die gleiche Weise wie fĂŒr andere FastAPI-Endpunkte/*Pfa //// tab | Python 3.10+ ```Python hl_lines="68-69 82" -{!> ../../../docs_src/websockets/tutorial002_an_py310.py!} +{!> ../../docs_src/websockets/tutorial002_an_py310.py!} ``` //// @@ -126,7 +126,7 @@ Diese funktionieren auf die gleiche Weise wie fĂŒr andere FastAPI-Endpunkte/*Pfa //// tab | Python 3.9+ ```Python hl_lines="68-69 82" -{!> ../../../docs_src/websockets/tutorial002_an_py39.py!} +{!> ../../docs_src/websockets/tutorial002_an_py39.py!} ``` //// @@ -134,7 +134,7 @@ Diese funktionieren auf die gleiche Weise wie fĂŒr andere FastAPI-Endpunkte/*Pfa //// tab | Python 3.8+ ```Python hl_lines="69-70 83" -{!> ../../../docs_src/websockets/tutorial002_an.py!} +{!> ../../docs_src/websockets/tutorial002_an.py!} ``` //// @@ -148,7 +148,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="66-67 79" -{!> ../../../docs_src/websockets/tutorial002_py310.py!} +{!> ../../docs_src/websockets/tutorial002_py310.py!} ``` //// @@ -162,7 +162,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="68-69 81" -{!> ../../../docs_src/websockets/tutorial002.py!} +{!> ../../docs_src/websockets/tutorial002.py!} ``` //// @@ -213,7 +213,7 @@ Wenn eine WebSocket-Verbindung geschlossen wird, löst `await websocket.receive_ //// tab | Python 3.9+ ```Python hl_lines="79-81" -{!> ../../../docs_src/websockets/tutorial003_py39.py!} +{!> ../../docs_src/websockets/tutorial003_py39.py!} ``` //// @@ -221,7 +221,7 @@ Wenn eine WebSocket-Verbindung geschlossen wird, löst `await websocket.receive_ //// tab | Python 3.8+ ```Python hl_lines="81-83" -{!> ../../../docs_src/websockets/tutorial003.py!} +{!> ../../docs_src/websockets/tutorial003.py!} ``` //// diff --git a/docs/de/docs/advanced/wsgi.md b/docs/de/docs/advanced/wsgi.md index 19ff90a90..50abc84d1 100644 --- a/docs/de/docs/advanced/wsgi.md +++ b/docs/de/docs/advanced/wsgi.md @@ -13,7 +13,7 @@ Wrappen Sie dann die WSGI-Anwendung (z. B. Flask) mit der Middleware. Und dann mounten Sie das auf einem Pfad. ```Python hl_lines="2-3 23" -{!../../../docs_src/wsgi/tutorial001.py!} +{!../../docs_src/wsgi/tutorial001.py!} ``` ## Es ansehen diff --git a/docs/de/docs/how-to/conditional-openapi.md b/docs/de/docs/how-to/conditional-openapi.md index 7f277bb88..a0a4983bb 100644 --- a/docs/de/docs/how-to/conditional-openapi.md +++ b/docs/de/docs/how-to/conditional-openapi.md @@ -30,7 +30,7 @@ Sie können problemlos dieselben Pydantic-Einstellungen verwenden, um Ihre gener Zum Beispiel: ```Python hl_lines="6 11" -{!../../../docs_src/conditional_openapi/tutorial001.py!} +{!../../docs_src/conditional_openapi/tutorial001.py!} ``` Hier deklarieren wir die Einstellung `openapi_url` mit dem gleichen Defaultwert `"/openapi.json"`. diff --git a/docs/de/docs/how-to/configure-swagger-ui.md b/docs/de/docs/how-to/configure-swagger-ui.md index 7d62a14d3..31b9cd290 100644 --- a/docs/de/docs/how-to/configure-swagger-ui.md +++ b/docs/de/docs/how-to/configure-swagger-ui.md @@ -19,7 +19,7 @@ Ohne Änderung der Einstellungen ist die Syntaxhervorhebung standardmĂ€ĂŸig akti Sie können sie jedoch deaktivieren, indem Sie `syntaxHighlight` auf `False` setzen: ```Python hl_lines="3" -{!../../../docs_src/configure_swagger_ui/tutorial001.py!} +{!../../docs_src/configure_swagger_ui/tutorial001.py!} ``` ... und dann zeigt die Swagger-OberflĂ€che die Syntaxhervorhebung nicht mehr an: @@ -31,7 +31,7 @@ Sie können sie jedoch deaktivieren, indem Sie `syntaxHighlight` auf `False` set Auf die gleiche Weise könnten Sie das Theme der Syntaxhervorhebung mit dem SchlĂŒssel `syntaxHighlight.theme` festlegen (beachten Sie, dass er einen Punkt in der Mitte hat): ```Python hl_lines="3" -{!../../../docs_src/configure_swagger_ui/tutorial002.py!} +{!../../docs_src/configure_swagger_ui/tutorial002.py!} ``` Obige Konfiguration wĂŒrde das Theme fĂŒr die Farbe der Syntaxhervorhebung Ă€ndern: @@ -45,7 +45,7 @@ FastAPI enthĂ€lt einige Defaultkonfigurationsparameter, die fĂŒr die meisten Anw Es umfasst die folgenden Defaultkonfigurationen: ```Python -{!../../../fastapi/openapi/docs.py[ln:7-23]!} +{!../../fastapi/openapi/docs.py[ln:7-23]!} ``` Sie können jede davon ĂŒberschreiben, indem Sie im Argument `swagger_ui_parameters` einen anderen Wert festlegen. @@ -53,7 +53,7 @@ Sie können jede davon ĂŒberschreiben, indem Sie im Argument `swagger_ui_paramet Um beispielsweise `deepLinking` zu deaktivieren, könnten Sie folgende Einstellungen an `swagger_ui_parameters` ĂŒbergeben: ```Python hl_lines="3" -{!../../../docs_src/configure_swagger_ui/tutorial003.py!} +{!../../docs_src/configure_swagger_ui/tutorial003.py!} ``` ## Andere Parameter der Swagger-OberflĂ€che diff --git a/docs/de/docs/how-to/custom-docs-ui-assets.md b/docs/de/docs/how-to/custom-docs-ui-assets.md index e8750f7c2..e5fd20a10 100644 --- a/docs/de/docs/how-to/custom-docs-ui-assets.md +++ b/docs/de/docs/how-to/custom-docs-ui-assets.md @@ -19,7 +19,7 @@ Der erste Schritt besteht darin, die automatischen Dokumentationen zu deaktivier Um diese zu deaktivieren, setzen Sie deren URLs beim Erstellen Ihrer `FastAPI`-App auf `None`: ```Python hl_lines="8" -{!../../../docs_src/custom_docs_ui/tutorial001.py!} +{!../../docs_src/custom_docs_ui/tutorial001.py!} ``` ### Die benutzerdefinierten Dokumentationen hinzufĂŒgen @@ -37,7 +37,7 @@ Sie können die internen Funktionen von FastAPI wiederverwenden, um die HTML-Sei Und genau so fĂŒr ReDoc ... ```Python hl_lines="2-6 11-19 22-24 27-33" -{!../../../docs_src/custom_docs_ui/tutorial001.py!} +{!../../docs_src/custom_docs_ui/tutorial001.py!} ``` /// tip | "Tipp" @@ -55,7 +55,7 @@ Swagger UI erledigt das hinter den Kulissen fĂŒr Sie, benötigt aber diesen „U Um nun testen zu können, ob alles funktioniert, erstellen Sie eine *Pfadoperation*: ```Python hl_lines="36-38" -{!../../../docs_src/custom_docs_ui/tutorial001.py!} +{!../../docs_src/custom_docs_ui/tutorial001.py!} ``` ### Es ausprobieren @@ -125,7 +125,7 @@ Danach könnte Ihre Dateistruktur wie folgt aussehen: * „Mounten“ Sie eine `StaticFiles()`-Instanz in einem bestimmten Pfad. ```Python hl_lines="7 11" -{!../../../docs_src/custom_docs_ui/tutorial002.py!} +{!../../docs_src/custom_docs_ui/tutorial002.py!} ``` ### Die statischen Dateien testen @@ -159,7 +159,7 @@ Wie bei der Verwendung eines benutzerdefinierten CDN besteht der erste Schritt d Um diese zu deaktivieren, setzen Sie deren URLs beim Erstellen Ihrer `FastAPI`-App auf `None`: ```Python hl_lines="9" -{!../../../docs_src/custom_docs_ui/tutorial002.py!} +{!../../docs_src/custom_docs_ui/tutorial002.py!} ``` ### Die benutzerdefinierten Dokumentationen, mit statischen Dateien, hinzufĂŒgen @@ -177,7 +177,7 @@ Auch hier können Sie die internen Funktionen von FastAPI wiederverwenden, um di Und genau so fĂŒr ReDoc ... ```Python hl_lines="2-6 14-22 25-27 30-36" -{!../../../docs_src/custom_docs_ui/tutorial002.py!} +{!../../docs_src/custom_docs_ui/tutorial002.py!} ``` /// tip | "Tipp" @@ -195,7 +195,7 @@ Swagger UI erledigt das hinter den Kulissen fĂŒr Sie, benötigt aber diesen „U Um nun testen zu können, ob alles funktioniert, erstellen Sie eine *Pfadoperation*: ```Python hl_lines="39-41" -{!../../../docs_src/custom_docs_ui/tutorial002.py!} +{!../../docs_src/custom_docs_ui/tutorial002.py!} ``` ### BenutzeroberflĂ€che, mit statischen Dateien, testen diff --git a/docs/de/docs/how-to/custom-request-and-route.md b/docs/de/docs/how-to/custom-request-and-route.md index a0c4a0e0c..f81fa1da3 100644 --- a/docs/de/docs/how-to/custom-request-and-route.md +++ b/docs/de/docs/how-to/custom-request-and-route.md @@ -43,7 +43,7 @@ Wenn der Header kein `gzip` enthĂ€lt, wird nicht versucht, den Body zu dekomprim Auf diese Weise kann dieselbe Routenklasse gzip-komprimierte oder unkomprimierte Requests verarbeiten. ```Python hl_lines="8-15" -{!../../../docs_src/custom_request_and_route/tutorial001.py!} +{!../../docs_src/custom_request_and_route/tutorial001.py!} ``` ### Eine benutzerdefinierte `GzipRoute`-Klasse erstellen @@ -57,7 +57,7 @@ Diese Methode gibt eine Funktion zurĂŒck. Und diese Funktion empfĂ€ngt einen Req Hier verwenden wir sie, um aus dem ursprĂŒnglichen Request einen `GzipRequest` zu erstellen. ```Python hl_lines="18-26" -{!../../../docs_src/custom_request_and_route/tutorial001.py!} +{!../../docs_src/custom_request_and_route/tutorial001.py!} ``` /// note | "Technische Details" @@ -97,13 +97,13 @@ Wir können denselben Ansatz auch verwenden, um in einem Exceptionhandler auf de Alles, was wir tun mĂŒssen, ist, den Request innerhalb eines `try`/`except`-Blocks zu handhaben: ```Python hl_lines="13 15" -{!../../../docs_src/custom_request_and_route/tutorial002.py!} +{!../../docs_src/custom_request_and_route/tutorial002.py!} ``` Wenn eine Exception auftritt, befindet sich die `Request`-Instanz weiterhin im GĂŒltigkeitsbereich, sodass wir den Requestbody lesen und bei der Fehlerbehandlung verwenden können: ```Python hl_lines="16-18" -{!../../../docs_src/custom_request_and_route/tutorial002.py!} +{!../../docs_src/custom_request_and_route/tutorial002.py!} ``` ## Benutzerdefinierte `APIRoute`-Klasse in einem Router @@ -111,11 +111,11 @@ Wenn eine Exception auftritt, befindet sich die `Request`-Instanz weiterhin im G Sie können auch den Parameter `route_class` eines `APIRouter` festlegen: ```Python hl_lines="26" -{!../../../docs_src/custom_request_and_route/tutorial003.py!} +{!../../docs_src/custom_request_and_route/tutorial003.py!} ``` In diesem Beispiel verwenden die *Pfadoperationen* unter dem `router` die benutzerdefinierte `TimedRoute`-Klasse und haben in der Response einen zusĂ€tzlichen `X-Response-Time`-Header mit der Zeit, die zum Generieren der Response benötigt wurde: ```Python hl_lines="13-20" -{!../../../docs_src/custom_request_and_route/tutorial003.py!} +{!../../docs_src/custom_request_and_route/tutorial003.py!} ``` diff --git a/docs/de/docs/how-to/extending-openapi.md b/docs/de/docs/how-to/extending-openapi.md index 347c5bed3..c895fb860 100644 --- a/docs/de/docs/how-to/extending-openapi.md +++ b/docs/de/docs/how-to/extending-openapi.md @@ -44,7 +44,7 @@ FĂŒgen wir beispielsweise Strawberry-Dokumentation. diff --git a/docs/de/docs/how-to/separate-openapi-schemas.md b/docs/de/docs/how-to/separate-openapi-schemas.md index eaecb27de..974341dd2 100644 --- a/docs/de/docs/how-to/separate-openapi-schemas.md +++ b/docs/de/docs/how-to/separate-openapi-schemas.md @@ -13,7 +13,7 @@ Nehmen wir an, Sie haben ein Pydantic-Modell mit Defaultwerten wie dieses: //// tab | Python 3.10+ ```Python hl_lines="7" -{!> ../../../docs_src/separate_openapi_schemas/tutorial001_py310.py[ln:1-7]!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001_py310.py[ln:1-7]!} # Code unterhalb weggelassen 👇 ``` @@ -22,7 +22,7 @@ Nehmen wir an, Sie haben ein Pydantic-Modell mit Defaultwerten wie dieses: 👀 VollstĂ€ndige Dateivorschau ```Python -{!> ../../../docs_src/separate_openapi_schemas/tutorial001_py310.py!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001_py310.py!} ``` @@ -32,7 +32,7 @@ Nehmen wir an, Sie haben ein Pydantic-Modell mit Defaultwerten wie dieses: //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/separate_openapi_schemas/tutorial001_py39.py[ln:1-9]!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001_py39.py[ln:1-9]!} # Code unterhalb weggelassen 👇 ``` @@ -41,7 +41,7 @@ Nehmen wir an, Sie haben ein Pydantic-Modell mit Defaultwerten wie dieses: 👀 VollstĂ€ndige Dateivorschau ```Python -{!> ../../../docs_src/separate_openapi_schemas/tutorial001_py39.py!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001_py39.py!} ``` @@ -51,7 +51,7 @@ Nehmen wir an, Sie haben ein Pydantic-Modell mit Defaultwerten wie dieses: //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/separate_openapi_schemas/tutorial001.py[ln:1-9]!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001.py[ln:1-9]!} # Code unterhalb weggelassen 👇 ``` @@ -60,7 +60,7 @@ Nehmen wir an, Sie haben ein Pydantic-Modell mit Defaultwerten wie dieses: 👀 VollstĂ€ndige Dateivorschau ```Python -{!> ../../../docs_src/separate_openapi_schemas/tutorial001.py!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001.py!} ``` @@ -74,7 +74,7 @@ Wenn Sie dieses Modell wie hier als Eingabe verwenden: //// tab | Python 3.10+ ```Python hl_lines="14" -{!> ../../../docs_src/separate_openapi_schemas/tutorial001_py310.py[ln:1-15]!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001_py310.py[ln:1-15]!} # Code unterhalb weggelassen 👇 ``` @@ -83,7 +83,7 @@ Wenn Sie dieses Modell wie hier als Eingabe verwenden: 👀 VollstĂ€ndige Dateivorschau ```Python -{!> ../../../docs_src/separate_openapi_schemas/tutorial001_py310.py!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001_py310.py!} ``` @@ -93,7 +93,7 @@ Wenn Sie dieses Modell wie hier als Eingabe verwenden: //// tab | Python 3.9+ ```Python hl_lines="16" -{!> ../../../docs_src/separate_openapi_schemas/tutorial001_py39.py[ln:1-17]!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001_py39.py[ln:1-17]!} # Code unterhalb weggelassen 👇 ``` @@ -102,7 +102,7 @@ Wenn Sie dieses Modell wie hier als Eingabe verwenden: 👀 VollstĂ€ndige Dateivorschau ```Python -{!> ../../../docs_src/separate_openapi_schemas/tutorial001_py39.py!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001_py39.py!} ``` @@ -112,7 +112,7 @@ Wenn Sie dieses Modell wie hier als Eingabe verwenden: //// tab | Python 3.8+ ```Python hl_lines="16" -{!> ../../../docs_src/separate_openapi_schemas/tutorial001.py[ln:1-17]!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001.py[ln:1-17]!} # Code unterhalb weggelassen 👇 ``` @@ -121,7 +121,7 @@ Wenn Sie dieses Modell wie hier als Eingabe verwenden: 👀 VollstĂ€ndige Dateivorschau ```Python -{!> ../../../docs_src/separate_openapi_schemas/tutorial001.py!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001.py!} ``` @@ -145,7 +145,7 @@ Wenn Sie jedoch dasselbe Modell als Ausgabe verwenden, wie hier: //// tab | Python 3.10+ ```Python hl_lines="19" -{!> ../../../docs_src/separate_openapi_schemas/tutorial001_py310.py!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001_py310.py!} ``` //// @@ -153,7 +153,7 @@ Wenn Sie jedoch dasselbe Modell als Ausgabe verwenden, wie hier: //// tab | Python 3.9+ ```Python hl_lines="21" -{!> ../../../docs_src/separate_openapi_schemas/tutorial001_py39.py!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001_py39.py!} ``` //// @@ -161,7 +161,7 @@ Wenn Sie jedoch dasselbe Modell als Ausgabe verwenden, wie hier: //// tab | Python 3.8+ ```Python hl_lines="21" -{!> ../../../docs_src/separate_openapi_schemas/tutorial001.py!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001.py!} ``` //// @@ -226,7 +226,7 @@ UnterstĂŒtzung fĂŒr `separate_input_output_schemas` wurde in FastAPI `0.102.0` h //// tab | Python 3.10+ ```Python hl_lines="10" -{!> ../../../docs_src/separate_openapi_schemas/tutorial002_py310.py!} +{!> ../../docs_src/separate_openapi_schemas/tutorial002_py310.py!} ``` //// @@ -234,7 +234,7 @@ UnterstĂŒtzung fĂŒr `separate_input_output_schemas` wurde in FastAPI `0.102.0` h //// tab | Python 3.9+ ```Python hl_lines="12" -{!> ../../../docs_src/separate_openapi_schemas/tutorial002_py39.py!} +{!> ../../docs_src/separate_openapi_schemas/tutorial002_py39.py!} ``` //// @@ -242,7 +242,7 @@ UnterstĂŒtzung fĂŒr `separate_input_output_schemas` wurde in FastAPI `0.102.0` h //// tab | Python 3.8+ ```Python hl_lines="12" -{!> ../../../docs_src/separate_openapi_schemas/tutorial002.py!} +{!> ../../docs_src/separate_openapi_schemas/tutorial002.py!} ``` //// diff --git a/docs/de/docs/python-types.md b/docs/de/docs/python-types.md index 9bbff83d3..a43bf5ffe 100644 --- a/docs/de/docs/python-types.md +++ b/docs/de/docs/python-types.md @@ -23,7 +23,7 @@ Wenn Sie ein Python-Experte sind und bereits alles ĂŒber Typhinweise wissen, ĂŒb Fangen wir mit einem einfachen Beispiel an: ```Python -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` Dieses Programm gibt aus: @@ -39,7 +39,7 @@ Die Funktion macht Folgendes: * Verkettet sie mit einem Leerzeichen in der Mitte. ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` ### Bearbeiten Sie es @@ -83,7 +83,7 @@ Das war's. Das sind die „Typhinweise“: ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial002.py!} +{!../../docs_src/python_types/tutorial002.py!} ``` Das ist nicht das gleiche wie das Deklarieren von Defaultwerten, wie es hier der Fall ist: @@ -113,7 +113,7 @@ Hier können Sie durch die Optionen blĂ€ttern, bis Sie diejenige finden, bei der Sehen Sie sich diese Funktion an, sie hat bereits Typhinweise: ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial003.py!} +{!../../docs_src/python_types/tutorial003.py!} ``` Da der Editor die Typen der Variablen kennt, erhalten Sie nicht nur Code-VervollstĂ€ndigung, sondern auch eine FehlerprĂŒfung: @@ -123,7 +123,7 @@ Da der Editor die Typen der Variablen kennt, erhalten Sie nicht nur Code-Vervoll Jetzt, da Sie wissen, dass Sie das reparieren mĂŒssen, konvertieren Sie `age` mittels `str(age)` in einen String: ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial004.py!} +{!../../docs_src/python_types/tutorial004.py!} ``` ## Deklarieren von Typen @@ -144,7 +144,7 @@ Zum Beispiel diese: * `bytes` ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial005.py!} +{!../../docs_src/python_types/tutorial005.py!} ``` ### Generische Typen mit Typ-Parametern @@ -182,7 +182,7 @@ Als Typ nehmen Sie `list`. Da die Liste ein Typ ist, welcher innere Typen enthĂ€lt, werden diese von eckigen Klammern umfasst: ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial006_py39.py!} +{!> ../../docs_src/python_types/tutorial006_py39.py!} ``` //// @@ -192,7 +192,7 @@ Da die Liste ein Typ ist, welcher innere Typen enthĂ€lt, werden diese von eckige Von `typing` importieren Sie `List` (mit Großbuchstaben `L`): ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial006.py!} +{!> ../../docs_src/python_types/tutorial006.py!} ``` Deklarieren Sie die Variable mit der gleichen Doppelpunkt-Syntax (`:`). @@ -202,7 +202,7 @@ Als Typ nehmen Sie das `List`, das Sie von `typing` importiert haben. Da die Liste ein Typ ist, welcher innere Typen enthĂ€lt, werden diese von eckigen Klammern umfasst: ```Python hl_lines="4" -{!> ../../../docs_src/python_types/tutorial006.py!} +{!> ../../docs_src/python_types/tutorial006.py!} ``` //// @@ -240,7 +240,7 @@ Das Gleiche gilt fĂŒr die Deklaration eines Tupels – `tuple` – und einer Men //// tab | Python 3.9+ ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial007_py39.py!} +{!> ../../docs_src/python_types/tutorial007_py39.py!} ``` //// @@ -248,7 +248,7 @@ Das Gleiche gilt fĂŒr die Deklaration eines Tupels – `tuple` – und einer Men //// tab | Python 3.8+ ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial007.py!} +{!> ../../docs_src/python_types/tutorial007.py!} ``` //// @@ -269,7 +269,7 @@ Der zweite Typ-Parameter ist fĂŒr die Werte des `dict`: //// tab | Python 3.9+ ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial008_py39.py!} +{!> ../../docs_src/python_types/tutorial008_py39.py!} ``` //// @@ -277,7 +277,7 @@ Der zweite Typ-Parameter ist fĂŒr die Werte des `dict`: //// tab | Python 3.8+ ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial008.py!} +{!> ../../docs_src/python_types/tutorial008.py!} ``` //// @@ -299,7 +299,7 @@ In Python 3.10 gibt es zusĂ€tzlich eine **neue Syntax**, die es erlaubt, die mö //// tab | Python 3.10+ ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial008b_py310.py!} +{!> ../../docs_src/python_types/tutorial008b_py310.py!} ``` //// @@ -307,7 +307,7 @@ In Python 3.10 gibt es zusĂ€tzlich eine **neue Syntax**, die es erlaubt, die mö //// tab | Python 3.8+ ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial008b.py!} +{!> ../../docs_src/python_types/tutorial008b.py!} ``` //// @@ -321,7 +321,7 @@ Sie können deklarieren, dass ein Wert ein `str`, aber vielleicht auch `None` se In Python 3.6 und darĂŒber (inklusive Python 3.10) können Sie das deklarieren, indem Sie `Optional` vom `typing` Modul importieren und verwenden. ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009.py!} +{!../../docs_src/python_types/tutorial009.py!} ``` Wenn Sie `Optional[str]` anstelle von nur `str` verwenden, wird Ihr Editor Ihnen dabei helfen, Fehler zu erkennen, bei denen Sie annehmen könnten, dass ein Wert immer eine String (`str`) ist, obwohl er auch `None` sein könnte. @@ -333,7 +333,7 @@ Das bedeutet auch, dass Sie in Python 3.10 `Something | None` verwenden können: //// tab | Python 3.10+ ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial009_py310.py!} +{!> ../../docs_src/python_types/tutorial009_py310.py!} ``` //// @@ -341,7 +341,7 @@ Das bedeutet auch, dass Sie in Python 3.10 `Something | None` verwenden können: //// tab | Python 3.8+ ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial009.py!} +{!> ../../docs_src/python_types/tutorial009.py!} ``` //// @@ -349,7 +349,7 @@ Das bedeutet auch, dass Sie in Python 3.10 `Something | None` verwenden können: //// tab | Python 3.8+ Alternative ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial009b.py!} +{!> ../../docs_src/python_types/tutorial009b.py!} ``` //// @@ -370,7 +370,7 @@ Es geht nur um Wörter und Namen. Aber diese Worte können beeinflussen, wie Sie Nehmen wir zum Beispiel diese Funktion: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009c.py!} +{!../../docs_src/python_types/tutorial009c.py!} ``` Der Parameter `name` ist definiert als `Optional[str]`, aber er ist **nicht optional**, Sie können die Funktion nicht ohne diesen Parameter aufrufen: @@ -388,7 +388,7 @@ say_hi(name=None) # Das funktioniert, None is gĂŒltig 🎉 Die gute Nachricht ist, dass Sie sich darĂŒber keine Sorgen mehr machen mĂŒssen, wenn Sie Python 3.10 verwenden, da Sie einfach `|` verwenden können, um Vereinigungen von Typen zu definieren: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009c_py310.py!} +{!../../docs_src/python_types/tutorial009c_py310.py!} ``` Und dann mĂŒssen Sie sich nicht mehr um Namen wie `Optional` und `Union` kĂŒmmern. 😎 @@ -452,13 +452,13 @@ Sie können auch eine Klasse als Typ einer Variablen deklarieren. Nehmen wir an, Sie haben eine Klasse `Person`, mit einem Namen: ```Python hl_lines="1-3" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` Dann können Sie eine Variable vom Typ `Person` deklarieren: ```Python hl_lines="6" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` Und wiederum bekommen Sie die volle Editor-UnterstĂŒtzung: @@ -486,7 +486,7 @@ Ein Beispiel aus der offiziellen Pydantic Dokumentation: //// tab | Python 3.10+ ```Python -{!> ../../../docs_src/python_types/tutorial011_py310.py!} +{!> ../../docs_src/python_types/tutorial011_py310.py!} ``` //// @@ -494,7 +494,7 @@ Ein Beispiel aus der offiziellen Pydantic Dokumentation: //// tab | Python 3.9+ ```Python -{!> ../../../docs_src/python_types/tutorial011_py39.py!} +{!> ../../docs_src/python_types/tutorial011_py39.py!} ``` //// @@ -502,7 +502,7 @@ Ein Beispiel aus der offiziellen Pydantic Dokumentation: //// tab | Python 3.8+ ```Python -{!> ../../../docs_src/python_types/tutorial011.py!} +{!> ../../docs_src/python_types/tutorial011.py!} ``` //// @@ -532,7 +532,7 @@ Python bietet auch die Möglichkeit, **zusĂ€tzliche Metadaten** in Typhinweisen In Python 3.9 ist `Annotated` ein Teil der Standardbibliothek, Sie können es von `typing` importieren. ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial013_py39.py!} +{!> ../../docs_src/python_types/tutorial013_py39.py!} ``` //// @@ -544,7 +544,7 @@ In Versionen niedriger als Python 3.9 importieren Sie `Annotated` von `typing_ex Es wird bereits mit **FastAPI** installiert sein. ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial013.py!} +{!> ../../docs_src/python_types/tutorial013.py!} ``` //// diff --git a/docs/de/docs/tutorial/background-tasks.md b/docs/de/docs/tutorial/background-tasks.md index 0852288d5..cd857f5e7 100644 --- a/docs/de/docs/tutorial/background-tasks.md +++ b/docs/de/docs/tutorial/background-tasks.md @@ -16,7 +16,7 @@ Hierzu zĂ€hlen beispielsweise: Importieren Sie zunĂ€chst `BackgroundTasks` und definieren Sie einen Parameter in Ihrer *Pfadoperation-Funktion* mit der Typdeklaration `BackgroundTasks`: ```Python hl_lines="1 13" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` **FastAPI** erstellt fĂŒr Sie das Objekt vom Typ `BackgroundTasks` und ĂŒbergibt es als diesen Parameter. @@ -34,7 +34,7 @@ In diesem Fall schreibt die Taskfunktion in eine Datei (den Versand einer E-Mail Und da der Schreibvorgang nicht `async` und `await` verwendet, definieren wir die Funktion mit normalem `def`: ```Python hl_lines="6-9" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` ## Den Hintergrundtask hinzufĂŒgen @@ -42,7 +42,7 @@ Und da der Schreibvorgang nicht `async` und `await` verwendet, definieren wir di Übergeben Sie innerhalb Ihrer *Pfadoperation-Funktion* Ihre Taskfunktion mit der Methode `.add_task()` an das *Hintergrundtasks*-Objekt: ```Python hl_lines="14" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` `.add_task()` erhĂ€lt als Argumente: @@ -60,7 +60,7 @@ Die Verwendung von `BackgroundTasks` funktioniert auch mit dem ../../../docs_src/background_tasks/tutorial002_an_py310.py!} +{!> ../../docs_src/background_tasks/tutorial002_an_py310.py!} ``` //// @@ -68,7 +68,7 @@ Die Verwendung von `BackgroundTasks` funktioniert auch mit dem ../../../docs_src/background_tasks/tutorial002_an_py39.py!} +{!> ../../docs_src/background_tasks/tutorial002_an_py39.py!} ``` //// @@ -76,7 +76,7 @@ Die Verwendung von `BackgroundTasks` funktioniert auch mit dem ../../../docs_src/background_tasks/tutorial002_an.py!} +{!> ../../docs_src/background_tasks/tutorial002_an.py!} ``` //// @@ -90,7 +90,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="11 13 20 23" -{!> ../../../docs_src/background_tasks/tutorial002_py310.py!} +{!> ../../docs_src/background_tasks/tutorial002_py310.py!} ``` //// @@ -104,7 +104,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="13 15 22 25" -{!> ../../../docs_src/background_tasks/tutorial002.py!} +{!> ../../docs_src/background_tasks/tutorial002.py!} ``` //// diff --git a/docs/de/docs/tutorial/bigger-applications.md b/docs/de/docs/tutorial/bigger-applications.md index 986a99a38..000fa1f43 100644 --- a/docs/de/docs/tutorial/bigger-applications.md +++ b/docs/de/docs/tutorial/bigger-applications.md @@ -86,7 +86,7 @@ Sie können die *Pfadoperationen* fĂŒr dieses Modul mit `APIRouter` erstellen. Sie importieren ihn und erstellen eine „Instanz“ auf die gleiche Weise wie mit der Klasse `FastAPI`: ```Python hl_lines="1 3" title="app/routers/users.py" -{!../../../docs_src/bigger_applications/app/routers/users.py!} +{!../../docs_src/bigger_applications/app/routers/users.py!} ``` ### *Pfadoperationen* mit `APIRouter` @@ -96,7 +96,7 @@ Und dann verwenden Sie ihn, um Ihre *Pfadoperationen* zu deklarieren. Verwenden Sie ihn auf die gleiche Weise wie die Klasse `FastAPI`: ```Python hl_lines="6 11 16" title="app/routers/users.py" -{!../../../docs_src/bigger_applications/app/routers/users.py!} +{!../../docs_src/bigger_applications/app/routers/users.py!} ``` Sie können sich `APIRouter` als eine „Mini-`FastAPI`“-Klasse vorstellen. @@ -124,7 +124,7 @@ Wir werden nun eine einfache AbhĂ€ngigkeit verwenden, um einen benutzerdefiniert //// tab | Python 3.9+ ```Python hl_lines="3 6-8" title="app/dependencies.py" -{!> ../../../docs_src/bigger_applications/app_an_py39/dependencies.py!} +{!> ../../docs_src/bigger_applications/app_an_py39/dependencies.py!} ``` //// @@ -132,7 +132,7 @@ Wir werden nun eine einfache AbhĂ€ngigkeit verwenden, um einen benutzerdefiniert //// tab | Python 3.8+ ```Python hl_lines="1 5-7" title="app/dependencies.py" -{!> ../../../docs_src/bigger_applications/app_an/dependencies.py!} +{!> ../../docs_src/bigger_applications/app_an/dependencies.py!} ``` //// @@ -146,7 +146,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="1 4-6" title="app/dependencies.py" -{!> ../../../docs_src/bigger_applications/app/dependencies.py!} +{!> ../../docs_src/bigger_applications/app/dependencies.py!} ``` //// @@ -182,7 +182,7 @@ Wir wissen, dass alle *Pfadoperationen* in diesem Modul folgendes haben: Anstatt also alles zu jeder *Pfadoperation* hinzuzufĂŒgen, können wir es dem `APIRouter` hinzufĂŒgen. ```Python hl_lines="5-10 16 21" title="app/routers/items.py" -{!../../../docs_src/bigger_applications/app/routers/items.py!} +{!../../docs_src/bigger_applications/app/routers/items.py!} ``` Da der Pfad jeder *Pfadoperation* mit `/` beginnen muss, wie in: @@ -243,7 +243,7 @@ Und wir mĂŒssen die AbhĂ€ngigkeitsfunktion aus dem Modul `app.dependencies` impo Daher verwenden wir einen relativen Import mit `..` fĂŒr die AbhĂ€ngigkeiten: ```Python hl_lines="3" title="app/routers/items.py" -{!../../../docs_src/bigger_applications/app/routers/items.py!} +{!../../docs_src/bigger_applications/app/routers/items.py!} ``` #### Wie relative Importe funktionieren @@ -316,7 +316,7 @@ Wir fĂŒgen weder das PrĂ€fix `/items` noch `tags=["items"]` zu jeder *Pfadoperat Aber wir können immer noch _mehr_ `tags` hinzufĂŒgen, die auf eine bestimmte *Pfadoperation* angewendet werden, sowie einige zusĂ€tzliche `responses`, die speziell fĂŒr diese *Pfadoperation* gelten: ```Python hl_lines="30-31" title="app/routers/items.py" -{!../../../docs_src/bigger_applications/app/routers/items.py!} +{!../../docs_src/bigger_applications/app/routers/items.py!} ``` /// tip | "Tipp" @@ -344,7 +344,7 @@ Sie importieren und erstellen wie gewohnt eine `FastAPI`-Klasse. Und wir können sogar [globale AbhĂ€ngigkeiten](dependencies/global-dependencies.md){.internal-link target=_blank} deklarieren, die mit den AbhĂ€ngigkeiten fĂŒr jeden `APIRouter` kombiniert werden: ```Python hl_lines="1 3 7" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` ### Den `APIRouter` importieren @@ -352,7 +352,7 @@ Und wir können sogar [globale AbhĂ€ngigkeiten](dependencies/global-dependencies Jetzt importieren wir die anderen Submodule, die `APIRouter` haben: ```Python hl_lines="4-5" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` Da es sich bei den Dateien `app/routers/users.py` und `app/routers/items.py` um Submodule handelt, die Teil desselben Python-Packages `app` sind, können wir einen einzelnen Punkt `.` verwenden, um sie mit „relativen Imports“ zu importieren. @@ -417,7 +417,7 @@ wĂŒrde der `router` von `users` den von `items` ĂŒberschreiben und wir könnten Um also beide in derselben Datei verwenden zu können, importieren wir die Submodule direkt: ```Python hl_lines="5" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` @@ -426,7 +426,7 @@ Um also beide in derselben Datei verwenden zu können, importieren wir die Submo Inkludieren wir nun die `router` aus diesen Submodulen `users` und `items`: ```Python hl_lines="10-11" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` /// info @@ -468,7 +468,7 @@ Sie enthĂ€lt einen `APIRouter` mit einigen administrativen *Pfadoperationen*, di In diesem Beispiel wird es ganz einfach sein. Nehmen wir jedoch an, dass wir, da sie mit anderen Projekten in der Organisation geteilt wird, sie nicht Ă€ndern und kein `prefix`, `dependencies`, `tags`, usw. direkt zum `APIRouter` hinzufĂŒgen können: ```Python hl_lines="3" title="app/internal/admin.py" -{!../../../docs_src/bigger_applications/app/internal/admin.py!} +{!../../docs_src/bigger_applications/app/internal/admin.py!} ``` Aber wir möchten immer noch ein benutzerdefiniertes `prefix` festlegen, wenn wir den `APIRouter` einbinden, sodass alle seine *Pfadoperationen* mit `/admin` beginnen, wir möchten es mit den `dependencies` sichern, die wir bereits fĂŒr dieses Projekt haben, und wir möchten `tags` und `responses` hinzufĂŒgen. @@ -476,7 +476,7 @@ Aber wir möchten immer noch ein benutzerdefiniertes `prefix` festlegen, wenn wi Wir können das alles deklarieren, ohne den ursprĂŒnglichen `APIRouter` Ă€ndern zu mĂŒssen, indem wir diese Parameter an `app.include_router()` ĂŒbergeben: ```Python hl_lines="14-17" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` Auf diese Weise bleibt der ursprĂŒngliche `APIRouter` unverĂ€ndert, sodass wir dieselbe `app/internal/admin.py`-Datei weiterhin mit anderen Projekten in der Organisation teilen können. @@ -499,7 +499,7 @@ Wir können *Pfadoperationen* auch direkt zur `FastAPI`-App hinzufĂŒgen. Hier machen wir es ... nur um zu zeigen, dass wir es können đŸ€·: ```Python hl_lines="21-23" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` und es wird korrekt funktionieren, zusammen mit allen anderen *Pfadoperationen*, die mit `app.include_router()` hinzugefĂŒgt wurden. diff --git a/docs/de/docs/tutorial/body-fields.md b/docs/de/docs/tutorial/body-fields.md index 33f7713ee..d22524c67 100644 --- a/docs/de/docs/tutorial/body-fields.md +++ b/docs/de/docs/tutorial/body-fields.md @@ -9,7 +9,7 @@ Importieren Sie es zuerst: //// tab | Python 3.10+ ```Python hl_lines="4" -{!> ../../../docs_src/body_fields/tutorial001_an_py310.py!} +{!> ../../docs_src/body_fields/tutorial001_an_py310.py!} ``` //// @@ -17,7 +17,7 @@ Importieren Sie es zuerst: //// tab | Python 3.9+ ```Python hl_lines="4" -{!> ../../../docs_src/body_fields/tutorial001_an_py39.py!} +{!> ../../docs_src/body_fields/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ Importieren Sie es zuerst: //// tab | Python 3.8+ ```Python hl_lines="4" -{!> ../../../docs_src/body_fields/tutorial001_an.py!} +{!> ../../docs_src/body_fields/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="2" -{!> ../../../docs_src/body_fields/tutorial001_py310.py!} +{!> ../../docs_src/body_fields/tutorial001_py310.py!} ``` //// @@ -53,7 +53,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="4" -{!> ../../../docs_src/body_fields/tutorial001.py!} +{!> ../../docs_src/body_fields/tutorial001.py!} ``` //// @@ -71,7 +71,7 @@ Dann können Sie `Field` mit Modellattributen deklarieren: //// tab | Python 3.10+ ```Python hl_lines="11-14" -{!> ../../../docs_src/body_fields/tutorial001_an_py310.py!} +{!> ../../docs_src/body_fields/tutorial001_an_py310.py!} ``` //// @@ -79,7 +79,7 @@ Dann können Sie `Field` mit Modellattributen deklarieren: //// tab | Python 3.9+ ```Python hl_lines="11-14" -{!> ../../../docs_src/body_fields/tutorial001_an_py39.py!} +{!> ../../docs_src/body_fields/tutorial001_an_py39.py!} ``` //// @@ -87,7 +87,7 @@ Dann können Sie `Field` mit Modellattributen deklarieren: //// tab | Python 3.8+ ```Python hl_lines="12-15" -{!> ../../../docs_src/body_fields/tutorial001_an.py!} +{!> ../../docs_src/body_fields/tutorial001_an.py!} ``` //// @@ -101,7 +101,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="9-12" -{!> ../../../docs_src/body_fields/tutorial001_py310.py!} +{!> ../../docs_src/body_fields/tutorial001_py310.py!} ``` //// @@ -115,7 +115,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="11-14" -{!> ../../../docs_src/body_fields/tutorial001.py!} +{!> ../../docs_src/body_fields/tutorial001.py!} ``` //// diff --git a/docs/de/docs/tutorial/body-multiple-params.md b/docs/de/docs/tutorial/body-multiple-params.md index 977e17671..26ae73ebc 100644 --- a/docs/de/docs/tutorial/body-multiple-params.md +++ b/docs/de/docs/tutorial/body-multiple-params.md @@ -11,7 +11,7 @@ Und Sie können auch Body-Parameter als optional kennzeichnen, indem Sie den Def //// tab | Python 3.10+ ```Python hl_lines="18-20" -{!> ../../../docs_src/body_multiple_params/tutorial001_an_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial001_an_py310.py!} ``` //// @@ -19,7 +19,7 @@ Und Sie können auch Body-Parameter als optional kennzeichnen, indem Sie den Def //// tab | Python 3.9+ ```Python hl_lines="18-20" -{!> ../../../docs_src/body_multiple_params/tutorial001_an_py39.py!} +{!> ../../docs_src/body_multiple_params/tutorial001_an_py39.py!} ``` //// @@ -27,7 +27,7 @@ Und Sie können auch Body-Parameter als optional kennzeichnen, indem Sie den Def //// tab | Python 3.8+ ```Python hl_lines="19-21" -{!> ../../../docs_src/body_multiple_params/tutorial001_an.py!} +{!> ../../docs_src/body_multiple_params/tutorial001_an.py!} ``` //// @@ -41,7 +41,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="17-19" -{!> ../../../docs_src/body_multiple_params/tutorial001_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial001_py310.py!} ``` //// @@ -55,7 +55,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="19-21" -{!> ../../../docs_src/body_multiple_params/tutorial001.py!} +{!> ../../docs_src/body_multiple_params/tutorial001.py!} ``` //// @@ -84,7 +84,7 @@ Aber Sie können auch mehrere Body-Parameter deklarieren, z. B. `item` und `user //// tab | Python 3.10+ ```Python hl_lines="20" -{!> ../../../docs_src/body_multiple_params/tutorial002_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial002_py310.py!} ``` //// @@ -92,7 +92,7 @@ Aber Sie können auch mehrere Body-Parameter deklarieren, z. B. `item` und `user //// tab | Python 3.8+ ```Python hl_lines="22" -{!> ../../../docs_src/body_multiple_params/tutorial002.py!} +{!> ../../docs_src/body_multiple_params/tutorial002.py!} ``` //// @@ -139,7 +139,7 @@ Aber Sie können **FastAPI** instruieren, ihn als weiteren Body-SchlĂŒssel zu er //// tab | Python 3.10+ ```Python hl_lines="23" -{!> ../../../docs_src/body_multiple_params/tutorial003_an_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial003_an_py310.py!} ``` //// @@ -147,7 +147,7 @@ Aber Sie können **FastAPI** instruieren, ihn als weiteren Body-SchlĂŒssel zu er //// tab | Python 3.9+ ```Python hl_lines="23" -{!> ../../../docs_src/body_multiple_params/tutorial003_an_py39.py!} +{!> ../../docs_src/body_multiple_params/tutorial003_an_py39.py!} ``` //// @@ -155,7 +155,7 @@ Aber Sie können **FastAPI** instruieren, ihn als weiteren Body-SchlĂŒssel zu er //// tab | Python 3.8+ ```Python hl_lines="24" -{!> ../../../docs_src/body_multiple_params/tutorial003_an.py!} +{!> ../../docs_src/body_multiple_params/tutorial003_an.py!} ``` //// @@ -169,7 +169,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="20" -{!> ../../../docs_src/body_multiple_params/tutorial003_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial003_py310.py!} ``` //// @@ -183,7 +183,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="22" -{!> ../../../docs_src/body_multiple_params/tutorial003.py!} +{!> ../../docs_src/body_multiple_params/tutorial003.py!} ``` //// @@ -229,7 +229,7 @@ Zum Beispiel: //// tab | Python 3.10+ ```Python hl_lines="27" -{!> ../../../docs_src/body_multiple_params/tutorial004_an_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial004_an_py310.py!} ``` //// @@ -237,7 +237,7 @@ Zum Beispiel: //// tab | Python 3.9+ ```Python hl_lines="27" -{!> ../../../docs_src/body_multiple_params/tutorial004_an_py39.py!} +{!> ../../docs_src/body_multiple_params/tutorial004_an_py39.py!} ``` //// @@ -245,7 +245,7 @@ Zum Beispiel: //// tab | Python 3.8+ ```Python hl_lines="28" -{!> ../../../docs_src/body_multiple_params/tutorial004_an.py!} +{!> ../../docs_src/body_multiple_params/tutorial004_an.py!} ``` //// @@ -259,7 +259,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="25" -{!> ../../../docs_src/body_multiple_params/tutorial004_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial004_py310.py!} ``` //// @@ -273,7 +273,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="27" -{!> ../../../docs_src/body_multiple_params/tutorial004.py!} +{!> ../../docs_src/body_multiple_params/tutorial004.py!} ``` //// @@ -301,7 +301,7 @@ so wie in: //// tab | Python 3.10+ ```Python hl_lines="17" -{!> ../../../docs_src/body_multiple_params/tutorial005_an_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial005_an_py310.py!} ``` //// @@ -309,7 +309,7 @@ so wie in: //// tab | Python 3.9+ ```Python hl_lines="17" -{!> ../../../docs_src/body_multiple_params/tutorial005_an_py39.py!} +{!> ../../docs_src/body_multiple_params/tutorial005_an_py39.py!} ``` //// @@ -317,7 +317,7 @@ so wie in: //// tab | Python 3.8+ ```Python hl_lines="18" -{!> ../../../docs_src/body_multiple_params/tutorial005_an.py!} +{!> ../../docs_src/body_multiple_params/tutorial005_an.py!} ``` //// @@ -331,7 +331,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="15" -{!> ../../../docs_src/body_multiple_params/tutorial005_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial005_py310.py!} ``` //// @@ -345,7 +345,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="17" -{!> ../../../docs_src/body_multiple_params/tutorial005.py!} +{!> ../../docs_src/body_multiple_params/tutorial005.py!} ``` //// diff --git a/docs/de/docs/tutorial/body-nested-models.md b/docs/de/docs/tutorial/body-nested-models.md index 8aef965f4..13153aa68 100644 --- a/docs/de/docs/tutorial/body-nested-models.md +++ b/docs/de/docs/tutorial/body-nested-models.md @@ -9,7 +9,7 @@ Sie können ein Attribut als Kindtyp definieren, zum Beispiel eine Python-`list` //// tab | Python 3.10+ ```Python hl_lines="12" -{!> ../../../docs_src/body_nested_models/tutorial001_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial001_py310.py!} ``` //// @@ -17,7 +17,7 @@ Sie können ein Attribut als Kindtyp definieren, zum Beispiel eine Python-`list` //// tab | Python 3.8+ ```Python hl_lines="14" -{!> ../../../docs_src/body_nested_models/tutorial001.py!} +{!> ../../docs_src/body_nested_models/tutorial001.py!} ``` //// @@ -35,7 +35,7 @@ In Python 3.9 oder darĂŒber können Sie einfach `list` verwenden, um diese Typan In Python-Versionen vor 3.9 (3.6 und darĂŒber), mĂŒssen Sie zuerst `List` von Pythons Standardmodul `typing` importieren. ```Python hl_lines="1" -{!> ../../../docs_src/body_nested_models/tutorial002.py!} +{!> ../../docs_src/body_nested_models/tutorial002.py!} ``` ### Eine `list`e mit einem Typ-Parameter deklarieren @@ -68,7 +68,7 @@ In unserem Beispiel können wir also bewirken, dass `tags` spezifisch eine „Li //// tab | Python 3.10+ ```Python hl_lines="12" -{!> ../../../docs_src/body_nested_models/tutorial002_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial002_py310.py!} ``` //// @@ -76,7 +76,7 @@ In unserem Beispiel können wir also bewirken, dass `tags` spezifisch eine „Li //// tab | Python 3.9+ ```Python hl_lines="14" -{!> ../../../docs_src/body_nested_models/tutorial002_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial002_py39.py!} ``` //// @@ -84,7 +84,7 @@ In unserem Beispiel können wir also bewirken, dass `tags` spezifisch eine „Li //// tab | Python 3.8+ ```Python hl_lines="14" -{!> ../../../docs_src/body_nested_models/tutorial002.py!} +{!> ../../docs_src/body_nested_models/tutorial002.py!} ``` //// @@ -100,7 +100,7 @@ Deklarieren wir also `tags` als Set von Strings. //// tab | Python 3.10+ ```Python hl_lines="12" -{!> ../../../docs_src/body_nested_models/tutorial003_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial003_py310.py!} ``` //// @@ -108,7 +108,7 @@ Deklarieren wir also `tags` als Set von Strings. //// tab | Python 3.9+ ```Python hl_lines="14" -{!> ../../../docs_src/body_nested_models/tutorial003_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial003_py39.py!} ``` //// @@ -116,7 +116,7 @@ Deklarieren wir also `tags` als Set von Strings. //// tab | Python 3.8+ ```Python hl_lines="1 14" -{!> ../../../docs_src/body_nested_models/tutorial003.py!} +{!> ../../docs_src/body_nested_models/tutorial003.py!} ``` //// @@ -144,7 +144,7 @@ Wir können zum Beispiel ein `Image`-Modell definieren. //// tab | Python 3.10+ ```Python hl_lines="7-9" -{!> ../../../docs_src/body_nested_models/tutorial004_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial004_py310.py!} ``` //// @@ -152,7 +152,7 @@ Wir können zum Beispiel ein `Image`-Modell definieren. //// tab | Python 3.9+ ```Python hl_lines="9-11" -{!> ../../../docs_src/body_nested_models/tutorial004_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial004_py39.py!} ``` //// @@ -160,7 +160,7 @@ Wir können zum Beispiel ein `Image`-Modell definieren. //// tab | Python 3.8+ ```Python hl_lines="9-11" -{!> ../../../docs_src/body_nested_models/tutorial004.py!} +{!> ../../docs_src/body_nested_models/tutorial004.py!} ``` //// @@ -172,7 +172,7 @@ Und dann können wir es als Typ eines Attributes verwenden. //// tab | Python 3.10+ ```Python hl_lines="18" -{!> ../../../docs_src/body_nested_models/tutorial004_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial004_py310.py!} ``` //// @@ -180,7 +180,7 @@ Und dann können wir es als Typ eines Attributes verwenden. //// tab | Python 3.9+ ```Python hl_lines="20" -{!> ../../../docs_src/body_nested_models/tutorial004_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial004_py39.py!} ``` //// @@ -188,7 +188,7 @@ Und dann können wir es als Typ eines Attributes verwenden. //// tab | Python 3.8+ ```Python hl_lines="20" -{!> ../../../docs_src/body_nested_models/tutorial004.py!} +{!> ../../docs_src/body_nested_models/tutorial004.py!} ``` //// @@ -227,7 +227,7 @@ Da wir zum Beispiel im `Image`-Modell ein Feld `url` haben, können wir deklarie //// tab | Python 3.10+ ```Python hl_lines="2 8" -{!> ../../../docs_src/body_nested_models/tutorial005_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial005_py310.py!} ``` //// @@ -235,7 +235,7 @@ Da wir zum Beispiel im `Image`-Modell ein Feld `url` haben, können wir deklarie //// tab | Python 3.9+ ```Python hl_lines="4 10" -{!> ../../../docs_src/body_nested_models/tutorial005_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial005_py39.py!} ``` //// @@ -243,7 +243,7 @@ Da wir zum Beispiel im `Image`-Modell ein Feld `url` haben, können wir deklarie //// tab | Python 3.8+ ```Python hl_lines="4 10" -{!> ../../../docs_src/body_nested_models/tutorial005.py!} +{!> ../../docs_src/body_nested_models/tutorial005.py!} ``` //// @@ -257,7 +257,7 @@ Sie können Pydantic-Modelle auch als Typen innerhalb von `list`, `set`, usw. ve //// tab | Python 3.10+ ```Python hl_lines="18" -{!> ../../../docs_src/body_nested_models/tutorial006_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial006_py310.py!} ``` //// @@ -265,7 +265,7 @@ Sie können Pydantic-Modelle auch als Typen innerhalb von `list`, `set`, usw. ve //// tab | Python 3.9+ ```Python hl_lines="20" -{!> ../../../docs_src/body_nested_models/tutorial006_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial006_py39.py!} ``` //// @@ -273,7 +273,7 @@ Sie können Pydantic-Modelle auch als Typen innerhalb von `list`, `set`, usw. ve //// tab | Python 3.8+ ```Python hl_lines="20" -{!> ../../../docs_src/body_nested_models/tutorial006.py!} +{!> ../../docs_src/body_nested_models/tutorial006.py!} ``` //// @@ -317,7 +317,7 @@ Sie können beliebig tief verschachtelte Modelle definieren: //// tab | Python 3.10+ ```Python hl_lines="7 12 18 21 25" -{!> ../../../docs_src/body_nested_models/tutorial007_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial007_py310.py!} ``` //// @@ -325,7 +325,7 @@ Sie können beliebig tief verschachtelte Modelle definieren: //// tab | Python 3.9+ ```Python hl_lines="9 14 20 23 27" -{!> ../../../docs_src/body_nested_models/tutorial007_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial007_py39.py!} ``` //// @@ -333,7 +333,7 @@ Sie können beliebig tief verschachtelte Modelle definieren: //// tab | Python 3.8+ ```Python hl_lines="9 14 20 23 27" -{!> ../../../docs_src/body_nested_models/tutorial007.py!} +{!> ../../docs_src/body_nested_models/tutorial007.py!} ``` //// @@ -363,7 +363,7 @@ so wie in: //// tab | Python 3.9+ ```Python hl_lines="13" -{!> ../../../docs_src/body_nested_models/tutorial008_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial008_py39.py!} ``` //// @@ -371,7 +371,7 @@ so wie in: //// tab | Python 3.8+ ```Python hl_lines="15" -{!> ../../../docs_src/body_nested_models/tutorial008.py!} +{!> ../../docs_src/body_nested_models/tutorial008.py!} ``` //// @@ -407,7 +407,7 @@ Im folgenden Beispiel akzeptieren Sie irgendein `dict`, solange es `int`-SchlĂŒs //// tab | Python 3.9+ ```Python hl_lines="7" -{!> ../../../docs_src/body_nested_models/tutorial009_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial009_py39.py!} ``` //// @@ -415,7 +415,7 @@ Im folgenden Beispiel akzeptieren Sie irgendein `dict`, solange es `int`-SchlĂŒs //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/body_nested_models/tutorial009.py!} +{!> ../../docs_src/body_nested_models/tutorial009.py!} ``` //// diff --git a/docs/de/docs/tutorial/body-updates.md b/docs/de/docs/tutorial/body-updates.md index b83554914..ed5c1890f 100644 --- a/docs/de/docs/tutorial/body-updates.md +++ b/docs/de/docs/tutorial/body-updates.md @@ -9,7 +9,7 @@ Sie können den `jsonable_encoder` verwenden, um die empfangenen Daten in etwas //// tab | Python 3.10+ ```Python hl_lines="28-33" -{!> ../../../docs_src/body_updates/tutorial001_py310.py!} +{!> ../../docs_src/body_updates/tutorial001_py310.py!} ``` //// @@ -17,7 +17,7 @@ Sie können den `jsonable_encoder` verwenden, um die empfangenen Daten in etwas //// tab | Python 3.9+ ```Python hl_lines="30-35" -{!> ../../../docs_src/body_updates/tutorial001_py39.py!} +{!> ../../docs_src/body_updates/tutorial001_py39.py!} ``` //// @@ -25,7 +25,7 @@ Sie können den `jsonable_encoder` verwenden, um die empfangenen Daten in etwas //// tab | Python 3.8+ ```Python hl_lines="30-35" -{!> ../../../docs_src/body_updates/tutorial001.py!} +{!> ../../docs_src/body_updates/tutorial001.py!} ``` //// @@ -87,7 +87,7 @@ Sie können das verwenden, um ein `dict` zu erstellen, das nur die (im Request) //// tab | Python 3.10+ ```Python hl_lines="32" -{!> ../../../docs_src/body_updates/tutorial002_py310.py!} +{!> ../../docs_src/body_updates/tutorial002_py310.py!} ``` //// @@ -95,7 +95,7 @@ Sie können das verwenden, um ein `dict` zu erstellen, das nur die (im Request) //// tab | Python 3.9+ ```Python hl_lines="34" -{!> ../../../docs_src/body_updates/tutorial002_py39.py!} +{!> ../../docs_src/body_updates/tutorial002_py39.py!} ``` //// @@ -103,7 +103,7 @@ Sie können das verwenden, um ein `dict` zu erstellen, das nur die (im Request) //// tab | Python 3.8+ ```Python hl_lines="34" -{!> ../../../docs_src/body_updates/tutorial002.py!} +{!> ../../docs_src/body_updates/tutorial002.py!} ``` //// @@ -125,7 +125,7 @@ Wie in `stored_item_model.model_copy(update=update_data)`: //// tab | Python 3.10+ ```Python hl_lines="33" -{!> ../../../docs_src/body_updates/tutorial002_py310.py!} +{!> ../../docs_src/body_updates/tutorial002_py310.py!} ``` //// @@ -133,7 +133,7 @@ Wie in `stored_item_model.model_copy(update=update_data)`: //// tab | Python 3.9+ ```Python hl_lines="35" -{!> ../../../docs_src/body_updates/tutorial002_py39.py!} +{!> ../../docs_src/body_updates/tutorial002_py39.py!} ``` //// @@ -141,7 +141,7 @@ Wie in `stored_item_model.model_copy(update=update_data)`: //// tab | Python 3.8+ ```Python hl_lines="35" -{!> ../../../docs_src/body_updates/tutorial002.py!} +{!> ../../docs_src/body_updates/tutorial002.py!} ``` //// @@ -164,7 +164,7 @@ Zusammengefasst, um Teil-Ersetzungen vorzunehmen: //// tab | Python 3.10+ ```Python hl_lines="28-35" -{!> ../../../docs_src/body_updates/tutorial002_py310.py!} +{!> ../../docs_src/body_updates/tutorial002_py310.py!} ``` //// @@ -172,7 +172,7 @@ Zusammengefasst, um Teil-Ersetzungen vorzunehmen: //// tab | Python 3.9+ ```Python hl_lines="30-37" -{!> ../../../docs_src/body_updates/tutorial002_py39.py!} +{!> ../../docs_src/body_updates/tutorial002_py39.py!} ``` //// @@ -180,7 +180,7 @@ Zusammengefasst, um Teil-Ersetzungen vorzunehmen: //// tab | Python 3.8+ ```Python hl_lines="30-37" -{!> ../../../docs_src/body_updates/tutorial002.py!} +{!> ../../docs_src/body_updates/tutorial002.py!} ``` //// diff --git a/docs/de/docs/tutorial/body.md b/docs/de/docs/tutorial/body.md index 3fdd4ade3..3a64e747e 100644 --- a/docs/de/docs/tutorial/body.md +++ b/docs/de/docs/tutorial/body.md @@ -25,7 +25,7 @@ Zuerst mĂŒssen Sie `BaseModel` von `pydantic` importieren: //// tab | Python 3.10+ ```Python hl_lines="2" -{!> ../../../docs_src/body/tutorial001_py310.py!} +{!> ../../docs_src/body/tutorial001_py310.py!} ``` //// @@ -33,7 +33,7 @@ Zuerst mĂŒssen Sie `BaseModel` von `pydantic` importieren: //// tab | Python 3.8+ ```Python hl_lines="4" -{!> ../../../docs_src/body/tutorial001.py!} +{!> ../../docs_src/body/tutorial001.py!} ``` //// @@ -47,7 +47,7 @@ Verwenden Sie Standard-Python-Typen fĂŒr die Klassenattribute: //// tab | Python 3.10+ ```Python hl_lines="5-9" -{!> ../../../docs_src/body/tutorial001_py310.py!} +{!> ../../docs_src/body/tutorial001_py310.py!} ``` //// @@ -55,7 +55,7 @@ Verwenden Sie Standard-Python-Typen fĂŒr die Klassenattribute: //// tab | Python 3.8+ ```Python hl_lines="7-11" -{!> ../../../docs_src/body/tutorial001.py!} +{!> ../../docs_src/body/tutorial001.py!} ``` //// @@ -89,7 +89,7 @@ Um es zu Ihrer *Pfadoperation* hinzuzufĂŒgen, deklarieren Sie es auf die gleiche //// tab | Python 3.10+ ```Python hl_lines="16" -{!> ../../../docs_src/body/tutorial001_py310.py!} +{!> ../../docs_src/body/tutorial001_py310.py!} ``` //// @@ -97,7 +97,7 @@ Um es zu Ihrer *Pfadoperation* hinzuzufĂŒgen, deklarieren Sie es auf die gleiche //// tab | Python 3.8+ ```Python hl_lines="18" -{!> ../../../docs_src/body/tutorial001.py!} +{!> ../../docs_src/body/tutorial001.py!} ``` //// @@ -170,7 +170,7 @@ Innerhalb der Funktion können Sie alle Attribute des Modells direkt verwenden: //// tab | Python 3.10+ ```Python hl_lines="19" -{!> ../../../docs_src/body/tutorial002_py310.py!} +{!> ../../docs_src/body/tutorial002_py310.py!} ``` //// @@ -178,7 +178,7 @@ Innerhalb der Funktion können Sie alle Attribute des Modells direkt verwenden: //// tab | Python 3.8+ ```Python hl_lines="21" -{!> ../../../docs_src/body/tutorial002.py!} +{!> ../../docs_src/body/tutorial002.py!} ``` //// @@ -192,7 +192,7 @@ Sie können Pfad- und Requestbody-Parameter gleichzeitig deklarieren. //// tab | Python 3.10+ ```Python hl_lines="15-16" -{!> ../../../docs_src/body/tutorial003_py310.py!} +{!> ../../docs_src/body/tutorial003_py310.py!} ``` //// @@ -200,7 +200,7 @@ Sie können Pfad- und Requestbody-Parameter gleichzeitig deklarieren. //// tab | Python 3.8+ ```Python hl_lines="17-18" -{!> ../../../docs_src/body/tutorial003.py!} +{!> ../../docs_src/body/tutorial003.py!} ``` //// @@ -214,7 +214,7 @@ Sie können auch zur gleichen Zeit **Body-**, **Pfad-** und **Query-Parameter** //// tab | Python 3.10+ ```Python hl_lines="16" -{!> ../../../docs_src/body/tutorial004_py310.py!} +{!> ../../docs_src/body/tutorial004_py310.py!} ``` //// @@ -222,7 +222,7 @@ Sie können auch zur gleichen Zeit **Body-**, **Pfad-** und **Query-Parameter** //// tab | Python 3.8+ ```Python hl_lines="18" -{!> ../../../docs_src/body/tutorial004.py!} +{!> ../../docs_src/body/tutorial004.py!} ``` //// diff --git a/docs/de/docs/tutorial/cookie-params.md b/docs/de/docs/tutorial/cookie-params.md index 0060db8e8..4714a59ae 100644 --- a/docs/de/docs/tutorial/cookie-params.md +++ b/docs/de/docs/tutorial/cookie-params.md @@ -9,7 +9,7 @@ Importieren Sie zuerst `Cookie`: //// tab | Python 3.10+ ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py310.py!} ``` //// @@ -17,7 +17,7 @@ Importieren Sie zuerst `Cookie`: //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ Importieren Sie zuerst `Cookie`: //// tab | Python 3.8+ ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001_an.py!} +{!> ../../docs_src/cookie_params/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="1" -{!> ../../../docs_src/cookie_params/tutorial001_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_py310.py!} ``` //// @@ -53,7 +53,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001.py!} +{!> ../../docs_src/cookie_params/tutorial001.py!} ``` //// @@ -67,7 +67,7 @@ Der erste Wert ist der Typ. Sie können `Cookie` die gehabten Extra Validierungs //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py310.py!} ``` //// @@ -75,7 +75,7 @@ Der erste Wert ist der Typ. Sie können `Cookie` die gehabten Extra Validierungs //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py39.py!} ``` //// @@ -83,7 +83,7 @@ Der erste Wert ist der Typ. Sie können `Cookie` die gehabten Extra Validierungs //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/cookie_params/tutorial001_an.py!} +{!> ../../docs_src/cookie_params/tutorial001_an.py!} ``` //// @@ -97,7 +97,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="7" -{!> ../../../docs_src/cookie_params/tutorial001_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_py310.py!} ``` //// @@ -111,7 +111,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001.py!} +{!> ../../docs_src/cookie_params/tutorial001.py!} ``` //// diff --git a/docs/de/docs/tutorial/dependencies/classes-as-dependencies.md b/docs/de/docs/tutorial/dependencies/classes-as-dependencies.md index 0a9f05bf9..a660ab337 100644 --- a/docs/de/docs/tutorial/dependencies/classes-as-dependencies.md +++ b/docs/de/docs/tutorial/dependencies/classes-as-dependencies.md @@ -9,7 +9,7 @@ Im vorherigen Beispiel haben wir ein `dict` von unserer AbhĂ€ngigkeit („Depend //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/dependencies/tutorial001_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// @@ -17,7 +17,7 @@ Im vorherigen Beispiel haben wir ein `dict` von unserer AbhĂ€ngigkeit („Depend //// tab | Python 3.9+ ```Python hl_lines="11" -{!> ../../../docs_src/dependencies/tutorial001_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ Im vorherigen Beispiel haben wir ein `dict` von unserer AbhĂ€ngigkeit („Depend //// tab | Python 3.8+ ```Python hl_lines="12" -{!> ../../../docs_src/dependencies/tutorial001_an.py!} +{!> ../../docs_src/dependencies/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="7" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -53,7 +53,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="11" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -122,7 +122,7 @@ Dann können wir das „Dependable“ `common_parameters` der AbhĂ€ngigkeit von //// tab | Python 3.10+ ```Python hl_lines="11-15" -{!> ../../../docs_src/dependencies/tutorial002_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_an_py310.py!} ``` //// @@ -130,7 +130,7 @@ Dann können wir das „Dependable“ `common_parameters` der AbhĂ€ngigkeit von //// tab | Python 3.9+ ```Python hl_lines="11-15" -{!> ../../../docs_src/dependencies/tutorial002_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial002_an_py39.py!} ``` //// @@ -138,7 +138,7 @@ Dann können wir das „Dependable“ `common_parameters` der AbhĂ€ngigkeit von //// tab | Python 3.8+ ```Python hl_lines="12-16" -{!> ../../../docs_src/dependencies/tutorial002_an.py!} +{!> ../../docs_src/dependencies/tutorial002_an.py!} ``` //// @@ -152,7 +152,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="9-13" -{!> ../../../docs_src/dependencies/tutorial002_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_py310.py!} ``` //// @@ -166,7 +166,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="11-15" -{!> ../../../docs_src/dependencies/tutorial002.py!} +{!> ../../docs_src/dependencies/tutorial002.py!} ``` //// @@ -176,7 +176,7 @@ Achten Sie auf die Methode `__init__`, die zum Erstellen der Instanz der Klasse //// tab | Python 3.10+ ```Python hl_lines="12" -{!> ../../../docs_src/dependencies/tutorial002_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_an_py310.py!} ``` //// @@ -184,7 +184,7 @@ Achten Sie auf die Methode `__init__`, die zum Erstellen der Instanz der Klasse //// tab | Python 3.9+ ```Python hl_lines="12" -{!> ../../../docs_src/dependencies/tutorial002_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial002_an_py39.py!} ``` //// @@ -192,7 +192,7 @@ Achten Sie auf die Methode `__init__`, die zum Erstellen der Instanz der Klasse //// tab | Python 3.8+ ```Python hl_lines="13" -{!> ../../../docs_src/dependencies/tutorial002_an.py!} +{!> ../../docs_src/dependencies/tutorial002_an.py!} ``` //// @@ -206,7 +206,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="10" -{!> ../../../docs_src/dependencies/tutorial002_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_py310.py!} ``` //// @@ -220,7 +220,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="12" -{!> ../../../docs_src/dependencies/tutorial002.py!} +{!> ../../docs_src/dependencies/tutorial002.py!} ``` //// @@ -230,7 +230,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. //// tab | Python 3.10+ ```Python hl_lines="8" -{!> ../../../docs_src/dependencies/tutorial001_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// @@ -238,7 +238,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/dependencies/tutorial001_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py39.py!} ``` //// @@ -246,7 +246,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/dependencies/tutorial001_an.py!} +{!> ../../docs_src/dependencies/tutorial001_an.py!} ``` //// @@ -260,7 +260,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="6" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -274,7 +274,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="9" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -296,7 +296,7 @@ Jetzt können Sie Ihre AbhĂ€ngigkeit mithilfe dieser Klasse deklarieren. //// tab | Python 3.10+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial002_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_an_py310.py!} ``` //// @@ -304,7 +304,7 @@ Jetzt können Sie Ihre AbhĂ€ngigkeit mithilfe dieser Klasse deklarieren. //// tab | Python 3.9+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial002_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial002_an_py39.py!} ``` //// @@ -312,7 +312,7 @@ Jetzt können Sie Ihre AbhĂ€ngigkeit mithilfe dieser Klasse deklarieren. //// tab | Python 3.8+ ```Python hl_lines="20" -{!> ../../../docs_src/dependencies/tutorial002_an.py!} +{!> ../../docs_src/dependencies/tutorial002_an.py!} ``` //// @@ -326,7 +326,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial002_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_py310.py!} ``` //// @@ -340,7 +340,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial002.py!} +{!> ../../docs_src/dependencies/tutorial002.py!} ``` //// @@ -440,7 +440,7 @@ commons = Depends(CommonQueryParams) //// tab | Python 3.10+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial003_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial003_an_py310.py!} ``` //// @@ -448,7 +448,7 @@ commons = Depends(CommonQueryParams) //// tab | Python 3.9+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial003_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial003_an_py39.py!} ``` //// @@ -456,7 +456,7 @@ commons = Depends(CommonQueryParams) //// tab | Python 3.8+ ```Python hl_lines="20" -{!> ../../../docs_src/dependencies/tutorial003_an.py!} +{!> ../../docs_src/dependencies/tutorial003_an.py!} ``` //// @@ -470,7 +470,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial003_py310.py!} +{!> ../../docs_src/dependencies/tutorial003_py310.py!} ``` //// @@ -484,7 +484,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial003.py!} +{!> ../../docs_src/dependencies/tutorial003.py!} ``` //// @@ -578,7 +578,7 @@ Dasselbe Beispiel wĂŒrde dann so aussehen: //// tab | Python 3.10+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial004_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial004_an_py310.py!} ``` //// @@ -586,7 +586,7 @@ Dasselbe Beispiel wĂŒrde dann so aussehen: //// tab | Python 3.9+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial004_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial004_an_py39.py!} ``` //// @@ -594,7 +594,7 @@ Dasselbe Beispiel wĂŒrde dann so aussehen: //// tab | Python 3.8+ ```Python hl_lines="20" -{!> ../../../docs_src/dependencies/tutorial004_an.py!} +{!> ../../docs_src/dependencies/tutorial004_an.py!} ``` //// @@ -608,7 +608,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial004_py310.py!} +{!> ../../docs_src/dependencies/tutorial004_py310.py!} ``` //// @@ -622,7 +622,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial004.py!} +{!> ../../docs_src/dependencies/tutorial004.py!} ``` //// diff --git a/docs/de/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md b/docs/de/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md index 47d6453c2..3bb261e44 100644 --- a/docs/de/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md +++ b/docs/de/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md @@ -17,7 +17,7 @@ Es sollte eine `list`e von `Depends()` sein: //// tab | Python 3.9+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial006_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial006_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ Es sollte eine `list`e von `Depends()` sein: //// tab | Python 3.8+ ```Python hl_lines="18" -{!> ../../../docs_src/dependencies/tutorial006_an.py!} +{!> ../../docs_src/dependencies/tutorial006_an.py!} ``` //// @@ -39,7 +39,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial006.py!} +{!> ../../docs_src/dependencies/tutorial006.py!} ``` //// @@ -75,7 +75,7 @@ Sie können Anforderungen fĂŒr einen Request (wie Header) oder andere UnterabhĂ€ //// tab | Python 3.9+ ```Python hl_lines="8 13" -{!> ../../../docs_src/dependencies/tutorial006_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial006_an_py39.py!} ``` //// @@ -83,7 +83,7 @@ Sie können Anforderungen fĂŒr einen Request (wie Header) oder andere UnterabhĂ€ //// tab | Python 3.8+ ```Python hl_lines="7 12" -{!> ../../../docs_src/dependencies/tutorial006_an.py!} +{!> ../../docs_src/dependencies/tutorial006_an.py!} ``` //// @@ -97,7 +97,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="6 11" -{!> ../../../docs_src/dependencies/tutorial006.py!} +{!> ../../docs_src/dependencies/tutorial006.py!} ``` //// @@ -109,7 +109,7 @@ Die AbhĂ€ngigkeiten können Exceptions `raise`n, genau wie normale AbhĂ€ngigkeit //// tab | Python 3.9+ ```Python hl_lines="10 15" -{!> ../../../docs_src/dependencies/tutorial006_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial006_an_py39.py!} ``` //// @@ -117,7 +117,7 @@ Die AbhĂ€ngigkeiten können Exceptions `raise`n, genau wie normale AbhĂ€ngigkeit //// tab | Python 3.8+ ```Python hl_lines="9 14" -{!> ../../../docs_src/dependencies/tutorial006_an.py!} +{!> ../../docs_src/dependencies/tutorial006_an.py!} ``` //// @@ -131,7 +131,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="8 13" -{!> ../../../docs_src/dependencies/tutorial006.py!} +{!> ../../docs_src/dependencies/tutorial006.py!} ``` //// @@ -145,7 +145,7 @@ Sie können also eine normale AbhĂ€ngigkeit (die einen Wert zurĂŒckgibt), die Si //// tab | Python 3.9+ ```Python hl_lines="11 16" -{!> ../../../docs_src/dependencies/tutorial006_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial006_an_py39.py!} ``` //// @@ -153,7 +153,7 @@ Sie können also eine normale AbhĂ€ngigkeit (die einen Wert zurĂŒckgibt), die Si //// tab | Python 3.8+ ```Python hl_lines="10 15" -{!> ../../../docs_src/dependencies/tutorial006_an.py!} +{!> ../../docs_src/dependencies/tutorial006_an.py!} ``` //// @@ -167,7 +167,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="9 14" -{!> ../../../docs_src/dependencies/tutorial006.py!} +{!> ../../docs_src/dependencies/tutorial006.py!} ``` //// diff --git a/docs/de/docs/tutorial/dependencies/dependencies-with-yield.md b/docs/de/docs/tutorial/dependencies/dependencies-with-yield.md index 9c2e6dd86..48b057e28 100644 --- a/docs/de/docs/tutorial/dependencies/dependencies-with-yield.md +++ b/docs/de/docs/tutorial/dependencies/dependencies-with-yield.md @@ -30,19 +30,19 @@ Sie könnten damit beispielsweise eine Datenbanksession erstellen und diese nach Nur der Code vor und einschließlich der `yield`-Anweisung wird ausgefĂŒhrt, bevor eine Response erzeugt wird: ```Python hl_lines="2-4" -{!../../../docs_src/dependencies/tutorial007.py!} +{!../../docs_src/dependencies/tutorial007.py!} ``` Der ge`yield`ete Wert ist das, was in *Pfadoperationen* und andere AbhĂ€ngigkeiten eingefĂŒgt wird: ```Python hl_lines="4" -{!../../../docs_src/dependencies/tutorial007.py!} +{!../../docs_src/dependencies/tutorial007.py!} ``` Der auf die `yield`-Anweisung folgende Code wird ausgefĂŒhrt, nachdem die Response gesendet wurde: ```Python hl_lines="5-6" -{!../../../docs_src/dependencies/tutorial007.py!} +{!../../docs_src/dependencies/tutorial007.py!} ``` /// tip | "Tipp" @@ -64,7 +64,7 @@ Sie können also mit `except SomeException` diese bestimmte Exception innerhalb Auf die gleiche Weise können Sie `finally` verwenden, um sicherzustellen, dass die Exit-Schritte ausgefĂŒhrt werden, unabhĂ€ngig davon, ob eine Exception geworfen wurde oder nicht. ```Python hl_lines="3 5" -{!../../../docs_src/dependencies/tutorial007.py!} +{!../../docs_src/dependencies/tutorial007.py!} ``` ## UnterabhĂ€ngigkeiten mit `yield`. @@ -78,7 +78,7 @@ Beispielsweise kann `dependency_c` von `dependency_b` und `dependency_b` von `de //// tab | Python 3.9+ ```Python hl_lines="6 14 22" -{!> ../../../docs_src/dependencies/tutorial008_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial008_an_py39.py!} ``` //// @@ -86,7 +86,7 @@ Beispielsweise kann `dependency_c` von `dependency_b` und `dependency_b` von `de //// tab | Python 3.8+ ```Python hl_lines="5 13 21" -{!> ../../../docs_src/dependencies/tutorial008_an.py!} +{!> ../../docs_src/dependencies/tutorial008_an.py!} ``` //// @@ -100,7 +100,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="4 12 20" -{!> ../../../docs_src/dependencies/tutorial008.py!} +{!> ../../docs_src/dependencies/tutorial008.py!} ``` //// @@ -114,7 +114,7 @@ Und wiederum benötigt `dependency_b` den Wert von `dependency_a` (hier `dep_a` //// tab | Python 3.9+ ```Python hl_lines="18-19 26-27" -{!> ../../../docs_src/dependencies/tutorial008_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial008_an_py39.py!} ``` //// @@ -122,7 +122,7 @@ Und wiederum benötigt `dependency_b` den Wert von `dependency_a` (hier `dep_a` //// tab | Python 3.8+ ```Python hl_lines="17-18 25-26" -{!> ../../../docs_src/dependencies/tutorial008_an.py!} +{!> ../../docs_src/dependencies/tutorial008_an.py!} ``` //// @@ -136,7 +136,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="16-17 24-25" -{!> ../../../docs_src/dependencies/tutorial008.py!} +{!> ../../docs_src/dependencies/tutorial008.py!} ``` //// @@ -174,7 +174,7 @@ Aber es ist fĂŒr Sie da, wenn Sie es brauchen. đŸ€“ //// tab | Python 3.9+ ```Python hl_lines="18-22 31" -{!> ../../../docs_src/dependencies/tutorial008b_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial008b_an_py39.py!} ``` //// @@ -182,7 +182,7 @@ Aber es ist fĂŒr Sie da, wenn Sie es brauchen. đŸ€“ //// tab | Python 3.8+ ```Python hl_lines="17-21 30" -{!> ../../../docs_src/dependencies/tutorial008b_an.py!} +{!> ../../docs_src/dependencies/tutorial008b_an.py!} ``` //// @@ -196,7 +196,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="16-20 29" -{!> ../../../docs_src/dependencies/tutorial008b.py!} +{!> ../../docs_src/dependencies/tutorial008b.py!} ``` //// @@ -321,7 +321,7 @@ In Python können Sie Kontextmanager erstellen, indem Sie ../../../docs_src/dependencies/tutorial012_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial012_an_py39.py!} ``` //// @@ -17,7 +17,7 @@ In diesem Fall werden sie auf alle *Pfadoperationen* in der Anwendung angewendet //// tab | Python 3.8+ ```Python hl_lines="16" -{!> ../../../docs_src/dependencies/tutorial012_an.py!} +{!> ../../docs_src/dependencies/tutorial012_an.py!} ``` //// @@ -31,7 +31,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="15" -{!> ../../../docs_src/dependencies/tutorial012.py!} +{!> ../../docs_src/dependencies/tutorial012.py!} ``` //// diff --git a/docs/de/docs/tutorial/dependencies/index.md b/docs/de/docs/tutorial/dependencies/index.md index f7d9ed510..494708d19 100644 --- a/docs/de/docs/tutorial/dependencies/index.md +++ b/docs/de/docs/tutorial/dependencies/index.md @@ -33,7 +33,7 @@ Es handelt sich einfach um eine Funktion, die die gleichen Parameter entgegennim //// tab | Python 3.10+ ```Python hl_lines="8-9" -{!> ../../../docs_src/dependencies/tutorial001_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// @@ -41,7 +41,7 @@ Es handelt sich einfach um eine Funktion, die die gleichen Parameter entgegennim //// tab | Python 3.9+ ```Python hl_lines="8-11" -{!> ../../../docs_src/dependencies/tutorial001_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py39.py!} ``` //// @@ -49,7 +49,7 @@ Es handelt sich einfach um eine Funktion, die die gleichen Parameter entgegennim //// tab | Python 3.8+ ```Python hl_lines="9-12" -{!> ../../../docs_src/dependencies/tutorial001_an.py!} +{!> ../../docs_src/dependencies/tutorial001_an.py!} ``` //// @@ -63,7 +63,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="6-7" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -77,7 +77,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="8-11" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -115,7 +115,7 @@ Bitte [aktualisieren Sie FastAPI](../../deployment/versions.md#upgrade-der-fasta //// tab | Python 3.10+ ```Python hl_lines="3" -{!> ../../../docs_src/dependencies/tutorial001_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// @@ -123,7 +123,7 @@ Bitte [aktualisieren Sie FastAPI](../../deployment/versions.md#upgrade-der-fasta //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/dependencies/tutorial001_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py39.py!} ``` //// @@ -131,7 +131,7 @@ Bitte [aktualisieren Sie FastAPI](../../deployment/versions.md#upgrade-der-fasta //// tab | Python 3.8+ ```Python hl_lines="3" -{!> ../../../docs_src/dependencies/tutorial001_an.py!} +{!> ../../docs_src/dependencies/tutorial001_an.py!} ``` //// @@ -145,7 +145,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="1" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -159,7 +159,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="3" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -171,7 +171,7 @@ So wie auch `Body`, `Query`, usw., verwenden Sie `Depends` mit den Parametern Ih //// tab | Python 3.10+ ```Python hl_lines="13 18" -{!> ../../../docs_src/dependencies/tutorial001_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// @@ -179,7 +179,7 @@ So wie auch `Body`, `Query`, usw., verwenden Sie `Depends` mit den Parametern Ih //// tab | Python 3.9+ ```Python hl_lines="15 20" -{!> ../../../docs_src/dependencies/tutorial001_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py39.py!} ``` //// @@ -187,7 +187,7 @@ So wie auch `Body`, `Query`, usw., verwenden Sie `Depends` mit den Parametern Ih //// tab | Python 3.8+ ```Python hl_lines="16 21" -{!> ../../../docs_src/dependencies/tutorial001_an.py!} +{!> ../../docs_src/dependencies/tutorial001_an.py!} ``` //// @@ -201,7 +201,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="11 16" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -215,7 +215,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="15 20" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -278,7 +278,7 @@ Da wir jedoch `Annotated` verwenden, können wir diesen `Annotated`-Wert in eine //// tab | Python 3.10+ ```Python hl_lines="12 16 21" -{!> ../../../docs_src/dependencies/tutorial001_02_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_02_an_py310.py!} ``` //// @@ -286,7 +286,7 @@ Da wir jedoch `Annotated` verwenden, können wir diesen `Annotated`-Wert in eine //// tab | Python 3.9+ ```Python hl_lines="14 18 23" -{!> ../../../docs_src/dependencies/tutorial001_02_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_02_an_py39.py!} ``` //// @@ -294,7 +294,7 @@ Da wir jedoch `Annotated` verwenden, können wir diesen `Annotated`-Wert in eine //// tab | Python 3.8+ ```Python hl_lines="15 19 24" -{!> ../../../docs_src/dependencies/tutorial001_02_an.py!} +{!> ../../docs_src/dependencies/tutorial001_02_an.py!} ``` //// diff --git a/docs/de/docs/tutorial/dependencies/sub-dependencies.md b/docs/de/docs/tutorial/dependencies/sub-dependencies.md index 12664a8cd..a20aed63b 100644 --- a/docs/de/docs/tutorial/dependencies/sub-dependencies.md +++ b/docs/de/docs/tutorial/dependencies/sub-dependencies.md @@ -13,7 +13,7 @@ Sie könnten eine erste AbhĂ€ngigkeit („Dependable“) wie folgt erstellen: //// tab | Python 3.10+ ```Python hl_lines="8-9" -{!> ../../../docs_src/dependencies/tutorial005_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_an_py310.py!} ``` //// @@ -21,7 +21,7 @@ Sie könnten eine erste AbhĂ€ngigkeit („Dependable“) wie folgt erstellen: //// tab | Python 3.9+ ```Python hl_lines="8-9" -{!> ../../../docs_src/dependencies/tutorial005_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial005_an_py39.py!} ``` //// @@ -29,7 +29,7 @@ Sie könnten eine erste AbhĂ€ngigkeit („Dependable“) wie folgt erstellen: //// tab | Python 3.8+ ```Python hl_lines="9-10" -{!> ../../../docs_src/dependencies/tutorial005_an.py!} +{!> ../../docs_src/dependencies/tutorial005_an.py!} ``` //// @@ -43,7 +43,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="6-7" -{!> ../../../docs_src/dependencies/tutorial005_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_py310.py!} ``` //// @@ -57,7 +57,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="8-9" -{!> ../../../docs_src/dependencies/tutorial005.py!} +{!> ../../docs_src/dependencies/tutorial005.py!} ``` //// @@ -73,7 +73,7 @@ Dann können Sie eine weitere AbhĂ€ngigkeitsfunktion (ein „Dependable“) erst //// tab | Python 3.10+ ```Python hl_lines="13" -{!> ../../../docs_src/dependencies/tutorial005_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_an_py310.py!} ``` //// @@ -81,7 +81,7 @@ Dann können Sie eine weitere AbhĂ€ngigkeitsfunktion (ein „Dependable“) erst //// tab | Python 3.9+ ```Python hl_lines="13" -{!> ../../../docs_src/dependencies/tutorial005_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial005_an_py39.py!} ``` //// @@ -89,7 +89,7 @@ Dann können Sie eine weitere AbhĂ€ngigkeitsfunktion (ein „Dependable“) erst //// tab | Python 3.8+ ```Python hl_lines="14" -{!> ../../../docs_src/dependencies/tutorial005_an.py!} +{!> ../../docs_src/dependencies/tutorial005_an.py!} ``` //// @@ -103,7 +103,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="11" -{!> ../../../docs_src/dependencies/tutorial005_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_py310.py!} ``` //// @@ -117,7 +117,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="13" -{!> ../../../docs_src/dependencies/tutorial005.py!} +{!> ../../docs_src/dependencies/tutorial005.py!} ``` //// @@ -136,7 +136,7 @@ Diese AbhĂ€ngigkeit verwenden wir nun wie folgt: //// tab | Python 3.10+ ```Python hl_lines="23" -{!> ../../../docs_src/dependencies/tutorial005_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_an_py310.py!} ``` //// @@ -144,7 +144,7 @@ Diese AbhĂ€ngigkeit verwenden wir nun wie folgt: //// tab | Python 3.9+ ```Python hl_lines="23" -{!> ../../../docs_src/dependencies/tutorial005_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial005_an_py39.py!} ``` //// @@ -152,7 +152,7 @@ Diese AbhĂ€ngigkeit verwenden wir nun wie folgt: //// tab | Python 3.8+ ```Python hl_lines="24" -{!> ../../../docs_src/dependencies/tutorial005_an.py!} +{!> ../../docs_src/dependencies/tutorial005_an.py!} ``` //// @@ -166,7 +166,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial005_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_py310.py!} ``` //// @@ -180,7 +180,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="22" -{!> ../../../docs_src/dependencies/tutorial005.py!} +{!> ../../docs_src/dependencies/tutorial005.py!} ``` //// diff --git a/docs/de/docs/tutorial/encoder.md b/docs/de/docs/tutorial/encoder.md index 38a881b4f..0ab72b8dd 100644 --- a/docs/de/docs/tutorial/encoder.md +++ b/docs/de/docs/tutorial/encoder.md @@ -23,7 +23,7 @@ Es nimmt ein Objekt entgegen, wie etwa ein Pydantic-Modell, und gibt eine JSON-k //// tab | Python 3.10+ ```Python hl_lines="4 21" -{!> ../../../docs_src/encoder/tutorial001_py310.py!} +{!> ../../docs_src/encoder/tutorial001_py310.py!} ``` //// @@ -31,7 +31,7 @@ Es nimmt ein Objekt entgegen, wie etwa ein Pydantic-Modell, und gibt eine JSON-k //// tab | Python 3.8+ ```Python hl_lines="5 22" -{!> ../../../docs_src/encoder/tutorial001.py!} +{!> ../../docs_src/encoder/tutorial001.py!} ``` //// diff --git a/docs/de/docs/tutorial/extra-data-types.md b/docs/de/docs/tutorial/extra-data-types.md index 334a232a8..7581b4f87 100644 --- a/docs/de/docs/tutorial/extra-data-types.md +++ b/docs/de/docs/tutorial/extra-data-types.md @@ -58,7 +58,7 @@ Hier ist ein Beispiel fĂŒr eine *Pfadoperation* mit Parametern, die einige der o //// tab | Python 3.10+ ```Python hl_lines="1 3 12-16" -{!> ../../../docs_src/extra_data_types/tutorial001_an_py310.py!} +{!> ../../docs_src/extra_data_types/tutorial001_an_py310.py!} ``` //// @@ -66,7 +66,7 @@ Hier ist ein Beispiel fĂŒr eine *Pfadoperation* mit Parametern, die einige der o //// tab | Python 3.9+ ```Python hl_lines="1 3 12-16" -{!> ../../../docs_src/extra_data_types/tutorial001_an_py39.py!} +{!> ../../docs_src/extra_data_types/tutorial001_an_py39.py!} ``` //// @@ -74,7 +74,7 @@ Hier ist ein Beispiel fĂŒr eine *Pfadoperation* mit Parametern, die einige der o //// tab | Python 3.8+ ```Python hl_lines="1 3 13-17" -{!> ../../../docs_src/extra_data_types/tutorial001_an.py!} +{!> ../../docs_src/extra_data_types/tutorial001_an.py!} ``` //// @@ -88,7 +88,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="1 2 11-15" -{!> ../../../docs_src/extra_data_types/tutorial001_py310.py!} +{!> ../../docs_src/extra_data_types/tutorial001_py310.py!} ``` //// @@ -102,7 +102,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="1 2 12-16" -{!> ../../../docs_src/extra_data_types/tutorial001.py!} +{!> ../../docs_src/extra_data_types/tutorial001.py!} ``` //// @@ -112,7 +112,7 @@ Beachten Sie, dass die Parameter innerhalb der Funktion ihren natĂŒrlichen Daten //// tab | Python 3.10+ ```Python hl_lines="18-19" -{!> ../../../docs_src/extra_data_types/tutorial001_an_py310.py!} +{!> ../../docs_src/extra_data_types/tutorial001_an_py310.py!} ``` //// @@ -120,7 +120,7 @@ Beachten Sie, dass die Parameter innerhalb der Funktion ihren natĂŒrlichen Daten //// tab | Python 3.9+ ```Python hl_lines="18-19" -{!> ../../../docs_src/extra_data_types/tutorial001_an_py39.py!} +{!> ../../docs_src/extra_data_types/tutorial001_an_py39.py!} ``` //// @@ -128,7 +128,7 @@ Beachten Sie, dass die Parameter innerhalb der Funktion ihren natĂŒrlichen Daten //// tab | Python 3.8+ ```Python hl_lines="19-20" -{!> ../../../docs_src/extra_data_types/tutorial001_an.py!} +{!> ../../docs_src/extra_data_types/tutorial001_an.py!} ``` //// @@ -142,7 +142,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="17-18" -{!> ../../../docs_src/extra_data_types/tutorial001_py310.py!} +{!> ../../docs_src/extra_data_types/tutorial001_py310.py!} ``` //// @@ -156,7 +156,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="18-19" -{!> ../../../docs_src/extra_data_types/tutorial001.py!} +{!> ../../docs_src/extra_data_types/tutorial001.py!} ``` //// diff --git a/docs/de/docs/tutorial/extra-models.md b/docs/de/docs/tutorial/extra-models.md index cfd0230eb..14e842065 100644 --- a/docs/de/docs/tutorial/extra-models.md +++ b/docs/de/docs/tutorial/extra-models.md @@ -23,7 +23,7 @@ Hier der generelle Weg, wie die Modelle mit ihren Passwort-Feldern aussehen kön //// tab | Python 3.10+ ```Python hl_lines="7 9 14 20 22 27-28 31-33 38-39" -{!> ../../../docs_src/extra_models/tutorial001_py310.py!} +{!> ../../docs_src/extra_models/tutorial001_py310.py!} ``` //// @@ -31,7 +31,7 @@ Hier der generelle Weg, wie die Modelle mit ihren Passwort-Feldern aussehen kön //// tab | Python 3.8+ ```Python hl_lines="9 11 16 22 24 29-30 33-35 40-41" -{!> ../../../docs_src/extra_models/tutorial001.py!} +{!> ../../docs_src/extra_models/tutorial001.py!} ``` //// @@ -179,7 +179,7 @@ Auf diese Weise beschreiben wir nur noch die Unterschiede zwischen den Modellen //// tab | Python 3.10+ ```Python hl_lines="7 13-14 17-18 21-22" -{!> ../../../docs_src/extra_models/tutorial002_py310.py!} +{!> ../../docs_src/extra_models/tutorial002_py310.py!} ``` //// @@ -187,7 +187,7 @@ Auf diese Weise beschreiben wir nur noch die Unterschiede zwischen den Modellen //// tab | Python 3.8+ ```Python hl_lines="9 15-16 19-20 23-24" -{!> ../../../docs_src/extra_models/tutorial002.py!} +{!> ../../docs_src/extra_models/tutorial002.py!} ``` //// @@ -209,7 +209,7 @@ Listen Sie, wenn Sie eine ../../../docs_src/extra_models/tutorial003_py310.py!} +{!> ../../docs_src/extra_models/tutorial003_py310.py!} ``` //// @@ -217,7 +217,7 @@ Listen Sie, wenn Sie eine ../../../docs_src/extra_models/tutorial003.py!} +{!> ../../docs_src/extra_models/tutorial003.py!} ``` //// @@ -245,7 +245,7 @@ Verwenden Sie dafĂŒr Pythons Standard `typing.List` (oder nur `list` in Python 3 //// tab | Python 3.9+ ```Python hl_lines="18" -{!> ../../../docs_src/extra_models/tutorial004_py39.py!} +{!> ../../docs_src/extra_models/tutorial004_py39.py!} ``` //// @@ -253,7 +253,7 @@ Verwenden Sie dafĂŒr Pythons Standard `typing.List` (oder nur `list` in Python 3 //// tab | Python 3.8+ ```Python hl_lines="1 20" -{!> ../../../docs_src/extra_models/tutorial004.py!} +{!> ../../docs_src/extra_models/tutorial004.py!} ``` //// @@ -269,7 +269,7 @@ In diesem Fall können Sie `typing.Dict` verwenden (oder nur `dict` in Python 3. //// tab | Python 3.9+ ```Python hl_lines="6" -{!> ../../../docs_src/extra_models/tutorial005_py39.py!} +{!> ../../docs_src/extra_models/tutorial005_py39.py!} ``` //// @@ -277,7 +277,7 @@ In diesem Fall können Sie `typing.Dict` verwenden (oder nur `dict` in Python 3. //// tab | Python 3.8+ ```Python hl_lines="1 8" -{!> ../../../docs_src/extra_models/tutorial005.py!} +{!> ../../docs_src/extra_models/tutorial005.py!} ``` //// diff --git a/docs/de/docs/tutorial/first-steps.md b/docs/de/docs/tutorial/first-steps.md index b9e38707c..fe3886b70 100644 --- a/docs/de/docs/tutorial/first-steps.md +++ b/docs/de/docs/tutorial/first-steps.md @@ -3,7 +3,7 @@ Die einfachste FastAPI-Datei könnte wie folgt aussehen: ```Python -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` Kopieren Sie dies in eine Datei `main.py`. @@ -134,7 +134,7 @@ Ebenfalls können Sie es verwenden, um automatisch Code fĂŒr Clients zu generier ### Schritt 1: Importieren von `FastAPI` ```Python hl_lines="1" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` `FastAPI` ist eine Python-Klasse, die die gesamte FunktionalitĂ€t fĂŒr Ihre API bereitstellt. @@ -150,7 +150,7 @@ Sie können alle ../../../docs_src/header_params/tutorial001_an_py310.py!} +{!> ../../docs_src/header_params/tutorial001_an_py310.py!} ``` //// @@ -17,7 +17,7 @@ Importieren Sie zuerst `Header`: //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/header_params/tutorial001_an_py39.py!} +{!> ../../docs_src/header_params/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ Importieren Sie zuerst `Header`: //// tab | Python 3.8+ ```Python hl_lines="3" -{!> ../../../docs_src/header_params/tutorial001_an.py!} +{!> ../../docs_src/header_params/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="1" -{!> ../../../docs_src/header_params/tutorial001_py310.py!} +{!> ../../docs_src/header_params/tutorial001_py310.py!} ``` //// @@ -53,7 +53,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="3" -{!> ../../../docs_src/header_params/tutorial001.py!} +{!> ../../docs_src/header_params/tutorial001.py!} ``` //// @@ -67,7 +67,7 @@ Der erste Wert ist der Typ. Sie können `Header` die gehabten Extra Validierungs //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial001_an_py310.py!} +{!> ../../docs_src/header_params/tutorial001_an_py310.py!} ``` //// @@ -75,7 +75,7 @@ Der erste Wert ist der Typ. Sie können `Header` die gehabten Extra Validierungs //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial001_an_py39.py!} +{!> ../../docs_src/header_params/tutorial001_an_py39.py!} ``` //// @@ -83,7 +83,7 @@ Der erste Wert ist der Typ. Sie können `Header` die gehabten Extra Validierungs //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/header_params/tutorial001_an.py!} +{!> ../../docs_src/header_params/tutorial001_an.py!} ``` //// @@ -97,7 +97,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="7" -{!> ../../../docs_src/header_params/tutorial001_py310.py!} +{!> ../../docs_src/header_params/tutorial001_py310.py!} ``` //// @@ -111,7 +111,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial001.py!} +{!> ../../docs_src/header_params/tutorial001.py!} ``` //// @@ -149,7 +149,7 @@ Wenn Sie aus irgendeinem Grund das automatische Konvertieren von Unterstrichen z //// tab | Python 3.10+ ```Python hl_lines="10" -{!> ../../../docs_src/header_params/tutorial002_an_py310.py!} +{!> ../../docs_src/header_params/tutorial002_an_py310.py!} ``` //// @@ -157,7 +157,7 @@ Wenn Sie aus irgendeinem Grund das automatische Konvertieren von Unterstrichen z //// tab | Python 3.9+ ```Python hl_lines="11" -{!> ../../../docs_src/header_params/tutorial002_an_py39.py!} +{!> ../../docs_src/header_params/tutorial002_an_py39.py!} ``` //// @@ -165,7 +165,7 @@ Wenn Sie aus irgendeinem Grund das automatische Konvertieren von Unterstrichen z //// tab | Python 3.8+ ```Python hl_lines="12" -{!> ../../../docs_src/header_params/tutorial002_an.py!} +{!> ../../docs_src/header_params/tutorial002_an.py!} ``` //// @@ -179,7 +179,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="8" -{!> ../../../docs_src/header_params/tutorial002_py310.py!} +{!> ../../docs_src/header_params/tutorial002_py310.py!} ``` //// @@ -193,7 +193,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="10" -{!> ../../../docs_src/header_params/tutorial002.py!} +{!> ../../docs_src/header_params/tutorial002.py!} ``` //// @@ -217,7 +217,7 @@ Um zum Beispiel einen Header `X-Token` zu deklarieren, der mehrmals vorkommen ka //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial003_an_py310.py!} +{!> ../../docs_src/header_params/tutorial003_an_py310.py!} ``` //// @@ -225,7 +225,7 @@ Um zum Beispiel einen Header `X-Token` zu deklarieren, der mehrmals vorkommen ka //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial003_an_py39.py!} +{!> ../../docs_src/header_params/tutorial003_an_py39.py!} ``` //// @@ -233,7 +233,7 @@ Um zum Beispiel einen Header `X-Token` zu deklarieren, der mehrmals vorkommen ka //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/header_params/tutorial003_an.py!} +{!> ../../docs_src/header_params/tutorial003_an.py!} ``` //// @@ -247,7 +247,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="7" -{!> ../../../docs_src/header_params/tutorial003_py310.py!} +{!> ../../docs_src/header_params/tutorial003_py310.py!} ``` //// @@ -261,7 +261,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial003_py39.py!} +{!> ../../docs_src/header_params/tutorial003_py39.py!} ``` //// @@ -275,7 +275,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial003.py!} +{!> ../../docs_src/header_params/tutorial003.py!} ``` //// diff --git a/docs/de/docs/tutorial/metadata.md b/docs/de/docs/tutorial/metadata.md index 3ab56ff3e..98724e1e8 100644 --- a/docs/de/docs/tutorial/metadata.md +++ b/docs/de/docs/tutorial/metadata.md @@ -19,7 +19,7 @@ Sie können die folgenden Felder festlegen, welche in der OpenAPI-Spezifikation Sie können diese wie folgt setzen: ```Python hl_lines="3-16 19-32" -{!../../../docs_src/metadata/tutorial001.py!} +{!../../docs_src/metadata/tutorial001.py!} ``` /// tip | "Tipp" @@ -39,7 +39,7 @@ Seit OpenAPI 3.1.0 und FastAPI 0.99.0 können Sie die `license_info` auch mit ei Zum Beispiel: ```Python hl_lines="31" -{!../../../docs_src/metadata/tutorial001_1.py!} +{!../../docs_src/metadata/tutorial001_1.py!} ``` ## Metadaten fĂŒr Tags @@ -63,7 +63,7 @@ Versuchen wir das an einem Beispiel mit Tags fĂŒr `users` und `items`. Erstellen Sie Metadaten fĂŒr Ihre Tags und ĂŒbergeben Sie sie an den Parameter `openapi_tags`: ```Python hl_lines="3-16 18" -{!../../../docs_src/metadata/tutorial004.py!} +{!../../docs_src/metadata/tutorial004.py!} ``` Beachten Sie, dass Sie Markdown in den Beschreibungen verwenden können. Beispielsweise wird „login“ in Fettschrift (**login**) und „fancy“ in Kursivschrift (_fancy_) angezeigt. @@ -79,7 +79,7 @@ Sie mĂŒssen nicht fĂŒr alle von Ihnen verwendeten Tags Metadaten hinzufĂŒgen. Verwenden Sie den Parameter `tags` mit Ihren *Pfadoperationen* (und `APIRouter`n), um diese verschiedenen Tags zuzuweisen: ```Python hl_lines="21 26" -{!../../../docs_src/metadata/tutorial004.py!} +{!../../docs_src/metadata/tutorial004.py!} ``` /// info @@ -109,7 +109,7 @@ Sie können das aber mit dem Parameter `openapi_url` konfigurieren. Um beispielsweise festzulegen, dass es unter `/api/v1/openapi.json` bereitgestellt wird: ```Python hl_lines="3" -{!../../../docs_src/metadata/tutorial002.py!} +{!../../docs_src/metadata/tutorial002.py!} ``` Wenn Sie das OpenAPI-Schema vollstĂ€ndig deaktivieren möchten, können Sie `openapi_url=None` festlegen, wodurch auch die DokumentationsbenutzeroberflĂ€chen deaktiviert werden, die es verwenden. @@ -128,5 +128,5 @@ Sie können die beiden enthaltenen DokumentationsbenutzeroberflĂ€chen konfigurie Um beispielsweise Swagger UI so einzustellen, dass sie unter `/documentation` bereitgestellt wird, und ReDoc zu deaktivieren: ```Python hl_lines="3" -{!../../../docs_src/metadata/tutorial003.py!} +{!../../docs_src/metadata/tutorial003.py!} ``` diff --git a/docs/de/docs/tutorial/middleware.md b/docs/de/docs/tutorial/middleware.md index 62a0d1613..410dc0247 100644 --- a/docs/de/docs/tutorial/middleware.md +++ b/docs/de/docs/tutorial/middleware.md @@ -32,7 +32,7 @@ Die Middleware-Funktion erhĂ€lt: * Sie können die `response` dann weiter modifizieren, bevor Sie sie zurĂŒckgeben. ```Python hl_lines="8-9 11 14" -{!../../../docs_src/middleware/tutorial001.py!} +{!../../docs_src/middleware/tutorial001.py!} ``` /// tip | "Tipp" @@ -60,7 +60,7 @@ Und auch nachdem die `response` generiert wurde, bevor sie zurĂŒckgegeben wird. Sie könnten beispielsweise einen benutzerdefinierten Header `X-Process-Time` hinzufĂŒgen, der die Zeit in Sekunden enthĂ€lt, die benötigt wurde, um den Request zu verarbeiten und eine Response zu generieren: ```Python hl_lines="10 12-13" -{!../../../docs_src/middleware/tutorial001.py!} +{!../../docs_src/middleware/tutorial001.py!} ``` ## Andere Middlewares diff --git a/docs/de/docs/tutorial/path-operation-configuration.md b/docs/de/docs/tutorial/path-operation-configuration.md index 03980b7dd..411916e9c 100644 --- a/docs/de/docs/tutorial/path-operation-configuration.md +++ b/docs/de/docs/tutorial/path-operation-configuration.md @@ -19,7 +19,7 @@ Aber falls Sie sich nicht mehr erinnern, wofĂŒr jede Nummer steht, können Sie d //// tab | Python 3.10+ ```Python hl_lines="1 15" -{!> ../../../docs_src/path_operation_configuration/tutorial001_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial001_py310.py!} ``` //// @@ -27,7 +27,7 @@ Aber falls Sie sich nicht mehr erinnern, wofĂŒr jede Nummer steht, können Sie d //// tab | Python 3.9+ ```Python hl_lines="3 17" -{!> ../../../docs_src/path_operation_configuration/tutorial001_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial001_py39.py!} ``` //// @@ -35,7 +35,7 @@ Aber falls Sie sich nicht mehr erinnern, wofĂŒr jede Nummer steht, können Sie d //// tab | Python 3.8+ ```Python hl_lines="3 17" -{!> ../../../docs_src/path_operation_configuration/tutorial001.py!} +{!> ../../docs_src/path_operation_configuration/tutorial001.py!} ``` //// @@ -57,7 +57,7 @@ Sie können Ihrer *Pfadoperation* Tags hinzufĂŒgen, mittels des Parameters `tags //// tab | Python 3.10+ ```Python hl_lines="15 20 25" -{!> ../../../docs_src/path_operation_configuration/tutorial002_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial002_py310.py!} ``` //// @@ -65,7 +65,7 @@ Sie können Ihrer *Pfadoperation* Tags hinzufĂŒgen, mittels des Parameters `tags //// tab | Python 3.9+ ```Python hl_lines="17 22 27" -{!> ../../../docs_src/path_operation_configuration/tutorial002_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial002_py39.py!} ``` //// @@ -73,7 +73,7 @@ Sie können Ihrer *Pfadoperation* Tags hinzufĂŒgen, mittels des Parameters `tags //// tab | Python 3.8+ ```Python hl_lines="17 22 27" -{!> ../../../docs_src/path_operation_configuration/tutorial002.py!} +{!> ../../docs_src/path_operation_configuration/tutorial002.py!} ``` //// @@ -91,7 +91,7 @@ In diesem Fall macht es Sinn, die Tags in einem `Enum` zu speichern. **FastAPI** unterstĂŒtzt diese genauso wie einfache Strings: ```Python hl_lines="1 8-10 13 18" -{!../../../docs_src/path_operation_configuration/tutorial002b.py!} +{!../../docs_src/path_operation_configuration/tutorial002b.py!} ``` ## Zusammenfassung und Beschreibung @@ -101,7 +101,7 @@ Sie können eine Zusammenfassung (`summary`) und eine Beschreibung (`description //// tab | Python 3.10+ ```Python hl_lines="18-19" -{!> ../../../docs_src/path_operation_configuration/tutorial003_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial003_py310.py!} ``` //// @@ -109,7 +109,7 @@ Sie können eine Zusammenfassung (`summary`) und eine Beschreibung (`description //// tab | Python 3.9+ ```Python hl_lines="20-21" -{!> ../../../docs_src/path_operation_configuration/tutorial003_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial003_py39.py!} ``` //// @@ -117,7 +117,7 @@ Sie können eine Zusammenfassung (`summary`) und eine Beschreibung (`description //// tab | Python 3.8+ ```Python hl_lines="20-21" -{!> ../../../docs_src/path_operation_configuration/tutorial003.py!} +{!> ../../docs_src/path_operation_configuration/tutorial003.py!} ``` //// @@ -131,7 +131,7 @@ Sie können im Docstring ../../../docs_src/path_operation_configuration/tutorial004_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial004_py310.py!} ``` //// @@ -139,7 +139,7 @@ Sie können im Docstring ../../../docs_src/path_operation_configuration/tutorial004_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial004_py39.py!} ``` //// @@ -147,7 +147,7 @@ Sie können im Docstring ../../../docs_src/path_operation_configuration/tutorial004.py!} +{!> ../../docs_src/path_operation_configuration/tutorial004.py!} ``` //// @@ -163,7 +163,7 @@ Die Response können Sie mit dem Parameter `response_description` beschreiben: //// tab | Python 3.10+ ```Python hl_lines="19" -{!> ../../../docs_src/path_operation_configuration/tutorial005_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial005_py310.py!} ``` //// @@ -171,7 +171,7 @@ Die Response können Sie mit dem Parameter `response_description` beschreiben: //// tab | Python 3.9+ ```Python hl_lines="21" -{!> ../../../docs_src/path_operation_configuration/tutorial005_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial005_py39.py!} ``` //// @@ -179,7 +179,7 @@ Die Response können Sie mit dem Parameter `response_description` beschreiben: //// tab | Python 3.8+ ```Python hl_lines="21" -{!> ../../../docs_src/path_operation_configuration/tutorial005.py!} +{!> ../../docs_src/path_operation_configuration/tutorial005.py!} ``` //// @@ -205,7 +205,7 @@ Daher, wenn Sie keine vergeben, wird **FastAPI** automatisch eine fĂŒr „Erfolg Wenn Sie eine *Pfadoperation* als deprecated kennzeichnen möchten, ohne sie zu entfernen, fĂŒgen Sie den Parameter `deprecated` hinzu: ```Python hl_lines="16" -{!../../../docs_src/path_operation_configuration/tutorial006.py!} +{!../../docs_src/path_operation_configuration/tutorial006.py!} ``` Sie wird in der interaktiven Dokumentation gut sichtbar als deprecated markiert werden: diff --git a/docs/de/docs/tutorial/path-params-numeric-validations.md b/docs/de/docs/tutorial/path-params-numeric-validations.md index 3908a0b2d..fc2d5dff1 100644 --- a/docs/de/docs/tutorial/path-params-numeric-validations.md +++ b/docs/de/docs/tutorial/path-params-numeric-validations.md @@ -9,7 +9,7 @@ Importieren Sie zuerst `Path` von `fastapi`, und importieren Sie `Annotated`. //// tab | Python 3.10+ ```Python hl_lines="1 3" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py!} ``` //// @@ -17,7 +17,7 @@ Importieren Sie zuerst `Path` von `fastapi`, und importieren Sie `Annotated`. //// tab | Python 3.9+ ```Python hl_lines="1 3" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ Importieren Sie zuerst `Path` von `fastapi`, und importieren Sie `Annotated`. //// tab | Python 3.8+ ```Python hl_lines="3-4" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="1" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_py310.py!} ``` //// @@ -53,7 +53,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="3" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001.py!} ``` //// @@ -77,7 +77,7 @@ Um zum Beispiel einen `title`-Metadaten-Wert fĂŒr den Pfad-Parameter `item_id` z //// tab | Python 3.10+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py!} ``` //// @@ -85,7 +85,7 @@ Um zum Beispiel einen `title`-Metadaten-Wert fĂŒr den Pfad-Parameter `item_id` z //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_an_py39.py!} ``` //// @@ -93,7 +93,7 @@ Um zum Beispiel einen `title`-Metadaten-Wert fĂŒr den Pfad-Parameter `item_id` z //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_an.py!} ``` //// @@ -107,7 +107,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="8" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_py310.py!} ``` //// @@ -121,7 +121,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001.py!} ``` //// @@ -167,7 +167,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="7" -{!> ../../../docs_src/path_params_numeric_validations/tutorial002.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial002.py!} ``` //// @@ -177,7 +177,7 @@ Aber bedenken Sie, dass Sie dieses Problem nicht haben, wenn Sie `Annotated` ver //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial002_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial002_an_py39.py!} ``` //// @@ -185,7 +185,7 @@ Aber bedenken Sie, dass Sie dieses Problem nicht haben, wenn Sie `Annotated` ver //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/path_params_numeric_validations/tutorial002_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial002_an.py!} ``` //// @@ -214,7 +214,7 @@ Wenn Sie eines der folgenden Dinge tun möchten: Python macht nichts mit diesem `*`, aber es wird wissen, dass alle folgenden Parameter als Keyword-Argumente (SchlĂŒssel-Wert-Paare), auch bekannt als kwargs, verwendet werden. Selbst wenn diese keinen Defaultwert haben. ```Python hl_lines="7" -{!../../../docs_src/path_params_numeric_validations/tutorial003.py!} +{!../../docs_src/path_params_numeric_validations/tutorial003.py!} ``` ### Besser mit `Annotated` @@ -224,7 +224,7 @@ Bedenken Sie, dass Sie, wenn Sie `Annotated` verwenden, dieses Problem nicht hab //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial003_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial003_an_py39.py!} ``` //// @@ -232,7 +232,7 @@ Bedenken Sie, dass Sie, wenn Sie `Annotated` verwenden, dieses Problem nicht hab //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/path_params_numeric_validations/tutorial003_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial003_an.py!} ``` //// @@ -245,7 +245,7 @@ Hier, mit `ge=1`, wird festgelegt, dass `item_id` eine Ganzzahl benötigt, die g //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial004_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial004_an_py39.py!} ``` //// @@ -253,7 +253,7 @@ Hier, mit `ge=1`, wird festgelegt, dass `item_id` eine Ganzzahl benötigt, die g //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/path_params_numeric_validations/tutorial004_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial004_an.py!} ``` //// @@ -267,7 +267,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="8" -{!> ../../../docs_src/path_params_numeric_validations/tutorial004.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial004.py!} ``` //// @@ -282,7 +282,7 @@ Das Gleiche trifft zu auf: //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial005_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial005_an_py39.py!} ``` //// @@ -290,7 +290,7 @@ Das Gleiche trifft zu auf: //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/path_params_numeric_validations/tutorial005_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial005_an.py!} ``` //// @@ -304,7 +304,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="9" -{!> ../../../docs_src/path_params_numeric_validations/tutorial005.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial005.py!} ``` //// @@ -322,7 +322,7 @@ Das gleiche gilt fĂŒr lt ../../../docs_src/path_params_numeric_validations/tutorial006_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial006_an_py39.py!} ``` //// @@ -330,7 +330,7 @@ Das gleiche gilt fĂŒr lt ../../../docs_src/path_params_numeric_validations/tutorial006_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial006_an.py!} ``` //// @@ -344,7 +344,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="11" -{!> ../../../docs_src/path_params_numeric_validations/tutorial006.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial006.py!} ``` //// diff --git a/docs/de/docs/tutorial/path-params.md b/docs/de/docs/tutorial/path-params.md index 2c1b691a8..9cb172c94 100644 --- a/docs/de/docs/tutorial/path-params.md +++ b/docs/de/docs/tutorial/path-params.md @@ -3,7 +3,7 @@ Sie können Pfad-„Parameter“ oder -„Variablen“ mit der gleichen Syntax deklarieren, welche in Python-Format-Strings verwendet wird: ```Python hl_lines="6-7" -{!../../../docs_src/path_params/tutorial001.py!} +{!../../docs_src/path_params/tutorial001.py!} ``` Der Wert des Pfad-Parameters `item_id` wird Ihrer Funktion als das Argument `item_id` ĂŒbergeben. @@ -19,7 +19,7 @@ Wenn Sie dieses Beispiel ausfĂŒhren und auf ../../../docs_src/query_params_str_validations/tutorial001_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial001_py310.py!} ``` //// @@ -15,7 +15,7 @@ Nehmen wir als Beispiel die folgende Anwendung: //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial001.py!} +{!> ../../docs_src/query_params_str_validations/tutorial001.py!} ``` //// @@ -46,7 +46,7 @@ Importieren Sie zuerst: In Python 3.9 oder darĂŒber, ist `Annotated` Teil der Standardbibliothek, also können Sie es von `typing` importieren. ```Python hl_lines="1 3" -{!> ../../../docs_src/query_params_str_validations/tutorial002_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial002_an_py310.py!} ``` //// @@ -58,7 +58,7 @@ In Versionen unter Python 3.9 importieren Sie `Annotated` von `typing_extensions Es wird bereits mit FastAPI installiert sein. ```Python hl_lines="3-4" -{!> ../../../docs_src/query_params_str_validations/tutorial002_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial002_an.py!} ``` //// @@ -126,7 +126,7 @@ Jetzt, da wir `Annotated` fĂŒr unsere Metadaten deklariert haben, fĂŒgen Sie `Qu //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial002_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial002_an_py310.py!} ``` //// @@ -134,7 +134,7 @@ Jetzt, da wir `Annotated` fĂŒr unsere Metadaten deklariert haben, fĂŒgen Sie `Qu //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial002_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial002_an.py!} ``` //// @@ -164,7 +164,7 @@ So wĂŒrden Sie `Query()` als Defaultwert Ihres Funktionsparameters verwenden, de //// tab | Python 3.10+ ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial002_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial002_py310.py!} ``` //// @@ -172,7 +172,7 @@ So wĂŒrden Sie `Query()` als Defaultwert Ihres Funktionsparameters verwenden, de //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial002.py!} +{!> ../../docs_src/query_params_str_validations/tutorial002.py!} ``` //// @@ -278,7 +278,7 @@ Sie können auch einen Parameter `min_length` hinzufĂŒgen: //// tab | Python 3.10+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial003_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial003_an_py310.py!} ``` //// @@ -286,7 +286,7 @@ Sie können auch einen Parameter `min_length` hinzufĂŒgen: //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial003_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial003_an_py39.py!} ``` //// @@ -294,7 +294,7 @@ Sie können auch einen Parameter `min_length` hinzufĂŒgen: //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/query_params_str_validations/tutorial003_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial003_an.py!} ``` //// @@ -308,7 +308,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial003_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial003_py310.py!} ``` //// @@ -322,7 +322,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial003.py!} +{!> ../../docs_src/query_params_str_validations/tutorial003.py!} ``` //// @@ -334,7 +334,7 @@ Sie können einen ../../../docs_src/query_params_str_validations/tutorial004_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial004_an_py310.py!} ``` //// @@ -342,7 +342,7 @@ Sie können einen ../../../docs_src/query_params_str_validations/tutorial004_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial004_an_py39.py!} ``` //// @@ -350,7 +350,7 @@ Sie können einen ../../../docs_src/query_params_str_validations/tutorial004_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial004_an.py!} ``` //// @@ -364,7 +364,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial004_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial004_py310.py!} ``` //// @@ -378,7 +378,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="11" -{!> ../../../docs_src/query_params_str_validations/tutorial004.py!} +{!> ../../docs_src/query_params_str_validations/tutorial004.py!} ``` //// @@ -402,7 +402,7 @@ Sie könnten immer noch Code sehen, der den alten Namen verwendet: //// tab | Python 3.10+ Pydantic v1 ```Python hl_lines="11" -{!> ../../../docs_src/query_params_str_validations/tutorial004_an_py310_regex.py!} +{!> ../../docs_src/query_params_str_validations/tutorial004_an_py310_regex.py!} ``` //// @@ -418,7 +418,7 @@ Beispielsweise könnten Sie den `q` Query-Parameter so deklarieren, dass er eine //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial005_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial005_an_py39.py!} ``` //// @@ -426,7 +426,7 @@ Beispielsweise könnten Sie den `q` Query-Parameter so deklarieren, dass er eine //// tab | Python 3.8+ ```Python hl_lines="8" -{!> ../../../docs_src/query_params_str_validations/tutorial005_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial005_an.py!} ``` //// @@ -440,7 +440,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial005.py!} +{!> ../../docs_src/query_params_str_validations/tutorial005.py!} ``` //// @@ -488,7 +488,7 @@ Wenn Sie einen Parameter erforderlich machen wollen, wĂ€hrend Sie `Query` verwen //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial006_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006_an_py39.py!} ``` //// @@ -496,7 +496,7 @@ Wenn Sie einen Parameter erforderlich machen wollen, wĂ€hrend Sie `Query` verwen //// tab | Python 3.8+ ```Python hl_lines="8" -{!> ../../../docs_src/query_params_str_validations/tutorial006_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006_an.py!} ``` //// @@ -510,7 +510,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial006.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006.py!} ``` /// tip | "Tipp" @@ -530,7 +530,7 @@ Es gibt eine Alternative, die explizit deklariert, dass ein Wert erforderlich is //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial006b_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006b_an_py39.py!} ``` //// @@ -538,7 +538,7 @@ Es gibt eine Alternative, die explizit deklariert, dass ein Wert erforderlich is //// tab | Python 3.8+ ```Python hl_lines="8" -{!> ../../../docs_src/query_params_str_validations/tutorial006b_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006b_an.py!} ``` //// @@ -552,7 +552,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial006b.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006b.py!} ``` //// @@ -576,7 +576,7 @@ Um das zu machen, deklarieren Sie, dass `None` ein gĂŒltiger Typ ist, aber verwe //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial006c_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006c_an_py310.py!} ``` //// @@ -584,7 +584,7 @@ Um das zu machen, deklarieren Sie, dass `None` ein gĂŒltiger Typ ist, aber verwe //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial006c_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006c_an_py39.py!} ``` //// @@ -592,7 +592,7 @@ Um das zu machen, deklarieren Sie, dass `None` ein gĂŒltiger Typ ist, aber verwe //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial006c_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006c_an.py!} ``` //// @@ -606,7 +606,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial006c_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006c_py310.py!} ``` //// @@ -620,7 +620,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial006c.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006c.py!} ``` //// @@ -646,7 +646,7 @@ Um zum Beispiel einen Query-Parameter `q` zu deklarieren, der mehrere Male in de //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial011_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial011_an_py310.py!} ``` //// @@ -654,7 +654,7 @@ Um zum Beispiel einen Query-Parameter `q` zu deklarieren, der mehrere Male in de //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial011_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial011_an_py39.py!} ``` //// @@ -662,7 +662,7 @@ Um zum Beispiel einen Query-Parameter `q` zu deklarieren, der mehrere Male in de //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial011_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial011_an.py!} ``` //// @@ -676,7 +676,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial011_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial011_py310.py!} ``` //// @@ -690,7 +690,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial011_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial011_py39.py!} ``` //// @@ -704,7 +704,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial011.py!} +{!> ../../docs_src/query_params_str_validations/tutorial011.py!} ``` //// @@ -745,7 +745,7 @@ Und Sie können auch eine Default-`list`e von Werten definieren, wenn keine ĂŒbe //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial012_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial012_an_py39.py!} ``` //// @@ -753,7 +753,7 @@ Und Sie können auch eine Default-`list`e von Werten definieren, wenn keine ĂŒbe //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial012_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial012_an.py!} ``` //// @@ -767,7 +767,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial012_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial012_py39.py!} ``` //// @@ -781,7 +781,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial012.py!} +{!> ../../docs_src/query_params_str_validations/tutorial012.py!} ``` //// @@ -810,7 +810,7 @@ Sie können auch `list` direkt verwenden, anstelle von `List[str]` (oder `list[s //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial013_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial013_an_py39.py!} ``` //// @@ -818,7 +818,7 @@ Sie können auch `list` direkt verwenden, anstelle von `List[str]` (oder `list[s //// tab | Python 3.8+ ```Python hl_lines="8" -{!> ../../../docs_src/query_params_str_validations/tutorial013_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial013_an.py!} ``` //// @@ -832,7 +832,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial013.py!} +{!> ../../docs_src/query_params_str_validations/tutorial013.py!} ``` //// @@ -864,7 +864,7 @@ Sie können einen Titel hinzufĂŒgen – `title`: //// tab | Python 3.10+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial007_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial007_an_py310.py!} ``` //// @@ -872,7 +872,7 @@ Sie können einen Titel hinzufĂŒgen – `title`: //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial007_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial007_an_py39.py!} ``` //// @@ -880,7 +880,7 @@ Sie können einen Titel hinzufĂŒgen – `title`: //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/query_params_str_validations/tutorial007_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial007_an.py!} ``` //// @@ -894,7 +894,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="8" -{!> ../../../docs_src/query_params_str_validations/tutorial007_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial007_py310.py!} ``` //// @@ -908,7 +908,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial007.py!} +{!> ../../docs_src/query_params_str_validations/tutorial007.py!} ``` //// @@ -918,7 +918,7 @@ Und eine Beschreibung – `description`: //// tab | Python 3.10+ ```Python hl_lines="14" -{!> ../../../docs_src/query_params_str_validations/tutorial008_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial008_an_py310.py!} ``` //// @@ -926,7 +926,7 @@ Und eine Beschreibung – `description`: //// tab | Python 3.9+ ```Python hl_lines="14" -{!> ../../../docs_src/query_params_str_validations/tutorial008_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial008_an_py39.py!} ``` //// @@ -934,7 +934,7 @@ Und eine Beschreibung – `description`: //// tab | Python 3.8+ ```Python hl_lines="15" -{!> ../../../docs_src/query_params_str_validations/tutorial008_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial008_an.py!} ``` //// @@ -948,7 +948,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="11" -{!> ../../../docs_src/query_params_str_validations/tutorial008_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial008_py310.py!} ``` //// @@ -962,7 +962,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="13" -{!> ../../../docs_src/query_params_str_validations/tutorial008.py!} +{!> ../../docs_src/query_params_str_validations/tutorial008.py!} ``` //// @@ -988,7 +988,7 @@ Dann können Sie einen `alias` deklarieren, und dieser Alias wird verwendet, um //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial009_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial009_an_py310.py!} ``` //// @@ -996,7 +996,7 @@ Dann können Sie einen `alias` deklarieren, und dieser Alias wird verwendet, um //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial009_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial009_an_py39.py!} ``` //// @@ -1004,7 +1004,7 @@ Dann können Sie einen `alias` deklarieren, und dieser Alias wird verwendet, um //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial009_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial009_an.py!} ``` //// @@ -1018,7 +1018,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial009_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial009_py310.py!} ``` //// @@ -1032,7 +1032,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial009.py!} +{!> ../../docs_src/query_params_str_validations/tutorial009.py!} ``` //// @@ -1048,7 +1048,7 @@ In diesem Fall fĂŒgen Sie den Parameter `deprecated=True` zu `Query` hinzu. //// tab | Python 3.10+ ```Python hl_lines="19" -{!> ../../../docs_src/query_params_str_validations/tutorial010_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial010_an_py310.py!} ``` //// @@ -1056,7 +1056,7 @@ In diesem Fall fĂŒgen Sie den Parameter `deprecated=True` zu `Query` hinzu. //// tab | Python 3.9+ ```Python hl_lines="19" -{!> ../../../docs_src/query_params_str_validations/tutorial010_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial010_an_py39.py!} ``` //// @@ -1064,7 +1064,7 @@ In diesem Fall fĂŒgen Sie den Parameter `deprecated=True` zu `Query` hinzu. //// tab | Python 3.8+ ```Python hl_lines="20" -{!> ../../../docs_src/query_params_str_validations/tutorial010_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial010_an.py!} ``` //// @@ -1078,7 +1078,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="16" -{!> ../../../docs_src/query_params_str_validations/tutorial010_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial010_py310.py!} ``` //// @@ -1092,7 +1092,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="18" -{!> ../../../docs_src/query_params_str_validations/tutorial010.py!} +{!> ../../docs_src/query_params_str_validations/tutorial010.py!} ``` //// @@ -1108,7 +1108,7 @@ Um einen Query-Parameter vom generierten OpenAPI-Schema auszuschließen (und dah //// tab | Python 3.10+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial014_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial014_an_py310.py!} ``` //// @@ -1116,7 +1116,7 @@ Um einen Query-Parameter vom generierten OpenAPI-Schema auszuschließen (und dah //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial014_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial014_an_py39.py!} ``` //// @@ -1124,7 +1124,7 @@ Um einen Query-Parameter vom generierten OpenAPI-Schema auszuschließen (und dah //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/query_params_str_validations/tutorial014_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial014_an.py!} ``` //// @@ -1138,7 +1138,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="8" -{!> ../../../docs_src/query_params_str_validations/tutorial014_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial014_py310.py!} ``` //// @@ -1152,7 +1152,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial014.py!} +{!> ../../docs_src/query_params_str_validations/tutorial014.py!} ``` //// diff --git a/docs/de/docs/tutorial/query-params.md b/docs/de/docs/tutorial/query-params.md index 136852216..bb1dbdf9c 100644 --- a/docs/de/docs/tutorial/query-params.md +++ b/docs/de/docs/tutorial/query-params.md @@ -3,7 +3,7 @@ Wenn Sie in ihrer Funktion Parameter deklarieren, die nicht Teil der Pfad-Parameter sind, dann werden diese automatisch als „Query“-Parameter interpretiert. ```Python hl_lines="9" -{!../../../docs_src/query_params/tutorial001.py!} +{!../../docs_src/query_params/tutorial001.py!} ``` Query-Parameter (Deutsch: Abfrage-Parameter) sind die SchlĂŒssel-Wert-Paare, die nach dem `?` in einer URL aufgelistet sind, getrennt durch `&`-Zeichen. @@ -66,7 +66,7 @@ Auf die gleiche Weise können Sie optionale Query-Parameter deklarieren, indem S //// tab | Python 3.10+ ```Python hl_lines="7" -{!> ../../../docs_src/query_params/tutorial002_py310.py!} +{!> ../../docs_src/query_params/tutorial002_py310.py!} ``` //// @@ -74,7 +74,7 @@ Auf die gleiche Weise können Sie optionale Query-Parameter deklarieren, indem S //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params/tutorial002.py!} +{!> ../../docs_src/query_params/tutorial002.py!} ``` //// @@ -94,7 +94,7 @@ Sie können auch `bool`-Typen deklarieren und sie werden konvertiert: //// tab | Python 3.10+ ```Python hl_lines="7" -{!> ../../../docs_src/query_params/tutorial003_py310.py!} +{!> ../../docs_src/query_params/tutorial003_py310.py!} ``` //// @@ -102,7 +102,7 @@ Sie können auch `bool`-Typen deklarieren und sie werden konvertiert: //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params/tutorial003.py!} +{!> ../../docs_src/query_params/tutorial003.py!} ``` //// @@ -150,7 +150,7 @@ Parameter werden anhand ihres Namens erkannt: //// tab | Python 3.10+ ```Python hl_lines="6 8" -{!> ../../../docs_src/query_params/tutorial004_py310.py!} +{!> ../../docs_src/query_params/tutorial004_py310.py!} ``` //// @@ -158,7 +158,7 @@ Parameter werden anhand ihres Namens erkannt: //// tab | Python 3.8+ ```Python hl_lines="8 10" -{!> ../../../docs_src/query_params/tutorial004.py!} +{!> ../../docs_src/query_params/tutorial004.py!} ``` //// @@ -172,7 +172,7 @@ Wenn Sie keinen spezifischen Wert haben wollen, sondern der Parameter einfach op Aber wenn Sie wollen, dass ein Query-Parameter erforderlich ist, vergeben Sie einfach keinen Defaultwert: ```Python hl_lines="6-7" -{!../../../docs_src/query_params/tutorial005.py!} +{!../../docs_src/query_params/tutorial005.py!} ``` Hier ist `needy` ein erforderlicher Query-Parameter vom Typ `str`. @@ -222,7 +222,7 @@ Und natĂŒrlich können Sie einige Parameter als erforderlich, einige mit Default //// tab | Python 3.10+ ```Python hl_lines="8" -{!> ../../../docs_src/query_params/tutorial006_py310.py!} +{!> ../../docs_src/query_params/tutorial006_py310.py!} ``` //// @@ -230,7 +230,7 @@ Und natĂŒrlich können Sie einige Parameter als erforderlich, einige mit Default //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params/tutorial006.py!} +{!> ../../docs_src/query_params/tutorial006.py!} ``` //// diff --git a/docs/de/docs/tutorial/request-files.md b/docs/de/docs/tutorial/request-files.md index cf44df5f0..c0d0ef3f2 100644 --- a/docs/de/docs/tutorial/request-files.md +++ b/docs/de/docs/tutorial/request-files.md @@ -19,7 +19,7 @@ Importieren Sie `File` und `UploadFile` von `fastapi`: //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/request_files/tutorial001_an_py39.py!} +{!> ../../docs_src/request_files/tutorial001_an_py39.py!} ``` //// @@ -27,7 +27,7 @@ Importieren Sie `File` und `UploadFile` von `fastapi`: //// tab | Python 3.8+ ```Python hl_lines="1" -{!> ../../../docs_src/request_files/tutorial001_an.py!} +{!> ../../docs_src/request_files/tutorial001_an.py!} ``` //// @@ -41,7 +41,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="1" -{!> ../../../docs_src/request_files/tutorial001.py!} +{!> ../../docs_src/request_files/tutorial001.py!} ``` //// @@ -53,7 +53,7 @@ Erstellen Sie Datei-Parameter, so wie Sie es auch mit `Body` und `Form` machen w //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/request_files/tutorial001_an_py39.py!} +{!> ../../docs_src/request_files/tutorial001_an_py39.py!} ``` //// @@ -61,7 +61,7 @@ Erstellen Sie Datei-Parameter, so wie Sie es auch mit `Body` und `Form` machen w //// tab | Python 3.8+ ```Python hl_lines="8" -{!> ../../../docs_src/request_files/tutorial001_an.py!} +{!> ../../docs_src/request_files/tutorial001_an.py!} ``` //// @@ -75,7 +75,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="7" -{!> ../../../docs_src/request_files/tutorial001.py!} +{!> ../../docs_src/request_files/tutorial001.py!} ``` //// @@ -109,7 +109,7 @@ Definieren Sie einen Datei-Parameter mit dem Typ `UploadFile`: //// tab | Python 3.9+ ```Python hl_lines="14" -{!> ../../../docs_src/request_files/tutorial001_an_py39.py!} +{!> ../../docs_src/request_files/tutorial001_an_py39.py!} ``` //// @@ -117,7 +117,7 @@ Definieren Sie einen Datei-Parameter mit dem Typ `UploadFile`: //// tab | Python 3.8+ ```Python hl_lines="13" -{!> ../../../docs_src/request_files/tutorial001_an.py!} +{!> ../../docs_src/request_files/tutorial001_an.py!} ``` //// @@ -131,7 +131,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="12" -{!> ../../../docs_src/request_files/tutorial001.py!} +{!> ../../docs_src/request_files/tutorial001.py!} ``` //// @@ -220,7 +220,7 @@ Sie können eine Datei optional machen, indem Sie Standard-Typannotationen verwe //// tab | Python 3.10+ ```Python hl_lines="9 17" -{!> ../../../docs_src/request_files/tutorial001_02_an_py310.py!} +{!> ../../docs_src/request_files/tutorial001_02_an_py310.py!} ``` //// @@ -228,7 +228,7 @@ Sie können eine Datei optional machen, indem Sie Standard-Typannotationen verwe //// tab | Python 3.9+ ```Python hl_lines="9 17" -{!> ../../../docs_src/request_files/tutorial001_02_an_py39.py!} +{!> ../../docs_src/request_files/tutorial001_02_an_py39.py!} ``` //// @@ -236,7 +236,7 @@ Sie können eine Datei optional machen, indem Sie Standard-Typannotationen verwe //// tab | Python 3.8+ ```Python hl_lines="10 18" -{!> ../../../docs_src/request_files/tutorial001_02_an.py!} +{!> ../../docs_src/request_files/tutorial001_02_an.py!} ``` //// @@ -250,7 +250,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="7 15" -{!> ../../../docs_src/request_files/tutorial001_02_py310.py!} +{!> ../../docs_src/request_files/tutorial001_02_py310.py!} ``` //// @@ -264,7 +264,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="9 17" -{!> ../../../docs_src/request_files/tutorial001_02.py!} +{!> ../../docs_src/request_files/tutorial001_02.py!} ``` //// @@ -276,7 +276,7 @@ Sie können auch `File()` zusammen mit `UploadFile` verwenden, um zum Beispiel z //// tab | Python 3.9+ ```Python hl_lines="9 15" -{!> ../../../docs_src/request_files/tutorial001_03_an_py39.py!} +{!> ../../docs_src/request_files/tutorial001_03_an_py39.py!} ``` //// @@ -284,7 +284,7 @@ Sie können auch `File()` zusammen mit `UploadFile` verwenden, um zum Beispiel z //// tab | Python 3.8+ ```Python hl_lines="8 14" -{!> ../../../docs_src/request_files/tutorial001_03_an.py!} +{!> ../../docs_src/request_files/tutorial001_03_an.py!} ``` //// @@ -298,7 +298,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="7 13" -{!> ../../../docs_src/request_files/tutorial001_03.py!} +{!> ../../docs_src/request_files/tutorial001_03.py!} ``` //// @@ -314,7 +314,7 @@ Um das zu machen, deklarieren Sie eine Liste von `bytes` oder `UploadFile`s: //// tab | Python 3.9+ ```Python hl_lines="10 15" -{!> ../../../docs_src/request_files/tutorial002_an_py39.py!} +{!> ../../docs_src/request_files/tutorial002_an_py39.py!} ``` //// @@ -322,7 +322,7 @@ Um das zu machen, deklarieren Sie eine Liste von `bytes` oder `UploadFile`s: //// tab | Python 3.8+ ```Python hl_lines="11 16" -{!> ../../../docs_src/request_files/tutorial002_an.py!} +{!> ../../docs_src/request_files/tutorial002_an.py!} ``` //// @@ -336,7 +336,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="8 13" -{!> ../../../docs_src/request_files/tutorial002_py39.py!} +{!> ../../docs_src/request_files/tutorial002_py39.py!} ``` //// @@ -350,7 +350,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="10 15" -{!> ../../../docs_src/request_files/tutorial002.py!} +{!> ../../docs_src/request_files/tutorial002.py!} ``` //// @@ -372,7 +372,7 @@ Und so wie zuvor können Sie `File()` verwenden, um zusĂ€tzliche Parameter zu se //// tab | Python 3.9+ ```Python hl_lines="11 18-20" -{!> ../../../docs_src/request_files/tutorial003_an_py39.py!} +{!> ../../docs_src/request_files/tutorial003_an_py39.py!} ``` //// @@ -380,7 +380,7 @@ Und so wie zuvor können Sie `File()` verwenden, um zusĂ€tzliche Parameter zu se //// tab | Python 3.8+ ```Python hl_lines="12 19-21" -{!> ../../../docs_src/request_files/tutorial003_an.py!} +{!> ../../docs_src/request_files/tutorial003_an.py!} ``` //// @@ -394,7 +394,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="9 16" -{!> ../../../docs_src/request_files/tutorial003_py39.py!} +{!> ../../docs_src/request_files/tutorial003_py39.py!} ``` //// @@ -408,7 +408,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="11 18" -{!> ../../../docs_src/request_files/tutorial003.py!} +{!> ../../docs_src/request_files/tutorial003.py!} ``` //// diff --git a/docs/de/docs/tutorial/request-forms-and-files.md b/docs/de/docs/tutorial/request-forms-and-files.md index e109595d1..2b89edbb4 100644 --- a/docs/de/docs/tutorial/request-forms-and-files.md +++ b/docs/de/docs/tutorial/request-forms-and-files.md @@ -15,7 +15,7 @@ Z. B. `pip install python-multipart`. //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/request_forms_and_files/tutorial001_an_py39.py!} +{!> ../../docs_src/request_forms_and_files/tutorial001_an_py39.py!} ``` //// @@ -23,7 +23,7 @@ Z. B. `pip install python-multipart`. //// tab | Python 3.8+ ```Python hl_lines="1" -{!> ../../../docs_src/request_forms_and_files/tutorial001_an.py!} +{!> ../../docs_src/request_forms_and_files/tutorial001_an.py!} ``` //// @@ -37,7 +37,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="1" -{!> ../../../docs_src/request_forms_and_files/tutorial001.py!} +{!> ../../docs_src/request_forms_and_files/tutorial001.py!} ``` //// @@ -49,7 +49,7 @@ Erstellen Sie Datei- und Formularparameter, so wie Sie es auch mit `Body` und `Q //// tab | Python 3.9+ ```Python hl_lines="10-12" -{!> ../../../docs_src/request_forms_and_files/tutorial001_an_py39.py!} +{!> ../../docs_src/request_forms_and_files/tutorial001_an_py39.py!} ``` //// @@ -57,7 +57,7 @@ Erstellen Sie Datei- und Formularparameter, so wie Sie es auch mit `Body` und `Q //// tab | Python 3.8+ ```Python hl_lines="9-11" -{!> ../../../docs_src/request_forms_and_files/tutorial001_an.py!} +{!> ../../docs_src/request_forms_and_files/tutorial001_an.py!} ``` //// @@ -71,7 +71,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="8" -{!> ../../../docs_src/request_forms_and_files/tutorial001.py!} +{!> ../../docs_src/request_forms_and_files/tutorial001.py!} ``` //// diff --git a/docs/de/docs/tutorial/request-forms.md b/docs/de/docs/tutorial/request-forms.md index 391788aff..0784aa8c0 100644 --- a/docs/de/docs/tutorial/request-forms.md +++ b/docs/de/docs/tutorial/request-forms.md @@ -17,7 +17,7 @@ Importieren Sie `Form` von `fastapi`: //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/request_forms/tutorial001_an_py39.py!} +{!> ../../docs_src/request_forms/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ Importieren Sie `Form` von `fastapi`: //// tab | Python 3.8+ ```Python hl_lines="1" -{!> ../../../docs_src/request_forms/tutorial001_an.py!} +{!> ../../docs_src/request_forms/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="1" -{!> ../../../docs_src/request_forms/tutorial001.py!} +{!> ../../docs_src/request_forms/tutorial001.py!} ``` //// @@ -51,7 +51,7 @@ Erstellen Sie Formular-Parameter, so wie Sie es auch mit `Body` und `Query` mach //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/request_forms/tutorial001_an_py39.py!} +{!> ../../docs_src/request_forms/tutorial001_an_py39.py!} ``` //// @@ -59,7 +59,7 @@ Erstellen Sie Formular-Parameter, so wie Sie es auch mit `Body` und `Query` mach //// tab | Python 3.8+ ```Python hl_lines="8" -{!> ../../../docs_src/request_forms/tutorial001_an.py!} +{!> ../../docs_src/request_forms/tutorial001_an.py!} ``` //// @@ -73,7 +73,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="7" -{!> ../../../docs_src/request_forms/tutorial001.py!} +{!> ../../docs_src/request_forms/tutorial001.py!} ``` //// diff --git a/docs/de/docs/tutorial/response-model.md b/docs/de/docs/tutorial/response-model.md index b480780bc..31ad73c77 100644 --- a/docs/de/docs/tutorial/response-model.md +++ b/docs/de/docs/tutorial/response-model.md @@ -7,7 +7,7 @@ Hierbei können Sie **Typannotationen** genauso verwenden, wie Sie es bei Werten //// tab | Python 3.10+ ```Python hl_lines="16 21" -{!> ../../../docs_src/response_model/tutorial001_01_py310.py!} +{!> ../../docs_src/response_model/tutorial001_01_py310.py!} ``` //// @@ -15,7 +15,7 @@ Hierbei können Sie **Typannotationen** genauso verwenden, wie Sie es bei Werten //// tab | Python 3.9+ ```Python hl_lines="18 23" -{!> ../../../docs_src/response_model/tutorial001_01_py39.py!} +{!> ../../docs_src/response_model/tutorial001_01_py39.py!} ``` //// @@ -23,7 +23,7 @@ Hierbei können Sie **Typannotationen** genauso verwenden, wie Sie es bei Werten //// tab | Python 3.8+ ```Python hl_lines="18 23" -{!> ../../../docs_src/response_model/tutorial001_01.py!} +{!> ../../docs_src/response_model/tutorial001_01.py!} ``` //// @@ -62,7 +62,7 @@ Sie können `response_model` in jeder möglichen *Pfadoperation* verwenden: //// tab | Python 3.10+ ```Python hl_lines="17 22 24-27" -{!> ../../../docs_src/response_model/tutorial001_py310.py!} +{!> ../../docs_src/response_model/tutorial001_py310.py!} ``` //// @@ -70,7 +70,7 @@ Sie können `response_model` in jeder möglichen *Pfadoperation* verwenden: //// tab | Python 3.9+ ```Python hl_lines="17 22 24-27" -{!> ../../../docs_src/response_model/tutorial001_py39.py!} +{!> ../../docs_src/response_model/tutorial001_py39.py!} ``` //// @@ -78,7 +78,7 @@ Sie können `response_model` in jeder möglichen *Pfadoperation* verwenden: //// tab | Python 3.8+ ```Python hl_lines="17 22 24-27" -{!> ../../../docs_src/response_model/tutorial001.py!} +{!> ../../docs_src/response_model/tutorial001.py!} ``` //// @@ -116,7 +116,7 @@ Im Folgenden deklarieren wir ein `UserIn`-Modell; es enthĂ€lt ein Klartext-Passw //// tab | Python 3.10+ ```Python hl_lines="7 9" -{!> ../../../docs_src/response_model/tutorial002_py310.py!} +{!> ../../docs_src/response_model/tutorial002_py310.py!} ``` //// @@ -124,7 +124,7 @@ Im Folgenden deklarieren wir ein `UserIn`-Modell; es enthĂ€lt ein Klartext-Passw //// tab | Python 3.8+ ```Python hl_lines="9 11" -{!> ../../../docs_src/response_model/tutorial002.py!} +{!> ../../docs_src/response_model/tutorial002.py!} ``` //// @@ -143,7 +143,7 @@ Wir verwenden dieses Modell, um sowohl unsere Eingabe- als auch Ausgabedaten zu //// tab | Python 3.10+ ```Python hl_lines="16" -{!> ../../../docs_src/response_model/tutorial002_py310.py!} +{!> ../../docs_src/response_model/tutorial002_py310.py!} ``` //// @@ -151,7 +151,7 @@ Wir verwenden dieses Modell, um sowohl unsere Eingabe- als auch Ausgabedaten zu //// tab | Python 3.8+ ```Python hl_lines="18" -{!> ../../../docs_src/response_model/tutorial002.py!} +{!> ../../docs_src/response_model/tutorial002.py!} ``` //// @@ -175,7 +175,7 @@ Wir können stattdessen ein Eingabemodell mit dem Klartext-Passwort, und ein Aus //// tab | Python 3.10+ ```Python hl_lines="9 11 16" -{!> ../../../docs_src/response_model/tutorial003_py310.py!} +{!> ../../docs_src/response_model/tutorial003_py310.py!} ``` //// @@ -183,7 +183,7 @@ Wir können stattdessen ein Eingabemodell mit dem Klartext-Passwort, und ein Aus //// tab | Python 3.8+ ```Python hl_lines="9 11 16" -{!> ../../../docs_src/response_model/tutorial003.py!} +{!> ../../docs_src/response_model/tutorial003.py!} ``` //// @@ -193,7 +193,7 @@ Obwohl unsere *Pfadoperation-Funktion* hier denselben `user` von der Eingabe zur //// tab | Python 3.10+ ```Python hl_lines="24" -{!> ../../../docs_src/response_model/tutorial003_py310.py!} +{!> ../../docs_src/response_model/tutorial003_py310.py!} ``` //// @@ -201,7 +201,7 @@ Obwohl unsere *Pfadoperation-Funktion* hier denselben `user` von der Eingabe zur //// tab | Python 3.8+ ```Python hl_lines="24" -{!> ../../../docs_src/response_model/tutorial003.py!} +{!> ../../docs_src/response_model/tutorial003.py!} ``` //// @@ -211,7 +211,7 @@ Obwohl unsere *Pfadoperation-Funktion* hier denselben `user` von der Eingabe zur //// tab | Python 3.10+ ```Python hl_lines="22" -{!> ../../../docs_src/response_model/tutorial003_py310.py!} +{!> ../../docs_src/response_model/tutorial003_py310.py!} ``` //// @@ -219,7 +219,7 @@ Obwohl unsere *Pfadoperation-Funktion* hier denselben `user` von der Eingabe zur //// tab | Python 3.8+ ```Python hl_lines="22" -{!> ../../../docs_src/response_model/tutorial003.py!} +{!> ../../docs_src/response_model/tutorial003.py!} ``` //// @@ -249,7 +249,7 @@ Und in solchen FĂ€llen können wir Klassen und Vererbung verwenden, um Vorteil a //// tab | Python 3.10+ ```Python hl_lines="7-10 13-14 18" -{!> ../../../docs_src/response_model/tutorial003_01_py310.py!} +{!> ../../docs_src/response_model/tutorial003_01_py310.py!} ``` //// @@ -257,7 +257,7 @@ Und in solchen FĂ€llen können wir Klassen und Vererbung verwenden, um Vorteil a //// tab | Python 3.8+ ```Python hl_lines="9-13 15-16 20" -{!> ../../../docs_src/response_model/tutorial003_01.py!} +{!> ../../docs_src/response_model/tutorial003_01.py!} ``` //// @@ -303,7 +303,7 @@ Es kann FĂ€lle geben, bei denen Sie etwas zurĂŒckgeben, das kein gĂŒltiges Pydan Der hĂ€ufigste Anwendungsfall ist, wenn Sie [eine Response direkt zurĂŒckgeben, wie es spĂ€ter im Handbuch fĂŒr fortgeschrittene Benutzer erlĂ€utert wird](../advanced/response-directly.md){.internal-link target=_blank}. ```Python hl_lines="8 10-11" -{!> ../../../docs_src/response_model/tutorial003_02.py!} +{!> ../../docs_src/response_model/tutorial003_02.py!} ``` Dieser einfache Anwendungsfall wird automatisch von FastAPI gehandhabt, weil die Annotation des RĂŒckgabetyps die Klasse (oder eine Unterklasse von) `Response` ist. @@ -315,7 +315,7 @@ Und Tools werden auch glĂŒcklich sein, weil sowohl `RedirectResponse` als auch ` Sie können auch eine Unterklasse von `Response` in der Typannotation verwenden. ```Python hl_lines="8-9" -{!> ../../../docs_src/response_model/tutorial003_03.py!} +{!> ../../docs_src/response_model/tutorial003_03.py!} ``` Das wird ebenfalls funktionieren, weil `RedirectResponse` eine Unterklasse von `Response` ist, und FastAPI sich um diesen einfachen Anwendungsfall automatisch kĂŒmmert. @@ -329,7 +329,7 @@ Das gleiche wird passieren, wenn Sie eine ../../../docs_src/response_model/tutorial003_04.py!} +{!> ../../docs_src/response_model/tutorial003_04.py!} ``` //// @@ -355,7 +355,7 @@ In diesem Fall können Sie die Generierung des Responsemodells abschalten, indem //// tab | Python 3.10+ ```Python hl_lines="7" -{!> ../../../docs_src/response_model/tutorial003_05_py310.py!} +{!> ../../docs_src/response_model/tutorial003_05_py310.py!} ``` //// @@ -363,7 +363,7 @@ In diesem Fall können Sie die Generierung des Responsemodells abschalten, indem //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/response_model/tutorial003_05.py!} +{!> ../../docs_src/response_model/tutorial003_05.py!} ``` //// @@ -377,7 +377,7 @@ Ihr Responsemodell könnte Defaultwerte haben, wie: //// tab | Python 3.10+ ```Python hl_lines="9 11-12" -{!> ../../../docs_src/response_model/tutorial004_py310.py!} +{!> ../../docs_src/response_model/tutorial004_py310.py!} ``` //// @@ -385,7 +385,7 @@ Ihr Responsemodell könnte Defaultwerte haben, wie: //// tab | Python 3.9+ ```Python hl_lines="11 13-14" -{!> ../../../docs_src/response_model/tutorial004_py39.py!} +{!> ../../docs_src/response_model/tutorial004_py39.py!} ``` //// @@ -393,7 +393,7 @@ Ihr Responsemodell könnte Defaultwerte haben, wie: //// tab | Python 3.8+ ```Python hl_lines="11 13-14" -{!> ../../../docs_src/response_model/tutorial004.py!} +{!> ../../docs_src/response_model/tutorial004.py!} ``` //// @@ -413,7 +413,7 @@ Sie können den *Pfadoperation-Dekorator*-Parameter `response_model_exclude_unse //// tab | Python 3.10+ ```Python hl_lines="22" -{!> ../../../docs_src/response_model/tutorial004_py310.py!} +{!> ../../docs_src/response_model/tutorial004_py310.py!} ``` //// @@ -421,7 +421,7 @@ Sie können den *Pfadoperation-Dekorator*-Parameter `response_model_exclude_unse //// tab | Python 3.9+ ```Python hl_lines="24" -{!> ../../../docs_src/response_model/tutorial004_py39.py!} +{!> ../../docs_src/response_model/tutorial004_py39.py!} ``` //// @@ -429,7 +429,7 @@ Sie können den *Pfadoperation-Dekorator*-Parameter `response_model_exclude_unse //// tab | Python 3.8+ ```Python hl_lines="24" -{!> ../../../docs_src/response_model/tutorial004.py!} +{!> ../../docs_src/response_model/tutorial004.py!} ``` //// @@ -532,7 +532,7 @@ Das trifft auch auf `response_model_by_alias` zu, welches Ă€hnlich funktioniert. //// tab | Python 3.10+ ```Python hl_lines="29 35" -{!> ../../../docs_src/response_model/tutorial005_py310.py!} +{!> ../../docs_src/response_model/tutorial005_py310.py!} ``` //// @@ -540,7 +540,7 @@ Das trifft auch auf `response_model_by_alias` zu, welches Ă€hnlich funktioniert. //// tab | Python 3.8+ ```Python hl_lines="31 37" -{!> ../../../docs_src/response_model/tutorial005.py!} +{!> ../../docs_src/response_model/tutorial005.py!} ``` //// @@ -560,7 +560,7 @@ Wenn Sie vergessen, ein `set` zu verwenden, und stattdessen eine `list`e oder ei //// tab | Python 3.10+ ```Python hl_lines="29 35" -{!> ../../../docs_src/response_model/tutorial006_py310.py!} +{!> ../../docs_src/response_model/tutorial006_py310.py!} ``` //// @@ -568,7 +568,7 @@ Wenn Sie vergessen, ein `set` zu verwenden, und stattdessen eine `list`e oder ei //// tab | Python 3.8+ ```Python hl_lines="31 37" -{!> ../../../docs_src/response_model/tutorial006.py!} +{!> ../../docs_src/response_model/tutorial006.py!} ``` //// diff --git a/docs/de/docs/tutorial/response-status-code.md b/docs/de/docs/tutorial/response-status-code.md index 5f96b83e4..872007a12 100644 --- a/docs/de/docs/tutorial/response-status-code.md +++ b/docs/de/docs/tutorial/response-status-code.md @@ -9,7 +9,7 @@ So wie ein Responsemodell, können Sie auch einen HTTP-Statuscode fĂŒr die Respo * usw. ```Python hl_lines="6" -{!../../../docs_src/response_status_code/tutorial001.py!} +{!../../docs_src/response_status_code/tutorial001.py!} ``` /// note | "Hinweis" @@ -77,7 +77,7 @@ Um mehr ĂŒber Statuscodes zu lernen, und welcher wofĂŒr verwendet wird, lesen Si Schauen wir uns das vorherige Beispiel noch einmal an: ```Python hl_lines="6" -{!../../../docs_src/response_status_code/tutorial001.py!} +{!../../docs_src/response_status_code/tutorial001.py!} ``` `201` ist der Statuscode fĂŒr „Created“ („Erzeugt“). @@ -87,7 +87,7 @@ Aber Sie mĂŒssen sich nicht daran erinnern, welcher dieser Codes was bedeutet. Sie können die Hilfsvariablen von `fastapi.status` verwenden. ```Python hl_lines="1 6" -{!../../../docs_src/response_status_code/tutorial002.py!} +{!../../docs_src/response_status_code/tutorial002.py!} ``` Diese sind nur eine Annehmlichkeit und enthalten dieselbe Nummer, aber auf diese Weise können Sie die AutovervollstĂ€ndigung Ihres Editors verwenden, um sie zu finden: diff --git a/docs/de/docs/tutorial/schema-extra-example.md b/docs/de/docs/tutorial/schema-extra-example.md index 07b4bb759..0da1a4ea4 100644 --- a/docs/de/docs/tutorial/schema-extra-example.md +++ b/docs/de/docs/tutorial/schema-extra-example.md @@ -11,7 +11,7 @@ Sie können `examples` („Beispiele“) fĂŒr ein Pydantic-Modell deklarieren, w //// tab | Python 3.10+ Pydantic v2 ```Python hl_lines="13-24" -{!> ../../../docs_src/schema_extra_example/tutorial001_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial001_py310.py!} ``` //// @@ -19,7 +19,7 @@ Sie können `examples` („Beispiele“) fĂŒr ein Pydantic-Modell deklarieren, w //// tab | Python 3.10+ Pydantic v1 ```Python hl_lines="13-23" -{!> ../../../docs_src/schema_extra_example/tutorial001_py310_pv1.py!} +{!> ../../docs_src/schema_extra_example/tutorial001_py310_pv1.py!} ``` //// @@ -27,7 +27,7 @@ Sie können `examples` („Beispiele“) fĂŒr ein Pydantic-Modell deklarieren, w //// tab | Python 3.8+ Pydantic v2 ```Python hl_lines="15-26" -{!> ../../../docs_src/schema_extra_example/tutorial001.py!} +{!> ../../docs_src/schema_extra_example/tutorial001.py!} ``` //// @@ -35,7 +35,7 @@ Sie können `examples` („Beispiele“) fĂŒr ein Pydantic-Modell deklarieren, w //// tab | Python 3.8+ Pydantic v1 ```Python hl_lines="15-25" -{!> ../../../docs_src/schema_extra_example/tutorial001_pv1.py!} +{!> ../../docs_src/schema_extra_example/tutorial001_pv1.py!} ``` //// @@ -83,7 +83,7 @@ Wenn Sie `Field()` mit Pydantic-Modellen verwenden, können Sie ebenfalls zusĂ€t //// tab | Python 3.10+ ```Python hl_lines="2 8-11" -{!> ../../../docs_src/schema_extra_example/tutorial002_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial002_py310.py!} ``` //// @@ -91,7 +91,7 @@ Wenn Sie `Field()` mit Pydantic-Modellen verwenden, können Sie ebenfalls zusĂ€t //// tab | Python 3.8+ ```Python hl_lines="4 10-13" -{!> ../../../docs_src/schema_extra_example/tutorial002.py!} +{!> ../../docs_src/schema_extra_example/tutorial002.py!} ``` //// @@ -117,7 +117,7 @@ Hier ĂŒbergeben wir `examples`, welches ein einzelnes Beispiel fĂŒr die in `Body //// tab | Python 3.10+ ```Python hl_lines="22-29" -{!> ../../../docs_src/schema_extra_example/tutorial003_an_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial003_an_py310.py!} ``` //// @@ -125,7 +125,7 @@ Hier ĂŒbergeben wir `examples`, welches ein einzelnes Beispiel fĂŒr die in `Body //// tab | Python 3.9+ ```Python hl_lines="22-29" -{!> ../../../docs_src/schema_extra_example/tutorial003_an_py39.py!} +{!> ../../docs_src/schema_extra_example/tutorial003_an_py39.py!} ``` //// @@ -133,7 +133,7 @@ Hier ĂŒbergeben wir `examples`, welches ein einzelnes Beispiel fĂŒr die in `Body //// tab | Python 3.8+ ```Python hl_lines="23-30" -{!> ../../../docs_src/schema_extra_example/tutorial003_an.py!} +{!> ../../docs_src/schema_extra_example/tutorial003_an.py!} ``` //// @@ -147,7 +147,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="18-25" -{!> ../../../docs_src/schema_extra_example/tutorial003_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial003_py310.py!} ``` //// @@ -161,7 +161,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="20-27" -{!> ../../../docs_src/schema_extra_example/tutorial003.py!} +{!> ../../docs_src/schema_extra_example/tutorial003.py!} ``` //// @@ -179,7 +179,7 @@ Sie können natĂŒrlich auch mehrere `examples` ĂŒbergeben: //// tab | Python 3.10+ ```Python hl_lines="23-38" -{!> ../../../docs_src/schema_extra_example/tutorial004_an_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial004_an_py310.py!} ``` //// @@ -187,7 +187,7 @@ Sie können natĂŒrlich auch mehrere `examples` ĂŒbergeben: //// tab | Python 3.9+ ```Python hl_lines="23-38" -{!> ../../../docs_src/schema_extra_example/tutorial004_an_py39.py!} +{!> ../../docs_src/schema_extra_example/tutorial004_an_py39.py!} ``` //// @@ -195,7 +195,7 @@ Sie können natĂŒrlich auch mehrere `examples` ĂŒbergeben: //// tab | Python 3.8+ ```Python hl_lines="24-39" -{!> ../../../docs_src/schema_extra_example/tutorial004_an.py!} +{!> ../../docs_src/schema_extra_example/tutorial004_an.py!} ``` //// @@ -209,7 +209,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="19-34" -{!> ../../../docs_src/schema_extra_example/tutorial004_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial004_py310.py!} ``` //// @@ -223,7 +223,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="21-36" -{!> ../../../docs_src/schema_extra_example/tutorial004.py!} +{!> ../../docs_src/schema_extra_example/tutorial004.py!} ``` //// @@ -270,7 +270,7 @@ Sie können es so verwenden: //// tab | Python 3.10+ ```Python hl_lines="23-49" -{!> ../../../docs_src/schema_extra_example/tutorial005_an_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial005_an_py310.py!} ``` //// @@ -278,7 +278,7 @@ Sie können es so verwenden: //// tab | Python 3.9+ ```Python hl_lines="23-49" -{!> ../../../docs_src/schema_extra_example/tutorial005_an_py39.py!} +{!> ../../docs_src/schema_extra_example/tutorial005_an_py39.py!} ``` //// @@ -286,7 +286,7 @@ Sie können es so verwenden: //// tab | Python 3.8+ ```Python hl_lines="24-50" -{!> ../../../docs_src/schema_extra_example/tutorial005_an.py!} +{!> ../../docs_src/schema_extra_example/tutorial005_an.py!} ``` //// @@ -300,7 +300,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="19-45" -{!> ../../../docs_src/schema_extra_example/tutorial005_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial005_py310.py!} ``` //// @@ -314,7 +314,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="21-47" -{!> ../../../docs_src/schema_extra_example/tutorial005.py!} +{!> ../../docs_src/schema_extra_example/tutorial005.py!} ``` //// diff --git a/docs/de/docs/tutorial/security/first-steps.md b/docs/de/docs/tutorial/security/first-steps.md index 6bc42cf6c..c552a681b 100644 --- a/docs/de/docs/tutorial/security/first-steps.md +++ b/docs/de/docs/tutorial/security/first-steps.md @@ -23,7 +23,7 @@ Kopieren Sie das Beispiel in eine Datei `main.py`: //// tab | Python 3.9+ ```Python -{!> ../../../docs_src/security/tutorial001_an_py39.py!} +{!> ../../docs_src/security/tutorial001_an_py39.py!} ``` //// @@ -31,7 +31,7 @@ Kopieren Sie das Beispiel in eine Datei `main.py`: //// tab | Python 3.8+ ```Python -{!> ../../../docs_src/security/tutorial001_an.py!} +{!> ../../docs_src/security/tutorial001_an.py!} ``` //// @@ -45,7 +45,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python -{!> ../../../docs_src/security/tutorial001.py!} +{!> ../../docs_src/security/tutorial001.py!} ``` //// @@ -157,7 +157,7 @@ Wenn wir eine Instanz der Klasse `OAuth2PasswordBearer` erstellen, ĂŒbergeben wi //// tab | Python 3.9+ ```Python hl_lines="8" -{!> ../../../docs_src/security/tutorial001_an_py39.py!} +{!> ../../docs_src/security/tutorial001_an_py39.py!} ``` //// @@ -165,7 +165,7 @@ Wenn wir eine Instanz der Klasse `OAuth2PasswordBearer` erstellen, ĂŒbergeben wi //// tab | Python 3.8+ ```Python hl_lines="7" -{!> ../../../docs_src/security/tutorial001_an.py!} +{!> ../../docs_src/security/tutorial001_an.py!} ``` //// @@ -179,7 +179,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="6" -{!> ../../../docs_src/security/tutorial001.py!} +{!> ../../docs_src/security/tutorial001.py!} ``` //// @@ -223,7 +223,7 @@ Jetzt können Sie dieses `oauth2_scheme` als AbhĂ€ngigkeit `Depends` ĂŒbergeben. //// tab | Python 3.9+ ```Python hl_lines="12" -{!> ../../../docs_src/security/tutorial001_an_py39.py!} +{!> ../../docs_src/security/tutorial001_an_py39.py!} ``` //// @@ -231,7 +231,7 @@ Jetzt können Sie dieses `oauth2_scheme` als AbhĂ€ngigkeit `Depends` ĂŒbergeben. //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/security/tutorial001_an.py!} +{!> ../../docs_src/security/tutorial001_an.py!} ``` //// @@ -245,7 +245,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="10" -{!> ../../../docs_src/security/tutorial001.py!} +{!> ../../docs_src/security/tutorial001.py!} ``` //// diff --git a/docs/de/docs/tutorial/security/get-current-user.md b/docs/de/docs/tutorial/security/get-current-user.md index 8a68deeef..a9478a36e 100644 --- a/docs/de/docs/tutorial/security/get-current-user.md +++ b/docs/de/docs/tutorial/security/get-current-user.md @@ -5,7 +5,7 @@ Im vorherigen Kapitel hat das Sicherheitssystem (das auf dem Dependency Injectio //// tab | Python 3.9+ ```Python hl_lines="12" -{!> ../../../docs_src/security/tutorial001_an_py39.py!} +{!> ../../docs_src/security/tutorial001_an_py39.py!} ``` //// @@ -13,7 +13,7 @@ Im vorherigen Kapitel hat das Sicherheitssystem (das auf dem Dependency Injectio //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/security/tutorial001_an.py!} +{!> ../../docs_src/security/tutorial001_an.py!} ``` //// @@ -27,7 +27,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="10" -{!> ../../../docs_src/security/tutorial001.py!} +{!> ../../docs_src/security/tutorial001.py!} ``` //// @@ -45,7 +45,7 @@ So wie wir Pydantic zum Deklarieren von Bodys verwenden, können wir es auch ĂŒb //// tab | Python 3.10+ ```Python hl_lines="5 12-16" -{!> ../../../docs_src/security/tutorial002_an_py310.py!} +{!> ../../docs_src/security/tutorial002_an_py310.py!} ``` //// @@ -53,7 +53,7 @@ So wie wir Pydantic zum Deklarieren von Bodys verwenden, können wir es auch ĂŒb //// tab | Python 3.9+ ```Python hl_lines="5 12-16" -{!> ../../../docs_src/security/tutorial002_an_py39.py!} +{!> ../../docs_src/security/tutorial002_an_py39.py!} ``` //// @@ -61,7 +61,7 @@ So wie wir Pydantic zum Deklarieren von Bodys verwenden, können wir es auch ĂŒb //// tab | Python 3.8+ ```Python hl_lines="5 13-17" -{!> ../../../docs_src/security/tutorial002_an.py!} +{!> ../../docs_src/security/tutorial002_an.py!} ``` //// @@ -75,7 +75,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="3 10-14" -{!> ../../../docs_src/security/tutorial002_py310.py!} +{!> ../../docs_src/security/tutorial002_py310.py!} ``` //// @@ -89,7 +89,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="5 12-16" -{!> ../../../docs_src/security/tutorial002.py!} +{!> ../../docs_src/security/tutorial002.py!} ``` //// @@ -107,7 +107,7 @@ So wie wir es zuvor in der *Pfadoperation* direkt gemacht haben, erhĂ€lt unsere //// tab | Python 3.10+ ```Python hl_lines="25" -{!> ../../../docs_src/security/tutorial002_an_py310.py!} +{!> ../../docs_src/security/tutorial002_an_py310.py!} ``` //// @@ -115,7 +115,7 @@ So wie wir es zuvor in der *Pfadoperation* direkt gemacht haben, erhĂ€lt unsere //// tab | Python 3.9+ ```Python hl_lines="25" -{!> ../../../docs_src/security/tutorial002_an_py39.py!} +{!> ../../docs_src/security/tutorial002_an_py39.py!} ``` //// @@ -123,7 +123,7 @@ So wie wir es zuvor in der *Pfadoperation* direkt gemacht haben, erhĂ€lt unsere //// tab | Python 3.8+ ```Python hl_lines="26" -{!> ../../../docs_src/security/tutorial002_an.py!} +{!> ../../docs_src/security/tutorial002_an.py!} ``` //// @@ -137,7 +137,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="23" -{!> ../../../docs_src/security/tutorial002_py310.py!} +{!> ../../docs_src/security/tutorial002_py310.py!} ``` //// @@ -151,7 +151,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="25" -{!> ../../../docs_src/security/tutorial002.py!} +{!> ../../docs_src/security/tutorial002.py!} ``` //// @@ -163,7 +163,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. //// tab | Python 3.10+ ```Python hl_lines="19-22 26-27" -{!> ../../../docs_src/security/tutorial002_an_py310.py!} +{!> ../../docs_src/security/tutorial002_an_py310.py!} ``` //// @@ -171,7 +171,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. //// tab | Python 3.9+ ```Python hl_lines="19-22 26-27" -{!> ../../../docs_src/security/tutorial002_an_py39.py!} +{!> ../../docs_src/security/tutorial002_an_py39.py!} ``` //// @@ -179,7 +179,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. //// tab | Python 3.8+ ```Python hl_lines="20-23 27-28" -{!> ../../../docs_src/security/tutorial002_an.py!} +{!> ../../docs_src/security/tutorial002_an.py!} ``` //// @@ -193,7 +193,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="17-20 24-25" -{!> ../../../docs_src/security/tutorial002_py310.py!} +{!> ../../docs_src/security/tutorial002_py310.py!} ``` //// @@ -207,7 +207,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="19-22 26-27" -{!> ../../../docs_src/security/tutorial002.py!} +{!> ../../docs_src/security/tutorial002.py!} ``` //// @@ -219,7 +219,7 @@ Und jetzt können wir wiederum `Depends` mit unserem `get_current_user` in der * //// tab | Python 3.10+ ```Python hl_lines="31" -{!> ../../../docs_src/security/tutorial002_an_py310.py!} +{!> ../../docs_src/security/tutorial002_an_py310.py!} ``` //// @@ -227,7 +227,7 @@ Und jetzt können wir wiederum `Depends` mit unserem `get_current_user` in der * //// tab | Python 3.9+ ```Python hl_lines="31" -{!> ../../../docs_src/security/tutorial002_an_py39.py!} +{!> ../../docs_src/security/tutorial002_an_py39.py!} ``` //// @@ -235,7 +235,7 @@ Und jetzt können wir wiederum `Depends` mit unserem `get_current_user` in der * //// tab | Python 3.8+ ```Python hl_lines="32" -{!> ../../../docs_src/security/tutorial002_an.py!} +{!> ../../docs_src/security/tutorial002_an.py!} ``` //// @@ -249,7 +249,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="29" -{!> ../../../docs_src/security/tutorial002_py310.py!} +{!> ../../docs_src/security/tutorial002_py310.py!} ``` //// @@ -263,7 +263,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="31" -{!> ../../../docs_src/security/tutorial002.py!} +{!> ../../docs_src/security/tutorial002.py!} ``` //// @@ -323,7 +323,7 @@ Und alle diese Tausenden von *Pfadoperationen* können nur drei Zeilen lang sein //// tab | Python 3.10+ ```Python hl_lines="30-32" -{!> ../../../docs_src/security/tutorial002_an_py310.py!} +{!> ../../docs_src/security/tutorial002_an_py310.py!} ``` //// @@ -331,7 +331,7 @@ Und alle diese Tausenden von *Pfadoperationen* können nur drei Zeilen lang sein //// tab | Python 3.9+ ```Python hl_lines="30-32" -{!> ../../../docs_src/security/tutorial002_an_py39.py!} +{!> ../../docs_src/security/tutorial002_an_py39.py!} ``` //// @@ -339,7 +339,7 @@ Und alle diese Tausenden von *Pfadoperationen* können nur drei Zeilen lang sein //// tab | Python 3.8+ ```Python hl_lines="31-33" -{!> ../../../docs_src/security/tutorial002_an.py!} +{!> ../../docs_src/security/tutorial002_an.py!} ``` //// @@ -353,7 +353,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="28-30" -{!> ../../../docs_src/security/tutorial002_py310.py!} +{!> ../../docs_src/security/tutorial002_py310.py!} ``` //// @@ -367,7 +367,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="30-32" -{!> ../../../docs_src/security/tutorial002.py!} +{!> ../../docs_src/security/tutorial002.py!} ``` //// diff --git a/docs/de/docs/tutorial/security/oauth2-jwt.md b/docs/de/docs/tutorial/security/oauth2-jwt.md index 88f0dbe42..79e817840 100644 --- a/docs/de/docs/tutorial/security/oauth2-jwt.md +++ b/docs/de/docs/tutorial/security/oauth2-jwt.md @@ -121,7 +121,7 @@ Und noch eine, um einen Benutzer zu authentifizieren und zurĂŒckzugeben. //// tab | Python 3.10+ ```Python hl_lines="7 48 55-56 59-60 69-75" -{!> ../../../docs_src/security/tutorial004_an_py310.py!} +{!> ../../docs_src/security/tutorial004_an_py310.py!} ``` //// @@ -129,7 +129,7 @@ Und noch eine, um einen Benutzer zu authentifizieren und zurĂŒckzugeben. //// tab | Python 3.9+ ```Python hl_lines="7 48 55-56 59-60 69-75" -{!> ../../../docs_src/security/tutorial004_an_py39.py!} +{!> ../../docs_src/security/tutorial004_an_py39.py!} ``` //// @@ -137,7 +137,7 @@ Und noch eine, um einen Benutzer zu authentifizieren und zurĂŒckzugeben. //// tab | Python 3.8+ ```Python hl_lines="7 49 56-57 60-61 70-76" -{!> ../../../docs_src/security/tutorial004_an.py!} +{!> ../../docs_src/security/tutorial004_an.py!} ``` //// @@ -151,7 +151,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="6 47 54-55 58-59 68-74" -{!> ../../../docs_src/security/tutorial004_py310.py!} +{!> ../../docs_src/security/tutorial004_py310.py!} ``` //// @@ -165,7 +165,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="7 48 55-56 59-60 69-75" -{!> ../../../docs_src/security/tutorial004.py!} +{!> ../../docs_src/security/tutorial004.py!} ``` //// @@ -207,7 +207,7 @@ Erstellen Sie eine Hilfsfunktion, um einen neuen Zugriffstoken zu generieren. //// tab | Python 3.10+ ```Python hl_lines="6 12-14 28-30 78-86" -{!> ../../../docs_src/security/tutorial004_an_py310.py!} +{!> ../../docs_src/security/tutorial004_an_py310.py!} ``` //// @@ -215,7 +215,7 @@ Erstellen Sie eine Hilfsfunktion, um einen neuen Zugriffstoken zu generieren. //// tab | Python 3.9+ ```Python hl_lines="6 12-14 28-30 78-86" -{!> ../../../docs_src/security/tutorial004_an_py39.py!} +{!> ../../docs_src/security/tutorial004_an_py39.py!} ``` //// @@ -223,7 +223,7 @@ Erstellen Sie eine Hilfsfunktion, um einen neuen Zugriffstoken zu generieren. //// tab | Python 3.8+ ```Python hl_lines="6 13-15 29-31 79-87" -{!> ../../../docs_src/security/tutorial004_an.py!} +{!> ../../docs_src/security/tutorial004_an.py!} ``` //// @@ -237,7 +237,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="5 11-13 27-29 77-85" -{!> ../../../docs_src/security/tutorial004_py310.py!} +{!> ../../docs_src/security/tutorial004_py310.py!} ``` //// @@ -251,7 +251,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="6 12-14 28-30 78-86" -{!> ../../../docs_src/security/tutorial004.py!} +{!> ../../docs_src/security/tutorial004.py!} ``` //// @@ -267,7 +267,7 @@ Wenn der Token ungĂŒltig ist, geben Sie sofort einen HTTP-Fehler zurĂŒck. //// tab | Python 3.10+ ```Python hl_lines="89-106" -{!> ../../../docs_src/security/tutorial004_an_py310.py!} +{!> ../../docs_src/security/tutorial004_an_py310.py!} ``` //// @@ -275,7 +275,7 @@ Wenn der Token ungĂŒltig ist, geben Sie sofort einen HTTP-Fehler zurĂŒck. //// tab | Python 3.9+ ```Python hl_lines="89-106" -{!> ../../../docs_src/security/tutorial004_an_py39.py!} +{!> ../../docs_src/security/tutorial004_an_py39.py!} ``` //// @@ -283,7 +283,7 @@ Wenn der Token ungĂŒltig ist, geben Sie sofort einen HTTP-Fehler zurĂŒck. //// tab | Python 3.8+ ```Python hl_lines="90-107" -{!> ../../../docs_src/security/tutorial004_an.py!} +{!> ../../docs_src/security/tutorial004_an.py!} ``` //// @@ -297,7 +297,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="88-105" -{!> ../../../docs_src/security/tutorial004_py310.py!} +{!> ../../docs_src/security/tutorial004_py310.py!} ``` //// @@ -311,7 +311,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="89-106" -{!> ../../../docs_src/security/tutorial004.py!} +{!> ../../docs_src/security/tutorial004.py!} ``` //// @@ -325,7 +325,7 @@ Erstellen Sie einen echten JWT-Zugriffstoken und geben Sie ihn zurĂŒck. //// tab | Python 3.10+ ```Python hl_lines="117-132" -{!> ../../../docs_src/security/tutorial004_an_py310.py!} +{!> ../../docs_src/security/tutorial004_an_py310.py!} ``` //// @@ -333,7 +333,7 @@ Erstellen Sie einen echten JWT-Zugriffstoken und geben Sie ihn zurĂŒck. //// tab | Python 3.9+ ```Python hl_lines="117-132" -{!> ../../../docs_src/security/tutorial004_an_py39.py!} +{!> ../../docs_src/security/tutorial004_an_py39.py!} ``` //// @@ -341,7 +341,7 @@ Erstellen Sie einen echten JWT-Zugriffstoken und geben Sie ihn zurĂŒck. //// tab | Python 3.8+ ```Python hl_lines="118-133" -{!> ../../../docs_src/security/tutorial004_an.py!} +{!> ../../docs_src/security/tutorial004_an.py!} ``` //// @@ -355,7 +355,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="114-129" -{!> ../../../docs_src/security/tutorial004_py310.py!} +{!> ../../docs_src/security/tutorial004_py310.py!} ``` //// @@ -369,7 +369,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="115-130" -{!> ../../../docs_src/security/tutorial004.py!} +{!> ../../docs_src/security/tutorial004.py!} ``` //// diff --git a/docs/de/docs/tutorial/security/simple-oauth2.md b/docs/de/docs/tutorial/security/simple-oauth2.md index 3b1c4ae28..4c20fae55 100644 --- a/docs/de/docs/tutorial/security/simple-oauth2.md +++ b/docs/de/docs/tutorial/security/simple-oauth2.md @@ -55,7 +55,7 @@ Importieren Sie zunĂ€chst `OAuth2PasswordRequestForm` und verwenden Sie es als A //// tab | Python 3.10+ ```Python hl_lines="4 78" -{!> ../../../docs_src/security/tutorial003_an_py310.py!} +{!> ../../docs_src/security/tutorial003_an_py310.py!} ``` //// @@ -63,7 +63,7 @@ Importieren Sie zunĂ€chst `OAuth2PasswordRequestForm` und verwenden Sie es als A //// tab | Python 3.9+ ```Python hl_lines="4 78" -{!> ../../../docs_src/security/tutorial003_an_py39.py!} +{!> ../../docs_src/security/tutorial003_an_py39.py!} ``` //// @@ -71,7 +71,7 @@ Importieren Sie zunĂ€chst `OAuth2PasswordRequestForm` und verwenden Sie es als A //// tab | Python 3.8+ ```Python hl_lines="4 79" -{!> ../../../docs_src/security/tutorial003_an.py!} +{!> ../../docs_src/security/tutorial003_an.py!} ``` //// @@ -85,7 +85,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="2 74" -{!> ../../../docs_src/security/tutorial003_py310.py!} +{!> ../../docs_src/security/tutorial003_py310.py!} ``` //// @@ -99,7 +99,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="4 76" -{!> ../../../docs_src/security/tutorial003.py!} +{!> ../../docs_src/security/tutorial003.py!} ``` //// @@ -153,7 +153,7 @@ FĂŒr den Fehler verwenden wir die Exception `HTTPException`: //// tab | Python 3.10+ ```Python hl_lines="3 79-81" -{!> ../../../docs_src/security/tutorial003_an_py310.py!} +{!> ../../docs_src/security/tutorial003_an_py310.py!} ``` //// @@ -161,7 +161,7 @@ FĂŒr den Fehler verwenden wir die Exception `HTTPException`: //// tab | Python 3.9+ ```Python hl_lines="3 79-81" -{!> ../../../docs_src/security/tutorial003_an_py39.py!} +{!> ../../docs_src/security/tutorial003_an_py39.py!} ``` //// @@ -169,7 +169,7 @@ FĂŒr den Fehler verwenden wir die Exception `HTTPException`: //// tab | Python 3.8+ ```Python hl_lines="3 80-82" -{!> ../../../docs_src/security/tutorial003_an.py!} +{!> ../../docs_src/security/tutorial003_an.py!} ``` //// @@ -183,7 +183,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="1 75-77" -{!> ../../../docs_src/security/tutorial003_py310.py!} +{!> ../../docs_src/security/tutorial003_py310.py!} ``` //// @@ -197,7 +197,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="3 77-79" -{!> ../../../docs_src/security/tutorial003.py!} +{!> ../../docs_src/security/tutorial003.py!} ``` //// @@ -229,7 +229,7 @@ Der Dieb kann also nicht versuchen, die gleichen Passwörter in einem anderen Sy //// tab | Python 3.10+ ```Python hl_lines="82-85" -{!> ../../../docs_src/security/tutorial003_an_py310.py!} +{!> ../../docs_src/security/tutorial003_an_py310.py!} ``` //// @@ -237,7 +237,7 @@ Der Dieb kann also nicht versuchen, die gleichen Passwörter in einem anderen Sy //// tab | Python 3.9+ ```Python hl_lines="82-85" -{!> ../../../docs_src/security/tutorial003_an_py39.py!} +{!> ../../docs_src/security/tutorial003_an_py39.py!} ``` //// @@ -245,7 +245,7 @@ Der Dieb kann also nicht versuchen, die gleichen Passwörter in einem anderen Sy //// tab | Python 3.8+ ```Python hl_lines="83-86" -{!> ../../../docs_src/security/tutorial003_an.py!} +{!> ../../docs_src/security/tutorial003_an.py!} ``` //// @@ -259,7 +259,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="78-81" -{!> ../../../docs_src/security/tutorial003_py310.py!} +{!> ../../docs_src/security/tutorial003_py310.py!} ``` //// @@ -273,7 +273,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="80-83" -{!> ../../../docs_src/security/tutorial003.py!} +{!> ../../docs_src/security/tutorial003.py!} ``` //// @@ -321,7 +321,7 @@ Aber konzentrieren wir uns zunĂ€chst auf die spezifischen Details, die wir benö //// tab | Python 3.10+ ```Python hl_lines="87" -{!> ../../../docs_src/security/tutorial003_an_py310.py!} +{!> ../../docs_src/security/tutorial003_an_py310.py!} ``` //// @@ -329,7 +329,7 @@ Aber konzentrieren wir uns zunĂ€chst auf die spezifischen Details, die wir benö //// tab | Python 3.9+ ```Python hl_lines="87" -{!> ../../../docs_src/security/tutorial003_an_py39.py!} +{!> ../../docs_src/security/tutorial003_an_py39.py!} ``` //// @@ -337,7 +337,7 @@ Aber konzentrieren wir uns zunĂ€chst auf die spezifischen Details, die wir benö //// tab | Python 3.8+ ```Python hl_lines="88" -{!> ../../../docs_src/security/tutorial003_an.py!} +{!> ../../docs_src/security/tutorial003_an.py!} ``` //// @@ -351,7 +351,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="83" -{!> ../../../docs_src/security/tutorial003_py310.py!} +{!> ../../docs_src/security/tutorial003_py310.py!} ``` //// @@ -365,7 +365,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="85" -{!> ../../../docs_src/security/tutorial003.py!} +{!> ../../docs_src/security/tutorial003.py!} ``` //// @@ -397,7 +397,7 @@ In unserem Endpunkt erhalten wir also nur dann einen Benutzer, wenn der Benutzer //// tab | Python 3.10+ ```Python hl_lines="58-66 69-74 94" -{!> ../../../docs_src/security/tutorial003_an_py310.py!} +{!> ../../docs_src/security/tutorial003_an_py310.py!} ``` //// @@ -405,7 +405,7 @@ In unserem Endpunkt erhalten wir also nur dann einen Benutzer, wenn der Benutzer //// tab | Python 3.9+ ```Python hl_lines="58-66 69-74 94" -{!> ../../../docs_src/security/tutorial003_an_py39.py!} +{!> ../../docs_src/security/tutorial003_an_py39.py!} ``` //// @@ -413,7 +413,7 @@ In unserem Endpunkt erhalten wir also nur dann einen Benutzer, wenn der Benutzer //// tab | Python 3.8+ ```Python hl_lines="59-67 70-75 95" -{!> ../../../docs_src/security/tutorial003_an.py!} +{!> ../../docs_src/security/tutorial003_an.py!} ``` //// @@ -427,7 +427,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="56-64 67-70 88" -{!> ../../../docs_src/security/tutorial003_py310.py!} +{!> ../../docs_src/security/tutorial003_py310.py!} ``` //// @@ -441,7 +441,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="58-66 69-72 90" -{!> ../../../docs_src/security/tutorial003.py!} +{!> ../../docs_src/security/tutorial003.py!} ``` //// diff --git a/docs/de/docs/tutorial/static-files.md b/docs/de/docs/tutorial/static-files.md index cca8cd0ea..4afd251aa 100644 --- a/docs/de/docs/tutorial/static-files.md +++ b/docs/de/docs/tutorial/static-files.md @@ -8,7 +8,7 @@ Mit `StaticFiles` können Sie statische Dateien aus einem Verzeichnis automatisc * „Mounten“ Sie eine `StaticFiles()`-Instanz in einem bestimmten Pfad. ```Python hl_lines="2 6" -{!../../../docs_src/static_files/tutorial001.py!} +{!../../docs_src/static_files/tutorial001.py!} ``` /// note | "Technische Details" diff --git a/docs/de/docs/tutorial/testing.md b/docs/de/docs/tutorial/testing.md index 43ced2aae..bda6d7d60 100644 --- a/docs/de/docs/tutorial/testing.md +++ b/docs/de/docs/tutorial/testing.md @@ -27,7 +27,7 @@ Verwenden Sie das `TestClient`-Objekt auf die gleiche Weise wie `httpx`. Schreiben Sie einfache `assert`-Anweisungen mit den Standard-Python-AusdrĂŒcken, die Sie ĂŒberprĂŒfen mĂŒssen (wiederum, Standard-`pytest`). ```Python hl_lines="2 12 15-18" -{!../../../docs_src/app_testing/tutorial001.py!} +{!../../docs_src/app_testing/tutorial001.py!} ``` /// tip | "Tipp" @@ -75,7 +75,7 @@ In der Datei `main.py` haben Sie Ihre **FastAPI**-Anwendung: ```Python -{!../../../docs_src/app_testing/main.py!} +{!../../docs_src/app_testing/main.py!} ``` ### Testdatei @@ -93,7 +93,7 @@ Dann könnten Sie eine Datei `test_main.py` mit Ihren Tests haben. Sie könnte s Da sich diese Datei im selben Package befindet, können Sie relative Importe verwenden, um das Objekt `app` aus dem `main`-Modul (`main.py`) zu importieren: ```Python hl_lines="3" -{!../../../docs_src/app_testing/test_main.py!} +{!../../docs_src/app_testing/test_main.py!} ``` ... und haben den Code fĂŒr die Tests wie zuvor. @@ -125,7 +125,7 @@ Beide *Pfadoperationen* erfordern einen `X-Token`-Header. //// tab | Python 3.10+ ```Python -{!> ../../../docs_src/app_testing/app_b_an_py310/main.py!} +{!> ../../docs_src/app_testing/app_b_an_py310/main.py!} ``` //// @@ -133,7 +133,7 @@ Beide *Pfadoperationen* erfordern einen `X-Token`-Header. //// tab | Python 3.9+ ```Python -{!> ../../../docs_src/app_testing/app_b_an_py39/main.py!} +{!> ../../docs_src/app_testing/app_b_an_py39/main.py!} ``` //// @@ -141,7 +141,7 @@ Beide *Pfadoperationen* erfordern einen `X-Token`-Header. //// tab | Python 3.8+ ```Python -{!> ../../../docs_src/app_testing/app_b_an/main.py!} +{!> ../../docs_src/app_testing/app_b_an/main.py!} ``` //// @@ -155,7 +155,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python -{!> ../../../docs_src/app_testing/app_b_py310/main.py!} +{!> ../../docs_src/app_testing/app_b_py310/main.py!} ``` //// @@ -169,7 +169,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python -{!> ../../../docs_src/app_testing/app_b/main.py!} +{!> ../../docs_src/app_testing/app_b/main.py!} ``` //// @@ -179,7 +179,7 @@ Bevorzugen Sie die `Annotated`-Version, falls möglich. Anschließend könnten Sie `test_main.py` mit den erweiterten Tests aktualisieren: ```Python -{!> ../../../docs_src/app_testing/app_b/test_main.py!} +{!> ../../docs_src/app_testing/app_b/test_main.py!} ``` Wenn Sie möchten, dass der Client Informationen im Request ĂŒbergibt und Sie nicht wissen, wie das geht, können Sie suchen (googeln), wie es mit `httpx` gemacht wird, oder sogar, wie es mit `requests` gemacht wird, da das Design von HTTPX auf dem Design von Requests basiert. diff --git a/docs/em/docs/advanced/additional-responses.md b/docs/em/docs/advanced/additional-responses.md index 7a70718c5..e4442135e 100644 --- a/docs/em/docs/advanced/additional-responses.md +++ b/docs/em/docs/advanced/additional-responses.md @@ -27,7 +27,7 @@ đŸ–Œ, 📣 ➕1ïžâƒŁ 📹 âźïž 👔 📟 `404` & Pydantic đŸ· `Message`, 👆 đŸ’Ș ✍: ```Python hl_lines="18 22" -{!../../../docs_src/additional_responses/tutorial001.py!} +{!../../docs_src/additional_responses/tutorial001.py!} ``` /// note @@ -178,7 +178,7 @@ đŸ–Œ, 👆 đŸ’Ș 🚼 🌖 đŸ“» 🆎 `image/png`, 📣 👈 👆 *➡ đŸ› ïž* đŸ’Ș 📹 đŸŽ» 🎚 (âźïž đŸ“» 🆎 `application/json`) ⚖ đŸ‡©đŸ‡Ž đŸ–Œ: ```Python hl_lines="19-24 28" -{!../../../docs_src/additional_responses/tutorial002.py!} +{!../../docs_src/additional_responses/tutorial002.py!} ``` /// note @@ -208,7 +208,7 @@ & 📹 âźïž 👔 📟 `200` 👈 ⚙ 👆 `response_model`, ✋ 🔌 🛃 `example`: ```Python hl_lines="20-31" -{!../../../docs_src/additional_responses/tutorial003.py!} +{!../../docs_src/additional_responses/tutorial003.py!} ``` ⚫ 🔜 🌐 🌀 & 🔌 👆 🗄, & 🎩 đŸ› ïž đŸ©ș: @@ -244,7 +244,7 @@ new_dict = {**old_dict, "new key": "new value"} đŸ–Œ: ```Python hl_lines="13-17 26" -{!../../../docs_src/additional_responses/tutorial004.py!} +{!../../docs_src/additional_responses/tutorial004.py!} ``` ## 🌖 â„č 🔃 🗄 📹 diff --git a/docs/em/docs/advanced/additional-status-codes.md b/docs/em/docs/advanced/additional-status-codes.md index 3f3b0aea4..7a50e1bca 100644 --- a/docs/em/docs/advanced/additional-status-codes.md +++ b/docs/em/docs/advanced/additional-status-codes.md @@ -15,7 +15,7 @@ 🏆 👈, 🗄 `JSONResponse`, & 📹 👆 🎚 đŸ“€ 🔗, ⚒ `status_code` 👈 👆 💚: ```Python hl_lines="4 25" -{!../../../docs_src/additional_status_codes/tutorial001.py!} +{!../../docs_src/additional_status_codes/tutorial001.py!} ``` /// warning diff --git a/docs/em/docs/advanced/advanced-dependencies.md b/docs/em/docs/advanced/advanced-dependencies.md index 22044c783..721428ce4 100644 --- a/docs/em/docs/advanced/advanced-dependencies.md +++ b/docs/em/docs/advanced/advanced-dependencies.md @@ -19,7 +19,7 @@ 👈, đŸ‘„ 📣 đŸ‘©â€đŸ”Ź `__call__`: ```Python hl_lines="10" -{!../../../docs_src/dependencies/tutorial011.py!} +{!../../docs_src/dependencies/tutorial011.py!} ``` 👉 đŸ’Œ, 👉 `__call__` ⚫❔ **FastAPI** 🔜 ⚙ ✅ 🌖 🔱 & 🎧-🔗, & 👉 ⚫❔ 🔜 đŸ€™ đŸš¶â€â™€ïž đŸ’Č 🔱 👆 *➡ đŸ› ïž 🔱* âȘ. @@ -29,7 +29,7 @@ & 🔜, đŸ‘„ đŸ’Ș ⚙ `__init__` 📣 🔱 👐 👈 đŸ‘„ đŸ’Ș ⚙ "🔗" 🔗: ```Python hl_lines="7" -{!../../../docs_src/dependencies/tutorial011.py!} +{!../../docs_src/dependencies/tutorial011.py!} ``` 👉 đŸ’Œ, **FastAPI** 🏆 đŸš« ⏱ 👆 ⚖ 💅 🔃 `__init__`, đŸ‘„ 🔜 ⚙ ⚫ 🔗 👆 📟. @@ -39,7 +39,7 @@ đŸ‘„ đŸ’Ș ✍ 👐 👉 🎓 âźïž: ```Python hl_lines="16" -{!../../../docs_src/dependencies/tutorial011.py!} +{!../../docs_src/dependencies/tutorial011.py!} ``` & 👈 🌌 đŸ‘„ đŸ’Ș "🔗" 👆 🔗, 👈 🔜 ✔ `"bar"` 🔘 ⚫, 🔱 `checker.fixed_content`. @@ -57,7 +57,7 @@ checker(q="somequery") ...& đŸš¶â€â™€ïž ⚫❔ 👈 📹 đŸ’Č 🔗 👆 *➡ đŸ› ïž 🔱* 🔱 `fixed_content_included`: ```Python hl_lines="20" -{!../../../docs_src/dependencies/tutorial011.py!} +{!../../docs_src/dependencies/tutorial011.py!} ``` /// tip diff --git a/docs/em/docs/advanced/async-tests.md b/docs/em/docs/advanced/async-tests.md index 11f885fe6..4d468acd4 100644 --- a/docs/em/docs/advanced/async-tests.md +++ b/docs/em/docs/advanced/async-tests.md @@ -33,13 +33,13 @@ 📁 `main.py` 🔜 ✔: ```Python -{!../../../docs_src/async_tests/main.py!} +{!../../docs_src/async_tests/main.py!} ``` 📁 `test_main.py` 🔜 ✔ 💯 `main.py`, ⚫ đŸ’Ș 👀 💖 👉 🔜: ```Python -{!../../../docs_src/async_tests/test_main.py!} +{!../../docs_src/async_tests/test_main.py!} ``` ## 🏃 ⚫ @@ -61,7 +61,7 @@ $ pytest 📑 `@pytest.mark.anyio` 💬 ✳ 👈 👉 💯 🔱 🔜 đŸ€™ 🔁: ```Python hl_lines="7" -{!../../../docs_src/async_tests/test_main.py!} +{!../../docs_src/async_tests/test_main.py!} ``` /// tip @@ -73,7 +73,7 @@ $ pytest ‎ đŸ‘„ đŸ’Ș ✍ `AsyncClient` âźïž đŸ“±, & 📹 🔁 📹 ⚫, ⚙ `await`. ```Python hl_lines="9-12" -{!../../../docs_src/async_tests/test_main.py!} +{!../../docs_src/async_tests/test_main.py!} ``` 👉 🌓: diff --git a/docs/em/docs/advanced/behind-a-proxy.md b/docs/em/docs/advanced/behind-a-proxy.md index bb65e1487..e66ddccf7 100644 --- a/docs/em/docs/advanced/behind-a-proxy.md +++ b/docs/em/docs/advanced/behind-a-proxy.md @@ -95,7 +95,7 @@ $ uvicorn main:app --root-path /api/v1 đŸ“„ đŸ‘„ ✅ ⚫ 📧 🎩 🎯. ```Python hl_lines="8" -{!../../../docs_src/behind_a_proxy/tutorial001.py!} +{!../../docs_src/behind_a_proxy/tutorial001.py!} ``` ‎, đŸš„ 👆 ▶ Uvicorn âźïž: @@ -124,7 +124,7 @@ $ uvicorn main:app --root-path /api/v1 👐, đŸš„ 👆 đŸš« ✔ 🌌 🚚 📋 ⏞ 🎛 💖 `--root-path` ⚖ 🌓, 👆 đŸ’Ș ⚒ `root_path` 🔱 🕐❔ 🏗 👆 FastAPI đŸ“±: ```Python hl_lines="3" -{!../../../docs_src/behind_a_proxy/tutorial002.py!} +{!../../docs_src/behind_a_proxy/tutorial002.py!} ``` đŸš¶â€â™€ïž `root_path` `FastAPI` 🔜 🌓 đŸš¶â€â™€ïž `--root-path` 📋 ⏞ 🎛 Uvicorn ⚖ Hypercorn. @@ -306,7 +306,7 @@ $ uvicorn main:app --root-path /api/v1 đŸ–Œ: ```Python hl_lines="4-7" -{!../../../docs_src/behind_a_proxy/tutorial003.py!} +{!../../docs_src/behind_a_proxy/tutorial003.py!} ``` 🔜 🏗 🗄 🔗 💖: @@ -355,7 +355,7 @@ $ uvicorn main:app --root-path /api/v1 đŸš„ 👆 đŸš« 💚 **FastAPI** 🔌 🏧 đŸ’œ ⚙ `root_path`, 👆 đŸ’Ș ⚙ 🔱 `root_path_in_servers=False`: ```Python hl_lines="9" -{!../../../docs_src/behind_a_proxy/tutorial004.py!} +{!../../docs_src/behind_a_proxy/tutorial004.py!} ``` & ‎ ⚫ 🏆 đŸš« 🔌 ⚫ 🗄 🔗. diff --git a/docs/em/docs/advanced/custom-response.md b/docs/em/docs/advanced/custom-response.md index eec87b91b..7147a4536 100644 --- a/docs/em/docs/advanced/custom-response.md +++ b/docs/em/docs/advanced/custom-response.md @@ -31,7 +31,7 @@ ✋ đŸš„ 👆 🎯 👈 🎚 👈 👆 🛬 **đŸŽ» âźïž đŸŽ»**, 👆 đŸ’Ș đŸš¶â€â™€ïž ⚫ 🔗 📹 🎓 & ❎ ➕ đŸŒ„ 👈 FastAPI 🔜 ✔ đŸš¶â€â™€ïž 👆 📹 🎚 🔘 `jsonable_encoder` ⏭ đŸš¶â€â™€ïž ⚫ 📹 🎓. ```Python hl_lines="2 7" -{!../../../docs_src/custom_response/tutorial001b.py!} +{!../../docs_src/custom_response/tutorial001b.py!} ``` /// info @@ -58,7 +58,7 @@ * đŸš¶â€â™€ïž `HTMLResponse` 🔱 `response_class` 👆 *➡ đŸ› ïž 👹‍🎹*. ```Python hl_lines="2 7" -{!../../../docs_src/custom_response/tutorial002.py!} +{!../../docs_src/custom_response/tutorial002.py!} ``` /// info @@ -78,7 +78,7 @@ 🎏 đŸ–Œ âšȘïžâžĄïž 🔛, 🛬 `HTMLResponse`, đŸ’Ș 👀 💖: ```Python hl_lines="2 7 19" -{!../../../docs_src/custom_response/tutorial003.py!} +{!../../docs_src/custom_response/tutorial003.py!} ``` /// warning @@ -104,7 +104,7 @@ đŸ–Œ, ⚫ đŸ’Ș 🕳 💖: ```Python hl_lines="7 21 23" -{!../../../docs_src/custom_response/tutorial004.py!} +{!../../docs_src/custom_response/tutorial004.py!} ``` 👉 đŸ–Œ, 🔱 `generate_html_response()` âȘ 🏗 & 📹 `Response` ↩ 🛬 🕾 `str`. @@ -145,7 +145,7 @@ FastAPI (đŸ€™ 💃) 🔜 🔁 🔌 🎚-📐 🎚. ⚫ 🔜 🔌 🎚-🆎 🎚, ⚓ 🔛 = & 🔁 = ✍ 🆎. ```Python hl_lines="1 18" -{!../../../docs_src/response_directly/tutorial002.py!} +{!../../docs_src/response_directly/tutorial002.py!} ``` ### `HTMLResponse` @@ -157,7 +157,7 @@ FastAPI (đŸ€™ 💃) 🔜 🔁 🔌 🎚-📐 🎚. ⚫ 🔜 🔌 🎚-🆎 ✊ ✍ ⚖ 🔱 & 📹 ✅ ✍ 📹. ```Python hl_lines="2 7 9" -{!../../../docs_src/custom_response/tutorial005.py!} +{!../../docs_src/custom_response/tutorial005.py!} ``` ### `JSONResponse` @@ -181,7 +181,7 @@ FastAPI (đŸ€™ 💃) 🔜 🔁 🔌 🎚-📐 🎚. ⚫ 🔜 🔌 🎚-🆎 /// ```Python hl_lines="2 7" -{!../../../docs_src/custom_response/tutorial001.py!} +{!../../docs_src/custom_response/tutorial001.py!} ``` /// tip @@ -197,7 +197,7 @@ FastAPI (đŸ€™ 💃) 🔜 🔁 🔌 🎚-📐 🎚. ⚫ 🔜 🔌 🎚-🆎 👆 đŸ’Ș 📹 `RedirectResponse` 🔗: ```Python hl_lines="2 9" -{!../../../docs_src/custom_response/tutorial006.py!} +{!../../docs_src/custom_response/tutorial006.py!} ``` --- @@ -206,7 +206,7 @@ FastAPI (đŸ€™ 💃) 🔜 🔁 🔌 🎚-📐 🎚. ⚫ 🔜 🔌 🎚-🆎 ```Python hl_lines="2 7 9" -{!../../../docs_src/custom_response/tutorial006b.py!} +{!../../docs_src/custom_response/tutorial006b.py!} ``` đŸš„ 👆 👈, ‎ 👆 đŸ’Ș 📹 📛 🔗 âšȘïžâžĄïž 👆 *➡ đŸ› ïž* 🔱. @@ -218,7 +218,7 @@ FastAPI (đŸ€™ 💃) 🔜 🔁 🔌 🎚-📐 🎚. ⚫ 🔜 🔌 🎚-🆎 👆 đŸ’Ș ⚙ `status_code` 🔱 🌀 âźïž `response_class` 🔱: ```Python hl_lines="2 7 9" -{!../../../docs_src/custom_response/tutorial006c.py!} +{!../../docs_src/custom_response/tutorial006c.py!} ``` ### `StreamingResponse` @@ -226,7 +226,7 @@ FastAPI (đŸ€™ 💃) 🔜 🔁 🔌 🎚-📐 🎚. ⚫ 🔜 🔌 🎚-🆎 ✊ 🔁 🚂 ⚖ 😐 🚂/đŸŽ» & 🎏 📹 đŸ’Ș. ```Python hl_lines="2 14" -{!../../../docs_src/custom_response/tutorial007.py!} +{!../../docs_src/custom_response/tutorial007.py!} ``` #### ⚙ `StreamingResponse` âźïž 📁-💖 🎚 @@ -238,7 +238,7 @@ FastAPI (đŸ€™ 💃) 🔜 🔁 🔌 🎚-📐 🎚. ⚫ 🔜 🔌 🎚-🆎 👉 🔌 📚 🗃 🔗 âźïž ☁ đŸ’Ÿ, đŸ“č 🏭, & 🎏. ```{ .python .annotate hl_lines="2 10-12 14" } -{!../../../docs_src/custom_response/tutorial008.py!} +{!../../docs_src/custom_response/tutorial008.py!} ``` 1ïžâƒŁ. 👉 🚂 🔱. ⚫ "🚂 🔱" ↩ ⚫ 🔌 `yield` 📄 🔘. @@ -269,13 +269,13 @@ FastAPI (đŸ€™ 💃) 🔜 🔁 🔌 🎚-📐 🎚. ⚫ 🔜 🔌 🎚-🆎 📁 📹 🔜 🔌 ☑ `Content-Length`, `Last-Modified` & `ETag` 🎚. ```Python hl_lines="2 10" -{!../../../docs_src/custom_response/tutorial009.py!} +{!../../docs_src/custom_response/tutorial009.py!} ``` 👆 đŸ’Ș ⚙ `response_class` 🔱: ```Python hl_lines="2 8 10" -{!../../../docs_src/custom_response/tutorial009b.py!} +{!../../docs_src/custom_response/tutorial009b.py!} ``` 👉 đŸ’Œ, 👆 đŸ’Ș 📹 📁 ➡ 🔗 âšȘïžâžĄïž 👆 *➡ đŸ› ïž* 🔱. @@ -291,7 +291,7 @@ FastAPI (đŸ€™ 💃) 🔜 🔁 🔌 🎚-📐 🎚. ⚫ 🔜 🔌 🎚-🆎 👆 đŸ’Ș ✍ `CustomORJSONResponse`. 👑 👜 👆 ✔ ✍ `Response.render(content)` đŸ‘©â€đŸ”Ź 👈 📹 🎚 `bytes`: ```Python hl_lines="9-14 17" -{!../../../docs_src/custom_response/tutorial009c.py!} +{!../../docs_src/custom_response/tutorial009c.py!} ``` 🔜 ↩ 🛬: @@ -319,7 +319,7 @@ FastAPI (đŸ€™ 💃) 🔜 🔁 🔌 🎚-📐 🎚. ⚫ 🔜 🔌 🎚-🆎 đŸ–Œ 🔛, **FastAPI** 🔜 ⚙ `ORJSONResponse` 🔱, 🌐 *➡ đŸ› ïž*, ↩ `JSONResponse`. ```Python hl_lines="2 4" -{!../../../docs_src/custom_response/tutorial010.py!} +{!../../docs_src/custom_response/tutorial010.py!} ``` /// tip diff --git a/docs/em/docs/advanced/dataclasses.md b/docs/em/docs/advanced/dataclasses.md index 3f49ef07c..ab76e5083 100644 --- a/docs/em/docs/advanced/dataclasses.md +++ b/docs/em/docs/advanced/dataclasses.md @@ -5,7 +5,7 @@ FastAPI 🏗 🔛 🔝 **Pydantic**, & đŸ‘€ ✔ 🌏 👆 ❔ ⚙ Pyda ✋ FastAPI 🐕‍đŸŠș ⚙ `dataclasses` 🎏 🌌: ```Python hl_lines="1 7-12 19-20" -{!../../../docs_src/dataclasses/tutorial001.py!} +{!../../docs_src/dataclasses/tutorial001.py!} ``` 👉 🐕‍đŸŠș 👏 **Pydantic**, ⚫ ✔ 🔗 🐕‍đŸŠș `dataclasses`. @@ -35,7 +35,7 @@ FastAPI 🏗 🔛 🔝 **Pydantic**, & đŸ‘€ ✔ 🌏 👆 ❔ ⚙ Pyda 👆 đŸ’Ș ⚙ `dataclasses` `response_model` 🔱: ```Python hl_lines="1 7-13 19" -{!../../../docs_src/dataclasses/tutorial002.py!} +{!../../docs_src/dataclasses/tutorial002.py!} ``` đŸŽ» 🔜 🔁 🗜 Pydantic đŸŽ». @@ -53,7 +53,7 @@ FastAPI 🏗 🔛 🔝 **Pydantic**, & đŸ‘€ ✔ 🌏 👆 ❔ ⚙ Pyda 👈 đŸ’Œ, 👆 đŸ’Ș 🎯 đŸ’± đŸ© `dataclasses` âźïž `pydantic.dataclasses`, ❔ 💧-♻: ```{ .python .annotate hl_lines="1 5 8-11 14-17 23-25 28" } -{!../../../docs_src/dataclasses/tutorial003.py!} +{!../../docs_src/dataclasses/tutorial003.py!} ``` 1ïžâƒŁ. đŸ‘„ 🗄 `field` âšȘïžâžĄïž đŸ© `dataclasses`. diff --git a/docs/em/docs/advanced/events.md b/docs/em/docs/advanced/events.md index 12c902c18..2eae2b366 100644 --- a/docs/em/docs/advanced/events.md +++ b/docs/em/docs/advanced/events.md @@ -31,7 +31,7 @@ đŸ‘„ ✍ 🔁 🔱 `lifespan()` âźïž `yield` 💖 👉: ```Python hl_lines="16 19" -{!../../../docs_src/events/tutorial003.py!} +{!../../docs_src/events/tutorial003.py!} ``` đŸ“„ đŸ‘„ ⚖ đŸ˜„ *🕮* đŸ› ïž 🚚 đŸ· 🚼 (❌) đŸ· 🔱 📖 âźïž 🎰 đŸ« đŸ· ⏭ `yield`. 👉 📟 🔜 đŸ› ïž **⏭** 🈾 **▶ ✊ 📹**, âźïž *🕮*. @@ -51,7 +51,7 @@ đŸ„‡ 👜 👀, 👈 đŸ‘„ ⚖ 🔁 🔱 âźïž `yield`. 👉 đŸ“¶ 🎏 🔗 âźïž `yield`. ```Python hl_lines="14-19" -{!../../../docs_src/events/tutorial003.py!} +{!../../docs_src/events/tutorial003.py!} ``` đŸ„‡ 🍕 🔱, ⏭ `yield`, 🔜 đŸ› ïž **⏭** 🈾 ▶. @@ -65,7 +65,7 @@ 👈 🗜 🔱 🔘 🕳 đŸ€™ "**🔁 🔑 đŸ‘šâ€đŸ’Œ**". ```Python hl_lines="1 13" -{!../../../docs_src/events/tutorial003.py!} +{!../../docs_src/events/tutorial003.py!} ``` **🔑 đŸ‘šâ€đŸ’Œ** 🐍 🕳 👈 👆 đŸ’Ș ⚙ `with` 📄, đŸ–Œ, `open()` đŸ’Ș ⚙ 🔑 đŸ‘šâ€đŸ’Œ: @@ -89,7 +89,7 @@ async with lifespan(app): `lifespan` 🔱 `FastAPI` đŸ“± ✊ **🔁 🔑 đŸ‘šâ€đŸ’Œ**, đŸ‘„ đŸ’Ș đŸš¶â€â™€ïž 👆 🆕 `lifespan` 🔁 🔑 đŸ‘šâ€đŸ’Œ ⚫. ```Python hl_lines="22" -{!../../../docs_src/events/tutorial003.py!} +{!../../docs_src/events/tutorial003.py!} ``` ## 🎛 🎉 (😱) @@ -113,7 +113,7 @@ async with lifespan(app): 🚼 🔱 👈 🔜 🏃 ⏭ 🈾 ▶, 📣 ⚫ âźïž 🎉 `"startup"`: ```Python hl_lines="8" -{!../../../docs_src/events/tutorial001.py!} +{!../../docs_src/events/tutorial001.py!} ``` 👉 đŸ’Œ, `startup` 🎉 🐕‍đŸŠș 🔱 🔜 🔱 🏬 "đŸ’œ" ( `dict`) âźïž đŸ’Č. @@ -127,7 +127,7 @@ async with lifespan(app): 🚼 🔱 👈 🔜 🏃 🕐❔ 🈾 đŸ€« đŸ”œ, 📣 ⚫ âźïž 🎉 `"shutdown"`: ```Python hl_lines="6" -{!../../../docs_src/events/tutorial002.py!} +{!../../docs_src/events/tutorial002.py!} ``` đŸ“„, `shutdown` 🎉 🐕‍đŸŠș 🔱 🔜 ✍ ✍ ⏞ `"Application shutdown"` 📁 `log.txt`. diff --git a/docs/em/docs/advanced/generate-clients.md b/docs/em/docs/advanced/generate-clients.md index c8e044340..f09d75623 100644 --- a/docs/em/docs/advanced/generate-clients.md +++ b/docs/em/docs/advanced/generate-clients.md @@ -19,7 +19,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9-11 14-15 18 19 23" -{!> ../../../docs_src/generate_clients/tutorial001.py!} +{!> ../../docs_src/generate_clients/tutorial001.py!} ``` //// @@ -27,7 +27,7 @@ //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="7-9 12-13 16-17 21" -{!> ../../../docs_src/generate_clients/tutorial001_py39.py!} +{!> ../../docs_src/generate_clients/tutorial001_py39.py!} ``` //// @@ -139,7 +139,7 @@ frontend-app@1.0.0 generate-client /home/user/code/frontend-app //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="23 28 36" -{!> ../../../docs_src/generate_clients/tutorial002.py!} +{!> ../../docs_src/generate_clients/tutorial002.py!} ``` //// @@ -147,7 +147,7 @@ frontend-app@1.0.0 generate-client /home/user/code/frontend-app //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="21 26 34" -{!> ../../../docs_src/generate_clients/tutorial002_py39.py!} +{!> ../../docs_src/generate_clients/tutorial002_py39.py!} ``` //// @@ -200,7 +200,7 @@ FastAPI ⚙ **😍 🆔** 🔠 *➡ đŸ› ïž*, ⚫ ⚙ **đŸ› ïž 🆔** //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="8-9 12" -{!> ../../../docs_src/generate_clients/tutorial003.py!} +{!> ../../docs_src/generate_clients/tutorial003.py!} ``` //// @@ -208,7 +208,7 @@ FastAPI ⚙ **😍 🆔** 🔠 *➡ đŸ› ïž*, ⚫ ⚙ **đŸ› ïž 🆔** //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="6-7 10" -{!> ../../../docs_src/generate_clients/tutorial003_py39.py!} +{!> ../../docs_src/generate_clients/tutorial003_py39.py!} ``` //// @@ -234,7 +234,7 @@ FastAPI ⚙ **😍 🆔** 🔠 *➡ đŸ› ïž*, ⚫ ⚙ **đŸ› ïž 🆔** đŸ‘„ đŸ’Ș ⏬ 🗄 đŸŽ» 📁 `openapi.json` & ‎ đŸ‘„ đŸ’Ș **❎ 👈 🔡 🔖** âźïž ✍ 💖 👉: ```Python -{!../../../docs_src/generate_clients/tutorial004.py!} +{!../../docs_src/generate_clients/tutorial004.py!} ``` âźïž 👈, đŸ› ïž 🆔 🔜 📁 âšȘïžâžĄïž 👜 💖 `items-get_items` `get_items`, 👈 🌌 đŸ‘©â€đŸ’» 🚂 đŸ’Ș 🏗 🙅 đŸ‘©â€đŸ”Ź 📛. diff --git a/docs/em/docs/advanced/middleware.md b/docs/em/docs/advanced/middleware.md index e3cc389c6..23d2918d7 100644 --- a/docs/em/docs/advanced/middleware.md +++ b/docs/em/docs/advanced/middleware.md @@ -58,7 +58,7 @@ app.add_middleware(UnicornMiddleware, some_config="rainbow") 🙆 📹 📹 `http` ⚖ `ws` 🔜 ❎ 🔐 ⚖ ↩. ```Python hl_lines="2 6" -{!../../../docs_src/advanced_middleware/tutorial001.py!} +{!../../docs_src/advanced_middleware/tutorial001.py!} ``` ## `TrustedHostMiddleware` @@ -66,7 +66,7 @@ app.add_middleware(UnicornMiddleware, some_config="rainbow") đŸ› ïž 👈 🌐 📹 📹 ✔ ☑ ⚒ `Host` 🎚, ✔ 💂‍♂ 🛡 đŸ‡ș🇾🔍 🩠 🎚 👊. ```Python hl_lines="2 6-8" -{!../../../docs_src/advanced_middleware/tutorial002.py!} +{!../../docs_src/advanced_middleware/tutorial002.py!} ``` 📄 ❌ 🐕‍đŸŠș: @@ -82,7 +82,7 @@ app.add_middleware(UnicornMiddleware, some_config="rainbow") đŸ› ïž 🔜 đŸ” đŸ‘Żâ€â™‚ïž đŸ© & đŸŽ„ 📹. ```Python hl_lines="2 6" -{!../../../docs_src/advanced_middleware/tutorial003.py!} +{!../../docs_src/advanced_middleware/tutorial003.py!} ``` 📄 ❌ 🐕‍đŸŠș: diff --git a/docs/em/docs/advanced/openapi-callbacks.md b/docs/em/docs/advanced/openapi-callbacks.md index 00d54ebec..f7b5e7ed9 100644 --- a/docs/em/docs/advanced/openapi-callbacks.md +++ b/docs/em/docs/advanced/openapi-callbacks.md @@ -32,7 +32,7 @@ 👉 🍕 đŸ“¶ 😐, 🌅 📟 đŸŽČ âȘ 😰 👆: ```Python hl_lines="9-13 36-53" -{!../../../docs_src/openapi_callbacks/tutorial001.py!} +{!../../docs_src/openapi_callbacks/tutorial001.py!} ``` /// tip @@ -93,7 +93,7 @@ httpx.post(callback_url, json={"description": "Invoice paid", "paid": True}) đŸ„‡ ✍ 🆕 `APIRouter` 👈 🔜 🔌 1ïžâƒŁ ⚖ 🌅 âČ. ```Python hl_lines="3 25" -{!../../../docs_src/openapi_callbacks/tutorial001.py!} +{!../../docs_src/openapi_callbacks/tutorial001.py!} ``` ### ✍ âČ *➡ đŸ› ïž* @@ -106,7 +106,7 @@ httpx.post(callback_url, json={"description": "Invoice paid", "paid": True}) * & ⚫ đŸ’Ș ✔ 📄 📹 ⚫ 🔜 📹, ✅ `response_model=InvoiceEventReceived`. ```Python hl_lines="16-18 21-22 28-32" -{!../../../docs_src/openapi_callbacks/tutorial001.py!} +{!../../docs_src/openapi_callbacks/tutorial001.py!} ``` đŸ“€ 2ïžâƒŁ 👑 đŸ”ș âšȘïžâžĄïž 😐 *➡ đŸ› ïž*: @@ -176,7 +176,7 @@ https://www.external.org/events/invoices/2expen51ve 🔜 ⚙ 🔱 `callbacks` *👆 đŸ› ïž ➡ đŸ› ïž 👹‍🎹* đŸš¶â€â™€ïž 🔱 `.routes` (👈 đŸ€™ `list` 🛣/*➡ đŸ› ïž*) âšȘïžâžĄïž 👈 âČ đŸ“»: ```Python hl_lines="35" -{!../../../docs_src/openapi_callbacks/tutorial001.py!} +{!../../docs_src/openapi_callbacks/tutorial001.py!} ``` /// tip diff --git a/docs/em/docs/advanced/path-operation-advanced-configuration.md b/docs/em/docs/advanced/path-operation-advanced-configuration.md index b684df26f..805bfdf30 100644 --- a/docs/em/docs/advanced/path-operation-advanced-configuration.md +++ b/docs/em/docs/advanced/path-operation-advanced-configuration.md @@ -13,7 +13,7 @@ 👆 🔜 ✔ ⚒ 💭 👈 ⚫ 😍 🔠 đŸ› ïž. ```Python hl_lines="6" -{!../../../docs_src/path_operation_advanced_configuration/tutorial001.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial001.py!} ``` ### ⚙ *➡ đŸ› ïž 🔱* 📛 { @@ -23,7 +23,7 @@ 👆 🔜 ⚫ âźïž ❎ 🌐 👆 *➡ đŸ› ïž*. ```Python hl_lines="2 12-21 24" -{!../../../docs_src/path_operation_advanced_configuration/tutorial002.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial002.py!} ``` /// tip @@ -45,7 +45,7 @@ đŸš« *➡ đŸ› ïž* âšȘïžâžĄïž 🏗 🗄 🔗 (& âžĄïž, âšȘïžâžĄïž 🏧 đŸ§Ÿ ⚙), ⚙ 🔱 `include_in_schema` & ⚒ ⚫ `False`: ```Python hl_lines="6" -{!../../../docs_src/path_operation_advanced_configuration/tutorial003.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial003.py!} ``` ## 🏧 📛 âšȘïžâžĄïž #ïžâƒŁ @@ -57,7 +57,7 @@ ⚫ 🏆 đŸš« 🎩 🆙 đŸ§Ÿ, ✋ 🎏 🧰 (✅ 🐉) 🔜 đŸ’Ș ⚙ 🎂. ```Python hl_lines="19-29" -{!../../../docs_src/path_operation_advanced_configuration/tutorial004.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial004.py!} ``` ## 🌖 📹 @@ -101,7 +101,7 @@ 👉 `openapi_extra` đŸ’Ș 👍, đŸ–Œ, 📣 [🗄 ↔](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#specificationExtensions): ```Python hl_lines="6" -{!../../../docs_src/path_operation_advanced_configuration/tutorial005.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial005.py!} ``` đŸš„ 👆 📂 🏧 đŸ› ïž đŸ©ș, 👆 ↔ 🔜 🎩 🆙 🔝 🎯 *➡ đŸ› ïž*. @@ -150,7 +150,7 @@ 👆 đŸ’Ș 👈 âźïž `openapi_extra`: ```Python hl_lines="20-37 39-40" -{!../../../docs_src/path_operation_advanced_configuration/tutorial006.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial006.py!} ``` 👉 đŸ–Œ, đŸ‘„ đŸš« 📣 🙆 Pydantic đŸ·. 👐, 📹 đŸ’Ș đŸš« đŸŽ» đŸŽ», ⚫ ✍ 🔗 `bytes`, & 🔱 `magic_data_reader()` 🔜 🈚 đŸŽ» ⚫ 🌌. @@ -166,7 +166,7 @@ đŸ–Œ, 👉 🈾 đŸ‘„ đŸš« ⚙ FastAPI đŸ› ïž đŸ› ïž ⚗ đŸŽ» 🔗 âšȘïžâžĄïž Pydantic đŸ· đŸš« 🏧 🔬 đŸŽ». 👐, đŸ‘„ 📣 📹 🎚 🆎 📁, đŸš« đŸŽ»: ```Python hl_lines="17-22 24" -{!../../../docs_src/path_operation_advanced_configuration/tutorial007.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial007.py!} ``` 👐, 👐 đŸ‘„ đŸš« ⚙ 🔱 đŸ› ïž đŸ› ïž, đŸ‘„ ⚙ Pydantic đŸ· ❎ 🏗 đŸŽ» 🔗 đŸ’œ 👈 đŸ‘„ 💚 📹 📁. @@ -176,7 +176,7 @@ & ‎ 👆 📟, đŸ‘„ đŸŽ» 👈 📁 🎚 🔗, & ‎ đŸ‘„ 🔄 ⚙ 🎏 Pydantic đŸ· ✔ 📁 🎚: ```Python hl_lines="26-33" -{!../../../docs_src/path_operation_advanced_configuration/tutorial007.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial007.py!} ``` /// tip diff --git a/docs/em/docs/advanced/response-change-status-code.md b/docs/em/docs/advanced/response-change-status-code.md index 156efcc16..7f2e8c157 100644 --- a/docs/em/docs/advanced/response-change-status-code.md +++ b/docs/em/docs/advanced/response-change-status-code.md @@ -21,7 +21,7 @@ & ‎ 👆 đŸ’Ș ⚒ `status_code` 👈 *🔀* 📹 🎚. ```Python hl_lines="1 9 12" -{!../../../docs_src/response_change_status_code/tutorial001.py!} +{!../../docs_src/response_change_status_code/tutorial001.py!} ``` & ‎ 👆 đŸ’Ș 📹 🙆 🎚 👆 đŸ’Ș, 👆 🛎 🔜 ( `dict`, đŸ’œ đŸ·, ♒). diff --git a/docs/em/docs/advanced/response-cookies.md b/docs/em/docs/advanced/response-cookies.md index 717fb87ce..6b9e9a4d9 100644 --- a/docs/em/docs/advanced/response-cookies.md +++ b/docs/em/docs/advanced/response-cookies.md @@ -7,7 +7,7 @@ & ‎ 👆 đŸ’Ș ⚒ đŸȘ 👈 *🔀* 📹 🎚. ```Python hl_lines="1 8-9" -{!../../../docs_src/response_cookies/tutorial002.py!} +{!../../docs_src/response_cookies/tutorial002.py!} ``` & ‎ 👆 đŸ’Ș 📹 🙆 🎚 👆 đŸ’Ș, 👆 🛎 🔜 ( `dict`, đŸ’œ đŸ·, ♒). @@ -27,7 +27,7 @@ ‎ ⚒ đŸȘ ⚫, & ‎ 📹 ⚫: ```Python hl_lines="10-12" -{!../../../docs_src/response_cookies/tutorial001.py!} +{!../../docs_src/response_cookies/tutorial001.py!} ``` /// tip diff --git a/docs/em/docs/advanced/response-directly.md b/docs/em/docs/advanced/response-directly.md index 13ee081c2..dcffc56c6 100644 --- a/docs/em/docs/advanced/response-directly.md +++ b/docs/em/docs/advanced/response-directly.md @@ -35,7 +35,7 @@ 📚 đŸ’Œ, 👆 đŸ’Ș ⚙ `jsonable_encoder` 🗜 👆 📊 ⏭ đŸš¶â€â™€ïž ⚫ 📹: ```Python hl_lines="6-7 21-22" -{!../../../docs_src/response_directly/tutorial001.py!} +{!../../docs_src/response_directly/tutorial001.py!} ``` /// note | "📡 â„č" @@ -57,7 +57,7 @@ 👆 đŸ’Ș 🚼 👆 📂 🎚 đŸŽ», 🚼 ⚫ `Response`, & 📹 ⚫: ```Python hl_lines="1 18" -{!../../../docs_src/response_directly/tutorial002.py!} +{!../../docs_src/response_directly/tutorial002.py!} ``` ## 🗒 diff --git a/docs/em/docs/advanced/response-headers.md b/docs/em/docs/advanced/response-headers.md index 27e1cdbd5..cbbbae237 100644 --- a/docs/em/docs/advanced/response-headers.md +++ b/docs/em/docs/advanced/response-headers.md @@ -7,7 +7,7 @@ & ‎ 👆 đŸ’Ș ⚒ 🎚 👈 *🔀* 📹 🎚. ```Python hl_lines="1 7-8" -{!../../../docs_src/response_headers/tutorial002.py!} +{!../../docs_src/response_headers/tutorial002.py!} ``` & ‎ 👆 đŸ’Ș 📹 🙆 🎚 👆 đŸ’Ș, 👆 🛎 🔜 ( `dict`, đŸ’œ đŸ·, ♒). @@ -25,7 +25,7 @@ ✍ 📹 🔬 [📹 📹 🔗](response-directly.md){.internal-link target=_blank} & đŸš¶â€â™€ïž 🎚 🌖 🔱: ```Python hl_lines="10-12" -{!../../../docs_src/response_headers/tutorial001.py!} +{!../../docs_src/response_headers/tutorial001.py!} ``` /// note | "📡 â„č" diff --git a/docs/em/docs/advanced/security/http-basic-auth.md b/docs/em/docs/advanced/security/http-basic-auth.md index 33470a726..e6fe3e32c 100644 --- a/docs/em/docs/advanced/security/http-basic-auth.md +++ b/docs/em/docs/advanced/security/http-basic-auth.md @@ -21,7 +21,7 @@ * ⚫ 🔌 `username` & `password` 📹. ```Python hl_lines="2 6 10" -{!../../../docs_src/security/tutorial006.py!} +{!../../docs_src/security/tutorial006.py!} ``` 🕐❔ 👆 🔄 📂 📛 đŸ„‡ 🕰 (⚖ 🖊 "đŸ› ïž" đŸ”Œ đŸ©ș) đŸ–„ 🔜 💭 👆 👆 🆔 & 🔐: @@ -43,7 +43,7 @@ ‎ đŸ‘„ đŸ’Ș ⚙ `secrets.compare_digest()` 🚚 👈 `credentials.username` `"stanleyjobson"`, & 👈 `credentials.password` `"swordfish"`. ```Python hl_lines="1 11-21" -{!../../../docs_src/security/tutorial007.py!} +{!../../docs_src/security/tutorial007.py!} ``` 👉 🔜 🎏: @@ -109,5 +109,5 @@ if "stanleyjobsox" == "stanleyjobson" and "love123" == "swordfish": âźïž 🔍 👈 🎓 ❌, 📹 `HTTPException` âźïž 👔 📟 4ïžâƒŁ0ïžâƒŁ1ïžâƒŁ (🎏 📹 🕐❔ 🙅‍♂ 🎓 🚚) & 🚼 🎚 `WWW-Authenticate` ⚒ đŸ–„ 🎩 💳 📋 🔄: ```Python hl_lines="23-27" -{!../../../docs_src/security/tutorial007.py!} +{!../../docs_src/security/tutorial007.py!} ``` diff --git a/docs/em/docs/advanced/security/oauth2-scopes.md b/docs/em/docs/advanced/security/oauth2-scopes.md index 73b2ec540..661be034e 100644 --- a/docs/em/docs/advanced/security/oauth2-scopes.md +++ b/docs/em/docs/advanced/security/oauth2-scopes.md @@ -63,7 +63,7 @@ Oauth2ïžâƒŁ đŸ‘« đŸŽ». đŸ„‡, âžĄïž 🔜 👀 🍕 👈 🔀 âšȘïžâžĄïž đŸ–Œ 👑 **🔰 - đŸ‘©â€đŸ’» 🩼** [Oauth2ïžâƒŁ âźïž 🔐 (& 🔁), 📹 âźïž đŸ„™ đŸ€](../../tutorial/security/oauth2-jwt.md){.internal-link target=_blank}. 🔜 ⚙ Oauth2ïžâƒŁ ↔: ```Python hl_lines="2 4 8 12 46 64 105 107-115 121-124 128-134 139 155" -{!../../../docs_src/security/tutorial005.py!} +{!../../docs_src/security/tutorial005.py!} ``` 🔜 âžĄïž 📄 👈 🔀 🔁 🔁. @@ -75,7 +75,7 @@ Oauth2ïžâƒŁ đŸ‘« đŸŽ». `scopes` 🔱 📹 `dict` âźïž 🔠 ↔ 🔑 & 📛 đŸ’Č: ```Python hl_lines="62-65" -{!../../../docs_src/security/tutorial005.py!} +{!../../docs_src/security/tutorial005.py!} ``` ↩ đŸ‘„ 🔜 📣 📚 ↔, đŸ‘« 🔜 🎩 🆙 đŸ› ïž đŸ©ș 🕐❔ 👆 đŸ•č-/✔. @@ -103,7 +103,7 @@ Oauth2ïžâƒŁ đŸ‘« đŸŽ». /// ```Python hl_lines="155" -{!../../../docs_src/security/tutorial005.py!} +{!../../docs_src/security/tutorial005.py!} ``` ## 📣 ↔ *➡ đŸ› ïž* & 🔗 @@ -131,7 +131,7 @@ Oauth2ïžâƒŁ đŸ‘« đŸŽ». /// ```Python hl_lines="4 139 168" -{!../../../docs_src/security/tutorial005.py!} +{!../../docs_src/security/tutorial005.py!} ``` /// info | "📡 â„č" @@ -159,7 +159,7 @@ Oauth2ïžâƒŁ đŸ‘« đŸŽ». 👉 `SecurityScopes` 🎓 🎏 `Request` (`Request` ⚙ đŸ€š 📹 🎚 🔗). ```Python hl_lines="8 105" -{!../../../docs_src/security/tutorial005.py!} +{!../../docs_src/security/tutorial005.py!} ``` ## ⚙ `scopes` @@ -175,7 +175,7 @@ Oauth2ïžâƒŁ đŸ‘« đŸŽ». 👉 ⚠, đŸ‘„ 🔌 ↔ 🚚 (đŸš„ 🙆) đŸŽ» đŸ‘œ 🚀 (⚙ `scope_str`). đŸ‘„ 🚼 👈 đŸŽ» ⚗ ↔ `WWW-Authenticate` 🎚 (👉 🍕 🔌). ```Python hl_lines="105 107-115" -{!../../../docs_src/security/tutorial005.py!} +{!../../docs_src/security/tutorial005.py!} ``` ## ✔ `username` & đŸ’œ 💠 @@ -193,7 +193,7 @@ Oauth2ïžâƒŁ đŸ‘« đŸŽ». đŸ‘„ ✔ 👈 đŸ‘„ ✔ đŸ‘©â€đŸ’» âźïž 👈 🆔, & đŸš„ đŸš«, đŸ‘„ đŸ€š 👈 🎏 ⚠ đŸ‘„ ✍ ⏭. ```Python hl_lines="46 116-127" -{!../../../docs_src/security/tutorial005.py!} +{!../../docs_src/security/tutorial005.py!} ``` ## ✔ `scopes` @@ -203,7 +203,7 @@ Oauth2ïžâƒŁ đŸ‘« đŸŽ». 👉, đŸ‘„ ⚙ `security_scopes.scopes`, 👈 🔌 `list` âźïž 🌐 đŸ‘« ↔ `str`. ```Python hl_lines="128-134" -{!../../../docs_src/security/tutorial005.py!} +{!../../docs_src/security/tutorial005.py!} ``` ## 🔗 đŸŒČ & ↔ diff --git a/docs/em/docs/advanced/settings.md b/docs/em/docs/advanced/settings.md index e84941b57..59fb71d73 100644 --- a/docs/em/docs/advanced/settings.md +++ b/docs/em/docs/advanced/settings.md @@ -149,7 +149,7 @@ Hello World from Python 👆 đŸ’Ș ⚙ 🌐 🎏 🔬 ⚒ & 🧰 👆 ⚙ Pydantic đŸ·, 💖 🎏 📊 🆎 & 🌖 🔬 âźïž `Field()`. ```Python hl_lines="2 5-8 11" -{!../../../docs_src/settings/tutorial001.py!} +{!../../docs_src/settings/tutorial001.py!} ``` /// tip @@ -167,7 +167,7 @@ Hello World from Python ‎ 👆 đŸ’Ș ⚙ 🆕 `settings` 🎚 👆 🈾: ```Python hl_lines="18-20" -{!../../../docs_src/settings/tutorial001.py!} +{!../../docs_src/settings/tutorial001.py!} ``` ### 🏃 đŸ’œ @@ -203,13 +203,13 @@ $ ADMIN_EMAIL="deadpool@example.com" APP_NAME="ChimichangApp" uvicorn main:app đŸ–Œ, 👆 đŸ’Ș ✔ 📁 `config.py` âźïž: ```Python -{!../../../docs_src/settings/app01/config.py!} +{!../../docs_src/settings/app01/config.py!} ``` & ‎ ⚙ ⚫ 📁 `main.py`: ```Python hl_lines="3 11-13" -{!../../../docs_src/settings/app01/main.py!} +{!../../docs_src/settings/app01/main.py!} ``` /// tip @@ -229,7 +229,7 @@ $ ADMIN_EMAIL="deadpool@example.com" APP_NAME="ChimichangApp" uvicorn main:app 👟 âšȘïžâžĄïž âźïž đŸ–Œ, 👆 `config.py` 📁 đŸ’Ș 👀 💖: ```Python hl_lines="10" -{!../../../docs_src/settings/app02/config.py!} +{!../../docs_src/settings/app02/config.py!} ``` 👀 👈 🔜 đŸ‘„ đŸš« ✍ 🔱 👐 `settings = Settings()`. @@ -239,7 +239,7 @@ $ ADMIN_EMAIL="deadpool@example.com" APP_NAME="ChimichangApp" uvicorn main:app 🔜 đŸ‘„ ✍ 🔗 👈 📹 🆕 `config.Settings()`. ```Python hl_lines="5 11-12" -{!../../../docs_src/settings/app02/main.py!} +{!../../docs_src/settings/app02/main.py!} ``` /// tip @@ -253,7 +253,7 @@ $ ADMIN_EMAIL="deadpool@example.com" APP_NAME="ChimichangApp" uvicorn main:app & ‎ đŸ‘„ đŸ’Ș 🚚 ⚫ âšȘïžâžĄïž *➡ đŸ› ïž 🔱* 🔗 & ⚙ ⚫ 🙆 đŸ‘„ đŸ’Ș ⚫. ```Python hl_lines="16 18-20" -{!../../../docs_src/settings/app02/main.py!} +{!../../docs_src/settings/app02/main.py!} ``` ### ⚒ & 🔬 @@ -261,7 +261,7 @@ $ ADMIN_EMAIL="deadpool@example.com" APP_NAME="ChimichangApp" uvicorn main:app ‎ ⚫ 🔜 đŸ“¶ ⏩ 🚚 🎏 ⚒ 🎚 âźïž 🔬 🏗 🔗 🔐 `get_settings`: ```Python hl_lines="9-10 13 21" -{!../../../docs_src/settings/app02/test_main.py!} +{!../../docs_src/settings/app02/test_main.py!} ``` 🔗 🔐 đŸ‘„ ⚒ 🆕 đŸ’Č `admin_email` 🕐❔ 🏗 🆕 `Settings` 🎚, & ‎ đŸ‘„ 📹 👈 🆕 🎚. @@ -304,7 +304,7 @@ APP_NAME="ChimichangApp" & ‎ â„č 👆 `config.py` âźïž: ```Python hl_lines="9-10" -{!../../../docs_src/settings/app03/config.py!} +{!../../docs_src/settings/app03/config.py!} ``` đŸ“„ đŸ‘„ ✍ 🎓 `Config` 🔘 👆 Pydantic `Settings` 🎓, & ⚒ `env_file` 📁 âźïž đŸ‡šđŸ‡» 📁 đŸ‘„ 💚 ⚙. @@ -339,7 +339,7 @@ def get_settings(): ✋ đŸ‘„ ⚙ `@lru_cache` 👹‍🎹 🔛 🔝, `Settings` 🎚 🔜 ✍ 🕮 🕐, đŸ„‡ 🕰 ⚫ đŸ€™. đŸ‘¶ đŸ‘¶ ```Python hl_lines="1 10" -{!../../../docs_src/settings/app03/main.py!} +{!../../docs_src/settings/app03/main.py!} ``` ‎ 🙆 🏁 đŸ€™ `get_settings()` 🔗 ⏭ 📹, ↩ đŸ› ïž 🔗 📟 `get_settings()` & 🏗 🆕 `Settings` 🎚, ⚫ 🔜 📹 🎏 🎚 👈 📹 🔛 đŸ„‡ đŸ€™, 🔄 & 🔄. diff --git a/docs/em/docs/advanced/sub-applications.md b/docs/em/docs/advanced/sub-applications.md index 1e0931f95..e19f3f234 100644 --- a/docs/em/docs/advanced/sub-applications.md +++ b/docs/em/docs/advanced/sub-applications.md @@ -11,7 +11,7 @@ đŸ„‡, ✍ 👑, 🔝-🎚, **FastAPI** 🈾, & 🚼 *➡ đŸ› ïž*: ```Python hl_lines="3 6-8" -{!../../../docs_src/sub_applications/tutorial001.py!} +{!../../docs_src/sub_applications/tutorial001.py!} ``` ### 🎧-🈾 @@ -21,7 +21,7 @@ 👉 🎧-🈾 ➕1ïžâƒŁ đŸ© FastAPI 🈾, ✋ 👉 1ïžâƒŁ 👈 🔜 "đŸ—»": ```Python hl_lines="11 14-16" -{!../../../docs_src/sub_applications/tutorial001.py!} +{!../../docs_src/sub_applications/tutorial001.py!} ``` ### đŸ—» 🎧-🈾 @@ -31,7 +31,7 @@ 👉 đŸ’Œ, ⚫ 🔜 📌 ➡ `/subapi`: ```Python hl_lines="11 19" -{!../../../docs_src/sub_applications/tutorial001.py!} +{!../../docs_src/sub_applications/tutorial001.py!} ``` ### ✅ 🏧 đŸ› ïž đŸ©ș diff --git a/docs/em/docs/advanced/templates.md b/docs/em/docs/advanced/templates.md index c45ff47a1..66c7484a6 100644 --- a/docs/em/docs/advanced/templates.md +++ b/docs/em/docs/advanced/templates.md @@ -28,7 +28,7 @@ $ pip install jinja2 * ⚙ `templates` 👆 ✍ ✍ & 📹 `TemplateResponse`, đŸš¶â€â™€ïž `request` 1ïžâƒŁ 🔑-đŸ’Č đŸ‘« Jinja2ïžâƒŁ "🔑". ```Python hl_lines="4 11 15-18" -{!../../../docs_src/templates/tutorial001.py!} +{!../../docs_src/templates/tutorial001.py!} ``` /// note @@ -56,7 +56,7 @@ $ pip install jinja2 ‎ 👆 đŸ’Ș ✍ 📄 `templates/item.html` âźïž: ```jinja hl_lines="7" -{!../../../docs_src/templates/templates/item.html!} +{!../../docs_src/templates/templates/item.html!} ``` ⚫ 🔜 🎩 `id` ✊ âšȘïžâžĄïž "🔑" `dict` 👆 đŸš¶â€â™€ïž: @@ -70,13 +70,13 @@ $ pip install jinja2 & 👆 đŸ’Ș ⚙ `url_for()` 🔘 📄, & ⚙ ⚫, đŸ–Œ, âźïž `StaticFiles` 👆 📌. ```jinja hl_lines="4" -{!../../../docs_src/templates/templates/item.html!} +{!../../docs_src/templates/templates/item.html!} ``` 👉 đŸ–Œ, ⚫ 🔜 🔗 🎚 📁 `static/styles.css` âźïž: ```CSS hl_lines="4" -{!../../../docs_src/templates/static/styles.css!} +{!../../docs_src/templates/static/styles.css!} ``` & ↩ 👆 ⚙ `StaticFiles`, 👈 🎚 📁 🔜 🍩 🔁 👆 **FastAPI** 🈾 📛 `/static/styles.css`. diff --git a/docs/em/docs/advanced/testing-database.md b/docs/em/docs/advanced/testing-database.md index 825d545a9..71b29f9b7 100644 --- a/docs/em/docs/advanced/testing-database.md +++ b/docs/em/docs/advanced/testing-database.md @@ -49,7 +49,7 @@ ✋ 🎂 🎉 📟 🌅 ⚖ 🌘 🎏, đŸ‘„ 📁 ⚫. ```Python hl_lines="8-13" -{!../../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} +{!../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} ``` /// tip @@ -73,7 +73,7 @@ Base.metadata.create_all(bind=engine) đŸ‘„ 🚼 👈 ⏞ đŸ“„, âźïž 🆕 📁. ```Python hl_lines="16" -{!../../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} +{!../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} ``` ## 🔗 🔐 @@ -81,7 +81,7 @@ Base.metadata.create_all(bind=engine) 🔜 đŸ‘„ ✍ 🔗 🔐 & 🚼 ⚫ 🔐 👆 đŸ“±. ```Python hl_lines="19-24 27" -{!../../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} +{!../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} ``` /// tip @@ -95,7 +95,7 @@ Base.metadata.create_all(bind=engine) ‎ đŸ‘„ đŸ’Ș 💯 đŸ“± 🛎. ```Python hl_lines="32-47" -{!../../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} +{!../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} ``` & 🌐 đŸ› ïž đŸ‘„ ⚒ đŸ’œ âźïž 💯 🔜 `test.db` đŸ’œ ↩ 👑 `sql_app.db`. diff --git a/docs/em/docs/advanced/testing-dependencies.md b/docs/em/docs/advanced/testing-dependencies.md index 8bcffcc29..027767df1 100644 --- a/docs/em/docs/advanced/testing-dependencies.md +++ b/docs/em/docs/advanced/testing-dependencies.md @@ -29,7 +29,7 @@ & ‎ **FastAPI** 🔜 đŸ€™ 👈 🔐 ↩ âźïž 🔗. ```Python hl_lines="28-29 32" -{!../../../docs_src/dependency_testing/tutorial001.py!} +{!../../docs_src/dependency_testing/tutorial001.py!} ``` /// tip diff --git a/docs/em/docs/advanced/testing-events.md b/docs/em/docs/advanced/testing-events.md index d64436eb9..071d49c21 100644 --- a/docs/em/docs/advanced/testing-events.md +++ b/docs/em/docs/advanced/testing-events.md @@ -3,5 +3,5 @@ 🕐❔ 👆 đŸ’Ș 👆 🎉 🐕‍đŸŠș (`startup` & `shutdown`) 🏃 👆 💯, 👆 đŸ’Ș ⚙ `TestClient` âźïž `with` 📄: ```Python hl_lines="9-12 20-24" -{!../../../docs_src/app_testing/tutorial003.py!} +{!../../docs_src/app_testing/tutorial003.py!} ``` diff --git a/docs/em/docs/advanced/testing-websockets.md b/docs/em/docs/advanced/testing-websockets.md index 5fb1e9c34..62939c343 100644 --- a/docs/em/docs/advanced/testing-websockets.md +++ b/docs/em/docs/advanced/testing-websockets.md @@ -5,7 +5,7 @@ 👉, 👆 ⚙ `TestClient` `with` 📄, 🔗*ïžâƒŁ: ```Python hl_lines="27-31" -{!../../../docs_src/app_testing/tutorial002.py!} +{!../../docs_src/app_testing/tutorial002.py!} ``` /// note diff --git a/docs/em/docs/advanced/using-request-directly.md b/docs/em/docs/advanced/using-request-directly.md index edc951d96..ae212364f 100644 --- a/docs/em/docs/advanced/using-request-directly.md +++ b/docs/em/docs/advanced/using-request-directly.md @@ -30,7 +30,7 @@ 👈 👆 đŸ’Ș 🔐 📹 🔗. ```Python hl_lines="1 7-8" -{!../../../docs_src/using_request_directly/tutorial001.py!} +{!../../docs_src/using_request_directly/tutorial001.py!} ``` 📣 *➡ đŸ› ïž 🔱* 🔱 âźïž 🆎 ➖ `Request` **FastAPI** 🔜 💭 đŸš¶â€â™€ïž `Request` 👈 🔱. diff --git a/docs/em/docs/advanced/websockets.md b/docs/em/docs/advanced/websockets.md index 30dc3043e..7957eba1f 100644 --- a/docs/em/docs/advanced/websockets.md +++ b/docs/em/docs/advanced/websockets.md @@ -39,7 +39,7 @@ $ pip install websockets ✋ ⚫ 🙅 🌌 🎯 🔛 đŸ’œ-🚄 *ïžâƒŁ & ✔ đŸ‘· đŸ–Œ: ```Python hl_lines="2 6-38 41-43" -{!../../../docs_src/websockets/tutorial001.py!} +{!../../docs_src/websockets/tutorial001.py!} ``` ## ✍ `websocket` @@ -47,7 +47,7 @@ $ pip install websockets 👆 **FastAPI** 🈾, ✍ `websocket`: ```Python hl_lines="1 46-47" -{!../../../docs_src/websockets/tutorial001.py!} +{!../../docs_src/websockets/tutorial001.py!} ``` /// note | "📡 â„č" @@ -63,7 +63,7 @@ $ pip install websockets 👆 *ïžâƒŁ 🛣 👆 đŸ’Ș `await` 📧 & 📹 📧. ```Python hl_lines="48-52" -{!../../../docs_src/websockets/tutorial001.py!} +{!../../docs_src/websockets/tutorial001.py!} ``` 👆 đŸ’Ș 📹 & 📹 đŸ’±, ✍, & đŸŽ» đŸ’œ. @@ -116,7 +116,7 @@ $ uvicorn main:app --reload đŸ‘« đŸ‘· 🎏 🌌 🎏 FastAPI 🔗/*➡ đŸ› ïž*: ```Python hl_lines="66-77 76-91" -{!../../../docs_src/websockets/tutorial002.py!} +{!../../docs_src/websockets/tutorial002.py!} ``` /// info @@ -163,7 +163,7 @@ $ uvicorn main:app --reload 🕐❔ *ïžâƒŁ 🔗 đŸ“Ș, `await websocket.receive_text()` 🔜 đŸ€š `WebSocketDisconnect` ⚠, ❔ 👆 đŸ’Ș ‎ ✊ & đŸ” 💖 👉 đŸ–Œ. ```Python hl_lines="81-83" -{!../../../docs_src/websockets/tutorial003.py!} +{!../../docs_src/websockets/tutorial003.py!} ``` 🔄 ⚫ 👅: diff --git a/docs/em/docs/advanced/wsgi.md b/docs/em/docs/advanced/wsgi.md index 6a4ed073c..8c0008c74 100644 --- a/docs/em/docs/advanced/wsgi.md +++ b/docs/em/docs/advanced/wsgi.md @@ -13,7 +13,7 @@ & ‎ đŸ—» 👈 đŸ”œ ➡. ```Python hl_lines="2-3 22" -{!../../../docs_src/wsgi/tutorial001.py!} +{!../../docs_src/wsgi/tutorial001.py!} ``` ## ✅ ⚫ diff --git a/docs/em/docs/how-to/conditional-openapi.md b/docs/em/docs/how-to/conditional-openapi.md index a17ba4eec..a5932933a 100644 --- a/docs/em/docs/how-to/conditional-openapi.md +++ b/docs/em/docs/how-to/conditional-openapi.md @@ -30,7 +30,7 @@ đŸ–Œ: ```Python hl_lines="6 11" -{!../../../docs_src/conditional_openapi/tutorial001.py!} +{!../../docs_src/conditional_openapi/tutorial001.py!} ``` đŸ“„ đŸ‘„ 📣 ⚒ `openapi_url` âźïž 🎏 🔱 `"/openapi.json"`. diff --git a/docs/em/docs/how-to/custom-request-and-route.md b/docs/em/docs/how-to/custom-request-and-route.md index 1f66c6eda..0425e6267 100644 --- a/docs/em/docs/how-to/custom-request-and-route.md +++ b/docs/em/docs/how-to/custom-request-and-route.md @@ -43,7 +43,7 @@ 👈 🌌, 🎏 🛣 🎓 đŸ’Ș đŸ” 🗜 🗜 ⚖ 🗜 📹. ```Python hl_lines="8-15" -{!../../../docs_src/custom_request_and_route/tutorial001.py!} +{!../../docs_src/custom_request_and_route/tutorial001.py!} ``` ### ✍ 🛃 `GzipRoute` 🎓 @@ -57,7 +57,7 @@ đŸ“„ đŸ‘„ ⚙ ⚫ ✍ `GzipRequest` âšȘïžâžĄïž âźïž 📹. ```Python hl_lines="18-26" -{!../../../docs_src/custom_request_and_route/tutorial001.py!} +{!../../docs_src/custom_request_and_route/tutorial001.py!} ``` /// note | "📡 â„č" @@ -97,13 +97,13 @@ 🌐 đŸ‘„ đŸ’Ș đŸ” 📹 🔘 `try`/`except` đŸ«: ```Python hl_lines="13 15" -{!../../../docs_src/custom_request_and_route/tutorial002.py!} +{!../../docs_src/custom_request_and_route/tutorial002.py!} ``` đŸš„ ⚠ 📉, `Request` 👐 🔜 ↔, đŸ‘„ đŸ’Ș ✍ & ⚒ ⚙ 📹 đŸ’Ș 🕐❔ 🚚 ❌: ```Python hl_lines="16-18" -{!../../../docs_src/custom_request_and_route/tutorial002.py!} +{!../../docs_src/custom_request_and_route/tutorial002.py!} ``` ## 🛃 `APIRoute` 🎓 đŸ“» @@ -111,11 +111,11 @@ 👆 đŸ’Ș ⚒ `route_class` 🔱 `APIRouter`: ```Python hl_lines="26" -{!../../../docs_src/custom_request_and_route/tutorial003.py!} +{!../../docs_src/custom_request_and_route/tutorial003.py!} ``` 👉 đŸ–Œ, *➡ đŸ› ïž* đŸ”œ `router` 🔜 ⚙ 🛃 `TimedRoute` 🎓, & 🔜 ✔ ➕ `X-Response-Time` 🎚 📹 âźïž 🕰 ⚫ ✊ 🏗 📹: ```Python hl_lines="13-20" -{!../../../docs_src/custom_request_and_route/tutorial003.py!} +{!../../docs_src/custom_request_and_route/tutorial003.py!} ``` diff --git a/docs/em/docs/how-to/extending-openapi.md b/docs/em/docs/how-to/extending-openapi.md index dc9adf80e..698c78ec1 100644 --- a/docs/em/docs/how-to/extending-openapi.md +++ b/docs/em/docs/how-to/extending-openapi.md @@ -47,7 +47,7 @@ đŸ„‡, ✍ 🌐 👆 **FastAPI** 🈾 🛎: ```Python hl_lines="1 4 7-9" -{!../../../docs_src/extending_openapi/tutorial001.py!} +{!../../docs_src/extending_openapi/tutorial001.py!} ``` ### 🏗 🗄 🔗 @@ -55,7 +55,7 @@ ‎, ⚙ 🎏 🚙 🔱 🏗 🗄 🔗, 🔘 `custom_openapi()` 🔱: ```Python hl_lines="2 15-20" -{!../../../docs_src/extending_openapi/tutorial001.py!} +{!../../docs_src/extending_openapi/tutorial001.py!} ``` ### 🔀 🗄 🔗 @@ -63,7 +63,7 @@ 🔜 👆 đŸ’Ș 🚼 📄 ↔, ❎ 🛃 `x-logo` `info` "🎚" 🗄 🔗: ```Python hl_lines="21-23" -{!../../../docs_src/extending_openapi/tutorial001.py!} +{!../../docs_src/extending_openapi/tutorial001.py!} ``` ### đŸ’Ÿ 🗄 🔗 @@ -75,7 +75,7 @@ ⚫ 🔜 🏗 🕮 🕐, & ‎ 🎏 đŸ’Ÿ 🔗 🔜 ⚙ ⏭ 📹. ```Python hl_lines="13-14 24-25" -{!../../../docs_src/extending_openapi/tutorial001.py!} +{!../../docs_src/extending_openapi/tutorial001.py!} ``` ### 🔐 đŸ‘©â€đŸ”Ź @@ -83,7 +83,7 @@ 🔜 👆 đŸ’Ș ❎ `.openapi()` đŸ‘©â€đŸ”Ź âźïž 👆 🆕 🔱. ```Python hl_lines="28" -{!../../../docs_src/extending_openapi/tutorial001.py!} +{!../../docs_src/extending_openapi/tutorial001.py!} ``` ### ✅ ⚫ diff --git a/docs/em/docs/how-to/graphql.md b/docs/em/docs/how-to/graphql.md index b8610b767..5d0d95567 100644 --- a/docs/em/docs/how-to/graphql.md +++ b/docs/em/docs/how-to/graphql.md @@ -36,7 +36,7 @@ đŸ“„ đŸ€Ș 🎼 ❔ 👆 đŸ’Ș đŸ› ïž 🍓 âźïž FastAPI: ```Python hl_lines="3 22 25-26" -{!../../../docs_src/graphql/tutorial001.py!} +{!../../docs_src/graphql/tutorial001.py!} ``` 👆 đŸ’Ș 💡 🌅 🔃 🍓 🍓 đŸ§Ÿ. diff --git a/docs/em/docs/how-to/sql-databases-peewee.md b/docs/em/docs/how-to/sql-databases-peewee.md index 88b827c24..d25b77894 100644 --- a/docs/em/docs/how-to/sql-databases-peewee.md +++ b/docs/em/docs/how-to/sql-databases-peewee.md @@ -71,7 +71,7 @@ âžĄïž đŸ„‡ ✅ 🌐 😐 🏒 📟, ✍ 🏒 đŸ’œ: ```Python hl_lines="3 5 22" -{!../../../docs_src/sql_databases_peewee/sql_app/database.py!} +{!../../docs_src/sql_databases_peewee/sql_app/database.py!} ``` /// tip @@ -131,7 +131,7 @@ connect_args={"check_same_thread": False} đŸ‘„ 🔜 ✍ `PeeweeConnectionState`: ```Python hl_lines="10-19" -{!../../../docs_src/sql_databases_peewee/sql_app/database.py!} +{!../../docs_src/sql_databases_peewee/sql_app/database.py!} ``` 👉 🎓 😖 âšȘïžâžĄïž 🎁 🔗 🎓 ⚙ 🏒. @@ -155,7 +155,7 @@ connect_args={"check_same_thread": False} 🔜, 📁 `._state` 🔗 🔱 🏒 đŸ’œ `db` 🎚 ⚙ 🆕 `PeeweeConnectionState`: ```Python hl_lines="24" -{!../../../docs_src/sql_databases_peewee/sql_app/database.py!} +{!../../docs_src/sql_databases_peewee/sql_app/database.py!} ``` /// tip @@ -191,7 +191,7 @@ connect_args={"check_same_thread": False} 🗄 `db` âšȘïžâžĄïž `database` (📁 `database.py` âšȘïžâžĄïž 🔛) & ⚙ ⚫ đŸ“„. ```Python hl_lines="3 6-12 15-21" -{!../../../docs_src/sql_databases_peewee/sql_app/models.py!} +{!../../docs_src/sql_databases_peewee/sql_app/models.py!} ``` /// tip @@ -225,7 +225,7 @@ connect_args={"check_same_thread": False} ✍ 🌐 🎏 Pydantic đŸ· 🇾đŸ‡Č 🔰: ```Python hl_lines="16-18 21-22 25-30 34-35 38-39 42-48" -{!../../../docs_src/sql_databases_peewee/sql_app/schemas.py!} +{!../../docs_src/sql_databases_peewee/sql_app/schemas.py!} ``` /// tip @@ -253,7 +253,7 @@ connect_args={"check_same_thread": False} đŸ‘„ 🔜 ✍ 🛃 `PeeweeGetterDict` 🎓 & ⚙ ⚫ 🌐 🎏 Pydantic *đŸ·* / 🔗 👈 ⚙ `orm_mode`: ```Python hl_lines="3 8-13 31 49" -{!../../../docs_src/sql_databases_peewee/sql_app/schemas.py!} +{!../../docs_src/sql_databases_peewee/sql_app/schemas.py!} ``` đŸ“„ đŸ‘„ ✅ đŸš„ 🔱 👈 ➖ 🔐 (✅ `.items` `some_user.items`) 👐 `peewee.ModelSelect`. @@ -277,7 +277,7 @@ connect_args={"check_same_thread": False} ✍ 🌐 🎏 đŸ’© đŸ‡šđŸ‡» 🇾đŸ‡Č 🔰, 🌐 📟 đŸ“¶ 🎏: ```Python hl_lines="1 4-5 8-9 12-13 16-20 23-24 27-30" -{!../../../docs_src/sql_databases_peewee/sql_app/crud.py!} +{!../../docs_src/sql_databases_peewee/sql_app/crud.py!} ``` đŸ“€ đŸ”ș âźïž 📟 🇾đŸ‡Č 🔰. @@ -301,7 +301,7 @@ list(models.User.select()) đŸ“¶ 🙃 🌌 ✍ đŸ’œ 🏓: ```Python hl_lines="9-11" -{!../../../docs_src/sql_databases_peewee/sql_app/main.py!} +{!../../docs_src/sql_databases_peewee/sql_app/main.py!} ``` ### ✍ 🔗 @@ -309,7 +309,7 @@ list(models.User.select()) ✍ 🔗 👈 🔜 🔗 đŸ’œ ▶ ▶ 📹 & 🔌 ⚫ 🔚: ```Python hl_lines="23-29" -{!../../../docs_src/sql_databases_peewee/sql_app/main.py!} +{!../../docs_src/sql_databases_peewee/sql_app/main.py!} ``` đŸ“„ đŸ‘„ ✔ 🛁 `yield` ↩ đŸ‘„ đŸ€™ đŸš« ⚙ đŸ’œ 🎚 🔗. @@ -323,7 +323,7 @@ list(models.User.select()) ✋ đŸ‘„ đŸš« ⚙ đŸ’Č 👐 👉 🔗 (⚫ đŸ€™ đŸš« đŸ€ 🙆 đŸ’Č, ⚫ ✔ 🛁 `yield`). , đŸ‘„ đŸš« 🚼 ⚫ *➡ đŸ› ïž 🔱* ✋ *➡ đŸ› ïž 👹‍🎹* `dependencies` 🔱: ```Python hl_lines="32 40 47 59 65 72" -{!../../../docs_src/sql_databases_peewee/sql_app/main.py!} +{!../../docs_src/sql_databases_peewee/sql_app/main.py!} ``` ### 🔑 🔱 🎧-🔗 @@ -333,7 +333,7 @@ list(models.User.select()) 👈, đŸ‘„ đŸ’Ș ✍ ➕1ïžâƒŁ `async` 🔗 `reset_db_state()` 👈 ⚙ 🎧-🔗 `get_db()`. ⚫ 🔜 ⚒ đŸ’Č 🔑 🔱 (âźïž 🔱 `dict`) 👈 🔜 ⚙ đŸ’œ đŸ‡”đŸ‡ž 🎂 📹. & ‎ 🔗 `get_db()` 🔜 đŸȘ ⚫ đŸ’œ đŸ‡”đŸ‡ž (🔗, đŸ’”, ♒). ```Python hl_lines="18-20" -{!../../../docs_src/sql_databases_peewee/sql_app/main.py!} +{!../../docs_src/sql_databases_peewee/sql_app/main.py!} ``` **⏭ 📹**, đŸ‘„ 🔜 âČ 👈 🔑 🔱 🔄 `async` 🔗 `reset_db_state()` & ‎ ✍ 🆕 🔗 `get_db()` 🔗, 👈 🆕 📹 🔜 ✔ 🚼 👍 đŸ’œ đŸ‡”đŸ‡ž (🔗, đŸ’”, ♒). @@ -365,7 +365,7 @@ async def reset_db_state(): 🔜, 😒, đŸ“„ đŸ© **FastAPI** *➡ đŸ› ïž* 📟. ```Python hl_lines="32-37 40-43 46-53 56-62 65-68 71-79" -{!../../../docs_src/sql_databases_peewee/sql_app/main.py!} +{!../../docs_src/sql_databases_peewee/sql_app/main.py!} ``` ### 🔃 `def` 🆚 `async def` @@ -482,31 +482,31 @@ async def reset_db_state(): * `sql_app/database.py`: ```Python -{!../../../docs_src/sql_databases_peewee/sql_app/database.py!} +{!../../docs_src/sql_databases_peewee/sql_app/database.py!} ``` * `sql_app/models.py`: ```Python -{!../../../docs_src/sql_databases_peewee/sql_app/models.py!} +{!../../docs_src/sql_databases_peewee/sql_app/models.py!} ``` * `sql_app/schemas.py`: ```Python -{!../../../docs_src/sql_databases_peewee/sql_app/schemas.py!} +{!../../docs_src/sql_databases_peewee/sql_app/schemas.py!} ``` * `sql_app/crud.py`: ```Python -{!../../../docs_src/sql_databases_peewee/sql_app/crud.py!} +{!../../docs_src/sql_databases_peewee/sql_app/crud.py!} ``` * `sql_app/main.py`: ```Python -{!../../../docs_src/sql_databases_peewee/sql_app/main.py!} +{!../../docs_src/sql_databases_peewee/sql_app/main.py!} ``` ## 📡 â„č diff --git a/docs/em/docs/python-types.md b/docs/em/docs/python-types.md index 202c90f94..d2af23bb9 100644 --- a/docs/em/docs/python-types.md +++ b/docs/em/docs/python-types.md @@ -23,7 +23,7 @@ âžĄïž ▶ âźïž 🙅 đŸ–Œ: ```Python -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` đŸ€™ 👉 📋 🔱: @@ -39,7 +39,7 @@ John Doe * 🔱 đŸ‘« âźïž 🚀 🖕. ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` ### ✍ ⚫ @@ -83,7 +83,7 @@ John Doe 👈 "🆎 🔑": ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial002.py!} +{!../../docs_src/python_types/tutorial002.py!} ``` 👈 đŸš« 🎏 📣 🔱 đŸ’Č 💖 🔜 âźïž: @@ -113,7 +113,7 @@ John Doe ✅ 👉 🔱, ⚫ âȘ ✔ 🆎 🔑: ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial003.py!} +{!../../docs_src/python_types/tutorial003.py!} ``` ↩ 👹‍🎹 💭 🆎 🔱, 👆 đŸš« 🕮 đŸ€š đŸ› ïž, 👆 đŸ€š ❌ ✅: @@ -123,7 +123,7 @@ John Doe 🔜 👆 💭 👈 👆 ✔ 🔧 ⚫, 🗜 `age` đŸŽ» âźïž `str(age)`: ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial004.py!} +{!../../docs_src/python_types/tutorial004.py!} ``` ## 📣 🆎 @@ -144,7 +144,7 @@ John Doe * `bytes` ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial005.py!} +{!../../docs_src/python_types/tutorial005.py!} ``` ### 💊 🆎 âźïž 🆎 🔱 @@ -172,7 +172,7 @@ John Doe âšȘïžâžĄïž `typing`, 🗄 `List` (âźïž 🔠 `L`): ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial006.py!} +{!> ../../docs_src/python_types/tutorial006.py!} ``` 📣 🔱, âźïž 🎏 ❀ (`:`) ❕. @@ -182,7 +182,7 @@ John Doe 📇 🆎 👈 🔌 🔗 🆎, 👆 🚼 đŸ‘« ⬜ 🗜: ```Python hl_lines="4" -{!> ../../../docs_src/python_types/tutorial006.py!} +{!> ../../docs_src/python_types/tutorial006.py!} ``` //// @@ -196,7 +196,7 @@ John Doe 📇 🆎 👈 🔌 🔗 🆎, 👆 🚼 đŸ‘« ⬜ 🗜: ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial006_py39.py!} +{!> ../../docs_src/python_types/tutorial006_py39.py!} ``` //// @@ -234,7 +234,7 @@ John Doe //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial007.py!} +{!> ../../docs_src/python_types/tutorial007.py!} ``` //// @@ -242,7 +242,7 @@ John Doe //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial007_py39.py!} +{!> ../../docs_src/python_types/tutorial007_py39.py!} ``` //// @@ -263,7 +263,7 @@ John Doe //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial008.py!} +{!> ../../docs_src/python_types/tutorial008.py!} ``` //// @@ -271,7 +271,7 @@ John Doe //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial008_py39.py!} +{!> ../../docs_src/python_types/tutorial008_py39.py!} ``` //// @@ -293,7 +293,7 @@ John Doe //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial008b.py!} +{!> ../../docs_src/python_types/tutorial008b.py!} ``` //// @@ -301,7 +301,7 @@ John Doe //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial008b_py310.py!} +{!> ../../docs_src/python_types/tutorial008b_py310.py!} ``` //// @@ -315,7 +315,7 @@ John Doe 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 (✅ 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ) 👆 đŸ’Ș 📣 ⚫ 🏭 & ⚙ `Optional` âšȘïžâžĄïž `typing` đŸ•č. ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009.py!} +{!../../docs_src/python_types/tutorial009.py!} ``` ⚙ `Optional[str]` ↩ `str` 🔜 âžĄïž 👹‍🎹 â„č 👆 🔍 ❌ 🌐❔ 👆 đŸ’Ș đŸ€” 👈 đŸ’Č 🕧 `str`, 🕐❔ ⚫ đŸ’Ș đŸ€™ `None` đŸ’â€â™‚ïž. @@ -327,7 +327,7 @@ John Doe //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial009.py!} +{!> ../../docs_src/python_types/tutorial009.py!} ``` //// @@ -335,7 +335,7 @@ John Doe //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 - 🎛 ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial009b.py!} +{!> ../../docs_src/python_types/tutorial009b.py!} ``` //// @@ -343,7 +343,7 @@ John Doe //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial009_py310.py!} +{!> ../../docs_src/python_types/tutorial009_py310.py!} ``` //// @@ -364,7 +364,7 @@ John Doe đŸ–Œ, âžĄïž ✊ 👉 🔱: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009c.py!} +{!../../docs_src/python_types/tutorial009c.py!} ``` 🔱 `name` 🔬 `Optional[str]`, ✋ ⚫ **đŸš« 📩**, 👆 đŸš«đŸ”œ đŸ€™ 🔱 đŸ” 🔱: @@ -382,7 +382,7 @@ say_hi(name=None) # This works, None is valid 🎉 👍 📰, 🕐 👆 🔛 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ 👆 🏆 đŸš« ✔ 😟 🔃 👈, 👆 🔜 đŸ’Ș 🎯 ⚙ `|` 🔬 đŸ‡ȘđŸ‡ș 🆎: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009c_py310.py!} +{!../../docs_src/python_types/tutorial009c_py310.py!} ``` & ‎ 👆 🏆 đŸš« ✔ 😟 🔃 📛 💖 `Optional` & `Union`. đŸ‘¶ @@ -446,13 +446,13 @@ say_hi(name=None) # This works, None is valid 🎉 âžĄïž 💬 👆 ✔ 🎓 `Person`, âźïž 📛: ```Python hl_lines="1-3" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` ‎ 👆 đŸ’Ș 📣 🔱 🆎 `Person`: ```Python hl_lines="6" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` & ‎, 🔄, 👆 đŸ€š 🌐 👹‍🎹 🐕‍đŸŠș: @@ -476,7 +476,7 @@ say_hi(name=None) # This works, None is valid 🎉 //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python -{!> ../../../docs_src/python_types/tutorial011.py!} +{!> ../../docs_src/python_types/tutorial011.py!} ``` //// @@ -484,7 +484,7 @@ say_hi(name=None) # This works, None is valid 🎉 //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python -{!> ../../../docs_src/python_types/tutorial011_py39.py!} +{!> ../../docs_src/python_types/tutorial011_py39.py!} ``` //// @@ -492,7 +492,7 @@ say_hi(name=None) # This works, None is valid 🎉 //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python -{!> ../../../docs_src/python_types/tutorial011_py310.py!} +{!> ../../docs_src/python_types/tutorial011_py310.py!} ``` //// diff --git a/docs/em/docs/tutorial/background-tasks.md b/docs/em/docs/tutorial/background-tasks.md index 1d17a0e4e..0f4585ebe 100644 --- a/docs/em/docs/tutorial/background-tasks.md +++ b/docs/em/docs/tutorial/background-tasks.md @@ -16,7 +16,7 @@ đŸ„‡, 🗄 `BackgroundTasks` & 🔬 🔱 👆 *➡ đŸ› ïž 🔱* âźïž 🆎 📄 `BackgroundTasks`: ```Python hl_lines="1 13" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` **FastAPI** 🔜 ✍ 🎚 🆎 `BackgroundTasks` 👆 & đŸš¶â€â™€ïž ⚫ 👈 🔱. @@ -34,7 +34,7 @@ & ✍ đŸ› ïž đŸš« ⚙ `async` & `await`, đŸ‘„ 🔬 🔱 âźïž 😐 `def`: ```Python hl_lines="6-9" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` ## 🚼 đŸ–„ 📋 @@ -42,7 +42,7 @@ 🔘 👆 *➡ đŸ› ïž 🔱*, đŸš¶â€â™€ïž 👆 📋 🔱 *đŸ–„ 📋* 🎚 âźïž đŸ‘©â€đŸ”Ź `.add_task()`: ```Python hl_lines="14" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` `.add_task()` 📹 ❌: @@ -60,7 +60,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="13 15 22 25" -{!> ../../../docs_src/background_tasks/tutorial002.py!} +{!> ../../docs_src/background_tasks/tutorial002.py!} ``` //// @@ -68,7 +68,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="11 13 20 23" -{!> ../../../docs_src/background_tasks/tutorial002_py310.py!} +{!> ../../docs_src/background_tasks/tutorial002_py310.py!} ``` //// diff --git a/docs/em/docs/tutorial/bigger-applications.md b/docs/em/docs/tutorial/bigger-applications.md index 693a75d28..074ab302c 100644 --- a/docs/em/docs/tutorial/bigger-applications.md +++ b/docs/em/docs/tutorial/bigger-applications.md @@ -86,7 +86,7 @@ from app.routers import items 👆 🗄 ⚫ & ✍ "👐" 🎏 🌌 👆 🔜 âźïž 🎓 `FastAPI`: ```Python hl_lines="1 3" title="app/routers/users.py" -{!../../../docs_src/bigger_applications/app/routers/users.py!} +{!../../docs_src/bigger_applications/app/routers/users.py!} ``` ### *➡ đŸ› ïž* âźïž `APIRouter` @@ -96,7 +96,7 @@ from app.routers import items ⚙ ⚫ 🎏 🌌 👆 🔜 ⚙ `FastAPI` 🎓: ```Python hl_lines="6 11 16" title="app/routers/users.py" -{!../../../docs_src/bigger_applications/app/routers/users.py!} +{!../../docs_src/bigger_applications/app/routers/users.py!} ``` 👆 đŸ’Ș 💭 `APIRouter` "đŸ© `FastAPI`" 🎓. @@ -122,7 +122,7 @@ from app.routers import items đŸ‘„ 🔜 🔜 ⚙ 🙅 🔗 ✍ 🛃 `X-Token` 🎚: ```Python hl_lines="1 4-6" title="app/dependencies.py" -{!../../../docs_src/bigger_applications/app/dependencies.py!} +{!../../docs_src/bigger_applications/app/dependencies.py!} ``` /// tip @@ -156,7 +156,7 @@ from app.routers import items , ↩ ❎ 🌐 👈 🔠 *➡ đŸ› ïž*, đŸ‘„ đŸ’Ș 🚼 ⚫ `APIRouter`. ```Python hl_lines="5-10 16 21" title="app/routers/items.py" -{!../../../docs_src/bigger_applications/app/routers/items.py!} +{!../../docs_src/bigger_applications/app/routers/items.py!} ``` ➡ 🔠 *➡ đŸ› ïž* ✔ ▶ âźïž `/`, 💖: @@ -217,7 +217,7 @@ async def read_item(item_id: str): đŸ‘„ ⚙ ⚖ 🗄 âźïž `..` 🔗: ```Python hl_lines="3" title="app/routers/items.py" -{!../../../docs_src/bigger_applications/app/routers/items.py!} +{!../../docs_src/bigger_applications/app/routers/items.py!} ``` #### ❔ ⚖ 🗄 đŸ‘· @@ -290,7 +290,7 @@ that 🔜 ⛓: ✋ đŸ‘„ đŸ’Ș 🚼 _🌅_ `tags` 👈 🔜 ✔ 🎯 *➡ đŸ› ïž*, & ➕ `responses` 🎯 👈 *➡ đŸ› ïž*: ```Python hl_lines="30-31" title="app/routers/items.py" -{!../../../docs_src/bigger_applications/app/routers/items.py!} +{!../../docs_src/bigger_applications/app/routers/items.py!} ``` /// tip @@ -318,7 +318,7 @@ that 🔜 ⛓: & đŸ‘„ đŸ’Ș 📣 [🌐 🔗](dependencies/global-dependencies.md){.internal-link target=_blank} 👈 🔜 🌀 âźïž 🔗 🔠 `APIRouter`: ```Python hl_lines="1 3 7" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` ### 🗄 `APIRouter` @@ -326,7 +326,7 @@ that 🔜 ⛓: 🔜 đŸ‘„ 🗄 🎏 🔁 👈 ✔ `APIRouter`Ⓜ: ```Python hl_lines="5" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` 📁 `app/routers/users.py` & `app/routers/items.py` 🔁 👈 🍕 🎏 🐍 📩 `app`, đŸ‘„ đŸ’Ș ⚙ 👁 ❣ `.` 🗄 đŸ‘« ⚙ "⚖ 🗄". @@ -391,7 +391,7 @@ from .routers.users import router , đŸ’Ș ⚙ đŸ‘Żâ€â™‚ïž đŸ‘« 🎏 📁, đŸ‘„ 🗄 🔁 🔗: ```Python hl_lines="5" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` ### 🔌 `APIRouter`Ⓜ `users` & `items` @@ -399,7 +399,7 @@ from .routers.users import router 🔜, âžĄïž 🔌 `router`Ⓜ âšȘïžâžĄïž 🔁 `users` & `items`: ```Python hl_lines="10-11" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` /// info @@ -441,7 +441,7 @@ from .routers.users import router 👉 đŸ–Œ ⚫ 🔜 💎 🙅. ✋ âžĄïž 💬 👈 ↩ ⚫ 💰 âźïž 🎏 🏗 🏱, đŸ‘„ đŸš«đŸ”œ 🔀 ⚫ & 🚼 `prefix`, `dependencies`, `tags`, ♒. 🔗 `APIRouter`: ```Python hl_lines="3" title="app/internal/admin.py" -{!../../../docs_src/bigger_applications/app/internal/admin.py!} +{!../../docs_src/bigger_applications/app/internal/admin.py!} ``` ✋ đŸ‘„ 💚 ⚒ 🛃 `prefix` 🕐❔ ✅ `APIRouter` 👈 🌐 🚼 *➡ đŸ› ïž* ▶ âźïž `/admin`, đŸ‘„ 💚 🔐 ⚫ âźïž `dependencies` đŸ‘„ âȘ ✔ 👉 🏗, & đŸ‘„ 💚 🔌 `tags` & `responses`. @@ -449,7 +449,7 @@ from .routers.users import router đŸ‘„ đŸ’Ș 📣 🌐 👈 đŸ” ✔ 🔀 âźïž `APIRouter` đŸš¶â€â™€ïž 👈 🔱 `app.include_router()`: ```Python hl_lines="14-17" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` 👈 🌌, âźïž `APIRouter` 🔜 🚧 ⚗, đŸ‘„ đŸ’Ș 💰 👈 🎏 `app/internal/admin.py` 📁 âźïž 🎏 🏗 🏱. @@ -472,7 +472,7 @@ from .routers.users import router đŸ“„ đŸ‘„ ⚫... 🎩 👈 đŸ‘„ đŸ’Ș đŸ€·: ```Python hl_lines="21-23" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` & ⚫ 🔜 đŸ‘· ☑, đŸ‘Żâ€â™‚ïž âźïž 🌐 🎏 *➡ đŸ› ïž* 🚼 âźïž `app.include_router()`. diff --git a/docs/em/docs/tutorial/body-fields.md b/docs/em/docs/tutorial/body-fields.md index c5a04daeb..eb3093de2 100644 --- a/docs/em/docs/tutorial/body-fields.md +++ b/docs/em/docs/tutorial/body-fields.md @@ -9,7 +9,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="4" -{!> ../../../docs_src/body_fields/tutorial001.py!} +{!> ../../docs_src/body_fields/tutorial001.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="2" -{!> ../../../docs_src/body_fields/tutorial001_py310.py!} +{!> ../../docs_src/body_fields/tutorial001_py310.py!} ``` //// @@ -35,7 +35,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="11-14" -{!> ../../../docs_src/body_fields/tutorial001.py!} +{!> ../../docs_src/body_fields/tutorial001.py!} ``` //// @@ -43,7 +43,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="9-12" -{!> ../../../docs_src/body_fields/tutorial001_py310.py!} +{!> ../../docs_src/body_fields/tutorial001_py310.py!} ``` //// diff --git a/docs/em/docs/tutorial/body-multiple-params.md b/docs/em/docs/tutorial/body-multiple-params.md index c2a9a224d..2e20c83f9 100644 --- a/docs/em/docs/tutorial/body-multiple-params.md +++ b/docs/em/docs/tutorial/body-multiple-params.md @@ -11,7 +11,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="19-21" -{!> ../../../docs_src/body_multiple_params/tutorial001.py!} +{!> ../../docs_src/body_multiple_params/tutorial001.py!} ``` //// @@ -19,7 +19,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="17-19" -{!> ../../../docs_src/body_multiple_params/tutorial001_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial001_py310.py!} ``` //// @@ -48,7 +48,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="22" -{!> ../../../docs_src/body_multiple_params/tutorial002.py!} +{!> ../../docs_src/body_multiple_params/tutorial002.py!} ``` //// @@ -56,7 +56,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="20" -{!> ../../../docs_src/body_multiple_params/tutorial002_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial002_py310.py!} ``` //// @@ -103,7 +103,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="22" -{!> ../../../docs_src/body_multiple_params/tutorial003.py!} +{!> ../../docs_src/body_multiple_params/tutorial003.py!} ``` //// @@ -111,7 +111,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="20" -{!> ../../../docs_src/body_multiple_params/tutorial003_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial003_py310.py!} ``` //// @@ -157,7 +157,7 @@ q: str | None = None //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="27" -{!> ../../../docs_src/body_multiple_params/tutorial004.py!} +{!> ../../docs_src/body_multiple_params/tutorial004.py!} ``` //// @@ -165,7 +165,7 @@ q: str | None = None //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="26" -{!> ../../../docs_src/body_multiple_params/tutorial004_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial004_py310.py!} ``` //// @@ -193,7 +193,7 @@ item: Item = Body(embed=True) //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="17" -{!> ../../../docs_src/body_multiple_params/tutorial005.py!} +{!> ../../docs_src/body_multiple_params/tutorial005.py!} ``` //// @@ -201,7 +201,7 @@ item: Item = Body(embed=True) //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="15" -{!> ../../../docs_src/body_multiple_params/tutorial005_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial005_py310.py!} ``` //// diff --git a/docs/em/docs/tutorial/body-nested-models.md b/docs/em/docs/tutorial/body-nested-models.md index 23114540a..3b56b7a07 100644 --- a/docs/em/docs/tutorial/body-nested-models.md +++ b/docs/em/docs/tutorial/body-nested-models.md @@ -9,7 +9,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="14" -{!> ../../../docs_src/body_nested_models/tutorial001.py!} +{!> ../../docs_src/body_nested_models/tutorial001.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="12" -{!> ../../../docs_src/body_nested_models/tutorial001_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial001_py310.py!} ``` //// @@ -35,7 +35,7 @@ ✋ 🐍 ⏬ ⏭ 3ïžâƒŁ.9ïžâƒŁ (3ïžâƒŁ.6ïžâƒŁ & 🔛), 👆 đŸ„‡ đŸ’Ș 🗄 `List` âšȘïžâžĄïž đŸ© 🐍 `typing` đŸ•č: ```Python hl_lines="1" -{!> ../../../docs_src/body_nested_models/tutorial002.py!} +{!> ../../docs_src/body_nested_models/tutorial002.py!} ``` ### 📣 `list` âźïž 🆎 🔱 @@ -68,7 +68,7 @@ my_list: List[str] //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="14" -{!> ../../../docs_src/body_nested_models/tutorial002.py!} +{!> ../../docs_src/body_nested_models/tutorial002.py!} ``` //// @@ -76,7 +76,7 @@ my_list: List[str] //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="14" -{!> ../../../docs_src/body_nested_models/tutorial002_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial002_py39.py!} ``` //// @@ -84,7 +84,7 @@ my_list: List[str] //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="12" -{!> ../../../docs_src/body_nested_models/tutorial002_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial002_py310.py!} ``` //// @@ -100,7 +100,7 @@ my_list: List[str] //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="1 14" -{!> ../../../docs_src/body_nested_models/tutorial003.py!} +{!> ../../docs_src/body_nested_models/tutorial003.py!} ``` //// @@ -108,7 +108,7 @@ my_list: List[str] //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="14" -{!> ../../../docs_src/body_nested_models/tutorial003_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial003_py39.py!} ``` //// @@ -116,7 +116,7 @@ my_list: List[str] //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="12" -{!> ../../../docs_src/body_nested_models/tutorial003_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial003_py310.py!} ``` //// @@ -144,7 +144,7 @@ my_list: List[str] //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9-11" -{!> ../../../docs_src/body_nested_models/tutorial004.py!} +{!> ../../docs_src/body_nested_models/tutorial004.py!} ``` //// @@ -152,7 +152,7 @@ my_list: List[str] //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="9-11" -{!> ../../../docs_src/body_nested_models/tutorial004_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial004_py39.py!} ``` //// @@ -160,7 +160,7 @@ my_list: List[str] //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="7-9" -{!> ../../../docs_src/body_nested_models/tutorial004_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial004_py310.py!} ``` //// @@ -172,7 +172,7 @@ my_list: List[str] //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="20" -{!> ../../../docs_src/body_nested_models/tutorial004.py!} +{!> ../../docs_src/body_nested_models/tutorial004.py!} ``` //// @@ -180,7 +180,7 @@ my_list: List[str] //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="20" -{!> ../../../docs_src/body_nested_models/tutorial004_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial004_py39.py!} ``` //// @@ -188,7 +188,7 @@ my_list: List[str] //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="18" -{!> ../../../docs_src/body_nested_models/tutorial004_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial004_py310.py!} ``` //// @@ -227,7 +227,7 @@ my_list: List[str] //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="4 10" -{!> ../../../docs_src/body_nested_models/tutorial005.py!} +{!> ../../docs_src/body_nested_models/tutorial005.py!} ``` //// @@ -235,7 +235,7 @@ my_list: List[str] //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="4 10" -{!> ../../../docs_src/body_nested_models/tutorial005_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial005_py39.py!} ``` //// @@ -243,7 +243,7 @@ my_list: List[str] //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="2 8" -{!> ../../../docs_src/body_nested_models/tutorial005_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial005_py310.py!} ``` //// @@ -257,7 +257,7 @@ my_list: List[str] //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="20" -{!> ../../../docs_src/body_nested_models/tutorial006.py!} +{!> ../../docs_src/body_nested_models/tutorial006.py!} ``` //// @@ -265,7 +265,7 @@ my_list: List[str] //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="20" -{!> ../../../docs_src/body_nested_models/tutorial006_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial006_py39.py!} ``` //// @@ -273,7 +273,7 @@ my_list: List[str] //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="18" -{!> ../../../docs_src/body_nested_models/tutorial006_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial006_py310.py!} ``` //// @@ -317,7 +317,7 @@ my_list: List[str] //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9 14 20 23 27" -{!> ../../../docs_src/body_nested_models/tutorial007.py!} +{!> ../../docs_src/body_nested_models/tutorial007.py!} ``` //// @@ -325,7 +325,7 @@ my_list: List[str] //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="9 14 20 23 27" -{!> ../../../docs_src/body_nested_models/tutorial007_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial007_py39.py!} ``` //// @@ -333,7 +333,7 @@ my_list: List[str] //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="7 12 18 21 25" -{!> ../../../docs_src/body_nested_models/tutorial007_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial007_py310.py!} ``` //// @@ -363,7 +363,7 @@ images: list[Image] //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="15" -{!> ../../../docs_src/body_nested_models/tutorial008.py!} +{!> ../../docs_src/body_nested_models/tutorial008.py!} ``` //// @@ -371,7 +371,7 @@ images: list[Image] //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="13" -{!> ../../../docs_src/body_nested_models/tutorial008_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial008_py39.py!} ``` //// @@ -407,7 +407,7 @@ images: list[Image] //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9" -{!> ../../../docs_src/body_nested_models/tutorial009.py!} +{!> ../../docs_src/body_nested_models/tutorial009.py!} ``` //// @@ -415,7 +415,7 @@ images: list[Image] //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="7" -{!> ../../../docs_src/body_nested_models/tutorial009_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial009_py39.py!} ``` //// diff --git a/docs/em/docs/tutorial/body-updates.md b/docs/em/docs/tutorial/body-updates.md index 97501eb6d..4a4b3b6b8 100644 --- a/docs/em/docs/tutorial/body-updates.md +++ b/docs/em/docs/tutorial/body-updates.md @@ -9,7 +9,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="30-35" -{!> ../../../docs_src/body_updates/tutorial001.py!} +{!> ../../docs_src/body_updates/tutorial001.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="30-35" -{!> ../../../docs_src/body_updates/tutorial001_py39.py!} +{!> ../../docs_src/body_updates/tutorial001_py39.py!} ``` //// @@ -25,7 +25,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="28-33" -{!> ../../../docs_src/body_updates/tutorial001_py310.py!} +{!> ../../docs_src/body_updates/tutorial001_py310.py!} ``` //// @@ -79,7 +79,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="34" -{!> ../../../docs_src/body_updates/tutorial002.py!} +{!> ../../docs_src/body_updates/tutorial002.py!} ``` //// @@ -87,7 +87,7 @@ //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="34" -{!> ../../../docs_src/body_updates/tutorial002_py39.py!} +{!> ../../docs_src/body_updates/tutorial002_py39.py!} ``` //// @@ -95,7 +95,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="32" -{!> ../../../docs_src/body_updates/tutorial002_py310.py!} +{!> ../../docs_src/body_updates/tutorial002_py310.py!} ``` //// @@ -109,7 +109,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="35" -{!> ../../../docs_src/body_updates/tutorial002.py!} +{!> ../../docs_src/body_updates/tutorial002.py!} ``` //// @@ -117,7 +117,7 @@ //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="35" -{!> ../../../docs_src/body_updates/tutorial002_py39.py!} +{!> ../../docs_src/body_updates/tutorial002_py39.py!} ``` //// @@ -125,7 +125,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="33" -{!> ../../../docs_src/body_updates/tutorial002_py310.py!} +{!> ../../docs_src/body_updates/tutorial002_py310.py!} ``` //// @@ -148,7 +148,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="30-37" -{!> ../../../docs_src/body_updates/tutorial002.py!} +{!> ../../docs_src/body_updates/tutorial002.py!} ``` //// @@ -156,7 +156,7 @@ //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="30-37" -{!> ../../../docs_src/body_updates/tutorial002_py39.py!} +{!> ../../docs_src/body_updates/tutorial002_py39.py!} ``` //// @@ -164,7 +164,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="28-35" -{!> ../../../docs_src/body_updates/tutorial002_py310.py!} +{!> ../../docs_src/body_updates/tutorial002_py310.py!} ``` //// diff --git a/docs/em/docs/tutorial/body.md b/docs/em/docs/tutorial/body.md index 79d8e716f..3468fc512 100644 --- a/docs/em/docs/tutorial/body.md +++ b/docs/em/docs/tutorial/body.md @@ -25,7 +25,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="4" -{!> ../../../docs_src/body/tutorial001.py!} +{!> ../../docs_src/body/tutorial001.py!} ``` //// @@ -33,7 +33,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="2" -{!> ../../../docs_src/body/tutorial001_py310.py!} +{!> ../../docs_src/body/tutorial001_py310.py!} ``` //// @@ -47,7 +47,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="7-11" -{!> ../../../docs_src/body/tutorial001.py!} +{!> ../../docs_src/body/tutorial001.py!} ``` //// @@ -55,7 +55,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="5-9" -{!> ../../../docs_src/body/tutorial001_py310.py!} +{!> ../../docs_src/body/tutorial001_py310.py!} ``` //// @@ -89,7 +89,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="18" -{!> ../../../docs_src/body/tutorial001.py!} +{!> ../../docs_src/body/tutorial001.py!} ``` //// @@ -97,7 +97,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="16" -{!> ../../../docs_src/body/tutorial001_py310.py!} +{!> ../../docs_src/body/tutorial001_py310.py!} ``` //// @@ -170,7 +170,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="21" -{!> ../../../docs_src/body/tutorial002.py!} +{!> ../../docs_src/body/tutorial002.py!} ``` //// @@ -178,7 +178,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="19" -{!> ../../../docs_src/body/tutorial002_py310.py!} +{!> ../../docs_src/body/tutorial002_py310.py!} ``` //// @@ -192,7 +192,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="17-18" -{!> ../../../docs_src/body/tutorial003.py!} +{!> ../../docs_src/body/tutorial003.py!} ``` //// @@ -200,7 +200,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="15-16" -{!> ../../../docs_src/body/tutorial003_py310.py!} +{!> ../../docs_src/body/tutorial003_py310.py!} ``` //// @@ -214,7 +214,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="18" -{!> ../../../docs_src/body/tutorial004.py!} +{!> ../../docs_src/body/tutorial004.py!} ``` //// @@ -222,7 +222,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="16" -{!> ../../../docs_src/body/tutorial004_py310.py!} +{!> ../../docs_src/body/tutorial004_py310.py!} ``` //// diff --git a/docs/em/docs/tutorial/cookie-params.md b/docs/em/docs/tutorial/cookie-params.md index 891999028..f4956e76f 100644 --- a/docs/em/docs/tutorial/cookie-params.md +++ b/docs/em/docs/tutorial/cookie-params.md @@ -9,7 +9,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001.py!} +{!> ../../docs_src/cookie_params/tutorial001.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="1" -{!> ../../../docs_src/cookie_params/tutorial001_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_py310.py!} ``` //// @@ -31,7 +31,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001.py!} +{!> ../../docs_src/cookie_params/tutorial001.py!} ``` //// @@ -39,7 +39,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="7" -{!> ../../../docs_src/cookie_params/tutorial001_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_py310.py!} ``` //// diff --git a/docs/em/docs/tutorial/cors.md b/docs/em/docs/tutorial/cors.md index 690b8973a..5829319cb 100644 --- a/docs/em/docs/tutorial/cors.md +++ b/docs/em/docs/tutorial/cors.md @@ -47,7 +47,7 @@ * 🎯 đŸ‡ș🇾🔍 🎚 ⚖ 🌐 đŸ‘« âźïž 🃏 `"*"`. ```Python hl_lines="2 6-11 13-19" -{!../../../docs_src/cors/tutorial001.py!} +{!../../docs_src/cors/tutorial001.py!} ``` 🔱 🔱 ⚙ `CORSMiddleware` đŸ› ïž đŸš« 🔱, 👆 🔜 đŸ’Ș 🎯 đŸ› ïž 🎯 🇹🇳, đŸ‘©â€đŸ”Ź, ⚖ 🎚, ✔ đŸ–„ ✔ ⚙ đŸ‘« ✖-🆔 🔑. diff --git a/docs/em/docs/tutorial/debugging.md b/docs/em/docs/tutorial/debugging.md index abef2a50c..9320370d6 100644 --- a/docs/em/docs/tutorial/debugging.md +++ b/docs/em/docs/tutorial/debugging.md @@ -7,7 +7,7 @@ 👆 FastAPI 🈾, 🗄 & 🏃 `uvicorn` 🔗: ```Python hl_lines="1 15" -{!../../../docs_src/debugging/tutorial001.py!} +{!../../docs_src/debugging/tutorial001.py!} ``` ### 🔃 `__name__ == "__main__"` diff --git a/docs/em/docs/tutorial/dependencies/classes-as-dependencies.md b/docs/em/docs/tutorial/dependencies/classes-as-dependencies.md index f14239b0f..3e58d506c 100644 --- a/docs/em/docs/tutorial/dependencies/classes-as-dependencies.md +++ b/docs/em/docs/tutorial/dependencies/classes-as-dependencies.md @@ -9,7 +9,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="7" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -86,7 +86,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="11-15" -{!> ../../../docs_src/dependencies/tutorial002.py!} +{!> ../../docs_src/dependencies/tutorial002.py!} ``` //// @@ -94,7 +94,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="9-13" -{!> ../../../docs_src/dependencies/tutorial002_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_py310.py!} ``` //// @@ -104,7 +104,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="12" -{!> ../../../docs_src/dependencies/tutorial002.py!} +{!> ../../docs_src/dependencies/tutorial002.py!} ``` //// @@ -112,7 +112,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="10" -{!> ../../../docs_src/dependencies/tutorial002_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_py310.py!} ``` //// @@ -122,7 +122,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -130,7 +130,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="6" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -152,7 +152,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial002.py!} +{!> ../../docs_src/dependencies/tutorial002.py!} ``` //// @@ -160,7 +160,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial002_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_py310.py!} ``` //// @@ -206,7 +206,7 @@ commons = Depends(CommonQueryParams) //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial003.py!} +{!> ../../docs_src/dependencies/tutorial003.py!} ``` //// @@ -214,7 +214,7 @@ commons = Depends(CommonQueryParams) //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial003_py310.py!} +{!> ../../docs_src/dependencies/tutorial003_py310.py!} ``` //// @@ -254,7 +254,7 @@ commons: CommonQueryParams = Depends() //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial004.py!} +{!> ../../docs_src/dependencies/tutorial004.py!} ``` //// @@ -262,7 +262,7 @@ commons: CommonQueryParams = Depends() //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial004_py310.py!} +{!> ../../docs_src/dependencies/tutorial004_py310.py!} ``` //// diff --git a/docs/em/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md b/docs/em/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md index bf267e056..cd36ad100 100644 --- a/docs/em/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md +++ b/docs/em/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md @@ -15,7 +15,7 @@ ⚫ 🔜 `list` `Depends()`: ```Python hl_lines="17" -{!../../../docs_src/dependencies/tutorial006.py!} +{!../../docs_src/dependencies/tutorial006.py!} ``` 👉 🔗 🔜 đŸ› ïž/❎ 🎏 🌌 😐 🔗. ✋ đŸ‘« đŸ’Č (đŸš„ đŸ‘« 📹 🙆) 🏆 đŸš« đŸš¶â€â™€ïž 👆 *➡ đŸ› ïž 🔱*. @@ -47,7 +47,7 @@ đŸ‘« đŸ’Ș 📣 📹 📄 (💖 🎚) ⚖ 🎏 🎧-🔗: ```Python hl_lines="6 11" -{!../../../docs_src/dependencies/tutorial006.py!} +{!../../docs_src/dependencies/tutorial006.py!} ``` ### đŸ€š ⚠ @@ -55,7 +55,7 @@ đŸ‘« 🔗 đŸ’Ș `raise` ⚠, 🎏 😐 🔗: ```Python hl_lines="8 13" -{!../../../docs_src/dependencies/tutorial006.py!} +{!../../docs_src/dependencies/tutorial006.py!} ``` ### 📹 đŸ’Č @@ -65,7 +65,7 @@ , 👆 đŸ’Ș đŸ€-⚙ 😐 🔗 (👈 📹 đŸ’Č) 👆 âȘ ⚙ đŸ‘± 🙆, & ✋ đŸ’Č 🏆 đŸš« ⚙, 🔗 🔜 đŸ› ïž: ```Python hl_lines="9 14" -{!../../../docs_src/dependencies/tutorial006.py!} +{!../../docs_src/dependencies/tutorial006.py!} ``` ## 🔗 đŸ‘Ș *➡ đŸ› ïž* diff --git a/docs/em/docs/tutorial/dependencies/dependencies-with-yield.md b/docs/em/docs/tutorial/dependencies/dependencies-with-yield.md index 5998d06df..e0d6dba24 100644 --- a/docs/em/docs/tutorial/dependencies/dependencies-with-yield.md +++ b/docs/em/docs/tutorial/dependencies/dependencies-with-yield.md @@ -30,19 +30,19 @@ FastAPI 🐕‍đŸŠș 🔗 👈 ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -42,7 +42,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="6-7" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -70,7 +70,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="3" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -78,7 +78,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="1" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -90,7 +90,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="15 20" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -98,7 +98,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="11 16" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// diff --git a/docs/em/docs/tutorial/dependencies/sub-dependencies.md b/docs/em/docs/tutorial/dependencies/sub-dependencies.md index 02b33ccd7..a1e7be134 100644 --- a/docs/em/docs/tutorial/dependencies/sub-dependencies.md +++ b/docs/em/docs/tutorial/dependencies/sub-dependencies.md @@ -13,7 +13,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="8-9" -{!> ../../../docs_src/dependencies/tutorial005.py!} +{!> ../../docs_src/dependencies/tutorial005.py!} ``` //// @@ -21,7 +21,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="6-7" -{!> ../../../docs_src/dependencies/tutorial005_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_py310.py!} ``` //// @@ -37,7 +37,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="13" -{!> ../../../docs_src/dependencies/tutorial005.py!} +{!> ../../docs_src/dependencies/tutorial005.py!} ``` //// @@ -45,7 +45,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="11" -{!> ../../../docs_src/dependencies/tutorial005_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_py310.py!} ``` //// @@ -64,7 +64,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="22" -{!> ../../../docs_src/dependencies/tutorial005.py!} +{!> ../../docs_src/dependencies/tutorial005.py!} ``` //// @@ -72,7 +72,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial005_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_py310.py!} ``` //// diff --git a/docs/em/docs/tutorial/encoder.md b/docs/em/docs/tutorial/encoder.md index 314f5b324..21419ef21 100644 --- a/docs/em/docs/tutorial/encoder.md +++ b/docs/em/docs/tutorial/encoder.md @@ -23,7 +23,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="5 22" -{!> ../../../docs_src/encoder/tutorial001.py!} +{!> ../../docs_src/encoder/tutorial001.py!} ``` //// @@ -31,7 +31,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="4 21" -{!> ../../../docs_src/encoder/tutorial001_py310.py!} +{!> ../../docs_src/encoder/tutorial001_py310.py!} ``` //// diff --git a/docs/em/docs/tutorial/extra-data-types.md b/docs/em/docs/tutorial/extra-data-types.md index cbe111079..1d473bd93 100644 --- a/docs/em/docs/tutorial/extra-data-types.md +++ b/docs/em/docs/tutorial/extra-data-types.md @@ -58,7 +58,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="1 3 12-16" -{!> ../../../docs_src/extra_data_types/tutorial001.py!} +{!> ../../docs_src/extra_data_types/tutorial001.py!} ``` //// @@ -66,7 +66,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="1 2 11-15" -{!> ../../../docs_src/extra_data_types/tutorial001_py310.py!} +{!> ../../docs_src/extra_data_types/tutorial001_py310.py!} ``` //// @@ -76,7 +76,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="18-19" -{!> ../../../docs_src/extra_data_types/tutorial001.py!} +{!> ../../docs_src/extra_data_types/tutorial001.py!} ``` //// @@ -84,7 +84,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="17-18" -{!> ../../../docs_src/extra_data_types/tutorial001_py310.py!} +{!> ../../docs_src/extra_data_types/tutorial001_py310.py!} ``` //// diff --git a/docs/em/docs/tutorial/extra-models.md b/docs/em/docs/tutorial/extra-models.md index 4703c7123..4fdf196e8 100644 --- a/docs/em/docs/tutorial/extra-models.md +++ b/docs/em/docs/tutorial/extra-models.md @@ -23,7 +23,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9 11 16 22 24 29-30 33-35 40-41" -{!> ../../../docs_src/extra_models/tutorial001.py!} +{!> ../../docs_src/extra_models/tutorial001.py!} ``` //// @@ -31,7 +31,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="7 9 14 20 22 27-28 31-33 38-39" -{!> ../../../docs_src/extra_models/tutorial001_py310.py!} +{!> ../../docs_src/extra_models/tutorial001_py310.py!} ``` //// @@ -171,7 +171,7 @@ UserInDB( //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9 15-16 19-20 23-24" -{!> ../../../docs_src/extra_models/tutorial002.py!} +{!> ../../docs_src/extra_models/tutorial002.py!} ``` //// @@ -179,7 +179,7 @@ UserInDB( //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="7 13-14 17-18 21-22" -{!> ../../../docs_src/extra_models/tutorial002_py310.py!} +{!> ../../docs_src/extra_models/tutorial002_py310.py!} ``` //// @@ -201,7 +201,7 @@ UserInDB( //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="1 14-15 18-20 33" -{!> ../../../docs_src/extra_models/tutorial003.py!} +{!> ../../docs_src/extra_models/tutorial003.py!} ``` //// @@ -209,7 +209,7 @@ UserInDB( //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="1 14-15 18-20 33" -{!> ../../../docs_src/extra_models/tutorial003_py310.py!} +{!> ../../docs_src/extra_models/tutorial003_py310.py!} ``` //// @@ -237,7 +237,7 @@ some_variable: PlaneItem | CarItem //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="1 20" -{!> ../../../docs_src/extra_models/tutorial004.py!} +{!> ../../docs_src/extra_models/tutorial004.py!} ``` //// @@ -245,7 +245,7 @@ some_variable: PlaneItem | CarItem //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="18" -{!> ../../../docs_src/extra_models/tutorial004_py39.py!} +{!> ../../docs_src/extra_models/tutorial004_py39.py!} ``` //// @@ -261,7 +261,7 @@ some_variable: PlaneItem | CarItem //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="1 8" -{!> ../../../docs_src/extra_models/tutorial005.py!} +{!> ../../docs_src/extra_models/tutorial005.py!} ``` //// @@ -269,7 +269,7 @@ some_variable: PlaneItem | CarItem //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="6" -{!> ../../../docs_src/extra_models/tutorial005_py39.py!} +{!> ../../docs_src/extra_models/tutorial005_py39.py!} ``` //// diff --git a/docs/em/docs/tutorial/first-steps.md b/docs/em/docs/tutorial/first-steps.md index 158189e6e..d8cc05c40 100644 --- a/docs/em/docs/tutorial/first-steps.md +++ b/docs/em/docs/tutorial/first-steps.md @@ -3,7 +3,7 @@ 🙅 FastAPI 📁 đŸ’Ș 👀 💖 👉: ```Python -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` 📁 👈 📁 `main.py`. @@ -134,7 +134,7 @@ INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) ### 🔁 1ïžâƒŁ: 🗄 `FastAPI` ```Python hl_lines="1" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` `FastAPI` 🐍 🎓 👈 🚚 🌐 đŸ› ïž 👆 đŸ› ïž. @@ -150,7 +150,7 @@ INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) ### 🔁 2ïžâƒŁ: ✍ `FastAPI` "👐" ```Python hl_lines="3" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` đŸ“„ `app` 🔱 🔜 "👐" 🎓 `FastAPI`. @@ -172,7 +172,7 @@ $ uvicorn main:app --reload đŸš„ 👆 ✍ 👆 đŸ“± 💖: ```Python hl_lines="3" -{!../../../docs_src/first_steps/tutorial002.py!} +{!../../docs_src/first_steps/tutorial002.py!} ``` & 🚼 ⚫ 📁 `main.py`, ‎ 👆 🔜 đŸ€™ `uvicorn` 💖: @@ -251,7 +251,7 @@ https://example.com/items/foo #### 🔬 *➡ đŸ› ïž 👹‍🎹* ```Python hl_lines="6" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` `@app.get("/")` 💬 **FastAPI** 👈 🔱 ▶ 🔛 🈚 🚚 📹 👈 đŸš¶: @@ -307,7 +307,7 @@ https://example.com/items/foo * **🔱**: 🔱 🔛 "👹‍🎹" (🔛 `@app.get("/")`). ```Python hl_lines="7" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` 👉 🐍 🔱. @@ -321,7 +321,7 @@ https://example.com/items/foo 👆 đŸ’Ș 🔬 ⚫ 😐 🔱 ↩ `async def`: ```Python hl_lines="7" -{!../../../docs_src/first_steps/tutorial003.py!} +{!../../docs_src/first_steps/tutorial003.py!} ``` /// note @@ -333,7 +333,7 @@ https://example.com/items/foo ### 🔁 5ïžâƒŁ: 📹 🎚 ```Python hl_lines="8" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` 👆 đŸ’Ș 📹 `dict`, `list`, ⭐ đŸ’Č `str`, `int`, ♒. diff --git a/docs/em/docs/tutorial/handling-errors.md b/docs/em/docs/tutorial/handling-errors.md index ed32ab53a..7f6a704eb 100644 --- a/docs/em/docs/tutorial/handling-errors.md +++ b/docs/em/docs/tutorial/handling-errors.md @@ -26,7 +26,7 @@ ### 🗄 `HTTPException` ```Python hl_lines="1" -{!../../../docs_src/handling_errors/tutorial001.py!} +{!../../docs_src/handling_errors/tutorial001.py!} ``` ### đŸ€š `HTTPException` 👆 📟 @@ -42,7 +42,7 @@ 👉 đŸ–Œ, 🕐❔ đŸ‘©â€đŸ’» 📹 🏬 🆔 👈 đŸš« 🔀, đŸ€š ⚠ âźïž 👔 📟 `404`: ```Python hl_lines="11" -{!../../../docs_src/handling_errors/tutorial001.py!} +{!../../docs_src/handling_errors/tutorial001.py!} ``` ### 📉 📹 @@ -82,7 +82,7 @@ ✋ đŸ’Œ 👆 đŸ’Ș ⚫ 🏧 😐, 👆 đŸ’Ș 🚼 🛃 🎚: ```Python hl_lines="14" -{!../../../docs_src/handling_errors/tutorial002.py!} +{!../../docs_src/handling_errors/tutorial002.py!} ``` ## ❎ 🛃 ⚠ 🐕‍đŸŠș @@ -96,7 +96,7 @@ 👆 đŸ’Ș 🚼 🛃 ⚠ 🐕‍đŸŠș âźïž `@app.exception_handler()`: ```Python hl_lines="5-7 13-18 24" -{!../../../docs_src/handling_errors/tutorial003.py!} +{!../../docs_src/handling_errors/tutorial003.py!} ``` đŸ“„, đŸš„ 👆 📹 `/unicorns/yolo`, *➡ đŸ› ïž* 🔜 `raise` `UnicornException`. @@ -136,7 +136,7 @@ ⚠ 🐕‍đŸŠș 🔜 📹 `Request` & ⚠. ```Python hl_lines="2 14-16" -{!../../../docs_src/handling_errors/tutorial004.py!} +{!../../docs_src/handling_errors/tutorial004.py!} ``` 🔜, đŸš„ 👆 đŸš¶ `/items/foo`, ↩ 💆‍♂ 🔱 đŸŽ» ❌ âźïž: @@ -189,7 +189,7 @@ path -> item_id đŸ–Œ, 👆 đŸ’Ș 💚 📹 ✅ ✍ 📹 ↩ đŸŽ» đŸ‘« ❌: ```Python hl_lines="3-4 9-11 22" -{!../../../docs_src/handling_errors/tutorial004.py!} +{!../../docs_src/handling_errors/tutorial004.py!} ``` /// note | "📡 â„č" @@ -207,7 +207,7 @@ path -> item_id 👆 đŸ’Ș ⚙ ⚫ âȘ đŸ› ïž 👆 đŸ“± đŸ•č đŸ’Ș & â„č ⚫, 📹 ⚫ đŸ‘©â€đŸ’», ♒. ```Python hl_lines="14" -{!../../../docs_src/handling_errors/tutorial005.py!} +{!../../docs_src/handling_errors/tutorial005.py!} ``` 🔜 🔄 📹 ❌ 🏬 💖: @@ -267,7 +267,7 @@ from starlette.exceptions import HTTPException as StarletteHTTPException đŸš„ 👆 💚 ⚙ ⚠ ‎ âźïž 🎏 🔱 ⚠ 🐕‍đŸŠș âšȘïžâžĄïž **FastAPI**, 👆 đŸ’Ș 🗄 & đŸ€-⚙ 🔱 ⚠ 🐕‍đŸŠș âšȘïžâžĄïž `fastapi.exception_handlers`: ```Python hl_lines="2-5 15 21" -{!../../../docs_src/handling_errors/tutorial006.py!} +{!../../docs_src/handling_errors/tutorial006.py!} ``` 👉 đŸ–Œ 👆 `print`😅 ❌ âźïž đŸ“¶ 🎹 📧, ✋ 👆 đŸ€š 💭. 👆 đŸ’Ș ⚙ ⚠ & ‎ đŸ€-⚙ 🔱 ⚠ 🐕‍đŸŠș. diff --git a/docs/em/docs/tutorial/header-params.md b/docs/em/docs/tutorial/header-params.md index 82583c7c3..34abd3a4c 100644 --- a/docs/em/docs/tutorial/header-params.md +++ b/docs/em/docs/tutorial/header-params.md @@ -9,7 +9,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="3" -{!> ../../../docs_src/header_params/tutorial001.py!} +{!> ../../docs_src/header_params/tutorial001.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="1" -{!> ../../../docs_src/header_params/tutorial001_py310.py!} +{!> ../../docs_src/header_params/tutorial001_py310.py!} ``` //// @@ -31,7 +31,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial001.py!} +{!> ../../docs_src/header_params/tutorial001.py!} ``` //// @@ -39,7 +39,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="7" -{!> ../../../docs_src/header_params/tutorial001_py310.py!} +{!> ../../docs_src/header_params/tutorial001_py310.py!} ``` //// @@ -77,7 +77,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="10" -{!> ../../../docs_src/header_params/tutorial002.py!} +{!> ../../docs_src/header_params/tutorial002.py!} ``` //// @@ -85,7 +85,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="8" -{!> ../../../docs_src/header_params/tutorial002_py310.py!} +{!> ../../docs_src/header_params/tutorial002_py310.py!} ``` //// @@ -109,7 +109,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial003.py!} +{!> ../../docs_src/header_params/tutorial003.py!} ``` //// @@ -117,7 +117,7 @@ //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial003_py39.py!} +{!> ../../docs_src/header_params/tutorial003_py39.py!} ``` //// @@ -125,7 +125,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="7" -{!> ../../../docs_src/header_params/tutorial003_py310.py!} +{!> ../../docs_src/header_params/tutorial003_py310.py!} ``` //// diff --git a/docs/em/docs/tutorial/metadata.md b/docs/em/docs/tutorial/metadata.md index 6caeed4cd..a30db113d 100644 --- a/docs/em/docs/tutorial/metadata.md +++ b/docs/em/docs/tutorial/metadata.md @@ -18,7 +18,7 @@ 👆 đŸ’Ș ⚒ đŸ‘« ⏩: ```Python hl_lines="3-16 19-31" -{!../../../docs_src/metadata/tutorial001.py!} +{!../../docs_src/metadata/tutorial001.py!} ``` /// tip @@ -52,7 +52,7 @@ ✍ 🗃 👆 🔖 & đŸš¶â€â™€ïž ⚫ `openapi_tags` 🔱: ```Python hl_lines="3-16 18" -{!../../../docs_src/metadata/tutorial004.py!} +{!../../docs_src/metadata/tutorial004.py!} ``` 👀 👈 👆 đŸ’Ș ⚙ ✍ 🔘 📛, đŸ–Œ "💳" 🔜 🎩 🩁 (**💳**) & "🎀" 🔜 🎩 ❕ (_🎀_). @@ -68,7 +68,7 @@ ⚙ `tags` 🔱 âźïž 👆 *➡ đŸ› ïž* (& `APIRouter`Ⓜ) đŸ› ïž đŸ‘« 🎏 🔖: ```Python hl_lines="21 26" -{!../../../docs_src/metadata/tutorial004.py!} +{!../../docs_src/metadata/tutorial004.py!} ``` /// info @@ -98,7 +98,7 @@ đŸ–Œ, ⚒ ⚫ 🍩 `/api/v1/openapi.json`: ```Python hl_lines="3" -{!../../../docs_src/metadata/tutorial002.py!} +{!../../docs_src/metadata/tutorial002.py!} ``` đŸš„ 👆 💚 ❎ 🗄 🔗 🍕 👆 đŸ’Ș ⚒ `openapi_url=None`, 👈 🔜 ❎ đŸ§Ÿ đŸ‘©â€đŸ’» 🔱 👈 ⚙ ⚫. @@ -117,5 +117,5 @@ đŸ–Œ, ⚒ 🩁 🎚 🍩 `/documentation` & ❎ 📄: ```Python hl_lines="3" -{!../../../docs_src/metadata/tutorial003.py!} +{!../../docs_src/metadata/tutorial003.py!} ``` diff --git a/docs/em/docs/tutorial/middleware.md b/docs/em/docs/tutorial/middleware.md index b9bb12e00..cd0777ebb 100644 --- a/docs/em/docs/tutorial/middleware.md +++ b/docs/em/docs/tutorial/middleware.md @@ -32,7 +32,7 @@ * 👆 đŸ’Ș ‎ 🔀 🌅 `response` ⏭ 🛬 ⚫. ```Python hl_lines="8-9 11 14" -{!../../../docs_src/middleware/tutorial001.py!} +{!../../docs_src/middleware/tutorial001.py!} ``` /// tip @@ -60,7 +60,7 @@ đŸ–Œ, 👆 đŸ’Ș 🚼 🛃 🎚 `X-Process-Time` ⚗ 🕰 đŸ„ˆ 👈 ⚫ ✊ đŸ› ïž 📹 & 🏗 📹: ```Python hl_lines="10 12-13" -{!../../../docs_src/middleware/tutorial001.py!} +{!../../docs_src/middleware/tutorial001.py!} ``` ## 🎏 đŸ› ïž diff --git a/docs/em/docs/tutorial/path-operation-configuration.md b/docs/em/docs/tutorial/path-operation-configuration.md index 1979bed2b..9529928fb 100644 --- a/docs/em/docs/tutorial/path-operation-configuration.md +++ b/docs/em/docs/tutorial/path-operation-configuration.md @@ -19,7 +19,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="3 17" -{!> ../../../docs_src/path_operation_configuration/tutorial001.py!} +{!> ../../docs_src/path_operation_configuration/tutorial001.py!} ``` //// @@ -27,7 +27,7 @@ //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="3 17" -{!> ../../../docs_src/path_operation_configuration/tutorial001_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial001_py39.py!} ``` //// @@ -35,7 +35,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="1 15" -{!> ../../../docs_src/path_operation_configuration/tutorial001_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial001_py310.py!} ``` //// @@ -57,7 +57,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="17 22 27" -{!> ../../../docs_src/path_operation_configuration/tutorial002.py!} +{!> ../../docs_src/path_operation_configuration/tutorial002.py!} ``` //// @@ -65,7 +65,7 @@ //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="17 22 27" -{!> ../../../docs_src/path_operation_configuration/tutorial002_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial002_py39.py!} ``` //// @@ -73,7 +73,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="15 20 25" -{!> ../../../docs_src/path_operation_configuration/tutorial002_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial002_py310.py!} ``` //// @@ -91,7 +91,7 @@ **FastAPI** 🐕‍đŸŠș 👈 🎏 🌌 âźïž ✅ đŸŽ»: ```Python hl_lines="1 8-10 13 18" -{!../../../docs_src/path_operation_configuration/tutorial002b.py!} +{!../../docs_src/path_operation_configuration/tutorial002b.py!} ``` ## 📄 & 📛 @@ -101,7 +101,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="20-21" -{!> ../../../docs_src/path_operation_configuration/tutorial003.py!} +{!> ../../docs_src/path_operation_configuration/tutorial003.py!} ``` //// @@ -109,7 +109,7 @@ //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="20-21" -{!> ../../../docs_src/path_operation_configuration/tutorial003_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial003_py39.py!} ``` //// @@ -117,7 +117,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="18-19" -{!> ../../../docs_src/path_operation_configuration/tutorial003_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial003_py310.py!} ``` //// @@ -131,7 +131,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="19-27" -{!> ../../../docs_src/path_operation_configuration/tutorial004.py!} +{!> ../../docs_src/path_operation_configuration/tutorial004.py!} ``` //// @@ -139,7 +139,7 @@ //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="19-27" -{!> ../../../docs_src/path_operation_configuration/tutorial004_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial004_py39.py!} ``` //// @@ -147,7 +147,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="17-25" -{!> ../../../docs_src/path_operation_configuration/tutorial004_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial004_py310.py!} ``` //// @@ -163,7 +163,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="21" -{!> ../../../docs_src/path_operation_configuration/tutorial005.py!} +{!> ../../docs_src/path_operation_configuration/tutorial005.py!} ``` //// @@ -171,7 +171,7 @@ //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="21" -{!> ../../../docs_src/path_operation_configuration/tutorial005_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial005_py39.py!} ``` //// @@ -179,7 +179,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="19" -{!> ../../../docs_src/path_operation_configuration/tutorial005_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial005_py310.py!} ``` //// @@ -205,7 +205,7 @@ đŸš„ 👆 đŸ’Ș ℱ *➡ đŸ› ïž* 😱, ✋ đŸ” ❎ ⚫, đŸš¶â€â™€ïž 🔱 `deprecated`: ```Python hl_lines="16" -{!../../../docs_src/path_operation_configuration/tutorial006.py!} +{!../../docs_src/path_operation_configuration/tutorial006.py!} ``` ⚫ 🔜 🎯 ℱ 😱 🎓 đŸ©ș: diff --git a/docs/em/docs/tutorial/path-params-numeric-validations.md b/docs/em/docs/tutorial/path-params-numeric-validations.md index a7952984c..c25f0323e 100644 --- a/docs/em/docs/tutorial/path-params-numeric-validations.md +++ b/docs/em/docs/tutorial/path-params-numeric-validations.md @@ -9,7 +9,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="3" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="1" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_py310.py!} ``` //// @@ -31,7 +31,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001.py!} ``` //// @@ -39,7 +39,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="8" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_py310.py!} ``` //// @@ -71,7 +71,7 @@ , 👆 đŸ’Ș 📣 👆 🔱: ```Python hl_lines="7" -{!../../../docs_src/path_params_numeric_validations/tutorial002.py!} +{!../../docs_src/path_params_numeric_validations/tutorial002.py!} ``` ## ✔ 🔱 👆 đŸ’Ș, đŸŽ± @@ -83,7 +83,7 @@ 🐍 🏆 đŸš« 🕳 âźïž 👈 `*`, ✋ ⚫ 🔜 💭 👈 🌐 📄 🔱 🔜 đŸ€™ đŸ‡šđŸ‡» ❌ (🔑-đŸ’Č đŸ‘«), 💭 kwargs. đŸš„ đŸ‘« đŸš« ✔ 🔱 đŸ’Č. ```Python hl_lines="7" -{!../../../docs_src/path_params_numeric_validations/tutorial003.py!} +{!../../docs_src/path_params_numeric_validations/tutorial003.py!} ``` ## 🔱 🔬: 👑 🌘 ⚖ 🌓 @@ -93,7 +93,7 @@ đŸ“„, âźïž `ge=1`, `item_id` 🔜 đŸ’Ș 🔱 🔱 "`g`đŸ…Ÿ 🌘 ⚖ `e`đŸ…Ÿ" `1`. ```Python hl_lines="8" -{!../../../docs_src/path_params_numeric_validations/tutorial004.py!} +{!../../docs_src/path_params_numeric_validations/tutorial004.py!} ``` ## 🔱 🔬: 🌘 🌘 & 🌘 🌘 ⚖ 🌓 @@ -104,7 +104,7 @@ * `le`: `l`👭 🌘 ⚖ `e`đŸ…Ÿ ```Python hl_lines="9" -{!../../../docs_src/path_params_numeric_validations/tutorial005.py!} +{!../../docs_src/path_params_numeric_validations/tutorial005.py!} ``` ## 🔱 🔬: 🎈, 🌘 🌘 & 🌘 🌘 @@ -118,7 +118,7 @@ & 🎏 lt. ```Python hl_lines="11" -{!../../../docs_src/path_params_numeric_validations/tutorial006.py!} +{!../../docs_src/path_params_numeric_validations/tutorial006.py!} ``` ## 🌃 diff --git a/docs/em/docs/tutorial/path-params.md b/docs/em/docs/tutorial/path-params.md index e0d51a1df..daf5417eb 100644 --- a/docs/em/docs/tutorial/path-params.md +++ b/docs/em/docs/tutorial/path-params.md @@ -3,7 +3,7 @@ 👆 đŸ’Ș 📣 ➡ "🔱" ⚖ "🔱" âźïž 🎏 ❕ ⚙ 🐍 📁 đŸŽ»: ```Python hl_lines="6-7" -{!../../../docs_src/path_params/tutorial001.py!} +{!../../docs_src/path_params/tutorial001.py!} ``` đŸ’Č ➡ 🔱 `item_id` 🔜 đŸš¶â€â™€ïž 👆 🔱 ❌ `item_id`. @@ -19,7 +19,7 @@ 👆 đŸ’Ș 📣 🆎 ➡ 🔱 🔱, ⚙ đŸ© 🐍 🆎 ✍: ```Python hl_lines="7" -{!../../../docs_src/path_params/tutorial002.py!} +{!../../docs_src/path_params/tutorial002.py!} ``` 👉 đŸ’Œ, `item_id` 📣 `int`. @@ -122,7 +122,7 @@ ↩ *➡ đŸ› ïž* 🔬 ✔, 👆 đŸ’Ș ⚒ 💭 👈 ➡ `/users/me` 📣 ⏭ 1ïžâƒŁ `/users/{user_id}`: ```Python hl_lines="6 11" -{!../../../docs_src/path_params/tutorial003.py!} +{!../../docs_src/path_params/tutorial003.py!} ``` âȘ, ➡ `/users/{user_id}` 🔜 🏏 `/users/me`, "💭" 👈 ⚫ 📹 🔱 `user_id` âźïž đŸ’Č `"me"`. @@ -130,7 +130,7 @@ ➡, 👆 đŸš«đŸ”œ ↔ ➡ đŸ› ïž: ```Python hl_lines="6 11" -{!../../../docs_src/path_params/tutorial003b.py!} +{!../../docs_src/path_params/tutorial003b.py!} ``` đŸ„‡ 🕐 🔜 🕧 ⚙ ↩ ➡ 🏏 đŸ„‡. @@ -148,7 +148,7 @@ ‎ ✍ 🎓 🔱 âźïž 🔧 đŸ’Č, ❔ 🔜 đŸ’Ș ☑ đŸ’Č: ```Python hl_lines="1 6-9" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` /// info @@ -168,7 +168,7 @@ ‎ ✍ *➡ 🔱* âźïž 🆎 ✍ ⚙ 🔱 🎓 👆 ✍ (`ModelName`): ```Python hl_lines="16" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` ### ✅ đŸ©ș @@ -186,7 +186,7 @@ 👆 đŸ’Ș 🔬 ⚫ âźïž *🔱 👹‍🎓* 👆 ✍ 🔱 `ModelName`: ```Python hl_lines="17" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` #### đŸ€š *🔱 đŸ’Č* @@ -194,7 +194,7 @@ 👆 đŸ’Ș đŸ€š ☑ đŸ’Č ( `str` 👉 đŸ’Œ) ⚙ `model_name.value`, ⚖ 🏱, `your_enum_member.value`: ```Python hl_lines="20" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` /// tip @@ -210,7 +210,7 @@ đŸ‘« 🔜 🗜 đŸ‘« 🔗 đŸ’Č (đŸŽ» 👉 đŸ’Œ) ⏭ 🛬 đŸ‘« đŸ‘©â€đŸ’»: ```Python hl_lines="18 21 23" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` 👆 đŸ‘©â€đŸ’» 👆 🔜 đŸ€š đŸŽ» 📹 💖: @@ -251,7 +251,7 @@ , 👆 đŸ’Ș ⚙ ⚫ âźïž: ```Python hl_lines="6" -{!../../../docs_src/path_params/tutorial004.py!} +{!../../docs_src/path_params/tutorial004.py!} ``` /// tip diff --git a/docs/em/docs/tutorial/query-params-str-validations.md b/docs/em/docs/tutorial/query-params-str-validations.md index 23873155e..f75c0a26f 100644 --- a/docs/em/docs/tutorial/query-params-str-validations.md +++ b/docs/em/docs/tutorial/query-params-str-validations.md @@ -7,7 +7,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial001.py!} +{!> ../../docs_src/query_params_str_validations/tutorial001.py!} ``` //// @@ -15,7 +15,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial001_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial001_py310.py!} ``` //// @@ -41,7 +41,7 @@ FastAPI 🔜 💭 👈 đŸ’Č `q` đŸš« ✔ ↩ 🔱 đŸ’Č `= None`. //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="3" -{!> ../../../docs_src/query_params_str_validations/tutorial002.py!} +{!> ../../docs_src/query_params_str_validations/tutorial002.py!} ``` //// @@ -49,7 +49,7 @@ FastAPI 🔜 💭 👈 đŸ’Č `q` đŸš« ✔ ↩ 🔱 đŸ’Č `= None`. //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="1" -{!> ../../../docs_src/query_params_str_validations/tutorial002_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial002_py310.py!} ``` //// @@ -61,7 +61,7 @@ FastAPI 🔜 💭 👈 đŸ’Č `q` đŸš« ✔ ↩ 🔱 đŸ’Č `= None`. //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial002.py!} +{!> ../../docs_src/query_params_str_validations/tutorial002.py!} ``` //// @@ -69,7 +69,7 @@ FastAPI 🔜 💭 👈 đŸ’Č `q` đŸš« ✔ ↩ 🔱 đŸ’Č `= None`. //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial002_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial002_py310.py!} ``` //// @@ -137,7 +137,7 @@ q: Union[str, None] = Query(default=None, max_length=50) //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial003.py!} +{!> ../../docs_src/query_params_str_validations/tutorial003.py!} ``` //// @@ -145,7 +145,7 @@ q: Union[str, None] = Query(default=None, max_length=50) //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial003_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial003_py310.py!} ``` //// @@ -157,7 +157,7 @@ q: Union[str, None] = Query(default=None, max_length=50) //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="11" -{!> ../../../docs_src/query_params_str_validations/tutorial004.py!} +{!> ../../docs_src/query_params_str_validations/tutorial004.py!} ``` //// @@ -165,7 +165,7 @@ q: Union[str, None] = Query(default=None, max_length=50) //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial004_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial004_py310.py!} ``` //// @@ -187,7 +187,7 @@ q: Union[str, None] = Query(default=None, max_length=50) âžĄïž 💬 👈 👆 💚 📣 `q` 🔱 🔱 ✔ `min_length` `3`, & ✔ 🔱 đŸ’Č `"fixedquery"`: ```Python hl_lines="7" -{!../../../docs_src/query_params_str_validations/tutorial005.py!} +{!../../docs_src/query_params_str_validations/tutorial005.py!} ``` /// note @@ -219,7 +219,7 @@ q: Union[str, None] = Query(default=None, min_length=3) , 🕐❔ 👆 đŸ’Ș 📣 đŸ’Č ✔ âȘ ⚙ `Query`, 👆 đŸ’Ș 🎯 đŸš« 📣 🔱 đŸ’Č: ```Python hl_lines="7" -{!../../../docs_src/query_params_str_validations/tutorial006.py!} +{!../../docs_src/query_params_str_validations/tutorial006.py!} ``` ### ✔ âźïž ❕ (`...`) @@ -227,7 +227,7 @@ q: Union[str, None] = Query(default=None, min_length=3) đŸ“€ 🎛 🌌 🎯 📣 👈 đŸ’Č ✔. 👆 đŸ’Ș ⚒ `default` 🔱 🔑 đŸ’Č `...`: ```Python hl_lines="7" -{!../../../docs_src/query_params_str_validations/tutorial006b.py!} +{!../../docs_src/query_params_str_validations/tutorial006b.py!} ``` /// info @@ -249,7 +249,7 @@ q: Union[str, None] = Query(default=None, min_length=3) //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial006c.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006c.py!} ``` //// @@ -257,7 +257,7 @@ q: Union[str, None] = Query(default=None, min_length=3) //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial006c_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006c_py310.py!} ``` //// @@ -273,7 +273,7 @@ Pydantic, ❔ ⚫❔ đŸ‹ïž 🌐 đŸ’œ 🔬 & đŸ› ïž FastAPI, ✔ đŸš„ 👆 💭 😬 ⚙ `...`, 👆 đŸ’Ș 🗄 & ⚙ `Required` âšȘïžâžĄïž Pydantic: ```Python hl_lines="2 8" -{!../../../docs_src/query_params_str_validations/tutorial006d.py!} +{!../../docs_src/query_params_str_validations/tutorial006d.py!} ``` /// tip @@ -291,7 +291,7 @@ Pydantic, ❔ ⚫❔ đŸ‹ïž 🌐 đŸ’œ 🔬 & đŸ› ïž FastAPI, ✔ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial011.py!} +{!> ../../docs_src/query_params_str_validations/tutorial011.py!} ``` //// @@ -299,7 +299,7 @@ Pydantic, ❔ ⚫❔ đŸ‹ïž 🌐 đŸ’œ 🔬 & đŸ› ïž FastAPI, ✔ //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial011_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial011_py39.py!} ``` //// @@ -307,7 +307,7 @@ Pydantic, ❔ ⚫❔ đŸ‹ïž 🌐 đŸ’œ 🔬 & đŸ› ïž FastAPI, ✔ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial011_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial011_py310.py!} ``` //// @@ -348,7 +348,7 @@ http://localhost:8000/items/?q=foo&q=bar //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial012.py!} +{!> ../../docs_src/query_params_str_validations/tutorial012.py!} ``` //// @@ -356,7 +356,7 @@ http://localhost:8000/items/?q=foo&q=bar //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial012_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial012_py39.py!} ``` //// @@ -383,7 +383,7 @@ http://localhost:8000/items/ 👆 đŸ’Ș ⚙ `list` 🔗 ↩ `List[str]` (⚖ `list[str]` 🐍 3ïžâƒŁ.9ïžâƒŁ ➕): ```Python hl_lines="7" -{!../../../docs_src/query_params_str_validations/tutorial013.py!} +{!../../docs_src/query_params_str_validations/tutorial013.py!} ``` /// note @@ -413,7 +413,7 @@ http://localhost:8000/items/ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial007.py!} +{!> ../../docs_src/query_params_str_validations/tutorial007.py!} ``` //// @@ -421,7 +421,7 @@ http://localhost:8000/items/ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="8" -{!> ../../../docs_src/query_params_str_validations/tutorial007_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial007_py310.py!} ``` //// @@ -431,7 +431,7 @@ http://localhost:8000/items/ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="13" -{!> ../../../docs_src/query_params_str_validations/tutorial008.py!} +{!> ../../docs_src/query_params_str_validations/tutorial008.py!} ``` //// @@ -439,7 +439,7 @@ http://localhost:8000/items/ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="11" -{!> ../../../docs_src/query_params_str_validations/tutorial008_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial008_py310.py!} ``` //// @@ -465,7 +465,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial009.py!} +{!> ../../docs_src/query_params_str_validations/tutorial009.py!} ``` //// @@ -473,7 +473,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial009_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial009_py310.py!} ``` //// @@ -489,7 +489,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="18" -{!> ../../../docs_src/query_params_str_validations/tutorial010.py!} +{!> ../../docs_src/query_params_str_validations/tutorial010.py!} ``` //// @@ -497,7 +497,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="16" -{!> ../../../docs_src/query_params_str_validations/tutorial010_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial010_py310.py!} ``` //// @@ -513,7 +513,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial014.py!} +{!> ../../docs_src/query_params_str_validations/tutorial014.py!} ``` //// @@ -521,7 +521,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="8" -{!> ../../../docs_src/query_params_str_validations/tutorial014_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial014_py310.py!} ``` //// diff --git a/docs/em/docs/tutorial/query-params.md b/docs/em/docs/tutorial/query-params.md index 9bdab9e3c..c8432f182 100644 --- a/docs/em/docs/tutorial/query-params.md +++ b/docs/em/docs/tutorial/query-params.md @@ -3,7 +3,7 @@ 🕐❔ 👆 📣 🎏 🔱 🔱 👈 đŸš« 🍕 ➡ 🔱, đŸ‘« 🔁 🔬 "🔱" 🔱. ```Python hl_lines="9" -{!../../../docs_src/query_params/tutorial001.py!} +{!../../docs_src/query_params/tutorial001.py!} ``` 🔱 ⚒ 🔑-đŸ’Č đŸ‘« 👈 đŸš¶ âźïž `?` 📛, 🎏 `&` đŸŠč. @@ -66,7 +66,7 @@ http://127.0.0.1:8000/items/?skip=20 //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9" -{!> ../../../docs_src/query_params/tutorial002.py!} +{!> ../../docs_src/query_params/tutorial002.py!} ``` //// @@ -74,7 +74,7 @@ http://127.0.0.1:8000/items/?skip=20 //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="7" -{!> ../../../docs_src/query_params/tutorial002_py310.py!} +{!> ../../docs_src/query_params/tutorial002_py310.py!} ``` //// @@ -94,7 +94,7 @@ http://127.0.0.1:8000/items/?skip=20 //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9" -{!> ../../../docs_src/query_params/tutorial003.py!} +{!> ../../docs_src/query_params/tutorial003.py!} ``` //// @@ -102,7 +102,7 @@ http://127.0.0.1:8000/items/?skip=20 //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="7" -{!> ../../../docs_src/query_params/tutorial003_py310.py!} +{!> ../../docs_src/query_params/tutorial003_py310.py!} ``` //// @@ -151,7 +151,7 @@ http://127.0.0.1:8000/items/foo?short=yes //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="8 10" -{!> ../../../docs_src/query_params/tutorial004.py!} +{!> ../../docs_src/query_params/tutorial004.py!} ``` //// @@ -159,7 +159,7 @@ http://127.0.0.1:8000/items/foo?short=yes //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="6 8" -{!> ../../../docs_src/query_params/tutorial004_py310.py!} +{!> ../../docs_src/query_params/tutorial004_py310.py!} ``` //// @@ -173,7 +173,7 @@ http://127.0.0.1:8000/items/foo?short=yes ✋ 🕐❔ 👆 💚 ⚒ 🔱 🔱 ✔, 👆 đŸ’Ș đŸš« 📣 🙆 🔱 đŸ’Č: ```Python hl_lines="6-7" -{!../../../docs_src/query_params/tutorial005.py!} +{!../../docs_src/query_params/tutorial005.py!} ``` đŸ“„ 🔱 🔱 `needy` ✔ 🔱 🔱 🆎 `str`. @@ -221,7 +221,7 @@ http://127.0.0.1:8000/items/foo-item?needy=sooooneedy //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="10" -{!> ../../../docs_src/query_params/tutorial006.py!} +{!> ../../docs_src/query_params/tutorial006.py!} ``` //// @@ -229,7 +229,7 @@ http://127.0.0.1:8000/items/foo-item?needy=sooooneedy //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="8" -{!> ../../../docs_src/query_params/tutorial006_py310.py!} +{!> ../../docs_src/query_params/tutorial006_py310.py!} ``` //// diff --git a/docs/em/docs/tutorial/request-files.md b/docs/em/docs/tutorial/request-files.md index 010aa76bf..102690f4b 100644 --- a/docs/em/docs/tutorial/request-files.md +++ b/docs/em/docs/tutorial/request-files.md @@ -17,7 +17,7 @@ 🗄 `File` & `UploadFile` âšȘïžâžĄïž `fastapi`: ```Python hl_lines="1" -{!../../../docs_src/request_files/tutorial001.py!} +{!../../docs_src/request_files/tutorial001.py!} ``` ## 🔬 `File` 🔱 @@ -25,7 +25,7 @@ ✍ 📁 🔱 🎏 🌌 👆 🔜 `Body` ⚖ `Form`: ```Python hl_lines="7" -{!../../../docs_src/request_files/tutorial001.py!} +{!../../docs_src/request_files/tutorial001.py!} ``` /// info @@ -55,7 +55,7 @@ 🔬 📁 🔱 âźïž 🆎 `UploadFile`: ```Python hl_lines="12" -{!../../../docs_src/request_files/tutorial001.py!} +{!../../docs_src/request_files/tutorial001.py!} ``` ⚙ `UploadFile` ✔ 📚 📈 đŸ€­ `bytes`: @@ -142,7 +142,7 @@ contents = myfile.file.read() //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9 17" -{!> ../../../docs_src/request_files/tutorial001_02.py!} +{!> ../../docs_src/request_files/tutorial001_02.py!} ``` //// @@ -150,7 +150,7 @@ contents = myfile.file.read() //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="7 14" -{!> ../../../docs_src/request_files/tutorial001_02_py310.py!} +{!> ../../docs_src/request_files/tutorial001_02_py310.py!} ``` //// @@ -160,7 +160,7 @@ contents = myfile.file.read() 👆 đŸ’Ș ⚙ `File()` âźïž `UploadFile`, đŸ–Œ, ⚒ 🌖 🗃: ```Python hl_lines="13" -{!../../../docs_src/request_files/tutorial001_03.py!} +{!../../docs_src/request_files/tutorial001_03.py!} ``` ## 💗 📁 📂 @@ -174,7 +174,7 @@ contents = myfile.file.read() //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="10 15" -{!> ../../../docs_src/request_files/tutorial002.py!} +{!> ../../docs_src/request_files/tutorial002.py!} ``` //// @@ -182,7 +182,7 @@ contents = myfile.file.read() //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="8 13" -{!> ../../../docs_src/request_files/tutorial002_py39.py!} +{!> ../../docs_src/request_files/tutorial002_py39.py!} ``` //// @@ -204,7 +204,7 @@ contents = myfile.file.read() //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="18" -{!> ../../../docs_src/request_files/tutorial003.py!} +{!> ../../docs_src/request_files/tutorial003.py!} ``` //// @@ -212,7 +212,7 @@ contents = myfile.file.read() //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="16" -{!> ../../../docs_src/request_files/tutorial003_py39.py!} +{!> ../../docs_src/request_files/tutorial003_py39.py!} ``` //// diff --git a/docs/em/docs/tutorial/request-forms-and-files.md b/docs/em/docs/tutorial/request-forms-and-files.md index ab39d1b94..80793dae4 100644 --- a/docs/em/docs/tutorial/request-forms-and-files.md +++ b/docs/em/docs/tutorial/request-forms-and-files.md @@ -13,7 +13,7 @@ ## 🗄 `File` & `Form` ```Python hl_lines="1" -{!../../../docs_src/request_forms_and_files/tutorial001.py!} +{!../../docs_src/request_forms_and_files/tutorial001.py!} ``` ## 🔬 `File` & `Form` 🔱 @@ -21,7 +21,7 @@ ✍ 📁 & 📹 🔱 🎏 🌌 👆 🔜 `Body` ⚖ `Query`: ```Python hl_lines="8" -{!../../../docs_src/request_forms_and_files/tutorial001.py!} +{!../../docs_src/request_forms_and_files/tutorial001.py!} ``` 📁 & 📹 🏑 🔜 📂 📹 📊 & 👆 🔜 📹 📁 & 📹 🏑. diff --git a/docs/em/docs/tutorial/request-forms.md b/docs/em/docs/tutorial/request-forms.md index 74117c47d..cbe4e2862 100644 --- a/docs/em/docs/tutorial/request-forms.md +++ b/docs/em/docs/tutorial/request-forms.md @@ -15,7 +15,7 @@ 🗄 `Form` âšȘïžâžĄïž `fastapi`: ```Python hl_lines="1" -{!../../../docs_src/request_forms/tutorial001.py!} +{!../../docs_src/request_forms/tutorial001.py!} ``` ## 🔬 `Form` 🔱 @@ -23,7 +23,7 @@ ✍ 📹 🔱 🎏 🌌 👆 🔜 `Body` ⚖ `Query`: ```Python hl_lines="7" -{!../../../docs_src/request_forms/tutorial001.py!} +{!../../docs_src/request_forms/tutorial001.py!} ``` đŸ–Œ, 1ïžâƒŁ 🌌 Oauth2ïžâƒŁ 🔧 đŸ’Ș ⚙ (đŸ€™ "🔐 💧") ⚫ ✔ 📹 `username` & `password` 📹 🏑. diff --git a/docs/em/docs/tutorial/response-model.md b/docs/em/docs/tutorial/response-model.md index 9483508aa..fb5c17dd6 100644 --- a/docs/em/docs/tutorial/response-model.md +++ b/docs/em/docs/tutorial/response-model.md @@ -7,7 +7,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="18 23" -{!> ../../../docs_src/response_model/tutorial001_01.py!} +{!> ../../docs_src/response_model/tutorial001_01.py!} ``` //// @@ -15,7 +15,7 @@ //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="18 23" -{!> ../../../docs_src/response_model/tutorial001_01_py39.py!} +{!> ../../docs_src/response_model/tutorial001_01_py39.py!} ``` //// @@ -23,7 +23,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="16 21" -{!> ../../../docs_src/response_model/tutorial001_01_py310.py!} +{!> ../../docs_src/response_model/tutorial001_01_py310.py!} ``` //// @@ -62,7 +62,7 @@ FastAPI 🔜 ⚙ 👉 📹 🆎: //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="17 22 24-27" -{!> ../../../docs_src/response_model/tutorial001.py!} +{!> ../../docs_src/response_model/tutorial001.py!} ``` //// @@ -70,7 +70,7 @@ FastAPI 🔜 ⚙ 👉 📹 🆎: //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="17 22 24-27" -{!> ../../../docs_src/response_model/tutorial001_py39.py!} +{!> ../../docs_src/response_model/tutorial001_py39.py!} ``` //// @@ -78,7 +78,7 @@ FastAPI 🔜 ⚙ 👉 📹 🆎: //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="17 22 24-27" -{!> ../../../docs_src/response_model/tutorial001_py310.py!} +{!> ../../docs_src/response_model/tutorial001_py310.py!} ``` //// @@ -116,7 +116,7 @@ FastAPI 🔜 ⚙ 👉 `response_model` 🌐 đŸ’œ đŸ§Ÿ, 🔬, ♒. & ** //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9 11" -{!> ../../../docs_src/response_model/tutorial002.py!} +{!> ../../docs_src/response_model/tutorial002.py!} ``` //// @@ -124,7 +124,7 @@ FastAPI 🔜 ⚙ 👉 `response_model` 🌐 đŸ’œ đŸ§Ÿ, 🔬, ♒. & ** //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="7 9" -{!> ../../../docs_src/response_model/tutorial002_py310.py!} +{!> ../../docs_src/response_model/tutorial002_py310.py!} ``` //// @@ -143,7 +143,7 @@ FastAPI 🔜 ⚙ 👉 `response_model` 🌐 đŸ’œ đŸ§Ÿ, 🔬, ♒. & ** //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="18" -{!> ../../../docs_src/response_model/tutorial002.py!} +{!> ../../docs_src/response_model/tutorial002.py!} ``` //// @@ -151,7 +151,7 @@ FastAPI 🔜 ⚙ 👉 `response_model` 🌐 đŸ’œ đŸ§Ÿ, 🔬, ♒. & ** //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="16" -{!> ../../../docs_src/response_model/tutorial002_py310.py!} +{!> ../../docs_src/response_model/tutorial002_py310.py!} ``` //// @@ -175,7 +175,7 @@ FastAPI 🔜 ⚙ 👉 `response_model` 🌐 đŸ’œ đŸ§Ÿ, 🔬, ♒. & ** //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9 11 16" -{!> ../../../docs_src/response_model/tutorial003.py!} +{!> ../../docs_src/response_model/tutorial003.py!} ``` //// @@ -183,7 +183,7 @@ FastAPI 🔜 ⚙ 👉 `response_model` 🌐 đŸ’œ đŸ§Ÿ, 🔬, ♒. & ** //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="9 11 16" -{!> ../../../docs_src/response_model/tutorial003_py310.py!} +{!> ../../docs_src/response_model/tutorial003_py310.py!} ``` //// @@ -193,7 +193,7 @@ FastAPI 🔜 ⚙ 👉 `response_model` 🌐 đŸ’œ đŸ§Ÿ, 🔬, ♒. & ** //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="24" -{!> ../../../docs_src/response_model/tutorial003.py!} +{!> ../../docs_src/response_model/tutorial003.py!} ``` //// @@ -201,7 +201,7 @@ FastAPI 🔜 ⚙ 👉 `response_model` 🌐 đŸ’œ đŸ§Ÿ, 🔬, ♒. & ** //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="24" -{!> ../../../docs_src/response_model/tutorial003_py310.py!} +{!> ../../docs_src/response_model/tutorial003_py310.py!} ``` //// @@ -211,7 +211,7 @@ FastAPI 🔜 ⚙ 👉 `response_model` 🌐 đŸ’œ đŸ§Ÿ, 🔬, ♒. & ** //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="22" -{!> ../../../docs_src/response_model/tutorial003.py!} +{!> ../../docs_src/response_model/tutorial003.py!} ``` //// @@ -219,7 +219,7 @@ FastAPI 🔜 ⚙ 👉 `response_model` 🌐 đŸ’œ đŸ§Ÿ, 🔬, ♒. & ** //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="22" -{!> ../../../docs_src/response_model/tutorial003_py310.py!} +{!> ../../docs_src/response_model/tutorial003_py310.py!} ``` //// @@ -249,7 +249,7 @@ FastAPI 🔜 ⚙ 👉 `response_model` 🌐 đŸ’œ đŸ§Ÿ, 🔬, ♒. & ** //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9-13 15-16 20" -{!> ../../../docs_src/response_model/tutorial003_01.py!} +{!> ../../docs_src/response_model/tutorial003_01.py!} ``` //// @@ -257,7 +257,7 @@ FastAPI 🔜 ⚙ 👉 `response_model` 🌐 đŸ’œ đŸ§Ÿ, 🔬, ♒. & ** //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="7-10 13-14 18" -{!> ../../../docs_src/response_model/tutorial003_01_py310.py!} +{!> ../../docs_src/response_model/tutorial003_01_py310.py!} ``` //// @@ -303,7 +303,7 @@ FastAPI 🔹 📚 👜 🔘 âźïž Pydantic ⚒ 💭 👈 📚 🎏 đŸš« 🎓 🏆 ⚠ đŸ’Œ 🔜 [🛬 📹 🔗 🔬 âȘ 🏧 đŸ©ș](../advanced/response-directly.md){.internal-link target=_blank}. ```Python hl_lines="8 10-11" -{!> ../../../docs_src/response_model/tutorial003_02.py!} +{!> ../../docs_src/response_model/tutorial003_02.py!} ``` 👉 🙅 đŸ’Œ đŸ” 🔁 FastAPI ↩ 📹 🆎 ✍ 🎓 (⚖ 🏿) `Response`. @@ -315,7 +315,7 @@ FastAPI 🔹 📚 👜 🔘 âźïž Pydantic ⚒ 💭 👈 📚 🎏 đŸš« 🎓 👆 đŸ’Ș ⚙ 🏿 `Response` 🆎 ✍: ```Python hl_lines="8-9" -{!> ../../../docs_src/response_model/tutorial003_03.py!} +{!> ../../docs_src/response_model/tutorial003_03.py!} ``` 👉 🔜 đŸ‘· ↩ `RedirectResponse` 🏿 `Response`, & FastAPI 🔜 🔁 đŸ” 👉 🙅 đŸ’Œ. @@ -329,7 +329,7 @@ FastAPI 🔹 📚 👜 🔘 âźïž Pydantic ⚒ 💭 👈 📚 🎏 đŸš« 🎓 //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="10" -{!> ../../../docs_src/response_model/tutorial003_04.py!} +{!> ../../docs_src/response_model/tutorial003_04.py!} ``` //// @@ -337,7 +337,7 @@ FastAPI 🔹 📚 👜 🔘 âźïž Pydantic ⚒ 💭 👈 📚 🎏 đŸš« 🎓 //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="8" -{!> ../../../docs_src/response_model/tutorial003_04_py310.py!} +{!> ../../docs_src/response_model/tutorial003_04_py310.py!} ``` //// @@ -355,7 +355,7 @@ FastAPI 🔹 📚 👜 🔘 âźïž Pydantic ⚒ 💭 👈 📚 🎏 đŸš« 🎓 //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9" -{!> ../../../docs_src/response_model/tutorial003_05.py!} +{!> ../../docs_src/response_model/tutorial003_05.py!} ``` //// @@ -363,7 +363,7 @@ FastAPI 🔹 📚 👜 🔘 âźïž Pydantic ⚒ 💭 👈 📚 🎏 đŸš« 🎓 //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="7" -{!> ../../../docs_src/response_model/tutorial003_05_py310.py!} +{!> ../../docs_src/response_model/tutorial003_05_py310.py!} ``` //// @@ -377,7 +377,7 @@ FastAPI 🔹 📚 👜 🔘 âźïž Pydantic ⚒ 💭 👈 📚 🎏 đŸš« 🎓 //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="11 13-14" -{!> ../../../docs_src/response_model/tutorial004.py!} +{!> ../../docs_src/response_model/tutorial004.py!} ``` //// @@ -385,7 +385,7 @@ FastAPI 🔹 📚 👜 🔘 âźïž Pydantic ⚒ 💭 👈 📚 🎏 đŸš« 🎓 //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="11 13-14" -{!> ../../../docs_src/response_model/tutorial004_py39.py!} +{!> ../../docs_src/response_model/tutorial004_py39.py!} ``` //// @@ -393,7 +393,7 @@ FastAPI 🔹 📚 👜 🔘 âźïž Pydantic ⚒ 💭 👈 📚 🎏 đŸš« 🎓 //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="9 11-12" -{!> ../../../docs_src/response_model/tutorial004_py310.py!} +{!> ../../docs_src/response_model/tutorial004_py310.py!} ``` //// @@ -413,7 +413,7 @@ FastAPI 🔹 📚 👜 🔘 âźïž Pydantic ⚒ 💭 👈 📚 🎏 đŸš« 🎓 //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="24" -{!> ../../../docs_src/response_model/tutorial004.py!} +{!> ../../docs_src/response_model/tutorial004.py!} ``` //// @@ -421,7 +421,7 @@ FastAPI 🔹 📚 👜 🔘 âźïž Pydantic ⚒ 💭 👈 📚 🎏 đŸš« 🎓 //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="24" -{!> ../../../docs_src/response_model/tutorial004_py39.py!} +{!> ../../docs_src/response_model/tutorial004_py39.py!} ``` //// @@ -429,7 +429,7 @@ FastAPI 🔹 📚 👜 🔘 âźïž Pydantic ⚒ 💭 👈 📚 🎏 đŸš« 🎓 //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="22" -{!> ../../../docs_src/response_model/tutorial004_py310.py!} +{!> ../../docs_src/response_model/tutorial004_py310.py!} ``` //// @@ -524,7 +524,7 @@ FastAPI 🙃 đŸ„ƒ (đŸ€™, Pydantic 🙃 đŸ„ƒ) đŸ€” 👈, ✋ `description`, `t //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="31 37" -{!> ../../../docs_src/response_model/tutorial005.py!} +{!> ../../docs_src/response_model/tutorial005.py!} ``` //// @@ -532,7 +532,7 @@ FastAPI 🙃 đŸ„ƒ (đŸ€™, Pydantic 🙃 đŸ„ƒ) đŸ€” 👈, ✋ `description`, `t //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="29 35" -{!> ../../../docs_src/response_model/tutorial005_py310.py!} +{!> ../../docs_src/response_model/tutorial005_py310.py!} ``` //// @@ -552,7 +552,7 @@ FastAPI 🙃 đŸ„ƒ (đŸ€™, Pydantic 🙃 đŸ„ƒ) đŸ€” 👈, ✋ `description`, `t //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="31 37" -{!> ../../../docs_src/response_model/tutorial006.py!} +{!> ../../docs_src/response_model/tutorial006.py!} ``` //// @@ -560,7 +560,7 @@ FastAPI 🙃 đŸ„ƒ (đŸ€™, Pydantic 🙃 đŸ„ƒ) đŸ€” 👈, ✋ `description`, `t //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="29 35" -{!> ../../../docs_src/response_model/tutorial006_py310.py!} +{!> ../../docs_src/response_model/tutorial006_py310.py!} ``` //// diff --git a/docs/em/docs/tutorial/response-status-code.md b/docs/em/docs/tutorial/response-status-code.md index 57c44777a..cefff708f 100644 --- a/docs/em/docs/tutorial/response-status-code.md +++ b/docs/em/docs/tutorial/response-status-code.md @@ -9,7 +9,7 @@ * ♒. ```Python hl_lines="6" -{!../../../docs_src/response_status_code/tutorial001.py!} +{!../../docs_src/response_status_code/tutorial001.py!} ``` /// note @@ -77,7 +77,7 @@ FastAPI 💭 👉, & 🔜 🏭 🗄 đŸ©ș 👈 đŸ‡”đŸ‡ž đŸ“€ 🙅‍♂ 📹 âžĄïž 👀 âźïž đŸ–Œ 🔄: ```Python hl_lines="6" -{!../../../docs_src/response_status_code/tutorial001.py!} +{!../../docs_src/response_status_code/tutorial001.py!} ``` `201` 👔 📟 "✍". @@ -87,7 +87,7 @@ FastAPI 💭 👉, & 🔜 🏭 🗄 đŸ©ș 👈 đŸ‡”đŸ‡ž đŸ“€ 🙅‍♂ 📹 👆 đŸ’Ș ⚙ đŸȘ 🔱 âšȘïžâžĄïž `fastapi.status`. ```Python hl_lines="1 6" -{!../../../docs_src/response_status_code/tutorial002.py!} +{!../../docs_src/response_status_code/tutorial002.py!} ``` đŸ‘« đŸȘ, đŸ‘« đŸ§‘â€đŸ€â€đŸ§‘ 🎏 🔱, ✋ 👈 🌌 👆 đŸ’Ș ⚙ 👹‍🎹 📋 🔎 đŸ‘«: diff --git a/docs/em/docs/tutorial/schema-extra-example.md b/docs/em/docs/tutorial/schema-extra-example.md index 8562de09c..e4f877a8e 100644 --- a/docs/em/docs/tutorial/schema-extra-example.md +++ b/docs/em/docs/tutorial/schema-extra-example.md @@ -11,7 +11,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="15-23" -{!> ../../../docs_src/schema_extra_example/tutorial001.py!} +{!> ../../docs_src/schema_extra_example/tutorial001.py!} ``` //// @@ -19,7 +19,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="13-21" -{!> ../../../docs_src/schema_extra_example/tutorial001_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial001_py310.py!} ``` //// @@ -43,7 +43,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="4 10-13" -{!> ../../../docs_src/schema_extra_example/tutorial002.py!} +{!> ../../docs_src/schema_extra_example/tutorial002.py!} ``` //// @@ -51,7 +51,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="2 8-11" -{!> ../../../docs_src/schema_extra_example/tutorial002_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial002_py310.py!} ``` //// @@ -83,7 +83,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="20-25" -{!> ../../../docs_src/schema_extra_example/tutorial003.py!} +{!> ../../docs_src/schema_extra_example/tutorial003.py!} ``` //// @@ -91,7 +91,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="18-23" -{!> ../../../docs_src/schema_extra_example/tutorial003_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial003_py310.py!} ``` //// @@ -118,7 +118,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="21-47" -{!> ../../../docs_src/schema_extra_example/tutorial004.py!} +{!> ../../docs_src/schema_extra_example/tutorial004.py!} ``` //// @@ -126,7 +126,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="19-45" -{!> ../../../docs_src/schema_extra_example/tutorial004_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial004_py310.py!} ``` //// diff --git a/docs/em/docs/tutorial/security/first-steps.md b/docs/em/docs/tutorial/security/first-steps.md index 538ea7b0a..6245f52ab 100644 --- a/docs/em/docs/tutorial/security/first-steps.md +++ b/docs/em/docs/tutorial/security/first-steps.md @@ -21,7 +21,7 @@ 📁 đŸ–Œ 📁 `main.py`: ```Python -{!../../../docs_src/security/tutorial001.py!} +{!../../docs_src/security/tutorial001.py!} ``` ## 🏃 ⚫ @@ -129,7 +129,7 @@ Oauth2ïžâƒŁ 🔧 👈 đŸ‘©â€đŸ’» ⚖ đŸ› ïž đŸ’Ș 🔬 đŸ’œ 👈 🔓 đŸ‘© 🕐❔ đŸ‘„ ✍ 👐 `OAuth2PasswordBearer` 🎓 đŸ‘„ đŸš¶â€â™€ïž `tokenUrl` 🔱. 👉 🔱 🔌 📛 👈 đŸ‘©â€đŸ’» (🕾 🏃 đŸ‘©â€đŸ’» đŸ–„) 🔜 ⚙ 📹 `username` & `password` ✔ đŸ€š đŸ€. ```Python hl_lines="6" -{!../../../docs_src/security/tutorial001.py!} +{!../../docs_src/security/tutorial001.py!} ``` /// tip @@ -169,7 +169,7 @@ oauth2_scheme(some, parameters) 🔜 👆 đŸ’Ș đŸš¶â€â™€ïž 👈 `oauth2_scheme` 🔗 âźïž `Depends`. ```Python hl_lines="10" -{!../../../docs_src/security/tutorial001.py!} +{!../../docs_src/security/tutorial001.py!} ``` 👉 🔗 🔜 🚚 `str` 👈 đŸ› ïž 🔱 `token` *➡ đŸ› ïž 🔱*. diff --git a/docs/em/docs/tutorial/security/get-current-user.md b/docs/em/docs/tutorial/security/get-current-user.md index 15545f427..4e5b4ebfc 100644 --- a/docs/em/docs/tutorial/security/get-current-user.md +++ b/docs/em/docs/tutorial/security/get-current-user.md @@ -3,7 +3,7 @@ âźïž 📃 💂‍♂ ⚙ (❔ 🧱 🔛 🔗 💉 ⚙) đŸ€ *➡ đŸ› ïž 🔱* `token` `str`: ```Python hl_lines="10" -{!../../../docs_src/security/tutorial001.py!} +{!../../docs_src/security/tutorial001.py!} ``` ✋ 👈 đŸš« 👈 ⚠. @@ -19,7 +19,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="5 12-16" -{!> ../../../docs_src/security/tutorial002.py!} +{!> ../../docs_src/security/tutorial002.py!} ``` //// @@ -27,7 +27,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="3 10-14" -{!> ../../../docs_src/security/tutorial002_py310.py!} +{!> ../../docs_src/security/tutorial002_py310.py!} ``` //// @@ -45,7 +45,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="25" -{!> ../../../docs_src/security/tutorial002.py!} +{!> ../../docs_src/security/tutorial002.py!} ``` //// @@ -53,7 +53,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="23" -{!> ../../../docs_src/security/tutorial002_py310.py!} +{!> ../../docs_src/security/tutorial002_py310.py!} ``` //// @@ -65,7 +65,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="19-22 26-27" -{!> ../../../docs_src/security/tutorial002.py!} +{!> ../../docs_src/security/tutorial002.py!} ``` //// @@ -73,7 +73,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="17-20 24-25" -{!> ../../../docs_src/security/tutorial002_py310.py!} +{!> ../../docs_src/security/tutorial002_py310.py!} ``` //// @@ -85,7 +85,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="31" -{!> ../../../docs_src/security/tutorial002.py!} +{!> ../../docs_src/security/tutorial002.py!} ``` //// @@ -93,7 +93,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="29" -{!> ../../../docs_src/security/tutorial002_py310.py!} +{!> ../../docs_src/security/tutorial002_py310.py!} ``` //// @@ -153,7 +153,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="30-32" -{!> ../../../docs_src/security/tutorial002.py!} +{!> ../../docs_src/security/tutorial002.py!} ``` //// @@ -161,7 +161,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="28-30" -{!> ../../../docs_src/security/tutorial002_py310.py!} +{!> ../../docs_src/security/tutorial002_py310.py!} ``` //// diff --git a/docs/em/docs/tutorial/security/oauth2-jwt.md b/docs/em/docs/tutorial/security/oauth2-jwt.md index 3ab8cc986..95fa58f71 100644 --- a/docs/em/docs/tutorial/security/oauth2-jwt.md +++ b/docs/em/docs/tutorial/security/oauth2-jwt.md @@ -121,7 +121,7 @@ $ pip install "passlib[bcrypt]" //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="7 48 55-56 59-60 69-75" -{!> ../../../docs_src/security/tutorial004.py!} +{!> ../../docs_src/security/tutorial004.py!} ``` //// @@ -129,7 +129,7 @@ $ pip install "passlib[bcrypt]" //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="6 47 54-55 58-59 68-74" -{!> ../../../docs_src/security/tutorial004_py310.py!} +{!> ../../docs_src/security/tutorial004_py310.py!} ``` //// @@ -171,7 +171,7 @@ $ openssl rand -hex 32 //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="6 12-14 28-30 78-86" -{!> ../../../docs_src/security/tutorial004.py!} +{!> ../../docs_src/security/tutorial004.py!} ``` //// @@ -179,7 +179,7 @@ $ openssl rand -hex 32 //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="5 11-13 27-29 77-85" -{!> ../../../docs_src/security/tutorial004_py310.py!} +{!> ../../docs_src/security/tutorial004_py310.py!} ``` //// @@ -195,7 +195,7 @@ $ openssl rand -hex 32 //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="89-106" -{!> ../../../docs_src/security/tutorial004.py!} +{!> ../../docs_src/security/tutorial004.py!} ``` //// @@ -203,7 +203,7 @@ $ openssl rand -hex 32 //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="88-105" -{!> ../../../docs_src/security/tutorial004_py310.py!} +{!> ../../docs_src/security/tutorial004_py310.py!} ``` //// @@ -217,7 +217,7 @@ $ openssl rand -hex 32 //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="115-130" -{!> ../../../docs_src/security/tutorial004.py!} +{!> ../../docs_src/security/tutorial004.py!} ``` //// @@ -225,7 +225,7 @@ $ openssl rand -hex 32 //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="114-129" -{!> ../../../docs_src/security/tutorial004_py310.py!} +{!> ../../docs_src/security/tutorial004_py310.py!} ``` //// diff --git a/docs/em/docs/tutorial/security/simple-oauth2.md b/docs/em/docs/tutorial/security/simple-oauth2.md index 937546be8..43d928ce7 100644 --- a/docs/em/docs/tutorial/security/simple-oauth2.md +++ b/docs/em/docs/tutorial/security/simple-oauth2.md @@ -55,7 +55,7 @@ Oauth2ïžâƒŁ đŸ‘« đŸŽ». //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="4 76" -{!> ../../../docs_src/security/tutorial003.py!} +{!> ../../docs_src/security/tutorial003.py!} ``` //// @@ -63,7 +63,7 @@ Oauth2ïžâƒŁ đŸ‘« đŸŽ». //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="2 74" -{!> ../../../docs_src/security/tutorial003_py310.py!} +{!> ../../docs_src/security/tutorial003_py310.py!} ``` //// @@ -117,7 +117,7 @@ Oauth2ïžâƒŁ 🔌 đŸ€™ *🚚* 🏑 `grant_type` âźïž 🔧 đŸ’Č `password`, ✋ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="3 77-79" -{!> ../../../docs_src/security/tutorial003.py!} +{!> ../../docs_src/security/tutorial003.py!} ``` //// @@ -125,7 +125,7 @@ Oauth2ïžâƒŁ 🔌 đŸ€™ *🚚* 🏑 `grant_type` âźïž 🔧 đŸ’Č `password`, ✋ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="1 75-77" -{!> ../../../docs_src/security/tutorial003_py310.py!} +{!> ../../docs_src/security/tutorial003_py310.py!} ``` //// @@ -157,7 +157,7 @@ Oauth2ïžâƒŁ 🔌 đŸ€™ *🚚* 🏑 `grant_type` âźïž 🔧 đŸ’Č `password`, ✋ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="80-83" -{!> ../../../docs_src/security/tutorial003.py!} +{!> ../../docs_src/security/tutorial003.py!} ``` //// @@ -165,7 +165,7 @@ Oauth2ïžâƒŁ 🔌 đŸ€™ *🚚* 🏑 `grant_type` âźïž 🔧 đŸ’Č `password`, ✋ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="78-81" -{!> ../../../docs_src/security/tutorial003_py310.py!} +{!> ../../docs_src/security/tutorial003_py310.py!} ``` //// @@ -213,7 +213,7 @@ UserInDB( //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="85" -{!> ../../../docs_src/security/tutorial003.py!} +{!> ../../docs_src/security/tutorial003.py!} ``` //// @@ -221,7 +221,7 @@ UserInDB( //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="83" -{!> ../../../docs_src/security/tutorial003_py310.py!} +{!> ../../docs_src/security/tutorial003_py310.py!} ``` //// @@ -253,7 +253,7 @@ UserInDB( //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="58-66 69-72 90" -{!> ../../../docs_src/security/tutorial003.py!} +{!> ../../docs_src/security/tutorial003.py!} ``` //// @@ -261,7 +261,7 @@ UserInDB( //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="55-64 67-70 88" -{!> ../../../docs_src/security/tutorial003_py310.py!} +{!> ../../docs_src/security/tutorial003_py310.py!} ``` //// diff --git a/docs/em/docs/tutorial/sql-databases.md b/docs/em/docs/tutorial/sql-databases.md index 2492c8708..c59d8c131 100644 --- a/docs/em/docs/tutorial/sql-databases.md +++ b/docs/em/docs/tutorial/sql-databases.md @@ -110,13 +110,13 @@ $ pip install sqlalchemy ### 🗄 🇾đŸ‡Č 🍕 ```Python hl_lines="1-3" -{!../../../docs_src/sql_databases/sql_app/database.py!} +{!../../docs_src/sql_databases/sql_app/database.py!} ``` ### ✍ đŸ’œ 📛 🇾đŸ‡Č ```Python hl_lines="5-6" -{!../../../docs_src/sql_databases/sql_app/database.py!} +{!../../docs_src/sql_databases/sql_app/database.py!} ``` 👉 đŸ–Œ, đŸ‘„ "🔗" 🗄 đŸ’œ (📂 📁 âźïž 🗄 đŸ’œ). @@ -146,7 +146,7 @@ SQLALCHEMY_DATABASE_URL = "postgresql://user:password@postgresserver/db" đŸ‘„ 🔜 âȘ ⚙ 👉 `engine` 🎏 đŸ„‰. ```Python hl_lines="8-10" -{!../../../docs_src/sql_databases/sql_app/database.py!} +{!../../docs_src/sql_databases/sql_app/database.py!} ``` #### 🗒 @@ -184,7 +184,7 @@ connect_args={"check_same_thread": False} ✍ `SessionLocal` 🎓, ⚙ 🔱 `sessionmaker`: ```Python hl_lines="11" -{!../../../docs_src/sql_databases/sql_app/database.py!} +{!../../docs_src/sql_databases/sql_app/database.py!} ``` ### ✍ `Base` 🎓 @@ -194,7 +194,7 @@ connect_args={"check_same_thread": False} âȘ đŸ‘„ 🔜 😖 âšȘïžâžĄïž 👉 🎓 ✍ 🔠 đŸ’œ đŸ· ⚖ 🎓 (🐜 đŸ·): ```Python hl_lines="13" -{!../../../docs_src/sql_databases/sql_app/database.py!} +{!../../docs_src/sql_databases/sql_app/database.py!} ``` ## ✍ đŸ’œ đŸ· @@ -220,7 +220,7 @@ connect_args={"check_same_thread": False} đŸ‘« 🎓 🇾đŸ‡Č đŸ·. ```Python hl_lines="4 7-8 18-19" -{!../../../docs_src/sql_databases/sql_app/models.py!} +{!../../docs_src/sql_databases/sql_app/models.py!} ``` `__tablename__` 🔱 💬 🇾đŸ‡Č 📛 🏓 ⚙ đŸ’œ 🔠 đŸ‘« đŸ·. @@ -236,7 +236,7 @@ connect_args={"check_same_thread": False} & đŸ‘„ đŸš¶â€â™€ïž 🇾đŸ‡Č 🎓 "🆎", `Integer`, `String`, & `Boolean`, 👈 🔬 🆎 đŸ’œ, ❌. ```Python hl_lines="1 10-13 21-24" -{!../../../docs_src/sql_databases/sql_app/models.py!} +{!../../docs_src/sql_databases/sql_app/models.py!} ``` ### ✍ 💛 @@ -248,7 +248,7 @@ connect_args={"check_same_thread": False} 👉 🔜 ▶, 🌅 ⚖ 🌘, "đŸŽ±" 🔱 👈 🔜 🔌 đŸ’Č âšȘïžâžĄïž 🎏 🏓 🔗 👉 1ïžâƒŁ. ```Python hl_lines="2 15 26" -{!../../../docs_src/sql_databases/sql_app/models.py!} +{!../../docs_src/sql_databases/sql_app/models.py!} ``` 🕐❔ 🔐 🔱 `items` `User`, `my_user.items`, ⚫ 🔜 ✔ 📇 `Item` 🇾đŸ‡Č đŸ· (âšȘïžâžĄïž `items` 🏓) 👈 ✔ đŸ’± 🔑 ☝ 👉 âș `users` 🏓. @@ -284,7 +284,7 @@ connect_args={"check_same_thread": False} //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="3 6-8 11-12 23-24 27-28" -{!> ../../../docs_src/sql_databases/sql_app/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app/schemas.py!} ``` //// @@ -292,7 +292,7 @@ connect_args={"check_same_thread": False} //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="3 6-8 11-12 23-24 27-28" -{!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/schemas.py!} ``` //// @@ -300,7 +300,7 @@ connect_args={"check_same_thread": False} //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="1 4-6 9-10 21-22 25-26" -{!> ../../../docs_src/sql_databases/sql_app_py310/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app_py310/schemas.py!} ``` //// @@ -334,7 +334,7 @@ name: str //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="15-17 31-34" -{!> ../../../docs_src/sql_databases/sql_app/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app/schemas.py!} ``` //// @@ -342,7 +342,7 @@ name: str //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="15-17 31-34" -{!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/schemas.py!} ``` //// @@ -350,7 +350,7 @@ name: str //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="13-15 29-32" -{!> ../../../docs_src/sql_databases/sql_app_py310/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app_py310/schemas.py!} ``` //// @@ -372,7 +372,7 @@ name: str //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="15 19-20 31 36-37" -{!> ../../../docs_src/sql_databases/sql_app/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app/schemas.py!} ``` //// @@ -380,7 +380,7 @@ name: str //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="15 19-20 31 36-37" -{!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/schemas.py!} ``` //// @@ -388,7 +388,7 @@ name: str //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python hl_lines="13 17-18 29 34-35" -{!> ../../../docs_src/sql_databases/sql_app_py310/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app_py310/schemas.py!} ``` //// @@ -466,7 +466,7 @@ current_user.items * ✍ 💗 🏬. ```Python hl_lines="1 3 6-7 10-11 14-15 27-28" -{!../../../docs_src/sql_databases/sql_app/crud.py!} +{!../../docs_src/sql_databases/sql_app/crud.py!} ``` /// tip @@ -487,7 +487,7 @@ current_user.items * `refresh` 👆 👐 (👈 ⚫ 🔌 🙆 🆕 📊 âšȘïžâžĄïž đŸ’œ, 💖 🏗 🆔). ```Python hl_lines="18-24 31-36" -{!../../../docs_src/sql_databases/sql_app/crud.py!} +{!../../docs_src/sql_databases/sql_app/crud.py!} ``` /// tip @@ -539,7 +539,7 @@ current_user.items //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="9" -{!> ../../../docs_src/sql_databases/sql_app/main.py!} +{!> ../../docs_src/sql_databases/sql_app/main.py!} ``` //// @@ -547,7 +547,7 @@ current_user.items //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="7" -{!> ../../../docs_src/sql_databases/sql_app_py39/main.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/main.py!} ``` //// @@ -577,7 +577,7 @@ current_user.items //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="15-20" -{!> ../../../docs_src/sql_databases/sql_app/main.py!} +{!> ../../docs_src/sql_databases/sql_app/main.py!} ``` //// @@ -585,7 +585,7 @@ current_user.items //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="13-18" -{!> ../../../docs_src/sql_databases/sql_app_py39/main.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/main.py!} ``` //// @@ -609,7 +609,7 @@ current_user.items //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="24 32 38 47 53" -{!> ../../../docs_src/sql_databases/sql_app/main.py!} +{!> ../../docs_src/sql_databases/sql_app/main.py!} ``` //// @@ -617,7 +617,7 @@ current_user.items //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="22 30 36 45 51" -{!> ../../../docs_src/sql_databases/sql_app_py39/main.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/main.py!} ``` //// @@ -637,7 +637,7 @@ current_user.items //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="23-28 31-34 37-42 45-49 52-55" -{!> ../../../docs_src/sql_databases/sql_app/main.py!} +{!> ../../docs_src/sql_databases/sql_app/main.py!} ``` //// @@ -645,7 +645,7 @@ current_user.items //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="21-26 29-32 35-40 43-47 50-53" -{!> ../../../docs_src/sql_databases/sql_app_py39/main.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/main.py!} ``` //// @@ -732,13 +732,13 @@ def read_user(user_id: int, db: Session = Depends(get_db)): * `sql_app/database.py`: ```Python -{!../../../docs_src/sql_databases/sql_app/database.py!} +{!../../docs_src/sql_databases/sql_app/database.py!} ``` * `sql_app/models.py`: ```Python -{!../../../docs_src/sql_databases/sql_app/models.py!} +{!../../docs_src/sql_databases/sql_app/models.py!} ``` * `sql_app/schemas.py`: @@ -746,7 +746,7 @@ def read_user(user_id: int, db: Session = Depends(get_db)): //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python -{!> ../../../docs_src/sql_databases/sql_app/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app/schemas.py!} ``` //// @@ -754,7 +754,7 @@ def read_user(user_id: int, db: Session = Depends(get_db)): //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python -{!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/schemas.py!} ``` //// @@ -762,7 +762,7 @@ def read_user(user_id: int, db: Session = Depends(get_db)): //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python -{!> ../../../docs_src/sql_databases/sql_app_py310/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app_py310/schemas.py!} ``` //// @@ -770,7 +770,7 @@ def read_user(user_id: int, db: Session = Depends(get_db)): * `sql_app/crud.py`: ```Python -{!../../../docs_src/sql_databases/sql_app/crud.py!} +{!../../docs_src/sql_databases/sql_app/crud.py!} ``` * `sql_app/main.py`: @@ -778,7 +778,7 @@ def read_user(user_id: int, db: Session = Depends(get_db)): //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python -{!> ../../../docs_src/sql_databases/sql_app/main.py!} +{!> ../../docs_src/sql_databases/sql_app/main.py!} ``` //// @@ -786,7 +786,7 @@ def read_user(user_id: int, db: Session = Depends(get_db)): //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python -{!> ../../../docs_src/sql_databases/sql_app_py39/main.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/main.py!} ``` //// @@ -843,7 +843,7 @@ $ uvicorn sql_app.main:app --reload //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python hl_lines="14-22" -{!> ../../../docs_src/sql_databases/sql_app/alt_main.py!} +{!> ../../docs_src/sql_databases/sql_app/alt_main.py!} ``` //// @@ -851,7 +851,7 @@ $ uvicorn sql_app.main:app --reload //// tab | 🐍 3ïžâƒŁ.9ïžâƒŁ & 🔛 ```Python hl_lines="12-20" -{!> ../../../docs_src/sql_databases/sql_app_py39/alt_main.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/alt_main.py!} ``` //// diff --git a/docs/em/docs/tutorial/static-files.md b/docs/em/docs/tutorial/static-files.md index 3305746c2..0627031b3 100644 --- a/docs/em/docs/tutorial/static-files.md +++ b/docs/em/docs/tutorial/static-files.md @@ -8,7 +8,7 @@ * "đŸ—»" `StaticFiles()` 👐 🎯 ➡. ```Python hl_lines="2 6" -{!../../../docs_src/static_files/tutorial001.py!} +{!../../docs_src/static_files/tutorial001.py!} ``` /// note | "📡 â„č" diff --git a/docs/em/docs/tutorial/testing.md b/docs/em/docs/tutorial/testing.md index 75dd2d295..5f3d5e736 100644 --- a/docs/em/docs/tutorial/testing.md +++ b/docs/em/docs/tutorial/testing.md @@ -27,7 +27,7 @@ ✍ 🙅 `assert` 📄 âźïž đŸ© 🐍 🧬 👈 👆 đŸ’Ș ✅ (🔄, đŸ© `pytest`). ```Python hl_lines="2 12 15-18" -{!../../../docs_src/app_testing/tutorial001.py!} +{!../../docs_src/app_testing/tutorial001.py!} ``` /// tip @@ -75,7 +75,7 @@ ```Python -{!../../../docs_src/app_testing/main.py!} +{!../../docs_src/app_testing/main.py!} ``` ### 🔬 📁 @@ -93,7 +93,7 @@ ↩ 👉 📁 🎏 📩, 👆 đŸ’Ș ⚙ ⚖ 🗄 🗄 🎚 `app` âšȘïžâžĄïž `main` đŸ•č (`main.py`): ```Python hl_lines="3" -{!../../../docs_src/app_testing/test_main.py!} +{!../../docs_src/app_testing/test_main.py!} ``` ...& ✔ 📟 💯 💖 ⏭. @@ -125,7 +125,7 @@ //// tab | 🐍 3ïžâƒŁ.6ïžâƒŁ & 🔛 ```Python -{!> ../../../docs_src/app_testing/app_b/main.py!} +{!> ../../docs_src/app_testing/app_b/main.py!} ``` //// @@ -133,7 +133,7 @@ //// tab | 🐍 3ïžâƒŁ.1ïžâƒŁ0ïžâƒŁ & 🔛 ```Python -{!> ../../../docs_src/app_testing/app_b_py310/main.py!} +{!> ../../docs_src/app_testing/app_b_py310/main.py!} ``` //// @@ -143,7 +143,7 @@ 👆 đŸ’Ș ‎ â„č `test_main.py` âźïž ↔ 💯: ```Python -{!> ../../../docs_src/app_testing/app_b/test_main.py!} +{!> ../../docs_src/app_testing/app_b/test_main.py!} ``` 🕐❔ 👆 đŸ’Ș đŸ‘©â€đŸ’» đŸš¶â€â™€ïž â„č 📹 & 👆 đŸš« 💭 ❔, 👆 đŸ’Ș 🔎 (đŸ‡ș🇾🔍) ❔ ⚫ `httpx`, ⚖ ❔ ⚫ âźïž `requests`, 🇾đŸ‡Č 🔧 ⚓ 🔛 📹' 🔧. diff --git a/docs/en/docs/advanced/additional-responses.md b/docs/en/docs/advanced/additional-responses.md index 4fec41213..c038096f9 100644 --- a/docs/en/docs/advanced/additional-responses.md +++ b/docs/en/docs/advanced/additional-responses.md @@ -27,7 +27,7 @@ Each of those response `dict`s can have a key `model`, containing a Pydantic mod For example, to declare another response with a status code `404` and a Pydantic model `Message`, you can write: ```Python hl_lines="18 22" -{!../../../docs_src/additional_responses/tutorial001.py!} +{!../../docs_src/additional_responses/tutorial001.py!} ``` /// note @@ -178,7 +178,7 @@ You can use this same `responses` parameter to add different media types for the For example, you can add an additional media type of `image/png`, declaring that your *path operation* can return a JSON object (with media type `application/json`) or a PNG image: ```Python hl_lines="19-24 28" -{!../../../docs_src/additional_responses/tutorial002.py!} +{!../../docs_src/additional_responses/tutorial002.py!} ``` /// note @@ -208,7 +208,7 @@ For example, you can declare a response with a status code `404` that uses a Pyd And a response with a status code `200` that uses your `response_model`, but includes a custom `example`: ```Python hl_lines="20-31" -{!../../../docs_src/additional_responses/tutorial003.py!} +{!../../docs_src/additional_responses/tutorial003.py!} ``` It will all be combined and included in your OpenAPI, and shown in the API docs: @@ -244,7 +244,7 @@ You can use that technique to reuse some predefined responses in your *path oper For example: ```Python hl_lines="13-17 26" -{!../../../docs_src/additional_responses/tutorial004.py!} +{!../../docs_src/additional_responses/tutorial004.py!} ``` ## More information about OpenAPI responses diff --git a/docs/en/docs/advanced/additional-status-codes.md b/docs/en/docs/advanced/additional-status-codes.md index 99ad72b53..6105a301c 100644 --- a/docs/en/docs/advanced/additional-status-codes.md +++ b/docs/en/docs/advanced/additional-status-codes.md @@ -17,7 +17,7 @@ To achieve that, import `JSONResponse`, and return your content there directly, //// tab | Python 3.10+ ```Python hl_lines="4 25" -{!> ../../../docs_src/additional_status_codes/tutorial001_an_py310.py!} +{!> ../../docs_src/additional_status_codes/tutorial001_an_py310.py!} ``` //// @@ -25,7 +25,7 @@ To achieve that, import `JSONResponse`, and return your content there directly, //// tab | Python 3.9+ ```Python hl_lines="4 25" -{!> ../../../docs_src/additional_status_codes/tutorial001_an_py39.py!} +{!> ../../docs_src/additional_status_codes/tutorial001_an_py39.py!} ``` //// @@ -33,7 +33,7 @@ To achieve that, import `JSONResponse`, and return your content there directly, //// tab | Python 3.8+ ```Python hl_lines="4 26" -{!> ../../../docs_src/additional_status_codes/tutorial001_an.py!} +{!> ../../docs_src/additional_status_codes/tutorial001_an.py!} ``` //// @@ -47,7 +47,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="2 23" -{!> ../../../docs_src/additional_status_codes/tutorial001_py310.py!} +{!> ../../docs_src/additional_status_codes/tutorial001_py310.py!} ``` //// @@ -61,7 +61,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="4 25" -{!> ../../../docs_src/additional_status_codes/tutorial001.py!} +{!> ../../docs_src/additional_status_codes/tutorial001.py!} ``` //// diff --git a/docs/en/docs/advanced/advanced-dependencies.md b/docs/en/docs/advanced/advanced-dependencies.md index f65e1b180..b15a4fe3d 100644 --- a/docs/en/docs/advanced/advanced-dependencies.md +++ b/docs/en/docs/advanced/advanced-dependencies.md @@ -21,7 +21,7 @@ To do that, we declare a method `__call__`: //// tab | Python 3.9+ ```Python hl_lines="12" -{!> ../../../docs_src/dependencies/tutorial011_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial011_an_py39.py!} ``` //// @@ -29,7 +29,7 @@ To do that, we declare a method `__call__`: //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/dependencies/tutorial011_an.py!} +{!> ../../docs_src/dependencies/tutorial011_an.py!} ``` //// @@ -43,7 +43,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="10" -{!> ../../../docs_src/dependencies/tutorial011.py!} +{!> ../../docs_src/dependencies/tutorial011.py!} ``` //// @@ -57,7 +57,7 @@ And now, we can use `__init__` to declare the parameters of the instance that we //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/dependencies/tutorial011_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial011_an_py39.py!} ``` //// @@ -65,7 +65,7 @@ And now, we can use `__init__` to declare the parameters of the instance that we //// tab | Python 3.8+ ```Python hl_lines="8" -{!> ../../../docs_src/dependencies/tutorial011_an.py!} +{!> ../../docs_src/dependencies/tutorial011_an.py!} ``` //// @@ -79,7 +79,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7" -{!> ../../../docs_src/dependencies/tutorial011.py!} +{!> ../../docs_src/dependencies/tutorial011.py!} ``` //// @@ -93,7 +93,7 @@ We could create an instance of this class with: //// tab | Python 3.9+ ```Python hl_lines="18" -{!> ../../../docs_src/dependencies/tutorial011_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial011_an_py39.py!} ``` //// @@ -101,7 +101,7 @@ We could create an instance of this class with: //// tab | Python 3.8+ ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial011_an.py!} +{!> ../../docs_src/dependencies/tutorial011_an.py!} ``` //// @@ -115,7 +115,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="16" -{!> ../../../docs_src/dependencies/tutorial011.py!} +{!> ../../docs_src/dependencies/tutorial011.py!} ``` //// @@ -137,7 +137,7 @@ checker(q="somequery") //// tab | Python 3.9+ ```Python hl_lines="22" -{!> ../../../docs_src/dependencies/tutorial011_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial011_an_py39.py!} ``` //// @@ -145,7 +145,7 @@ checker(q="somequery") //// tab | Python 3.8+ ```Python hl_lines="21" -{!> ../../../docs_src/dependencies/tutorial011_an.py!} +{!> ../../docs_src/dependencies/tutorial011_an.py!} ``` //// @@ -159,7 +159,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="20" -{!> ../../../docs_src/dependencies/tutorial011.py!} +{!> ../../docs_src/dependencies/tutorial011.py!} ``` //// diff --git a/docs/en/docs/advanced/async-tests.md b/docs/en/docs/advanced/async-tests.md index a528c80fe..232cd6e57 100644 --- a/docs/en/docs/advanced/async-tests.md +++ b/docs/en/docs/advanced/async-tests.md @@ -33,13 +33,13 @@ For a simple example, let's consider a file structure similar to the one describ The file `main.py` would have: ```Python -{!../../../docs_src/async_tests/main.py!} +{!../../docs_src/async_tests/main.py!} ``` The file `test_main.py` would have the tests for `main.py`, it could look like this now: ```Python -{!../../../docs_src/async_tests/test_main.py!} +{!../../docs_src/async_tests/test_main.py!} ``` ## Run it @@ -61,7 +61,7 @@ $ pytest The marker `@pytest.mark.anyio` tells pytest that this test function should be called asynchronously: ```Python hl_lines="7" -{!../../../docs_src/async_tests/test_main.py!} +{!../../docs_src/async_tests/test_main.py!} ``` /// tip @@ -73,7 +73,7 @@ Note that the test function is now `async def` instead of just `def` as before w Then we can create an `AsyncClient` with the app, and send async requests to it, using `await`. ```Python hl_lines="9-12" -{!../../../docs_src/async_tests/test_main.py!} +{!../../docs_src/async_tests/test_main.py!} ``` This is the equivalent to: diff --git a/docs/en/docs/advanced/behind-a-proxy.md b/docs/en/docs/advanced/behind-a-proxy.md index e642b1910..67718a27b 100644 --- a/docs/en/docs/advanced/behind-a-proxy.md +++ b/docs/en/docs/advanced/behind-a-proxy.md @@ -19,7 +19,7 @@ In this case, the original path `/app` would actually be served at `/api/v1/app` Even though all your code is written assuming there's just `/app`. ```Python hl_lines="6" -{!../../../docs_src/behind_a_proxy/tutorial001.py!} +{!../../docs_src/behind_a_proxy/tutorial001.py!} ``` And the proxy would be **"stripping"** the **path prefix** on the fly before transmitting the request to the app server (probably Uvicorn via FastAPI CLI), keeping your application convinced that it is being served at `/app`, so that you don't have to update all your code to include the prefix `/api/v1`. @@ -99,7 +99,7 @@ You can get the current `root_path` used by your application for each request, i Here we are including it in the message just for demonstration purposes. ```Python hl_lines="8" -{!../../../docs_src/behind_a_proxy/tutorial001.py!} +{!../../docs_src/behind_a_proxy/tutorial001.py!} ``` Then, if you start Uvicorn with: @@ -128,7 +128,7 @@ The response would be something like: Alternatively, if you don't have a way to provide a command line option like `--root-path` or equivalent, you can set the `root_path` parameter when creating your FastAPI app: ```Python hl_lines="3" -{!../../../docs_src/behind_a_proxy/tutorial002.py!} +{!../../docs_src/behind_a_proxy/tutorial002.py!} ``` Passing the `root_path` to `FastAPI` would be the equivalent of passing the `--root-path` command line option to Uvicorn or Hypercorn. @@ -310,7 +310,7 @@ If you pass a custom list of `servers` and there's a `root_path` (because your A For example: ```Python hl_lines="4-7" -{!../../../docs_src/behind_a_proxy/tutorial003.py!} +{!../../docs_src/behind_a_proxy/tutorial003.py!} ``` Will generate an OpenAPI schema like: @@ -359,7 +359,7 @@ The docs UI will interact with the server that you select. If you don't want **FastAPI** to include an automatic server using the `root_path`, you can use the parameter `root_path_in_servers=False`: ```Python hl_lines="9" -{!../../../docs_src/behind_a_proxy/tutorial004.py!} +{!../../docs_src/behind_a_proxy/tutorial004.py!} ``` and then it won't include it in the OpenAPI schema. diff --git a/docs/en/docs/advanced/custom-response.md b/docs/en/docs/advanced/custom-response.md index 1cefe979f..1d6dc3f6d 100644 --- a/docs/en/docs/advanced/custom-response.md +++ b/docs/en/docs/advanced/custom-response.md @@ -31,7 +31,7 @@ This is because by default, FastAPI will inspect every item inside and make sure But if you are certain that the content that you are returning is **serializable with JSON**, you can pass it directly to the response class and avoid the extra overhead that FastAPI would have by passing your return content through the `jsonable_encoder` before passing it to the response class. ```Python hl_lines="2 7" -{!../../../docs_src/custom_response/tutorial001b.py!} +{!../../docs_src/custom_response/tutorial001b.py!} ``` /// info @@ -58,7 +58,7 @@ To return a response with HTML directly from **FastAPI**, use `HTMLResponse`. * Pass `HTMLResponse` as the parameter `response_class` of your *path operation decorator*. ```Python hl_lines="2 7" -{!../../../docs_src/custom_response/tutorial002.py!} +{!../../docs_src/custom_response/tutorial002.py!} ``` /// info @@ -78,7 +78,7 @@ As seen in [Return a Response directly](response-directly.md){.internal-link tar The same example from above, returning an `HTMLResponse`, could look like: ```Python hl_lines="2 7 19" -{!../../../docs_src/custom_response/tutorial003.py!} +{!../../docs_src/custom_response/tutorial003.py!} ``` /// warning @@ -104,7 +104,7 @@ The `response_class` will then be used only to document the OpenAPI *path operat For example, it could be something like: ```Python hl_lines="7 21 23" -{!../../../docs_src/custom_response/tutorial004.py!} +{!../../docs_src/custom_response/tutorial004.py!} ``` In this example, the function `generate_html_response()` already generates and returns a `Response` instead of returning the HTML in a `str`. @@ -145,7 +145,7 @@ It accepts the following parameters: FastAPI (actually Starlette) will automatically include a Content-Length header. It will also include a Content-Type header, based on the `media_type` and appending a charset for text types. ```Python hl_lines="1 18" -{!../../../docs_src/response_directly/tutorial002.py!} +{!../../docs_src/response_directly/tutorial002.py!} ``` ### `HTMLResponse` @@ -157,7 +157,7 @@ Takes some text or bytes and returns an HTML response, as you read above. Takes some text or bytes and returns a plain text response. ```Python hl_lines="2 7 9" -{!../../../docs_src/custom_response/tutorial005.py!} +{!../../docs_src/custom_response/tutorial005.py!} ``` ### `JSONResponse` @@ -193,7 +193,7 @@ This requires installing `ujson` for example with `pip install ujson`. /// ```Python hl_lines="2 7" -{!../../../docs_src/custom_response/tutorial001.py!} +{!../../docs_src/custom_response/tutorial001.py!} ``` /// tip @@ -209,7 +209,7 @@ Returns an HTTP redirect. Uses a 307 status code (Temporary Redirect) by default You can return a `RedirectResponse` directly: ```Python hl_lines="2 9" -{!../../../docs_src/custom_response/tutorial006.py!} +{!../../docs_src/custom_response/tutorial006.py!} ``` --- @@ -218,7 +218,7 @@ Or you can use it in the `response_class` parameter: ```Python hl_lines="2 7 9" -{!../../../docs_src/custom_response/tutorial006b.py!} +{!../../docs_src/custom_response/tutorial006b.py!} ``` If you do that, then you can return the URL directly from your *path operation* function. @@ -230,7 +230,7 @@ In this case, the `status_code` used will be the default one for the `RedirectRe You can also use the `status_code` parameter combined with the `response_class` parameter: ```Python hl_lines="2 7 9" -{!../../../docs_src/custom_response/tutorial006c.py!} +{!../../docs_src/custom_response/tutorial006c.py!} ``` ### `StreamingResponse` @@ -238,7 +238,7 @@ You can also use the `status_code` parameter combined with the `response_class` Takes an async generator or a normal generator/iterator and streams the response body. ```Python hl_lines="2 14" -{!../../../docs_src/custom_response/tutorial007.py!} +{!../../docs_src/custom_response/tutorial007.py!} ``` #### Using `StreamingResponse` with file-like objects @@ -250,7 +250,7 @@ That way, you don't have to read it all first in memory, and you can pass that g This includes many libraries to interact with cloud storage, video processing, and others. ```{ .python .annotate hl_lines="2 10-12 14" } -{!../../../docs_src/custom_response/tutorial008.py!} +{!../../docs_src/custom_response/tutorial008.py!} ``` 1. This is the generator function. It's a "generator function" because it contains `yield` statements inside. @@ -281,13 +281,13 @@ Takes a different set of arguments to instantiate than the other response types: File responses will include appropriate `Content-Length`, `Last-Modified` and `ETag` headers. ```Python hl_lines="2 10" -{!../../../docs_src/custom_response/tutorial009.py!} +{!../../docs_src/custom_response/tutorial009.py!} ``` You can also use the `response_class` parameter: ```Python hl_lines="2 8 10" -{!../../../docs_src/custom_response/tutorial009b.py!} +{!../../docs_src/custom_response/tutorial009b.py!} ``` In this case, you can return the file path directly from your *path operation* function. @@ -303,7 +303,7 @@ Let's say you want it to return indented and formatted JSON, so you want to use You could create a `CustomORJSONResponse`. The main thing you have to do is create a `Response.render(content)` method that returns the content as `bytes`: ```Python hl_lines="9-14 17" -{!../../../docs_src/custom_response/tutorial009c.py!} +{!../../docs_src/custom_response/tutorial009c.py!} ``` Now instead of returning: @@ -331,7 +331,7 @@ The parameter that defines this is `default_response_class`. In the example below, **FastAPI** will use `ORJSONResponse` by default, in all *path operations*, instead of `JSONResponse`. ```Python hl_lines="2 4" -{!../../../docs_src/custom_response/tutorial010.py!} +{!../../docs_src/custom_response/tutorial010.py!} ``` /// tip diff --git a/docs/en/docs/advanced/dataclasses.md b/docs/en/docs/advanced/dataclasses.md index 252ab6fa5..efc07eab2 100644 --- a/docs/en/docs/advanced/dataclasses.md +++ b/docs/en/docs/advanced/dataclasses.md @@ -5,7 +5,7 @@ FastAPI is built on top of **Pydantic**, and I have been showing you how to use But FastAPI also supports using `dataclasses` the same way: ```Python hl_lines="1 7-12 19-20" -{!../../../docs_src/dataclasses/tutorial001.py!} +{!../../docs_src/dataclasses/tutorial001.py!} ``` This is still supported thanks to **Pydantic**, as it has internal support for `dataclasses`. @@ -35,7 +35,7 @@ But if you have a bunch of dataclasses laying around, this is a nice trick to us You can also use `dataclasses` in the `response_model` parameter: ```Python hl_lines="1 7-13 19" -{!../../../docs_src/dataclasses/tutorial002.py!} +{!../../docs_src/dataclasses/tutorial002.py!} ``` The dataclass will be automatically converted to a Pydantic dataclass. @@ -53,7 +53,7 @@ In some cases, you might still have to use Pydantic's version of `dataclasses`. In that case, you can simply swap the standard `dataclasses` with `pydantic.dataclasses`, which is a drop-in replacement: ```{ .python .annotate hl_lines="1 5 8-11 14-17 23-25 28" } -{!../../../docs_src/dataclasses/tutorial003.py!} +{!../../docs_src/dataclasses/tutorial003.py!} ``` 1. We still import `field` from standard `dataclasses`. diff --git a/docs/en/docs/advanced/events.md b/docs/en/docs/advanced/events.md index 7fd934344..efce492f4 100644 --- a/docs/en/docs/advanced/events.md +++ b/docs/en/docs/advanced/events.md @@ -31,7 +31,7 @@ Let's start with an example and then see it in detail. We create an async function `lifespan()` with `yield` like this: ```Python hl_lines="16 19" -{!../../../docs_src/events/tutorial003.py!} +{!../../docs_src/events/tutorial003.py!} ``` Here we are simulating the expensive *startup* operation of loading the model by putting the (fake) model function in the dictionary with machine learning models before the `yield`. This code will be executed **before** the application **starts taking requests**, during the *startup*. @@ -51,7 +51,7 @@ Maybe you need to start a new version, or you just got tired of running it. đŸ€· The first thing to notice, is that we are defining an async function with `yield`. This is very similar to Dependencies with `yield`. ```Python hl_lines="14-19" -{!../../../docs_src/events/tutorial003.py!} +{!../../docs_src/events/tutorial003.py!} ``` The first part of the function, before the `yield`, will be executed **before** the application starts. @@ -65,7 +65,7 @@ If you check, the function is decorated with an `@asynccontextmanager`. That converts the function into something called an "**async context manager**". ```Python hl_lines="1 13" -{!../../../docs_src/events/tutorial003.py!} +{!../../docs_src/events/tutorial003.py!} ``` A **context manager** in Python is something that you can use in a `with` statement, for example, `open()` can be used as a context manager: @@ -89,7 +89,7 @@ In our code example above, we don't use it directly, but we pass it to FastAPI f The `lifespan` parameter of the `FastAPI` app takes an **async context manager**, so we can pass our new `lifespan` async context manager to it. ```Python hl_lines="22" -{!../../../docs_src/events/tutorial003.py!} +{!../../docs_src/events/tutorial003.py!} ``` ## Alternative Events (deprecated) @@ -113,7 +113,7 @@ These functions can be declared with `async def` or normal `def`. To add a function that should be run before the application starts, declare it with the event `"startup"`: ```Python hl_lines="8" -{!../../../docs_src/events/tutorial001.py!} +{!../../docs_src/events/tutorial001.py!} ``` In this case, the `startup` event handler function will initialize the items "database" (just a `dict`) with some values. @@ -127,7 +127,7 @@ And your application won't start receiving requests until all the `startup` even To add a function that should be run when the application is shutting down, declare it with the event `"shutdown"`: ```Python hl_lines="6" -{!../../../docs_src/events/tutorial002.py!} +{!../../docs_src/events/tutorial002.py!} ``` Here, the `shutdown` event handler function will write a text line `"Application shutdown"` to a file `log.txt`. diff --git a/docs/en/docs/advanced/generate-clients.md b/docs/en/docs/advanced/generate-clients.md index faa7c323f..7872103c3 100644 --- a/docs/en/docs/advanced/generate-clients.md +++ b/docs/en/docs/advanced/generate-clients.md @@ -35,7 +35,7 @@ Let's start with a simple FastAPI application: //// tab | Python 3.9+ ```Python hl_lines="7-9 12-13 16-17 21" -{!> ../../../docs_src/generate_clients/tutorial001_py39.py!} +{!> ../../docs_src/generate_clients/tutorial001_py39.py!} ``` //// @@ -43,7 +43,7 @@ Let's start with a simple FastAPI application: //// tab | Python 3.8+ ```Python hl_lines="9-11 14-15 18 19 23" -{!> ../../../docs_src/generate_clients/tutorial001.py!} +{!> ../../docs_src/generate_clients/tutorial001.py!} ``` //// @@ -154,7 +154,7 @@ For example, you could have a section for **items** and another section for **us //// tab | Python 3.9+ ```Python hl_lines="21 26 34" -{!> ../../../docs_src/generate_clients/tutorial002_py39.py!} +{!> ../../docs_src/generate_clients/tutorial002_py39.py!} ``` //// @@ -162,7 +162,7 @@ For example, you could have a section for **items** and another section for **us //// tab | Python 3.8+ ```Python hl_lines="23 28 36" -{!> ../../../docs_src/generate_clients/tutorial002.py!} +{!> ../../docs_src/generate_clients/tutorial002.py!} ``` //// @@ -215,7 +215,7 @@ You can then pass that custom function to **FastAPI** as the `generate_unique_id //// tab | Python 3.9+ ```Python hl_lines="6-7 10" -{!> ../../../docs_src/generate_clients/tutorial003_py39.py!} +{!> ../../docs_src/generate_clients/tutorial003_py39.py!} ``` //// @@ -223,7 +223,7 @@ You can then pass that custom function to **FastAPI** as the `generate_unique_id //// tab | Python 3.8+ ```Python hl_lines="8-9 12" -{!> ../../../docs_src/generate_clients/tutorial003.py!} +{!> ../../docs_src/generate_clients/tutorial003.py!} ``` //// @@ -251,7 +251,7 @@ We could download the OpenAPI JSON to a file `openapi.json` and then we could ** //// tab | Python ```Python -{!> ../../../docs_src/generate_clients/tutorial004.py!} +{!> ../../docs_src/generate_clients/tutorial004.py!} ``` //// @@ -259,7 +259,7 @@ We could download the OpenAPI JSON to a file `openapi.json` and then we could ** //// tab | Node.js ```Javascript -{!> ../../../docs_src/generate_clients/tutorial004.js!} +{!> ../../docs_src/generate_clients/tutorial004.js!} ``` //// diff --git a/docs/en/docs/advanced/middleware.md b/docs/en/docs/advanced/middleware.md index ab7778db0..07deac716 100644 --- a/docs/en/docs/advanced/middleware.md +++ b/docs/en/docs/advanced/middleware.md @@ -58,7 +58,7 @@ Enforces that all incoming requests must either be `https` or `wss`. Any incoming request to `http` or `ws` will be redirected to the secure scheme instead. ```Python hl_lines="2 6" -{!../../../docs_src/advanced_middleware/tutorial001.py!} +{!../../docs_src/advanced_middleware/tutorial001.py!} ``` ## `TrustedHostMiddleware` @@ -66,7 +66,7 @@ Any incoming request to `http` or `ws` will be redirected to the secure scheme i Enforces that all incoming requests have a correctly set `Host` header, in order to guard against HTTP Host Header attacks. ```Python hl_lines="2 6-8" -{!../../../docs_src/advanced_middleware/tutorial002.py!} +{!../../docs_src/advanced_middleware/tutorial002.py!} ``` The following arguments are supported: @@ -82,7 +82,7 @@ Handles GZip responses for any request that includes `"gzip"` in the `Accept-Enc The middleware will handle both standard and streaming responses. ```Python hl_lines="2 6" -{!../../../docs_src/advanced_middleware/tutorial003.py!} +{!../../docs_src/advanced_middleware/tutorial003.py!} ``` The following arguments are supported: diff --git a/docs/en/docs/advanced/openapi-callbacks.md b/docs/en/docs/advanced/openapi-callbacks.md index 7fead2ed9..82069a950 100644 --- a/docs/en/docs/advanced/openapi-callbacks.md +++ b/docs/en/docs/advanced/openapi-callbacks.md @@ -32,7 +32,7 @@ It will have a *path operation* that will receive an `Invoice` body, and a query This part is pretty normal, most of the code is probably already familiar to you: ```Python hl_lines="9-13 36-53" -{!../../../docs_src/openapi_callbacks/tutorial001.py!} +{!../../docs_src/openapi_callbacks/tutorial001.py!} ``` /// tip @@ -93,7 +93,7 @@ Temporarily adopting this point of view (of the *external developer*) can help y First create a new `APIRouter` that will contain one or more callbacks. ```Python hl_lines="3 25" -{!../../../docs_src/openapi_callbacks/tutorial001.py!} +{!../../docs_src/openapi_callbacks/tutorial001.py!} ``` ### Create the callback *path operation* @@ -106,7 +106,7 @@ It should look just like a normal FastAPI *path operation*: * And it could also have a declaration of the response it should return, e.g. `response_model=InvoiceEventReceived`. ```Python hl_lines="16-18 21-22 28-32" -{!../../../docs_src/openapi_callbacks/tutorial001.py!} +{!../../docs_src/openapi_callbacks/tutorial001.py!} ``` There are 2 main differences from a normal *path operation*: @@ -176,7 +176,7 @@ At this point you have the *callback path operation(s)* needed (the one(s) that Now use the parameter `callbacks` in *your API's path operation decorator* to pass the attribute `.routes` (that's actually just a `list` of routes/*path operations*) from that callback router: ```Python hl_lines="35" -{!../../../docs_src/openapi_callbacks/tutorial001.py!} +{!../../docs_src/openapi_callbacks/tutorial001.py!} ``` /// tip diff --git a/docs/en/docs/advanced/openapi-webhooks.md b/docs/en/docs/advanced/openapi-webhooks.md index 5ee321e2a..eaaa48a37 100644 --- a/docs/en/docs/advanced/openapi-webhooks.md +++ b/docs/en/docs/advanced/openapi-webhooks.md @@ -33,7 +33,7 @@ Webhooks are available in OpenAPI 3.1.0 and above, supported by FastAPI `0.99.0` When you create a **FastAPI** application, there is a `webhooks` attribute that you can use to define *webhooks*, the same way you would define *path operations*, for example with `@app.webhooks.post()`. ```Python hl_lines="9-13 36-53" -{!../../../docs_src/openapi_webhooks/tutorial001.py!} +{!../../docs_src/openapi_webhooks/tutorial001.py!} ``` The webhooks that you define will end up in the **OpenAPI** schema and the automatic **docs UI**. diff --git a/docs/en/docs/advanced/path-operation-advanced-configuration.md b/docs/en/docs/advanced/path-operation-advanced-configuration.md index d599006d2..a61e3f19b 100644 --- a/docs/en/docs/advanced/path-operation-advanced-configuration.md +++ b/docs/en/docs/advanced/path-operation-advanced-configuration.md @@ -13,7 +13,7 @@ You can set the OpenAPI `operationId` to be used in your *path operation* with t You would have to make sure that it is unique for each operation. ```Python hl_lines="6" -{!../../../docs_src/path_operation_advanced_configuration/tutorial001.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial001.py!} ``` ### Using the *path operation function* name as the operationId @@ -23,7 +23,7 @@ If you want to use your APIs' function names as `operationId`s, you can iterate You should do it after adding all your *path operations*. ```Python hl_lines="2 12-21 24" -{!../../../docs_src/path_operation_advanced_configuration/tutorial002.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial002.py!} ``` /// tip @@ -45,7 +45,7 @@ Even if they are in different modules (Python files). To exclude a *path operation* from the generated OpenAPI schema (and thus, from the automatic documentation systems), use the parameter `include_in_schema` and set it to `False`: ```Python hl_lines="6" -{!../../../docs_src/path_operation_advanced_configuration/tutorial003.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial003.py!} ``` ## Advanced description from docstring @@ -57,7 +57,7 @@ Adding an `\f` (an escaped "form feed" character) causes **FastAPI** to truncate It won't show up in the documentation, but other tools (such as Sphinx) will be able to use the rest. ```Python hl_lines="19-29" -{!../../../docs_src/path_operation_advanced_configuration/tutorial004.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial004.py!} ``` ## Additional Responses @@ -101,7 +101,7 @@ You can extend the OpenAPI schema for a *path operation* using the parameter `op This `openapi_extra` can be helpful, for example, to declare [OpenAPI Extensions](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#specificationExtensions): ```Python hl_lines="6" -{!../../../docs_src/path_operation_advanced_configuration/tutorial005.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial005.py!} ``` If you open the automatic API docs, your extension will show up at the bottom of the specific *path operation*. @@ -150,7 +150,7 @@ For example, you could decide to read and validate the request with your own cod You could do that with `openapi_extra`: ```Python hl_lines="19-36 39-40" -{!../../../docs_src/path_operation_advanced_configuration/tutorial006.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial006.py!} ``` In this example, we didn't declare any Pydantic model. In fact, the request body is not even parsed as JSON, it is read directly as `bytes`, and the function `magic_data_reader()` would be in charge of parsing it in some way. @@ -168,7 +168,7 @@ For example, in this application we don't use FastAPI's integrated functionality //// tab | Pydantic v2 ```Python hl_lines="17-22 24" -{!> ../../../docs_src/path_operation_advanced_configuration/tutorial007.py!} +{!> ../../docs_src/path_operation_advanced_configuration/tutorial007.py!} ``` //// @@ -176,7 +176,7 @@ For example, in this application we don't use FastAPI's integrated functionality //// tab | Pydantic v1 ```Python hl_lines="17-22 24" -{!> ../../../docs_src/path_operation_advanced_configuration/tutorial007_pv1.py!} +{!> ../../docs_src/path_operation_advanced_configuration/tutorial007_pv1.py!} ``` //// @@ -196,7 +196,7 @@ And then in our code, we parse that YAML content directly, and then we are again //// tab | Pydantic v2 ```Python hl_lines="26-33" -{!> ../../../docs_src/path_operation_advanced_configuration/tutorial007.py!} +{!> ../../docs_src/path_operation_advanced_configuration/tutorial007.py!} ``` //// @@ -204,7 +204,7 @@ And then in our code, we parse that YAML content directly, and then we are again //// tab | Pydantic v1 ```Python hl_lines="26-33" -{!> ../../../docs_src/path_operation_advanced_configuration/tutorial007_pv1.py!} +{!> ../../docs_src/path_operation_advanced_configuration/tutorial007_pv1.py!} ``` //// diff --git a/docs/en/docs/advanced/response-change-status-code.md b/docs/en/docs/advanced/response-change-status-code.md index b88d74a8a..fc041f7de 100644 --- a/docs/en/docs/advanced/response-change-status-code.md +++ b/docs/en/docs/advanced/response-change-status-code.md @@ -21,7 +21,7 @@ You can declare a parameter of type `Response` in your *path operation function* And then you can set the `status_code` in that *temporal* response object. ```Python hl_lines="1 9 12" -{!../../../docs_src/response_change_status_code/tutorial001.py!} +{!../../docs_src/response_change_status_code/tutorial001.py!} ``` And then you can return any object you need, as you normally would (a `dict`, a database model, etc). diff --git a/docs/en/docs/advanced/response-cookies.md b/docs/en/docs/advanced/response-cookies.md index 85e423f42..4467779ba 100644 --- a/docs/en/docs/advanced/response-cookies.md +++ b/docs/en/docs/advanced/response-cookies.md @@ -7,7 +7,7 @@ You can declare a parameter of type `Response` in your *path operation function* And then you can set cookies in that *temporal* response object. ```Python hl_lines="1 8-9" -{!../../../docs_src/response_cookies/tutorial002.py!} +{!../../docs_src/response_cookies/tutorial002.py!} ``` And then you can return any object you need, as you normally would (a `dict`, a database model, etc). @@ -27,7 +27,7 @@ To do that, you can create a response as described in [Return a Response Directl Then set Cookies in it, and then return it: ```Python hl_lines="10-12" -{!../../../docs_src/response_cookies/tutorial001.py!} +{!../../docs_src/response_cookies/tutorial001.py!} ``` /// tip diff --git a/docs/en/docs/advanced/response-directly.md b/docs/en/docs/advanced/response-directly.md index 092aeceb1..8246b9674 100644 --- a/docs/en/docs/advanced/response-directly.md +++ b/docs/en/docs/advanced/response-directly.md @@ -35,7 +35,7 @@ For example, you cannot put a Pydantic model in a `JSONResponse` without first c For those cases, you can use the `jsonable_encoder` to convert your data before passing it to a response: ```Python hl_lines="6-7 21-22" -{!../../../docs_src/response_directly/tutorial001.py!} +{!../../docs_src/response_directly/tutorial001.py!} ``` /// note | "Technical Details" @@ -57,7 +57,7 @@ Let's say that you want to return an ../../../docs_src/security/tutorial006_an_py39.py!} +{!> ../../docs_src/security/tutorial006_an_py39.py!} ``` //// @@ -31,7 +31,7 @@ Then, when you type that username and password, the browser sends them in the he //// tab | Python 3.8+ ```Python hl_lines="2 7 11" -{!> ../../../docs_src/security/tutorial006_an.py!} +{!> ../../docs_src/security/tutorial006_an.py!} ``` //// @@ -45,7 +45,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="2 6 10" -{!> ../../../docs_src/security/tutorial006.py!} +{!> ../../docs_src/security/tutorial006.py!} ``` //// @@ -71,7 +71,7 @@ Then we can use `secrets.compare_digest()` to ensure that `credentials.username` //// tab | Python 3.9+ ```Python hl_lines="1 12-24" -{!> ../../../docs_src/security/tutorial007_an_py39.py!} +{!> ../../docs_src/security/tutorial007_an_py39.py!} ``` //// @@ -79,7 +79,7 @@ Then we can use `secrets.compare_digest()` to ensure that `credentials.username` //// tab | Python 3.8+ ```Python hl_lines="1 12-24" -{!> ../../../docs_src/security/tutorial007_an.py!} +{!> ../../docs_src/security/tutorial007_an.py!} ``` //// @@ -93,7 +93,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="1 11-21" -{!> ../../../docs_src/security/tutorial007.py!} +{!> ../../docs_src/security/tutorial007.py!} ``` //// @@ -163,7 +163,7 @@ After detecting that the credentials are incorrect, return an `HTTPException` wi //// tab | Python 3.9+ ```Python hl_lines="26-30" -{!> ../../../docs_src/security/tutorial007_an_py39.py!} +{!> ../../docs_src/security/tutorial007_an_py39.py!} ``` //// @@ -171,7 +171,7 @@ After detecting that the credentials are incorrect, return an `HTTPException` wi //// tab | Python 3.8+ ```Python hl_lines="26-30" -{!> ../../../docs_src/security/tutorial007_an.py!} +{!> ../../docs_src/security/tutorial007_an.py!} ``` //// @@ -185,7 +185,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="23-27" -{!> ../../../docs_src/security/tutorial007.py!} +{!> ../../docs_src/security/tutorial007.py!} ``` //// diff --git a/docs/en/docs/advanced/security/oauth2-scopes.md b/docs/en/docs/advanced/security/oauth2-scopes.md index fdd8db7b9..3db284d02 100644 --- a/docs/en/docs/advanced/security/oauth2-scopes.md +++ b/docs/en/docs/advanced/security/oauth2-scopes.md @@ -65,7 +65,7 @@ First, let's quickly see the parts that change from the examples in the main **T //// tab | Python 3.10+ ```Python hl_lines="5 9 13 47 65 106 108-116 122-125 129-135 140 156" -{!> ../../../docs_src/security/tutorial005_an_py310.py!} +{!> ../../docs_src/security/tutorial005_an_py310.py!} ``` //// @@ -73,7 +73,7 @@ First, let's quickly see the parts that change from the examples in the main **T //// tab | Python 3.9+ ```Python hl_lines="2 5 9 13 47 65 106 108-116 122-125 129-135 140 156" -{!> ../../../docs_src/security/tutorial005_an_py39.py!} +{!> ../../docs_src/security/tutorial005_an_py39.py!} ``` //// @@ -81,7 +81,7 @@ First, let's quickly see the parts that change from the examples in the main **T //// tab | Python 3.8+ ```Python hl_lines="2 5 9 13 48 66 107 109-117 123-126 130-136 141 157" -{!> ../../../docs_src/security/tutorial005_an.py!} +{!> ../../docs_src/security/tutorial005_an.py!} ``` //// @@ -95,7 +95,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="4 8 12 46 64 105 107-115 121-124 128-134 139 155" -{!> ../../../docs_src/security/tutorial005_py310.py!} +{!> ../../docs_src/security/tutorial005_py310.py!} ``` //// @@ -109,7 +109,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="2 5 9 13 47 65 106 108-116 122-125 129-135 140 156" -{!> ../../../docs_src/security/tutorial005_py39.py!} +{!> ../../docs_src/security/tutorial005_py39.py!} ``` //// @@ -123,7 +123,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="2 5 9 13 47 65 106 108-116 122-125 129-135 140 156" -{!> ../../../docs_src/security/tutorial005.py!} +{!> ../../docs_src/security/tutorial005.py!} ``` //// @@ -139,7 +139,7 @@ The `scopes` parameter receives a `dict` with each scope as a key and the descri //// tab | Python 3.10+ ```Python hl_lines="63-66" -{!> ../../../docs_src/security/tutorial005_an_py310.py!} +{!> ../../docs_src/security/tutorial005_an_py310.py!} ``` //// @@ -147,7 +147,7 @@ The `scopes` parameter receives a `dict` with each scope as a key and the descri //// tab | Python 3.9+ ```Python hl_lines="63-66" -{!> ../../../docs_src/security/tutorial005_an_py39.py!} +{!> ../../docs_src/security/tutorial005_an_py39.py!} ``` //// @@ -155,7 +155,7 @@ The `scopes` parameter receives a `dict` with each scope as a key and the descri //// tab | Python 3.8+ ```Python hl_lines="64-67" -{!> ../../../docs_src/security/tutorial005_an.py!} +{!> ../../docs_src/security/tutorial005_an.py!} ``` //// @@ -169,7 +169,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="62-65" -{!> ../../../docs_src/security/tutorial005_py310.py!} +{!> ../../docs_src/security/tutorial005_py310.py!} ``` //// @@ -183,7 +183,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="63-66" -{!> ../../../docs_src/security/tutorial005_py39.py!} +{!> ../../docs_src/security/tutorial005_py39.py!} ``` //// @@ -197,7 +197,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="63-66" -{!> ../../../docs_src/security/tutorial005.py!} +{!> ../../docs_src/security/tutorial005.py!} ``` //// @@ -229,7 +229,7 @@ But in your application, for security, you should make sure you only add the sco //// tab | Python 3.10+ ```Python hl_lines="156" -{!> ../../../docs_src/security/tutorial005_an_py310.py!} +{!> ../../docs_src/security/tutorial005_an_py310.py!} ``` //// @@ -237,7 +237,7 @@ But in your application, for security, you should make sure you only add the sco //// tab | Python 3.9+ ```Python hl_lines="156" -{!> ../../../docs_src/security/tutorial005_an_py39.py!} +{!> ../../docs_src/security/tutorial005_an_py39.py!} ``` //// @@ -245,7 +245,7 @@ But in your application, for security, you should make sure you only add the sco //// tab | Python 3.8+ ```Python hl_lines="157" -{!> ../../../docs_src/security/tutorial005_an.py!} +{!> ../../docs_src/security/tutorial005_an.py!} ``` //// @@ -259,7 +259,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="155" -{!> ../../../docs_src/security/tutorial005_py310.py!} +{!> ../../docs_src/security/tutorial005_py310.py!} ``` //// @@ -273,7 +273,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="156" -{!> ../../../docs_src/security/tutorial005_py39.py!} +{!> ../../docs_src/security/tutorial005_py39.py!} ``` //// @@ -287,7 +287,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="156" -{!> ../../../docs_src/security/tutorial005.py!} +{!> ../../docs_src/security/tutorial005.py!} ``` //// @@ -319,7 +319,7 @@ We are doing it here to demonstrate how **FastAPI** handles scopes declared at d //// tab | Python 3.10+ ```Python hl_lines="5 140 171" -{!> ../../../docs_src/security/tutorial005_an_py310.py!} +{!> ../../docs_src/security/tutorial005_an_py310.py!} ``` //// @@ -327,7 +327,7 @@ We are doing it here to demonstrate how **FastAPI** handles scopes declared at d //// tab | Python 3.9+ ```Python hl_lines="5 140 171" -{!> ../../../docs_src/security/tutorial005_an_py39.py!} +{!> ../../docs_src/security/tutorial005_an_py39.py!} ``` //// @@ -335,7 +335,7 @@ We are doing it here to demonstrate how **FastAPI** handles scopes declared at d //// tab | Python 3.8+ ```Python hl_lines="5 141 172" -{!> ../../../docs_src/security/tutorial005_an.py!} +{!> ../../docs_src/security/tutorial005_an.py!} ``` //// @@ -349,7 +349,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="4 139 168" -{!> ../../../docs_src/security/tutorial005_py310.py!} +{!> ../../docs_src/security/tutorial005_py310.py!} ``` //// @@ -363,7 +363,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="5 140 169" -{!> ../../../docs_src/security/tutorial005_py39.py!} +{!> ../../docs_src/security/tutorial005_py39.py!} ``` //// @@ -377,7 +377,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="5 140 169" -{!> ../../../docs_src/security/tutorial005.py!} +{!> ../../docs_src/security/tutorial005.py!} ``` //// @@ -409,7 +409,7 @@ This `SecurityScopes` class is similar to `Request` (`Request` was used to get t //// tab | Python 3.10+ ```Python hl_lines="9 106" -{!> ../../../docs_src/security/tutorial005_an_py310.py!} +{!> ../../docs_src/security/tutorial005_an_py310.py!} ``` //// @@ -417,7 +417,7 @@ This `SecurityScopes` class is similar to `Request` (`Request` was used to get t //// tab | Python 3.9+ ```Python hl_lines="9 106" -{!> ../../../docs_src/security/tutorial005_an_py39.py!} +{!> ../../docs_src/security/tutorial005_an_py39.py!} ``` //// @@ -425,7 +425,7 @@ This `SecurityScopes` class is similar to `Request` (`Request` was used to get t //// tab | Python 3.8+ ```Python hl_lines="9 107" -{!> ../../../docs_src/security/tutorial005_an.py!} +{!> ../../docs_src/security/tutorial005_an.py!} ``` //// @@ -439,7 +439,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="8 105" -{!> ../../../docs_src/security/tutorial005_py310.py!} +{!> ../../docs_src/security/tutorial005_py310.py!} ``` //// @@ -453,7 +453,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9 106" -{!> ../../../docs_src/security/tutorial005_py39.py!} +{!> ../../docs_src/security/tutorial005_py39.py!} ``` //// @@ -467,7 +467,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9 106" -{!> ../../../docs_src/security/tutorial005.py!} +{!> ../../docs_src/security/tutorial005.py!} ``` //// @@ -487,7 +487,7 @@ In this exception, we include the scopes required (if any) as a string separated //// tab | Python 3.10+ ```Python hl_lines="106 108-116" -{!> ../../../docs_src/security/tutorial005_an_py310.py!} +{!> ../../docs_src/security/tutorial005_an_py310.py!} ``` //// @@ -495,7 +495,7 @@ In this exception, we include the scopes required (if any) as a string separated //// tab | Python 3.9+ ```Python hl_lines="106 108-116" -{!> ../../../docs_src/security/tutorial005_an_py39.py!} +{!> ../../docs_src/security/tutorial005_an_py39.py!} ``` //// @@ -503,7 +503,7 @@ In this exception, we include the scopes required (if any) as a string separated //// tab | Python 3.8+ ```Python hl_lines="107 109-117" -{!> ../../../docs_src/security/tutorial005_an.py!} +{!> ../../docs_src/security/tutorial005_an.py!} ``` //// @@ -517,7 +517,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="105 107-115" -{!> ../../../docs_src/security/tutorial005_py310.py!} +{!> ../../docs_src/security/tutorial005_py310.py!} ``` //// @@ -531,7 +531,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="106 108-116" -{!> ../../../docs_src/security/tutorial005_py39.py!} +{!> ../../docs_src/security/tutorial005_py39.py!} ``` //// @@ -545,7 +545,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="106 108-116" -{!> ../../../docs_src/security/tutorial005.py!} +{!> ../../docs_src/security/tutorial005.py!} ``` //// @@ -567,7 +567,7 @@ We also verify that we have a user with that username, and if not, we raise that //// tab | Python 3.10+ ```Python hl_lines="47 117-128" -{!> ../../../docs_src/security/tutorial005_an_py310.py!} +{!> ../../docs_src/security/tutorial005_an_py310.py!} ``` //// @@ -575,7 +575,7 @@ We also verify that we have a user with that username, and if not, we raise that //// tab | Python 3.9+ ```Python hl_lines="47 117-128" -{!> ../../../docs_src/security/tutorial005_an_py39.py!} +{!> ../../docs_src/security/tutorial005_an_py39.py!} ``` //// @@ -583,7 +583,7 @@ We also verify that we have a user with that username, and if not, we raise that //// tab | Python 3.8+ ```Python hl_lines="48 118-129" -{!> ../../../docs_src/security/tutorial005_an.py!} +{!> ../../docs_src/security/tutorial005_an.py!} ``` //// @@ -597,7 +597,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="46 116-127" -{!> ../../../docs_src/security/tutorial005_py310.py!} +{!> ../../docs_src/security/tutorial005_py310.py!} ``` //// @@ -611,7 +611,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="47 117-128" -{!> ../../../docs_src/security/tutorial005_py39.py!} +{!> ../../docs_src/security/tutorial005_py39.py!} ``` //// @@ -625,7 +625,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="47 117-128" -{!> ../../../docs_src/security/tutorial005.py!} +{!> ../../docs_src/security/tutorial005.py!} ``` //// @@ -639,7 +639,7 @@ For this, we use `security_scopes.scopes`, that contains a `list` with all these //// tab | Python 3.10+ ```Python hl_lines="129-135" -{!> ../../../docs_src/security/tutorial005_an_py310.py!} +{!> ../../docs_src/security/tutorial005_an_py310.py!} ``` //// @@ -647,7 +647,7 @@ For this, we use `security_scopes.scopes`, that contains a `list` with all these //// tab | Python 3.9+ ```Python hl_lines="129-135" -{!> ../../../docs_src/security/tutorial005_an_py39.py!} +{!> ../../docs_src/security/tutorial005_an_py39.py!} ``` //// @@ -655,7 +655,7 @@ For this, we use `security_scopes.scopes`, that contains a `list` with all these //// tab | Python 3.8+ ```Python hl_lines="130-136" -{!> ../../../docs_src/security/tutorial005_an.py!} +{!> ../../docs_src/security/tutorial005_an.py!} ``` //// @@ -669,7 +669,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="128-134" -{!> ../../../docs_src/security/tutorial005_py310.py!} +{!> ../../docs_src/security/tutorial005_py310.py!} ``` //// @@ -683,7 +683,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="129-135" -{!> ../../../docs_src/security/tutorial005_py39.py!} +{!> ../../docs_src/security/tutorial005_py39.py!} ``` //// @@ -697,7 +697,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="129-135" -{!> ../../../docs_src/security/tutorial005.py!} +{!> ../../docs_src/security/tutorial005.py!} ``` //// diff --git a/docs/en/docs/advanced/settings.md b/docs/en/docs/advanced/settings.md index 8c04d2507..01810c438 100644 --- a/docs/en/docs/advanced/settings.md +++ b/docs/en/docs/advanced/settings.md @@ -63,7 +63,7 @@ You can use all the same validation features and tools you use for Pydantic mode //// tab | Pydantic v2 ```Python hl_lines="2 5-8 11" -{!> ../../../docs_src/settings/tutorial001.py!} +{!> ../../docs_src/settings/tutorial001.py!} ``` //// @@ -77,7 +77,7 @@ In Pydantic v1 you would import `BaseSettings` directly from `pydantic` instead /// ```Python hl_lines="2 5-8 11" -{!> ../../../docs_src/settings/tutorial001_pv1.py!} +{!> ../../docs_src/settings/tutorial001_pv1.py!} ``` //// @@ -97,7 +97,7 @@ Next it will convert and validate the data. So, when you use that `settings` obj Then you can use the new `settings` object in your application: ```Python hl_lines="18-20" -{!../../../docs_src/settings/tutorial001.py!} +{!../../docs_src/settings/tutorial001.py!} ``` ### Run the server @@ -133,13 +133,13 @@ You could put those settings in another module file as you saw in [Bigger Applic For example, you could have a file `config.py` with: ```Python -{!../../../docs_src/settings/app01/config.py!} +{!../../docs_src/settings/app01/config.py!} ``` And then use it in a file `main.py`: ```Python hl_lines="3 11-13" -{!../../../docs_src/settings/app01/main.py!} +{!../../docs_src/settings/app01/main.py!} ``` /// tip @@ -159,7 +159,7 @@ This could be especially useful during testing, as it's very easy to override a Coming from the previous example, your `config.py` file could look like: ```Python hl_lines="10" -{!../../../docs_src/settings/app02/config.py!} +{!../../docs_src/settings/app02/config.py!} ``` Notice that now we don't create a default instance `settings = Settings()`. @@ -171,7 +171,7 @@ Now we create a dependency that returns a new `config.Settings()`. //// tab | Python 3.9+ ```Python hl_lines="6 12-13" -{!> ../../../docs_src/settings/app02_an_py39/main.py!} +{!> ../../docs_src/settings/app02_an_py39/main.py!} ``` //// @@ -179,7 +179,7 @@ Now we create a dependency that returns a new `config.Settings()`. //// tab | Python 3.8+ ```Python hl_lines="6 12-13" -{!> ../../../docs_src/settings/app02_an/main.py!} +{!> ../../docs_src/settings/app02_an/main.py!} ``` //// @@ -193,7 +193,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="5 11-12" -{!> ../../../docs_src/settings/app02/main.py!} +{!> ../../docs_src/settings/app02/main.py!} ``` //// @@ -211,7 +211,7 @@ And then we can require it from the *path operation function* as a dependency an //// tab | Python 3.9+ ```Python hl_lines="17 19-21" -{!> ../../../docs_src/settings/app02_an_py39/main.py!} +{!> ../../docs_src/settings/app02_an_py39/main.py!} ``` //// @@ -219,7 +219,7 @@ And then we can require it from the *path operation function* as a dependency an //// tab | Python 3.8+ ```Python hl_lines="17 19-21" -{!> ../../../docs_src/settings/app02_an/main.py!} +{!> ../../docs_src/settings/app02_an/main.py!} ``` //// @@ -233,7 +233,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="16 18-20" -{!> ../../../docs_src/settings/app02/main.py!} +{!> ../../docs_src/settings/app02/main.py!} ``` //// @@ -243,7 +243,7 @@ Prefer to use the `Annotated` version if possible. Then it would be very easy to provide a different settings object during testing by creating a dependency override for `get_settings`: ```Python hl_lines="9-10 13 21" -{!../../../docs_src/settings/app02/test_main.py!} +{!../../docs_src/settings/app02/test_main.py!} ``` In the dependency override we set a new value for the `admin_email` when creating the new `Settings` object, and then we return that new object. @@ -288,7 +288,7 @@ And then update your `config.py` with: //// tab | Pydantic v2 ```Python hl_lines="9" -{!> ../../../docs_src/settings/app03_an/config.py!} +{!> ../../docs_src/settings/app03_an/config.py!} ``` /// tip @@ -302,7 +302,7 @@ The `model_config` attribute is used just for Pydantic configuration. You can re //// tab | Pydantic v1 ```Python hl_lines="9-10" -{!> ../../../docs_src/settings/app03_an/config_pv1.py!} +{!> ../../docs_src/settings/app03_an/config_pv1.py!} ``` /// tip @@ -347,7 +347,7 @@ But as we are using the `@lru_cache` decorator on top, the `Settings` object wil //// tab | Python 3.9+ ```Python hl_lines="1 11" -{!> ../../../docs_src/settings/app03_an_py39/main.py!} +{!> ../../docs_src/settings/app03_an_py39/main.py!} ``` //// @@ -355,7 +355,7 @@ But as we are using the `@lru_cache` decorator on top, the `Settings` object wil //// tab | Python 3.8+ ```Python hl_lines="1 11" -{!> ../../../docs_src/settings/app03_an/main.py!} +{!> ../../docs_src/settings/app03_an/main.py!} ``` //// @@ -369,7 +369,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="1 10" -{!> ../../../docs_src/settings/app03/main.py!} +{!> ../../docs_src/settings/app03/main.py!} ``` //// diff --git a/docs/en/docs/advanced/sub-applications.md b/docs/en/docs/advanced/sub-applications.md index 568a9deca..befa9908a 100644 --- a/docs/en/docs/advanced/sub-applications.md +++ b/docs/en/docs/advanced/sub-applications.md @@ -11,7 +11,7 @@ If you need to have two independent FastAPI applications, with their own indepen First, create the main, top-level, **FastAPI** application, and its *path operations*: ```Python hl_lines="3 6-8" -{!../../../docs_src/sub_applications/tutorial001.py!} +{!../../docs_src/sub_applications/tutorial001.py!} ``` ### Sub-application @@ -21,7 +21,7 @@ Then, create your sub-application, and its *path operations*. This sub-application is just another standard FastAPI application, but this is the one that will be "mounted": ```Python hl_lines="11 14-16" -{!../../../docs_src/sub_applications/tutorial001.py!} +{!../../docs_src/sub_applications/tutorial001.py!} ``` ### Mount the sub-application @@ -31,7 +31,7 @@ In your top-level application, `app`, mount the sub-application, `subapi`. In this case, it will be mounted at the path `/subapi`: ```Python hl_lines="11 19" -{!../../../docs_src/sub_applications/tutorial001.py!} +{!../../docs_src/sub_applications/tutorial001.py!} ``` ### Check the automatic API docs diff --git a/docs/en/docs/advanced/templates.md b/docs/en/docs/advanced/templates.md index 416540ba4..d688c5cb7 100644 --- a/docs/en/docs/advanced/templates.md +++ b/docs/en/docs/advanced/templates.md @@ -28,7 +28,7 @@ $ pip install jinja2 * Use the `templates` you created to render and return a `TemplateResponse`, pass the name of the template, the request object, and a "context" dictionary with key-value pairs to be used inside of the Jinja2 template. ```Python hl_lines="4 11 15-18" -{!../../../docs_src/templates/tutorial001.py!} +{!../../docs_src/templates/tutorial001.py!} ``` /// note @@ -58,7 +58,7 @@ You could also use `from starlette.templating import Jinja2Templates`. Then you can write a template at `templates/item.html` with, for example: ```jinja hl_lines="7" -{!../../../docs_src/templates/templates/item.html!} +{!../../docs_src/templates/templates/item.html!} ``` ### Template Context Values @@ -112,13 +112,13 @@ For example, with an ID of `42`, this would render: You can also use `url_for()` inside of the template, and use it, for example, with the `StaticFiles` you mounted with the `name="static"`. ```jinja hl_lines="4" -{!../../../docs_src/templates/templates/item.html!} +{!../../docs_src/templates/templates/item.html!} ``` In this example, it would link to a CSS file at `static/styles.css` with: ```CSS hl_lines="4" -{!../../../docs_src/templates/static/styles.css!} +{!../../docs_src/templates/static/styles.css!} ``` And because you are using `StaticFiles`, that CSS file would be served automatically by your **FastAPI** application at the URL `/static/styles.css`. diff --git a/docs/en/docs/advanced/testing-database.md b/docs/en/docs/advanced/testing-database.md index 974cf4caa..2b704f229 100644 --- a/docs/en/docs/advanced/testing-database.md +++ b/docs/en/docs/advanced/testing-database.md @@ -59,7 +59,7 @@ We'll use an in-memory database that persists during the tests instead of the lo But the rest of the session code is more or less the same, we just copy it. ```Python hl_lines="8-13" -{!../../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} +{!../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} ``` /// tip @@ -83,7 +83,7 @@ That is normally called in `main.py`, but the line in `main.py` uses the databas So we add that line here, with the new file. ```Python hl_lines="16" -{!../../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} +{!../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} ``` ## Dependency override @@ -91,7 +91,7 @@ So we add that line here, with the new file. Now we create the dependency override and add it to the overrides for our app. ```Python hl_lines="19-24 27" -{!../../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} +{!../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} ``` /// tip @@ -105,7 +105,7 @@ The code for `override_get_db()` is almost exactly the same as for `get_db()`, b Then we can just test the app as normally. ```Python hl_lines="32-47" -{!../../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} +{!../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} ``` And all the modifications we made in the database during the tests will be in the `test.db` database instead of the main `sql_app.db`. diff --git a/docs/en/docs/advanced/testing-dependencies.md b/docs/en/docs/advanced/testing-dependencies.md index 92e25f88d..1cc4313a1 100644 --- a/docs/en/docs/advanced/testing-dependencies.md +++ b/docs/en/docs/advanced/testing-dependencies.md @@ -31,7 +31,7 @@ And then **FastAPI** will call that override instead of the original dependency. //// tab | Python 3.10+ ```Python hl_lines="26-27 30" -{!> ../../../docs_src/dependency_testing/tutorial001_an_py310.py!} +{!> ../../docs_src/dependency_testing/tutorial001_an_py310.py!} ``` //// @@ -39,7 +39,7 @@ And then **FastAPI** will call that override instead of the original dependency. //// tab | Python 3.9+ ```Python hl_lines="28-29 32" -{!> ../../../docs_src/dependency_testing/tutorial001_an_py39.py!} +{!> ../../docs_src/dependency_testing/tutorial001_an_py39.py!} ``` //// @@ -47,7 +47,7 @@ And then **FastAPI** will call that override instead of the original dependency. //// tab | Python 3.8+ ```Python hl_lines="29-30 33" -{!> ../../../docs_src/dependency_testing/tutorial001_an.py!} +{!> ../../docs_src/dependency_testing/tutorial001_an.py!} ``` //// @@ -61,7 +61,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="24-25 28" -{!> ../../../docs_src/dependency_testing/tutorial001_py310.py!} +{!> ../../docs_src/dependency_testing/tutorial001_py310.py!} ``` //// @@ -75,7 +75,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="28-29 32" -{!> ../../../docs_src/dependency_testing/tutorial001.py!} +{!> ../../docs_src/dependency_testing/tutorial001.py!} ``` //// diff --git a/docs/en/docs/advanced/testing-events.md b/docs/en/docs/advanced/testing-events.md index b24a2ccfe..f48907c7c 100644 --- a/docs/en/docs/advanced/testing-events.md +++ b/docs/en/docs/advanced/testing-events.md @@ -3,5 +3,5 @@ When you need your event handlers (`startup` and `shutdown`) to run in your tests, you can use the `TestClient` with a `with` statement: ```Python hl_lines="9-12 20-24" -{!../../../docs_src/app_testing/tutorial003.py!} +{!../../docs_src/app_testing/tutorial003.py!} ``` diff --git a/docs/en/docs/advanced/testing-websockets.md b/docs/en/docs/advanced/testing-websockets.md index 6c071bc19..ab08c90fe 100644 --- a/docs/en/docs/advanced/testing-websockets.md +++ b/docs/en/docs/advanced/testing-websockets.md @@ -5,7 +5,7 @@ You can use the same `TestClient` to test WebSockets. For this, you use the `TestClient` in a `with` statement, connecting to the WebSocket: ```Python hl_lines="27-31" -{!../../../docs_src/app_testing/tutorial002.py!} +{!../../docs_src/app_testing/tutorial002.py!} ``` /// note diff --git a/docs/en/docs/advanced/using-request-directly.md b/docs/en/docs/advanced/using-request-directly.md index 5473db5cb..917d77a95 100644 --- a/docs/en/docs/advanced/using-request-directly.md +++ b/docs/en/docs/advanced/using-request-directly.md @@ -30,7 +30,7 @@ Let's imagine you want to get the client's IP address/host inside of your *path For that you need to access the request directly. ```Python hl_lines="1 7-8" -{!../../../docs_src/using_request_directly/tutorial001.py!} +{!../../docs_src/using_request_directly/tutorial001.py!} ``` By declaring a *path operation function* parameter with the type being the `Request` **FastAPI** will know to pass the `Request` in that parameter. diff --git a/docs/en/docs/advanced/websockets.md b/docs/en/docs/advanced/websockets.md index 44c6c7428..8947f32e7 100644 --- a/docs/en/docs/advanced/websockets.md +++ b/docs/en/docs/advanced/websockets.md @@ -39,7 +39,7 @@ In production you would have one of the options above. But it's the simplest way to focus on the server-side of WebSockets and have a working example: ```Python hl_lines="2 6-38 41-43" -{!../../../docs_src/websockets/tutorial001.py!} +{!../../docs_src/websockets/tutorial001.py!} ``` ## Create a `websocket` @@ -47,7 +47,7 @@ But it's the simplest way to focus on the server-side of WebSockets and have a w In your **FastAPI** application, create a `websocket`: ```Python hl_lines="1 46-47" -{!../../../docs_src/websockets/tutorial001.py!} +{!../../docs_src/websockets/tutorial001.py!} ``` /// note | "Technical Details" @@ -63,7 +63,7 @@ You could also use `from starlette.websockets import WebSocket`. In your WebSocket route you can `await` for messages and send messages. ```Python hl_lines="48-52" -{!../../../docs_src/websockets/tutorial001.py!} +{!../../docs_src/websockets/tutorial001.py!} ``` You can receive and send binary, text, and JSON data. @@ -118,7 +118,7 @@ They work the same way as for other FastAPI endpoints/*path operations*: //// tab | Python 3.10+ ```Python hl_lines="68-69 82" -{!> ../../../docs_src/websockets/tutorial002_an_py310.py!} +{!> ../../docs_src/websockets/tutorial002_an_py310.py!} ``` //// @@ -126,7 +126,7 @@ They work the same way as for other FastAPI endpoints/*path operations*: //// tab | Python 3.9+ ```Python hl_lines="68-69 82" -{!> ../../../docs_src/websockets/tutorial002_an_py39.py!} +{!> ../../docs_src/websockets/tutorial002_an_py39.py!} ``` //// @@ -134,7 +134,7 @@ They work the same way as for other FastAPI endpoints/*path operations*: //// tab | Python 3.8+ ```Python hl_lines="69-70 83" -{!> ../../../docs_src/websockets/tutorial002_an.py!} +{!> ../../docs_src/websockets/tutorial002_an.py!} ``` //// @@ -148,7 +148,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="66-67 79" -{!> ../../../docs_src/websockets/tutorial002_py310.py!} +{!> ../../docs_src/websockets/tutorial002_py310.py!} ``` //// @@ -162,7 +162,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="68-69 81" -{!> ../../../docs_src/websockets/tutorial002.py!} +{!> ../../docs_src/websockets/tutorial002.py!} ``` //// @@ -213,7 +213,7 @@ When a WebSocket connection is closed, the `await websocket.receive_text()` will //// tab | Python 3.9+ ```Python hl_lines="79-81" -{!> ../../../docs_src/websockets/tutorial003_py39.py!} +{!> ../../docs_src/websockets/tutorial003_py39.py!} ``` //// @@ -221,7 +221,7 @@ When a WebSocket connection is closed, the `await websocket.receive_text()` will //// tab | Python 3.8+ ```Python hl_lines="81-83" -{!> ../../../docs_src/websockets/tutorial003.py!} +{!> ../../docs_src/websockets/tutorial003.py!} ``` //// diff --git a/docs/en/docs/advanced/wsgi.md b/docs/en/docs/advanced/wsgi.md index f07609ed6..3974d491c 100644 --- a/docs/en/docs/advanced/wsgi.md +++ b/docs/en/docs/advanced/wsgi.md @@ -13,7 +13,7 @@ Then wrap the WSGI (e.g. Flask) app with the middleware. And then mount that under a path. ```Python hl_lines="2-3 23" -{!../../../docs_src/wsgi/tutorial001.py!} +{!../../docs_src/wsgi/tutorial001.py!} ``` ## Check it diff --git a/docs/en/docs/how-to/async-sql-encode-databases.md b/docs/en/docs/how-to/async-sql-encode-databases.md index a75f8ef58..a72316c4d 100644 --- a/docs/en/docs/how-to/async-sql-encode-databases.md +++ b/docs/en/docs/how-to/async-sql-encode-databases.md @@ -43,7 +43,7 @@ This section doesn't apply those ideas, to be equivalent to the counterpart in < * Create a table `notes` using the `metadata` object. ```Python hl_lines="4 14 16-22" -{!../../../docs_src/async_sql_databases/tutorial001.py!} +{!../../docs_src/async_sql_databases/tutorial001.py!} ``` /// tip @@ -61,7 +61,7 @@ Notice that all this code is pure SQLAlchemy Core. * Create a `database` object. ```Python hl_lines="3 9 12" -{!../../../docs_src/async_sql_databases/tutorial001.py!} +{!../../docs_src/async_sql_databases/tutorial001.py!} ``` /// tip @@ -80,7 +80,7 @@ Here, this section would run directly, right before starting your **FastAPI** ap * Create all the tables from the `metadata` object. ```Python hl_lines="25-28" -{!../../../docs_src/async_sql_databases/tutorial001.py!} +{!../../docs_src/async_sql_databases/tutorial001.py!} ``` ## Create models @@ -91,7 +91,7 @@ Create Pydantic models for: * Notes to be returned (`Note`). ```Python hl_lines="31-33 36-39" -{!../../../docs_src/async_sql_databases/tutorial001.py!} +{!../../docs_src/async_sql_databases/tutorial001.py!} ``` By creating these Pydantic models, the input data will be validated, serialized (converted), and annotated (documented). @@ -104,7 +104,7 @@ So, you will be able to see it all in the interactive API docs. * Create event handlers to connect and disconnect from the database. ```Python hl_lines="42 45-47 50-52" -{!../../../docs_src/async_sql_databases/tutorial001.py!} +{!../../docs_src/async_sql_databases/tutorial001.py!} ``` ## Read notes @@ -112,7 +112,7 @@ So, you will be able to see it all in the interactive API docs. Create the *path operation function* to read notes: ```Python hl_lines="55-58" -{!../../../docs_src/async_sql_databases/tutorial001.py!} +{!../../docs_src/async_sql_databases/tutorial001.py!} ``` /// note @@ -132,7 +132,7 @@ That documents (and validates, serializes, filters) the output data, as a `list` Create the *path operation function* to create notes: ```Python hl_lines="61-65" -{!../../../docs_src/async_sql_databases/tutorial001.py!} +{!../../docs_src/async_sql_databases/tutorial001.py!} ``` /// info diff --git a/docs/en/docs/how-to/conditional-openapi.md b/docs/en/docs/how-to/conditional-openapi.md index add16fbec..6cd0385a2 100644 --- a/docs/en/docs/how-to/conditional-openapi.md +++ b/docs/en/docs/how-to/conditional-openapi.md @@ -30,7 +30,7 @@ You can easily use the same Pydantic settings to configure your generated OpenAP For example: ```Python hl_lines="6 11" -{!../../../docs_src/conditional_openapi/tutorial001.py!} +{!../../docs_src/conditional_openapi/tutorial001.py!} ``` Here we declare the setting `openapi_url` with the same default of `"/openapi.json"`. diff --git a/docs/en/docs/how-to/configure-swagger-ui.md b/docs/en/docs/how-to/configure-swagger-ui.md index 040c3926b..2c649c152 100644 --- a/docs/en/docs/how-to/configure-swagger-ui.md +++ b/docs/en/docs/how-to/configure-swagger-ui.md @@ -19,7 +19,7 @@ Without changing the settings, syntax highlighting is enabled by default: But you can disable it by setting `syntaxHighlight` to `False`: ```Python hl_lines="3" -{!../../../docs_src/configure_swagger_ui/tutorial001.py!} +{!../../docs_src/configure_swagger_ui/tutorial001.py!} ``` ...and then Swagger UI won't show the syntax highlighting anymore: @@ -31,7 +31,7 @@ But you can disable it by setting `syntaxHighlight` to `False`: The same way you could set the syntax highlighting theme with the key `"syntaxHighlight.theme"` (notice that it has a dot in the middle): ```Python hl_lines="3" -{!../../../docs_src/configure_swagger_ui/tutorial002.py!} +{!../../docs_src/configure_swagger_ui/tutorial002.py!} ``` That configuration would change the syntax highlighting color theme: @@ -45,7 +45,7 @@ FastAPI includes some default configuration parameters appropriate for most of t It includes these default configurations: ```Python -{!../../../fastapi/openapi/docs.py[ln:7-23]!} +{!../../fastapi/openapi/docs.py[ln:7-23]!} ``` You can override any of them by setting a different value in the argument `swagger_ui_parameters`. @@ -53,7 +53,7 @@ You can override any of them by setting a different value in the argument `swagg For example, to disable `deepLinking` you could pass these settings to `swagger_ui_parameters`: ```Python hl_lines="3" -{!../../../docs_src/configure_swagger_ui/tutorial003.py!} +{!../../docs_src/configure_swagger_ui/tutorial003.py!} ``` ## Other Swagger UI Parameters diff --git a/docs/en/docs/how-to/custom-docs-ui-assets.md b/docs/en/docs/how-to/custom-docs-ui-assets.md index 0c766d3e4..16c873d11 100644 --- a/docs/en/docs/how-to/custom-docs-ui-assets.md +++ b/docs/en/docs/how-to/custom-docs-ui-assets.md @@ -19,7 +19,7 @@ The first step is to disable the automatic docs, as by default, those use the de To disable them, set their URLs to `None` when creating your `FastAPI` app: ```Python hl_lines="8" -{!../../../docs_src/custom_docs_ui/tutorial001.py!} +{!../../docs_src/custom_docs_ui/tutorial001.py!} ``` ### Include the custom docs @@ -37,7 +37,7 @@ You can reuse FastAPI's internal functions to create the HTML pages for the docs And similarly for ReDoc... ```Python hl_lines="2-6 11-19 22-24 27-33" -{!../../../docs_src/custom_docs_ui/tutorial001.py!} +{!../../docs_src/custom_docs_ui/tutorial001.py!} ``` /// tip @@ -55,7 +55,7 @@ Swagger UI will handle it behind the scenes for you, but it needs this "redirect Now, to be able to test that everything works, create a *path operation*: ```Python hl_lines="36-38" -{!../../../docs_src/custom_docs_ui/tutorial001.py!} +{!../../docs_src/custom_docs_ui/tutorial001.py!} ``` ### Test it @@ -125,7 +125,7 @@ After that, your file structure could look like: * "Mount" a `StaticFiles()` instance in a specific path. ```Python hl_lines="7 11" -{!../../../docs_src/custom_docs_ui/tutorial002.py!} +{!../../docs_src/custom_docs_ui/tutorial002.py!} ``` ### Test the static files @@ -159,7 +159,7 @@ The same as when using a custom CDN, the first step is to disable the automatic To disable them, set their URLs to `None` when creating your `FastAPI` app: ```Python hl_lines="9" -{!../../../docs_src/custom_docs_ui/tutorial002.py!} +{!../../docs_src/custom_docs_ui/tutorial002.py!} ``` ### Include the custom docs for static files @@ -177,7 +177,7 @@ Again, you can reuse FastAPI's internal functions to create the HTML pages for t And similarly for ReDoc... ```Python hl_lines="2-6 14-22 25-27 30-36" -{!../../../docs_src/custom_docs_ui/tutorial002.py!} +{!../../docs_src/custom_docs_ui/tutorial002.py!} ``` /// tip @@ -195,7 +195,7 @@ Swagger UI will handle it behind the scenes for you, but it needs this "redirect Now, to be able to test that everything works, create a *path operation*: ```Python hl_lines="39-41" -{!../../../docs_src/custom_docs_ui/tutorial002.py!} +{!../../docs_src/custom_docs_ui/tutorial002.py!} ``` ### Test Static Files UI diff --git a/docs/en/docs/how-to/custom-request-and-route.md b/docs/en/docs/how-to/custom-request-and-route.md index 20e1904f1..a62ebf1d5 100644 --- a/docs/en/docs/how-to/custom-request-and-route.md +++ b/docs/en/docs/how-to/custom-request-and-route.md @@ -43,7 +43,7 @@ If there's no `gzip` in the header, it will not try to decompress the body. That way, the same route class can handle gzip compressed or uncompressed requests. ```Python hl_lines="8-15" -{!../../../docs_src/custom_request_and_route/tutorial001.py!} +{!../../docs_src/custom_request_and_route/tutorial001.py!} ``` ### Create a custom `GzipRoute` class @@ -57,7 +57,7 @@ This method returns a function. And that function is what will receive a request Here we use it to create a `GzipRequest` from the original request. ```Python hl_lines="18-26" -{!../../../docs_src/custom_request_and_route/tutorial001.py!} +{!../../docs_src/custom_request_and_route/tutorial001.py!} ``` /// note | "Technical Details" @@ -97,13 +97,13 @@ We can also use this same approach to access the request body in an exception ha All we need to do is handle the request inside a `try`/`except` block: ```Python hl_lines="13 15" -{!../../../docs_src/custom_request_and_route/tutorial002.py!} +{!../../docs_src/custom_request_and_route/tutorial002.py!} ``` If an exception occurs, the`Request` instance will still be in scope, so we can read and make use of the request body when handling the error: ```Python hl_lines="16-18" -{!../../../docs_src/custom_request_and_route/tutorial002.py!} +{!../../docs_src/custom_request_and_route/tutorial002.py!} ``` ## Custom `APIRoute` class in a router @@ -111,11 +111,11 @@ If an exception occurs, the`Request` instance will still be in scope, so we can You can also set the `route_class` parameter of an `APIRouter`: ```Python hl_lines="26" -{!../../../docs_src/custom_request_and_route/tutorial003.py!} +{!../../docs_src/custom_request_and_route/tutorial003.py!} ``` In this example, the *path operations* under the `router` will use the custom `TimedRoute` class, and will have an extra `X-Response-Time` header in the response with the time it took to generate the response: ```Python hl_lines="13-20" -{!../../../docs_src/custom_request_and_route/tutorial003.py!} +{!../../docs_src/custom_request_and_route/tutorial003.py!} ``` diff --git a/docs/en/docs/how-to/extending-openapi.md b/docs/en/docs/how-to/extending-openapi.md index 9909f778c..2b0367952 100644 --- a/docs/en/docs/how-to/extending-openapi.md +++ b/docs/en/docs/how-to/extending-openapi.md @@ -44,7 +44,7 @@ For example, let's add Strawberry documentation. diff --git a/docs/en/docs/how-to/nosql-databases-couchbase.md b/docs/en/docs/how-to/nosql-databases-couchbase.md index a0abfe21d..feb4025dd 100644 --- a/docs/en/docs/how-to/nosql-databases-couchbase.md +++ b/docs/en/docs/how-to/nosql-databases-couchbase.md @@ -39,7 +39,7 @@ There is an official project generator with **FastAPI** and **Couchbase**, all b For now, don't pay attention to the rest, only the imports: ```Python hl_lines="3-5" -{!../../../docs_src/nosql_databases/tutorial001.py!} +{!../../docs_src/nosql_databases/tutorial001.py!} ``` ## Define a constant to use as a "document type" @@ -49,7 +49,7 @@ We will use it later as a fixed field `type` in our documents. This is not required by Couchbase, but is a good practice that will help you afterwards. ```Python hl_lines="9" -{!../../../docs_src/nosql_databases/tutorial001.py!} +{!../../docs_src/nosql_databases/tutorial001.py!} ``` ## Add a function to get a `Bucket` @@ -74,7 +74,7 @@ This utility function will: * Return it. ```Python hl_lines="12-21" -{!../../../docs_src/nosql_databases/tutorial001.py!} +{!../../docs_src/nosql_databases/tutorial001.py!} ``` ## Create Pydantic models @@ -86,7 +86,7 @@ As **Couchbase** "documents" are actually just "JSON objects", we can model them First, let's create a `User` model: ```Python hl_lines="24-28" -{!../../../docs_src/nosql_databases/tutorial001.py!} +{!../../docs_src/nosql_databases/tutorial001.py!} ``` We will use this model in our *path operation function*, so, we don't include in it the `hashed_password`. @@ -100,7 +100,7 @@ This will have the data that is actually stored in the database. We don't create it as a subclass of Pydantic's `BaseModel` but as a subclass of our own `User`, because it will have all the attributes in `User` plus a couple more: ```Python hl_lines="31-33" -{!../../../docs_src/nosql_databases/tutorial001.py!} +{!../../docs_src/nosql_databases/tutorial001.py!} ``` /// note @@ -123,7 +123,7 @@ Now create a function that will: By creating a function that is only dedicated to getting your user from a `username` (or any other parameter) independent of your *path operation function*, you can more easily reuse it in multiple parts and also add unit tests for it: ```Python hl_lines="36-42" -{!../../../docs_src/nosql_databases/tutorial001.py!} +{!../../docs_src/nosql_databases/tutorial001.py!} ``` ### f-strings @@ -158,7 +158,7 @@ UserInDB(username="johndoe", hashed_password="some_hash") ### Create the `FastAPI` app ```Python hl_lines="46" -{!../../../docs_src/nosql_databases/tutorial001.py!} +{!../../docs_src/nosql_databases/tutorial001.py!} ``` ### Create the *path operation function* @@ -168,7 +168,7 @@ As our code is calling Couchbase and we are not using the threads", so, we can just get the bucket directly and pass it to our utility functions: ```Python hl_lines="49-53" -{!../../../docs_src/nosql_databases/tutorial001.py!} +{!../../docs_src/nosql_databases/tutorial001.py!} ``` ## Recap diff --git a/docs/en/docs/how-to/separate-openapi-schemas.md b/docs/en/docs/how-to/separate-openapi-schemas.md index 0ab5b1337..75fd3f9b6 100644 --- a/docs/en/docs/how-to/separate-openapi-schemas.md +++ b/docs/en/docs/how-to/separate-openapi-schemas.md @@ -13,7 +13,7 @@ Let's say you have a Pydantic model with default values, like this one: //// tab | Python 3.10+ ```Python hl_lines="7" -{!> ../../../docs_src/separate_openapi_schemas/tutorial001_py310.py[ln:1-7]!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001_py310.py[ln:1-7]!} # Code below omitted 👇 ``` @@ -22,7 +22,7 @@ Let's say you have a Pydantic model with default values, like this one: 👀 Full file preview ```Python -{!> ../../../docs_src/separate_openapi_schemas/tutorial001_py310.py!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001_py310.py!} ``` @@ -32,7 +32,7 @@ Let's say you have a Pydantic model with default values, like this one: //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/separate_openapi_schemas/tutorial001_py39.py[ln:1-9]!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001_py39.py[ln:1-9]!} # Code below omitted 👇 ``` @@ -41,7 +41,7 @@ Let's say you have a Pydantic model with default values, like this one: 👀 Full file preview ```Python -{!> ../../../docs_src/separate_openapi_schemas/tutorial001_py39.py!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001_py39.py!} ``` @@ -51,7 +51,7 @@ Let's say you have a Pydantic model with default values, like this one: //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/separate_openapi_schemas/tutorial001.py[ln:1-9]!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001.py[ln:1-9]!} # Code below omitted 👇 ``` @@ -60,7 +60,7 @@ Let's say you have a Pydantic model with default values, like this one: 👀 Full file preview ```Python -{!> ../../../docs_src/separate_openapi_schemas/tutorial001.py!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001.py!} ``` @@ -74,7 +74,7 @@ If you use this model as an input like here: //// tab | Python 3.10+ ```Python hl_lines="14" -{!> ../../../docs_src/separate_openapi_schemas/tutorial001_py310.py[ln:1-15]!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001_py310.py[ln:1-15]!} # Code below omitted 👇 ``` @@ -83,7 +83,7 @@ If you use this model as an input like here: 👀 Full file preview ```Python -{!> ../../../docs_src/separate_openapi_schemas/tutorial001_py310.py!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001_py310.py!} ``` @@ -93,7 +93,7 @@ If you use this model as an input like here: //// tab | Python 3.9+ ```Python hl_lines="16" -{!> ../../../docs_src/separate_openapi_schemas/tutorial001_py39.py[ln:1-17]!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001_py39.py[ln:1-17]!} # Code below omitted 👇 ``` @@ -102,7 +102,7 @@ If you use this model as an input like here: 👀 Full file preview ```Python -{!> ../../../docs_src/separate_openapi_schemas/tutorial001_py39.py!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001_py39.py!} ``` @@ -112,7 +112,7 @@ If you use this model as an input like here: //// tab | Python 3.8+ ```Python hl_lines="16" -{!> ../../../docs_src/separate_openapi_schemas/tutorial001.py[ln:1-17]!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001.py[ln:1-17]!} # Code below omitted 👇 ``` @@ -121,7 +121,7 @@ If you use this model as an input like here: 👀 Full file preview ```Python -{!> ../../../docs_src/separate_openapi_schemas/tutorial001.py!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001.py!} ``` @@ -145,7 +145,7 @@ But if you use the same model as an output, like here: //// tab | Python 3.10+ ```Python hl_lines="19" -{!> ../../../docs_src/separate_openapi_schemas/tutorial001_py310.py!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001_py310.py!} ``` //// @@ -153,7 +153,7 @@ But if you use the same model as an output, like here: //// tab | Python 3.9+ ```Python hl_lines="21" -{!> ../../../docs_src/separate_openapi_schemas/tutorial001_py39.py!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001_py39.py!} ``` //// @@ -161,7 +161,7 @@ But if you use the same model as an output, like here: //// tab | Python 3.8+ ```Python hl_lines="21" -{!> ../../../docs_src/separate_openapi_schemas/tutorial001.py!} +{!> ../../docs_src/separate_openapi_schemas/tutorial001.py!} ``` //// @@ -226,7 +226,7 @@ Support for `separate_input_output_schemas` was added in FastAPI `0.102.0`. đŸ€“ //// tab | Python 3.10+ ```Python hl_lines="10" -{!> ../../../docs_src/separate_openapi_schemas/tutorial002_py310.py!} +{!> ../../docs_src/separate_openapi_schemas/tutorial002_py310.py!} ``` //// @@ -234,7 +234,7 @@ Support for `separate_input_output_schemas` was added in FastAPI `0.102.0`. đŸ€“ //// tab | Python 3.9+ ```Python hl_lines="12" -{!> ../../../docs_src/separate_openapi_schemas/tutorial002_py39.py!} +{!> ../../docs_src/separate_openapi_schemas/tutorial002_py39.py!} ``` //// @@ -242,7 +242,7 @@ Support for `separate_input_output_schemas` was added in FastAPI `0.102.0`. đŸ€“ //// tab | Python 3.8+ ```Python hl_lines="12" -{!> ../../../docs_src/separate_openapi_schemas/tutorial002.py!} +{!> ../../docs_src/separate_openapi_schemas/tutorial002.py!} ``` //// diff --git a/docs/en/docs/how-to/sql-databases-peewee.md b/docs/en/docs/how-to/sql-databases-peewee.md index e411c200c..e73ca369b 100644 --- a/docs/en/docs/how-to/sql-databases-peewee.md +++ b/docs/en/docs/how-to/sql-databases-peewee.md @@ -89,7 +89,7 @@ Let's refer to the file `sql_app/database.py`. Let's first check all the normal Peewee code, create a Peewee database: ```Python hl_lines="3 5 22" -{!../../../docs_src/sql_databases_peewee/sql_app/database.py!} +{!../../docs_src/sql_databases_peewee/sql_app/database.py!} ``` /// tip @@ -149,7 +149,7 @@ This might seem a bit complex (and it actually is), you don't really need to com We will create a `PeeweeConnectionState`: ```Python hl_lines="10-19" -{!../../../docs_src/sql_databases_peewee/sql_app/database.py!} +{!../../docs_src/sql_databases_peewee/sql_app/database.py!} ``` This class inherits from a special internal class used by Peewee. @@ -173,7 +173,7 @@ But it doesn't give Peewee async super-powers. You should still use normal `def` Now, overwrite the `._state` internal attribute in the Peewee database `db` object using the new `PeeweeConnectionState`: ```Python hl_lines="24" -{!../../../docs_src/sql_databases_peewee/sql_app/database.py!} +{!../../docs_src/sql_databases_peewee/sql_app/database.py!} ``` /// tip @@ -209,7 +209,7 @@ But Pydantic also uses the term "**model**" to refer to something different, the Import `db` from `database` (the file `database.py` from above) and use it here. ```Python hl_lines="3 6-12 15-21" -{!../../../docs_src/sql_databases_peewee/sql_app/models.py!} +{!../../docs_src/sql_databases_peewee/sql_app/models.py!} ``` /// tip @@ -243,7 +243,7 @@ So this will help us avoiding confusion while using both. Create all the same Pydantic models as in the SQLAlchemy tutorial: ```Python hl_lines="16-18 21-22 25-30 34-35 38-39 42-48" -{!../../../docs_src/sql_databases_peewee/sql_app/schemas.py!} +{!../../docs_src/sql_databases_peewee/sql_app/schemas.py!} ``` /// tip @@ -271,7 +271,7 @@ But recent versions of Pydantic allow providing a custom class that inherits fro We are going to create a custom `PeeweeGetterDict` class and use it in all the same Pydantic *models* / schemas that use `orm_mode`: ```Python hl_lines="3 8-13 31 49" -{!../../../docs_src/sql_databases_peewee/sql_app/schemas.py!} +{!../../docs_src/sql_databases_peewee/sql_app/schemas.py!} ``` Here we are checking if the attribute that is being accessed (e.g. `.items` in `some_user.items`) is an instance of `peewee.ModelSelect`. @@ -295,7 +295,7 @@ Now let's see the file `sql_app/crud.py`. Create all the same CRUD utils as in the SQLAlchemy tutorial, all the code is very similar: ```Python hl_lines="1 4-5 8-9 12-13 16-20 23-24 27-30" -{!../../../docs_src/sql_databases_peewee/sql_app/crud.py!} +{!../../docs_src/sql_databases_peewee/sql_app/crud.py!} ``` There are some differences with the code for the SQLAlchemy tutorial. @@ -319,7 +319,7 @@ And now in the file `sql_app/main.py` let's integrate and use all the other part In a very simplistic way create the database tables: ```Python hl_lines="9-11" -{!../../../docs_src/sql_databases_peewee/sql_app/main.py!} +{!../../docs_src/sql_databases_peewee/sql_app/main.py!} ``` ### Create a dependency @@ -327,7 +327,7 @@ In a very simplistic way create the database tables: Create a dependency that will connect the database right at the beginning of a request and disconnect it at the end: ```Python hl_lines="23-29" -{!../../../docs_src/sql_databases_peewee/sql_app/main.py!} +{!../../docs_src/sql_databases_peewee/sql_app/main.py!} ``` Here we have an empty `yield` because we are actually not using the database object directly. @@ -341,7 +341,7 @@ And then, in each *path operation function* that needs to access the database we But we are not using the value given by this dependency (it actually doesn't give any value, as it has an empty `yield`). So, we don't add it to the *path operation function* but to the *path operation decorator* in the `dependencies` parameter: ```Python hl_lines="32 40 47 59 65 72" -{!../../../docs_src/sql_databases_peewee/sql_app/main.py!} +{!../../docs_src/sql_databases_peewee/sql_app/main.py!} ``` ### Context variable sub-dependency @@ -351,7 +351,7 @@ For all the `contextvars` parts to work, we need to make sure we have an indepen For that, we need to create another `async` dependency `reset_db_state()` that is used as a sub-dependency in `get_db()`. It will set the value for the context variable (with just a default `dict`) that will be used as the database state for the whole request. And then the dependency `get_db()` will store in it the database state (connection, transactions, etc). ```Python hl_lines="18-20" -{!../../../docs_src/sql_databases_peewee/sql_app/main.py!} +{!../../docs_src/sql_databases_peewee/sql_app/main.py!} ``` For the **next request**, as we will reset that context variable again in the `async` dependency `reset_db_state()` and then create a new connection in the `get_db()` dependency, that new request will have its own database state (connection, transactions, etc). @@ -383,7 +383,7 @@ async def reset_db_state(): Now, finally, here's the standard **FastAPI** *path operations* code. ```Python hl_lines="32-37 40-43 46-53 56-62 65-68 71-79" -{!../../../docs_src/sql_databases_peewee/sql_app/main.py!} +{!../../docs_src/sql_databases_peewee/sql_app/main.py!} ``` ### About `def` vs `async def` @@ -500,31 +500,31 @@ Repeat the same process with the 10 tabs. This time all of them will wait and yo * `sql_app/database.py`: ```Python -{!../../../docs_src/sql_databases_peewee/sql_app/database.py!} +{!../../docs_src/sql_databases_peewee/sql_app/database.py!} ``` * `sql_app/models.py`: ```Python -{!../../../docs_src/sql_databases_peewee/sql_app/models.py!} +{!../../docs_src/sql_databases_peewee/sql_app/models.py!} ``` * `sql_app/schemas.py`: ```Python -{!../../../docs_src/sql_databases_peewee/sql_app/schemas.py!} +{!../../docs_src/sql_databases_peewee/sql_app/schemas.py!} ``` * `sql_app/crud.py`: ```Python -{!../../../docs_src/sql_databases_peewee/sql_app/crud.py!} +{!../../docs_src/sql_databases_peewee/sql_app/crud.py!} ``` * `sql_app/main.py`: ```Python -{!../../../docs_src/sql_databases_peewee/sql_app/main.py!} +{!../../docs_src/sql_databases_peewee/sql_app/main.py!} ``` ## Technical Details diff --git a/docs/en/docs/python-types.md b/docs/en/docs/python-types.md index 6994adb5f..ee192d8cb 100644 --- a/docs/en/docs/python-types.md +++ b/docs/en/docs/python-types.md @@ -23,7 +23,7 @@ If you are a Python expert, and you already know everything about type hints, sk Let's start with a simple example: ```Python -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` Calling this program outputs: @@ -39,7 +39,7 @@ The function does the following: * Concatenates them with a space in the middle. ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` ### Edit it @@ -83,7 +83,7 @@ That's it. Those are the "type hints": ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial002.py!} +{!../../docs_src/python_types/tutorial002.py!} ``` That is not the same as declaring default values like would be with: @@ -113,7 +113,7 @@ With that, you can scroll, seeing the options, until you find the one that "ring Check this function, it already has type hints: ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial003.py!} +{!../../docs_src/python_types/tutorial003.py!} ``` Because the editor knows the types of the variables, you don't only get completion, you also get error checks: @@ -123,7 +123,7 @@ Because the editor knows the types of the variables, you don't only get completi Now you know that you have to fix it, convert `age` to a string with `str(age)`: ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial004.py!} +{!../../docs_src/python_types/tutorial004.py!} ``` ## Declaring types @@ -144,7 +144,7 @@ You can use, for example: * `bytes` ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial005.py!} +{!../../docs_src/python_types/tutorial005.py!} ``` ### Generic types with type parameters @@ -182,7 +182,7 @@ As the type, put `list`. As the list is a type that contains some internal types, you put them in square brackets: ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial006_py39.py!} +{!> ../../docs_src/python_types/tutorial006_py39.py!} ``` //// @@ -192,7 +192,7 @@ As the list is a type that contains some internal types, you put them in square From `typing`, import `List` (with a capital `L`): ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial006.py!} +{!> ../../docs_src/python_types/tutorial006.py!} ``` Declare the variable, with the same colon (`:`) syntax. @@ -202,7 +202,7 @@ As the type, put the `List` that you imported from `typing`. As the list is a type that contains some internal types, you put them in square brackets: ```Python hl_lines="4" -{!> ../../../docs_src/python_types/tutorial006.py!} +{!> ../../docs_src/python_types/tutorial006.py!} ``` //// @@ -240,7 +240,7 @@ You would do the same to declare `tuple`s and `set`s: //// tab | Python 3.9+ ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial007_py39.py!} +{!> ../../docs_src/python_types/tutorial007_py39.py!} ``` //// @@ -248,7 +248,7 @@ You would do the same to declare `tuple`s and `set`s: //// tab | Python 3.8+ ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial007.py!} +{!> ../../docs_src/python_types/tutorial007.py!} ``` //// @@ -269,7 +269,7 @@ The second type parameter is for the values of the `dict`: //// tab | Python 3.9+ ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial008_py39.py!} +{!> ../../docs_src/python_types/tutorial008_py39.py!} ``` //// @@ -277,7 +277,7 @@ The second type parameter is for the values of the `dict`: //// tab | Python 3.8+ ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial008.py!} +{!> ../../docs_src/python_types/tutorial008.py!} ``` //// @@ -299,7 +299,7 @@ In Python 3.10 there's also a **new syntax** where you can put the possible type //// tab | Python 3.10+ ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial008b_py310.py!} +{!> ../../docs_src/python_types/tutorial008b_py310.py!} ``` //// @@ -307,7 +307,7 @@ In Python 3.10 there's also a **new syntax** where you can put the possible type //// tab | Python 3.8+ ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial008b.py!} +{!> ../../docs_src/python_types/tutorial008b.py!} ``` //// @@ -321,7 +321,7 @@ You can declare that a value could have a type, like `str`, but that it could al In Python 3.6 and above (including Python 3.10) you can declare it by importing and using `Optional` from the `typing` module. ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009.py!} +{!../../docs_src/python_types/tutorial009.py!} ``` Using `Optional[str]` instead of just `str` will let the editor help you detect errors where you could be assuming that a value is always a `str`, when it could actually be `None` too. @@ -333,7 +333,7 @@ This also means that in Python 3.10, you can use `Something | None`: //// tab | Python 3.10+ ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial009_py310.py!} +{!> ../../docs_src/python_types/tutorial009_py310.py!} ``` //// @@ -341,7 +341,7 @@ This also means that in Python 3.10, you can use `Something | None`: //// tab | Python 3.8+ ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial009.py!} +{!> ../../docs_src/python_types/tutorial009.py!} ``` //// @@ -349,7 +349,7 @@ This also means that in Python 3.10, you can use `Something | None`: //// tab | Python 3.8+ alternative ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial009b.py!} +{!> ../../docs_src/python_types/tutorial009b.py!} ``` //// @@ -370,7 +370,7 @@ It's just about the words and names. But those words can affect how you and your As an example, let's take this function: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009c.py!} +{!../../docs_src/python_types/tutorial009c.py!} ``` The parameter `name` is defined as `Optional[str]`, but it is **not optional**, you cannot call the function without the parameter: @@ -388,7 +388,7 @@ say_hi(name=None) # This works, None is valid 🎉 The good news is, once you are on Python 3.10 you won't have to worry about that, as you will be able to simply use `|` to define unions of types: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009c_py310.py!} +{!../../docs_src/python_types/tutorial009c_py310.py!} ``` And then you won't have to worry about names like `Optional` and `Union`. 😎 @@ -452,13 +452,13 @@ You can also declare a class as the type of a variable. Let's say you have a class `Person`, with a name: ```Python hl_lines="1-3" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` Then you can declare a variable to be of type `Person`: ```Python hl_lines="6" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` And then, again, you get all the editor support: @@ -486,7 +486,7 @@ An example from the official Pydantic docs: //// tab | Python 3.10+ ```Python -{!> ../../../docs_src/python_types/tutorial011_py310.py!} +{!> ../../docs_src/python_types/tutorial011_py310.py!} ``` //// @@ -494,7 +494,7 @@ An example from the official Pydantic docs: //// tab | Python 3.9+ ```Python -{!> ../../../docs_src/python_types/tutorial011_py39.py!} +{!> ../../docs_src/python_types/tutorial011_py39.py!} ``` //// @@ -502,7 +502,7 @@ An example from the official Pydantic docs: //// tab | Python 3.8+ ```Python -{!> ../../../docs_src/python_types/tutorial011.py!} +{!> ../../docs_src/python_types/tutorial011.py!} ``` //// @@ -532,7 +532,7 @@ Python also has a feature that allows putting **additional ../../../docs_src/python_types/tutorial013_py39.py!} +{!> ../../docs_src/python_types/tutorial013_py39.py!} ``` //// @@ -544,7 +544,7 @@ In versions below Python 3.9, you import `Annotated` from `typing_extensions`. It will already be installed with **FastAPI**. ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial013.py!} +{!> ../../docs_src/python_types/tutorial013.py!} ``` //// diff --git a/docs/en/docs/tutorial/background-tasks.md b/docs/en/docs/tutorial/background-tasks.md index 8b4476e41..1cd460b07 100644 --- a/docs/en/docs/tutorial/background-tasks.md +++ b/docs/en/docs/tutorial/background-tasks.md @@ -16,7 +16,7 @@ This includes, for example: First, import `BackgroundTasks` and define a parameter in your *path operation function* with a type declaration of `BackgroundTasks`: ```Python hl_lines="1 13" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` **FastAPI** will create the object of type `BackgroundTasks` for you and pass it as that parameter. @@ -34,7 +34,7 @@ In this case, the task function will write to a file (simulating sending an emai And as the write operation doesn't use `async` and `await`, we define the function with normal `def`: ```Python hl_lines="6-9" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` ## Add the background task @@ -42,7 +42,7 @@ And as the write operation doesn't use `async` and `await`, we define the functi Inside of your *path operation function*, pass your task function to the *background tasks* object with the method `.add_task()`: ```Python hl_lines="14" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` `.add_task()` receives as arguments: @@ -60,7 +60,7 @@ Using `BackgroundTasks` also works with the dependency injection system, you can //// tab | Python 3.10+ ```Python hl_lines="13 15 22 25" -{!> ../../../docs_src/background_tasks/tutorial002_an_py310.py!} +{!> ../../docs_src/background_tasks/tutorial002_an_py310.py!} ``` //// @@ -68,7 +68,7 @@ Using `BackgroundTasks` also works with the dependency injection system, you can //// tab | Python 3.9+ ```Python hl_lines="13 15 22 25" -{!> ../../../docs_src/background_tasks/tutorial002_an_py39.py!} +{!> ../../docs_src/background_tasks/tutorial002_an_py39.py!} ``` //// @@ -76,7 +76,7 @@ Using `BackgroundTasks` also works with the dependency injection system, you can //// tab | Python 3.8+ ```Python hl_lines="14 16 23 26" -{!> ../../../docs_src/background_tasks/tutorial002_an.py!} +{!> ../../docs_src/background_tasks/tutorial002_an.py!} ``` //// @@ -90,7 +90,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="11 13 20 23" -{!> ../../../docs_src/background_tasks/tutorial002_py310.py!} +{!> ../../docs_src/background_tasks/tutorial002_py310.py!} ``` //// @@ -104,7 +104,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="13 15 22 25" -{!> ../../../docs_src/background_tasks/tutorial002.py!} +{!> ../../docs_src/background_tasks/tutorial002.py!} ``` //// diff --git a/docs/en/docs/tutorial/bigger-applications.md b/docs/en/docs/tutorial/bigger-applications.md index 1c33fd051..4ec9b15bd 100644 --- a/docs/en/docs/tutorial/bigger-applications.md +++ b/docs/en/docs/tutorial/bigger-applications.md @@ -86,7 +86,7 @@ You can create the *path operations* for that module using `APIRouter`. You import it and create an "instance" the same way you would with the class `FastAPI`: ```Python hl_lines="1 3" title="app/routers/users.py" -{!../../../docs_src/bigger_applications/app/routers/users.py!} +{!../../docs_src/bigger_applications/app/routers/users.py!} ``` ### *Path operations* with `APIRouter` @@ -96,7 +96,7 @@ And then you use it to declare your *path operations*. Use it the same way you would use the `FastAPI` class: ```Python hl_lines="6 11 16" title="app/routers/users.py" -{!../../../docs_src/bigger_applications/app/routers/users.py!} +{!../../docs_src/bigger_applications/app/routers/users.py!} ``` You can think of `APIRouter` as a "mini `FastAPI`" class. @@ -124,7 +124,7 @@ We will now use a simple dependency to read a custom `X-Token` header: //// tab | Python 3.9+ ```Python hl_lines="3 6-8" title="app/dependencies.py" -{!> ../../../docs_src/bigger_applications/app_an_py39/dependencies.py!} +{!> ../../docs_src/bigger_applications/app_an_py39/dependencies.py!} ``` //// @@ -132,7 +132,7 @@ We will now use a simple dependency to read a custom `X-Token` header: //// tab | Python 3.8+ ```Python hl_lines="1 5-7" title="app/dependencies.py" -{!> ../../../docs_src/bigger_applications/app_an/dependencies.py!} +{!> ../../docs_src/bigger_applications/app_an/dependencies.py!} ``` //// @@ -146,7 +146,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="1 4-6" title="app/dependencies.py" -{!> ../../../docs_src/bigger_applications/app/dependencies.py!} +{!> ../../docs_src/bigger_applications/app/dependencies.py!} ``` //// @@ -182,7 +182,7 @@ We know all the *path operations* in this module have the same: So, instead of adding all that to each *path operation*, we can add it to the `APIRouter`. ```Python hl_lines="5-10 16 21" title="app/routers/items.py" -{!../../../docs_src/bigger_applications/app/routers/items.py!} +{!../../docs_src/bigger_applications/app/routers/items.py!} ``` As the path of each *path operation* has to start with `/`, like in: @@ -243,7 +243,7 @@ And we need to get the dependency function from the module `app.dependencies`, t So we use a relative import with `..` for the dependencies: ```Python hl_lines="3" title="app/routers/items.py" -{!../../../docs_src/bigger_applications/app/routers/items.py!} +{!../../docs_src/bigger_applications/app/routers/items.py!} ``` #### How relative imports work @@ -316,7 +316,7 @@ We are not adding the prefix `/items` nor the `tags=["items"]` to each *path ope But we can still add _more_ `tags` that will be applied to a specific *path operation*, and also some extra `responses` specific to that *path operation*: ```Python hl_lines="30-31" title="app/routers/items.py" -{!../../../docs_src/bigger_applications/app/routers/items.py!} +{!../../docs_src/bigger_applications/app/routers/items.py!} ``` /// tip @@ -344,7 +344,7 @@ You import and create a `FastAPI` class as normally. And we can even declare [global dependencies](dependencies/global-dependencies.md){.internal-link target=_blank} that will be combined with the dependencies for each `APIRouter`: ```Python hl_lines="1 3 7" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` ### Import the `APIRouter` @@ -352,7 +352,7 @@ And we can even declare [global dependencies](dependencies/global-dependencies.m Now we import the other submodules that have `APIRouter`s: ```Python hl_lines="4-5" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` As the files `app/routers/users.py` and `app/routers/items.py` are submodules that are part of the same Python package `app`, we can use a single dot `.` to import them using "relative imports". @@ -417,7 +417,7 @@ the `router` from `users` would overwrite the one from `items` and we wouldn't b So, to be able to use both of them in the same file, we import the submodules directly: ```Python hl_lines="5" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` ### Include the `APIRouter`s for `users` and `items` @@ -425,7 +425,7 @@ So, to be able to use both of them in the same file, we import the submodules di Now, let's include the `router`s from the submodules `users` and `items`: ```Python hl_lines="10-11" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` /// info @@ -467,7 +467,7 @@ It contains an `APIRouter` with some admin *path operations* that your organizat For this example it will be super simple. But let's say that because it is shared with other projects in the organization, we cannot modify it and add a `prefix`, `dependencies`, `tags`, etc. directly to the `APIRouter`: ```Python hl_lines="3" title="app/internal/admin.py" -{!../../../docs_src/bigger_applications/app/internal/admin.py!} +{!../../docs_src/bigger_applications/app/internal/admin.py!} ``` But we still want to set a custom `prefix` when including the `APIRouter` so that all its *path operations* start with `/admin`, we want to secure it with the `dependencies` we already have for this project, and we want to include `tags` and `responses`. @@ -475,7 +475,7 @@ But we still want to set a custom `prefix` when including the `APIRouter` so tha We can declare all that without having to modify the original `APIRouter` by passing those parameters to `app.include_router()`: ```Python hl_lines="14-17" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` That way, the original `APIRouter` will stay unmodified, so we can still share that same `app/internal/admin.py` file with other projects in the organization. @@ -498,7 +498,7 @@ We can also add *path operations* directly to the `FastAPI` app. Here we do it... just to show that we can đŸ€·: ```Python hl_lines="21-23" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` and it will work correctly, together with all the other *path operations* added with `app.include_router()`. diff --git a/docs/en/docs/tutorial/body-fields.md b/docs/en/docs/tutorial/body-fields.md index 466df29f1..30a5c623f 100644 --- a/docs/en/docs/tutorial/body-fields.md +++ b/docs/en/docs/tutorial/body-fields.md @@ -9,7 +9,7 @@ First, you have to import it: //// tab | Python 3.10+ ```Python hl_lines="4" -{!> ../../../docs_src/body_fields/tutorial001_an_py310.py!} +{!> ../../docs_src/body_fields/tutorial001_an_py310.py!} ``` //// @@ -17,7 +17,7 @@ First, you have to import it: //// tab | Python 3.9+ ```Python hl_lines="4" -{!> ../../../docs_src/body_fields/tutorial001_an_py39.py!} +{!> ../../docs_src/body_fields/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ First, you have to import it: //// tab | Python 3.8+ ```Python hl_lines="4" -{!> ../../../docs_src/body_fields/tutorial001_an.py!} +{!> ../../docs_src/body_fields/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="2" -{!> ../../../docs_src/body_fields/tutorial001_py310.py!} +{!> ../../docs_src/body_fields/tutorial001_py310.py!} ``` //// @@ -53,7 +53,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="4" -{!> ../../../docs_src/body_fields/tutorial001.py!} +{!> ../../docs_src/body_fields/tutorial001.py!} ``` //// @@ -71,7 +71,7 @@ You can then use `Field` with model attributes: //// tab | Python 3.10+ ```Python hl_lines="11-14" -{!> ../../../docs_src/body_fields/tutorial001_an_py310.py!} +{!> ../../docs_src/body_fields/tutorial001_an_py310.py!} ``` //// @@ -79,7 +79,7 @@ You can then use `Field` with model attributes: //// tab | Python 3.9+ ```Python hl_lines="11-14" -{!> ../../../docs_src/body_fields/tutorial001_an_py39.py!} +{!> ../../docs_src/body_fields/tutorial001_an_py39.py!} ``` //// @@ -87,7 +87,7 @@ You can then use `Field` with model attributes: //// tab | Python 3.8+ ```Python hl_lines="12-15" -{!> ../../../docs_src/body_fields/tutorial001_an.py!} +{!> ../../docs_src/body_fields/tutorial001_an.py!} ``` //// @@ -101,7 +101,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9-12" -{!> ../../../docs_src/body_fields/tutorial001_py310.py!} +{!> ../../docs_src/body_fields/tutorial001_py310.py!} ``` //// @@ -115,7 +115,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="11-14" -{!> ../../../docs_src/body_fields/tutorial001.py!} +{!> ../../docs_src/body_fields/tutorial001.py!} ``` //// diff --git a/docs/en/docs/tutorial/body-multiple-params.md b/docs/en/docs/tutorial/body-multiple-params.md index d63cd2529..eebbb3fe4 100644 --- a/docs/en/docs/tutorial/body-multiple-params.md +++ b/docs/en/docs/tutorial/body-multiple-params.md @@ -11,7 +11,7 @@ And you can also declare body parameters as optional, by setting the default to //// tab | Python 3.10+ ```Python hl_lines="18-20" -{!> ../../../docs_src/body_multiple_params/tutorial001_an_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial001_an_py310.py!} ``` //// @@ -19,7 +19,7 @@ And you can also declare body parameters as optional, by setting the default to //// tab | Python 3.9+ ```Python hl_lines="18-20" -{!> ../../../docs_src/body_multiple_params/tutorial001_an_py39.py!} +{!> ../../docs_src/body_multiple_params/tutorial001_an_py39.py!} ``` //// @@ -27,7 +27,7 @@ And you can also declare body parameters as optional, by setting the default to //// tab | Python 3.8+ ```Python hl_lines="19-21" -{!> ../../../docs_src/body_multiple_params/tutorial001_an.py!} +{!> ../../docs_src/body_multiple_params/tutorial001_an.py!} ``` //// @@ -41,7 +41,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="17-19" -{!> ../../../docs_src/body_multiple_params/tutorial001_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial001_py310.py!} ``` //// @@ -55,7 +55,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="19-21" -{!> ../../../docs_src/body_multiple_params/tutorial001.py!} +{!> ../../docs_src/body_multiple_params/tutorial001.py!} ``` //// @@ -84,7 +84,7 @@ But you can also declare multiple body parameters, e.g. `item` and `user`: //// tab | Python 3.10+ ```Python hl_lines="20" -{!> ../../../docs_src/body_multiple_params/tutorial002_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial002_py310.py!} ``` //// @@ -92,7 +92,7 @@ But you can also declare multiple body parameters, e.g. `item` and `user`: //// tab | Python 3.8+ ```Python hl_lines="22" -{!> ../../../docs_src/body_multiple_params/tutorial002.py!} +{!> ../../docs_src/body_multiple_params/tutorial002.py!} ``` //// @@ -139,7 +139,7 @@ But you can instruct **FastAPI** to treat it as another body key using `Body`: //// tab | Python 3.10+ ```Python hl_lines="23" -{!> ../../../docs_src/body_multiple_params/tutorial003_an_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial003_an_py310.py!} ``` //// @@ -147,7 +147,7 @@ But you can instruct **FastAPI** to treat it as another body key using `Body`: //// tab | Python 3.9+ ```Python hl_lines="23" -{!> ../../../docs_src/body_multiple_params/tutorial003_an_py39.py!} +{!> ../../docs_src/body_multiple_params/tutorial003_an_py39.py!} ``` //// @@ -155,7 +155,7 @@ But you can instruct **FastAPI** to treat it as another body key using `Body`: //// tab | Python 3.8+ ```Python hl_lines="24" -{!> ../../../docs_src/body_multiple_params/tutorial003_an.py!} +{!> ../../docs_src/body_multiple_params/tutorial003_an.py!} ``` //// @@ -169,7 +169,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="20" -{!> ../../../docs_src/body_multiple_params/tutorial003_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial003_py310.py!} ``` //// @@ -183,7 +183,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="22" -{!> ../../../docs_src/body_multiple_params/tutorial003.py!} +{!> ../../docs_src/body_multiple_params/tutorial003.py!} ``` //// @@ -229,7 +229,7 @@ For example: //// tab | Python 3.10+ ```Python hl_lines="28" -{!> ../../../docs_src/body_multiple_params/tutorial004_an_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial004_an_py310.py!} ``` //// @@ -237,7 +237,7 @@ For example: //// tab | Python 3.9+ ```Python hl_lines="28" -{!> ../../../docs_src/body_multiple_params/tutorial004_an_py39.py!} +{!> ../../docs_src/body_multiple_params/tutorial004_an_py39.py!} ``` //// @@ -245,7 +245,7 @@ For example: //// tab | Python 3.8+ ```Python hl_lines="29" -{!> ../../../docs_src/body_multiple_params/tutorial004_an.py!} +{!> ../../docs_src/body_multiple_params/tutorial004_an.py!} ``` //// @@ -259,7 +259,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="26" -{!> ../../../docs_src/body_multiple_params/tutorial004_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial004_py310.py!} ``` //// @@ -273,7 +273,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="28" -{!> ../../../docs_src/body_multiple_params/tutorial004.py!} +{!> ../../docs_src/body_multiple_params/tutorial004.py!} ``` //// @@ -301,7 +301,7 @@ as in: //// tab | Python 3.10+ ```Python hl_lines="17" -{!> ../../../docs_src/body_multiple_params/tutorial005_an_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial005_an_py310.py!} ``` //// @@ -309,7 +309,7 @@ as in: //// tab | Python 3.9+ ```Python hl_lines="17" -{!> ../../../docs_src/body_multiple_params/tutorial005_an_py39.py!} +{!> ../../docs_src/body_multiple_params/tutorial005_an_py39.py!} ``` //// @@ -317,7 +317,7 @@ as in: //// tab | Python 3.8+ ```Python hl_lines="18" -{!> ../../../docs_src/body_multiple_params/tutorial005_an.py!} +{!> ../../docs_src/body_multiple_params/tutorial005_an.py!} ``` //// @@ -331,7 +331,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="15" -{!> ../../../docs_src/body_multiple_params/tutorial005_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial005_py310.py!} ``` //// @@ -345,7 +345,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="17" -{!> ../../../docs_src/body_multiple_params/tutorial005.py!} +{!> ../../docs_src/body_multiple_params/tutorial005.py!} ``` //// diff --git a/docs/en/docs/tutorial/body-nested-models.md b/docs/en/docs/tutorial/body-nested-models.md index d2bda5979..38f3eb136 100644 --- a/docs/en/docs/tutorial/body-nested-models.md +++ b/docs/en/docs/tutorial/body-nested-models.md @@ -9,7 +9,7 @@ You can define an attribute to be a subtype. For example, a Python `list`: //// tab | Python 3.10+ ```Python hl_lines="12" -{!> ../../../docs_src/body_nested_models/tutorial001_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial001_py310.py!} ``` //// @@ -17,7 +17,7 @@ You can define an attribute to be a subtype. For example, a Python `list`: //// tab | Python 3.8+ ```Python hl_lines="14" -{!> ../../../docs_src/body_nested_models/tutorial001.py!} +{!> ../../docs_src/body_nested_models/tutorial001.py!} ``` //// @@ -35,7 +35,7 @@ In Python 3.9 and above you can use the standard `list` to declare these type an But in Python versions before 3.9 (3.6 and above), you first need to import `List` from standard Python's `typing` module: ```Python hl_lines="1" -{!> ../../../docs_src/body_nested_models/tutorial002.py!} +{!> ../../docs_src/body_nested_models/tutorial002.py!} ``` ### Declare a `list` with a type parameter @@ -68,7 +68,7 @@ So, in our example, we can make `tags` be specifically a "list of strings": //// tab | Python 3.10+ ```Python hl_lines="12" -{!> ../../../docs_src/body_nested_models/tutorial002_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial002_py310.py!} ``` //// @@ -76,7 +76,7 @@ So, in our example, we can make `tags` be specifically a "list of strings": //// tab | Python 3.9+ ```Python hl_lines="14" -{!> ../../../docs_src/body_nested_models/tutorial002_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial002_py39.py!} ``` //// @@ -84,7 +84,7 @@ So, in our example, we can make `tags` be specifically a "list of strings": //// tab | Python 3.8+ ```Python hl_lines="14" -{!> ../../../docs_src/body_nested_models/tutorial002.py!} +{!> ../../docs_src/body_nested_models/tutorial002.py!} ``` //// @@ -100,7 +100,7 @@ Then we can declare `tags` as a set of strings: //// tab | Python 3.10+ ```Python hl_lines="12" -{!> ../../../docs_src/body_nested_models/tutorial003_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial003_py310.py!} ``` //// @@ -108,7 +108,7 @@ Then we can declare `tags` as a set of strings: //// tab | Python 3.9+ ```Python hl_lines="14" -{!> ../../../docs_src/body_nested_models/tutorial003_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial003_py39.py!} ``` //// @@ -116,7 +116,7 @@ Then we can declare `tags` as a set of strings: //// tab | Python 3.8+ ```Python hl_lines="1 14" -{!> ../../../docs_src/body_nested_models/tutorial003.py!} +{!> ../../docs_src/body_nested_models/tutorial003.py!} ``` //// @@ -144,7 +144,7 @@ For example, we can define an `Image` model: //// tab | Python 3.10+ ```Python hl_lines="7-9" -{!> ../../../docs_src/body_nested_models/tutorial004_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial004_py310.py!} ``` //// @@ -152,7 +152,7 @@ For example, we can define an `Image` model: //// tab | Python 3.9+ ```Python hl_lines="9-11" -{!> ../../../docs_src/body_nested_models/tutorial004_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial004_py39.py!} ``` //// @@ -160,7 +160,7 @@ For example, we can define an `Image` model: //// tab | Python 3.8+ ```Python hl_lines="9-11" -{!> ../../../docs_src/body_nested_models/tutorial004.py!} +{!> ../../docs_src/body_nested_models/tutorial004.py!} ``` //// @@ -172,7 +172,7 @@ And then we can use it as the type of an attribute: //// tab | Python 3.10+ ```Python hl_lines="18" -{!> ../../../docs_src/body_nested_models/tutorial004_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial004_py310.py!} ``` //// @@ -180,7 +180,7 @@ And then we can use it as the type of an attribute: //// tab | Python 3.9+ ```Python hl_lines="20" -{!> ../../../docs_src/body_nested_models/tutorial004_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial004_py39.py!} ``` //// @@ -188,7 +188,7 @@ And then we can use it as the type of an attribute: //// tab | Python 3.8+ ```Python hl_lines="20" -{!> ../../../docs_src/body_nested_models/tutorial004.py!} +{!> ../../docs_src/body_nested_models/tutorial004.py!} ``` //// @@ -227,7 +227,7 @@ For example, as in the `Image` model we have a `url` field, we can declare it to //// tab | Python 3.10+ ```Python hl_lines="2 8" -{!> ../../../docs_src/body_nested_models/tutorial005_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial005_py310.py!} ``` //// @@ -235,7 +235,7 @@ For example, as in the `Image` model we have a `url` field, we can declare it to //// tab | Python 3.9+ ```Python hl_lines="4 10" -{!> ../../../docs_src/body_nested_models/tutorial005_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial005_py39.py!} ``` //// @@ -243,7 +243,7 @@ For example, as in the `Image` model we have a `url` field, we can declare it to //// tab | Python 3.8+ ```Python hl_lines="4 10" -{!> ../../../docs_src/body_nested_models/tutorial005.py!} +{!> ../../docs_src/body_nested_models/tutorial005.py!} ``` //// @@ -257,7 +257,7 @@ You can also use Pydantic models as subtypes of `list`, `set`, etc.: //// tab | Python 3.10+ ```Python hl_lines="18" -{!> ../../../docs_src/body_nested_models/tutorial006_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial006_py310.py!} ``` //// @@ -265,7 +265,7 @@ You can also use Pydantic models as subtypes of `list`, `set`, etc.: //// tab | Python 3.9+ ```Python hl_lines="20" -{!> ../../../docs_src/body_nested_models/tutorial006_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial006_py39.py!} ``` //// @@ -273,7 +273,7 @@ You can also use Pydantic models as subtypes of `list`, `set`, etc.: //// tab | Python 3.8+ ```Python hl_lines="20" -{!> ../../../docs_src/body_nested_models/tutorial006.py!} +{!> ../../docs_src/body_nested_models/tutorial006.py!} ``` //// @@ -317,7 +317,7 @@ You can define arbitrarily deeply nested models: //// tab | Python 3.10+ ```Python hl_lines="7 12 18 21 25" -{!> ../../../docs_src/body_nested_models/tutorial007_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial007_py310.py!} ``` //// @@ -325,7 +325,7 @@ You can define arbitrarily deeply nested models: //// tab | Python 3.9+ ```Python hl_lines="9 14 20 23 27" -{!> ../../../docs_src/body_nested_models/tutorial007_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial007_py39.py!} ``` //// @@ -333,7 +333,7 @@ You can define arbitrarily deeply nested models: //// tab | Python 3.8+ ```Python hl_lines="9 14 20 23 27" -{!> ../../../docs_src/body_nested_models/tutorial007.py!} +{!> ../../docs_src/body_nested_models/tutorial007.py!} ``` //// @@ -363,7 +363,7 @@ as in: //// tab | Python 3.9+ ```Python hl_lines="13" -{!> ../../../docs_src/body_nested_models/tutorial008_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial008_py39.py!} ``` //// @@ -371,7 +371,7 @@ as in: //// tab | Python 3.8+ ```Python hl_lines="15" -{!> ../../../docs_src/body_nested_models/tutorial008.py!} +{!> ../../docs_src/body_nested_models/tutorial008.py!} ``` //// @@ -407,7 +407,7 @@ In this case, you would accept any `dict` as long as it has `int` keys with `flo //// tab | Python 3.9+ ```Python hl_lines="7" -{!> ../../../docs_src/body_nested_models/tutorial009_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial009_py39.py!} ``` //// @@ -415,7 +415,7 @@ In this case, you would accept any `dict` as long as it has `int` keys with `flo //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/body_nested_models/tutorial009.py!} +{!> ../../docs_src/body_nested_models/tutorial009.py!} ``` //// diff --git a/docs/en/docs/tutorial/body-updates.md b/docs/en/docs/tutorial/body-updates.md index 3257f9a08..3ac2e3914 100644 --- a/docs/en/docs/tutorial/body-updates.md +++ b/docs/en/docs/tutorial/body-updates.md @@ -9,7 +9,7 @@ You can use the `jsonable_encoder` to convert the input data to data that can be //// tab | Python 3.10+ ```Python hl_lines="28-33" -{!> ../../../docs_src/body_updates/tutorial001_py310.py!} +{!> ../../docs_src/body_updates/tutorial001_py310.py!} ``` //// @@ -17,7 +17,7 @@ You can use the `jsonable_encoder` to convert the input data to data that can be //// tab | Python 3.9+ ```Python hl_lines="30-35" -{!> ../../../docs_src/body_updates/tutorial001_py39.py!} +{!> ../../docs_src/body_updates/tutorial001_py39.py!} ``` //// @@ -25,7 +25,7 @@ You can use the `jsonable_encoder` to convert the input data to data that can be //// tab | Python 3.8+ ```Python hl_lines="30-35" -{!> ../../../docs_src/body_updates/tutorial001.py!} +{!> ../../docs_src/body_updates/tutorial001.py!} ``` //// @@ -87,7 +87,7 @@ Then you can use this to generate a `dict` with only the data that was set (sent //// tab | Python 3.10+ ```Python hl_lines="32" -{!> ../../../docs_src/body_updates/tutorial002_py310.py!} +{!> ../../docs_src/body_updates/tutorial002_py310.py!} ``` //// @@ -95,7 +95,7 @@ Then you can use this to generate a `dict` with only the data that was set (sent //// tab | Python 3.9+ ```Python hl_lines="34" -{!> ../../../docs_src/body_updates/tutorial002_py39.py!} +{!> ../../docs_src/body_updates/tutorial002_py39.py!} ``` //// @@ -103,7 +103,7 @@ Then you can use this to generate a `dict` with only the data that was set (sent //// tab | Python 3.8+ ```Python hl_lines="34" -{!> ../../../docs_src/body_updates/tutorial002.py!} +{!> ../../docs_src/body_updates/tutorial002.py!} ``` //// @@ -125,7 +125,7 @@ Like `stored_item_model.model_copy(update=update_data)`: //// tab | Python 3.10+ ```Python hl_lines="33" -{!> ../../../docs_src/body_updates/tutorial002_py310.py!} +{!> ../../docs_src/body_updates/tutorial002_py310.py!} ``` //// @@ -133,7 +133,7 @@ Like `stored_item_model.model_copy(update=update_data)`: //// tab | Python 3.9+ ```Python hl_lines="35" -{!> ../../../docs_src/body_updates/tutorial002_py39.py!} +{!> ../../docs_src/body_updates/tutorial002_py39.py!} ``` //// @@ -141,7 +141,7 @@ Like `stored_item_model.model_copy(update=update_data)`: //// tab | Python 3.8+ ```Python hl_lines="35" -{!> ../../../docs_src/body_updates/tutorial002.py!} +{!> ../../docs_src/body_updates/tutorial002.py!} ``` //// @@ -164,7 +164,7 @@ In summary, to apply partial updates you would: //// tab | Python 3.10+ ```Python hl_lines="28-35" -{!> ../../../docs_src/body_updates/tutorial002_py310.py!} +{!> ../../docs_src/body_updates/tutorial002_py310.py!} ``` //// @@ -172,7 +172,7 @@ In summary, to apply partial updates you would: //// tab | Python 3.9+ ```Python hl_lines="30-37" -{!> ../../../docs_src/body_updates/tutorial002_py39.py!} +{!> ../../docs_src/body_updates/tutorial002_py39.py!} ``` //// @@ -180,7 +180,7 @@ In summary, to apply partial updates you would: //// tab | Python 3.8+ ```Python hl_lines="30-37" -{!> ../../../docs_src/body_updates/tutorial002.py!} +{!> ../../docs_src/body_updates/tutorial002.py!} ``` //// diff --git a/docs/en/docs/tutorial/body.md b/docs/en/docs/tutorial/body.md index 83f08ce84..14d621418 100644 --- a/docs/en/docs/tutorial/body.md +++ b/docs/en/docs/tutorial/body.md @@ -25,7 +25,7 @@ First, you need to import `BaseModel` from `pydantic`: //// tab | Python 3.10+ ```Python hl_lines="2" -{!> ../../../docs_src/body/tutorial001_py310.py!} +{!> ../../docs_src/body/tutorial001_py310.py!} ``` //// @@ -33,7 +33,7 @@ First, you need to import `BaseModel` from `pydantic`: //// tab | Python 3.8+ ```Python hl_lines="4" -{!> ../../../docs_src/body/tutorial001.py!} +{!> ../../docs_src/body/tutorial001.py!} ``` //// @@ -47,7 +47,7 @@ Use standard Python types for all the attributes: //// tab | Python 3.10+ ```Python hl_lines="5-9" -{!> ../../../docs_src/body/tutorial001_py310.py!} +{!> ../../docs_src/body/tutorial001_py310.py!} ``` //// @@ -55,7 +55,7 @@ Use standard Python types for all the attributes: //// tab | Python 3.8+ ```Python hl_lines="7-11" -{!> ../../../docs_src/body/tutorial001.py!} +{!> ../../docs_src/body/tutorial001.py!} ``` //// @@ -89,7 +89,7 @@ To add it to your *path operation*, declare it the same way you declared path an //// tab | Python 3.10+ ```Python hl_lines="16" -{!> ../../../docs_src/body/tutorial001_py310.py!} +{!> ../../docs_src/body/tutorial001_py310.py!} ``` //// @@ -97,7 +97,7 @@ To add it to your *path operation*, declare it the same way you declared path an //// tab | Python 3.8+ ```Python hl_lines="18" -{!> ../../../docs_src/body/tutorial001.py!} +{!> ../../docs_src/body/tutorial001.py!} ``` //// @@ -170,7 +170,7 @@ Inside of the function, you can access all the attributes of the model object di //// tab | Python 3.10+ ```Python hl_lines="19" -{!> ../../../docs_src/body/tutorial002_py310.py!} +{!> ../../docs_src/body/tutorial002_py310.py!} ``` //// @@ -178,7 +178,7 @@ Inside of the function, you can access all the attributes of the model object di //// tab | Python 3.8+ ```Python hl_lines="21" -{!> ../../../docs_src/body/tutorial002.py!} +{!> ../../docs_src/body/tutorial002.py!} ``` //// @@ -192,7 +192,7 @@ You can declare path parameters and request body at the same time. //// tab | Python 3.10+ ```Python hl_lines="15-16" -{!> ../../../docs_src/body/tutorial003_py310.py!} +{!> ../../docs_src/body/tutorial003_py310.py!} ``` //// @@ -200,7 +200,7 @@ You can declare path parameters and request body at the same time. //// tab | Python 3.8+ ```Python hl_lines="17-18" -{!> ../../../docs_src/body/tutorial003.py!} +{!> ../../docs_src/body/tutorial003.py!} ``` //// @@ -214,7 +214,7 @@ You can also declare **body**, **path** and **query** parameters, all at the sam //// tab | Python 3.10+ ```Python hl_lines="16" -{!> ../../../docs_src/body/tutorial004_py310.py!} +{!> ../../docs_src/body/tutorial004_py310.py!} ``` //// @@ -222,7 +222,7 @@ You can also declare **body**, **path** and **query** parameters, all at the sam //// tab | Python 3.8+ ```Python hl_lines="18" -{!> ../../../docs_src/body/tutorial004.py!} +{!> ../../docs_src/body/tutorial004.py!} ``` //// diff --git a/docs/en/docs/tutorial/cookie-param-models.md b/docs/en/docs/tutorial/cookie-param-models.md index 2aa3a1f59..62cafbb23 100644 --- a/docs/en/docs/tutorial/cookie-param-models.md +++ b/docs/en/docs/tutorial/cookie-param-models.md @@ -23,7 +23,7 @@ Declare the **cookie** parameters that you need in a **Pydantic model**, and the //// tab | Python 3.10+ ```Python hl_lines="9-12 16" -{!> ../../../docs_src/cookie_param_models/tutorial001_an_py310.py!} +{!> ../../docs_src/cookie_param_models/tutorial001_an_py310.py!} ``` //// @@ -31,7 +31,7 @@ Declare the **cookie** parameters that you need in a **Pydantic model**, and the //// tab | Python 3.9+ ```Python hl_lines="9-12 16" -{!> ../../../docs_src/cookie_param_models/tutorial001_an_py39.py!} +{!> ../../docs_src/cookie_param_models/tutorial001_an_py39.py!} ``` //// @@ -39,7 +39,7 @@ Declare the **cookie** parameters that you need in a **Pydantic model**, and the //// tab | Python 3.8+ ```Python hl_lines="10-13 17" -{!> ../../../docs_src/cookie_param_models/tutorial001_an.py!} +{!> ../../docs_src/cookie_param_models/tutorial001_an.py!} ``` //// @@ -53,7 +53,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7-10 14" -{!> ../../../docs_src/cookie_param_models/tutorial001_py310.py!} +{!> ../../docs_src/cookie_param_models/tutorial001_py310.py!} ``` //// @@ -67,7 +67,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9-12 16" -{!> ../../../docs_src/cookie_param_models/tutorial001.py!} +{!> ../../docs_src/cookie_param_models/tutorial001.py!} ``` //// @@ -103,7 +103,7 @@ You can use Pydantic's model configuration to `forbid` any `extra` fields: //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/cookie_param_models/tutorial002_an_py39.py!} +{!> ../../docs_src/cookie_param_models/tutorial002_an_py39.py!} ``` //// @@ -111,7 +111,7 @@ You can use Pydantic's model configuration to `forbid` any `extra` fields: //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/cookie_param_models/tutorial002_an.py!} +{!> ../../docs_src/cookie_param_models/tutorial002_an.py!} ``` //// @@ -125,7 +125,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="10" -{!> ../../../docs_src/cookie_param_models/tutorial002.py!} +{!> ../../docs_src/cookie_param_models/tutorial002.py!} ``` //// diff --git a/docs/en/docs/tutorial/cookie-params.md b/docs/en/docs/tutorial/cookie-params.md index 0214a9c38..8804f854f 100644 --- a/docs/en/docs/tutorial/cookie-params.md +++ b/docs/en/docs/tutorial/cookie-params.md @@ -9,7 +9,7 @@ First import `Cookie`: //// tab | Python 3.10+ ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py310.py!} ``` //// @@ -17,7 +17,7 @@ First import `Cookie`: //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ First import `Cookie`: //// tab | Python 3.8+ ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001_an.py!} +{!> ../../docs_src/cookie_params/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="1" -{!> ../../../docs_src/cookie_params/tutorial001_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_py310.py!} ``` //// @@ -53,7 +53,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001.py!} +{!> ../../docs_src/cookie_params/tutorial001.py!} ``` //// @@ -67,7 +67,7 @@ You can define the default value as well as all the extra validation or annotati //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py310.py!} ``` //// @@ -75,7 +75,7 @@ You can define the default value as well as all the extra validation or annotati //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py39.py!} ``` //// @@ -83,7 +83,7 @@ You can define the default value as well as all the extra validation or annotati //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/cookie_params/tutorial001_an.py!} +{!> ../../docs_src/cookie_params/tutorial001_an.py!} ``` //// @@ -97,7 +97,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7" -{!> ../../../docs_src/cookie_params/tutorial001_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_py310.py!} ``` //// @@ -111,7 +111,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001.py!} +{!> ../../docs_src/cookie_params/tutorial001.py!} ``` //// diff --git a/docs/en/docs/tutorial/cors.md b/docs/en/docs/tutorial/cors.md index 7dd0a5df5..8dfc9bad9 100644 --- a/docs/en/docs/tutorial/cors.md +++ b/docs/en/docs/tutorial/cors.md @@ -47,7 +47,7 @@ You can also specify whether your backend allows: * Specific HTTP headers or all of them with the wildcard `"*"`. ```Python hl_lines="2 6-11 13-19" -{!../../../docs_src/cors/tutorial001.py!} +{!../../docs_src/cors/tutorial001.py!} ``` The default parameters used by the `CORSMiddleware` implementation are restrictive by default, so you'll need to explicitly enable particular origins, methods, or headers, in order for browsers to be permitted to use them in a Cross-Domain context. diff --git a/docs/en/docs/tutorial/debugging.md b/docs/en/docs/tutorial/debugging.md index c520a631d..6c0177853 100644 --- a/docs/en/docs/tutorial/debugging.md +++ b/docs/en/docs/tutorial/debugging.md @@ -7,7 +7,7 @@ You can connect the debugger in your editor, for example with Visual Studio Code In your FastAPI application, import and run `uvicorn` directly: ```Python hl_lines="1 15" -{!../../../docs_src/debugging/tutorial001.py!} +{!../../docs_src/debugging/tutorial001.py!} ``` ### About `__name__ == "__main__"` diff --git a/docs/en/docs/tutorial/dependencies/classes-as-dependencies.md b/docs/en/docs/tutorial/dependencies/classes-as-dependencies.md index b3394f14e..defd61a0d 100644 --- a/docs/en/docs/tutorial/dependencies/classes-as-dependencies.md +++ b/docs/en/docs/tutorial/dependencies/classes-as-dependencies.md @@ -9,7 +9,7 @@ In the previous example, we were returning a `dict` from our dependency ("depend //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/dependencies/tutorial001_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// @@ -17,7 +17,7 @@ In the previous example, we were returning a `dict` from our dependency ("depend //// tab | Python 3.9+ ```Python hl_lines="11" -{!> ../../../docs_src/dependencies/tutorial001_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ In the previous example, we were returning a `dict` from our dependency ("depend //// tab | Python 3.8+ ```Python hl_lines="12" -{!> ../../../docs_src/dependencies/tutorial001_an.py!} +{!> ../../docs_src/dependencies/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -53,7 +53,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="11" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -122,7 +122,7 @@ Then, we can change the dependency "dependable" `common_parameters` from above t //// tab | Python 3.10+ ```Python hl_lines="11-15" -{!> ../../../docs_src/dependencies/tutorial002_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_an_py310.py!} ``` //// @@ -130,7 +130,7 @@ Then, we can change the dependency "dependable" `common_parameters` from above t //// tab | Python 3.9+ ```Python hl_lines="11-15" -{!> ../../../docs_src/dependencies/tutorial002_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial002_an_py39.py!} ``` //// @@ -138,7 +138,7 @@ Then, we can change the dependency "dependable" `common_parameters` from above t //// tab | Python 3.8+ ```Python hl_lines="12-16" -{!> ../../../docs_src/dependencies/tutorial002_an.py!} +{!> ../../docs_src/dependencies/tutorial002_an.py!} ``` //// @@ -152,7 +152,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9-13" -{!> ../../../docs_src/dependencies/tutorial002_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_py310.py!} ``` //// @@ -166,7 +166,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="11-15" -{!> ../../../docs_src/dependencies/tutorial002.py!} +{!> ../../docs_src/dependencies/tutorial002.py!} ``` //// @@ -176,7 +176,7 @@ Pay attention to the `__init__` method used to create the instance of the class: //// tab | Python 3.10+ ```Python hl_lines="12" -{!> ../../../docs_src/dependencies/tutorial002_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_an_py310.py!} ``` //// @@ -184,7 +184,7 @@ Pay attention to the `__init__` method used to create the instance of the class: //// tab | Python 3.9+ ```Python hl_lines="12" -{!> ../../../docs_src/dependencies/tutorial002_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial002_an_py39.py!} ``` //// @@ -192,7 +192,7 @@ Pay attention to the `__init__` method used to create the instance of the class: //// tab | Python 3.8+ ```Python hl_lines="13" -{!> ../../../docs_src/dependencies/tutorial002_an.py!} +{!> ../../docs_src/dependencies/tutorial002_an.py!} ``` //// @@ -206,7 +206,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="10" -{!> ../../../docs_src/dependencies/tutorial002_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_py310.py!} ``` //// @@ -220,7 +220,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="12" -{!> ../../../docs_src/dependencies/tutorial002.py!} +{!> ../../docs_src/dependencies/tutorial002.py!} ``` //// @@ -230,7 +230,7 @@ Prefer to use the `Annotated` version if possible. //// tab | Python 3.10+ ```Python hl_lines="8" -{!> ../../../docs_src/dependencies/tutorial001_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// @@ -238,7 +238,7 @@ Prefer to use the `Annotated` version if possible. //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/dependencies/tutorial001_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py39.py!} ``` //// @@ -246,7 +246,7 @@ Prefer to use the `Annotated` version if possible. //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/dependencies/tutorial001_an.py!} +{!> ../../docs_src/dependencies/tutorial001_an.py!} ``` //// @@ -260,7 +260,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="6" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -274,7 +274,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -296,7 +296,7 @@ Now you can declare your dependency using this class. //// tab | Python 3.10+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial002_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_an_py310.py!} ``` //// @@ -304,7 +304,7 @@ Now you can declare your dependency using this class. //// tab | Python 3.9+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial002_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial002_an_py39.py!} ``` //// @@ -312,7 +312,7 @@ Now you can declare your dependency using this class. //// tab | Python 3.8+ ```Python hl_lines="20" -{!> ../../../docs_src/dependencies/tutorial002_an.py!} +{!> ../../docs_src/dependencies/tutorial002_an.py!} ``` //// @@ -326,7 +326,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial002_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_py310.py!} ``` //// @@ -340,7 +340,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial002.py!} +{!> ../../docs_src/dependencies/tutorial002.py!} ``` //// @@ -440,7 +440,7 @@ commons = Depends(CommonQueryParams) //// tab | Python 3.10+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial003_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial003_an_py310.py!} ``` //// @@ -448,7 +448,7 @@ commons = Depends(CommonQueryParams) //// tab | Python 3.9+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial003_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial003_an_py39.py!} ``` //// @@ -456,7 +456,7 @@ commons = Depends(CommonQueryParams) //// tab | Python 3.8+ ```Python hl_lines="20" -{!> ../../../docs_src/dependencies/tutorial003_an.py!} +{!> ../../docs_src/dependencies/tutorial003_an.py!} ``` //// @@ -470,7 +470,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial003_py310.py!} +{!> ../../docs_src/dependencies/tutorial003_py310.py!} ``` //// @@ -484,7 +484,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial003.py!} +{!> ../../docs_src/dependencies/tutorial003.py!} ``` //// @@ -578,7 +578,7 @@ The same example would then look like: //// tab | Python 3.10+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial004_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial004_an_py310.py!} ``` //// @@ -586,7 +586,7 @@ The same example would then look like: //// tab | Python 3.9+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial004_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial004_an_py39.py!} ``` //// @@ -594,7 +594,7 @@ The same example would then look like: //// tab | Python 3.8+ ```Python hl_lines="20" -{!> ../../../docs_src/dependencies/tutorial004_an.py!} +{!> ../../docs_src/dependencies/tutorial004_an.py!} ``` //// @@ -608,7 +608,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial004_py310.py!} +{!> ../../docs_src/dependencies/tutorial004_py310.py!} ``` //// @@ -622,7 +622,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial004.py!} +{!> ../../docs_src/dependencies/tutorial004.py!} ``` //// diff --git a/docs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md b/docs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md index 7c3ac7922..e89d520be 100644 --- a/docs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md +++ b/docs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md @@ -17,7 +17,7 @@ It should be a `list` of `Depends()`: //// tab | Python 3.9+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial006_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial006_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ It should be a `list` of `Depends()`: //// tab | Python 3.8+ ```Python hl_lines="18" -{!> ../../../docs_src/dependencies/tutorial006_an.py!} +{!> ../../docs_src/dependencies/tutorial006_an.py!} ``` //// @@ -39,7 +39,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial006.py!} +{!> ../../docs_src/dependencies/tutorial006.py!} ``` //// @@ -75,7 +75,7 @@ They can declare request requirements (like headers) or other sub-dependencies: //// tab | Python 3.9+ ```Python hl_lines="8 13" -{!> ../../../docs_src/dependencies/tutorial006_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial006_an_py39.py!} ``` //// @@ -83,7 +83,7 @@ They can declare request requirements (like headers) or other sub-dependencies: //// tab | Python 3.8+ ```Python hl_lines="7 12" -{!> ../../../docs_src/dependencies/tutorial006_an.py!} +{!> ../../docs_src/dependencies/tutorial006_an.py!} ``` //// @@ -97,7 +97,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="6 11" -{!> ../../../docs_src/dependencies/tutorial006.py!} +{!> ../../docs_src/dependencies/tutorial006.py!} ``` //// @@ -109,7 +109,7 @@ These dependencies can `raise` exceptions, the same as normal dependencies: //// tab | Python 3.9+ ```Python hl_lines="10 15" -{!> ../../../docs_src/dependencies/tutorial006_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial006_an_py39.py!} ``` //// @@ -117,7 +117,7 @@ These dependencies can `raise` exceptions, the same as normal dependencies: //// tab | Python 3.8+ ```Python hl_lines="9 14" -{!> ../../../docs_src/dependencies/tutorial006_an.py!} +{!> ../../docs_src/dependencies/tutorial006_an.py!} ``` //// @@ -131,7 +131,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="8 13" -{!> ../../../docs_src/dependencies/tutorial006.py!} +{!> ../../docs_src/dependencies/tutorial006.py!} ``` //// @@ -145,7 +145,7 @@ So, you can reuse a normal dependency (that returns a value) you already use som //// tab | Python 3.9+ ```Python hl_lines="11 16" -{!> ../../../docs_src/dependencies/tutorial006_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial006_an_py39.py!} ``` //// @@ -153,7 +153,7 @@ So, you can reuse a normal dependency (that returns a value) you already use som //// tab | Python 3.8+ ```Python hl_lines="10 15" -{!> ../../../docs_src/dependencies/tutorial006_an.py!} +{!> ../../docs_src/dependencies/tutorial006_an.py!} ``` //// @@ -167,7 +167,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9 14" -{!> ../../../docs_src/dependencies/tutorial006.py!} +{!> ../../docs_src/dependencies/tutorial006.py!} ``` //// diff --git a/docs/en/docs/tutorial/dependencies/dependencies-with-yield.md b/docs/en/docs/tutorial/dependencies/dependencies-with-yield.md index 2a3ac2237..97da668aa 100644 --- a/docs/en/docs/tutorial/dependencies/dependencies-with-yield.md +++ b/docs/en/docs/tutorial/dependencies/dependencies-with-yield.md @@ -30,19 +30,19 @@ For example, you could use this to create a database session and close it after Only the code prior to and including the `yield` statement is executed before creating a response: ```Python hl_lines="2-4" -{!../../../docs_src/dependencies/tutorial007.py!} +{!../../docs_src/dependencies/tutorial007.py!} ``` The yielded value is what is injected into *path operations* and other dependencies: ```Python hl_lines="4" -{!../../../docs_src/dependencies/tutorial007.py!} +{!../../docs_src/dependencies/tutorial007.py!} ``` The code following the `yield` statement is executed after the response has been delivered: ```Python hl_lines="5-6" -{!../../../docs_src/dependencies/tutorial007.py!} +{!../../docs_src/dependencies/tutorial007.py!} ``` /// tip @@ -64,7 +64,7 @@ So, you can look for that specific exception inside the dependency with `except In the same way, you can use `finally` to make sure the exit steps are executed, no matter if there was an exception or not. ```Python hl_lines="3 5" -{!../../../docs_src/dependencies/tutorial007.py!} +{!../../docs_src/dependencies/tutorial007.py!} ``` ## Sub-dependencies with `yield` @@ -78,7 +78,7 @@ For example, `dependency_c` can have a dependency on `dependency_b`, and `depend //// tab | Python 3.9+ ```Python hl_lines="6 14 22" -{!> ../../../docs_src/dependencies/tutorial008_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial008_an_py39.py!} ``` //// @@ -86,7 +86,7 @@ For example, `dependency_c` can have a dependency on `dependency_b`, and `depend //// tab | Python 3.8+ ```Python hl_lines="5 13 21" -{!> ../../../docs_src/dependencies/tutorial008_an.py!} +{!> ../../docs_src/dependencies/tutorial008_an.py!} ``` //// @@ -100,7 +100,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="4 12 20" -{!> ../../../docs_src/dependencies/tutorial008.py!} +{!> ../../docs_src/dependencies/tutorial008.py!} ``` //// @@ -114,7 +114,7 @@ And, in turn, `dependency_b` needs the value from `dependency_a` (here named `de //// tab | Python 3.9+ ```Python hl_lines="18-19 26-27" -{!> ../../../docs_src/dependencies/tutorial008_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial008_an_py39.py!} ``` //// @@ -122,7 +122,7 @@ And, in turn, `dependency_b` needs the value from `dependency_a` (here named `de //// tab | Python 3.8+ ```Python hl_lines="17-18 25-26" -{!> ../../../docs_src/dependencies/tutorial008_an.py!} +{!> ../../docs_src/dependencies/tutorial008_an.py!} ``` //// @@ -136,7 +136,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="16-17 24-25" -{!> ../../../docs_src/dependencies/tutorial008.py!} +{!> ../../docs_src/dependencies/tutorial008.py!} ``` //// @@ -174,7 +174,7 @@ But it's there for you if you need it. đŸ€“ //// tab | Python 3.9+ ```Python hl_lines="18-22 31" -{!> ../../../docs_src/dependencies/tutorial008b_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial008b_an_py39.py!} ``` //// @@ -182,7 +182,7 @@ But it's there for you if you need it. đŸ€“ //// tab | Python 3.8+ ```Python hl_lines="17-21 30" -{!> ../../../docs_src/dependencies/tutorial008b_an.py!} +{!> ../../docs_src/dependencies/tutorial008b_an.py!} ``` //// @@ -196,7 +196,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="16-20 29" -{!> ../../../docs_src/dependencies/tutorial008b.py!} +{!> ../../docs_src/dependencies/tutorial008b.py!} ``` //// @@ -210,7 +210,7 @@ If you catch an exception using `except` in a dependency with `yield` and you do //// tab | Python 3.9+ ```Python hl_lines="15-16" -{!> ../../../docs_src/dependencies/tutorial008c_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial008c_an_py39.py!} ``` //// @@ -218,7 +218,7 @@ If you catch an exception using `except` in a dependency with `yield` and you do //// tab | Python 3.8+ ```Python hl_lines="14-15" -{!> ../../../docs_src/dependencies/tutorial008c_an.py!} +{!> ../../docs_src/dependencies/tutorial008c_an.py!} ``` //// @@ -232,7 +232,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="13-14" -{!> ../../../docs_src/dependencies/tutorial008c.py!} +{!> ../../docs_src/dependencies/tutorial008c.py!} ``` //// @@ -248,7 +248,7 @@ You can re-raise the same exception using `raise`: //// tab | Python 3.9+ ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial008d_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial008d_an_py39.py!} ``` //// @@ -256,7 +256,7 @@ You can re-raise the same exception using `raise`: //// tab | Python 3.8+ ```Python hl_lines="16" -{!> ../../../docs_src/dependencies/tutorial008d_an.py!} +{!> ../../docs_src/dependencies/tutorial008d_an.py!} ``` //// @@ -270,7 +270,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="15" -{!> ../../../docs_src/dependencies/tutorial008d.py!} +{!> ../../docs_src/dependencies/tutorial008d.py!} ``` //// @@ -404,7 +404,7 @@ You can also use them inside of **FastAPI** dependencies with `yield` by using `with` or `async with` statements inside of the dependency function: ```Python hl_lines="1-9 13" -{!../../../docs_src/dependencies/tutorial010.py!} +{!../../docs_src/dependencies/tutorial010.py!} ``` /// tip diff --git a/docs/en/docs/tutorial/dependencies/global-dependencies.md b/docs/en/docs/tutorial/dependencies/global-dependencies.md index 03a9a42f0..21a8cb6be 100644 --- a/docs/en/docs/tutorial/dependencies/global-dependencies.md +++ b/docs/en/docs/tutorial/dependencies/global-dependencies.md @@ -9,7 +9,7 @@ In that case, they will be applied to all the *path operations* in the applicati //// tab | Python 3.9+ ```Python hl_lines="16" -{!> ../../../docs_src/dependencies/tutorial012_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial012_an_py39.py!} ``` //// @@ -17,7 +17,7 @@ In that case, they will be applied to all the *path operations* in the applicati //// tab | Python 3.8+ ```Python hl_lines="16" -{!> ../../../docs_src/dependencies/tutorial012_an.py!} +{!> ../../docs_src/dependencies/tutorial012_an.py!} ``` //// @@ -31,7 +31,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="15" -{!> ../../../docs_src/dependencies/tutorial012.py!} +{!> ../../docs_src/dependencies/tutorial012.py!} ``` //// diff --git a/docs/en/docs/tutorial/dependencies/index.md b/docs/en/docs/tutorial/dependencies/index.md index a608222f2..b50edb98e 100644 --- a/docs/en/docs/tutorial/dependencies/index.md +++ b/docs/en/docs/tutorial/dependencies/index.md @@ -34,7 +34,7 @@ It is just a function that can take all the same parameters that a *path operati //// tab | Python 3.10+ ```Python hl_lines="8-9" -{!> ../../../docs_src/dependencies/tutorial001_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// @@ -42,7 +42,7 @@ It is just a function that can take all the same parameters that a *path operati //// tab | Python 3.9+ ```Python hl_lines="8-11" -{!> ../../../docs_src/dependencies/tutorial001_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py39.py!} ``` //// @@ -50,7 +50,7 @@ It is just a function that can take all the same parameters that a *path operati //// tab | Python 3.8+ ```Python hl_lines="9-12" -{!> ../../../docs_src/dependencies/tutorial001_an.py!} +{!> ../../docs_src/dependencies/tutorial001_an.py!} ``` //// @@ -64,7 +64,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="6-7" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -78,7 +78,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="8-11" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -116,7 +116,7 @@ Make sure you [Upgrade the FastAPI version](../../deployment/versions.md#upgradi //// tab | Python 3.10+ ```Python hl_lines="3" -{!> ../../../docs_src/dependencies/tutorial001_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// @@ -124,7 +124,7 @@ Make sure you [Upgrade the FastAPI version](../../deployment/versions.md#upgradi //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/dependencies/tutorial001_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py39.py!} ``` //// @@ -132,7 +132,7 @@ Make sure you [Upgrade the FastAPI version](../../deployment/versions.md#upgradi //// tab | Python 3.8+ ```Python hl_lines="3" -{!> ../../../docs_src/dependencies/tutorial001_an.py!} +{!> ../../docs_src/dependencies/tutorial001_an.py!} ``` //// @@ -146,7 +146,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="1" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -160,7 +160,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="3" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -172,7 +172,7 @@ The same way you use `Body`, `Query`, etc. with your *path operation function* p //// tab | Python 3.10+ ```Python hl_lines="13 18" -{!> ../../../docs_src/dependencies/tutorial001_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// @@ -180,7 +180,7 @@ The same way you use `Body`, `Query`, etc. with your *path operation function* p //// tab | Python 3.9+ ```Python hl_lines="15 20" -{!> ../../../docs_src/dependencies/tutorial001_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py39.py!} ``` //// @@ -188,7 +188,7 @@ The same way you use `Body`, `Query`, etc. with your *path operation function* p //// tab | Python 3.8+ ```Python hl_lines="16 21" -{!> ../../../docs_src/dependencies/tutorial001_an.py!} +{!> ../../docs_src/dependencies/tutorial001_an.py!} ``` //// @@ -202,7 +202,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="11 16" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -216,7 +216,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="15 20" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -279,7 +279,7 @@ But because we are using `Annotated`, we can store that `Annotated` value in a v //// tab | Python 3.10+ ```Python hl_lines="12 16 21" -{!> ../../../docs_src/dependencies/tutorial001_02_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_02_an_py310.py!} ``` //// @@ -287,7 +287,7 @@ But because we are using `Annotated`, we can store that `Annotated` value in a v //// tab | Python 3.9+ ```Python hl_lines="14 18 23" -{!> ../../../docs_src/dependencies/tutorial001_02_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_02_an_py39.py!} ``` //// @@ -295,7 +295,7 @@ But because we are using `Annotated`, we can store that `Annotated` value in a v //// tab | Python 3.8+ ```Python hl_lines="15 19 24" -{!> ../../../docs_src/dependencies/tutorial001_02_an.py!} +{!> ../../docs_src/dependencies/tutorial001_02_an.py!} ``` //// diff --git a/docs/en/docs/tutorial/dependencies/sub-dependencies.md b/docs/en/docs/tutorial/dependencies/sub-dependencies.md index 85b252e13..2b098d159 100644 --- a/docs/en/docs/tutorial/dependencies/sub-dependencies.md +++ b/docs/en/docs/tutorial/dependencies/sub-dependencies.md @@ -13,7 +13,7 @@ You could create a first dependency ("dependable") like: //// tab | Python 3.10+ ```Python hl_lines="8-9" -{!> ../../../docs_src/dependencies/tutorial005_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_an_py310.py!} ``` //// @@ -21,7 +21,7 @@ You could create a first dependency ("dependable") like: //// tab | Python 3.9+ ```Python hl_lines="8-9" -{!> ../../../docs_src/dependencies/tutorial005_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial005_an_py39.py!} ``` //// @@ -29,7 +29,7 @@ You could create a first dependency ("dependable") like: //// tab | Python 3.8+ ```Python hl_lines="9-10" -{!> ../../../docs_src/dependencies/tutorial005_an.py!} +{!> ../../docs_src/dependencies/tutorial005_an.py!} ``` //// @@ -43,7 +43,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="6-7" -{!> ../../../docs_src/dependencies/tutorial005_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_py310.py!} ``` //// @@ -57,7 +57,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="8-9" -{!> ../../../docs_src/dependencies/tutorial005.py!} +{!> ../../docs_src/dependencies/tutorial005.py!} ``` //// @@ -73,7 +73,7 @@ Then you can create another dependency function (a "dependable") that at the sam //// tab | Python 3.10+ ```Python hl_lines="13" -{!> ../../../docs_src/dependencies/tutorial005_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_an_py310.py!} ``` //// @@ -81,7 +81,7 @@ Then you can create another dependency function (a "dependable") that at the sam //// tab | Python 3.9+ ```Python hl_lines="13" -{!> ../../../docs_src/dependencies/tutorial005_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial005_an_py39.py!} ``` //// @@ -89,7 +89,7 @@ Then you can create another dependency function (a "dependable") that at the sam //// tab | Python 3.8+ ```Python hl_lines="14" -{!> ../../../docs_src/dependencies/tutorial005_an.py!} +{!> ../../docs_src/dependencies/tutorial005_an.py!} ``` //// @@ -103,7 +103,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="11" -{!> ../../../docs_src/dependencies/tutorial005_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_py310.py!} ``` //// @@ -117,7 +117,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="13" -{!> ../../../docs_src/dependencies/tutorial005.py!} +{!> ../../docs_src/dependencies/tutorial005.py!} ``` //// @@ -136,7 +136,7 @@ Then we can use the dependency with: //// tab | Python 3.10+ ```Python hl_lines="23" -{!> ../../../docs_src/dependencies/tutorial005_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_an_py310.py!} ``` //// @@ -144,7 +144,7 @@ Then we can use the dependency with: //// tab | Python 3.9+ ```Python hl_lines="23" -{!> ../../../docs_src/dependencies/tutorial005_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial005_an_py39.py!} ``` //// @@ -152,7 +152,7 @@ Then we can use the dependency with: //// tab | Python 3.8+ ```Python hl_lines="24" -{!> ../../../docs_src/dependencies/tutorial005_an.py!} +{!> ../../docs_src/dependencies/tutorial005_an.py!} ``` //// @@ -166,7 +166,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial005_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_py310.py!} ``` //// @@ -180,7 +180,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="22" -{!> ../../../docs_src/dependencies/tutorial005.py!} +{!> ../../docs_src/dependencies/tutorial005.py!} ``` //// diff --git a/docs/en/docs/tutorial/encoder.md b/docs/en/docs/tutorial/encoder.md index c110a2ac5..039ac6714 100644 --- a/docs/en/docs/tutorial/encoder.md +++ b/docs/en/docs/tutorial/encoder.md @@ -23,7 +23,7 @@ It receives an object, like a Pydantic model, and returns a JSON compatible vers //// tab | Python 3.10+ ```Python hl_lines="4 21" -{!> ../../../docs_src/encoder/tutorial001_py310.py!} +{!> ../../docs_src/encoder/tutorial001_py310.py!} ``` //// @@ -31,7 +31,7 @@ It receives an object, like a Pydantic model, and returns a JSON compatible vers //// tab | Python 3.8+ ```Python hl_lines="5 22" -{!> ../../../docs_src/encoder/tutorial001.py!} +{!> ../../docs_src/encoder/tutorial001.py!} ``` //// diff --git a/docs/en/docs/tutorial/extra-data-types.md b/docs/en/docs/tutorial/extra-data-types.md index 3009acaf3..65f9f1085 100644 --- a/docs/en/docs/tutorial/extra-data-types.md +++ b/docs/en/docs/tutorial/extra-data-types.md @@ -58,7 +58,7 @@ Here's an example *path operation* with parameters using some of the above types //// tab | Python 3.10+ ```Python hl_lines="1 3 12-16" -{!> ../../../docs_src/extra_data_types/tutorial001_an_py310.py!} +{!> ../../docs_src/extra_data_types/tutorial001_an_py310.py!} ``` //// @@ -66,7 +66,7 @@ Here's an example *path operation* with parameters using some of the above types //// tab | Python 3.9+ ```Python hl_lines="1 3 12-16" -{!> ../../../docs_src/extra_data_types/tutorial001_an_py39.py!} +{!> ../../docs_src/extra_data_types/tutorial001_an_py39.py!} ``` //// @@ -74,7 +74,7 @@ Here's an example *path operation* with parameters using some of the above types //// tab | Python 3.8+ ```Python hl_lines="1 3 13-17" -{!> ../../../docs_src/extra_data_types/tutorial001_an.py!} +{!> ../../docs_src/extra_data_types/tutorial001_an.py!} ``` //// @@ -88,7 +88,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="1 2 11-15" -{!> ../../../docs_src/extra_data_types/tutorial001_py310.py!} +{!> ../../docs_src/extra_data_types/tutorial001_py310.py!} ``` //// @@ -102,7 +102,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="1 2 12-16" -{!> ../../../docs_src/extra_data_types/tutorial001.py!} +{!> ../../docs_src/extra_data_types/tutorial001.py!} ``` //// @@ -112,7 +112,7 @@ Note that the parameters inside the function have their natural data type, and y //// tab | Python 3.10+ ```Python hl_lines="18-19" -{!> ../../../docs_src/extra_data_types/tutorial001_an_py310.py!} +{!> ../../docs_src/extra_data_types/tutorial001_an_py310.py!} ``` //// @@ -120,7 +120,7 @@ Note that the parameters inside the function have their natural data type, and y //// tab | Python 3.9+ ```Python hl_lines="18-19" -{!> ../../../docs_src/extra_data_types/tutorial001_an_py39.py!} +{!> ../../docs_src/extra_data_types/tutorial001_an_py39.py!} ``` //// @@ -128,7 +128,7 @@ Note that the parameters inside the function have their natural data type, and y //// tab | Python 3.8+ ```Python hl_lines="19-20" -{!> ../../../docs_src/extra_data_types/tutorial001_an.py!} +{!> ../../docs_src/extra_data_types/tutorial001_an.py!} ``` //// @@ -142,7 +142,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="17-18" -{!> ../../../docs_src/extra_data_types/tutorial001_py310.py!} +{!> ../../docs_src/extra_data_types/tutorial001_py310.py!} ``` //// @@ -156,7 +156,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="18-19" -{!> ../../../docs_src/extra_data_types/tutorial001.py!} +{!> ../../docs_src/extra_data_types/tutorial001.py!} ``` //// diff --git a/docs/en/docs/tutorial/extra-models.md b/docs/en/docs/tutorial/extra-models.md index 1c87e76ce..4e6f69f31 100644 --- a/docs/en/docs/tutorial/extra-models.md +++ b/docs/en/docs/tutorial/extra-models.md @@ -23,7 +23,7 @@ Here's a general idea of how the models could look like with their password fiel //// tab | Python 3.10+ ```Python hl_lines="7 9 14 20 22 27-28 31-33 38-39" -{!> ../../../docs_src/extra_models/tutorial001_py310.py!} +{!> ../../docs_src/extra_models/tutorial001_py310.py!} ``` //// @@ -31,7 +31,7 @@ Here's a general idea of how the models could look like with their password fiel //// tab | Python 3.8+ ```Python hl_lines="9 11 16 22 24 29-30 33-35 40-41" -{!> ../../../docs_src/extra_models/tutorial001.py!} +{!> ../../docs_src/extra_models/tutorial001.py!} ``` //// @@ -179,7 +179,7 @@ That way, we can declare just the differences between the models (with plaintext //// tab | Python 3.10+ ```Python hl_lines="7 13-14 17-18 21-22" -{!> ../../../docs_src/extra_models/tutorial002_py310.py!} +{!> ../../docs_src/extra_models/tutorial002_py310.py!} ``` //// @@ -187,7 +187,7 @@ That way, we can declare just the differences between the models (with plaintext //// tab | Python 3.8+ ```Python hl_lines="9 15-16 19-20 23-24" -{!> ../../../docs_src/extra_models/tutorial002.py!} +{!> ../../docs_src/extra_models/tutorial002.py!} ``` //// @@ -209,7 +209,7 @@ When defining a ../../../docs_src/extra_models/tutorial003_py310.py!} +{!> ../../docs_src/extra_models/tutorial003_py310.py!} ``` //// @@ -217,7 +217,7 @@ When defining a ../../../docs_src/extra_models/tutorial003.py!} +{!> ../../docs_src/extra_models/tutorial003.py!} ``` //// @@ -245,7 +245,7 @@ For that, use the standard Python `typing.List` (or just `list` in Python 3.9 an //// tab | Python 3.9+ ```Python hl_lines="18" -{!> ../../../docs_src/extra_models/tutorial004_py39.py!} +{!> ../../docs_src/extra_models/tutorial004_py39.py!} ``` //// @@ -253,7 +253,7 @@ For that, use the standard Python `typing.List` (or just `list` in Python 3.9 an //// tab | Python 3.8+ ```Python hl_lines="1 20" -{!> ../../../docs_src/extra_models/tutorial004.py!} +{!> ../../docs_src/extra_models/tutorial004.py!} ``` //// @@ -269,7 +269,7 @@ In this case, you can use `typing.Dict` (or just `dict` in Python 3.9 and above) //// tab | Python 3.9+ ```Python hl_lines="6" -{!> ../../../docs_src/extra_models/tutorial005_py39.py!} +{!> ../../docs_src/extra_models/tutorial005_py39.py!} ``` //// @@ -277,7 +277,7 @@ In this case, you can use `typing.Dict` (or just `dict` in Python 3.9 and above) //// tab | Python 3.8+ ```Python hl_lines="1 8" -{!> ../../../docs_src/extra_models/tutorial005.py!} +{!> ../../docs_src/extra_models/tutorial005.py!} ``` //// diff --git a/docs/en/docs/tutorial/first-steps.md b/docs/en/docs/tutorial/first-steps.md index b48a0ee38..77728cebe 100644 --- a/docs/en/docs/tutorial/first-steps.md +++ b/docs/en/docs/tutorial/first-steps.md @@ -3,7 +3,7 @@ The simplest FastAPI file could look like this: ```Python -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` Copy that to a file `main.py`. @@ -158,7 +158,7 @@ You could also use it to generate code automatically, for clients that communica ### Step 1: import `FastAPI` ```Python hl_lines="1" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` `FastAPI` is a Python class that provides all the functionality for your API. @@ -174,7 +174,7 @@ You can use all the ../../../docs_src/header_param_models/tutorial001_an_py310.py!} +{!> ../../docs_src/header_param_models/tutorial001_an_py310.py!} ``` //// @@ -25,7 +25,7 @@ Declare the **header parameters** that you need in a **Pydantic model**, and the //// tab | Python 3.9+ ```Python hl_lines="9-14 18" -{!> ../../../docs_src/header_param_models/tutorial001_an_py39.py!} +{!> ../../docs_src/header_param_models/tutorial001_an_py39.py!} ``` //// @@ -33,7 +33,7 @@ Declare the **header parameters** that you need in a **Pydantic model**, and the //// tab | Python 3.8+ ```Python hl_lines="10-15 19" -{!> ../../../docs_src/header_param_models/tutorial001_an.py!} +{!> ../../docs_src/header_param_models/tutorial001_an.py!} ``` //// @@ -47,7 +47,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7-12 16" -{!> ../../../docs_src/header_param_models/tutorial001_py310.py!} +{!> ../../docs_src/header_param_models/tutorial001_py310.py!} ``` //// @@ -61,7 +61,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9-14 18" -{!> ../../../docs_src/header_param_models/tutorial001_py39.py!} +{!> ../../docs_src/header_param_models/tutorial001_py39.py!} ``` //// @@ -75,7 +75,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7-12 16" -{!> ../../../docs_src/header_param_models/tutorial001_py310.py!} +{!> ../../docs_src/header_param_models/tutorial001_py310.py!} ``` //// @@ -99,7 +99,7 @@ You can use Pydantic's model configuration to `forbid` any `extra` fields: //// tab | Python 3.10+ ```Python hl_lines="10" -{!> ../../../docs_src/header_param_models/tutorial002_an_py310.py!} +{!> ../../docs_src/header_param_models/tutorial002_an_py310.py!} ``` //// @@ -107,7 +107,7 @@ You can use Pydantic's model configuration to `forbid` any `extra` fields: //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/header_param_models/tutorial002_an_py39.py!} +{!> ../../docs_src/header_param_models/tutorial002_an_py39.py!} ``` //// @@ -115,7 +115,7 @@ You can use Pydantic's model configuration to `forbid` any `extra` fields: //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/header_param_models/tutorial002_an.py!} +{!> ../../docs_src/header_param_models/tutorial002_an.py!} ``` //// @@ -129,7 +129,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="8" -{!> ../../../docs_src/header_param_models/tutorial002_py310.py!} +{!> ../../docs_src/header_param_models/tutorial002_py310.py!} ``` //// @@ -143,7 +143,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="10" -{!> ../../../docs_src/header_param_models/tutorial002_py39.py!} +{!> ../../docs_src/header_param_models/tutorial002_py39.py!} ``` //// @@ -157,7 +157,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="10" -{!> ../../../docs_src/header_param_models/tutorial002.py!} +{!> ../../docs_src/header_param_models/tutorial002.py!} ``` //// diff --git a/docs/en/docs/tutorial/header-params.md b/docs/en/docs/tutorial/header-params.md index 2e07fe0e6..293de897f 100644 --- a/docs/en/docs/tutorial/header-params.md +++ b/docs/en/docs/tutorial/header-params.md @@ -9,7 +9,7 @@ First import `Header`: //// tab | Python 3.10+ ```Python hl_lines="3" -{!> ../../../docs_src/header_params/tutorial001_an_py310.py!} +{!> ../../docs_src/header_params/tutorial001_an_py310.py!} ``` //// @@ -17,7 +17,7 @@ First import `Header`: //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/header_params/tutorial001_an_py39.py!} +{!> ../../docs_src/header_params/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ First import `Header`: //// tab | Python 3.8+ ```Python hl_lines="3" -{!> ../../../docs_src/header_params/tutorial001_an.py!} +{!> ../../docs_src/header_params/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="1" -{!> ../../../docs_src/header_params/tutorial001_py310.py!} +{!> ../../docs_src/header_params/tutorial001_py310.py!} ``` //// @@ -53,7 +53,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="3" -{!> ../../../docs_src/header_params/tutorial001.py!} +{!> ../../docs_src/header_params/tutorial001.py!} ``` //// @@ -67,7 +67,7 @@ You can define the default value as well as all the extra validation or annotati //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial001_an_py310.py!} +{!> ../../docs_src/header_params/tutorial001_an_py310.py!} ``` //// @@ -75,7 +75,7 @@ You can define the default value as well as all the extra validation or annotati //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial001_an_py39.py!} +{!> ../../docs_src/header_params/tutorial001_an_py39.py!} ``` //// @@ -83,7 +83,7 @@ You can define the default value as well as all the extra validation or annotati //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/header_params/tutorial001_an.py!} +{!> ../../docs_src/header_params/tutorial001_an.py!} ``` //// @@ -97,7 +97,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7" -{!> ../../../docs_src/header_params/tutorial001_py310.py!} +{!> ../../docs_src/header_params/tutorial001_py310.py!} ``` //// @@ -111,7 +111,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial001.py!} +{!> ../../docs_src/header_params/tutorial001.py!} ``` //// @@ -149,7 +149,7 @@ If for some reason you need to disable automatic conversion of underscores to hy //// tab | Python 3.10+ ```Python hl_lines="10" -{!> ../../../docs_src/header_params/tutorial002_an_py310.py!} +{!> ../../docs_src/header_params/tutorial002_an_py310.py!} ``` //// @@ -157,7 +157,7 @@ If for some reason you need to disable automatic conversion of underscores to hy //// tab | Python 3.9+ ```Python hl_lines="11" -{!> ../../../docs_src/header_params/tutorial002_an_py39.py!} +{!> ../../docs_src/header_params/tutorial002_an_py39.py!} ``` //// @@ -165,7 +165,7 @@ If for some reason you need to disable automatic conversion of underscores to hy //// tab | Python 3.8+ ```Python hl_lines="12" -{!> ../../../docs_src/header_params/tutorial002_an.py!} +{!> ../../docs_src/header_params/tutorial002_an.py!} ``` //// @@ -179,7 +179,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="8" -{!> ../../../docs_src/header_params/tutorial002_py310.py!} +{!> ../../docs_src/header_params/tutorial002_py310.py!} ``` //// @@ -193,7 +193,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="10" -{!> ../../../docs_src/header_params/tutorial002.py!} +{!> ../../docs_src/header_params/tutorial002.py!} ``` //// @@ -217,7 +217,7 @@ For example, to declare a header of `X-Token` that can appear more than once, yo //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial003_an_py310.py!} +{!> ../../docs_src/header_params/tutorial003_an_py310.py!} ``` //// @@ -225,7 +225,7 @@ For example, to declare a header of `X-Token` that can appear more than once, yo //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial003_an_py39.py!} +{!> ../../docs_src/header_params/tutorial003_an_py39.py!} ``` //// @@ -233,7 +233,7 @@ For example, to declare a header of `X-Token` that can appear more than once, yo //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/header_params/tutorial003_an.py!} +{!> ../../docs_src/header_params/tutorial003_an.py!} ``` //// @@ -247,7 +247,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7" -{!> ../../../docs_src/header_params/tutorial003_py310.py!} +{!> ../../docs_src/header_params/tutorial003_py310.py!} ``` //// @@ -261,7 +261,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial003_py39.py!} +{!> ../../docs_src/header_params/tutorial003_py39.py!} ``` //// @@ -275,7 +275,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial003.py!} +{!> ../../docs_src/header_params/tutorial003.py!} ``` //// diff --git a/docs/en/docs/tutorial/metadata.md b/docs/en/docs/tutorial/metadata.md index c62509b8b..715bb999a 100644 --- a/docs/en/docs/tutorial/metadata.md +++ b/docs/en/docs/tutorial/metadata.md @@ -19,7 +19,7 @@ You can set the following fields that are used in the OpenAPI specification and You can set them as follows: ```Python hl_lines="3-16 19-32" -{!../../../docs_src/metadata/tutorial001.py!} +{!../../docs_src/metadata/tutorial001.py!} ``` /// tip @@ -39,7 +39,7 @@ Since OpenAPI 3.1.0 and FastAPI 0.99.0, you can also set the `license_info` with For example: ```Python hl_lines="31" -{!../../../docs_src/metadata/tutorial001_1.py!} +{!../../docs_src/metadata/tutorial001_1.py!} ``` ## Metadata for tags @@ -63,7 +63,7 @@ Let's try that in an example with tags for `users` and `items`. Create metadata for your tags and pass it to the `openapi_tags` parameter: ```Python hl_lines="3-16 18" -{!../../../docs_src/metadata/tutorial004.py!} +{!../../docs_src/metadata/tutorial004.py!} ``` Notice that you can use Markdown inside of the descriptions, for example "login" will be shown in bold (**login**) and "fancy" will be shown in italics (_fancy_). @@ -79,7 +79,7 @@ You don't have to add metadata for all the tags that you use. Use the `tags` parameter with your *path operations* (and `APIRouter`s) to assign them to different tags: ```Python hl_lines="21 26" -{!../../../docs_src/metadata/tutorial004.py!} +{!../../docs_src/metadata/tutorial004.py!} ``` /// info @@ -109,7 +109,7 @@ But you can configure it with the parameter `openapi_url`. For example, to set it to be served at `/api/v1/openapi.json`: ```Python hl_lines="3" -{!../../../docs_src/metadata/tutorial002.py!} +{!../../docs_src/metadata/tutorial002.py!} ``` If you want to disable the OpenAPI schema completely you can set `openapi_url=None`, that will also disable the documentation user interfaces that use it. @@ -128,5 +128,5 @@ You can configure the two documentation user interfaces included: For example, to set Swagger UI to be served at `/documentation` and disable ReDoc: ```Python hl_lines="3" -{!../../../docs_src/metadata/tutorial003.py!} +{!../../docs_src/metadata/tutorial003.py!} ``` diff --git a/docs/en/docs/tutorial/middleware.md b/docs/en/docs/tutorial/middleware.md index 199b593d3..7c4954c7b 100644 --- a/docs/en/docs/tutorial/middleware.md +++ b/docs/en/docs/tutorial/middleware.md @@ -32,7 +32,7 @@ The middleware function receives: * You can then further modify the `response` before returning it. ```Python hl_lines="8-9 11 14" -{!../../../docs_src/middleware/tutorial001.py!} +{!../../docs_src/middleware/tutorial001.py!} ``` /// tip @@ -60,7 +60,7 @@ And also after the `response` is generated, before returning it. For example, you could add a custom header `X-Process-Time` containing the time in seconds that it took to process the request and generate a response: ```Python hl_lines="10 12-13" -{!../../../docs_src/middleware/tutorial001.py!} +{!../../docs_src/middleware/tutorial001.py!} ``` /// tip diff --git a/docs/en/docs/tutorial/path-operation-configuration.md b/docs/en/docs/tutorial/path-operation-configuration.md index a1a4953a6..4ca6ebf13 100644 --- a/docs/en/docs/tutorial/path-operation-configuration.md +++ b/docs/en/docs/tutorial/path-operation-configuration.md @@ -19,7 +19,7 @@ But if you don't remember what each number code is for, you can use the shortcut //// tab | Python 3.10+ ```Python hl_lines="1 15" -{!> ../../../docs_src/path_operation_configuration/tutorial001_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial001_py310.py!} ``` //// @@ -27,7 +27,7 @@ But if you don't remember what each number code is for, you can use the shortcut //// tab | Python 3.9+ ```Python hl_lines="3 17" -{!> ../../../docs_src/path_operation_configuration/tutorial001_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial001_py39.py!} ``` //// @@ -35,7 +35,7 @@ But if you don't remember what each number code is for, you can use the shortcut //// tab | Python 3.8+ ```Python hl_lines="3 17" -{!> ../../../docs_src/path_operation_configuration/tutorial001.py!} +{!> ../../docs_src/path_operation_configuration/tutorial001.py!} ``` //// @@ -57,7 +57,7 @@ You can add tags to your *path operation*, pass the parameter `tags` with a `lis //// tab | Python 3.10+ ```Python hl_lines="15 20 25" -{!> ../../../docs_src/path_operation_configuration/tutorial002_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial002_py310.py!} ``` //// @@ -65,7 +65,7 @@ You can add tags to your *path operation*, pass the parameter `tags` with a `lis //// tab | Python 3.9+ ```Python hl_lines="17 22 27" -{!> ../../../docs_src/path_operation_configuration/tutorial002_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial002_py39.py!} ``` //// @@ -73,7 +73,7 @@ You can add tags to your *path operation*, pass the parameter `tags` with a `lis //// tab | Python 3.8+ ```Python hl_lines="17 22 27" -{!> ../../../docs_src/path_operation_configuration/tutorial002.py!} +{!> ../../docs_src/path_operation_configuration/tutorial002.py!} ``` //// @@ -91,7 +91,7 @@ In these cases, it could make sense to store the tags in an `Enum`. **FastAPI** supports that the same way as with plain strings: ```Python hl_lines="1 8-10 13 18" -{!../../../docs_src/path_operation_configuration/tutorial002b.py!} +{!../../docs_src/path_operation_configuration/tutorial002b.py!} ``` ## Summary and description @@ -101,7 +101,7 @@ You can add a `summary` and `description`: //// tab | Python 3.10+ ```Python hl_lines="18-19" -{!> ../../../docs_src/path_operation_configuration/tutorial003_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial003_py310.py!} ``` //// @@ -109,7 +109,7 @@ You can add a `summary` and `description`: //// tab | Python 3.9+ ```Python hl_lines="20-21" -{!> ../../../docs_src/path_operation_configuration/tutorial003_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial003_py39.py!} ``` //// @@ -117,7 +117,7 @@ You can add a `summary` and `description`: //// tab | Python 3.8+ ```Python hl_lines="20-21" -{!> ../../../docs_src/path_operation_configuration/tutorial003.py!} +{!> ../../docs_src/path_operation_configuration/tutorial003.py!} ``` //// @@ -131,7 +131,7 @@ You can write ../../../docs_src/path_operation_configuration/tutorial004_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial004_py310.py!} ``` //// @@ -139,7 +139,7 @@ You can write ../../../docs_src/path_operation_configuration/tutorial004_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial004_py39.py!} ``` //// @@ -147,7 +147,7 @@ You can write ../../../docs_src/path_operation_configuration/tutorial004.py!} +{!> ../../docs_src/path_operation_configuration/tutorial004.py!} ``` //// @@ -163,7 +163,7 @@ You can specify the response description with the parameter `response_descriptio //// tab | Python 3.10+ ```Python hl_lines="19" -{!> ../../../docs_src/path_operation_configuration/tutorial005_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial005_py310.py!} ``` //// @@ -171,7 +171,7 @@ You can specify the response description with the parameter `response_descriptio //// tab | Python 3.9+ ```Python hl_lines="21" -{!> ../../../docs_src/path_operation_configuration/tutorial005_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial005_py39.py!} ``` //// @@ -179,7 +179,7 @@ You can specify the response description with the parameter `response_descriptio //// tab | Python 3.8+ ```Python hl_lines="21" -{!> ../../../docs_src/path_operation_configuration/tutorial005.py!} +{!> ../../docs_src/path_operation_configuration/tutorial005.py!} ``` //// @@ -205,7 +205,7 @@ So, if you don't provide one, **FastAPI** will automatically generate one of "Su If you need to mark a *path operation* as deprecated, but without removing it, pass the parameter `deprecated`: ```Python hl_lines="16" -{!../../../docs_src/path_operation_configuration/tutorial006.py!} +{!../../docs_src/path_operation_configuration/tutorial006.py!} ``` It will be clearly marked as deprecated in the interactive docs: diff --git a/docs/en/docs/tutorial/path-params-numeric-validations.md b/docs/en/docs/tutorial/path-params-numeric-validations.md index bd835d0d4..9ddf49ea9 100644 --- a/docs/en/docs/tutorial/path-params-numeric-validations.md +++ b/docs/en/docs/tutorial/path-params-numeric-validations.md @@ -9,7 +9,7 @@ First, import `Path` from `fastapi`, and import `Annotated`: //// tab | Python 3.10+ ```Python hl_lines="1 3" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py!} ``` //// @@ -17,7 +17,7 @@ First, import `Path` from `fastapi`, and import `Annotated`: //// tab | Python 3.9+ ```Python hl_lines="1 3" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ First, import `Path` from `fastapi`, and import `Annotated`: //// tab | Python 3.8+ ```Python hl_lines="3-4" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="1" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_py310.py!} ``` //// @@ -53,7 +53,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="3" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001.py!} ``` //// @@ -77,7 +77,7 @@ For example, to declare a `title` metadata value for the path parameter `item_id //// tab | Python 3.10+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py!} ``` //// @@ -85,7 +85,7 @@ For example, to declare a `title` metadata value for the path parameter `item_id //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_an_py39.py!} ``` //// @@ -93,7 +93,7 @@ For example, to declare a `title` metadata value for the path parameter `item_id //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_an.py!} ``` //// @@ -107,7 +107,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="8" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_py310.py!} ``` //// @@ -121,7 +121,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001.py!} ``` //// @@ -163,7 +163,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7" -{!> ../../../docs_src/path_params_numeric_validations/tutorial002.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial002.py!} ``` //// @@ -173,7 +173,7 @@ But keep in mind that if you use `Annotated`, you won't have this problem, it wo //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial002_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial002_an_py39.py!} ``` //// @@ -181,7 +181,7 @@ But keep in mind that if you use `Annotated`, you won't have this problem, it wo //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/path_params_numeric_validations/tutorial002_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial002_an.py!} ``` //// @@ -210,7 +210,7 @@ Pass `*`, as the first parameter of the function. Python won't do anything with that `*`, but it will know that all the following parameters should be called as keyword arguments (key-value pairs), also known as kwargs. Even if they don't have a default value. ```Python hl_lines="7" -{!../../../docs_src/path_params_numeric_validations/tutorial003.py!} +{!../../docs_src/path_params_numeric_validations/tutorial003.py!} ``` ### Better with `Annotated` @@ -220,7 +220,7 @@ Keep in mind that if you use `Annotated`, as you are not using function paramete //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial003_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial003_an_py39.py!} ``` //// @@ -228,7 +228,7 @@ Keep in mind that if you use `Annotated`, as you are not using function paramete //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/path_params_numeric_validations/tutorial003_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial003_an.py!} ``` //// @@ -242,7 +242,7 @@ Here, with `ge=1`, `item_id` will need to be an integer number "`g`reater than o //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial004_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial004_an_py39.py!} ``` //// @@ -250,7 +250,7 @@ Here, with `ge=1`, `item_id` will need to be an integer number "`g`reater than o //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/path_params_numeric_validations/tutorial004_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial004_an.py!} ``` //// @@ -264,7 +264,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="8" -{!> ../../../docs_src/path_params_numeric_validations/tutorial004.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial004.py!} ``` //// @@ -279,7 +279,7 @@ The same applies for: //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial005_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial005_an_py39.py!} ``` //// @@ -287,7 +287,7 @@ The same applies for: //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/path_params_numeric_validations/tutorial005_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial005_an.py!} ``` //// @@ -301,7 +301,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9" -{!> ../../../docs_src/path_params_numeric_validations/tutorial005.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial005.py!} ``` //// @@ -319,7 +319,7 @@ And the same for lt. //// tab | Python 3.9+ ```Python hl_lines="13" -{!> ../../../docs_src/path_params_numeric_validations/tutorial006_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial006_an_py39.py!} ``` //// @@ -327,7 +327,7 @@ And the same for lt. //// tab | Python 3.8+ ```Python hl_lines="12" -{!> ../../../docs_src/path_params_numeric_validations/tutorial006_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial006_an.py!} ``` //// @@ -341,7 +341,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="11" -{!> ../../../docs_src/path_params_numeric_validations/tutorial006.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial006.py!} ``` //// diff --git a/docs/en/docs/tutorial/path-params.md b/docs/en/docs/tutorial/path-params.md index a87a29e08..fd9e74585 100644 --- a/docs/en/docs/tutorial/path-params.md +++ b/docs/en/docs/tutorial/path-params.md @@ -3,7 +3,7 @@ You can declare path "parameters" or "variables" with the same syntax used by Python format strings: ```Python hl_lines="6-7" -{!../../../docs_src/path_params/tutorial001.py!} +{!../../docs_src/path_params/tutorial001.py!} ``` The value of the path parameter `item_id` will be passed to your function as the argument `item_id`. @@ -19,7 +19,7 @@ So, if you run this example and go to ../../../docs_src/query_param_models/tutorial001_an_py310.py!} +{!> ../../docs_src/query_param_models/tutorial001_an_py310.py!} ``` //// @@ -25,7 +25,7 @@ Declare the **query parameters** that you need in a **Pydantic model**, and then //// tab | Python 3.9+ ```Python hl_lines="8-12 16" -{!> ../../../docs_src/query_param_models/tutorial001_an_py39.py!} +{!> ../../docs_src/query_param_models/tutorial001_an_py39.py!} ``` //// @@ -33,7 +33,7 @@ Declare the **query parameters** that you need in a **Pydantic model**, and then //// tab | Python 3.8+ ```Python hl_lines="10-14 18" -{!> ../../../docs_src/query_param_models/tutorial001_an.py!} +{!> ../../docs_src/query_param_models/tutorial001_an.py!} ``` //// @@ -47,7 +47,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9-13 17" -{!> ../../../docs_src/query_param_models/tutorial001_py310.py!} +{!> ../../docs_src/query_param_models/tutorial001_py310.py!} ``` //// @@ -61,7 +61,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="8-12 16" -{!> ../../../docs_src/query_param_models/tutorial001_py39.py!} +{!> ../../docs_src/query_param_models/tutorial001_py39.py!} ``` //// @@ -75,7 +75,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9-13 17" -{!> ../../../docs_src/query_param_models/tutorial001_py310.py!} +{!> ../../docs_src/query_param_models/tutorial001_py310.py!} ``` //// @@ -99,7 +99,7 @@ You can use Pydantic's model configuration to `forbid` any `extra` fields: //// tab | Python 3.10+ ```Python hl_lines="10" -{!> ../../../docs_src/query_param_models/tutorial002_an_py310.py!} +{!> ../../docs_src/query_param_models/tutorial002_an_py310.py!} ``` //// @@ -107,7 +107,7 @@ You can use Pydantic's model configuration to `forbid` any `extra` fields: //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_param_models/tutorial002_an_py39.py!} +{!> ../../docs_src/query_param_models/tutorial002_an_py39.py!} ``` //// @@ -115,7 +115,7 @@ You can use Pydantic's model configuration to `forbid` any `extra` fields: //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/query_param_models/tutorial002_an.py!} +{!> ../../docs_src/query_param_models/tutorial002_an.py!} ``` //// @@ -129,7 +129,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="10" -{!> ../../../docs_src/query_param_models/tutorial002_py310.py!} +{!> ../../docs_src/query_param_models/tutorial002_py310.py!} ``` //// @@ -143,7 +143,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9" -{!> ../../../docs_src/query_param_models/tutorial002_py39.py!} +{!> ../../docs_src/query_param_models/tutorial002_py39.py!} ``` //// @@ -157,7 +157,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="11" -{!> ../../../docs_src/query_param_models/tutorial002.py!} +{!> ../../docs_src/query_param_models/tutorial002.py!} ``` //// diff --git a/docs/en/docs/tutorial/query-params-str-validations.md b/docs/en/docs/tutorial/query-params-str-validations.md index dd101a2a6..12778d7fe 100644 --- a/docs/en/docs/tutorial/query-params-str-validations.md +++ b/docs/en/docs/tutorial/query-params-str-validations.md @@ -7,7 +7,7 @@ Let's take this application as example: //// tab | Python 3.10+ ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial001_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial001_py310.py!} ``` //// @@ -15,7 +15,7 @@ Let's take this application as example: //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial001.py!} +{!> ../../docs_src/query_params_str_validations/tutorial001.py!} ``` //// @@ -46,7 +46,7 @@ To achieve that, first import: In Python 3.9 or above, `Annotated` is part of the standard library, so you can import it from `typing`. ```Python hl_lines="1 3" -{!> ../../../docs_src/query_params_str_validations/tutorial002_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial002_an_py310.py!} ``` //// @@ -58,7 +58,7 @@ In versions of Python below Python 3.9 you import `Annotated` from `typing_exten It will already be installed with FastAPI. ```Python hl_lines="3-4" -{!> ../../../docs_src/query_params_str_validations/tutorial002_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial002_an.py!} ``` //// @@ -126,7 +126,7 @@ Now that we have this `Annotated` where we can put more information (in this cas //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial002_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial002_an_py310.py!} ``` //// @@ -134,7 +134,7 @@ Now that we have this `Annotated` where we can put more information (in this cas //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial002_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial002_an.py!} ``` //// @@ -170,7 +170,7 @@ This is how you would use `Query()` as the default value of your function parame //// tab | Python 3.10+ ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial002_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial002_py310.py!} ``` //// @@ -178,7 +178,7 @@ This is how you would use `Query()` as the default value of your function parame //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial002.py!} +{!> ../../docs_src/query_params_str_validations/tutorial002.py!} ``` //// @@ -284,7 +284,7 @@ You can also add a parameter `min_length`: //// tab | Python 3.10+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial003_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial003_an_py310.py!} ``` //// @@ -292,7 +292,7 @@ You can also add a parameter `min_length`: //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial003_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial003_an_py39.py!} ``` //// @@ -300,7 +300,7 @@ You can also add a parameter `min_length`: //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/query_params_str_validations/tutorial003_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial003_an.py!} ``` //// @@ -314,7 +314,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial003_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial003_py310.py!} ``` //// @@ -328,7 +328,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial003.py!} +{!> ../../docs_src/query_params_str_validations/tutorial003.py!} ``` //// @@ -340,7 +340,7 @@ You can define a ../../../docs_src/query_params_str_validations/tutorial004_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial004_an_py310.py!} ``` //// @@ -348,7 +348,7 @@ You can define a ../../../docs_src/query_params_str_validations/tutorial004_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial004_an_py39.py!} ``` //// @@ -356,7 +356,7 @@ You can define a ../../../docs_src/query_params_str_validations/tutorial004_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial004_an.py!} ``` //// @@ -370,7 +370,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial004_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial004_py310.py!} ``` //// @@ -384,7 +384,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="11" -{!> ../../../docs_src/query_params_str_validations/tutorial004.py!} +{!> ../../docs_src/query_params_str_validations/tutorial004.py!} ``` //// @@ -408,7 +408,7 @@ You could still see some code using it: //// tab | Python 3.10+ Pydantic v1 ```Python hl_lines="11" -{!> ../../../docs_src/query_params_str_validations/tutorial004_an_py310_regex.py!} +{!> ../../docs_src/query_params_str_validations/tutorial004_an_py310_regex.py!} ``` //// @@ -424,7 +424,7 @@ Let's say that you want to declare the `q` query parameter to have a `min_length //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial005_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial005_an_py39.py!} ``` //// @@ -432,7 +432,7 @@ Let's say that you want to declare the `q` query parameter to have a `min_length //// tab | Python 3.8+ ```Python hl_lines="8" -{!> ../../../docs_src/query_params_str_validations/tutorial005_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial005_an.py!} ``` //// @@ -446,7 +446,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial005.py!} +{!> ../../docs_src/query_params_str_validations/tutorial005.py!} ``` //// @@ -494,7 +494,7 @@ So, when you need to declare a value as required while using `Query`, you can si //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial006_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006_an_py39.py!} ``` //// @@ -502,7 +502,7 @@ So, when you need to declare a value as required while using `Query`, you can si //// tab | Python 3.8+ ```Python hl_lines="8" -{!> ../../../docs_src/query_params_str_validations/tutorial006_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006_an.py!} ``` //// @@ -516,7 +516,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial006.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006.py!} ``` /// tip @@ -536,7 +536,7 @@ There's an alternative way to explicitly declare that a value is required. You c //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial006b_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006b_an_py39.py!} ``` //// @@ -544,7 +544,7 @@ There's an alternative way to explicitly declare that a value is required. You c //// tab | Python 3.8+ ```Python hl_lines="8" -{!> ../../../docs_src/query_params_str_validations/tutorial006b_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006b_an.py!} ``` //// @@ -558,7 +558,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial006b.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006b.py!} ``` //// @@ -582,7 +582,7 @@ To do that, you can declare that `None` is a valid type but still use `...` as t //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial006c_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006c_an_py310.py!} ``` //// @@ -590,7 +590,7 @@ To do that, you can declare that `None` is a valid type but still use `...` as t //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial006c_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006c_an_py39.py!} ``` //// @@ -598,7 +598,7 @@ To do that, you can declare that `None` is a valid type but still use `...` as t //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial006c_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006c_an.py!} ``` //// @@ -612,7 +612,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial006c_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006c_py310.py!} ``` //// @@ -626,7 +626,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial006c.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006c.py!} ``` //// @@ -652,7 +652,7 @@ For example, to declare a query parameter `q` that can appear multiple times in //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial011_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial011_an_py310.py!} ``` //// @@ -660,7 +660,7 @@ For example, to declare a query parameter `q` that can appear multiple times in //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial011_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial011_an_py39.py!} ``` //// @@ -668,7 +668,7 @@ For example, to declare a query parameter `q` that can appear multiple times in //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial011_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial011_an.py!} ``` //// @@ -682,7 +682,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial011_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial011_py310.py!} ``` //// @@ -696,7 +696,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial011_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial011_py39.py!} ``` //// @@ -710,7 +710,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial011.py!} +{!> ../../docs_src/query_params_str_validations/tutorial011.py!} ``` //// @@ -751,7 +751,7 @@ And you can also define a default `list` of values if none are provided: //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial012_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial012_an_py39.py!} ``` //// @@ -759,7 +759,7 @@ And you can also define a default `list` of values if none are provided: //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial012_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial012_an.py!} ``` //// @@ -773,7 +773,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial012_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial012_py39.py!} ``` //// @@ -787,7 +787,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial012.py!} +{!> ../../docs_src/query_params_str_validations/tutorial012.py!} ``` //// @@ -816,7 +816,7 @@ You can also use `list` directly instead of `List[str]` (or `list[str]` in Pytho //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial013_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial013_an_py39.py!} ``` //// @@ -824,7 +824,7 @@ You can also use `list` directly instead of `List[str]` (or `list[str]` in Pytho //// tab | Python 3.8+ ```Python hl_lines="8" -{!> ../../../docs_src/query_params_str_validations/tutorial013_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial013_an.py!} ``` //// @@ -838,7 +838,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial013.py!} +{!> ../../docs_src/query_params_str_validations/tutorial013.py!} ``` //// @@ -870,7 +870,7 @@ You can add a `title`: //// tab | Python 3.10+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial007_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial007_an_py310.py!} ``` //// @@ -878,7 +878,7 @@ You can add a `title`: //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial007_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial007_an_py39.py!} ``` //// @@ -886,7 +886,7 @@ You can add a `title`: //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/query_params_str_validations/tutorial007_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial007_an.py!} ``` //// @@ -900,7 +900,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="8" -{!> ../../../docs_src/query_params_str_validations/tutorial007_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial007_py310.py!} ``` //// @@ -914,7 +914,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial007.py!} +{!> ../../docs_src/query_params_str_validations/tutorial007.py!} ``` //// @@ -924,7 +924,7 @@ And a `description`: //// tab | Python 3.10+ ```Python hl_lines="14" -{!> ../../../docs_src/query_params_str_validations/tutorial008_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial008_an_py310.py!} ``` //// @@ -932,7 +932,7 @@ And a `description`: //// tab | Python 3.9+ ```Python hl_lines="14" -{!> ../../../docs_src/query_params_str_validations/tutorial008_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial008_an_py39.py!} ``` //// @@ -940,7 +940,7 @@ And a `description`: //// tab | Python 3.8+ ```Python hl_lines="15" -{!> ../../../docs_src/query_params_str_validations/tutorial008_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial008_an.py!} ``` //// @@ -954,7 +954,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="11" -{!> ../../../docs_src/query_params_str_validations/tutorial008_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial008_py310.py!} ``` //// @@ -968,7 +968,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="13" -{!> ../../../docs_src/query_params_str_validations/tutorial008.py!} +{!> ../../docs_src/query_params_str_validations/tutorial008.py!} ``` //// @@ -994,7 +994,7 @@ Then you can declare an `alias`, and that alias is what will be used to find the //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial009_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial009_an_py310.py!} ``` //// @@ -1002,7 +1002,7 @@ Then you can declare an `alias`, and that alias is what will be used to find the //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial009_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial009_an_py39.py!} ``` //// @@ -1010,7 +1010,7 @@ Then you can declare an `alias`, and that alias is what will be used to find the //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial009_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial009_an.py!} ``` //// @@ -1024,7 +1024,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial009_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial009_py310.py!} ``` //// @@ -1038,7 +1038,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial009.py!} +{!> ../../docs_src/query_params_str_validations/tutorial009.py!} ``` //// @@ -1054,7 +1054,7 @@ Then pass the parameter `deprecated=True` to `Query`: //// tab | Python 3.10+ ```Python hl_lines="19" -{!> ../../../docs_src/query_params_str_validations/tutorial010_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial010_an_py310.py!} ``` //// @@ -1062,7 +1062,7 @@ Then pass the parameter `deprecated=True` to `Query`: //// tab | Python 3.9+ ```Python hl_lines="19" -{!> ../../../docs_src/query_params_str_validations/tutorial010_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial010_an_py39.py!} ``` //// @@ -1070,7 +1070,7 @@ Then pass the parameter `deprecated=True` to `Query`: //// tab | Python 3.8+ ```Python hl_lines="20" -{!> ../../../docs_src/query_params_str_validations/tutorial010_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial010_an.py!} ``` //// @@ -1084,7 +1084,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="16" -{!> ../../../docs_src/query_params_str_validations/tutorial010_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial010_py310.py!} ``` //// @@ -1098,7 +1098,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="18" -{!> ../../../docs_src/query_params_str_validations/tutorial010.py!} +{!> ../../docs_src/query_params_str_validations/tutorial010.py!} ``` //// @@ -1114,7 +1114,7 @@ To exclude a query parameter from the generated OpenAPI schema (and thus, from t //// tab | Python 3.10+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial014_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial014_an_py310.py!} ``` //// @@ -1122,7 +1122,7 @@ To exclude a query parameter from the generated OpenAPI schema (and thus, from t //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial014_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial014_an_py39.py!} ``` //// @@ -1130,7 +1130,7 @@ To exclude a query parameter from the generated OpenAPI schema (and thus, from t //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/query_params_str_validations/tutorial014_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial014_an.py!} ``` //// @@ -1144,7 +1144,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="8" -{!> ../../../docs_src/query_params_str_validations/tutorial014_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial014_py310.py!} ``` //// @@ -1158,7 +1158,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial014.py!} +{!> ../../docs_src/query_params_str_validations/tutorial014.py!} ``` //// diff --git a/docs/en/docs/tutorial/query-params.md b/docs/en/docs/tutorial/query-params.md index a98ac9b28..0d31d453d 100644 --- a/docs/en/docs/tutorial/query-params.md +++ b/docs/en/docs/tutorial/query-params.md @@ -3,7 +3,7 @@ When you declare other function parameters that are not part of the path parameters, they are automatically interpreted as "query" parameters. ```Python hl_lines="9" -{!../../../docs_src/query_params/tutorial001.py!} +{!../../docs_src/query_params/tutorial001.py!} ``` The query is the set of key-value pairs that go after the `?` in a URL, separated by `&` characters. @@ -66,7 +66,7 @@ The same way, you can declare optional query parameters, by setting their defaul //// tab | Python 3.10+ ```Python hl_lines="7" -{!> ../../../docs_src/query_params/tutorial002_py310.py!} +{!> ../../docs_src/query_params/tutorial002_py310.py!} ``` //// @@ -74,7 +74,7 @@ The same way, you can declare optional query parameters, by setting their defaul //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params/tutorial002.py!} +{!> ../../docs_src/query_params/tutorial002.py!} ``` //// @@ -94,7 +94,7 @@ You can also declare `bool` types, and they will be converted: //// tab | Python 3.10+ ```Python hl_lines="7" -{!> ../../../docs_src/query_params/tutorial003_py310.py!} +{!> ../../docs_src/query_params/tutorial003_py310.py!} ``` //// @@ -102,7 +102,7 @@ You can also declare `bool` types, and they will be converted: //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params/tutorial003.py!} +{!> ../../docs_src/query_params/tutorial003.py!} ``` //// @@ -151,7 +151,7 @@ They will be detected by name: //// tab | Python 3.10+ ```Python hl_lines="6 8" -{!> ../../../docs_src/query_params/tutorial004_py310.py!} +{!> ../../docs_src/query_params/tutorial004_py310.py!} ``` //// @@ -159,7 +159,7 @@ They will be detected by name: //// tab | Python 3.8+ ```Python hl_lines="8 10" -{!> ../../../docs_src/query_params/tutorial004.py!} +{!> ../../docs_src/query_params/tutorial004.py!} ``` //// @@ -173,7 +173,7 @@ If you don't want to add a specific value but just make it optional, set the def But when you want to make a query parameter required, you can just not declare any default value: ```Python hl_lines="6-7" -{!../../../docs_src/query_params/tutorial005.py!} +{!../../docs_src/query_params/tutorial005.py!} ``` Here the query parameter `needy` is a required query parameter of type `str`. @@ -223,7 +223,7 @@ And of course, you can define some parameters as required, some as having a defa //// tab | Python 3.10+ ```Python hl_lines="8" -{!> ../../../docs_src/query_params/tutorial006_py310.py!} +{!> ../../docs_src/query_params/tutorial006_py310.py!} ``` //// @@ -231,7 +231,7 @@ And of course, you can define some parameters as required, some as having a defa //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params/tutorial006.py!} +{!> ../../docs_src/query_params/tutorial006.py!} ``` //// diff --git a/docs/en/docs/tutorial/request-files.md b/docs/en/docs/tutorial/request-files.md index 9f19596a8..f3f1eb103 100644 --- a/docs/en/docs/tutorial/request-files.md +++ b/docs/en/docs/tutorial/request-files.md @@ -23,7 +23,7 @@ Import `File` and `UploadFile` from `fastapi`: //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/request_files/tutorial001_an_py39.py!} +{!> ../../docs_src/request_files/tutorial001_an_py39.py!} ``` //// @@ -31,7 +31,7 @@ Import `File` and `UploadFile` from `fastapi`: //// tab | Python 3.8+ ```Python hl_lines="1" -{!> ../../../docs_src/request_files/tutorial001_an.py!} +{!> ../../docs_src/request_files/tutorial001_an.py!} ``` //// @@ -45,7 +45,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="1" -{!> ../../../docs_src/request_files/tutorial001.py!} +{!> ../../docs_src/request_files/tutorial001.py!} ``` //// @@ -57,7 +57,7 @@ Create file parameters the same way you would for `Body` or `Form`: //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/request_files/tutorial001_an_py39.py!} +{!> ../../docs_src/request_files/tutorial001_an_py39.py!} ``` //// @@ -65,7 +65,7 @@ Create file parameters the same way you would for `Body` or `Form`: //// tab | Python 3.8+ ```Python hl_lines="8" -{!> ../../../docs_src/request_files/tutorial001_an.py!} +{!> ../../docs_src/request_files/tutorial001_an.py!} ``` //// @@ -79,7 +79,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7" -{!> ../../../docs_src/request_files/tutorial001.py!} +{!> ../../docs_src/request_files/tutorial001.py!} ``` //// @@ -113,7 +113,7 @@ Define a file parameter with a type of `UploadFile`: //// tab | Python 3.9+ ```Python hl_lines="14" -{!> ../../../docs_src/request_files/tutorial001_an_py39.py!} +{!> ../../docs_src/request_files/tutorial001_an_py39.py!} ``` //// @@ -121,7 +121,7 @@ Define a file parameter with a type of `UploadFile`: //// tab | Python 3.8+ ```Python hl_lines="13" -{!> ../../../docs_src/request_files/tutorial001_an.py!} +{!> ../../docs_src/request_files/tutorial001_an.py!} ``` //// @@ -135,7 +135,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="12" -{!> ../../../docs_src/request_files/tutorial001.py!} +{!> ../../docs_src/request_files/tutorial001.py!} ``` //// @@ -224,7 +224,7 @@ You can make a file optional by using standard type annotations and setting a de //// tab | Python 3.10+ ```Python hl_lines="9 17" -{!> ../../../docs_src/request_files/tutorial001_02_an_py310.py!} +{!> ../../docs_src/request_files/tutorial001_02_an_py310.py!} ``` //// @@ -232,7 +232,7 @@ You can make a file optional by using standard type annotations and setting a de //// tab | Python 3.9+ ```Python hl_lines="9 17" -{!> ../../../docs_src/request_files/tutorial001_02_an_py39.py!} +{!> ../../docs_src/request_files/tutorial001_02_an_py39.py!} ``` //// @@ -240,7 +240,7 @@ You can make a file optional by using standard type annotations and setting a de //// tab | Python 3.8+ ```Python hl_lines="10 18" -{!> ../../../docs_src/request_files/tutorial001_02_an.py!} +{!> ../../docs_src/request_files/tutorial001_02_an.py!} ``` //// @@ -254,7 +254,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7 15" -{!> ../../../docs_src/request_files/tutorial001_02_py310.py!} +{!> ../../docs_src/request_files/tutorial001_02_py310.py!} ``` //// @@ -268,7 +268,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9 17" -{!> ../../../docs_src/request_files/tutorial001_02.py!} +{!> ../../docs_src/request_files/tutorial001_02.py!} ``` //// @@ -280,7 +280,7 @@ You can also use `File()` with `UploadFile`, for example, to set additional meta //// tab | Python 3.9+ ```Python hl_lines="9 15" -{!> ../../../docs_src/request_files/tutorial001_03_an_py39.py!} +{!> ../../docs_src/request_files/tutorial001_03_an_py39.py!} ``` //// @@ -288,7 +288,7 @@ You can also use `File()` with `UploadFile`, for example, to set additional meta //// tab | Python 3.8+ ```Python hl_lines="8 14" -{!> ../../../docs_src/request_files/tutorial001_03_an.py!} +{!> ../../docs_src/request_files/tutorial001_03_an.py!} ``` //// @@ -302,7 +302,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7 13" -{!> ../../../docs_src/request_files/tutorial001_03.py!} +{!> ../../docs_src/request_files/tutorial001_03.py!} ``` //// @@ -318,7 +318,7 @@ To use that, declare a list of `bytes` or `UploadFile`: //// tab | Python 3.9+ ```Python hl_lines="10 15" -{!> ../../../docs_src/request_files/tutorial002_an_py39.py!} +{!> ../../docs_src/request_files/tutorial002_an_py39.py!} ``` //// @@ -326,7 +326,7 @@ To use that, declare a list of `bytes` or `UploadFile`: //// tab | Python 3.8+ ```Python hl_lines="11 16" -{!> ../../../docs_src/request_files/tutorial002_an.py!} +{!> ../../docs_src/request_files/tutorial002_an.py!} ``` //// @@ -340,7 +340,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="8 13" -{!> ../../../docs_src/request_files/tutorial002_py39.py!} +{!> ../../docs_src/request_files/tutorial002_py39.py!} ``` //// @@ -354,7 +354,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="10 15" -{!> ../../../docs_src/request_files/tutorial002.py!} +{!> ../../docs_src/request_files/tutorial002.py!} ``` //// @@ -376,7 +376,7 @@ And the same way as before, you can use `File()` to set additional parameters, e //// tab | Python 3.9+ ```Python hl_lines="11 18-20" -{!> ../../../docs_src/request_files/tutorial003_an_py39.py!} +{!> ../../docs_src/request_files/tutorial003_an_py39.py!} ``` //// @@ -384,7 +384,7 @@ And the same way as before, you can use `File()` to set additional parameters, e //// tab | Python 3.8+ ```Python hl_lines="12 19-21" -{!> ../../../docs_src/request_files/tutorial003_an.py!} +{!> ../../docs_src/request_files/tutorial003_an.py!} ``` //// @@ -398,7 +398,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9 16" -{!> ../../../docs_src/request_files/tutorial003_py39.py!} +{!> ../../docs_src/request_files/tutorial003_py39.py!} ``` //// @@ -412,7 +412,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="11 18" -{!> ../../../docs_src/request_files/tutorial003.py!} +{!> ../../docs_src/request_files/tutorial003.py!} ``` //// diff --git a/docs/en/docs/tutorial/request-form-models.md b/docs/en/docs/tutorial/request-form-models.md index 1440d17b8..f1142877a 100644 --- a/docs/en/docs/tutorial/request-form-models.md +++ b/docs/en/docs/tutorial/request-form-models.md @@ -27,7 +27,7 @@ You just need to declare a **Pydantic model** with the fields you want to receiv //// tab | Python 3.9+ ```Python hl_lines="9-11 15" -{!> ../../../docs_src/request_form_models/tutorial001_an_py39.py!} +{!> ../../docs_src/request_form_models/tutorial001_an_py39.py!} ``` //// @@ -35,7 +35,7 @@ You just need to declare a **Pydantic model** with the fields you want to receiv //// tab | Python 3.8+ ```Python hl_lines="8-10 14" -{!> ../../../docs_src/request_form_models/tutorial001_an.py!} +{!> ../../docs_src/request_form_models/tutorial001_an.py!} ``` //// @@ -49,7 +49,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7-9 13" -{!> ../../../docs_src/request_form_models/tutorial001.py!} +{!> ../../docs_src/request_form_models/tutorial001.py!} ``` //// @@ -79,7 +79,7 @@ You can use Pydantic's model configuration to `forbid` any `extra` fields: //// tab | Python 3.9+ ```Python hl_lines="12" -{!> ../../../docs_src/request_form_models/tutorial002_an_py39.py!} +{!> ../../docs_src/request_form_models/tutorial002_an_py39.py!} ``` //// @@ -87,7 +87,7 @@ You can use Pydantic's model configuration to `forbid` any `extra` fields: //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/request_form_models/tutorial002_an.py!} +{!> ../../docs_src/request_form_models/tutorial002_an.py!} ``` //// @@ -101,7 +101,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="10" -{!> ../../../docs_src/request_form_models/tutorial002.py!} +{!> ../../docs_src/request_form_models/tutorial002.py!} ``` //// diff --git a/docs/en/docs/tutorial/request-forms-and-files.md b/docs/en/docs/tutorial/request-forms-and-files.md index 7830a2ba4..d60fc4c00 100644 --- a/docs/en/docs/tutorial/request-forms-and-files.md +++ b/docs/en/docs/tutorial/request-forms-and-files.md @@ -19,7 +19,7 @@ $ pip install python-multipart //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/request_forms_and_files/tutorial001_an_py39.py!} +{!> ../../docs_src/request_forms_and_files/tutorial001_an_py39.py!} ``` //// @@ -27,7 +27,7 @@ $ pip install python-multipart //// tab | Python 3.8+ ```Python hl_lines="1" -{!> ../../../docs_src/request_forms_and_files/tutorial001_an.py!} +{!> ../../docs_src/request_forms_and_files/tutorial001_an.py!} ``` //// @@ -41,7 +41,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="1" -{!> ../../../docs_src/request_forms_and_files/tutorial001.py!} +{!> ../../docs_src/request_forms_and_files/tutorial001.py!} ``` //// @@ -53,7 +53,7 @@ Create file and form parameters the same way you would for `Body` or `Query`: //// tab | Python 3.9+ ```Python hl_lines="10-12" -{!> ../../../docs_src/request_forms_and_files/tutorial001_an_py39.py!} +{!> ../../docs_src/request_forms_and_files/tutorial001_an_py39.py!} ``` //// @@ -61,7 +61,7 @@ Create file and form parameters the same way you would for `Body` or `Query`: //// tab | Python 3.8+ ```Python hl_lines="9-11" -{!> ../../../docs_src/request_forms_and_files/tutorial001_an.py!} +{!> ../../docs_src/request_forms_and_files/tutorial001_an.py!} ``` //// @@ -75,7 +75,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="8" -{!> ../../../docs_src/request_forms_and_files/tutorial001.py!} +{!> ../../docs_src/request_forms_and_files/tutorial001.py!} ``` //// diff --git a/docs/en/docs/tutorial/request-forms.md b/docs/en/docs/tutorial/request-forms.md index 87cfdefbc..2ccc6886e 100644 --- a/docs/en/docs/tutorial/request-forms.md +++ b/docs/en/docs/tutorial/request-forms.md @@ -21,7 +21,7 @@ Import `Form` from `fastapi`: //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/request_forms/tutorial001_an_py39.py!} +{!> ../../docs_src/request_forms/tutorial001_an_py39.py!} ``` //// @@ -29,7 +29,7 @@ Import `Form` from `fastapi`: //// tab | Python 3.8+ ```Python hl_lines="1" -{!> ../../../docs_src/request_forms/tutorial001_an.py!} +{!> ../../docs_src/request_forms/tutorial001_an.py!} ``` //// @@ -43,7 +43,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="1" -{!> ../../../docs_src/request_forms/tutorial001.py!} +{!> ../../docs_src/request_forms/tutorial001.py!} ``` //// @@ -55,7 +55,7 @@ Create form parameters the same way you would for `Body` or `Query`: //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/request_forms/tutorial001_an_py39.py!} +{!> ../../docs_src/request_forms/tutorial001_an_py39.py!} ``` //// @@ -63,7 +63,7 @@ Create form parameters the same way you would for `Body` or `Query`: //// tab | Python 3.8+ ```Python hl_lines="8" -{!> ../../../docs_src/request_forms/tutorial001_an.py!} +{!> ../../docs_src/request_forms/tutorial001_an.py!} ``` //// @@ -77,7 +77,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7" -{!> ../../../docs_src/request_forms/tutorial001.py!} +{!> ../../docs_src/request_forms/tutorial001.py!} ``` //// diff --git a/docs/en/docs/tutorial/response-model.md b/docs/en/docs/tutorial/response-model.md index 6a2093e6d..36ccfc4ce 100644 --- a/docs/en/docs/tutorial/response-model.md +++ b/docs/en/docs/tutorial/response-model.md @@ -7,7 +7,7 @@ You can use **type annotations** the same way you would for input data in functi //// tab | Python 3.10+ ```Python hl_lines="16 21" -{!> ../../../docs_src/response_model/tutorial001_01_py310.py!} +{!> ../../docs_src/response_model/tutorial001_01_py310.py!} ``` //// @@ -15,7 +15,7 @@ You can use **type annotations** the same way you would for input data in functi //// tab | Python 3.9+ ```Python hl_lines="18 23" -{!> ../../../docs_src/response_model/tutorial001_01_py39.py!} +{!> ../../docs_src/response_model/tutorial001_01_py39.py!} ``` //// @@ -23,7 +23,7 @@ You can use **type annotations** the same way you would for input data in functi //// tab | Python 3.8+ ```Python hl_lines="18 23" -{!> ../../../docs_src/response_model/tutorial001_01.py!} +{!> ../../docs_src/response_model/tutorial001_01.py!} ``` //// @@ -62,7 +62,7 @@ You can use the `response_model` parameter in any of the *path operations*: //// tab | Python 3.10+ ```Python hl_lines="17 22 24-27" -{!> ../../../docs_src/response_model/tutorial001_py310.py!} +{!> ../../docs_src/response_model/tutorial001_py310.py!} ``` //// @@ -70,7 +70,7 @@ You can use the `response_model` parameter in any of the *path operations*: //// tab | Python 3.9+ ```Python hl_lines="17 22 24-27" -{!> ../../../docs_src/response_model/tutorial001_py39.py!} +{!> ../../docs_src/response_model/tutorial001_py39.py!} ``` //// @@ -78,7 +78,7 @@ You can use the `response_model` parameter in any of the *path operations*: //// tab | Python 3.8+ ```Python hl_lines="17 22 24-27" -{!> ../../../docs_src/response_model/tutorial001.py!} +{!> ../../docs_src/response_model/tutorial001.py!} ``` //// @@ -116,7 +116,7 @@ Here we are declaring a `UserIn` model, it will contain a plaintext password: //// tab | Python 3.10+ ```Python hl_lines="7 9" -{!> ../../../docs_src/response_model/tutorial002_py310.py!} +{!> ../../docs_src/response_model/tutorial002_py310.py!} ``` //// @@ -124,7 +124,7 @@ Here we are declaring a `UserIn` model, it will contain a plaintext password: //// tab | Python 3.8+ ```Python hl_lines="9 11" -{!> ../../../docs_src/response_model/tutorial002.py!} +{!> ../../docs_src/response_model/tutorial002.py!} ``` //// @@ -152,7 +152,7 @@ And we are using this model to declare our input and the same model to declare o //// tab | Python 3.10+ ```Python hl_lines="16" -{!> ../../../docs_src/response_model/tutorial002_py310.py!} +{!> ../../docs_src/response_model/tutorial002_py310.py!} ``` //// @@ -160,7 +160,7 @@ And we are using this model to declare our input and the same model to declare o //// tab | Python 3.8+ ```Python hl_lines="18" -{!> ../../../docs_src/response_model/tutorial002.py!} +{!> ../../docs_src/response_model/tutorial002.py!} ``` //// @@ -184,7 +184,7 @@ We can instead create an input model with the plaintext password and an output m //// tab | Python 3.10+ ```Python hl_lines="9 11 16" -{!> ../../../docs_src/response_model/tutorial003_py310.py!} +{!> ../../docs_src/response_model/tutorial003_py310.py!} ``` //// @@ -192,7 +192,7 @@ We can instead create an input model with the plaintext password and an output m //// tab | Python 3.8+ ```Python hl_lines="9 11 16" -{!> ../../../docs_src/response_model/tutorial003.py!} +{!> ../../docs_src/response_model/tutorial003.py!} ``` //// @@ -202,7 +202,7 @@ Here, even though our *path operation function* is returning the same input user //// tab | Python 3.10+ ```Python hl_lines="24" -{!> ../../../docs_src/response_model/tutorial003_py310.py!} +{!> ../../docs_src/response_model/tutorial003_py310.py!} ``` //// @@ -210,7 +210,7 @@ Here, even though our *path operation function* is returning the same input user //// tab | Python 3.8+ ```Python hl_lines="24" -{!> ../../../docs_src/response_model/tutorial003.py!} +{!> ../../docs_src/response_model/tutorial003.py!} ``` //// @@ -220,7 +220,7 @@ Here, even though our *path operation function* is returning the same input user //// tab | Python 3.10+ ```Python hl_lines="22" -{!> ../../../docs_src/response_model/tutorial003_py310.py!} +{!> ../../docs_src/response_model/tutorial003_py310.py!} ``` //// @@ -228,7 +228,7 @@ Here, even though our *path operation function* is returning the same input user //// tab | Python 3.8+ ```Python hl_lines="22" -{!> ../../../docs_src/response_model/tutorial003.py!} +{!> ../../docs_src/response_model/tutorial003.py!} ``` //// @@ -258,7 +258,7 @@ And in those cases, we can use classes and inheritance to take advantage of func //// tab | Python 3.10+ ```Python hl_lines="7-10 13-14 18" -{!> ../../../docs_src/response_model/tutorial003_01_py310.py!} +{!> ../../docs_src/response_model/tutorial003_01_py310.py!} ``` //// @@ -266,7 +266,7 @@ And in those cases, we can use classes and inheritance to take advantage of func //// tab | Python 3.8+ ```Python hl_lines="9-13 15-16 20" -{!> ../../../docs_src/response_model/tutorial003_01.py!} +{!> ../../docs_src/response_model/tutorial003_01.py!} ``` //// @@ -312,7 +312,7 @@ There might be cases where you return something that is not a valid Pydantic fie The most common case would be [returning a Response directly as explained later in the advanced docs](../advanced/response-directly.md){.internal-link target=_blank}. ```Python hl_lines="8 10-11" -{!> ../../../docs_src/response_model/tutorial003_02.py!} +{!> ../../docs_src/response_model/tutorial003_02.py!} ``` This simple case is handled automatically by FastAPI because the return type annotation is the class (or a subclass of) `Response`. @@ -324,7 +324,7 @@ And tools will also be happy because both `RedirectResponse` and `JSONResponse` You can also use a subclass of `Response` in the type annotation: ```Python hl_lines="8-9" -{!> ../../../docs_src/response_model/tutorial003_03.py!} +{!> ../../docs_src/response_model/tutorial003_03.py!} ``` This will also work because `RedirectResponse` is a subclass of `Response`, and FastAPI will automatically handle this simple case. @@ -338,7 +338,7 @@ The same would happen if you had something like a ../../../docs_src/response_model/tutorial003_04.py!} +{!> ../../docs_src/response_model/tutorial003_04.py!} ``` //// @@ -364,7 +364,7 @@ In this case, you can disable the response model generation by setting `response //// tab | Python 3.10+ ```Python hl_lines="7" -{!> ../../../docs_src/response_model/tutorial003_05_py310.py!} +{!> ../../docs_src/response_model/tutorial003_05_py310.py!} ``` //// @@ -372,7 +372,7 @@ In this case, you can disable the response model generation by setting `response //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/response_model/tutorial003_05.py!} +{!> ../../docs_src/response_model/tutorial003_05.py!} ``` //// @@ -386,7 +386,7 @@ Your response model could have default values, like: //// tab | Python 3.10+ ```Python hl_lines="9 11-12" -{!> ../../../docs_src/response_model/tutorial004_py310.py!} +{!> ../../docs_src/response_model/tutorial004_py310.py!} ``` //// @@ -394,7 +394,7 @@ Your response model could have default values, like: //// tab | Python 3.9+ ```Python hl_lines="11 13-14" -{!> ../../../docs_src/response_model/tutorial004_py39.py!} +{!> ../../docs_src/response_model/tutorial004_py39.py!} ``` //// @@ -402,7 +402,7 @@ Your response model could have default values, like: //// tab | Python 3.8+ ```Python hl_lines="11 13-14" -{!> ../../../docs_src/response_model/tutorial004.py!} +{!> ../../docs_src/response_model/tutorial004.py!} ``` //// @@ -422,7 +422,7 @@ You can set the *path operation decorator* parameter `response_model_exclude_uns //// tab | Python 3.10+ ```Python hl_lines="22" -{!> ../../../docs_src/response_model/tutorial004_py310.py!} +{!> ../../docs_src/response_model/tutorial004_py310.py!} ``` //// @@ -430,7 +430,7 @@ You can set the *path operation decorator* parameter `response_model_exclude_uns //// tab | Python 3.9+ ```Python hl_lines="24" -{!> ../../../docs_src/response_model/tutorial004_py39.py!} +{!> ../../docs_src/response_model/tutorial004_py39.py!} ``` //// @@ -438,7 +438,7 @@ You can set the *path operation decorator* parameter `response_model_exclude_uns //// tab | Python 3.8+ ```Python hl_lines="24" -{!> ../../../docs_src/response_model/tutorial004.py!} +{!> ../../docs_src/response_model/tutorial004.py!} ``` //// @@ -541,7 +541,7 @@ This also applies to `response_model_by_alias` that works similarly. //// tab | Python 3.10+ ```Python hl_lines="29 35" -{!> ../../../docs_src/response_model/tutorial005_py310.py!} +{!> ../../docs_src/response_model/tutorial005_py310.py!} ``` //// @@ -549,7 +549,7 @@ This also applies to `response_model_by_alias` that works similarly. //// tab | Python 3.8+ ```Python hl_lines="31 37" -{!> ../../../docs_src/response_model/tutorial005.py!} +{!> ../../docs_src/response_model/tutorial005.py!} ``` //// @@ -569,7 +569,7 @@ If you forget to use a `set` and use a `list` or `tuple` instead, FastAPI will s //// tab | Python 3.10+ ```Python hl_lines="29 35" -{!> ../../../docs_src/response_model/tutorial006_py310.py!} +{!> ../../docs_src/response_model/tutorial006_py310.py!} ``` //// @@ -577,7 +577,7 @@ If you forget to use a `set` and use a `list` or `tuple` instead, FastAPI will s //// tab | Python 3.8+ ```Python hl_lines="31 37" -{!> ../../../docs_src/response_model/tutorial006.py!} +{!> ../../docs_src/response_model/tutorial006.py!} ``` //// diff --git a/docs/en/docs/tutorial/response-status-code.md b/docs/en/docs/tutorial/response-status-code.md index 2613bf73d..73af62aed 100644 --- a/docs/en/docs/tutorial/response-status-code.md +++ b/docs/en/docs/tutorial/response-status-code.md @@ -9,7 +9,7 @@ The same way you can specify a response model, you can also declare the HTTP sta * etc. ```Python hl_lines="6" -{!../../../docs_src/response_status_code/tutorial001.py!} +{!../../docs_src/response_status_code/tutorial001.py!} ``` /// note @@ -77,7 +77,7 @@ To know more about each status code and which code is for what, check the ../../../docs_src/schema_extra_example/tutorial001_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial001_py310.py!} ``` //// @@ -19,7 +19,7 @@ You can declare `examples` for a Pydantic model that will be added to the genera //// tab | Python 3.10+ Pydantic v1 ```Python hl_lines="13-23" -{!> ../../../docs_src/schema_extra_example/tutorial001_py310_pv1.py!} +{!> ../../docs_src/schema_extra_example/tutorial001_py310_pv1.py!} ``` //// @@ -27,7 +27,7 @@ You can declare `examples` for a Pydantic model that will be added to the genera //// tab | Python 3.8+ Pydantic v2 ```Python hl_lines="15-26" -{!> ../../../docs_src/schema_extra_example/tutorial001.py!} +{!> ../../docs_src/schema_extra_example/tutorial001.py!} ``` //// @@ -35,7 +35,7 @@ You can declare `examples` for a Pydantic model that will be added to the genera //// tab | Python 3.8+ Pydantic v1 ```Python hl_lines="15-25" -{!> ../../../docs_src/schema_extra_example/tutorial001_pv1.py!} +{!> ../../docs_src/schema_extra_example/tutorial001_pv1.py!} ``` //// @@ -83,7 +83,7 @@ When using `Field()` with Pydantic models, you can also declare additional `exam //// tab | Python 3.10+ ```Python hl_lines="2 8-11" -{!> ../../../docs_src/schema_extra_example/tutorial002_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial002_py310.py!} ``` //// @@ -91,7 +91,7 @@ When using `Field()` with Pydantic models, you can also declare additional `exam //// tab | Python 3.8+ ```Python hl_lines="4 10-13" -{!> ../../../docs_src/schema_extra_example/tutorial002.py!} +{!> ../../docs_src/schema_extra_example/tutorial002.py!} ``` //// @@ -117,7 +117,7 @@ Here we pass `examples` containing one example of the data expected in `Body()`: //// tab | Python 3.10+ ```Python hl_lines="22-29" -{!> ../../../docs_src/schema_extra_example/tutorial003_an_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial003_an_py310.py!} ``` //// @@ -125,7 +125,7 @@ Here we pass `examples` containing one example of the data expected in `Body()`: //// tab | Python 3.9+ ```Python hl_lines="22-29" -{!> ../../../docs_src/schema_extra_example/tutorial003_an_py39.py!} +{!> ../../docs_src/schema_extra_example/tutorial003_an_py39.py!} ``` //// @@ -133,7 +133,7 @@ Here we pass `examples` containing one example of the data expected in `Body()`: //// tab | Python 3.8+ ```Python hl_lines="23-30" -{!> ../../../docs_src/schema_extra_example/tutorial003_an.py!} +{!> ../../docs_src/schema_extra_example/tutorial003_an.py!} ``` //// @@ -147,7 +147,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="18-25" -{!> ../../../docs_src/schema_extra_example/tutorial003_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial003_py310.py!} ``` //// @@ -161,7 +161,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="20-27" -{!> ../../../docs_src/schema_extra_example/tutorial003.py!} +{!> ../../docs_src/schema_extra_example/tutorial003.py!} ``` //// @@ -179,7 +179,7 @@ You can of course also pass multiple `examples`: //// tab | Python 3.10+ ```Python hl_lines="23-38" -{!> ../../../docs_src/schema_extra_example/tutorial004_an_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial004_an_py310.py!} ``` //// @@ -187,7 +187,7 @@ You can of course also pass multiple `examples`: //// tab | Python 3.9+ ```Python hl_lines="23-38" -{!> ../../../docs_src/schema_extra_example/tutorial004_an_py39.py!} +{!> ../../docs_src/schema_extra_example/tutorial004_an_py39.py!} ``` //// @@ -195,7 +195,7 @@ You can of course also pass multiple `examples`: //// tab | Python 3.8+ ```Python hl_lines="24-39" -{!> ../../../docs_src/schema_extra_example/tutorial004_an.py!} +{!> ../../docs_src/schema_extra_example/tutorial004_an.py!} ``` //// @@ -209,7 +209,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="19-34" -{!> ../../../docs_src/schema_extra_example/tutorial004_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial004_py310.py!} ``` //// @@ -223,7 +223,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="21-36" -{!> ../../../docs_src/schema_extra_example/tutorial004.py!} +{!> ../../docs_src/schema_extra_example/tutorial004.py!} ``` //// @@ -270,7 +270,7 @@ You can use it like this: //// tab | Python 3.10+ ```Python hl_lines="23-49" -{!> ../../../docs_src/schema_extra_example/tutorial005_an_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial005_an_py310.py!} ``` //// @@ -278,7 +278,7 @@ You can use it like this: //// tab | Python 3.9+ ```Python hl_lines="23-49" -{!> ../../../docs_src/schema_extra_example/tutorial005_an_py39.py!} +{!> ../../docs_src/schema_extra_example/tutorial005_an_py39.py!} ``` //// @@ -286,7 +286,7 @@ You can use it like this: //// tab | Python 3.8+ ```Python hl_lines="24-50" -{!> ../../../docs_src/schema_extra_example/tutorial005_an.py!} +{!> ../../docs_src/schema_extra_example/tutorial005_an.py!} ``` //// @@ -300,7 +300,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="19-45" -{!> ../../../docs_src/schema_extra_example/tutorial005_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial005_py310.py!} ``` //// @@ -314,7 +314,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="21-47" -{!> ../../../docs_src/schema_extra_example/tutorial005.py!} +{!> ../../docs_src/schema_extra_example/tutorial005.py!} ``` //// diff --git a/docs/en/docs/tutorial/security/first-steps.md b/docs/en/docs/tutorial/security/first-steps.md index d1fe0163e..ead2aa799 100644 --- a/docs/en/docs/tutorial/security/first-steps.md +++ b/docs/en/docs/tutorial/security/first-steps.md @@ -23,7 +23,7 @@ Copy the example in a file `main.py`: //// tab | Python 3.9+ ```Python -{!> ../../../docs_src/security/tutorial001_an_py39.py!} +{!> ../../docs_src/security/tutorial001_an_py39.py!} ``` //// @@ -31,7 +31,7 @@ Copy the example in a file `main.py`: //// tab | Python 3.8+ ```Python -{!> ../../../docs_src/security/tutorial001_an.py!} +{!> ../../docs_src/security/tutorial001_an.py!} ``` //// @@ -45,7 +45,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python -{!> ../../../docs_src/security/tutorial001.py!} +{!> ../../docs_src/security/tutorial001.py!} ``` //// @@ -163,7 +163,7 @@ When we create an instance of the `OAuth2PasswordBearer` class we pass in the `t //// tab | Python 3.9+ ```Python hl_lines="8" -{!> ../../../docs_src/security/tutorial001_an_py39.py!} +{!> ../../docs_src/security/tutorial001_an_py39.py!} ``` //// @@ -171,7 +171,7 @@ When we create an instance of the `OAuth2PasswordBearer` class we pass in the `t //// tab | Python 3.8+ ```Python hl_lines="7" -{!> ../../../docs_src/security/tutorial001_an.py!} +{!> ../../docs_src/security/tutorial001_an.py!} ``` //// @@ -185,7 +185,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="6" -{!> ../../../docs_src/security/tutorial001.py!} +{!> ../../docs_src/security/tutorial001.py!} ``` //// @@ -229,7 +229,7 @@ Now you can pass that `oauth2_scheme` in a dependency with `Depends`. //// tab | Python 3.9+ ```Python hl_lines="12" -{!> ../../../docs_src/security/tutorial001_an_py39.py!} +{!> ../../docs_src/security/tutorial001_an_py39.py!} ``` //// @@ -237,7 +237,7 @@ Now you can pass that `oauth2_scheme` in a dependency with `Depends`. //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/security/tutorial001_an.py!} +{!> ../../docs_src/security/tutorial001_an.py!} ``` //// @@ -251,7 +251,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="10" -{!> ../../../docs_src/security/tutorial001.py!} +{!> ../../docs_src/security/tutorial001.py!} ``` //// diff --git a/docs/en/docs/tutorial/security/get-current-user.md b/docs/en/docs/tutorial/security/get-current-user.md index 7faaa3e13..069806621 100644 --- a/docs/en/docs/tutorial/security/get-current-user.md +++ b/docs/en/docs/tutorial/security/get-current-user.md @@ -5,7 +5,7 @@ In the previous chapter the security system (which is based on the dependency in //// tab | Python 3.9+ ```Python hl_lines="12" -{!> ../../../docs_src/security/tutorial001_an_py39.py!} +{!> ../../docs_src/security/tutorial001_an_py39.py!} ``` //// @@ -13,7 +13,7 @@ In the previous chapter the security system (which is based on the dependency in //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/security/tutorial001_an.py!} +{!> ../../docs_src/security/tutorial001_an.py!} ``` //// @@ -27,7 +27,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="10" -{!> ../../../docs_src/security/tutorial001.py!} +{!> ../../docs_src/security/tutorial001.py!} ``` //// @@ -45,7 +45,7 @@ The same way we use Pydantic to declare bodies, we can use it anywhere else: //// tab | Python 3.10+ ```Python hl_lines="5 12-16" -{!> ../../../docs_src/security/tutorial002_an_py310.py!} +{!> ../../docs_src/security/tutorial002_an_py310.py!} ``` //// @@ -53,7 +53,7 @@ The same way we use Pydantic to declare bodies, we can use it anywhere else: //// tab | Python 3.9+ ```Python hl_lines="5 12-16" -{!> ../../../docs_src/security/tutorial002_an_py39.py!} +{!> ../../docs_src/security/tutorial002_an_py39.py!} ``` //// @@ -61,7 +61,7 @@ The same way we use Pydantic to declare bodies, we can use it anywhere else: //// tab | Python 3.8+ ```Python hl_lines="5 13-17" -{!> ../../../docs_src/security/tutorial002_an.py!} +{!> ../../docs_src/security/tutorial002_an.py!} ``` //// @@ -75,7 +75,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="3 10-14" -{!> ../../../docs_src/security/tutorial002_py310.py!} +{!> ../../docs_src/security/tutorial002_py310.py!} ``` //// @@ -89,7 +89,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="5 12-16" -{!> ../../../docs_src/security/tutorial002.py!} +{!> ../../docs_src/security/tutorial002.py!} ``` //// @@ -107,7 +107,7 @@ The same as we were doing before in the *path operation* directly, our new depen //// tab | Python 3.10+ ```Python hl_lines="25" -{!> ../../../docs_src/security/tutorial002_an_py310.py!} +{!> ../../docs_src/security/tutorial002_an_py310.py!} ``` //// @@ -115,7 +115,7 @@ The same as we were doing before in the *path operation* directly, our new depen //// tab | Python 3.9+ ```Python hl_lines="25" -{!> ../../../docs_src/security/tutorial002_an_py39.py!} +{!> ../../docs_src/security/tutorial002_an_py39.py!} ``` //// @@ -123,7 +123,7 @@ The same as we were doing before in the *path operation* directly, our new depen //// tab | Python 3.8+ ```Python hl_lines="26" -{!> ../../../docs_src/security/tutorial002_an.py!} +{!> ../../docs_src/security/tutorial002_an.py!} ``` //// @@ -137,7 +137,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="23" -{!> ../../../docs_src/security/tutorial002_py310.py!} +{!> ../../docs_src/security/tutorial002_py310.py!} ``` //// @@ -151,7 +151,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="25" -{!> ../../../docs_src/security/tutorial002.py!} +{!> ../../docs_src/security/tutorial002.py!} ``` //// @@ -163,7 +163,7 @@ Prefer to use the `Annotated` version if possible. //// tab | Python 3.10+ ```Python hl_lines="19-22 26-27" -{!> ../../../docs_src/security/tutorial002_an_py310.py!} +{!> ../../docs_src/security/tutorial002_an_py310.py!} ``` //// @@ -171,7 +171,7 @@ Prefer to use the `Annotated` version if possible. //// tab | Python 3.9+ ```Python hl_lines="19-22 26-27" -{!> ../../../docs_src/security/tutorial002_an_py39.py!} +{!> ../../docs_src/security/tutorial002_an_py39.py!} ``` //// @@ -179,7 +179,7 @@ Prefer to use the `Annotated` version if possible. //// tab | Python 3.8+ ```Python hl_lines="20-23 27-28" -{!> ../../../docs_src/security/tutorial002_an.py!} +{!> ../../docs_src/security/tutorial002_an.py!} ``` //// @@ -193,7 +193,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="17-20 24-25" -{!> ../../../docs_src/security/tutorial002_py310.py!} +{!> ../../docs_src/security/tutorial002_py310.py!} ``` //// @@ -207,7 +207,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="19-22 26-27" -{!> ../../../docs_src/security/tutorial002.py!} +{!> ../../docs_src/security/tutorial002.py!} ``` //// @@ -219,7 +219,7 @@ So now we can use the same `Depends` with our `get_current_user` in the *path op //// tab | Python 3.10+ ```Python hl_lines="31" -{!> ../../../docs_src/security/tutorial002_an_py310.py!} +{!> ../../docs_src/security/tutorial002_an_py310.py!} ``` //// @@ -227,7 +227,7 @@ So now we can use the same `Depends` with our `get_current_user` in the *path op //// tab | Python 3.9+ ```Python hl_lines="31" -{!> ../../../docs_src/security/tutorial002_an_py39.py!} +{!> ../../docs_src/security/tutorial002_an_py39.py!} ``` //// @@ -235,7 +235,7 @@ So now we can use the same `Depends` with our `get_current_user` in the *path op //// tab | Python 3.8+ ```Python hl_lines="32" -{!> ../../../docs_src/security/tutorial002_an.py!} +{!> ../../docs_src/security/tutorial002_an.py!} ``` //// @@ -249,7 +249,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="29" -{!> ../../../docs_src/security/tutorial002_py310.py!} +{!> ../../docs_src/security/tutorial002_py310.py!} ``` //// @@ -263,7 +263,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="31" -{!> ../../../docs_src/security/tutorial002.py!} +{!> ../../docs_src/security/tutorial002.py!} ``` //// @@ -323,7 +323,7 @@ And all these thousands of *path operations* can be as small as 3 lines: //// tab | Python 3.10+ ```Python hl_lines="30-32" -{!> ../../../docs_src/security/tutorial002_an_py310.py!} +{!> ../../docs_src/security/tutorial002_an_py310.py!} ``` //// @@ -331,7 +331,7 @@ And all these thousands of *path operations* can be as small as 3 lines: //// tab | Python 3.9+ ```Python hl_lines="30-32" -{!> ../../../docs_src/security/tutorial002_an_py39.py!} +{!> ../../docs_src/security/tutorial002_an_py39.py!} ``` //// @@ -339,7 +339,7 @@ And all these thousands of *path operations* can be as small as 3 lines: //// tab | Python 3.8+ ```Python hl_lines="31-33" -{!> ../../../docs_src/security/tutorial002_an.py!} +{!> ../../docs_src/security/tutorial002_an.py!} ``` //// @@ -353,7 +353,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="28-30" -{!> ../../../docs_src/security/tutorial002_py310.py!} +{!> ../../docs_src/security/tutorial002_py310.py!} ``` //// @@ -367,7 +367,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="30-32" -{!> ../../../docs_src/security/tutorial002.py!} +{!> ../../docs_src/security/tutorial002.py!} ``` //// diff --git a/docs/en/docs/tutorial/security/oauth2-jwt.md b/docs/en/docs/tutorial/security/oauth2-jwt.md index ba2bfef29..f454a8b28 100644 --- a/docs/en/docs/tutorial/security/oauth2-jwt.md +++ b/docs/en/docs/tutorial/security/oauth2-jwt.md @@ -119,7 +119,7 @@ And another one to authenticate and return a user. //// tab | Python 3.10+ ```Python hl_lines="8 49 56-57 60-61 70-76" -{!> ../../../docs_src/security/tutorial004_an_py310.py!} +{!> ../../docs_src/security/tutorial004_an_py310.py!} ``` //// @@ -127,7 +127,7 @@ And another one to authenticate and return a user. //// tab | Python 3.9+ ```Python hl_lines="8 49 56-57 60-61 70-76" -{!> ../../../docs_src/security/tutorial004_an_py39.py!} +{!> ../../docs_src/security/tutorial004_an_py39.py!} ``` //// @@ -135,7 +135,7 @@ And another one to authenticate and return a user. //// tab | Python 3.8+ ```Python hl_lines="8 50 57-58 61-62 71-77" -{!> ../../../docs_src/security/tutorial004_an.py!} +{!> ../../docs_src/security/tutorial004_an.py!} ``` //// @@ -149,7 +149,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7 48 55-56 59-60 69-75" -{!> ../../../docs_src/security/tutorial004_py310.py!} +{!> ../../docs_src/security/tutorial004_py310.py!} ``` //// @@ -163,7 +163,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="8 49 56-57 60-61 70-76" -{!> ../../../docs_src/security/tutorial004.py!} +{!> ../../docs_src/security/tutorial004.py!} ``` //// @@ -205,7 +205,7 @@ Create a utility function to generate a new access token. //// tab | Python 3.10+ ```Python hl_lines="4 7 13-15 29-31 79-87" -{!> ../../../docs_src/security/tutorial004_an_py310.py!} +{!> ../../docs_src/security/tutorial004_an_py310.py!} ``` //// @@ -213,7 +213,7 @@ Create a utility function to generate a new access token. //// tab | Python 3.9+ ```Python hl_lines="4 7 13-15 29-31 79-87" -{!> ../../../docs_src/security/tutorial004_an_py39.py!} +{!> ../../docs_src/security/tutorial004_an_py39.py!} ``` //// @@ -221,7 +221,7 @@ Create a utility function to generate a new access token. //// tab | Python 3.8+ ```Python hl_lines="4 7 14-16 30-32 80-88" -{!> ../../../docs_src/security/tutorial004_an.py!} +{!> ../../docs_src/security/tutorial004_an.py!} ``` //// @@ -235,7 +235,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="3 6 12-14 28-30 78-86" -{!> ../../../docs_src/security/tutorial004_py310.py!} +{!> ../../docs_src/security/tutorial004_py310.py!} ``` //// @@ -249,7 +249,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="4 7 13-15 29-31 79-87" -{!> ../../../docs_src/security/tutorial004.py!} +{!> ../../docs_src/security/tutorial004.py!} ``` //// @@ -265,7 +265,7 @@ If the token is invalid, return an HTTP error right away. //// tab | Python 3.10+ ```Python hl_lines="90-107" -{!> ../../../docs_src/security/tutorial004_an_py310.py!} +{!> ../../docs_src/security/tutorial004_an_py310.py!} ``` //// @@ -273,7 +273,7 @@ If the token is invalid, return an HTTP error right away. //// tab | Python 3.9+ ```Python hl_lines="90-107" -{!> ../../../docs_src/security/tutorial004_an_py39.py!} +{!> ../../docs_src/security/tutorial004_an_py39.py!} ``` //// @@ -281,7 +281,7 @@ If the token is invalid, return an HTTP error right away. //// tab | Python 3.8+ ```Python hl_lines="91-108" -{!> ../../../docs_src/security/tutorial004_an.py!} +{!> ../../docs_src/security/tutorial004_an.py!} ``` //// @@ -295,7 +295,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="89-106" -{!> ../../../docs_src/security/tutorial004_py310.py!} +{!> ../../docs_src/security/tutorial004_py310.py!} ``` //// @@ -309,7 +309,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="90-107" -{!> ../../../docs_src/security/tutorial004.py!} +{!> ../../docs_src/security/tutorial004.py!} ``` //// @@ -323,7 +323,7 @@ Create a real JWT access token and return it. //// tab | Python 3.10+ ```Python hl_lines="118-133" -{!> ../../../docs_src/security/tutorial004_an_py310.py!} +{!> ../../docs_src/security/tutorial004_an_py310.py!} ``` //// @@ -331,7 +331,7 @@ Create a real JWT access token and return it. //// tab | Python 3.9+ ```Python hl_lines="118-133" -{!> ../../../docs_src/security/tutorial004_an_py39.py!} +{!> ../../docs_src/security/tutorial004_an_py39.py!} ``` //// @@ -339,7 +339,7 @@ Create a real JWT access token and return it. //// tab | Python 3.8+ ```Python hl_lines="119-134" -{!> ../../../docs_src/security/tutorial004_an.py!} +{!> ../../docs_src/security/tutorial004_an.py!} ``` //// @@ -353,7 +353,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="115-130" -{!> ../../../docs_src/security/tutorial004_py310.py!} +{!> ../../docs_src/security/tutorial004_py310.py!} ``` //// @@ -367,7 +367,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="116-131" -{!> ../../../docs_src/security/tutorial004.py!} +{!> ../../docs_src/security/tutorial004.py!} ``` //// diff --git a/docs/en/docs/tutorial/security/simple-oauth2.md b/docs/en/docs/tutorial/security/simple-oauth2.md index c9f6a1382..dc15bef20 100644 --- a/docs/en/docs/tutorial/security/simple-oauth2.md +++ b/docs/en/docs/tutorial/security/simple-oauth2.md @@ -55,7 +55,7 @@ First, import `OAuth2PasswordRequestForm`, and use it as a dependency with `Depe //// tab | Python 3.10+ ```Python hl_lines="4 78" -{!> ../../../docs_src/security/tutorial003_an_py310.py!} +{!> ../../docs_src/security/tutorial003_an_py310.py!} ``` //// @@ -63,7 +63,7 @@ First, import `OAuth2PasswordRequestForm`, and use it as a dependency with `Depe //// tab | Python 3.9+ ```Python hl_lines="4 78" -{!> ../../../docs_src/security/tutorial003_an_py39.py!} +{!> ../../docs_src/security/tutorial003_an_py39.py!} ``` //// @@ -71,7 +71,7 @@ First, import `OAuth2PasswordRequestForm`, and use it as a dependency with `Depe //// tab | Python 3.8+ ```Python hl_lines="4 79" -{!> ../../../docs_src/security/tutorial003_an.py!} +{!> ../../docs_src/security/tutorial003_an.py!} ``` //// @@ -85,7 +85,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="2 74" -{!> ../../../docs_src/security/tutorial003_py310.py!} +{!> ../../docs_src/security/tutorial003_py310.py!} ``` //// @@ -99,7 +99,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="4 76" -{!> ../../../docs_src/security/tutorial003.py!} +{!> ../../docs_src/security/tutorial003.py!} ``` //// @@ -153,7 +153,7 @@ For the error, we use the exception `HTTPException`: //// tab | Python 3.10+ ```Python hl_lines="3 79-81" -{!> ../../../docs_src/security/tutorial003_an_py310.py!} +{!> ../../docs_src/security/tutorial003_an_py310.py!} ``` //// @@ -161,7 +161,7 @@ For the error, we use the exception `HTTPException`: //// tab | Python 3.9+ ```Python hl_lines="3 79-81" -{!> ../../../docs_src/security/tutorial003_an_py39.py!} +{!> ../../docs_src/security/tutorial003_an_py39.py!} ``` //// @@ -169,7 +169,7 @@ For the error, we use the exception `HTTPException`: //// tab | Python 3.8+ ```Python hl_lines="3 80-82" -{!> ../../../docs_src/security/tutorial003_an.py!} +{!> ../../docs_src/security/tutorial003_an.py!} ``` //// @@ -183,7 +183,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="1 75-77" -{!> ../../../docs_src/security/tutorial003_py310.py!} +{!> ../../docs_src/security/tutorial003_py310.py!} ``` //// @@ -197,7 +197,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="3 77-79" -{!> ../../../docs_src/security/tutorial003.py!} +{!> ../../docs_src/security/tutorial003.py!} ``` //// @@ -229,7 +229,7 @@ So, the thief won't be able to try to use those same passwords in another system //// tab | Python 3.10+ ```Python hl_lines="82-85" -{!> ../../../docs_src/security/tutorial003_an_py310.py!} +{!> ../../docs_src/security/tutorial003_an_py310.py!} ``` //// @@ -237,7 +237,7 @@ So, the thief won't be able to try to use those same passwords in another system //// tab | Python 3.9+ ```Python hl_lines="82-85" -{!> ../../../docs_src/security/tutorial003_an_py39.py!} +{!> ../../docs_src/security/tutorial003_an_py39.py!} ``` //// @@ -245,7 +245,7 @@ So, the thief won't be able to try to use those same passwords in another system //// tab | Python 3.8+ ```Python hl_lines="83-86" -{!> ../../../docs_src/security/tutorial003_an.py!} +{!> ../../docs_src/security/tutorial003_an.py!} ``` //// @@ -259,7 +259,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="78-81" -{!> ../../../docs_src/security/tutorial003_py310.py!} +{!> ../../docs_src/security/tutorial003_py310.py!} ``` //// @@ -273,7 +273,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="80-83" -{!> ../../../docs_src/security/tutorial003.py!} +{!> ../../docs_src/security/tutorial003.py!} ``` //// @@ -321,7 +321,7 @@ But for now, let's focus on the specific details we need. //// tab | Python 3.10+ ```Python hl_lines="87" -{!> ../../../docs_src/security/tutorial003_an_py310.py!} +{!> ../../docs_src/security/tutorial003_an_py310.py!} ``` //// @@ -329,7 +329,7 @@ But for now, let's focus on the specific details we need. //// tab | Python 3.9+ ```Python hl_lines="87" -{!> ../../../docs_src/security/tutorial003_an_py39.py!} +{!> ../../docs_src/security/tutorial003_an_py39.py!} ``` //// @@ -337,7 +337,7 @@ But for now, let's focus on the specific details we need. //// tab | Python 3.8+ ```Python hl_lines="88" -{!> ../../../docs_src/security/tutorial003_an.py!} +{!> ../../docs_src/security/tutorial003_an.py!} ``` //// @@ -351,7 +351,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="83" -{!> ../../../docs_src/security/tutorial003_py310.py!} +{!> ../../docs_src/security/tutorial003_py310.py!} ``` //// @@ -365,7 +365,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="85" -{!> ../../../docs_src/security/tutorial003.py!} +{!> ../../docs_src/security/tutorial003.py!} ``` //// @@ -397,7 +397,7 @@ So, in our endpoint, we will only get a user if the user exists, was correctly a //// tab | Python 3.10+ ```Python hl_lines="58-66 69-74 94" -{!> ../../../docs_src/security/tutorial003_an_py310.py!} +{!> ../../docs_src/security/tutorial003_an_py310.py!} ``` //// @@ -405,7 +405,7 @@ So, in our endpoint, we will only get a user if the user exists, was correctly a //// tab | Python 3.9+ ```Python hl_lines="58-66 69-74 94" -{!> ../../../docs_src/security/tutorial003_an_py39.py!} +{!> ../../docs_src/security/tutorial003_an_py39.py!} ``` //// @@ -413,7 +413,7 @@ So, in our endpoint, we will only get a user if the user exists, was correctly a //// tab | Python 3.8+ ```Python hl_lines="59-67 70-75 95" -{!> ../../../docs_src/security/tutorial003_an.py!} +{!> ../../docs_src/security/tutorial003_an.py!} ``` //// @@ -427,7 +427,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="56-64 67-70 88" -{!> ../../../docs_src/security/tutorial003_py310.py!} +{!> ../../docs_src/security/tutorial003_py310.py!} ``` //// @@ -441,7 +441,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="58-66 69-72 90" -{!> ../../../docs_src/security/tutorial003.py!} +{!> ../../docs_src/security/tutorial003.py!} ``` //// diff --git a/docs/en/docs/tutorial/sql-databases.md b/docs/en/docs/tutorial/sql-databases.md index 56971bf9d..f65fa773c 100644 --- a/docs/en/docs/tutorial/sql-databases.md +++ b/docs/en/docs/tutorial/sql-databases.md @@ -122,13 +122,13 @@ Let's refer to the file `sql_app/database.py`. ### Import the SQLAlchemy parts ```Python hl_lines="1-3" -{!../../../docs_src/sql_databases/sql_app/database.py!} +{!../../docs_src/sql_databases/sql_app/database.py!} ``` ### Create a database URL for SQLAlchemy ```Python hl_lines="5-6" -{!../../../docs_src/sql_databases/sql_app/database.py!} +{!../../docs_src/sql_databases/sql_app/database.py!} ``` In this example, we are "connecting" to a SQLite database (opening a file with the SQLite database). @@ -158,7 +158,7 @@ The first step is to create a SQLAlchemy "engine". We will later use this `engine` in other places. ```Python hl_lines="8-10" -{!../../../docs_src/sql_databases/sql_app/database.py!} +{!../../docs_src/sql_databases/sql_app/database.py!} ``` #### Note @@ -196,7 +196,7 @@ We will use `Session` (the one imported from SQLAlchemy) later. To create the `SessionLocal` class, use the function `sessionmaker`: ```Python hl_lines="11" -{!../../../docs_src/sql_databases/sql_app/database.py!} +{!../../docs_src/sql_databases/sql_app/database.py!} ``` ### Create a `Base` class @@ -206,7 +206,7 @@ Now we will use the function `declarative_base()` that returns a class. Later we will inherit from this class to create each of the database models or classes (the ORM models): ```Python hl_lines="13" -{!../../../docs_src/sql_databases/sql_app/database.py!} +{!../../docs_src/sql_databases/sql_app/database.py!} ``` ## Create the database models @@ -232,7 +232,7 @@ Create classes that inherit from it. These classes are the SQLAlchemy models. ```Python hl_lines="4 7-8 18-19" -{!../../../docs_src/sql_databases/sql_app/models.py!} +{!../../docs_src/sql_databases/sql_app/models.py!} ``` The `__tablename__` attribute tells SQLAlchemy the name of the table to use in the database for each of these models. @@ -248,7 +248,7 @@ We use `Column` from SQLAlchemy as the default value. And we pass a SQLAlchemy class "type", as `Integer`, `String`, and `Boolean`, that defines the type in the database, as an argument. ```Python hl_lines="1 10-13 21-24" -{!../../../docs_src/sql_databases/sql_app/models.py!} +{!../../docs_src/sql_databases/sql_app/models.py!} ``` ### Create the relationships @@ -260,7 +260,7 @@ For this, we use `relationship` provided by SQLAlchemy ORM. This will become, more or less, a "magic" attribute that will contain the values from other tables related to this one. ```Python hl_lines="2 15 26" -{!../../../docs_src/sql_databases/sql_app/models.py!} +{!../../docs_src/sql_databases/sql_app/models.py!} ``` When accessing the attribute `items` in a `User`, as in `my_user.items`, it will have a list of `Item` SQLAlchemy models (from the `items` table) that have a foreign key pointing to this record in the `users` table. @@ -478,7 +478,7 @@ Create utility functions to: * Read multiple items. ```Python hl_lines="1 3 6-7 10-11 14-15 27-28" -{!../../../docs_src/sql_databases/sql_app/crud.py!} +{!../../docs_src/sql_databases/sql_app/crud.py!} ``` /// tip @@ -499,7 +499,7 @@ The steps are: * `refresh` your instance (so that it contains any new data from the database, like the generated ID). ```Python hl_lines="18-24 31-36" -{!../../../docs_src/sql_databases/sql_app/crud.py!} +{!../../docs_src/sql_databases/sql_app/crud.py!} ``` /// info @@ -752,13 +752,13 @@ For example, in a background task worker with ../../../docs_src/app_testing/app_b_an_py310/main.py!} +{!> ../../docs_src/app_testing/app_b_an_py310/main.py!} ``` //// @@ -137,7 +137,7 @@ Both *path operations* require an `X-Token` header. //// tab | Python 3.9+ ```Python -{!> ../../../docs_src/app_testing/app_b_an_py39/main.py!} +{!> ../../docs_src/app_testing/app_b_an_py39/main.py!} ``` //// @@ -145,7 +145,7 @@ Both *path operations* require an `X-Token` header. //// tab | Python 3.8+ ```Python -{!> ../../../docs_src/app_testing/app_b_an/main.py!} +{!> ../../docs_src/app_testing/app_b_an/main.py!} ``` //// @@ -159,7 +159,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python -{!> ../../../docs_src/app_testing/app_b_py310/main.py!} +{!> ../../docs_src/app_testing/app_b_py310/main.py!} ``` //// @@ -173,7 +173,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python -{!> ../../../docs_src/app_testing/app_b/main.py!} +{!> ../../docs_src/app_testing/app_b/main.py!} ``` //// @@ -183,7 +183,7 @@ Prefer to use the `Annotated` version if possible. You could then update `test_main.py` with the extended tests: ```Python -{!> ../../../docs_src/app_testing/app_b/test_main.py!} +{!> ../../docs_src/app_testing/app_b/test_main.py!} ``` Whenever you need the client to pass information in the request and you don't know how to, you can search (Google) how to do it in `httpx`, or even how to do it with `requests`, as HTTPX's design is based on Requests' design. diff --git a/docs/en/mkdocs.yml b/docs/en/mkdocs.yml index 5161b891b..a18af2022 100644 --- a/docs/en/mkdocs.yml +++ b/docs/en/mkdocs.yml @@ -305,7 +305,6 @@ markdown_extensions: # Other extensions mdx_include: - base_path: docs extra: analytics: diff --git a/docs/es/docs/advanced/additional-status-codes.md b/docs/es/docs/advanced/additional-status-codes.md index 664604c59..4a0625c25 100644 --- a/docs/es/docs/advanced/additional-status-codes.md +++ b/docs/es/docs/advanced/additional-status-codes.md @@ -15,7 +15,7 @@ Pero tambiĂ©n quieres que acepte nuevos Ă­tems. Cuando los Ă­tems no existan ant Para conseguir esto importa `JSONResponse` y devuelve ahĂ­ directamente tu contenido, asignando el `status_code` que quieras: ```Python hl_lines="4 25" -{!../../../docs_src/additional_status_codes/tutorial001.py!} +{!../../docs_src/additional_status_codes/tutorial001.py!} ``` /// warning | Advertencia diff --git a/docs/es/docs/advanced/path-operation-advanced-configuration.md b/docs/es/docs/advanced/path-operation-advanced-configuration.md index 18f96213f..f6813f0ff 100644 --- a/docs/es/docs/advanced/path-operation-advanced-configuration.md +++ b/docs/es/docs/advanced/path-operation-advanced-configuration.md @@ -13,7 +13,7 @@ Puedes asignar el `operationId` de OpenAPI para ser usado en tu *operaciĂłn de p En este caso tendrĂ­as que asegurarte de que sea Ășnico para cada operaciĂłn. ```Python hl_lines="6" -{!../../../docs_src/path_operation_advanced_configuration/tutorial001.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial001.py!} ``` ### Usando el nombre de la *funciĂłn de la operaciĂłn de path* en el operationId @@ -23,7 +23,7 @@ Si quieres usar tus nombres de funciones de API como `operationId`s, puedes iter DeberĂ­as hacerlo despuĂ©s de adicionar todas tus *operaciones de path*. ```Python hl_lines="2 12 13 14 15 16 17 18 19 20 21 24" -{!../../../docs_src/path_operation_advanced_configuration/tutorial002.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial002.py!} ``` /// tip | Consejo @@ -45,7 +45,7 @@ Incluso si estĂĄn en diferentes mĂłdulos (archivos Python). Para excluir una *operaciĂłn de path* del esquema OpenAPI generado (y por tanto del la documentaciĂłn generada automĂĄticamente), usa el parĂĄmetro `include_in_schema` y asigna el valor como `False`; ```Python hl_lines="6" -{!../../../docs_src/path_operation_advanced_configuration/tutorial003.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial003.py!} ``` ## DescripciĂłn avanzada desde el docstring @@ -57,5 +57,5 @@ Agregar un `\f` (un carĂĄcter de "form feed" escapado) hace que **FastAPI** trun No serĂĄ mostrado en la documentaciĂłn, pero otras herramientas (como Sphinx) serĂĄn capaces de usar el resto. ```Python hl_lines="19 20 21 22 23 24 25 26 27 28 29" -{!../../../docs_src/path_operation_advanced_configuration/tutorial004.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial004.py!} ``` diff --git a/docs/es/docs/advanced/response-change-status-code.md b/docs/es/docs/advanced/response-change-status-code.md index ecd9fad41..ddfd05a77 100644 --- a/docs/es/docs/advanced/response-change-status-code.md +++ b/docs/es/docs/advanced/response-change-status-code.md @@ -21,7 +21,7 @@ Puedes declarar un parĂĄmetro de tipo `Response` en tu *funciĂłn de la operaciĂł Y luego puedes establecer el `status_code` en ese objeto de respuesta *temporal*. ```Python hl_lines="1 9 12" -{!../../../docs_src/response_change_status_code/tutorial001.py!} +{!../../docs_src/response_change_status_code/tutorial001.py!} ``` Y luego puedes retornar cualquier objeto que necesites, como normalmente lo harĂ­as (un `dict`, un modelo de base de datos, etc). diff --git a/docs/es/docs/advanced/response-directly.md b/docs/es/docs/advanced/response-directly.md index 4eeab3fd0..8800d2510 100644 --- a/docs/es/docs/advanced/response-directly.md +++ b/docs/es/docs/advanced/response-directly.md @@ -35,7 +35,7 @@ Por ejemplo, no puedes poner un modelo Pydantic en una `JSONResponse` sin primer Para esos casos, puedes usar el `jsonable_encoder` para convertir tus datos antes de pasarlos a la respuesta: ```Python hl_lines="4 6 20 21" -{!../../../docs_src/response_directly/tutorial001.py!} +{!../../docs_src/response_directly/tutorial001.py!} ``` /// note | Detalles TĂ©cnicos @@ -57,7 +57,7 @@ Digamos que quieres devolver una respuesta documentaciĂłn de Strawberry. diff --git a/docs/es/docs/python-types.md b/docs/es/docs/python-types.md index c873385bc..156907ad1 100644 --- a/docs/es/docs/python-types.md +++ b/docs/es/docs/python-types.md @@ -23,7 +23,7 @@ Si eres un experto en Python y ya lo sabes todo sobre los type hints, salta al s Comencemos con un ejemplo simple: ```Python -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` Llamar este programa nos muestra el siguiente output: @@ -39,7 +39,7 @@ La funciĂłn hace lo siguiente: * Las concatena con un espacio en la mitad. ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` ### EdĂ­talo @@ -83,7 +83,7 @@ Eso es todo. Esos son los "type hints": ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial002.py!} +{!../../docs_src/python_types/tutorial002.py!} ``` No es lo mismo a declarar valores por defecto, como serĂ­a con: @@ -113,7 +113,7 @@ Con esto puedes moverte hacia abajo viendo las opciones hasta que encuentras una Mira esta funciĂłn que ya tiene type hints: ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial003.py!} +{!../../docs_src/python_types/tutorial003.py!} ``` Como el editor conoce el tipo de las variables no solo obtienes auto-completado, si no que tambiĂ©n obtienes chequeo de errores: @@ -123,7 +123,7 @@ Como el editor conoce el tipo de las variables no solo obtienes auto-completado, Ahora que sabes que tienes que arreglarlo convierte `age` a un string con `str(age)`: ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial004.py!} +{!../../docs_src/python_types/tutorial004.py!} ``` ## Declarando tipos @@ -144,7 +144,7 @@ Por ejemplo, puedes usar: * `bytes` ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial005.py!} +{!../../docs_src/python_types/tutorial005.py!} ``` ### Tipos con sub-tipos @@ -162,7 +162,7 @@ Por ejemplo, vamos a definir una variable para que sea una `list` compuesta de ` De `typing`, importa `List` (con una `L` mayĂșscula): ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial006.py!} +{!../../docs_src/python_types/tutorial006.py!} ``` Declara la variable con la misma sintaxis de los dos puntos (`:`). @@ -172,7 +172,7 @@ Pon `List` como el tipo. Como la lista es un tipo que permite tener un "sub-tipo" pones el sub-tipo en corchetes `[]`: ```Python hl_lines="4" -{!../../../docs_src/python_types/tutorial006.py!} +{!../../docs_src/python_types/tutorial006.py!} ``` Esto significa: la variable `items` es una `list` y cada uno de los Ă­tems en esta lista es un `str`. @@ -192,7 +192,7 @@ El editor aĂșn sabe que es un `str` y provee soporte para ello. HarĂ­as lo mismo para declarar `tuple`s y `set`s: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial007.py!} +{!../../docs_src/python_types/tutorial007.py!} ``` Esto significa: @@ -209,7 +209,7 @@ El primer sub-tipo es para los keys del `dict`. El segundo sub-tipo es para los valores del `dict`: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial008.py!} +{!../../docs_src/python_types/tutorial008.py!} ``` Esto significa: @@ -225,13 +225,13 @@ TambiĂ©n puedes declarar una clase como el tipo de una variable. Digamos que tienes una clase `Person`con un nombre: ```Python hl_lines="1-3" -{!../../../docs_src/python_types/tutorial009.py!} +{!../../docs_src/python_types/tutorial009.py!} ``` Entonces puedes declarar una variable que sea de tipo `Person`: ```Python hl_lines="6" -{!../../../docs_src/python_types/tutorial009.py!} +{!../../docs_src/python_types/tutorial009.py!} ``` Una vez mĂĄs tendrĂĄs todo el soporte del editor: @@ -253,7 +253,7 @@ Y obtienes todo el soporte del editor con el objeto resultante. Tomado de la documentaciĂłn oficial de Pydantic: ```Python -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` /// info | InformaciĂłn diff --git a/docs/es/docs/tutorial/cookie-params.md b/docs/es/docs/tutorial/cookie-params.md index 3eaea31f9..e858e34e8 100644 --- a/docs/es/docs/tutorial/cookie-params.md +++ b/docs/es/docs/tutorial/cookie-params.md @@ -9,7 +9,7 @@ Primero importa `Cookie`: //// tab | Python 3.10+ ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py310.py!} ``` //// @@ -17,7 +17,7 @@ Primero importa `Cookie`: //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ Primero importa `Cookie`: //// tab | Python 3.8+ ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001_an.py!} +{!> ../../docs_src/cookie_params/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ Es preferible utilizar la versiĂłn `Annotated` si es posible. /// ```Python hl_lines="1" -{!> ../../../docs_src/cookie_params/tutorial001_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_py310.py!} ``` //// @@ -53,7 +53,7 @@ Es preferible utilizar la versiĂłn `Annotated` si es posible. /// ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001.py!} +{!> ../../docs_src/cookie_params/tutorial001.py!} ``` //// @@ -67,7 +67,7 @@ El primer valor es el valor por defecto, puedes pasar todos los parĂĄmetros adic //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py310.py!} ``` //// @@ -75,7 +75,7 @@ El primer valor es el valor por defecto, puedes pasar todos los parĂĄmetros adic //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py39.py!} ``` //// @@ -83,7 +83,7 @@ El primer valor es el valor por defecto, puedes pasar todos los parĂĄmetros adic //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/cookie_params/tutorial001_an.py!} +{!> ../../docs_src/cookie_params/tutorial001_an.py!} ``` //// @@ -97,7 +97,7 @@ Es preferible utilizar la versiĂłn `Annotated` si es posible. /// ```Python hl_lines="7" -{!> ../../../docs_src/cookie_params/tutorial001_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_py310.py!} ``` //// @@ -111,7 +111,7 @@ Es preferible utilizar la versiĂłn `Annotated` si es posible. /// ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001.py!} +{!> ../../docs_src/cookie_params/tutorial001.py!} ``` //// diff --git a/docs/es/docs/tutorial/first-steps.md b/docs/es/docs/tutorial/first-steps.md index 8d8909b97..68df00e64 100644 --- a/docs/es/docs/tutorial/first-steps.md +++ b/docs/es/docs/tutorial/first-steps.md @@ -3,7 +3,7 @@ Un archivo muy simple de FastAPI podrĂ­a verse asĂ­: ```Python -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` Copia eso a un archivo `main.py`. @@ -134,7 +134,7 @@ TambiĂ©n podrĂ­as usarlo para generar cĂłdigo automĂĄticamente, para los cliente ### Paso 1: importa `FastAPI` ```Python hl_lines="1" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` `FastAPI` es una clase de Python que provee toda la funcionalidad para tu API. @@ -150,7 +150,7 @@ TambiĂ©n puedes usar toda la funcionalidad de parsĂ© en tant que JSON, il est lu directement en tant que `bytes`, et la fonction `magic_data_reader()` serait chargĂ© de l'analyser d'une maniĂšre ou d'une autre. @@ -164,7 +164,7 @@ Et vous pouvez le faire mĂȘme si le type de donnĂ©es dans la requĂȘte n'est pas Dans cet exemple, nous n'utilisons pas les fonctionnalitĂ©s de FastAPI pour extraire le schĂ©ma JSON des modĂšles Pydantic ni la validation automatique pour JSON. En fait, nous dĂ©clarons le type de contenu de la requĂȘte en tant que YAML, et non JSON : ```Python hl_lines="17-22 24" -{!../../../docs_src/path_operation_advanced_configuration/tutorial007.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial007.py!} ``` NĂ©anmoins, bien que nous n'utilisions pas la fonctionnalitĂ© par dĂ©faut, nous utilisons toujours un modĂšle Pydantic pour gĂ©nĂ©rer manuellement le schĂ©ma JSON pour les donnĂ©es que nous souhaitons recevoir en YAML. @@ -174,7 +174,7 @@ Ensuite, nous utilisons directement la requĂȘte et extrayons son contenu en tant Et nous analysons directement ce contenu YAML, puis nous utilisons Ă  nouveau le mĂȘme modĂšle Pydantic pour valider le contenu YAML : ```Python hl_lines="26-33" -{!../../../docs_src/path_operation_advanced_configuration/tutorial007.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial007.py!} ``` /// tip | "Astuce" diff --git a/docs/fr/docs/advanced/response-directly.md b/docs/fr/docs/advanced/response-directly.md index 49ca32230..80876bc18 100644 --- a/docs/fr/docs/advanced/response-directly.md +++ b/docs/fr/docs/advanced/response-directly.md @@ -35,7 +35,7 @@ Par exemple, vous ne pouvez pas mettre un modĂšle Pydantic dans une `JSONRespons Pour ces cas, vous pouvez spĂ©cifier un appel Ă  `jsonable_encoder` pour convertir vos donnĂ©es avant de les passer Ă  une rĂ©ponse : ```Python hl_lines="6-7 21-22" -{!../../../docs_src/response_directly/tutorial001.py!} +{!../../docs_src/response_directly/tutorial001.py!} ``` /// note | "DĂ©tails techniques" @@ -57,7 +57,7 @@ Disons que vous voulez retourner une rĂ©ponse chaĂźne de caractĂšres grĂące Ă  `str(age)` : ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial004.py!} +{!../../docs_src/python_types/tutorial004.py!} ``` ## DĂ©clarer des types @@ -146,7 +146,7 @@ Comme par exemple : * `bytes` ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial005.py!} +{!../../docs_src/python_types/tutorial005.py!} ``` ### Types gĂ©nĂ©riques avec des paramĂštres de types @@ -164,7 +164,7 @@ Par exemple, dĂ©finissons une variable comme `list` de `str`. Importez `List` (avec un `L` majuscule) depuis `typing`. ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial006.py!} +{!../../docs_src/python_types/tutorial006.py!} ``` DĂ©clarez la variable, en utilisant la syntaxe des deux-points (`:`). @@ -174,7 +174,7 @@ Et comme type, mettez `List`. Les listes Ă©tant un type contenant des types internes, mettez ces derniers entre crochets (`[`, `]`) : ```Python hl_lines="4" -{!../../../docs_src/python_types/tutorial006.py!} +{!../../docs_src/python_types/tutorial006.py!} ``` /// tip | "Astuce" @@ -202,7 +202,7 @@ Et pourtant, l'Ă©diteur sait qu'elle est de type `str` et pourra donc vous aider C'est le mĂȘme fonctionnement pour dĂ©clarer un `tuple` ou un `set` : ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial007.py!} +{!../../docs_src/python_types/tutorial007.py!} ``` Dans cet exemple : @@ -217,7 +217,7 @@ Pour dĂ©finir un `dict`, il faut lui passer 2 paramĂštres, sĂ©parĂ©s par une vir Le premier paramĂštre de type est pour les clĂ©s et le second pour les valeurs du dictionnaire (`dict`). ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial008.py!} +{!../../docs_src/python_types/tutorial008.py!} ``` Dans cet exemple : @@ -231,7 +231,7 @@ Dans cet exemple : Vous pouvez aussi utiliser `Optional` pour dĂ©clarer qu'une variable a un type, comme `str` mais qu'il est "optionnel" signifiant qu'il pourrait aussi ĂȘtre `None`. ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009.py!} +{!../../docs_src/python_types/tutorial009.py!} ``` Utiliser `Optional[str]` plutĂŽt que `str` permettra Ă  l'Ă©diteur de vous aider Ă  dĂ©tecter les erreurs oĂč vous supposeriez qu'une valeur est toujours de type `str`, alors qu'elle pourrait aussi ĂȘtre `None`. @@ -256,13 +256,13 @@ Vous pouvez aussi dĂ©clarer une classe comme type d'une variable. Disons que vous avez une classe `Person`, avec une variable `name` : ```Python hl_lines="1-3" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` Vous pouvez ensuite dĂ©clarer une variable de type `Person` : ```Python hl_lines="6" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` Et vous aurez accĂšs, encore une fois, au support complet offert par l'Ă©diteur : @@ -284,7 +284,7 @@ Ainsi, votre Ă©diteur vous offrira un support adaptĂ© pour l'objet rĂ©sultant. Extrait de la documentation officielle de **Pydantic** : ```Python -{!../../../docs_src/python_types/tutorial011.py!} +{!../../docs_src/python_types/tutorial011.py!} ``` /// info diff --git a/docs/fr/docs/tutorial/background-tasks.md b/docs/fr/docs/tutorial/background-tasks.md index f7cf1a6cc..d971d293d 100644 --- a/docs/fr/docs/tutorial/background-tasks.md +++ b/docs/fr/docs/tutorial/background-tasks.md @@ -17,7 +17,7 @@ Cela comprend, par exemple : Pour commencer, importez `BackgroundTasks` et dĂ©finissez un paramĂštre dans votre *fonction de chemin* avec `BackgroundTasks` comme type dĂ©clarĂ©. ```Python hl_lines="1 13" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` **FastAPI** crĂ©era l'objet de type `BackgroundTasks` pour vous et le passera comme paramĂštre. @@ -33,7 +33,7 @@ Dans cet exemple, la fonction de tĂąche Ă©crira dans un fichier (afin de simuler L'opĂ©ration d'Ă©criture n'utilisant ni `async` ni `await`, on dĂ©finit la fonction avec un `def` normal. ```Python hl_lines="6-9" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` ## Ajouter une tĂąche d'arriĂšre-plan @@ -42,7 +42,7 @@ Dans votre *fonction de chemin*, passez votre fonction de tĂąche Ă  l'objet de t ```Python hl_lines="14" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` `.add_task()` reçoit comme arguments : @@ -58,7 +58,7 @@ Utiliser `BackgroundTasks` fonctionne aussi avec le systĂšme d'injection de dĂ©p **FastAPI** sait quoi faire dans chaque cas et comment rĂ©utiliser le mĂȘme objet, afin que tous les paramĂštres de type `BackgroundTasks` soient fusionnĂ©s et que les tĂąches soient exĂ©cutĂ©es en arriĂšre-plan : ```Python hl_lines="13 15 22 25" -{!../../../docs_src/background_tasks/tutorial002.py!} +{!../../docs_src/background_tasks/tutorial002.py!} ``` Dans cet exemple, les messages seront Ă©crits dans le fichier `log.txt` aprĂšs que la rĂ©ponse soit envoyĂ©e. diff --git a/docs/fr/docs/tutorial/body-multiple-params.md b/docs/fr/docs/tutorial/body-multiple-params.md index fd8e5d688..dafd869e3 100644 --- a/docs/fr/docs/tutorial/body-multiple-params.md +++ b/docs/fr/docs/tutorial/body-multiple-params.md @@ -11,7 +11,7 @@ Vous pouvez Ă©galement dĂ©clarer des paramĂštres body comme Ă©tant optionnels, e //// tab | Python 3.10+ ```Python hl_lines="18-20" -{!> ../../../docs_src/body_multiple_params/tutorial001_an_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial001_an_py310.py!} ``` //// @@ -19,7 +19,7 @@ Vous pouvez Ă©galement dĂ©clarer des paramĂštres body comme Ă©tant optionnels, e //// tab | Python 3.9+ ```Python hl_lines="18-20" -{!> ../../../docs_src/body_multiple_params/tutorial001_an_py39.py!} +{!> ../../docs_src/body_multiple_params/tutorial001_an_py39.py!} ``` //// @@ -27,7 +27,7 @@ Vous pouvez Ă©galement dĂ©clarer des paramĂštres body comme Ă©tant optionnels, e //// tab | Python 3.8+ ```Python hl_lines="19-21" -{!> ../../../docs_src/body_multiple_params/tutorial001_an.py!} +{!> ../../docs_src/body_multiple_params/tutorial001_an.py!} ``` //// @@ -41,7 +41,7 @@ PrĂ©fĂ©rez utiliser la version `Annotated` si possible. /// ```Python hl_lines="17-19" -{!> ../../../docs_src/body_multiple_params/tutorial001_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial001_py310.py!} ``` //// @@ -55,7 +55,7 @@ PrĂ©fĂ©rez utiliser la version `Annotated` si possible. /// ```Python hl_lines="19-21" -{!> ../../../docs_src/body_multiple_params/tutorial001.py!} +{!> ../../docs_src/body_multiple_params/tutorial001.py!} ``` //// @@ -84,7 +84,7 @@ Mais vous pouvez Ă©galement dĂ©clarer plusieurs paramĂštres provenant de body, p //// tab | Python 3.10+ ```Python hl_lines="20" -{!> ../../../docs_src/body_multiple_params/tutorial002_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial002_py310.py!} ``` //// @@ -92,7 +92,7 @@ Mais vous pouvez Ă©galement dĂ©clarer plusieurs paramĂštres provenant de body, p //// tab | Python 3.8+ ```Python hl_lines="22" -{!> ../../../docs_src/body_multiple_params/tutorial002.py!} +{!> ../../docs_src/body_multiple_params/tutorial002.py!} ``` //// @@ -138,7 +138,7 @@ Mais vous pouvez indiquer Ă  **FastAPI** de la traiter comme une variable de bod //// tab | Python 3.10+ ```Python hl_lines="23" -{!> ../../../docs_src/body_multiple_params/tutorial003_an_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial003_an_py310.py!} ``` //// @@ -146,7 +146,7 @@ Mais vous pouvez indiquer Ă  **FastAPI** de la traiter comme une variable de bod //// tab | Python 3.9+ ```Python hl_lines="23" -{!> ../../../docs_src/body_multiple_params/tutorial003_an_py39.py!} +{!> ../../docs_src/body_multiple_params/tutorial003_an_py39.py!} ``` //// @@ -154,7 +154,7 @@ Mais vous pouvez indiquer Ă  **FastAPI** de la traiter comme une variable de bod //// tab | Python 3.8+ ```Python hl_lines="24" -{!> ../../../docs_src/body_multiple_params/tutorial003_an.py!} +{!> ../../docs_src/body_multiple_params/tutorial003_an.py!} ``` //// @@ -168,7 +168,7 @@ PrĂ©fĂ©rez utiliser la version `Annotated` si possible. /// ```Python hl_lines="20" -{!> ../../../docs_src/body_multiple_params/tutorial003_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial003_py310.py!} ``` //// @@ -182,7 +182,7 @@ PrĂ©fĂ©rez utiliser la version `Annotated` si possible. /// ```Python hl_lines="22" -{!> ../../../docs_src/body_multiple_params/tutorial003.py!} +{!> ../../docs_src/body_multiple_params/tutorial003.py!} ``` //// @@ -228,7 +228,7 @@ Par exemple : //// tab | Python 3.10+ ```Python hl_lines="27" -{!> ../../../docs_src/body_multiple_params/tutorial004_an_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial004_an_py310.py!} ``` //// @@ -236,7 +236,7 @@ Par exemple : //// tab | Python 3.9+ ```Python hl_lines="27" -{!> ../../../docs_src/body_multiple_params/tutorial004_an_py39.py!} +{!> ../../docs_src/body_multiple_params/tutorial004_an_py39.py!} ``` //// @@ -244,7 +244,7 @@ Par exemple : //// tab | Python 3.8+ ```Python hl_lines="28" -{!> ../../../docs_src/body_multiple_params/tutorial004_an.py!} +{!> ../../docs_src/body_multiple_params/tutorial004_an.py!} ``` //// @@ -258,7 +258,7 @@ PrĂ©fĂ©rez utiliser la version `Annotated` si possible. /// ```Python hl_lines="25" -{!> ../../../docs_src/body_multiple_params/tutorial004_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial004_py310.py!} ``` //// @@ -272,7 +272,7 @@ PrĂ©fĂ©rez utiliser la version `Annotated` si possible. /// ```Python hl_lines="27" -{!> ../../../docs_src/body_multiple_params/tutorial004.py!} +{!> ../../docs_src/body_multiple_params/tutorial004.py!} ``` //// @@ -300,7 +300,7 @@ Voici un exemple complet : //// tab | Python 3.10+ ```Python hl_lines="17" -{!> ../../../docs_src/body_multiple_params/tutorial005_an_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial005_an_py310.py!} ``` //// @@ -308,7 +308,7 @@ Voici un exemple complet : //// tab | Python 3.9+ ```Python hl_lines="17" -{!> ../../../docs_src/body_multiple_params/tutorial005_an_py39.py!} +{!> ../../docs_src/body_multiple_params/tutorial005_an_py39.py!} ``` //// @@ -316,7 +316,7 @@ Voici un exemple complet : //// tab | Python 3.8+ ```Python hl_lines="18" -{!> ../../../docs_src/body_multiple_params/tutorial005_an.py!} +{!> ../../docs_src/body_multiple_params/tutorial005_an.py!} ``` //// @@ -330,7 +330,7 @@ PrĂ©fĂ©rez utiliser la version `Annotated` si possible. /// ```Python hl_lines="15" -{!> ../../../docs_src/body_multiple_params/tutorial005_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial005_py310.py!} ``` //// @@ -344,7 +344,7 @@ PrĂ©fĂ©rez utiliser la version `Annotated` si possible. /// ```Python hl_lines="17" -{!> ../../../docs_src/body_multiple_params/tutorial005.py!} +{!> ../../docs_src/body_multiple_params/tutorial005.py!} ``` //// diff --git a/docs/fr/docs/tutorial/body.md b/docs/fr/docs/tutorial/body.md index 9a5121f10..96fff2ca6 100644 --- a/docs/fr/docs/tutorial/body.md +++ b/docs/fr/docs/tutorial/body.md @@ -23,7 +23,7 @@ Ceci Ă©tant dĂ©couragĂ©, la documentation interactive gĂ©nĂ©rĂ©e par Swagger UI Commencez par importer la classe `BaseModel` du module `pydantic` : ```Python hl_lines="4" -{!../../../docs_src/body/tutorial001.py!} +{!../../docs_src/body/tutorial001.py!} ``` ## CrĂ©ez votre modĂšle de donnĂ©es @@ -33,7 +33,7 @@ DĂ©clarez ensuite votre modĂšle de donnĂ©es en tant que classe qui hĂ©rite de `B Utilisez les types Python standard pour tous les attributs : ```Python hl_lines="7-11" -{!../../../docs_src/body/tutorial001.py!} +{!../../docs_src/body/tutorial001.py!} ``` Tout comme pour la dĂ©claration de paramĂštres de requĂȘte, quand un attribut de modĂšle a une valeur par dĂ©faut, il n'est pas nĂ©cessaire. Sinon, cet attribut doit ĂȘtre renseignĂ© dans le corps de la requĂȘte. Pour rendre ce champ optionnel simplement, utilisez `None` comme valeur par dĂ©faut. @@ -63,7 +63,7 @@ Par exemple, le modĂšle ci-dessus dĂ©clare un "objet" JSON (ou `dict` Python) te Pour l'ajouter Ă  votre *opĂ©ration de chemin*, dĂ©clarez-le comme vous dĂ©clareriez des paramĂštres de chemin ou de requĂȘte : ```Python hl_lines="18" -{!../../../docs_src/body/tutorial001.py!} +{!../../docs_src/body/tutorial001.py!} ``` ...et dĂ©clarez que son type est le modĂšle que vous avez créé : `Item`. @@ -132,7 +132,7 @@ Ce qui amĂ©liore le support pour les modĂšles Pydantic avec : Dans la fonction, vous pouvez accĂ©der Ă  tous les attributs de l'objet du modĂšle directement : ```Python hl_lines="21" -{!../../../docs_src/body/tutorial002.py!} +{!../../docs_src/body/tutorial002.py!} ``` ## Corps de la requĂȘte + paramĂštres de chemin @@ -142,7 +142,7 @@ Vous pouvez dĂ©clarer des paramĂštres de chemin et un corps de requĂȘte pour la **FastAPI** est capable de reconnaĂźtre que les paramĂštres de la fonction qui correspondent aux paramĂštres de chemin doivent ĂȘtre **rĂ©cupĂ©rĂ©s depuis le chemin**, et que les paramĂštres de fonctions dĂ©clarĂ©s comme modĂšles Pydantic devraient ĂȘtre **rĂ©cupĂ©rĂ©s depuis le corps de la requĂȘte**. ```Python hl_lines="17-18" -{!../../../docs_src/body/tutorial003.py!} +{!../../docs_src/body/tutorial003.py!} ``` ## Corps de la requĂȘte + paramĂštres de chemin et de requĂȘte @@ -152,7 +152,7 @@ Vous pouvez aussi dĂ©clarer un **corps**, et des paramĂštres de **chemin** et de **FastAPI** saura reconnaĂźtre chacun d'entre eux et rĂ©cupĂ©rer la bonne donnĂ©e au bon endroit. ```Python hl_lines="18" -{!../../../docs_src/body/tutorial004.py!} +{!../../docs_src/body/tutorial004.py!} ``` Les paramĂštres de la fonction seront reconnus comme tel : diff --git a/docs/fr/docs/tutorial/debugging.md b/docs/fr/docs/tutorial/debugging.md index bcd780a82..914277699 100644 --- a/docs/fr/docs/tutorial/debugging.md +++ b/docs/fr/docs/tutorial/debugging.md @@ -7,7 +7,7 @@ Vous pouvez connecter le dĂ©bogueur da Dans votre application FastAPI, importez et exĂ©cutez directement `uvicorn` : ```Python hl_lines="1 15" -{!../../../docs_src/debugging/tutorial001.py!} +{!../../docs_src/debugging/tutorial001.py!} ``` ### À propos de `__name__ == "__main__"` diff --git a/docs/fr/docs/tutorial/first-steps.md b/docs/fr/docs/tutorial/first-steps.md index bf476d990..e9511b029 100644 --- a/docs/fr/docs/tutorial/first-steps.md +++ b/docs/fr/docs/tutorial/first-steps.md @@ -3,7 +3,7 @@ Le fichier **FastAPI** le plus simple possible pourrait ressembler Ă  cela : ```Python -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` Copiez ce code dans un fichier nommĂ© `main.py`. @@ -135,7 +135,7 @@ Vous pourriez aussi l'utiliser pour gĂ©nĂ©rer du code automatiquement, pour les ### Étape 1 : import `FastAPI` ```Python hl_lines="1" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` `FastAPI` est une classe Python qui fournit toutes les fonctionnalitĂ©s nĂ©cessaires au lancement de votre API. @@ -151,7 +151,7 @@ Vous pouvez donc aussi utiliser toutes les fonctionnalitĂ©s de ../../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py!} ``` //// @@ -17,7 +17,7 @@ Tout d'abord, importez `Path` de `fastapi`, et importez `Annotated` : //// tab | Python 3.9+ ```Python hl_lines="1 3" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ Tout d'abord, importez `Path` de `fastapi`, et importez `Annotated` : //// tab | Python 3.8+ ```Python hl_lines="3-4" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ PrĂ©fĂ©rez utiliser la version `Annotated` si possible. /// ```Python hl_lines="1" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_py310.py!} ``` //// @@ -53,7 +53,7 @@ PrĂ©fĂ©rez utiliser la version `Annotated` si possible. /// ```Python hl_lines="3" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001.py!} ``` //// @@ -77,7 +77,7 @@ Par exemple, pour dĂ©clarer une valeur de mĂ©tadonnĂ©e `title` pour le paramĂštr //// tab | Python 3.10+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py!} ``` //// @@ -85,7 +85,7 @@ Par exemple, pour dĂ©clarer une valeur de mĂ©tadonnĂ©e `title` pour le paramĂštr //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_an_py39.py!} ``` //// @@ -93,7 +93,7 @@ Par exemple, pour dĂ©clarer une valeur de mĂ©tadonnĂ©e `title` pour le paramĂštr //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_an.py!} ``` //// @@ -107,7 +107,7 @@ PrĂ©fĂ©rez utiliser la version `Annotated` si possible. /// ```Python hl_lines="8" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_py310.py!} ``` //// @@ -121,7 +121,7 @@ PrĂ©fĂ©rez utiliser la version `Annotated` si possible. /// ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001.py!} ``` //// @@ -163,7 +163,7 @@ PrĂ©fĂ©rez utiliser la version `Annotated` si possible. /// ```Python hl_lines="7" -{!> ../../../docs_src/path_params_numeric_validations/tutorial002.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial002.py!} ``` //// @@ -173,7 +173,7 @@ Mais gardez Ă  l'esprit que si vous utilisez `Annotated`, vous n'aurez pas ce pr //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial002_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial002_an_py39.py!} ``` //// @@ -181,7 +181,7 @@ Mais gardez Ă  l'esprit que si vous utilisez `Annotated`, vous n'aurez pas ce pr //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/path_params_numeric_validations/tutorial002_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial002_an.py!} ``` //// @@ -210,7 +210,7 @@ Passez `*`, comme premier paramĂštre de la fonction. Python ne fera rien avec ce `*`, mais il saura que tous les paramĂštres suivants doivent ĂȘtre appelĂ©s comme arguments "mots-clĂ©s" (paires clĂ©-valeur), Ă©galement connus sous le nom de kwargs. MĂȘme s'ils n'ont pas de valeur par dĂ©faut. ```Python hl_lines="7" -{!../../../docs_src/path_params_numeric_validations/tutorial003.py!} +{!../../docs_src/path_params_numeric_validations/tutorial003.py!} ``` # Avec `Annotated` @@ -220,7 +220,7 @@ Gardez Ă  l'esprit que si vous utilisez `Annotated`, comme vous n'utilisez pas l //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial003_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial003_an_py39.py!} ``` //// @@ -228,7 +228,7 @@ Gardez Ă  l'esprit que si vous utilisez `Annotated`, comme vous n'utilisez pas l //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/path_params_numeric_validations/tutorial003_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial003_an.py!} ``` //// @@ -242,7 +242,7 @@ Ici, avec `ge=1`, `item_id` devra ĂȘtre un nombre entier "`g`reater than or `e`q //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial004_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial004_an_py39.py!} ``` //// @@ -250,7 +250,7 @@ Ici, avec `ge=1`, `item_id` devra ĂȘtre un nombre entier "`g`reater than or `e`q //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/path_params_numeric_validations/tutorial004_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial004_an.py!} ``` //// @@ -264,7 +264,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="8" -{!> ../../../docs_src/path_params_numeric_validations/tutorial004.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial004.py!} ``` //// @@ -279,7 +279,7 @@ La mĂȘme chose s'applique pour : //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial004_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial004_an_py39.py!} ``` //// @@ -287,7 +287,7 @@ La mĂȘme chose s'applique pour : //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/path_params_numeric_validations/tutorial004_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial004_an.py!} ``` //// @@ -301,7 +301,7 @@ PrĂ©fĂ©rez utiliser la version `Annotated` si possible. /// ```Python hl_lines="8" -{!> ../../../docs_src/path_params_numeric_validations/tutorial004.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial004.py!} ``` //// @@ -316,7 +316,7 @@ La mĂȘme chose s'applique pour : //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial005_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial005_an_py39.py!} ``` //// @@ -324,7 +324,7 @@ La mĂȘme chose s'applique pour : //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/path_params_numeric_validations/tutorial005_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial005_an.py!} ``` //// @@ -338,7 +338,7 @@ PrĂ©fĂ©rez utiliser la version `Annotated` si possible. /// ```Python hl_lines="9" -{!> ../../../docs_src/path_params_numeric_validations/tutorial005.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial005.py!} ``` //// @@ -356,7 +356,7 @@ Et la mĂȘme chose pour lt. //// tab | Python 3.9+ ```Python hl_lines="13" -{!> ../../../docs_src/path_params_numeric_validations/tutorial006_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial006_an_py39.py!} ``` //// @@ -364,7 +364,7 @@ Et la mĂȘme chose pour lt. //// tab | Python 3.8+ ```Python hl_lines="12" -{!> ../../../docs_src/path_params_numeric_validations/tutorial006_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial006_an.py!} ``` //// @@ -378,7 +378,7 @@ PrĂ©fĂ©rez utiliser la version `Annotated` si possible. /// ```Python hl_lines="11" -{!> ../../../docs_src/path_params_numeric_validations/tutorial006.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial006.py!} ``` //// diff --git a/docs/fr/docs/tutorial/path-params.md b/docs/fr/docs/tutorial/path-params.md index 94c36a20d..34012c278 100644 --- a/docs/fr/docs/tutorial/path-params.md +++ b/docs/fr/docs/tutorial/path-params.md @@ -5,7 +5,7 @@ Vous pouvez dĂ©clarer des "paramĂštres" ou "variables" de chemin avec la mĂȘme s ```Python hl_lines="6-7" -{!../../../docs_src/path_params/tutorial001.py!} +{!../../docs_src/path_params/tutorial001.py!} ``` La valeur du paramĂštre `item_id` sera transmise Ă  la fonction dans l'argument `item_id`. @@ -23,7 +23,7 @@ Vous pouvez dĂ©clarer le type d'un paramĂštre de chemin dans la fonction, en uti ```Python hl_lines="7" -{!../../../docs_src/path_params/tutorial002.py!} +{!../../docs_src/path_params/tutorial002.py!} ``` Ici, `item_id` est dĂ©clarĂ© comme `int`. @@ -132,7 +132,7 @@ Et vous avez un second chemin : `/users/{user_id}` pour rĂ©cupĂ©rer de la donnĂ© Les *fonctions de chemin* Ă©tant Ă©valuĂ©es dans l'ordre, il faut s'assurer que la fonction correspondant Ă  `/users/me` est dĂ©clarĂ©e avant celle de `/users/{user_id}` : ```Python hl_lines="6 11" -{!../../../docs_src/path_params/tutorial003.py!} +{!../../docs_src/path_params/tutorial003.py!} ``` Sinon, le chemin `/users/{user_id}` correspondrait aussi Ă  `/users/me`, la fonction "croyant" qu'elle a reçu un paramĂštre `user_id` avec pour valeur `"me"`. @@ -150,7 +150,7 @@ En hĂ©ritant de `str` la documentation sera capable de savoir que les valeurs do CrĂ©ez ensuite des attributs de classe avec des valeurs fixes, qui seront les valeurs autorisĂ©es pour cette Ă©numĂ©ration. ```Python hl_lines="1 6-9" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` /// info @@ -170,7 +170,7 @@ Pour ceux qui se demandent, "AlexNet", "ResNet", et "LeNet" sont juste des noms CrĂ©ez ensuite un *paramĂštre de chemin* avec une annotation de type dĂ©signant l'Ă©numĂ©ration créée prĂ©cĂ©demment (`ModelName`) : ```Python hl_lines="16" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` ### Documentation @@ -188,7 +188,7 @@ La valeur du *paramĂštre de chemin* sera un des "membres" de l'Ă©numĂ©ration. Vous pouvez comparer ce paramĂštre avec les membres de votre Ă©numĂ©ration `ModelName` : ```Python hl_lines="17" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` #### RĂ©cupĂ©rer la *valeur de l'Ă©numĂ©ration* @@ -196,7 +196,7 @@ Vous pouvez comparer ce paramĂštre avec les membres de votre Ă©numĂ©ration `Mode Vous pouvez obtenir la valeur rĂ©el d'un membre (une chaĂźne de caractĂšres ici), avec `model_name.value`, ou en gĂ©nĂ©ral, `votre_membre_d'enum.value` : ```Python hl_lines="20" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` /// tip | "Astuce" @@ -212,7 +212,7 @@ Vous pouvez retourner des *membres d'Ă©numĂ©ration* dans vos *fonctions de chemi Ils seront convertis vers leurs valeurs correspondantes (chaĂźnes de caractĂšres ici) avant d'ĂȘtre transmis au client : ```Python hl_lines="18 21 23" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` Le client recevra une rĂ©ponse JSON comme celle-ci : @@ -253,7 +253,7 @@ Dans ce cas, le nom du paramĂštre est `file_path`, et la derniĂšre partie, `:pat Vous pouvez donc l'utilisez comme tel : ```Python hl_lines="6" -{!../../../docs_src/path_params/tutorial004.py!} +{!../../docs_src/path_params/tutorial004.py!} ``` /// tip | "Astuce" diff --git a/docs/fr/docs/tutorial/query-params-str-validations.md b/docs/fr/docs/tutorial/query-params-str-validations.md index 63578ec40..b71d1548a 100644 --- a/docs/fr/docs/tutorial/query-params-str-validations.md +++ b/docs/fr/docs/tutorial/query-params-str-validations.md @@ -5,7 +5,7 @@ Commençons avec cette application pour exemple : ```Python hl_lines="9" -{!../../../docs_src/query_params_str_validations/tutorial001.py!} +{!../../docs_src/query_params_str_validations/tutorial001.py!} ``` Le paramĂštre de requĂȘte `q` a pour type `Union[str, None]` (ou `str | None` en Python 3.10), signifiant qu'il est de type `str` mais pourrait aussi ĂȘtre Ă©gal Ă  `None`, et bien sĂ»r, la valeur par dĂ©faut est `None`, donc **FastAPI** saura qu'il n'est pas requis. @@ -27,7 +27,7 @@ Nous allons imposer que bien que `q` soit un paramĂštre optionnel, dĂšs qu'il es Pour cela, importez d'abord `Query` depuis `fastapi` : ```Python hl_lines="3" -{!../../../docs_src/query_params_str_validations/tutorial002.py!} +{!../../docs_src/query_params_str_validations/tutorial002.py!} ``` ## Utiliser `Query` comme valeur par dĂ©faut @@ -35,7 +35,7 @@ Pour cela, importez d'abord `Query` depuis `fastapi` : Construisez ensuite la valeur par dĂ©faut de votre paramĂštre avec `Query`, en choisissant 50 comme `max_length` : ```Python hl_lines="9" -{!../../../docs_src/query_params_str_validations/tutorial002.py!} +{!../../docs_src/query_params_str_validations/tutorial002.py!} ``` Comme nous devons remplacer la valeur par dĂ©faut `None` dans la fonction par `Query()`, nous pouvons maintenant dĂ©finir la valeur par dĂ©faut avec le paramĂštre `Query(default=None)`, il sert le mĂȘme objectif qui est de dĂ©finir cette valeur par dĂ©faut. @@ -87,7 +87,7 @@ Cela va valider les donnĂ©es, montrer une erreur claire si ces derniĂšres ne son Vous pouvez aussi rajouter un second paramĂštre `min_length` : ```Python hl_lines="9" -{!../../../docs_src/query_params_str_validations/tutorial003.py!} +{!../../docs_src/query_params_str_validations/tutorial003.py!} ``` ## Ajouter des validations par expressions rĂ©guliĂšres @@ -95,7 +95,7 @@ Vous pouvez aussi rajouter un second paramĂštre `min_length` : On peut dĂ©finir une expression rĂ©guliĂšre Ă  laquelle le paramĂštre doit correspondre : ```Python hl_lines="10" -{!../../../docs_src/query_params_str_validations/tutorial004.py!} +{!../../docs_src/query_params_str_validations/tutorial004.py!} ``` Cette expression rĂ©guliĂšre vĂ©rifie que la valeur passĂ©e comme paramĂštre : @@ -115,7 +115,7 @@ De la mĂȘme façon que vous pouvez passer `None` comme premier argument pour l'u Disons que vous dĂ©clarez le paramĂštre `q` comme ayant une longueur minimale de `3`, et une valeur par dĂ©faut Ă©tant `"fixedquery"` : ```Python hl_lines="7" -{!../../../docs_src/query_params_str_validations/tutorial005.py!} +{!../../docs_src/query_params_str_validations/tutorial005.py!} ``` /// note | "Rappel" @@ -147,7 +147,7 @@ q: Union[str, None] = Query(default=None, min_length=3) Donc pour dĂ©clarer une valeur comme requise tout en utilisant `Query`, il faut utiliser `...` comme premier argument : ```Python hl_lines="7" -{!../../../docs_src/query_params_str_validations/tutorial006.py!} +{!../../docs_src/query_params_str_validations/tutorial006.py!} ``` /// info @@ -165,7 +165,7 @@ Quand on dĂ©finit un paramĂštre de requĂȘte explicitement avec `Query` on peut a Par exemple, pour dĂ©clarer un paramĂštre de requĂȘte `q` qui peut apparaĂźtre plusieurs fois dans une URL, on Ă©crit : ```Python hl_lines="9" -{!../../../docs_src/query_params_str_validations/tutorial011.py!} +{!../../docs_src/query_params_str_validations/tutorial011.py!} ``` Ce qui fait qu'avec une URL comme : @@ -202,7 +202,7 @@ La documentation sera donc mise Ă  jour automatiquement pour autoriser plusieurs Et l'on peut aussi dĂ©finir une liste de valeurs par dĂ©faut si aucune n'est fournie : ```Python hl_lines="9" -{!../../../docs_src/query_params_str_validations/tutorial012.py!} +{!../../docs_src/query_params_str_validations/tutorial012.py!} ``` Si vous allez Ă  : @@ -229,7 +229,7 @@ et la rĂ©ponse sera : Il est aussi possible d'utiliser directement `list` plutĂŽt que `List[str]` : ```Python hl_lines="7" -{!../../../docs_src/query_params_str_validations/tutorial013.py!} +{!../../docs_src/query_params_str_validations/tutorial013.py!} ``` /// note @@ -257,13 +257,13 @@ Il se peut donc que certains d'entre eux n'utilisent pas toutes les mĂ©tadonnĂ©e Vous pouvez ajouter un `title` : ```Python hl_lines="10" -{!../../../docs_src/query_params_str_validations/tutorial007.py!} +{!../../docs_src/query_params_str_validations/tutorial007.py!} ``` Et une `description` : ```Python hl_lines="13" -{!../../../docs_src/query_params_str_validations/tutorial008.py!} +{!../../docs_src/query_params_str_validations/tutorial008.py!} ``` ## Alias de paramĂštres @@ -285,7 +285,7 @@ Mais vous avez vraiment envie que ce soit exactement `item-query`... Pour cela vous pouvez dĂ©clarer un `alias`, et cet alias est ce qui sera utilisĂ© pour trouver la valeur du paramĂštre : ```Python hl_lines="9" -{!../../../docs_src/query_params_str_validations/tutorial009.py!} +{!../../docs_src/query_params_str_validations/tutorial009.py!} ``` ## DĂ©prĂ©cier des paramĂštres @@ -297,7 +297,7 @@ Il faut qu'il continue Ă  exister pendant un certain temps car vos clients l'uti On utilise alors l'argument `deprecated=True` de `Query` : ```Python hl_lines="18" -{!../../../docs_src/query_params_str_validations/tutorial010.py!} +{!../../docs_src/query_params_str_validations/tutorial010.py!} ``` La documentation le prĂ©sentera comme il suit : diff --git a/docs/fr/docs/tutorial/query-params.md b/docs/fr/docs/tutorial/query-params.md index b9f1540c9..c847a8f5b 100644 --- a/docs/fr/docs/tutorial/query-params.md +++ b/docs/fr/docs/tutorial/query-params.md @@ -3,7 +3,7 @@ Quand vous dĂ©clarez des paramĂštres dans votre fonction de chemin qui ne font pas partie des paramĂštres indiquĂ©s dans le chemin associĂ©, ces paramĂštres sont automatiquement considĂ©rĂ©s comme des paramĂštres de "requĂȘte". ```Python hl_lines="9" -{!../../../docs_src/query_params/tutorial001.py!} +{!../../docs_src/query_params/tutorial001.py!} ``` La partie appelĂ©e requĂȘte (ou **query**) dans une URL est l'ensemble des paires clĂ©s-valeurs placĂ©es aprĂšs le `?` , sĂ©parĂ©es par des `&`. @@ -64,7 +64,7 @@ Les valeurs des paramĂštres de votre fonction seront : De la mĂȘme façon, vous pouvez dĂ©finir des paramĂštres de requĂȘte comme optionnels, en leur donnant comme valeur par dĂ©faut `None` : ```Python hl_lines="9" -{!../../../docs_src/query_params/tutorial002.py!} +{!../../docs_src/query_params/tutorial002.py!} ``` Ici, le paramĂštre `q` sera optionnel, et aura `None` comme valeur par dĂ©faut. @@ -88,7 +88,7 @@ Le `Optional` dans `Optional[str]` n'est pas utilisĂ© par **FastAPI** (**FastAPI Vous pouvez aussi dĂ©clarer des paramĂštres de requĂȘte comme boolĂ©ens (`bool`), **FastAPI** les convertira : ```Python hl_lines="9" -{!../../../docs_src/query_params/tutorial003.py!} +{!../../docs_src/query_params/tutorial003.py!} ``` Avec ce code, en allant sur : @@ -132,7 +132,7 @@ Et vous n'avez pas besoin de les dĂ©clarer dans un ordre spĂ©cifique. Ils seront dĂ©tectĂ©s par leurs noms : ```Python hl_lines="8 10" -{!../../../docs_src/query_params/tutorial004.py!} +{!../../docs_src/query_params/tutorial004.py!} ``` ## ParamĂštres de requĂȘte requis @@ -144,7 +144,7 @@ Si vous ne voulez pas leur donner de valeur par dĂ©faut mais juste les rendre op Mais si vous voulez rendre un paramĂštre de requĂȘte obligatoire, vous pouvez juste ne pas y affecter de valeur par dĂ©faut : ```Python hl_lines="6-7" -{!../../../docs_src/query_params/tutorial005.py!} +{!../../docs_src/query_params/tutorial005.py!} ``` Ici le paramĂštre `needy` est un paramĂštre requis (ou obligatoire) de type `str`. @@ -190,7 +190,7 @@ http://127.0.0.1:8000/items/foo-item?needy=sooooneedy Et bien sur, vous pouvez dĂ©finir certains paramĂštres comme requis, certains avec des valeurs par dĂ©faut et certains entiĂšrement optionnels : ```Python hl_lines="10" -{!../../../docs_src/query_params/tutorial006.py!} +{!../../docs_src/query_params/tutorial006.py!} ``` Ici, on a donc 3 paramĂštres de requĂȘte : diff --git a/docs/ja/docs/advanced/additional-status-codes.md b/docs/ja/docs/advanced/additional-status-codes.md index 622affa6e..904d539e7 100644 --- a/docs/ja/docs/advanced/additional-status-codes.md +++ b/docs/ja/docs/advanced/additional-status-codes.md @@ -15,7 +15,7 @@ ă“ă‚Œă‚’é”æˆă™ă‚‹ă«ăŻă€ `JSONResponse` ă‚’ă‚€ăƒłăƒăƒŒăƒˆă—ă€ `status_code` ă‚’èš­ćźšă—ăŠç›ŽæŽ„ć†…ćźčă‚’èż”ă—ăŸă™ă€‚ ```Python hl_lines="4 25" -{!../../../docs_src/additional_status_codes/tutorial001.py!} +{!../../docs_src/additional_status_codes/tutorial001.py!} ``` /// warning | "æłšæ„" diff --git a/docs/ja/docs/advanced/custom-response.md b/docs/ja/docs/advanced/custom-response.md index a7ce6b54d..88269700e 100644 --- a/docs/ja/docs/advanced/custom-response.md +++ b/docs/ja/docs/advanced/custom-response.md @@ -25,7 +25,7 @@ äœżă„ăŸă„ `Response` ă‚Żăƒ©ă‚č (ă‚”ăƒ–ă‚Żăƒ©ă‚č) ă‚’ă‚€ăƒłăƒăƒŒăƒˆă—ă€ *path operationăƒ‡ă‚łăƒŹăƒŒă‚ż* ă«ćźŁèš€ă—ăŸă™ă€‚ ```Python hl_lines="2 7" -{!../../../docs_src/custom_response/tutorial001b.py!} +{!../../docs_src/custom_response/tutorial001b.py!} ``` /// info | "æƒ…ć ±" @@ -52,7 +52,7 @@ * *path operation* ăźăƒ‘ăƒ©ăƒĄăƒŒă‚ż `content_type` に `HTMLResponse` ă‚’æžĄă™ă€‚ ```Python hl_lines="2 7" -{!../../../docs_src/custom_response/tutorial002.py!} +{!../../docs_src/custom_response/tutorial002.py!} ``` /// info | "æƒ…ć ±" @@ -72,7 +72,7 @@ äžŠèš˜ăšćŒă˜äŸ‹ă«ăŠă„ăŠă€ `HTMLResponse` ă‚’èż”ă™ăšă€ă“ăźă‚ˆă†ă«ăȘă‚ŠăŸă™: ```Python hl_lines="2 7 19" -{!../../../docs_src/custom_response/tutorial003.py!} +{!../../docs_src/custom_response/tutorial003.py!} ``` /// warning | "æłšæ„" @@ -98,7 +98,7 @@ äŸ‹ăˆă°ă€ă“ăźă‚ˆă†ă«ăȘă‚ŠăŸă™: ```Python hl_lines="7 21 23" -{!../../../docs_src/custom_response/tutorial004.py!} +{!../../docs_src/custom_response/tutorial004.py!} ``` ă“ăźäŸ‹ă§ăŻă€é–ąæ•° `generate_html_response()` は、`str` たHTMLă‚’èż”ă™ăźă§ăŻăȘく `Response` ă‚’ç”Ÿæˆă—ăŠèż”ă—ăŠă„ăŸă™ă€‚ @@ -139,7 +139,7 @@ FastAPI (ćźŸéš›ă«ăŻStarlette) はè‡Ș拕的にContent-Lengthăƒ˜ăƒƒăƒ€ăƒŒă‚’ć«ăżăŸă™ă€‚ăŸăŸă€media_typeにćŸșă„ă„ăŸContent-Typeăƒ˜ăƒƒăƒ€ăƒŒă‚’ć«ăżă€ăƒ†ă‚­ă‚čăƒˆă‚żă‚€ăƒ—ăźăŸă‚ă«charsetă‚’èżœćŠ ă—ăŸă™ă€‚ ```Python hl_lines="1 18" -{!../../../docs_src/response_directly/tutorial002.py!} +{!../../docs_src/response_directly/tutorial002.py!} ``` ### `HTMLResponse` @@ -151,7 +151,7 @@ FastAPI (ćźŸéš›ă«ăŻStarlette) はè‡Ș拕的にContent-Lengthăƒ˜ăƒƒăƒ€ăƒŒă‚’ć« テキă‚čăƒˆă‚„ăƒă‚€ăƒˆă‚’ć—ă‘ć–ă‚Šă€ăƒ—ăƒŹăƒŒăƒłăƒ†ă‚­ă‚čトたハă‚čポンă‚čă‚’èż”ă—ăŸă™ă€‚ ```Python hl_lines="2 7 9" -{!../../../docs_src/custom_response/tutorial005.py!} +{!../../docs_src/custom_response/tutorial005.py!} ``` ### `JSONResponse` @@ -175,7 +175,7 @@ FastAPI (ćźŸéš›ă«ăŻStarlette) はè‡Ș拕的にContent-Lengthăƒ˜ăƒƒăƒ€ăƒŒă‚’ć« /// ```Python hl_lines="2 7" -{!../../../docs_src/custom_response/tutorial001.py!} +{!../../docs_src/custom_response/tutorial001.py!} ``` /// tip | "豆矄識" @@ -189,7 +189,7 @@ FastAPI (ćźŸéš›ă«ăŻStarlette) はè‡Ș拕的にContent-Lengthăƒ˜ăƒƒăƒ€ăƒŒă‚’ć« HTTPăƒȘăƒ€ă‚€ăƒŹă‚Żăƒˆă‚’èż”ă—ăŸă™ă€‚ăƒ‡ăƒ•ă‚©ăƒ«ăƒˆă§ăŻ307ă‚čăƒ†ăƒŒă‚żă‚čă‚łăƒŒăƒ‰ (Temporary Redirect) ずăȘă‚ŠăŸă™ă€‚ ```Python hl_lines="2 9" -{!../../../docs_src/custom_response/tutorial006.py!} +{!../../docs_src/custom_response/tutorial006.py!} ``` ### `StreamingResponse` @@ -197,7 +197,7 @@ HTTPăƒȘăƒ€ă‚€ăƒŹă‚Żăƒˆă‚’èż”ă—ăŸă™ă€‚ăƒ‡ăƒ•ă‚©ăƒ«ăƒˆă§ăŻ307ă‚čăƒ†ăƒŒă‚żă‚č éžćŒæœŸăȘă‚žă‚§ăƒăƒŹăƒŒă‚żă‹é€šćžžăźă‚žă‚§ăƒăƒŹăƒŒă‚żăƒ»ă‚€ăƒ†ăƒŹăƒŒă‚żă‚’ć—ă‘ć–ă‚Šă€ăƒŹă‚čポンă‚čボディをă‚čトăƒȘăƒŒăƒ ă—ăŸă™ă€‚ ```Python hl_lines="2 14" -{!../../../docs_src/custom_response/tutorial007.py!} +{!../../docs_src/custom_response/tutorial007.py!} ``` #### `StreamingResponse` ă‚’ăƒ•ă‚Ąă‚€ăƒ«ăƒ©ă‚€ă‚ŻăȘă‚Șăƒ–ă‚žă‚§ă‚Żăƒˆăšăšă‚‚ă«äœżă† @@ -207,7 +207,7 @@ HTTPăƒȘăƒ€ă‚€ăƒŹă‚Żăƒˆă‚’èż”ă—ăŸă™ă€‚ăƒ‡ăƒ•ă‚©ăƒ«ăƒˆă§ăŻ307ă‚čăƒ†ăƒŒă‚żă‚č ă“ă‚Œă«ăŻă‚Żăƒ©ă‚Šăƒ‰ă‚čăƒˆăƒŹăƒŒă‚žăšăźé€Łæșă‚„æ˜ ćƒć‡Šç†ăȘă©ă€ć€šăăźăƒ©ă‚€ăƒ–ăƒ©ăƒȘăŒć«ăŸă‚ŒăŠă„ăŸă™ă€‚ ```Python hl_lines="2 10-12 14" -{!../../../docs_src/custom_response/tutorial008.py!} +{!../../docs_src/custom_response/tutorial008.py!} ``` /// tip | "豆矄識" @@ -230,7 +230,7 @@ HTTPăƒȘăƒ€ă‚€ăƒŹă‚Żăƒˆă‚’èż”ă—ăŸă™ă€‚ăƒ‡ăƒ•ă‚©ăƒ«ăƒˆă§ăŻ307ă‚čăƒ†ăƒŒă‚żă‚č ăƒ•ă‚Ąă‚€ăƒ«ăƒŹă‚čポンă‚čă«ăŻă€é©ćˆ‡ăȘ `Content-Length` 、 `Last-Modified` 、 `ETag` ăƒ˜ăƒƒăƒ€ăƒŒăŒć«ăŸă‚ŒăŸă™ă€‚ ```Python hl_lines="2 10" -{!../../../docs_src/custom_response/tutorial009.py!} +{!../../docs_src/custom_response/tutorial009.py!} ``` ## ăƒ‡ăƒ•ă‚©ăƒ«ăƒˆăƒŹă‚čポンă‚čă‚Żăƒ©ă‚č @@ -242,7 +242,7 @@ HTTPăƒȘăƒ€ă‚€ăƒŹă‚Żăƒˆă‚’èż”ă—ăŸă™ă€‚ăƒ‡ăƒ•ă‚©ăƒ«ăƒˆă§ăŻ307ă‚čăƒ†ăƒŒă‚żă‚č ä»„äž‹ăźäŸ‹ă§ăŻă€ **FastAPI** は、慹どぼ *path operation* で `JSONResponse` ăźä»Łă‚ă‚Šă« `ORJSONResponse` ă‚’ăƒ‡ăƒ•ă‚©ăƒ«ăƒˆăšă—ăŠćˆ©ç”šă—ăŸă™ă€‚ ```Python hl_lines="2 4" -{!../../../docs_src/custom_response/tutorial010.py!} +{!../../docs_src/custom_response/tutorial010.py!} ``` /// tip | "豆矄識" diff --git a/docs/ja/docs/advanced/path-operation-advanced-configuration.md b/docs/ja/docs/advanced/path-operation-advanced-configuration.md index ae60126cb..2dab4aec1 100644 --- a/docs/ja/docs/advanced/path-operation-advanced-configuration.md +++ b/docs/ja/docs/advanced/path-operation-advanced-configuration.md @@ -13,7 +13,7 @@ `operation_id` は搄ă‚ȘăƒšăƒŹăƒŒă‚·ăƒ§ăƒłă§äž€æ„ă«ă™ă‚‹ćż…èŠăŒă‚ă‚ŠăŸă™ă€‚ ```Python hl_lines="6" -{!../../../docs_src/path_operation_advanced_configuration/tutorial001.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial001.py!} ``` ### *path operationé–ąæ•°* ぼ損才をoperationIdăšă—ăŠäœżç”šă™ă‚‹ @@ -23,7 +23,7 @@ APIăźé–ąæ•°ćă‚’ `operationId` ăšă—ăŠćˆ©ç”šă—ăŸă„ć Žćˆă€ă™ăčおたAP そうする栮搈は、すăčおた *path operation* ă‚’èżœćŠ ă—ăŸćŸŒă«èĄŒă†ćż…èŠăŒă‚ă‚ŠăŸă™ă€‚ ```Python hl_lines="2 12-21 24" -{!../../../docs_src/path_operation_advanced_configuration/tutorial002.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial002.py!} ``` /// tip | "豆矄識" @@ -45,7 +45,7 @@ APIăźé–ąæ•°ćă‚’ `operationId` ăšă—ăŠćˆ©ç”šă—ăŸă„ć Žćˆă€ă™ăčおたAP ç”Ÿæˆă•ă‚Œă‚‹OpenAPIă‚čă‚­ăƒŒăƒž (ă€ăŸă‚Šă€è‡Șć‹•ăƒ‰ă‚­ăƒ„ăƒĄăƒłăƒˆç”Ÿæˆăźä»•ç”„ăż) から *path operation* を陀怖するには、 `include_in_schema` ăƒ‘ăƒ©ăƒĄăƒŒă‚żă‚’ `False` ă«ă—ăŸă™ă€‚ ```Python hl_lines="6" -{!../../../docs_src/path_operation_advanced_configuration/tutorial003.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial003.py!} ``` ## docstringă«ă‚ˆă‚‹èȘŹæ˜Žăźé«˜ćșŠăȘèš­ćźš @@ -57,5 +57,5 @@ APIăźé–ąæ•°ćă‚’ `operationId` ăšă—ăŠćˆ©ç”šă—ăŸă„ć Žćˆă€ă™ăčおたAP ăƒ‰ă‚­ăƒ„ăƒĄăƒłăƒˆă«ăŻèĄšç€șă•ă‚ŒăŸă›ă‚“ăŒă€ä»–ăźăƒ„ăƒŒăƒ« (äŸ‹ăˆă°Sphinx) ă§ăŻæź‹ă‚Šăźéƒšćˆ†ă‚’ćˆ©ç”šă§ăă‚‹ă§ă—ă‚‡ă†ă€‚ ```Python hl_lines="19-29" -{!../../../docs_src/path_operation_advanced_configuration/tutorial004.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial004.py!} ``` diff --git a/docs/ja/docs/advanced/response-directly.md b/docs/ja/docs/advanced/response-directly.md index 5c25471b1..167d15589 100644 --- a/docs/ja/docs/advanced/response-directly.md +++ b/docs/ja/docs/advanced/response-directly.md @@ -35,7 +35,7 @@ こぼようăȘă‚±ăƒŒă‚čでは、レă‚čポンă‚čă«ăƒ‡ăƒŒă‚żă‚’ć«ă‚ă‚‹ć‰ă« `jsonable_encoder` ă‚’äœżăŁăŠăƒ‡ăƒŒă‚żă‚’ć€‰æ›ă§ăăŸă™ă€‚ ```Python hl_lines="6-7 21-22" -{!../../../docs_src/response_directly/tutorial001.py!} +{!../../docs_src/response_directly/tutorial001.py!} ``` /// note | "æŠ€èĄ“è©łçŽ°" @@ -57,7 +57,7 @@ XMLă‚’æ–‡ć­—ćˆ—ă«ă—ă€`Response` ă«ć«ă‚ă€ăă‚Œă‚’èż”ă—ăŸă™ă€‚ ```Python hl_lines="1 18" -{!../../../docs_src/response_directly/tutorial002.py!} +{!../../docs_src/response_directly/tutorial002.py!} ``` ## ć‚™è€ƒ diff --git a/docs/ja/docs/advanced/websockets.md b/docs/ja/docs/advanced/websockets.md index 615f9d17c..f7bcb6af3 100644 --- a/docs/ja/docs/advanced/websockets.md +++ b/docs/ja/docs/advanced/websockets.md @@ -39,7 +39,7 @@ $ pip install websockets しかし、これはWebSocketăźă‚”ăƒŒăƒăƒŒă‚”ă‚€ăƒ‰ă«ç„Šç‚čă‚’ćœ“ăŠă€ćźŸç”šçš„ăȘäŸ‹ă‚’ç€șă™æœ€ă‚‚ç°Ąć˜ăȘæ–čæł•です。 ```Python hl_lines="2 6-38 41-43" -{!../../../docs_src/websockets/tutorial001.py!} +{!../../docs_src/websockets/tutorial001.py!} ``` ## `websocket` ă‚’äœœæˆă™ă‚‹ @@ -47,7 +47,7 @@ $ pip install websockets **FastAPI** ケプăƒȘă‚±ăƒŒă‚·ăƒ§ăƒłă§ă€`websocket` ă‚’äœœæˆă—ăŸă™ă€‚ ```Python hl_lines="1 46-47" -{!../../../docs_src/websockets/tutorial001.py!} +{!../../docs_src/websockets/tutorial001.py!} ``` /// note | "æŠ€èĄ“è©łçŽ°" @@ -63,7 +63,7 @@ $ pip install websockets WebSocketăƒ«ăƒŒăƒˆă§ăŻă€ `await` ă‚’äœżăŁăŠăƒĄăƒƒă‚»ăƒŒă‚žăźé€ć—äżĄăŒă§ăăŸă™ă€‚ ```Python hl_lines="48-52" -{!../../../docs_src/websockets/tutorial001.py!} +{!../../docs_src/websockets/tutorial001.py!} ``` ăƒă‚€ăƒŠăƒȘやテキă‚čăƒˆăƒ‡ăƒŒă‚żă€JSONăƒ‡ăƒŒă‚żă‚’é€ć—äżĄă§ăăŸă™ă€‚ @@ -116,7 +116,7 @@ WebSocketă‚šăƒłăƒ‰ăƒă‚€ăƒłăƒˆă§ăŻă€`fastapi` ă‹ă‚‰ä»„äž‹ă‚’ă‚€ăƒłăƒăƒŒăƒˆ ă“ă‚Œă‚‰ăŻă€ä»–ăźFastAPI ă‚šăƒłăƒ‰ăƒă‚€ăƒłăƒˆ/*path operation* ăźć ŽćˆăšćŒă˜ă‚ˆă†ă«æ©Ÿèƒœă—ăŸă™ă€‚ ```Python hl_lines="58-65 68-83" -{!../../../docs_src/websockets/tutorial002.py!} +{!../../docs_src/websockets/tutorial002.py!} ``` /// info | "æƒ…ć ±" @@ -165,7 +165,7 @@ $ uvicorn main:app --reload WebSocketæŽ„ç¶šăŒé–‰ă˜ă‚‰ă‚Œă‚‹ăšă€ `await websocket.receive_text()` ăŻäŸ‹ć€– `WebSocketDisconnect` をç™șç”Ÿă•ă›ă€ă“ăźäŸ‹ăźă‚ˆă†ă«ă‚­ăƒŁăƒƒăƒă—ăŠć‡Šç†ă™ă‚‹ă“ăšăŒă§ăăŸă™ă€‚ ```Python hl_lines="81-83" -{!../../../docs_src/websockets/tutorial003.py!} +{!../../docs_src/websockets/tutorial003.py!} ``` è©Šă—ăŠăżă‚‹ă«ăŻă€ diff --git a/docs/ja/docs/how-to/conditional-openapi.md b/docs/ja/docs/how-to/conditional-openapi.md index b892ed6c6..053d481f7 100644 --- a/docs/ja/docs/how-to/conditional-openapi.md +++ b/docs/ja/docs/how-to/conditional-openapi.md @@ -30,7 +30,7 @@ äŸ‹ăˆă°ă€ ```Python hl_lines="6 11" -{!../../../docs_src/conditional_openapi/tutorial001.py!} +{!../../docs_src/conditional_openapi/tutorial001.py!} ``` ここでは `openapi_url` ăźèš­ćźšă‚’ă€ăƒ‡ăƒ•ă‚©ăƒ«ăƒˆăź `"/openapi.json"` ăźăŸăŸćźŁèš€ă—ăŠă„ăŸă™ă€‚ diff --git a/docs/ja/docs/python-types.md b/docs/ja/docs/python-types.md index 730a209ab..7af6ce0c0 100644 --- a/docs/ja/docs/python-types.md +++ b/docs/ja/docs/python-types.md @@ -23,7 +23,7 @@ 簡捘ăȘäŸ‹ă‹ă‚‰ć§‹ă‚ăŠăżăŸă—ă‚‡ă†: ```Python -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` ă“ăźăƒ—ăƒ­ă‚°ăƒ©ăƒ ă‚’ćźŸèĄŒă™ă‚‹ăšä»„äž‹ăŒć‡șćŠ›ă•ă‚ŒăŸă™: @@ -39,7 +39,7 @@ John Doe * çœŸă‚“äž­ă«ă‚čăƒšăƒŒă‚čă‚’ć…„ă‚ŒăŠé€Łç”ă—ăŸă™ă€‚ ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` ### 線集 @@ -83,7 +83,7 @@ John Doe それが「枋ヒント」です: ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial002.py!} +{!../../docs_src/python_types/tutorial002.py!} ``` ă“ă‚ŒăŻă€ä»„äž‹ăźă‚ˆă†ă«ăƒ‡ăƒ•ă‚©ăƒ«ăƒˆć€€ă‚’ćźŁèš€ă™ă‚‹ăźăšćŒă˜ă§ăŻă‚ă‚ŠăŸă›ă‚“: @@ -113,7 +113,7 @@ John Doe ă“ăźé–ąæ•°ă‚’èŠ‹ăŠăă ă•ă„ă€‚ă™ă§ă«ćž‹ăƒ’ăƒłăƒˆă‚’æŒăŁăŠă„ăŸă™: ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial003.py!} +{!../../docs_src/python_types/tutorial003.py!} ``` ă‚šăƒ‡ă‚Łă‚żăŻć€‰æ•°ăźćž‹ă‚’çŸ„ăŁăŠă„ă‚‹ăźă§ă€èŁœćźŒă ă‘ă§ăȘăă€ă‚šăƒ©ăƒŒăƒă‚§ăƒƒă‚Żă‚’ă™ă‚‹ă“ăšă‚‚ă§ăăŸă™ă€‚ @@ -123,7 +123,7 @@ John Doe これで`age`を`str(age)`ă§æ–‡ć­—ćˆ—ă«ć€‰æ›ă—ăŠäżźæ­Łă™ă‚‹ćż…èŠăŒă‚ă‚‹ă“ăšăŒă‚ă‹ă‚ŠăŸă™: ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial004.py!} +{!../../docs_src/python_types/tutorial004.py!} ``` ## ćž‹ăźćźŁèš€ @@ -144,7 +144,7 @@ John Doe * `bytes` ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial005.py!} +{!../../docs_src/python_types/tutorial005.py!} ``` ### ćž‹ăƒ‘ăƒ©ăƒĄăƒŒă‚żă‚’æŒă€ă‚žă‚§ăƒăƒȘック枋 @@ -162,7 +162,7 @@ John Doe `typing`から`List`ă‚’ă‚€ăƒłăƒăƒŒăƒˆă—ăŸă™ïŒˆć€§æ–‡ć­—ăź`L`ă‚’ć«ă‚€ïŒ‰: ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial006.py!} +{!../../docs_src/python_types/tutorial006.py!} ``` ćŒă˜ă‚ˆă†ă«ă‚łăƒ­ăƒłïŒˆ`:`ïŒ‰ăźæ§‹æ–‡ă§ć€‰æ•°ă‚’ćźŁèš€ă—ăŸă™ă€‚ @@ -172,7 +172,7 @@ John Doe ăƒȘă‚čăƒˆăŻă„ăă€ă‹ăźć†…éƒšăźćž‹ă‚’ć«ă‚€ćž‹ăȘăźă§ă€ăă‚Œă‚‰ă‚’è§’æ‹ŹćŒ§ă§ć›Čă‚“ă§ă„ăŸă™ă€‚ ```Python hl_lines="4" -{!../../../docs_src/python_types/tutorial006.py!} +{!../../docs_src/python_types/tutorial006.py!} ``` /// tip | "豆矄識" @@ -200,7 +200,7 @@ John Doe `tuple`ず`set`ăźćźŁèš€ă‚‚ćŒæ§˜ă§ă™: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial007.py!} +{!../../docs_src/python_types/tutorial007.py!} ``` ă€ăŸă‚Š: @@ -218,7 +218,7 @@ John Doe ç•Șç›źăźćž‹ăƒ‘ăƒ©ăƒĄăƒŒă‚żăŻ`dict`た怀です。 ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial008.py!} +{!../../docs_src/python_types/tutorial008.py!} ``` ă€ăŸă‚Š: @@ -232,7 +232,7 @@ John Doe ăŸăŸă€`Optional`ă‚’äœżç”šă—ăŠă€ć€‰æ•°ăŒ`str`ぼようăȘćž‹ă‚’æŒă€ă“ăšă‚’ćźŁèš€ă™ă‚‹ă“ăšă‚‚ă§ăăŸă™ăŒă€ăă‚ŒăŻă€Œă‚Șăƒ—ă‚·ăƒ§ăƒłă€ă§ă‚ă‚Šă€`None`ă«ă™ă‚‹ă“ăšă‚‚ă§ăăŸă™ă€‚ ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009.py!} +{!../../docs_src/python_types/tutorial009.py!} ``` ただぼ`str`ăźä»Łă‚ă‚Šă«`Optional[str]`ă‚’äœżç”šă™ă‚‹ă“ăšă§ă€ă‚šăƒ‡ă‚Łă‚żăŻć€€ăŒćžžă«`str`ă§ă‚ă‚‹ăšä»źćźšă—ăŠă„ă‚‹ć Žćˆă«ćźŸéš›ă«ăŻ`None`ă§ă‚ă‚‹ćŻèƒœæ€§ăŒă‚ă‚‹ă‚šăƒ©ăƒŒă‚’æ€œć‡șするたにćœčç«‹ăĄăŸă™ă€‚ @@ -257,13 +257,13 @@ John Doe äŸ‹ăˆă°ă€`Person`ă‚Żăƒ©ă‚čăšă„ă†ćć‰ăźă‚Żăƒ©ă‚čăŒă‚ă‚‹ăšă—ăŸă—ă‚‡ă†: ```Python hl_lines="1 2 3" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` ć€‰æ•°ăźćž‹ă‚’`Person`ăšă—ăŠćźŁèš€ă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="6" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` そしど、憍び、すăčăŠăźă‚šăƒ‡ă‚Łă‚żăźă‚”ăƒăƒŒăƒˆă‚’ćŸ—ă‚‹ă“ăšăŒă§ăăŸă™: @@ -285,7 +285,7 @@ John Doe Pydanticăźć…ŹćŒăƒ‰ă‚­ăƒ„ăƒĄăƒłăƒˆă‹ă‚‰ćŒ•ç”š: ```Python -{!../../../docs_src/python_types/tutorial011.py!} +{!../../docs_src/python_types/tutorial011.py!} ``` /// info | "æƒ…ć ±" diff --git a/docs/ja/docs/tutorial/background-tasks.md b/docs/ja/docs/tutorial/background-tasks.md index 6094c370f..6f9340817 100644 --- a/docs/ja/docs/tutorial/background-tasks.md +++ b/docs/ja/docs/tutorial/background-tasks.md @@ -16,7 +16,7 @@ ăŸăšćˆă‚ă«ă€`BackgroundTasks` ă‚’ă‚€ăƒłăƒăƒŒăƒˆă—ă€` BackgroundTasks` ăźćž‹ćźŁèš€ăšć…±ă«ă€*path operation é–ąæ•°* ăźăƒ‘ăƒ©ăƒĄăƒŒă‚żăƒŒă‚’ćźšçŸ©ă—ăŸă™: ```Python hl_lines="1 13" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` **FastAPI** は、`BackgroundTasks` 枋ぼă‚Șăƒ–ă‚žă‚§ă‚Żăƒˆă‚’äœœæˆă—ă€ăăźăƒ‘ăƒ©ăƒĄăƒŒă‚żăƒŒă«æžĄă—ăŸă™ă€‚ @@ -34,7 +34,7 @@ ăŸăŸă€æ›žăèŸŒăżæ“äœœă§ăŻ `async` ず `await` ă‚’äœżç”šă—ăȘいため、通澾ぼ `def` ă§é–ąæ•°ă‚’ćźšçŸ©ă—ăŸă™ă€‚ ```Python hl_lines="6-9" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` ## ăƒăƒƒă‚Żă‚°ăƒ©ă‚Šăƒłăƒ‰ă‚żă‚čă‚ŻăźèżœćŠ  @@ -42,7 +42,7 @@ *path operations é–ąæ•°* 憅で、`.add_task()` ăƒĄă‚œăƒƒăƒ‰ă‚’äœżç”šă—ăŠă‚żă‚čă‚Żé–ąæ•°ă‚’ *background tasks* ă‚Șăƒ–ă‚žă‚§ă‚Żăƒˆă«æžĄă—ăŸă™ă€‚ ```Python hl_lines="14" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` `.add_task()` ăŻä»„äž‹ăźćŒ•æ•°ă‚’ć—ă‘ć–ă‚ŠăŸă™: @@ -58,7 +58,7 @@ **FastAPI** は、それぞれぼ栮搈ぼ懩理​​æ–čæł•ăšćŒă˜ă‚Șăƒ–ă‚žă‚§ă‚Żăƒˆăźć†ćˆ©ç”šæ–čæł•ă‚’çŸ„ăŁăŠă„ă‚‹ăŸă‚ă€ă™ăčăŠăźăƒăƒƒă‚Żă‚°ăƒ©ă‚Šăƒłăƒ‰ă‚żă‚čă‚ŻăŒăƒžăƒŒă‚žă•ă‚Œă€ăƒăƒƒă‚Żă‚°ăƒ©ă‚Šăƒłăƒ‰ă§ćŸŒă§ćźŸèĄŒă•ă‚ŒăŸă™ă€‚ ```Python hl_lines="13 15 22 25" -{!../../../docs_src/background_tasks/tutorial002.py!} +{!../../docs_src/background_tasks/tutorial002.py!} ``` ă“ăźäŸ‹ă§ăŻă€ăƒŹă‚čポンă‚čが送信された *ćŸŒ* ă«ăƒĄăƒƒă‚»ăƒŒă‚žăŒ `log.txt` ăƒ•ă‚Ąă‚€ăƒ«ă«æ›žăèŸŒăŸă‚ŒăŸă™ă€‚ diff --git a/docs/ja/docs/tutorial/body-fields.md b/docs/ja/docs/tutorial/body-fields.md index b9f6d694b..1d386040a 100644 --- a/docs/ja/docs/tutorial/body-fields.md +++ b/docs/ja/docs/tutorial/body-fields.md @@ -7,7 +7,7 @@ ăŸăšă€ä»„äž‹ăźă‚ˆă†ă«ă‚€ăƒłăƒăƒŒăƒˆă—ăŸă™: ```Python hl_lines="4" -{!../../../docs_src/body_fields/tutorial001.py!} +{!../../docs_src/body_fields/tutorial001.py!} ``` /// warning | "æłšæ„" @@ -21,7 +21,7 @@ ä»„äž‹ăźă‚ˆă†ă«`Field`ă‚’ăƒąăƒ‡ăƒ«ăźć±žæ€§ăšă—ăŠäœżç”šă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="11 12 13 14" -{!../../../docs_src/body_fields/tutorial001.py!} +{!../../docs_src/body_fields/tutorial001.py!} ``` `Field`は`Query`や`Path`、`Body`ăšćŒă˜ă‚ˆă†ă«ć‹•äœœă—ă€ć…šăćŒæ§˜ăźăƒ‘ăƒ©ăƒĄăƒŒă‚żăȘă©ă‚’æŒăĄăŸă™ă€‚ diff --git a/docs/ja/docs/tutorial/body-multiple-params.md b/docs/ja/docs/tutorial/body-multiple-params.md index c051fde24..647143ee5 100644 --- a/docs/ja/docs/tutorial/body-multiple-params.md +++ b/docs/ja/docs/tutorial/body-multiple-params.md @@ -9,7 +9,7 @@ ăŸăŸă€ăƒ‡ăƒ•ă‚©ăƒ«ăƒˆăź`None`ă‚’èš­ćźšă™ă‚‹ă“ăšă§ă€ăƒœăƒ‡ă‚Łăƒ‘ăƒ©ăƒĄăƒŒă‚żă‚’ă‚Șăƒ—ă‚·ăƒ§ăƒłăšă—ăŠćźŁèš€ă™ă‚‹ă“ăšă‚‚ă§ăăŸă™: ```Python hl_lines="19 20 21" -{!../../../docs_src/body_multiple_params/tutorial001.py!} +{!../../docs_src/body_multiple_params/tutorial001.py!} ``` /// note | "ć‚™è€ƒ" @@ -34,7 +34,7 @@ しかし、`item`ず`user`ăźă‚ˆă†ă«è€‡æ•°ăźăƒœăƒ‡ă‚Łăƒ‘ăƒ©ăƒĄăƒŒă‚żă‚’ćźŁèš€ă™ă‚‹ă“ăšă‚‚ă§ăăŸă™: ```Python hl_lines="22" -{!../../../docs_src/body_multiple_params/tutorial002.py!} +{!../../docs_src/body_multiple_params/tutorial002.py!} ``` こぼ栮搈、**FastAPI**ăŻé–ąæ•°ć†…ă«è€‡æ•°ăźăƒœăƒ‡ă‚Łăƒ‘ăƒ©ăƒĄăƒŒă‚żïŒˆPydanticăƒąăƒ‡ăƒ«ă§ă‚ă‚‹ïŒ’ă€ăźăƒ‘ăƒ©ăƒĄăƒŒă‚żïŒ‰ăŒă‚ă‚‹ă“ăšă«æ°—ä»˜ăăŸă™ă€‚ @@ -78,7 +78,7 @@ ```Python hl_lines="23" -{!../../../docs_src/body_multiple_params/tutorial003.py!} +{!../../docs_src/body_multiple_params/tutorial003.py!} ``` こぼ栮搈、**FastAPI** ăŻä»„äž‹ăźă‚ˆă†ăȘăƒœăƒ‡ă‚Łă‚’æœŸćŸ…ă—ăŸă™: @@ -115,7 +115,7 @@ q: str = None 仄䞋においお: ```Python hl_lines="27" -{!../../../docs_src/body_multiple_params/tutorial004.py!} +{!../../docs_src/body_multiple_params/tutorial004.py!} ``` /// info | "æƒ…ć ±" @@ -139,7 +139,7 @@ item: Item = Body(..., embed=True) 仄䞋においお: ```Python hl_lines="17" -{!../../../docs_src/body_multiple_params/tutorial005.py!} +{!../../docs_src/body_multiple_params/tutorial005.py!} ``` こぼ栮搈、**FastAPI** ăŻä»„äž‹ăźă‚ˆă†ăȘăƒœăƒ‡ă‚Łă‚’æœŸćŸ…ă—ăŸă™: diff --git a/docs/ja/docs/tutorial/body-nested-models.md b/docs/ja/docs/tutorial/body-nested-models.md index 59ee67295..8703a40e7 100644 --- a/docs/ja/docs/tutorial/body-nested-models.md +++ b/docs/ja/docs/tutorial/body-nested-models.md @@ -7,7 +7,7 @@ ć±žæ€§ă‚’ă‚”ăƒ–ă‚żă‚€ăƒ—ăšă—ăŠćźšçŸ©ă™ă‚‹ă“ăšăŒă§ăăŸă™ă€‚äŸ‹ăˆă°ă€Pythonた`list`ăŻä»„äž‹ăźă‚ˆă†ă«ćźšçŸ©ă§ăăŸă™: ```Python hl_lines="12" -{!../../../docs_src/body_nested_models/tutorial001.py!} +{!../../docs_src/body_nested_models/tutorial001.py!} ``` ă“ă‚Œă«ă‚ˆă‚Šă€ć„é …ç›źăźćž‹ăŻćźŁèš€ă•ă‚ŒăŠă„ăŸă›ă‚“ăŒă€`tags`はある項盼ぼăƒȘă‚čトにăȘă‚ŠăŸă™ă€‚ @@ -21,7 +21,7 @@ ăŸăšă€Pythonăźæš™æș–た`typing`ăƒąă‚žăƒ„ăƒŒăƒ«ă‹ă‚‰`List`ă‚’ă‚€ăƒłăƒăƒŒăƒˆă—ăŸă™: ```Python hl_lines="1" -{!../../../docs_src/body_nested_models/tutorial002.py!} +{!../../docs_src/body_nested_models/tutorial002.py!} ``` ### ă‚żă‚€ăƒ—ăƒ‘ăƒ©ăƒĄăƒŒă‚żă‚’æŒă€`List`ăźćźŁèš€ @@ -44,7 +44,7 @@ my_list: List[str] ăăźăŸă‚ă€ä»„äž‹ăźäŸ‹ă§ăŻ`tags`ă‚’ć…·äœ“çš„ăȘă€Œæ–‡ć­—ćˆ—ăźăƒȘă‚čăƒˆă€ă«ă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="14" -{!../../../docs_src/body_nested_models/tutorial002.py!} +{!../../docs_src/body_nested_models/tutorial002.py!} ``` ## ă‚»ăƒƒăƒˆćž‹ @@ -56,7 +56,7 @@ my_list: List[str] ăăźăŸă‚ă€ä»„äž‹ăźă‚ˆă†ă«ă€`Set`ă‚’ă‚€ăƒłăƒăƒŒăƒˆă—ăŠ`str`た`set`べしど`tags`ă‚’ćźŁèš€ă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="1 14" -{!../../../docs_src/body_nested_models/tutorial003.py!} +{!../../docs_src/body_nested_models/tutorial003.py!} ``` ă“ă‚Œă‚’äœżăˆă°ă€ăƒ‡ăƒŒă‚żăŒé‡è€‡ă—ăŠă„ă‚‹ăƒȘクスă‚čăƒˆă‚’ć—ă‘ăŸć Žćˆă§ă‚‚ă€ăƒŠăƒ‹ăƒŒă‚ŻăȘé …ç›źăźă‚»ăƒƒăƒˆă«ć€‰æ›ă•ă‚ŒăŸă™ă€‚ @@ -80,7 +80,7 @@ Pydanticăƒąăƒ‡ăƒ«ăźć„ć±žæ€§ă«ăŻćž‹ăŒă‚ă‚ŠăŸă™ă€‚ äŸ‹ăˆă°ă€`Image`ăƒąăƒ‡ăƒ«ă‚’ćźšçŸ©ă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="9 10 11" -{!../../../docs_src/body_nested_models/tutorial004.py!} +{!../../docs_src/body_nested_models/tutorial004.py!} ``` ### ă‚”ăƒ–ăƒąăƒ‡ăƒ«ă‚’ćž‹ăšă—ăŠäœżç”š @@ -88,7 +88,7 @@ Pydanticăƒąăƒ‡ăƒ«ăźć„ć±žæ€§ă«ăŻćž‹ăŒă‚ă‚ŠăŸă™ă€‚ ăă—ăŠă€ăă‚Œă‚’ć±žæ€§ăźćž‹ăšă—ăŠäœżç”šă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="20" -{!../../../docs_src/body_nested_models/tutorial004.py!} +{!../../docs_src/body_nested_models/tutorial004.py!} ``` これは **FastAPI** ăŒä»„äž‹ăźă‚ˆă†ăȘăƒœăƒ‡ă‚Łă‚’æœŸćŸ…ă™ă‚‹ă“ăšă‚’æ„ć‘łă—ăŸă™: @@ -123,7 +123,7 @@ Pydanticăƒąăƒ‡ăƒ«ăźć„ć±žæ€§ă«ăŻćž‹ăŒă‚ă‚ŠăŸă™ă€‚ äŸ‹ăˆă°ă€`Image`ăƒąăƒ‡ăƒ«ăźă‚ˆă†ă«`url`ăƒ•ă‚ŁăƒŒăƒ«ăƒ‰ăŒă‚ă‚‹ć Žćˆă€`str`ăźä»Łă‚ă‚Šă«Pydanticた`HttpUrl`ă‚’æŒ‡ćźšă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="4 10" -{!../../../docs_src/body_nested_models/tutorial005.py!} +{!../../docs_src/body_nested_models/tutorial005.py!} ``` æ–‡ć­—ćˆ—ăŻæœ‰ćŠčăȘURLであるこべがçąșèȘă•ă‚Œă€ăăźă‚ˆă†ă«JSONă‚čă‚­ăƒŒăƒžăƒ»OpenAPIă§æ–‡æ›žćŒ–ă•ă‚ŒăŸă™ă€‚ @@ -133,7 +133,7 @@ Pydanticăƒąăƒ‡ăƒ«ăźć„ć±žæ€§ă«ăŻćž‹ăŒă‚ă‚ŠăŸă™ă€‚ Pydanticăƒąăƒ‡ăƒ«ă‚’`list`や`set`ăȘă©ăźă‚”ăƒ–ă‚żă‚€ăƒ—ăšă—ăŠäœżç”šă™ă‚‹ă“ăšă‚‚ă§ăăŸă™: ```Python hl_lines="20" -{!../../../docs_src/body_nested_models/tutorial006.py!} +{!../../docs_src/body_nested_models/tutorial006.py!} ``` ă“ă‚ŒăŻă€æŹĄăźă‚ˆă†ăȘJSONăƒœăƒ‡ă‚Łă‚’æœŸćŸ…ă—ăŸă™ïŒˆć€‰æ›ă€æ€œèšŒă€ăƒ‰ă‚­ăƒ„ăƒĄăƒłăƒˆăȘă©ïŒ‰: @@ -173,7 +173,7 @@ Pydanticăƒąăƒ‡ăƒ«ă‚’`list`や`set`ăȘă©ăźă‚”ăƒ–ă‚żă‚€ăƒ—ăšă—ăŠäœżç”šă™ă‚‹ æ·±ăăƒă‚čăƒˆă•ă‚ŒăŸä»»æ„ăźăƒąăƒ‡ăƒ«ă‚’ćźšçŸ©ă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="9 14 20 23 27" -{!../../../docs_src/body_nested_models/tutorial007.py!} +{!../../docs_src/body_nested_models/tutorial007.py!} ``` /// info | "æƒ…ć ±" @@ -193,7 +193,7 @@ images: List[Image] ä»„äž‹ăźă‚ˆă†ă«: ```Python hl_lines="15" -{!../../../docs_src/body_nested_models/tutorial008.py!} +{!../../docs_src/body_nested_models/tutorial008.py!} ``` ## ă‚ă‚‰ă‚†ă‚‹ć Žæ‰€ă§ăźă‚šăƒ‡ă‚Łă‚żă‚”ăƒăƒŒăƒˆ @@ -225,7 +225,7 @@ Pydanticăƒąăƒ‡ăƒ«ă§ăŻăȘく、`dict`ă‚’ç›ŽæŽ„äœżç”šă—ăŠă„ă‚‹ć ŽćˆăŻă“ăź こぼ栮搈、`int`ăźă‚­ăƒŒăš`float`ăźć€€ă‚’æŒă€ă‚‚ăźă§ă‚ă‚Œă°ă€ă©ă‚“ăȘ`dict`ă§ă‚‚ć—ă‘ć…„ă‚Œă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="15" -{!../../../docs_src/body_nested_models/tutorial009.py!} +{!../../docs_src/body_nested_models/tutorial009.py!} ``` /// tip | "豆矄識" diff --git a/docs/ja/docs/tutorial/body-updates.md b/docs/ja/docs/tutorial/body-updates.md index 672a03a64..fde9f4f5e 100644 --- a/docs/ja/docs/tutorial/body-updates.md +++ b/docs/ja/docs/tutorial/body-updates.md @@ -7,7 +7,7 @@ `jsonable_encoder`ă‚’ç”šă„ăŠă€ć…„ćŠ›ăƒ‡ăƒŒă‚żă‚’JSONćœąćŒă§äżć­˜ă§ăă‚‹ăƒ‡ăƒŒă‚żă«ć€‰æ›ă™ă‚‹ă“ăšăŒă§ăăŸă™ïŒˆäŸ‹ïŒšNoSQLăƒ‡ăƒŒă‚żăƒ™ăƒŒă‚čïŒ‰ă€‚äŸ‹ăˆă°ă€`datetime`を`str`ă«ć€‰æ›ă—ăŸă™ă€‚ ```Python hl_lines="30 31 32 33 34 35" -{!../../../docs_src/body_updates/tutorial001.py!} +{!../../docs_src/body_updates/tutorial001.py!} ``` æ—ąć­˜ăźăƒ‡ăƒŒă‚żă‚’çœźăæ›ăˆă‚‹ăčăăƒ‡ăƒŒă‚żă‚’ć—ă‘ć–ă‚‹ăŸă‚ă«`PUT`ăŻäœżç”šă•ă‚ŒăŸă™ă€‚ @@ -57,7 +57,7 @@ ă“ă‚Œă‚’äœżă†ă“ăšă§ă€ăƒ‡ăƒ•ă‚©ăƒ«ăƒˆć€€ă‚’çœç•„ă—ăŠă€èš­ćźšă•ă‚ŒăŸïŒˆăƒȘクスă‚čăƒˆă§é€ă‚‰ă‚ŒăŸïŒ‰ăƒ‡ăƒŒă‚żăźăżă‚’ć«ă‚€`dict`ă‚’ç”Ÿæˆă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="34" -{!../../../docs_src/body_updates/tutorial002.py!} +{!../../docs_src/body_updates/tutorial002.py!} ``` ### Pydanticた`update`ăƒ‘ăƒ©ăƒĄăƒŒă‚ż @@ -67,7 +67,7 @@ `stored_item_model.copy(update=update_data)`ăźă‚ˆă†ă«: ```Python hl_lines="35" -{!../../../docs_src/body_updates/tutorial002.py!} +{!../../docs_src/body_updates/tutorial002.py!} ``` ### éƒšćˆ†çš„æ›Žæ–°ăźăŸăšă‚ @@ -86,7 +86,7 @@ * æ›Žæ–°ă•ă‚ŒăŸăƒąăƒ‡ăƒ«ă‚’èż”ă—ăŸă™ă€‚ ```Python hl_lines="30 31 32 33 34 35 36 37" -{!../../../docs_src/body_updates/tutorial002.py!} +{!../../docs_src/body_updates/tutorial002.py!} ``` /// tip | "豆矄識" diff --git a/docs/ja/docs/tutorial/body.md b/docs/ja/docs/tutorial/body.md index 017ff8986..888d4388a 100644 --- a/docs/ja/docs/tutorial/body.md +++ b/docs/ja/docs/tutorial/body.md @@ -23,7 +23,7 @@ GET ăƒȘクスă‚čăƒˆă§ăƒœăƒ‡ă‚Łă‚’é€äżĄă™ă‚‹ă“ăšăŻă€ä»•æ§˜ă§ăŻæœȘćźšçŸ© ăŸă™ćˆă‚ă«ă€ `pydantic` から `BaseModel` ă‚’ă‚€ăƒłăƒăƒŒăƒˆă™ă‚‹ćż…èŠăŒă‚ă‚ŠăŸă™: ```Python hl_lines="2" -{!../../../docs_src/body/tutorial001.py!} +{!../../docs_src/body/tutorial001.py!} ``` ## ăƒ‡ăƒŒă‚żăƒąăƒ‡ăƒ«ăźäœœæˆ @@ -33,7 +33,7 @@ GET ăƒȘクスă‚čăƒˆă§ăƒœăƒ‡ă‚Łă‚’é€äżĄă™ă‚‹ă“ăšăŻă€ä»•æ§˜ă§ăŻæœȘćźšçŸ© すăčăŠăźć±žæ€§ă«pythonæš™æș–ăźćž‹ă‚’äœżç”šă—ăŸă™: ```Python hl_lines="5-9" -{!../../../docs_src/body/tutorial001.py!} +{!../../docs_src/body/tutorial001.py!} ``` クスăƒȘăƒ‘ăƒ©ăƒĄăƒŒă‚żăźćźŁèš€ăšćŒæ§˜ă«ă€ăƒąăƒ‡ăƒ«ć±žæ€§ăŒăƒ‡ăƒ•ă‚©ăƒ«ăƒˆć€€ă‚’ă‚‚ă€ăšăă€ćż…é ˆăȘć±žæ€§ă§ăŻăȘくăȘă‚ŠăŸă™ă€‚ăă‚Œä»„ć€–ăŻćż…é ˆă«ăȘă‚ŠăŸă™ă€‚ă‚Șăƒ—ă‚·ăƒ§ăƒŠăƒ«ăȘć±žæ€§ă«ă—ăŸă„ć ŽćˆăŻ `None` ă‚’äœżç”šă—ăŠăă ă•ă„ă€‚ @@ -63,7 +63,7 @@ GET ăƒȘクスă‚čăƒˆă§ăƒœăƒ‡ă‚Łă‚’é€äżĄă™ă‚‹ă“ăšăŻă€ä»•æ§˜ă§ăŻæœȘćźšçŸ© *パă‚čă‚ȘăƒšăƒŹăƒŒă‚·ăƒ§ăƒł* ă«ćŠ ăˆă‚‹ăŸă‚ă«ă€ăƒ‘ă‚čăƒ‘ăƒ©ăƒĄăƒŒă‚żă‚„ă‚Żă‚šăƒȘăƒ‘ăƒ©ăƒĄăƒŒă‚żăšćŒă˜æ§˜ă«ćźŁèš€ă—ăŸă™: ```Python hl_lines="16" -{!../../../docs_src/body/tutorial001.py!} +{!../../docs_src/body/tutorial001.py!} ``` ...ăă—ăŠă€äœœæˆă—ăŸăƒąăƒ‡ăƒ« `Item` ă§ćž‹ă‚’ćźŁèš€ă—ăŸă™ă€‚ @@ -132,7 +132,7 @@ GET ăƒȘクスă‚čăƒˆă§ăƒœăƒ‡ă‚Łă‚’é€äżĄă™ă‚‹ă“ăšăŻă€ä»•æ§˜ă§ăŻæœȘćźšçŸ© é–ąæ•°ć†…éƒšă§ă€ăƒąăƒ‡ăƒ«ăźć…šăŠăźć±žæ€§ă«ç›ŽæŽ„ă‚ąă‚Żă‚»ă‚čă§ăăŸă™: ```Python hl_lines="19" -{!../../../docs_src/body/tutorial002.py!} +{!../../docs_src/body/tutorial002.py!} ``` ## ăƒȘクスă‚čトボディ + パă‚čăƒ‘ăƒ©ăƒĄăƒŒă‚ż @@ -142,7 +142,7 @@ GET ăƒȘクスă‚čăƒˆă§ăƒœăƒ‡ă‚Łă‚’é€äżĄă™ă‚‹ă“ăšăŻă€ä»•æ§˜ă§ăŻæœȘćźšçŸ© **FastAPI** はパă‚čăƒ‘ăƒ©ăƒĄăƒŒă‚żă§ă‚ă‚‹é–ąæ•°ăƒ‘ăƒ©ăƒĄăƒŒă‚żăŻ**パă‚čから揗け揖り**、Pydanticăƒąăƒ‡ăƒ«ă«ă‚ˆăŁăŠćźŁèš€ă•ă‚ŒăŸé–ąæ•°ăƒ‘ăƒ©ăƒĄăƒŒă‚żăŻ**ăƒȘクスă‚čトボディから揗け揖る**べいうこべをèȘè­˜ă—ăŸă™ă€‚ ```Python hl_lines="15-16" -{!../../../docs_src/body/tutorial003.py!} +{!../../docs_src/body/tutorial003.py!} ``` ## ăƒȘクスă‚čトボディ + パă‚čăƒ‘ăƒ©ăƒĄăƒŒă‚ż + クスăƒȘăƒ‘ăƒ©ăƒĄăƒŒă‚ż @@ -152,7 +152,7 @@ GET ăƒȘクスă‚čăƒˆă§ăƒœăƒ‡ă‚Łă‚’é€äżĄă™ă‚‹ă“ăšăŻă€ä»•æ§˜ă§ăŻæœȘćźšçŸ© **FastAPI** はそれぞれをèȘè­˜ă—ă€é©ćˆ‡ăȘć Žæ‰€ă‹ă‚‰ăƒ‡ăƒŒă‚żă‚’ć–ćŸ—ă—ăŸă™ă€‚ ```Python hl_lines="16" -{!../../../docs_src/body/tutorial004.py!} +{!../../docs_src/body/tutorial004.py!} ``` é–ąæ•°ăƒ‘ăƒ©ăƒĄăƒŒă‚żăŻä»„äž‹ăźæ§˜ă«èȘè­˜ă•ă‚ŒăŸă™: diff --git a/docs/ja/docs/tutorial/cookie-params.md b/docs/ja/docs/tutorial/cookie-params.md index 212885209..1f45db17c 100644 --- a/docs/ja/docs/tutorial/cookie-params.md +++ b/docs/ja/docs/tutorial/cookie-params.md @@ -7,7 +7,7 @@ ăŸăšă€`Cookie`ă‚’ă‚€ăƒłăƒăƒŒăƒˆă—ăŸă™: ```Python hl_lines="3" -{!../../../docs_src/cookie_params/tutorial001.py!} +{!../../docs_src/cookie_params/tutorial001.py!} ``` ## `Cookie`ăźăƒ‘ăƒ©ăƒĄăƒŒă‚żă‚’ćźŁèš€ @@ -17,7 +17,7 @@ æœ€ćˆăźć€€ăŒăƒ‡ăƒ•ă‚©ăƒ«ăƒˆć€€ă§ă€èżœćŠ ăźæ€œèšŒăƒ‘ăƒ©ăƒĄăƒŒă‚żă‚„æłšé‡ˆăƒ‘ăƒ©ăƒĄăƒŒă‚żă‚’ă™ăčăŠæžĄă™ă“ăšăŒă§ăăŸă™: ```Python hl_lines="9" -{!../../../docs_src/cookie_params/tutorial001.py!} +{!../../docs_src/cookie_params/tutorial001.py!} ``` /// note | "æŠ€èĄ“è©łçŽ°" diff --git a/docs/ja/docs/tutorial/cors.md b/docs/ja/docs/tutorial/cors.md index 738240342..9530c51bf 100644 --- a/docs/ja/docs/tutorial/cors.md +++ b/docs/ja/docs/tutorial/cors.md @@ -47,7 +47,7 @@ * ç‰č漚ぼHTTPăƒ˜ăƒƒăƒ€ăƒŒă€ăŸăŸăŻăƒŻă‚€ăƒ«ăƒ‰ă‚«ăƒŒăƒ‰ `"*"`ă‚’äœżç”šă—ăŠă™ăčăŠèš±ćŻă€‚ ```Python hl_lines="2 6-11 13-19" -{!../../../docs_src/cors/tutorial001.py!} +{!../../docs_src/cors/tutorial001.py!} ``` `CORSMiddleware` ćźŸèŁ…ăźăƒ‡ăƒ•ă‚©ăƒ«ăƒˆăźăƒ‘ăƒ©ăƒĄăƒŒă‚żăŻCORSă«é–ąă—ăŠćˆ¶é™ă‚’äžŽăˆă‚‹ă‚‚ăźă«ăȘăŁăŠă„ă‚‹ăźă§ă€ăƒ–ăƒ©ă‚Šă‚¶ă«ăƒ‰ăƒĄă‚€ăƒłă‚’è·šă„ă§ç‰č漚ぼă‚ȘăƒȘă‚žăƒłă€ăƒĄă‚œăƒƒăƒ‰ă€ăŸăŸăŻăƒ˜ăƒƒăƒ€ăƒŒă‚’äœżç”šćŻèƒœă«ă™ă‚‹ăŸă‚ă«ăŻă€ăă‚Œă‚‰ă‚’æ˜Žç€șçš„ă«æœ‰ćŠčă«ă™ă‚‹ćż…èŠăŒă‚ă‚ŠăŸă™ diff --git a/docs/ja/docs/tutorial/debugging.md b/docs/ja/docs/tutorial/debugging.md index 06b8ad277..be0ff81d4 100644 --- a/docs/ja/docs/tutorial/debugging.md +++ b/docs/ja/docs/tutorial/debugging.md @@ -7,7 +7,7 @@ Visual Studio CodeやPyCharmăȘă©ă‚’äœżç”šă—ăŠă€ă‚šăƒ‡ă‚Łă‚żăƒŒäžŠă§ăƒ‡ăƒ FastAPIケプăƒȘă‚±ăƒŒă‚·ăƒ§ăƒłäžŠă§ă€`uvicorn` ă‚’ç›ŽæŽ„ă‚€ăƒłăƒăƒŒăƒˆă—ăŠćźŸèĄŒă—ăŸă™: ```Python hl_lines="1 15" -{!../../../docs_src/debugging/tutorial001.py!} +{!../../docs_src/debugging/tutorial001.py!} ``` ### `__name__ == "__main__"` に぀いお diff --git a/docs/ja/docs/tutorial/dependencies/classes-as-dependencies.md b/docs/ja/docs/tutorial/dependencies/classes-as-dependencies.md index 69b67d042..fb23a7b2b 100644 --- a/docs/ja/docs/tutorial/dependencies/classes-as-dependencies.md +++ b/docs/ja/docs/tutorial/dependencies/classes-as-dependencies.md @@ -7,7 +7,7 @@ ć‰ăźäŸ‹ă§ăŻă€äŸć­˜é–ąäż‚ïŒˆ"dependable"ïŒ‰ă‹ă‚‰`dict`ă‚’èż”ă—ăŠă„ăŸă—ăŸ: ```Python hl_lines="9" -{!../../../docs_src/dependencies/tutorial001.py!} +{!../../docs_src/dependencies/tutorial001.py!} ``` しかし、*path operationé–ąæ•°*ăźăƒ‘ăƒ©ăƒĄăƒŒă‚ż`commons`に`dict`ăŒć«ăŸă‚ŒăŠă„ăŸă™ă€‚ @@ -72,19 +72,19 @@ FastAPIăŒćźŸéš›ă«ăƒă‚§ăƒƒă‚Żă—ăŠă„ă‚‹ăźăŻă€ăă‚ŒăŒă€Œć‘Œăłć‡șし揯 そこで、侊でçŽčä»‹ă—ăŸäŸć­˜é–ąäż‚ăź`common_parameters`を`CommonQueryParams`ă‚Żăƒ©ă‚čă«ć€‰æ›Žă—ăŸă™: ```Python hl_lines="11 12 13 14 15" -{!../../../docs_src/dependencies/tutorial002.py!} +{!../../docs_src/dependencies/tutorial002.py!} ``` ă‚Żăƒ©ă‚čăźă‚€ăƒłă‚čタンă‚čă‚’äœœæˆă™ă‚‹ăŸă‚ă«äœżç”šă•ă‚Œă‚‹`__init__`ăƒĄă‚œăƒƒăƒ‰ă«æłšç›źă—ăŠăă ă•ă„: ```Python hl_lines="12" -{!../../../docs_src/dependencies/tutorial002.py!} +{!../../docs_src/dependencies/tutorial002.py!} ``` ...ä»„ć‰ăź`common_parameters`ăšćŒă˜ăƒ‘ăƒ©ăƒĄăƒŒă‚żă‚’æŒăŁăŠă„ăŸă™: ```Python hl_lines="8" -{!../../../docs_src/dependencies/tutorial001.py!} +{!../../docs_src/dependencies/tutorial001.py!} ``` ă“ă‚Œă‚‰ăźăƒ‘ăƒ©ăƒĄăƒŒă‚żăŻ **FastAPI** ăŒäŸć­˜é–ąäż‚ă‚’ă€Œè§Łæ±șă€ă™ă‚‹ăŸă‚ă«äœżç”šă™ă‚‹ă‚‚ăźă§ă™ă€‚ @@ -102,7 +102,7 @@ FastAPIăŒćźŸéš›ă«ăƒă‚§ăƒƒă‚Żă—ăŠă„ă‚‹ăźăŻă€ăă‚ŒăŒă€Œć‘Œăłć‡șし揯 ă“ă‚Œă§ă€ă“ăźă‚Żăƒ©ă‚čă‚’äœżç”šă—ăŠäŸć­˜é–ąäż‚ă‚’ćźŁèš€ă™ă‚‹ă“ăšăŒă§ăăŸă™ă€‚ ```Python hl_lines="19" -{!../../../docs_src/dependencies/tutorial002.py!} +{!../../docs_src/dependencies/tutorial002.py!} ``` **FastAPI** は`CommonQueryParams`ă‚Żăƒ©ă‚čă‚’ć‘Œăłć‡șă—ăŸă™ă€‚ă“ă‚Œă«ă‚ˆă‚Šă€ăăźă‚Żăƒ©ă‚čăźă€Œă‚€ăƒłă‚čタンă‚čă€ăŒäœœæˆă•ă‚Œă€ă‚€ăƒłă‚čタンă‚čăŻăƒ‘ăƒ©ăƒĄăƒŒă‚ż`commons`ăšă—ăŠé–ąæ•°ă«æžĄă•ă‚ŒăŸă™ă€‚ @@ -144,7 +144,7 @@ commons = Depends(CommonQueryParams) ä»„äž‹ă«ă‚ă‚‹ă‚ˆă†ă«: ```Python hl_lines="19" -{!../../../docs_src/dependencies/tutorial003.py!} +{!../../docs_src/dependencies/tutorial003.py!} ``` ă—ă‹ă—ă€ćž‹ă‚’ćźŁèš€ă™ă‚‹ă“ăšăŻæŽšć„šă•ă‚ŒăŠă„ăŸă™ă€‚ăă†ă™ă‚Œă°ă€ă‚šăƒ‡ă‚Łă‚żăŻ`commons`ăźăƒ‘ăƒ©ăƒĄăƒŒă‚żăšă—ăŠäœ•ăŒæžĄă•ă‚Œă‚‹ă‹ă‚’çŸ„ă‚‹ă“ăšăŒă§ăă€ă‚łăƒŒăƒ‰ăźèŁœćźŒă‚„ćž‹ăƒă‚§ăƒƒă‚ŻăȘă©ă‚’èĄŒă†ăźă«ćœčç«‹ăĄăŸă™: @@ -180,7 +180,7 @@ commons: CommonQueryParams = Depends() ćŒă˜äŸ‹ă§ăŻä»„äž‹ăźă‚ˆă†ă«ăȘă‚ŠăŸă™: ```Python hl_lines="19" -{!../../../docs_src/dependencies/tutorial004.py!} +{!../../docs_src/dependencies/tutorial004.py!} ``` ...そしど **FastAPI** ăŻäœ•ă‚’ă™ăčăă‹çŸ„ăŁăŠă„ăŸă™ă€‚ diff --git a/docs/ja/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md b/docs/ja/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md index c6472cab5..59f21c3df 100644 --- a/docs/ja/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md +++ b/docs/ja/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md @@ -15,7 +15,7 @@ それは`Depends()`た`list`であるăčきです: ```Python hl_lines="17" -{!../../../docs_src/dependencies/tutorial006.py!} +{!../../docs_src/dependencies/tutorial006.py!} ``` ă“ă‚Œă‚‰ăźäŸć­˜é–ąäż‚ăŻă€é€šćžžăźäŸć­˜é–ąäż‚ăšćŒæ§˜ă«ćźŸèĄŒăƒ»è§Łæ±șă•ă‚ŒăŸă™ă€‚ă—ă‹ă—ă€ăă‚Œă‚‰ăźć€€ïŒˆäœ•ă‹ă‚’èż”ă™ć ŽćˆïŒ‰ăŻ*path operationé–ąæ•°*ă«ăŻæžĄă•ă‚ŒăŸă›ă‚“ă€‚ @@ -39,7 +39,7 @@ これらはăƒȘクスă‚čăƒˆăźèŠä»¶ïŒˆăƒ˜ăƒƒăƒ€ăźă‚ˆă†ăȘă‚‚ăźïŒ‰ă‚„ăăźä»–ăźă‚”ăƒ–äŸć­˜é–ąäż‚ă‚’ćźŁèš€ă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="6 11" -{!../../../docs_src/dependencies/tutorial006.py!} +{!../../docs_src/dependencies/tutorial006.py!} ``` ### äŸ‹ć€–ăźç™ș生 @@ -47,7 +47,7 @@ ă“ă‚Œă‚‰ăźäŸć­˜é–ąäż‚ăŻé€šćžžăźäŸć­˜é–ąäż‚ăšćŒă˜ă‚ˆă†ă«ă€äŸ‹ć€–ă‚’`raise`ç™șç”Ÿă•ă›ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="8 13" -{!../../../docs_src/dependencies/tutorial006.py!} +{!../../docs_src/dependencies/tutorial006.py!} ``` ### æˆ»ă‚Šć€€ @@ -57,7 +57,7 @@ ă€ăŸă‚Šă€ă™ă§ă«ă©ă“ă‹ă§äœżăŁăŠă„ă‚‹é€šćžžăźäŸć­˜é–ąäż‚ïŒˆć€€ă‚’èż”ă™ă‚‚ăźïŒ‰ă‚’ć†ćˆ©ç”šă™ă‚‹ă“ăšăŒă§ăă€ć€€ăŻäœżă‚ă‚ŒăȘăăŠă‚‚äŸć­˜é–ąäż‚ăŻćźŸèĄŒă•ă‚ŒăŸă™: ```Python hl_lines="9 14" -{!../../../docs_src/dependencies/tutorial006.py!} +{!../../docs_src/dependencies/tutorial006.py!} ``` ## *path operations*ăźă‚°ăƒ«ăƒŒăƒ—ă«ćŻŸă™ă‚‹äŸć­˜é–ąäż‚ diff --git a/docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md b/docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md index 3f22a7a7b..7ef1caf0d 100644 --- a/docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md +++ b/docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md @@ -42,19 +42,19 @@ pip install async-exit-stack async-generator ハă‚čポンă‚čă‚’é€äżĄă™ă‚‹ć‰ă«`yield`æ–‡ă‚’ć«ă‚€ć‰ăźă‚łăƒŒăƒ‰ăźăżăŒćźŸèĄŒă•ă‚ŒăŸă™ă€‚ ```Python hl_lines="2 3 4" -{!../../../docs_src/dependencies/tutorial007.py!} +{!../../docs_src/dependencies/tutorial007.py!} ``` ç”Ÿæˆă•ă‚ŒăŸć€€ăŻă€*path operations*ă‚„ä»–ăźäŸć­˜é–ąäż‚ă«æłšć…„ă•ă‚Œă‚‹ă‚‚ăźă§ă™: ```Python hl_lines="4" -{!../../../docs_src/dependencies/tutorial007.py!} +{!../../docs_src/dependencies/tutorial007.py!} ``` `yield`æ–‡ă«ç¶šăă‚łăƒŒăƒ‰ăŻă€ăƒŹă‚čポンă‚čăŒé€äżĄă•ă‚ŒăŸćŸŒă«ćźŸèĄŒă•ă‚ŒăŸă™: ```Python hl_lines="5 6" -{!../../../docs_src/dependencies/tutorial007.py!} +{!../../docs_src/dependencies/tutorial007.py!} ``` /// tip | "豆矄識" @@ -76,7 +76,7 @@ pip install async-exit-stack async-generator ćŒæ§˜ă«ă€`finally`ă‚’ç”šă„ăŠäŸ‹ć€–ăŒă‚ăŁăŸă‹ă©ă†ă‹ă«ă‹ă‹ă‚ă‚‰ăšă€ç”‚äș†ă‚čテップをçąșćźŸă«ćźŸèĄŒă™ă‚‹ă“ăšăŒă§ăăŸă™ă€‚ ```Python hl_lines="3 5" -{!../../../docs_src/dependencies/tutorial007.py!} +{!../../docs_src/dependencies/tutorial007.py!} ``` ## `yield`ă‚’æŒă€ă‚”ăƒ–äŸć­˜é–ąäż‚ @@ -88,7 +88,7 @@ pip install async-exit-stack async-generator äŸ‹ăˆă°ă€`dependency_c`は`dependency_b`ず`dependency_b`ă«äŸć­˜ă™ă‚‹`dependency_a`ă«ă€äŸć­˜ă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="4 12 20" -{!../../../docs_src/dependencies/tutorial008.py!} +{!../../docs_src/dependencies/tutorial008.py!} ``` そしど、それらはすăčお`yield`ă‚’äœżç”šă™ă‚‹ă“ăšăŒă§ăăŸă™ă€‚ @@ -98,7 +98,7 @@ pip install async-exit-stack async-generator そしど、`dependency_b`は`dependency_a`ïŒˆă“ă“ă§ăŻ`dep_a`ăšă„ă†ćć‰ïŒ‰ăźć€€ă‚’ç”‚äș†ă‚łăƒŒăƒ‰ă§ćˆ©ç”šă§ăă‚‹ă‚ˆă†ă«ă™ă‚‹ćż…èŠăŒă‚ă‚ŠăŸă™ă€‚ ```Python hl_lines="16 17 24 25" -{!../../../docs_src/dependencies/tutorial008.py!} +{!../../docs_src/dependencies/tutorial008.py!} ``` ćŒæ§˜ă«ă€`yield`ず`return`ăŒæ··ćœšă—ăŸäŸć­˜é–ąäż‚ă‚’æŒă€ă“ăšă‚‚ă§ăăŸă™ă€‚ @@ -234,7 +234,7 @@ Pythonでは、`typing.Union`ă‚’äœżç”šă—ăŸă™: ```Python hl_lines="1 14 15 18 19 20 33" -{!../../../docs_src/extra_models/tutorial003.py!} +{!../../docs_src/extra_models/tutorial003.py!} ``` ## ăƒąăƒ‡ăƒ«ăźăƒȘă‚čト @@ -179,7 +179,7 @@ OpenAPIでは`anyOf`ă§ćźšçŸ©ă•ă‚ŒăŸă™ă€‚ ăăźăŸă‚ă«ăŻă€æš™æș–たPythonた`typing.List`ă‚’äœżç”šă™ă‚‹: ```Python hl_lines="1 20" -{!../../../docs_src/extra_models/tutorial004.py!} +{!../../docs_src/extra_models/tutorial004.py!} ``` ## ä»»æ„ăź`dict`ă‚’æŒă€ăƒŹă‚čポンă‚č @@ -191,7 +191,7 @@ OpenAPIでは`anyOf`ă§ćźšçŸ©ă•ă‚ŒăŸă™ă€‚ こぼ栮搈、`typing.Dict`ă‚’äœżç”šă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="1 8" -{!../../../docs_src/extra_models/tutorial005.py!} +{!../../docs_src/extra_models/tutorial005.py!} ``` ## ăŸăšă‚ diff --git a/docs/ja/docs/tutorial/first-steps.md b/docs/ja/docs/tutorial/first-steps.md index dbe8e4518..77f3b5fbe 100644 --- a/docs/ja/docs/tutorial/first-steps.md +++ b/docs/ja/docs/tutorial/first-steps.md @@ -3,7 +3,7 @@ æœ€ă‚‚ă‚·ăƒłăƒ—ăƒ«ăȘFastAPIăƒ•ă‚Ąă‚€ăƒ«ăŻä»„äž‹ăźă‚ˆă†ă«ăȘă‚ŠăŸă™: ```Python -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` これを`main.py`ă«ă‚łăƒ”ăƒŒă—ăŸă™ă€‚ @@ -134,7 +134,7 @@ OpenAPIă‚čă‚­ăƒŒăƒžăŻă€FastAPIă«ć«ăŸă‚ŒăŠă„ă‚‹2ă€ăźă‚€ăƒłă‚żăƒ©ă‚Żăƒ† ### Step 1: `FastAPI`ă‚’ă‚€ăƒłăƒăƒŒăƒˆ ```Python hl_lines="1" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` `FastAPI`は、APIぼすăčăŠăźæ©Ÿèƒœă‚’æäŸ›ă™ă‚‹Pythonă‚Żăƒ©ă‚čです。 @@ -150,7 +150,7 @@ OpenAPIă‚čă‚­ăƒŒăƒžăŻă€FastAPIă«ć«ăŸă‚ŒăŠă„ă‚‹2ă€ăźă‚€ăƒłă‚żăƒ©ă‚Żăƒ† ### Step 2: `FastAPI`ăźă€Œă‚€ăƒłă‚čタンă‚čă€ă‚’ç”Ÿæˆ ```Python hl_lines="3" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` ここで、`app`ć€‰æ•°ăŒ`FastAPI`ă‚Żăƒ©ă‚čăźă€Œă‚€ăƒłă‚čタンă‚čă€ă«ăȘă‚ŠăŸă™ă€‚ @@ -171,7 +171,7 @@ $ uvicorn main:app --reload ä»„äž‹ăźă‚ˆă†ăȘケプăƒȘă‚’äœœæˆă—ăŸăšă: ```Python hl_lines="3" -{!../../../docs_src/first_steps/tutorial002.py!} +{!../../docs_src/first_steps/tutorial002.py!} ``` そしど、それを`main.py`ăƒ•ă‚Ąă‚€ăƒ«ă«çœźăă€æŹĄăźă‚ˆă†ă«`uvicorn`ă‚’ć‘Œăłć‡șă—ăŸă™: @@ -250,7 +250,7 @@ APIă‚’æ§‹çŻ‰ă™ă‚‹ăšăăŻă€é€šćžžă€ă“ă‚Œă‚‰ăźç‰č漚ぼHTTPăƒĄă‚œăƒƒăƒ‰ă‚’ #### *パă‚čă‚ȘăƒšăƒŹăƒŒă‚·ăƒ§ăƒłăƒ‡ă‚łăƒŹăƒŒă‚ż*ă‚’ćźšçŸ© ```Python hl_lines="6" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` `@app.get("/")`ăŻç›Žäž‹ăźé–ąæ•°ăŒäž‹èš˜ăźăƒȘクスă‚čăƒˆăźć‡Šç†ă‚’æ‹…ćœ“ă™ă‚‹ă“ăšă‚’**FastAPI**ă«äŒăˆăŸă™: @@ -305,7 +305,7 @@ Pythonにおける`@something`ă‚·ăƒłă‚żăƒƒă‚Żă‚čăŻăƒ‡ă‚łăƒŹăƒŒă‚żăšć‘Œă°ă‚Œ * **é–ąæ•°**: ă€Œăƒ‡ă‚łăƒŹăƒŒă‚żă€ăźç›Žäž‹ă«ă‚ă‚‹é–ąæ•° (`@app.get("/")`ぼ目例) です。 ```Python hl_lines="7" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` これは、Pythonăźé–ąæ•°ă§ă™ă€‚ @@ -319,7 +319,7 @@ Pythonにおける`@something`ă‚·ăƒłă‚żăƒƒă‚Żă‚čăŻăƒ‡ă‚łăƒŹăƒŒă‚żăšć‘Œă°ă‚Œ `async def`ăźä»Łă‚ă‚Šă«é€šćžžăźé–ąæ•°ăšă—ăŠćźšçŸ©ă™ă‚‹ă“ăšă‚‚ă§ăăŸă™: ```Python hl_lines="7" -{!../../../docs_src/first_steps/tutorial003.py!} +{!../../docs_src/first_steps/tutorial003.py!} ``` /// note | "ć‚™è€ƒ" @@ -331,7 +331,7 @@ Pythonにおける`@something`ă‚·ăƒłă‚żăƒƒă‚Żă‚čăŻăƒ‡ă‚łăƒŹăƒŒă‚żăšć‘Œă°ă‚Œ ### Step 5: ă‚łăƒłăƒ†ăƒłăƒ„ăźèż”äżĄ ```Python hl_lines="8" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` `dict`、`list`、`str`、`int`ăȘă©ă‚’èż”ă™ă“ăšăŒă§ăăŸă™ă€‚ diff --git a/docs/ja/docs/tutorial/handling-errors.md b/docs/ja/docs/tutorial/handling-errors.md index 8be054858..e94f16b21 100644 --- a/docs/ja/docs/tutorial/handling-errors.md +++ b/docs/ja/docs/tutorial/handling-errors.md @@ -26,7 +26,7 @@ HTTPハă‚čポンă‚čă‚’ă‚šăƒ©ăƒŒă§ă‚Żăƒ©ă‚€ă‚ąăƒłăƒˆă«èż”ă™ă«ăŻă€`HTTPExcep ### `HTTPException`ăźă‚€ăƒłăƒăƒŒăƒˆ ```Python hl_lines="1" -{!../../../docs_src/handling_errors/tutorial001.py!} +{!../../docs_src/handling_errors/tutorial001.py!} ``` ### ă‚łăƒŒăƒ‰ć†…ă§ăź`HTTPException`たç™ș生 @@ -42,7 +42,7 @@ PythonăźäŸ‹ć€–ăȘぼで、`return`ではăȘく、`raise`です。 ă“ăźäŸ‹ă§ăŻă€ă‚Żăƒ©ă‚€ă‚ąăƒłăƒˆăŒć­˜ćœšă—ăȘいIDă§ă‚ąă‚€ăƒ†ăƒ ă‚’èŠæ±‚ă—ăŸć Žćˆă€`404`たă‚čăƒ†ăƒŒă‚żă‚čă‚łăƒŒăƒ‰ă‚’æŒă€äŸ‹ć€–ă‚’ç™șç”Ÿă•ă›ăŸă™: ```Python hl_lines="11" -{!../../../docs_src/handling_errors/tutorial001.py!} +{!../../docs_src/handling_errors/tutorial001.py!} ``` ### ハă‚čポンă‚č甐果 @@ -82,7 +82,7 @@ PythonăźäŸ‹ć€–ăȘぼで、`return`ではăȘく、`raise`です。 ă—ă‹ă—ă€é«˜ćșŠăȘă‚·ăƒŠăƒȘă‚ȘăźăŸă‚ă«ćż…èŠăȘć Žćˆă«ăŻă€ă‚«ă‚čă‚żăƒ ăƒ˜ăƒƒăƒ€ăƒŒă‚’èżœćŠ ă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="14" -{!../../../docs_src/handling_errors/tutorial002.py!} +{!../../docs_src/handling_errors/tutorial002.py!} ``` ## ă‚«ă‚čă‚żăƒ äŸ‹ć€–ăƒăƒłăƒ‰ăƒ©ăźă‚€ăƒłă‚čăƒˆăƒŒăƒ« @@ -96,7 +96,7 @@ PythonăźäŸ‹ć€–ăȘぼで、`return`ではăȘく、`raise`です。 ă‚«ă‚čă‚żăƒ äŸ‹ć€–ăƒăƒłăƒ‰ăƒ©ă‚’`@app.exception_handler()`ă§èżœćŠ ă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="5 6 7 13 14 15 16 17 18 24" -{!../../../docs_src/handling_errors/tutorial003.py!} +{!../../docs_src/handling_errors/tutorial003.py!} ``` ここで、`/unicorns/yolo`をăƒȘクスă‚čトするべ、*path operation*は`UnicornException`を`raise`ă—ăŸă™ă€‚ @@ -136,7 +136,7 @@ PythonăźäŸ‹ć€–ăȘぼで、`return`ではăȘく、`raise`です。 ă“ăźäŸ‹ć€–ăƒăƒłăƒ‰ăƒ©ăŻ`Requset`ăšäŸ‹ć€–ă‚’ć—ă‘ć–ă‚ŠăŸă™ă€‚ ```Python hl_lines="2 14 15 16" -{!../../../docs_src/handling_errors/tutorial004.py!} +{!../../docs_src/handling_errors/tutorial004.py!} ``` これで、`/items/foo`にスクセă‚čă™ă‚‹ăšă€ăƒ‡ăƒ•ă‚©ăƒ«ăƒˆăźJSONă‚šăƒ©ăƒŒăźä»Łă‚ă‚Šă«ä»„äž‹ăŒèż”ă•ă‚ŒăŸă™: @@ -189,7 +189,7 @@ path -> item_id äŸ‹ăˆă°ă€ă“ă‚Œă‚‰ăźă‚šăƒ©ăƒŒă«ćŻŸă—ăŠăŻă€JSONではăȘăăƒ—ăƒŹăƒŒăƒłăƒ†ă‚­ă‚čăƒˆă‚’èż”ă™ă‚ˆă†ă«ă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="3 4 9 10 11 22" -{!../../../docs_src/handling_errors/tutorial004.py!} +{!../../docs_src/handling_errors/tutorial004.py!} ``` /// note | "æŠ€èĄ“è©łçŽ°" @@ -207,7 +207,7 @@ path -> item_id ケプăƒȘ開ç™șäž­ă«æœŹäœ“ăźăƒ­ă‚°ă‚’ć–ăŁăŠăƒ‡ăƒăƒƒă‚°ă—ăŸă‚Šă€ăƒŠăƒŒă‚¶ăƒŒă«èż”ă—ăŸă‚ŠăȘă©ă«äœżç”šă™ă‚‹ă“ăšăŒă§ăăŸă™ă€‚ ```Python hl_lines="14" -{!../../../docs_src/handling_errors/tutorial005.py!} +{!../../docs_src/handling_errors/tutorial005.py!} ``` ă“ă“ă§ă€ä»„äž‹ăźă‚ˆă†ăȘ無ćŠčăȘ項盼を送信しどみどください: @@ -269,7 +269,7 @@ from starlette.exceptions import HTTPException as StarletteHTTPException ăƒ‡ăƒ•ă‚©ăƒ«ăƒˆăźäŸ‹ć€–ăƒăƒłăƒ‰ăƒ©ă‚’`fastapi.exception_handlers`ă‹ă‚‰ă‚€ăƒłăƒăƒŒăƒˆă—ăŠć†ćˆ©ç”šă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="2 3 4 5 15 21" -{!../../../docs_src/handling_errors/tutorial006.py!} +{!../../docs_src/handling_errors/tutorial006.py!} ``` ă“ăźäŸ‹ă§ăŻă€éžćžžă«èĄšçŸćŠ›ăźă‚ă‚‹ăƒĄăƒƒă‚»ăƒŒă‚žă§ă‚šăƒ©ăƒŒă‚’`print`ă—ăŠă„ăŸă™ă€‚ diff --git a/docs/ja/docs/tutorial/header-params.md b/docs/ja/docs/tutorial/header-params.md index 4fab3d423..3180b78b5 100644 --- a/docs/ja/docs/tutorial/header-params.md +++ b/docs/ja/docs/tutorial/header-params.md @@ -7,7 +7,7 @@ ăŸăšă€`Header`ă‚’ă‚€ăƒłăƒăƒŒăƒˆă—ăŸă™: ```Python hl_lines="3" -{!../../../docs_src/header_params/tutorial001.py!} +{!../../docs_src/header_params/tutorial001.py!} ``` ## `Header`ăźăƒ‘ăƒ©ăƒĄăƒŒă‚żăźćźŁèš€ @@ -17,7 +17,7 @@ æœ€ćˆăźć€€ăŒăƒ‡ăƒ•ă‚©ăƒ«ăƒˆć€€ă§ă€èżœćŠ ăźæ€œèšŒăƒ‘ăƒ©ăƒĄăƒŒă‚żă‚„æłšé‡ˆăƒ‘ăƒ©ăƒĄăƒŒă‚żă‚’ă™ăčăŠæžĄă™ă“ăšăŒă§ăăŸă™ă€‚ ```Python hl_lines="9" -{!../../../docs_src/header_params/tutorial001.py!} +{!../../docs_src/header_params/tutorial001.py!} ``` /// note | "æŠ€èĄ“è©łçŽ°" @@ -51,7 +51,7 @@ もしăȘă‚“ă‚‰ă‹ăźç†ç”±ă§ă‚ąăƒłăƒ€ăƒŒă‚čă‚łă‚ąă‹ă‚‰ăƒă‚€ăƒ•ăƒłăžăźè‡Șć‹•ć€‰æ›ă‚’ç„ĄćŠčă«ă™ă‚‹ćż…èŠăŒă‚ă‚‹ć ŽćˆăŻă€`Header`た`convert_underscores`に`False`ă‚’èš­ćźšă—ăŠăă ă•ă„: ```Python hl_lines="9" -{!../../../docs_src/header_params/tutorial002.py!} +{!../../docs_src/header_params/tutorial002.py!} ``` /// warning | "æłšæ„" @@ -71,7 +71,7 @@ äŸ‹ăˆă°ă€è€‡æ•°ć›žć‡șçŸă™ă‚‹ćŻèƒœæ€§ăźă‚ă‚‹`X-Token`ăźăƒ˜ăƒƒăƒ€ă‚’ćźšçŸ©ă™ă‚‹ă«ăŻă€ä»„äž‹ăźă‚ˆă†ă«æ›žăă“ăšăŒă§ăăŸă™: ```Python hl_lines="9" -{!../../../docs_src/header_params/tutorial003.py!} +{!../../docs_src/header_params/tutorial003.py!} ``` もし、そぼ*path operation*ă§é€šäżĄă™ă‚‹ć ŽćˆăŻă€æŹĄăźă‚ˆă†ă«ïŒ’ă€ăźHTTPăƒ˜ăƒƒăƒ€ăƒŒă‚’é€äżĄă—ăŸă™: diff --git a/docs/ja/docs/tutorial/metadata.md b/docs/ja/docs/tutorial/metadata.md index eb85dc389..8285b479e 100644 --- a/docs/ja/docs/tutorial/metadata.md +++ b/docs/ja/docs/tutorial/metadata.md @@ -14,7 +14,7 @@ ă“ă‚Œă‚‰ă‚’èš­ćźšă™ă‚‹ă«ăŻă€ăƒ‘ăƒ©ăƒĄăƒŒă‚ż `title`、`description`、`version` ă‚’äœżç”šă—ăŸă™: ```Python hl_lines="4-6" -{!../../../docs_src/metadata/tutorial001.py!} +{!../../docs_src/metadata/tutorial001.py!} ``` ă“ăźèš­ćźšă§ăŻă€è‡Ș拕APIăƒ‰ă‚­ăƒ„ăƒĄăƒłăƒˆăŻä»„äž‹ăźæ§˜ă«ăȘă‚ŠăŸă™: @@ -42,7 +42,7 @@ ă‚żă‚°ăźăŸă‚ăźăƒĄă‚żăƒ‡ăƒŒă‚żă‚’äœœæˆă—ă€ăă‚Œă‚’ `openapi_tags` ăƒ‘ăƒ©ăƒĄăƒŒă‚żă«æžĄă—ăŸă™ă€‚ ```Python hl_lines="3-16 18" -{!../../../docs_src/metadata/tutorial004.py!} +{!../../docs_src/metadata/tutorial004.py!} ``` èȘŹæ˜Žæ–‡ (description) た䞭で Markdown ă‚’äœżç”šă§ăă‚‹ă“ăšă«æłšæ„ă—ăŠăă ă•ă„ă€‚ăŸăšăˆă°ă€ă€Œlogin」はć€Ș歗 (**login**) ă§èĄšç€șされ、「fancyă€ăŻæ–œäœ“ (_fancy_) ă§èĄšç€șă•ă‚ŒăŸă™ă€‚ @@ -58,7 +58,7 @@ `tags` ăƒ‘ăƒ©ăƒĄăƒŒă‚żăƒŒă‚’äœżç”šă—ăŠă€ăă‚Œăžă‚Œăź *path operations* (および `APIRouter`) を異ăȘるタグにć‰Čă‚Šćœ“ăŠăŸă™: ```Python hl_lines="21 26" -{!../../../docs_src/metadata/tutorial004.py!} +{!../../docs_src/metadata/tutorial004.py!} ``` /// info | "æƒ…ć ±" @@ -88,7 +88,7 @@ たべえば、`/api/v1/openapi.json` ă§æäŸ›ă•ă‚Œă‚‹ă‚ˆă†ă«èš­ćźšă™ă‚‹ă«ăŻ: ```Python hl_lines="3" -{!../../../docs_src/metadata/tutorial002.py!} +{!../../docs_src/metadata/tutorial002.py!} ``` OpenAPIă‚čă‚­ăƒŒăƒžă‚’ćźŒć…šă«ç„ĄćŠčă«ă™ă‚‹ć ŽćˆăŻă€`openapi_url=None` ă‚’èš­ćźšă§ăăŸă™ă€‚ă“ă‚Œă«ă‚ˆă‚Šă€ăă‚Œă‚’äœżç”šă™ă‚‹ăƒ‰ă‚­ăƒ„ăƒĄăƒłăƒˆUIも無ćŠčにăȘă‚ŠăŸă™ă€‚ @@ -107,5 +107,5 @@ OpenAPIă‚čă‚­ăƒŒăƒžă‚’ćźŒć…šă«ç„ĄćŠčă«ă™ă‚‹ć ŽćˆăŻă€`openapi_url=None` を たべえば、`/documentation` でSwagger UIăŒæäŸ›ă•ă‚Œă‚‹ă‚ˆă†ă«èš­ćźšă—ă€ReDocを無ćŠčにするには: ```Python hl_lines="3" -{!../../../docs_src/metadata/tutorial003.py!} +{!../../docs_src/metadata/tutorial003.py!} ``` diff --git a/docs/ja/docs/tutorial/middleware.md b/docs/ja/docs/tutorial/middleware.md index 05e1b7a8c..f4a503720 100644 --- a/docs/ja/docs/tutorial/middleware.md +++ b/docs/ja/docs/tutorial/middleware.md @@ -32,7 +32,7 @@ * ăăźćŸŒă€`response` ă‚’èż”ă™ć‰ă«ă•ă‚‰ă« `response` ă‚’ć€‰æ›Žă™ă‚‹ă“ăšă‚‚ă§ăăŸă™ă€‚ ```Python hl_lines="8-9 11 14" -{!../../../docs_src/middleware/tutorial001.py!} +{!../../docs_src/middleware/tutorial001.py!} ``` /// tip | "豆矄識" @@ -60,7 +60,7 @@ äŸ‹ăˆă°ă€ăƒȘクスă‚čトぼ懩理べレă‚čポンă‚čăźç”Ÿæˆă«ă‹ă‹ăŁăŸç§’æ•°ă‚’ć«ă‚€ă‚«ă‚čă‚żăƒ ăƒ˜ăƒƒăƒ€ăƒŒ `X-Process-Time` ă‚’èżœćŠ ă§ăăŸă™: ```Python hl_lines="10 12-13" -{!../../../docs_src/middleware/tutorial001.py!} +{!../../docs_src/middleware/tutorial001.py!} ``` ## ăăźä»–ăźăƒŸăƒ‰ăƒ«ă‚Šă‚§ă‚ą diff --git a/docs/ja/docs/tutorial/path-operation-configuration.md b/docs/ja/docs/tutorial/path-operation-configuration.md index def12bd08..7eceb377d 100644 --- a/docs/ja/docs/tutorial/path-operation-configuration.md +++ b/docs/ja/docs/tutorial/path-operation-configuration.md @@ -17,7 +17,7 @@ しかし、それぞれぼç•Șć·ă‚łăƒŒăƒ‰ăŒäœ•ăźăŸă‚ăźă‚‚ăźă‹èŠšăˆăŠă„ăȘい栮搈は、`status`ăźă‚·ăƒ§ăƒŒăƒˆă‚«ăƒƒăƒˆćźšæ•°ă‚’äœżç”šă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="3 17" -{!../../../docs_src/path_operation_configuration/tutorial001.py!} +{!../../docs_src/path_operation_configuration/tutorial001.py!} ``` そぼă‚čăƒ†ăƒŒă‚żă‚čă‚łăƒŒăƒ‰ăŻăƒŹă‚čポンă‚čă§äœżç”šă•ă‚Œă€OpenAPIă‚čă‚­ăƒŒăƒžă«èżœćŠ ă•ă‚ŒăŸă™ă€‚ @@ -35,7 +35,7 @@ `tags`ăƒ‘ăƒ©ăƒĄăƒŒă‚żă‚’`str`た`list`ïŒˆé€šćžžăŻïŒ‘ă€ăź`str`ïŒ‰ăšäž€ç·’ă«æžĄă™ăšă€*path operation*ă«ă‚żă‚°ă‚’èżœćŠ ă§ăăŸă™: ```Python hl_lines="17 22 27" -{!../../../docs_src/path_operation_configuration/tutorial002.py!} +{!../../docs_src/path_operation_configuration/tutorial002.py!} ``` これらはOpenAPIă‚čă‚­ăƒŒăƒžă«èżœćŠ ă•ă‚Œă€è‡Șć‹•ăƒ‰ă‚­ăƒ„ăƒĄăƒłăƒˆăźă‚€ăƒłă‚żăƒŒăƒ•ă‚§ăƒŒă‚čă§äœżç”šă•ă‚ŒăŸă™: @@ -47,7 +47,7 @@ `summary`ず`description`ă‚’èżœćŠ ă§ăăŸă™: ```Python hl_lines="20-21" -{!../../../docs_src/path_operation_configuration/tutorial003.py!} +{!../../docs_src/path_operation_configuration/tutorial003.py!} ``` ## docstringを甹いたèȘŹæ˜Ž @@ -57,7 +57,7 @@ docstringにMarkdownă‚’èš˜èż°ă™ă‚Œă°ă€æ­Łă—ăè§Łé‡ˆă•ă‚ŒăŠèĄšç€șă•ă‚ŒăŸă™ă€‚ïŒˆdocstringăźă‚€ăƒłăƒ‡ăƒłăƒˆă‚’è€ƒæ…źă—ăŠïŒ‰ ```Python hl_lines="19-27" -{!../../../docs_src/path_operation_configuration/tutorial004.py!} +{!../../docs_src/path_operation_configuration/tutorial004.py!} ``` ă“ă‚ŒăŻćŻŸè©±çš„ăƒ‰ă‚­ăƒ„ăƒĄăƒłăƒˆă§äœżç”šă•ă‚ŒăŸă™: @@ -69,7 +69,7 @@ docstringにdeprecatedăšă—ăŠăƒžăƒŒă‚Żă™ă‚‹ćż…èŠăŒă‚ă‚‹ăŒă€ăă‚Œă‚’ć‰Šé™€ă—ăȘい栮搈は、`deprecated`ăƒ‘ăƒ©ăƒĄăƒŒă‚żă‚’æžĄă—ăŸă™: ```Python hl_lines="16" -{!../../../docs_src/path_operation_configuration/tutorial006.py!} +{!../../docs_src/path_operation_configuration/tutorial006.py!} ``` ćŻŸè©±çš„ăƒ‰ă‚­ăƒ„ăƒĄăƒłăƒˆă§ăŻéžæŽšć„šăšæ˜Žèš˜ă•ă‚ŒăŸă™: diff --git a/docs/ja/docs/tutorial/path-params-numeric-validations.md b/docs/ja/docs/tutorial/path-params-numeric-validations.md index 9f0b72585..42fbb2ee2 100644 --- a/docs/ja/docs/tutorial/path-params-numeric-validations.md +++ b/docs/ja/docs/tutorial/path-params-numeric-validations.md @@ -7,7 +7,7 @@ ăŸăšćˆă‚ă«ă€`fastapi`から`Path`ă‚’ă‚€ăƒłăƒăƒŒăƒˆă—ăŸă™: ```Python hl_lines="1" -{!../../../docs_src/path_params_numeric_validations/tutorial001.py!} +{!../../docs_src/path_params_numeric_validations/tutorial001.py!} ``` ## ăƒĄă‚żăƒ‡ăƒŒă‚żăźćźŁèš€ @@ -17,7 +17,7 @@ äŸ‹ăˆă°ă€ăƒ‘ă‚čăƒ‘ăƒ©ăƒĄăƒŒă‚ż`item_id`ă«ćŻŸă—ăŠ`title`ăźăƒĄă‚żăƒ‡ăƒŒă‚żă‚’ćźŁèš€ă™ă‚‹ă«ăŻä»„äž‹ăźă‚ˆă†ă«ă—ăŸă™: ```Python hl_lines="8" -{!../../../docs_src/path_params_numeric_validations/tutorial001.py!} +{!../../docs_src/path_params_numeric_validations/tutorial001.py!} ``` /// note | "ć‚™è€ƒ" @@ -47,7 +47,7 @@ PythonăŻă€Œăƒ‡ăƒ•ă‚©ăƒ«ăƒˆă€ă‚’æŒăŸăȘă„ć€€ăźć‰ă«ă€Œăƒ‡ăƒ•ă‚©ăƒ«ăƒˆă€ ăăźăŸă‚ă€ä»„äž‹ăźă‚ˆă†ă«é–ąæ•°ă‚’ćźŁèš€ă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="8" -{!../../../docs_src/path_params_numeric_validations/tutorial002.py!} +{!../../docs_src/path_params_numeric_validations/tutorial002.py!} ``` ## ćż…èŠă«ćżœă˜ăŠăƒ‘ăƒ©ăƒĄăƒŒă‚żă‚’äžŠăłæ›żăˆă‚‹ăƒˆăƒȘック @@ -59,7 +59,7 @@ PythonăŻă€Œăƒ‡ăƒ•ă‚©ăƒ«ăƒˆă€ă‚’æŒăŸăȘă„ć€€ăźć‰ă«ă€Œăƒ‡ăƒ•ă‚©ăƒ«ăƒˆă€ Pythonはそぼ`*`ă§äœ•ă‹ă‚’ă™ă‚‹ă“ăšăŻă‚ă‚ŠăŸă›ă‚“ăŒă€ăă‚Œä»„é™ăźă™ăčăŠăźăƒ‘ăƒ©ăƒĄăƒŒă‚żăŒă‚­ăƒŒăƒŻăƒŒăƒ‰ćŒ•æ•°ïŒˆă‚­ăƒŒăšć€€ăźăƒšă‚ąïŒ‰ăšă—ăŠć‘Œă°ă‚Œă‚‹ăčăă‚‚ăźă§ă‚ă‚‹ăšçŸ„ăŁăŠă„ă‚‹ă§ă—ă‚‡ă†ă€‚ăă‚ŒăŻkwargsăšă—ăŠă‚‚çŸ„ă‚‰ă‚ŒăŠă„ăŸă™ă€‚ăŸăšăˆăƒ‡ăƒ•ă‚©ăƒ«ăƒˆć€€ăŒăȘくども。 ```Python hl_lines="8" -{!../../../docs_src/path_params_numeric_validations/tutorial003.py!} +{!../../docs_src/path_params_numeric_validations/tutorial003.py!} ``` ## æ•°ć€€ăźæ€œèšŒ: 仄䞊 @@ -69,7 +69,7 @@ Pythonはそぼ`*`ă§äœ•ă‹ă‚’ă™ă‚‹ă“ăšăŻă‚ă‚ŠăŸă›ă‚“ăŒă€ăă‚Œä»„é™ ここで、`ge=1`ぼ栮搈、`item_id`は`1`ă€Œă‚ˆă‚Šć€§ăă„`g`か、搌じ`e`ă€æ•Žæ•°ă§ăȘれけばăȘă‚ŠăŸă›ă‚“ă€‚ ```Python hl_lines="8" -{!../../../docs_src/path_params_numeric_validations/tutorial004.py!} +{!../../docs_src/path_params_numeric_validations/tutorial004.py!} ``` ## æ•°ć€€ăźæ€œèšŒ: ă‚ˆă‚Šć€§ăă„ăšć°ăȘă‚Šă‚€ă‚łăƒŒăƒ« @@ -80,7 +80,7 @@ Pythonはそぼ`*`ă§äœ•ă‹ă‚’ă™ă‚‹ă“ăšăŻă‚ă‚ŠăŸă›ă‚“ăŒă€ăă‚Œä»„é™ * `le`: 氏ăȘă‚Šă‚€ă‚łăƒŒăƒ«ïŒˆ`l`ess than or `e`qual ```Python hl_lines="9" -{!../../../docs_src/path_params_numeric_validations/tutorial005.py!} +{!../../docs_src/path_params_numeric_validations/tutorial005.py!} ``` ## æ•°ć€€ăźæ€œèšŒ: æ”źć‹•ć°æ•°ç‚č、 性ăȘり氏ăȘり @@ -94,7 +94,7 @@ Pythonはそぼ`*`ă§äœ•ă‹ă‚’ă™ă‚‹ă“ăšăŻă‚ă‚ŠăŸă›ă‚“ăŒă€ăă‚Œä»„é™ これはltも搌じです。 ```Python hl_lines="11" -{!../../../docs_src/path_params_numeric_validations/tutorial006.py!} +{!../../docs_src/path_params_numeric_validations/tutorial006.py!} ``` ## ăŸăšă‚ diff --git a/docs/ja/docs/tutorial/path-params.md b/docs/ja/docs/tutorial/path-params.md index 0a7916012..e1cb67a13 100644 --- a/docs/ja/docs/tutorial/path-params.md +++ b/docs/ja/docs/tutorial/path-params.md @@ -3,7 +3,7 @@ Pythonたformatæ–‡ć­—ćˆ—ăšćŒæ§˜ăźă‚·ăƒłă‚żăƒƒă‚Żă‚čで「パă‚čăƒ‘ăƒ©ăƒĄăƒŒă‚żă€ă‚„ă€Œăƒ‘ă‚čć€‰æ•°ă€ă‚’ćźŁèš€ă§ăăŸă™: ```Python hl_lines="6 7" -{!../../../docs_src/path_params/tutorial001.py!} +{!../../docs_src/path_params/tutorial001.py!} ``` パă‚čăƒ‘ăƒ©ăƒĄăƒŒă‚ż `item_id` ăźć€€ăŻă€ćŒ•æ•° `item_id` ăšă—ăŠé–ąæ•°ă«æžĄă•ă‚ŒăŸă™ă€‚ @@ -19,7 +19,7 @@ Pythonたformatæ–‡ć­—ćˆ—ăšćŒæ§˜ăźă‚·ăƒłă‚żăƒƒă‚Żă‚čで「パă‚čăƒ‘ăƒ©ăƒĄăƒŒ æš™æș–たPythonăźćž‹ă‚ąăƒŽăƒ†ăƒŒă‚·ăƒ§ăƒłă‚’äœżç”šă—ăŠă€é–ąæ•°ć†…ăźăƒ‘ă‚čăƒ‘ăƒ©ăƒĄăƒŒă‚żăźćž‹ă‚’ćźŁèš€ă§ăăŸă™: ```Python hl_lines="7" -{!../../../docs_src/path_params/tutorial002.py!} +{!../../docs_src/path_params/tutorial002.py!} ``` ここでは、 `item_id` は `int` ăšă—ăŠćźŁèš€ă•ă‚ŒăŠă„ăŸă™ă€‚ @@ -122,7 +122,7 @@ Pythonたformatæ–‡ć­—ćˆ—ăšćŒæ§˜ăźă‚·ăƒłă‚żăƒƒă‚Żă‚čで「パă‚čăƒ‘ăƒ©ăƒĄăƒŒ *path operations* ăŻé †ă«è©•äŸĄă•ă‚Œă‚‹ăźă§ă€ `/users/me` が `/users/{user_id}` ă‚ˆă‚Šă‚‚ć…ˆă«ćźŁèš€ă•ă‚ŒăŠă„ă‚‹ă‹çąșèȘă™ă‚‹ćż…èŠăŒă‚ă‚ŠăŸă™: ```Python hl_lines="6 11" -{!../../../docs_src/path_params/tutorial003.py!} +{!../../docs_src/path_params/tutorial003.py!} ``` ăă‚Œä»„ć€–ăźć Žćˆă€ `/users/{users_id}` は `/users/me` ăšă—ăŠă‚‚ăƒžăƒƒăƒă—ăŸă™ă€‚ć€€ăŒă€Œ"me"ă€ă§ă‚ă‚‹ăƒ‘ăƒ©ăƒĄăƒŒă‚ż `user_id` ă‚’ć—ă‘ć–ă‚‹ăšă€Œè€ƒăˆă€ăŸă™ă€‚ @@ -140,7 +140,7 @@ Pythonたformatæ–‡ć­—ćˆ—ăšćŒæ§˜ăźă‚·ăƒłă‚żăƒƒă‚Żă‚čで「パă‚čăƒ‘ăƒ©ăƒĄăƒŒ そしど、ć›șćźšć€€ăźă‚Żăƒ©ă‚čć±žæ€§ă‚’äœœă‚ŠăŸă™ă€‚ă™ă‚‹ăšă€ăăźć€€ăŒäœżç”šćŻèƒœăȘ怀ずăȘă‚ŠăŸă™: ```Python hl_lines="1 6 7 8 9" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` /// info | "æƒ…ć ±" @@ -160,7 +160,7 @@ Pythonたformatæ–‡ć­—ćˆ—ăšćŒæ§˜ăźă‚·ăƒłă‚żăƒƒă‚Żă‚čで「パă‚čăƒ‘ăƒ©ăƒĄăƒŒ æŹĄă«ă€äœœæˆă—ăŸenumă‚Żăƒ©ă‚čである`ModelName`ă‚’äœżç”šă—ăŸćž‹ă‚ąăƒŽăƒ†ăƒŒă‚·ăƒ§ăƒłă‚’ă‚‚ă€*パă‚čăƒ‘ăƒ©ăƒĄăƒŒă‚ż*ă‚’äœœæˆă—ăŸă™: ```Python hl_lines="16" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` ### ăƒ‰ă‚­ăƒ„ăƒĄăƒłăƒˆăźçąșèȘ @@ -178,7 +178,7 @@ Pythonたformatæ–‡ć­—ćˆ—ăšćŒæ§˜ăźă‚·ăƒłă‚żăƒƒă‚Żă‚čで「パă‚čăƒ‘ăƒ©ăƒĄăƒŒ ă“ă‚ŒăŻă€äœœæˆă—ăŸćˆ—æŒ™ćž‹ `ModelName` た*ćˆ—æŒ™ćž‹ăƒĄăƒłăƒ*ăšæŻ”èŒƒă§ăăŸă™: ```Python hl_lines="17" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` #### *ćˆ—æŒ™ć€€*ăźć–ćŸ— @@ -186,7 +186,7 @@ Pythonたformatæ–‡ć­—ćˆ—ăšćŒæ§˜ăźă‚·ăƒłă‚żăƒƒă‚Żă‚čで「パă‚čăƒ‘ăƒ©ăƒĄăƒŒ `model_name.value` ă€ă‚‚ă—ăăŻäž€èˆŹă«ă€ `your_enum_member.value` ă‚’äœżç”šă—ăŠćźŸéš›ăźć€€ (こぼ栮搈は `str`) ă‚’ć–ćŸ—ă§ăăŸă™ă€‚ ```Python hl_lines="20" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` /// tip | "豆矄識" @@ -202,7 +202,7 @@ Pythonたformatæ–‡ć­—ćˆ—ăšćŒæ§˜ăźă‚·ăƒłă‚żăƒƒă‚Żă‚čで「パă‚čăƒ‘ăƒ©ăƒĄăƒŒ ăă‚Œă‚‰ăŻă‚Żăƒ©ă‚€ă‚ąăƒłăƒˆă«èż”ă•ă‚Œă‚‹ć‰ă«é©ćˆ‡ăȘ怀 (ă“ăźć ŽćˆăŻæ–‡ć­—ćˆ—) ă«ć€‰æ›ă•ă‚ŒăŸă™ă€‚ ```Python hl_lines="18 21 23" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` ă‚Żăƒ©ă‚€ă‚ąăƒłăƒˆăŻä»„äž‹ăźæ§˜ăȘJSONハă‚čポンă‚čă‚’ćŸ—ăŸă™: @@ -243,7 +243,7 @@ Starletteたă‚Șăƒ—ă‚·ăƒ§ăƒłă‚’ç›ŽæŽ„äœżç”šă™ă‚‹ă“ăšă§ă€ä»„äž‹ăźURLăźæ§˜ ă—ăŸăŒăŁăŠă€ä»„äž‹ăźæ§˜ă«äœżç”šă§ăăŸă™: ```Python hl_lines="6" -{!../../../docs_src/path_params/tutorial004.py!} +{!../../docs_src/path_params/tutorial004.py!} ``` /// tip | "豆矄識" diff --git a/docs/ja/docs/tutorial/query-params-str-validations.md b/docs/ja/docs/tutorial/query-params-str-validations.md index ada048844..9e54a6f55 100644 --- a/docs/ja/docs/tutorial/query-params-str-validations.md +++ b/docs/ja/docs/tutorial/query-params-str-validations.md @@ -5,7 +5,7 @@ ä»„äž‹ăźă‚ąăƒ—ăƒȘă‚±ăƒŒă‚·ăƒ§ăƒłă‚’äŸ‹ă«ă—ăŠăżăŸă—ă‚‡ă†: ```Python hl_lines="9" -{!../../../docs_src/query_params_str_validations/tutorial001.py!} +{!../../docs_src/query_params_str_validations/tutorial001.py!} ``` クスăƒȘăƒ‘ăƒ©ăƒĄăƒŒă‚ż `q` は `Optional[str]` 枋で、`None` ă‚’èš±ćźčする `str` ćž‹ă‚’æ„ć‘łă—ăŠăŠă‚Šă€ăƒ‡ăƒ•ă‚©ăƒ«ăƒˆăŻ `None` です。そぼため、FastAPIはそれが濅須ではăȘă„ăšç†è§Łă—ăŸă™ă€‚ @@ -27,7 +27,7 @@ FastAPIは、 `q` ăŻăƒ‡ăƒ•ă‚©ăƒ«ăƒˆć€€ăŒ `=None` であるため、濅須で ăăźăŸă‚ă«ă€ăŸăšăŻ`fastapi`から`Query`ă‚’ă‚€ăƒłăƒăƒŒăƒˆă—ăŸă™: ```Python hl_lines="3" -{!../../../docs_src/query_params_str_validations/tutorial002.py!} +{!../../docs_src/query_params_str_validations/tutorial002.py!} ``` ## ăƒ‡ăƒ•ă‚©ăƒ«ăƒˆć€€ăšă—ăŠ`Query`ă‚’äœżç”š @@ -35,7 +35,7 @@ FastAPIは、 `q` ăŻăƒ‡ăƒ•ă‚©ăƒ«ăƒˆć€€ăŒ `=None` であるため、濅須で ăƒ‘ăƒ©ăƒĄăƒŒă‚żăźăƒ‡ăƒ•ă‚©ăƒ«ăƒˆć€€ăšă—ăŠäœżç”šă—ă€ăƒ‘ăƒ©ăƒĄăƒŒă‚ż`max_length`を50ă«èš­ćźšă—ăŸă™: ```Python hl_lines="9" -{!../../../docs_src/query_params_str_validations/tutorial002.py!} +{!../../docs_src/query_params_str_validations/tutorial002.py!} ``` ăƒ‡ăƒ•ă‚©ăƒ«ăƒˆć€€`None`を`Query(default=None)`ă«çœźăæ›ăˆă‚‹ćż…èŠăŒă‚ă‚‹ăźă§ă€`Query`ăźæœ€ćˆăźćŒ•æ•°ăŻăƒ‡ăƒ•ă‚©ăƒ«ăƒˆć€€ă‚’ćźšçŸ©ă™ă‚‹ăźăšćŒă˜ă§ă™ă€‚ @@ -87,7 +87,7 @@ q: Union[str, None] = Query(default=None, max_length=50) ăƒ‘ăƒ©ăƒĄăƒŒă‚ż`min_length`ă‚‚èżœćŠ ă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="10" -{!../../../docs_src/query_params_str_validations/tutorial003.py!} +{!../../docs_src/query_params_str_validations/tutorial003.py!} ``` ## æ­ŁèŠèĄšçŸăźèżœćŠ  @@ -95,7 +95,7 @@ q: Union[str, None] = Query(default=None, max_length=50) ăƒ‘ăƒ©ăƒĄăƒŒă‚żăŒäž€è‡Žă™ă‚‹ăčăæ­ŁèŠèĄšçŸă‚’ćźšçŸ©ă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="11" -{!../../../docs_src/query_params_str_validations/tutorial004.py!} +{!../../docs_src/query_params_str_validations/tutorial004.py!} ``` こぼç‰čćźšăźæ­ŁèŠèĄšçŸăŻć—ă‘ć–ăŁăŸăƒ‘ăƒ©ăƒĄăƒŒă‚żăźć€€ă‚’ăƒă‚§ăƒƒă‚Żă—ăŸă™: @@ -115,7 +115,7 @@ q: Union[str, None] = Query(default=None, max_length=50) クスăƒȘăƒ‘ăƒ©ăƒĄăƒŒă‚ż`q`た`min_length`を`3`ăšă—ă€ăƒ‡ăƒ•ă‚©ăƒ«ăƒˆć€€ă‚’`fixedquery`ăšă—ăŠăżăŸă—ă‚‡ă†: ```Python hl_lines="7" -{!../../../docs_src/query_params_str_validations/tutorial005.py!} +{!../../docs_src/query_params_str_validations/tutorial005.py!} ``` /// note | "ć‚™è€ƒ" @@ -147,7 +147,7 @@ q: Union[str, None] = Query(default=None, min_length=3) そぼため、`Query`ă‚’äœżç”šă—ăŠćż…é ˆăźć€€ă‚’ćźŁèš€ă™ă‚‹ćż…èŠăŒă‚ă‚‹ć ŽćˆăŻă€çŹŹäž€ćŒ•æ•°ă«`...`ă‚’äœżç”šă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="7" -{!../../../docs_src/query_params_str_validations/tutorial006.py!} +{!../../docs_src/query_params_str_validations/tutorial006.py!} ``` /// info | "æƒ…ć ±" @@ -165,7 +165,7 @@ q: Union[str, None] = Query(default=None, min_length=3) äŸ‹ăˆă°ă€URLć†…ă«è€‡æ•°ć›žć‡șçŸă™ă‚‹ă‚Żă‚šăƒȘăƒ‘ăƒ©ăƒĄăƒŒă‚ż`q`ă‚’ćźŁèš€ă™ă‚‹ă«ăŻä»„äž‹ăźă‚ˆă†ă«æ›žăăŸă™: ```Python hl_lines="9" -{!../../../docs_src/query_params_str_validations/tutorial011.py!} +{!../../docs_src/query_params_str_validations/tutorial011.py!} ``` そしどURLは仄䞋です: @@ -202,7 +202,7 @@ http://localhost:8000/items/?q=foo&q=bar ăŸăŸă€ć€€ăŒæŒ‡ćźšă•ă‚ŒăŠă„ăȘă„ć ŽćˆăŻăƒ‡ăƒ•ă‚©ăƒ«ăƒˆăź`list`ă‚’ćźšçŸ©ă™ă‚‹ă“ăšă‚‚ă§ăăŸă™ă€‚ ```Python hl_lines="9" -{!../../../docs_src/query_params_str_validations/tutorial012.py!} +{!../../docs_src/query_params_str_validations/tutorial012.py!} ``` 仄䞋たURLを開くべ: @@ -227,7 +227,7 @@ http://localhost:8000/items/ `List[str]`ăźä»Łă‚ă‚Šă«ç›ŽæŽ„`list`ă‚’äœżă†ă“ăšă‚‚ă§ăăŸă™: ```Python hl_lines="7" -{!../../../docs_src/query_params_str_validations/tutorial013.py!} +{!../../docs_src/query_params_str_validations/tutorial013.py!} ``` /// note | "ć‚™è€ƒ" @@ -255,13 +255,13 @@ http://localhost:8000/items/ `title`ă‚’èżœćŠ ă§ăăŸă™: ```Python hl_lines="9" -{!../../../docs_src/query_params_str_validations/tutorial007.py!} +{!../../docs_src/query_params_str_validations/tutorial007.py!} ``` `description`ă‚’èżœćŠ ă§ăăŸă™: ```Python hl_lines="13" -{!../../../docs_src/query_params_str_validations/tutorial008.py!} +{!../../docs_src/query_params_str_validations/tutorial008.py!} ``` ## ゚むăƒȘケă‚čăƒ‘ăƒ©ăƒĄăƒŒă‚ż @@ -283,7 +283,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems それăȘらば、`alias`ă‚’ćźŁèš€ă™ă‚‹ă“ăšăŒă§ăăŸă™ă€‚ă‚šă‚€ăƒȘケă‚čăŻăƒ‘ăƒ©ăƒĄăƒŒă‚żăźć€€ă‚’èŠ‹ă€ă‘ă‚‹ăźă«äœżç”šă•ă‚ŒăŸă™: ```Python hl_lines="9" -{!../../../docs_src/query_params_str_validations/tutorial009.py!} +{!../../docs_src/query_params_str_validations/tutorial009.py!} ``` ## éžæŽšć„šăƒ‘ăƒ©ăƒĄăƒŒă‚ż @@ -295,7 +295,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems そぼ栮搈、`Query`ă«ăƒ‘ăƒ©ăƒĄăƒŒă‚ż`deprecated=True`ă‚’æžĄă—ăŸă™: ```Python hl_lines="18" -{!../../../docs_src/query_params_str_validations/tutorial010.py!} +{!../../docs_src/query_params_str_validations/tutorial010.py!} ``` ăƒ‰ă‚­ăƒ„ăƒĄăƒłăƒˆăŻä»„äž‹ăźă‚ˆă†ă«ăȘă‚ŠăŸă™: diff --git a/docs/ja/docs/tutorial/query-params.md b/docs/ja/docs/tutorial/query-params.md index c0eb2d096..6d41d3742 100644 --- a/docs/ja/docs/tutorial/query-params.md +++ b/docs/ja/docs/tutorial/query-params.md @@ -3,7 +3,7 @@ パă‚čăƒ‘ăƒ©ăƒĄăƒŒă‚żă§ăŻăȘă„é–ąæ•°ăƒ‘ăƒ©ăƒĄăƒŒă‚żă‚’ćźŁèš€ă™ă‚‹ăšă€ăă‚Œă‚‰ăŻè‡Ș拕的に "クスăƒȘ" ăƒ‘ăƒ©ăƒĄăƒŒă‚żăšă—ăŠè§Łé‡ˆă•ă‚ŒăŸă™ă€‚ ```Python hl_lines="9" -{!../../../docs_src/query_params/tutorial001.py!} +{!../../docs_src/query_params/tutorial001.py!} ``` クスăƒȘはURL憅で `?` ăźćŸŒă«ç¶šăă‚­ăƒŒăšăƒăƒȘăƒ„ăƒŒăźç”„ă§ă€ `&` でćŒșćˆ‡ă‚‰ă‚ŒăŠă„ăŸă™ă€‚ @@ -64,7 +64,7 @@ http://127.0.0.1:8000/items/?skip=20 ćŒæ§˜ă«ă€ăƒ‡ăƒ•ă‚©ăƒ«ăƒˆć€€ă‚’ `None` べするこべで、ă‚Șăƒ—ă‚·ăƒ§ăƒŠăƒ«ăȘクスăƒȘăƒ‘ăƒ©ăƒĄăƒŒă‚żă‚’ćźŁèš€ă§ăăŸă™: ```Python hl_lines="9" -{!../../../docs_src/query_params/tutorial002.py!} +{!../../docs_src/query_params/tutorial002.py!} ``` ă“ăźć Žćˆă€é–ąæ•°ăƒ‘ăƒ©ăƒĄăƒŒă‚ż `q` はă‚Șăƒ—ă‚·ăƒ§ăƒŠăƒ«ăšăȘă‚Šă€ăƒ‡ăƒ•ă‚©ăƒ«ăƒˆă§ăŻ `None` にăȘă‚ŠăŸă™ă€‚ @@ -80,7 +80,7 @@ http://127.0.0.1:8000/items/?skip=20 `bool` ćž‹ă‚‚ćźŁèš€ă§ăăŸă™ă€‚ă“ă‚ŒăŻä»„äž‹ăźæ§˜ă«ć€‰æ›ă•ă‚ŒăŸă™: ```Python hl_lines="9" -{!../../../docs_src/query_params/tutorial003.py!} +{!../../docs_src/query_params/tutorial003.py!} ``` ă“ăźć Žćˆă€ä»„äž‹ă«ă‚ąă‚Żă‚»ă‚čするべ: @@ -124,7 +124,7 @@ http://127.0.0.1:8000/items/foo?short=yes ćć‰ă§ćˆ€ćˆ„ă•ă‚ŒăŸă™: ```Python hl_lines="8 10" -{!../../../docs_src/query_params/tutorial004.py!} +{!../../docs_src/query_params/tutorial004.py!} ``` ## 濅須ぼクスăƒȘăƒ‘ăƒ©ăƒĄăƒŒă‚ż @@ -136,7 +136,7 @@ http://127.0.0.1:8000/items/foo?short=yes しかしクスăƒȘăƒ‘ăƒ©ăƒĄăƒŒă‚żă‚’ćż…é ˆă«ă—ăŸă„ć ŽćˆăŻă€ăŸă ăƒ‡ăƒ•ă‚©ăƒ«ăƒˆć€€ă‚’ćźŁèš€ă—ăȘければよいです: ```Python hl_lines="6-7" -{!../../../docs_src/query_params/tutorial005.py!} +{!../../docs_src/query_params/tutorial005.py!} ``` ここで、クスăƒȘăƒ‘ăƒ©ăƒĄăƒŒă‚ż `needy` は `str` 枋ぼ濅須ぼクスăƒȘăƒ‘ăƒ©ăƒĄăƒŒă‚żă§ă™ @@ -182,7 +182,7 @@ http://127.0.0.1:8000/items/foo-item?needy=sooooneedy ăă—ăŠćœ“ç„¶ă€ă‚ă‚‹ăƒ‘ăƒ©ăƒĄăƒŒă‚żă‚’ćż…é ˆă«ă€ćˆ„ăźăƒ‘ăƒ©ăƒĄăƒŒă‚żă«ăƒ‡ăƒ•ă‚©ăƒ«ăƒˆć€€ă‚’èš­ćźšă—ă€ăŸăŸćˆ„ăźăƒ‘ăƒ©ăƒĄăƒŒă‚żă‚’ă‚Șăƒ—ă‚·ăƒ§ăƒŠăƒ«ă«ă§ăăŸă™: ```Python hl_lines="10" -{!../../../docs_src/query_params/tutorial006.py!} +{!../../docs_src/query_params/tutorial006.py!} ``` こぼ栮搈、3぀たク゚ăƒȘăƒ‘ăƒ©ăƒĄăƒŒă‚żăŒă‚ă‚ŠăŸă™ă€‚: diff --git a/docs/ja/docs/tutorial/request-forms-and-files.md b/docs/ja/docs/tutorial/request-forms-and-files.md index d8effc219..e03b9166d 100644 --- a/docs/ja/docs/tutorial/request-forms-and-files.md +++ b/docs/ja/docs/tutorial/request-forms-and-files.md @@ -13,7 +13,7 @@ ## `File`ず`Form`ăźă‚€ăƒłăƒăƒŒăƒˆ ```Python hl_lines="1" -{!../../../docs_src/request_forms_and_files/tutorial001.py!} +{!../../docs_src/request_forms_and_files/tutorial001.py!} ``` ## `File`ず`Form`ăźăƒ‘ăƒ©ăƒĄăƒŒă‚żăźćźšçŸ© @@ -21,7 +21,7 @@ ăƒ•ă‚Ąă‚€ăƒ«ă‚„ăƒ•ă‚©ăƒŒăƒ ăźăƒ‘ăƒ©ăƒĄăƒŒă‚żăŻ`Body`や`Query`ăźć ŽćˆăšćŒă˜ă‚ˆă†ă«äœœæˆă—ăŸă™: ```Python hl_lines="8" -{!../../../docs_src/request_forms_and_files/tutorial001.py!} +{!../../docs_src/request_forms_and_files/tutorial001.py!} ``` ăƒ•ă‚Ąă‚€ăƒ«ăšăƒ•ă‚©ăƒŒăƒ ăƒ•ă‚ŁăƒŒăƒ«ăƒ‰ăŒăƒ•ă‚©ăƒŒăƒ ăƒ‡ăƒŒă‚żăšă—ăŠă‚ąăƒƒăƒ—ăƒ­ăƒŒăƒ‰ă•ă‚Œă€ăƒ•ă‚Ąă‚€ăƒ«ăšăƒ•ă‚©ăƒŒăƒ ăƒ•ă‚ŁăƒŒăƒ«ăƒ‰ă‚’ć—ă‘ć–ă‚ŠăŸă™ă€‚ diff --git a/docs/ja/docs/tutorial/request-forms.md b/docs/ja/docs/tutorial/request-forms.md index d04dc810b..eb453c04a 100644 --- a/docs/ja/docs/tutorial/request-forms.md +++ b/docs/ja/docs/tutorial/request-forms.md @@ -15,7 +15,7 @@ JSONăźä»Łă‚ă‚Šă«ăƒ•ă‚ŁăƒŒăƒ«ăƒ‰ă‚’ć—ă‘ć–ă‚‹ć ŽćˆăŻă€`Form`ă‚’äœżç”šă— `fastapi`から`Form`ă‚’ă‚€ăƒłăƒăƒŒăƒˆă—ăŸă™: ```Python hl_lines="1" -{!../../../docs_src/request_forms/tutorial001.py!} +{!../../docs_src/request_forms/tutorial001.py!} ``` ## `Form`ăźăƒ‘ăƒ©ăƒĄăƒŒă‚żăźćźšçŸ© @@ -23,7 +23,7 @@ JSONăźä»Łă‚ă‚Šă«ăƒ•ă‚ŁăƒŒăƒ«ăƒ‰ă‚’ć—ă‘ć–ă‚‹ć ŽćˆăŻă€`Form`ă‚’äœżç”šă— `Body`や`Query`ăźć ŽćˆăšćŒă˜ă‚ˆă†ă«ăƒ•ă‚©ăƒŒăƒ ăƒ‘ăƒ©ăƒĄăƒŒă‚żă‚’äœœæˆă—ăŸă™: ```Python hl_lines="7" -{!../../../docs_src/request_forms/tutorial001.py!} +{!../../docs_src/request_forms/tutorial001.py!} ``` äŸ‹ăˆă°ă€OAuth2ä»•æ§˜ăŒäœżç”šă§ăă‚‹æ–čæł•ăźïŒ‘ă€ïŒˆă€Œăƒ‘ă‚čăƒŻăƒŒăƒ‰ăƒ•ăƒ­ăƒŒă€ăšć‘Œă°ă‚Œă‚‹ïŒ‰ă§ăŻă€ăƒ•ă‚©ăƒŒăƒ ăƒ•ă‚ŁăƒŒăƒ«ăƒ‰ăšă—ăŠ`username`ず`password`ă‚’é€äżĄă™ă‚‹ćż…èŠăŒă‚ă‚ŠăŸă™ă€‚ diff --git a/docs/ja/docs/tutorial/response-model.md b/docs/ja/docs/tutorial/response-model.md index 7bb5e2825..973f893de 100644 --- a/docs/ja/docs/tutorial/response-model.md +++ b/docs/ja/docs/tutorial/response-model.md @@ -9,7 +9,7 @@ * ăȘど。 ```Python hl_lines="17" -{!../../../docs_src/response_model/tutorial001.py!} +{!../../docs_src/response_model/tutorial001.py!} ``` /// note | "ć‚™è€ƒ" @@ -42,13 +42,13 @@ FastAPIは`response_model`ă‚’äœżăŁăŠä»„äž‹ăźă“ăšă‚’ă—ăŸă™: ここでは`UserIn`ăƒąăƒ‡ăƒ«ă‚’ćźŁèš€ă—ăŠă„ăŸă™ă€‚ăă‚Œă«ăŻćčłæ–‡ăźăƒ‘ă‚čăƒŻăƒŒăƒ‰ăŒć«ăŸă‚ŒăŠă„ăŸă™: ```Python hl_lines="9 11" -{!../../../docs_src/response_model/tutorial002.py!} +{!../../docs_src/response_model/tutorial002.py!} ``` ăă—ăŠă€ă“ăźăƒąăƒ‡ăƒ«ă‚’äœżç”šă—ăŠć…„ćŠ›ă‚’ćźŁèš€ă—ă€ćŒă˜ăƒąăƒ‡ăƒ«ă‚’äœżăŁăŠć‡șćŠ›ă‚’ćźŁèš€ă—ăŠă„ăŸă™: ```Python hl_lines="17 18" -{!../../../docs_src/response_model/tutorial002.py!} +{!../../docs_src/response_model/tutorial002.py!} ``` ă“ă‚Œă§ă€ăƒ–ăƒ©ă‚Šă‚¶ăŒăƒ‘ă‚čăƒŻăƒŒăƒ‰ă‚’äœżăŁăŠăƒŠăƒŒă‚¶ăƒŒă‚’äœœæˆă™ă‚‹éš›ă«ă€APIがレă‚čポンă‚čで搌じパă‚čăƒŻăƒŒăƒ‰ă‚’èż”ă™ă‚ˆă†ă«ăȘă‚ŠăŸă—ăŸă€‚ @@ -68,19 +68,19 @@ FastAPIは`response_model`ă‚’äœżăŁăŠä»„äž‹ăźă“ăšă‚’ă—ăŸă™: ä»Łă‚ă‚Šă«ă€ćčłæ–‡ăźăƒ‘ă‚čăƒŻăƒŒăƒ‰ă‚’æŒă€ć…„ćŠ›ăƒąăƒ‡ăƒ«ăšă€ăƒ‘ă‚čăƒŻăƒŒăƒ‰ă‚’æŒăŸăȘいć‡șćŠ›ăƒąăƒ‡ăƒ«ă‚’äœœæˆă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="9 11 16" -{!../../../docs_src/response_model/tutorial003.py!} +{!../../docs_src/response_model/tutorial003.py!} ``` ここでは、*path operationé–ąæ•°*がパă‚čăƒŻăƒŒăƒ‰ă‚’ć«ă‚€ćŒă˜ć…„ćŠ›ăƒŠăƒŒă‚¶ăƒŒă‚’èż”ă—ăŠă„ă‚‹ă«ă‚‚ă‹ă‹ă‚ă‚‰ăš: ```Python hl_lines="24" -{!../../../docs_src/response_model/tutorial003.py!} +{!../../docs_src/response_model/tutorial003.py!} ``` ...`response_model`を`UserOut`ăšćźŁèš€ă—ăŸă“ăšă§ă€ăƒ‘ă‚čăƒŻăƒŒăƒ‰ăŒć«ăŸă‚ŒăŠă„ăŸă›ă‚“: ```Python hl_lines="22" -{!../../../docs_src/response_model/tutorial003.py!} +{!../../docs_src/response_model/tutorial003.py!} ``` そぼため、**FastAPI** はć‡șćŠ›ăƒąăƒ‡ăƒ«ă§ćźŁèš€ă•ă‚ŒăŠă„ăȘă„ć…šăŠăźăƒ‡ăƒŒă‚żă‚’ăƒ•ă‚Łăƒ«ă‚żăƒȘăƒłă‚°ă—ăŠăă‚ŒăŸă™ïŒˆPydantică‚’äœżç”šïŒ‰ă€‚ @@ -100,7 +100,7 @@ FastAPIは`response_model`ă‚’äœżăŁăŠä»„äž‹ăźă“ăšă‚’ă—ăŸă™: ハă‚čポンă‚čăƒąăƒ‡ăƒ«ă«ăŻăƒ‡ăƒ•ă‚©ăƒ«ăƒˆć€€ă‚’èš­ćźšă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="11 13 14" -{!../../../docs_src/response_model/tutorial004.py!} +{!../../docs_src/response_model/tutorial004.py!} ``` * `description: str = None`は`None`ăŒăƒ‡ăƒ•ă‚©ăƒ«ăƒˆć€€ă§ă™ă€‚ @@ -116,7 +116,7 @@ FastAPIは`response_model`ă‚’äœżăŁăŠä»„äž‹ăźă“ăšă‚’ă—ăŸă™: *path operation ăƒ‡ă‚łăƒŹăƒŒă‚ż*に`response_model_exclude_unset=True`ăƒ‘ăƒ©ăƒĄăƒŒă‚żă‚’èš­ćźšă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="24" -{!../../../docs_src/response_model/tutorial004.py!} +{!../../docs_src/response_model/tutorial004.py!} ``` ăă—ăŠă€ă“ă‚Œă‚‰ăźăƒ‡ăƒ•ă‚©ăƒ«ăƒˆć€€ăŻăƒŹă‚čポンă‚čă«ć«ăŸă‚Œăšă€ćźŸéš›ă«èš­ćźšă•ă‚ŒăŸć€€ăźăżăŒć«ăŸă‚ŒăŸă™ă€‚ @@ -206,7 +206,7 @@ FastAPIăŻććˆ†ă«èłąă„ăźă§ïŒˆćźŸéš›ă«ăŻă€PydanticăŒććˆ†ă«èłąă„ïŒ‰`d /// ```Python hl_lines="31 37" -{!../../../docs_src/response_model/tutorial005.py!} +{!../../docs_src/response_model/tutorial005.py!} ``` /// tip | "豆矄識" @@ -222,7 +222,7 @@ FastAPIăŻććˆ†ă«èłąă„ăźă§ïŒˆćźŸéš›ă«ăŻă€PydanticăŒććˆ†ă«èłąă„ïŒ‰`d もし`set`ă‚’äœżç”šă™ă‚‹ă“ăšă‚’ćż˜ă‚ŒăŠă€ä»Łă‚ă‚Šă«`list`や`tuple`ă‚’äœżç”šă—ăŠă‚‚ă€FastAPIはそれを`set`ă«ć€‰æ›ă—ăŠæ­Łă—ăć‹•äœœă—ăŸă™: ```Python hl_lines="31 37" -{!../../../docs_src/response_model/tutorial006.py!} +{!../../docs_src/response_model/tutorial006.py!} ``` ## ăŸăšă‚ diff --git a/docs/ja/docs/tutorial/response-status-code.md b/docs/ja/docs/tutorial/response-status-code.md index 945767894..90b290887 100644 --- a/docs/ja/docs/tutorial/response-status-code.md +++ b/docs/ja/docs/tutorial/response-status-code.md @@ -9,7 +9,7 @@ * ăȘど。 ```Python hl_lines="6" -{!../../../docs_src/response_status_code/tutorial001.py!} +{!../../docs_src/response_status_code/tutorial001.py!} ``` /// note | "ć‚™è€ƒ" @@ -77,7 +77,7 @@ HTTPでは、レă‚čポンă‚čăźäž€éƒšăšă—ăŠïŒ“æĄăźæ•°ć­—ăźă‚čăƒ†ăƒŒă‚żă‚č ć…ˆă»ă©ăźäŸ‹ă‚’ă‚‚ă†äž€ćșŠèŠ‹ăŠăżăŸă—ă‚‡ă†: ```Python hl_lines="6" -{!../../../docs_src/response_status_code/tutorial001.py!} +{!../../docs_src/response_status_code/tutorial001.py!} ``` `201`ăŻă€ŒäœœæˆćźŒäș†ă€ăźăŸă‚ăźă‚čăƒ†ăƒŒă‚żă‚čă‚łăƒŒăƒ‰ă§ă™ă€‚ @@ -87,7 +87,7 @@ HTTPでは、レă‚čポンă‚čăźäž€éƒšăšă—ăŠïŒ“æĄăźæ•°ć­—ăźă‚čăƒ†ăƒŒă‚żă‚č `fastapi.status`ăźäŸżćˆ©ăȘć€‰æ•°ă‚’ćˆ©ç”šă™ă‚‹ă“ăšăŒă§ăăŸă™ă€‚ ```Python hl_lines="1 6" -{!../../../docs_src/response_status_code/tutorial002.py!} +{!../../docs_src/response_status_code/tutorial002.py!} ``` ăă‚Œă‚‰ăŻäŸżćˆ©ă§ă™ă€‚ăă‚Œă‚‰ăŻćŒă˜ç•Șć·ă‚’äżæŒă—ăŠăŠă‚Šă€ăăźæ–čæł•ă§ăŻă‚šăƒ‡ă‚Łă‚żăźè‡Șć‹•èŁœćźŒă‚’äœżç”šă—ăŠăă‚Œă‚‰ă‚’èŠ‹ă€ă‘ă‚‹ă“ăšăŒă§ăăŸă™ă€‚ diff --git a/docs/ja/docs/tutorial/schema-extra-example.md b/docs/ja/docs/tutorial/schema-extra-example.md index a3cd5eb54..baf1bbedd 100644 --- a/docs/ja/docs/tutorial/schema-extra-example.md +++ b/docs/ja/docs/tutorial/schema-extra-example.md @@ -11,7 +11,7 @@ JSON SchemaăźèżœćŠ æƒ…ć ±ă‚’ćźŁèš€ă™ă‚‹æ–čæł•ăŻă„ăă€ă‹ă‚ă‚ŠăŸă™ă€‚ Pydanticăźăƒ‰ă‚­ăƒ„ăƒĄăƒłăƒˆ: ă‚čă‚­ăƒŒăƒžăźă‚«ă‚čă‚żăƒžă‚€ă‚șでèȘŹæ˜Žă•ă‚ŒăŠă„ă‚‹ă‚ˆă†ă«ă€`Config`ず`schema_extra`ă‚’äœżăŁăŠPydanticăƒąăƒ‡ăƒ«ăźäŸ‹ă‚’ćźŁèš€ă™ă‚‹ă“ăšăŒă§ăăŸă™: ```Python hl_lines="15 16 17 18 19 20 21 22 23" -{!../../../docs_src/schema_extra_example/tutorial001.py!} +{!../../docs_src/schema_extra_example/tutorial001.py!} ``` ăăźèżœćŠ æƒ…ć ±ăŻăăźăŸăŸć‡ș抛され、JSON Schemaă«èżœćŠ ă•ă‚ŒăŸă™ă€‚ @@ -21,7 +21,7 @@ JSON SchemaăźèżœćŠ æƒ…ć ±ă‚’ćźŁèš€ă™ă‚‹æ–čæł•ăŻă„ăă€ă‹ă‚ă‚ŠăŸă™ă€‚ ćŸŒèż°ă™ă‚‹`Field`、`Path`、`Query`、`Body`ăȘă©ă§ăŻă€ä»»æ„ăźćŒ•æ•°ă‚’é–ąæ•°ă«æžĄă™ă“ăšă§JSON SchemaăźèżœćŠ æƒ…ć ±ă‚’ćźŁèš€ă™ă‚‹ă“ăšă‚‚ă§ăăŸă™: ```Python hl_lines="4 10 11 12 13" -{!../../../docs_src/schema_extra_example/tutorial002.py!} +{!../../docs_src/schema_extra_example/tutorial002.py!} ``` /// warning | "æłšæ„" @@ -37,7 +37,7 @@ JSON SchemaăźèżœćŠ æƒ…ć ±ă‚’ćźŁèš€ă™ă‚‹æ–čæł•ăŻă„ăă€ă‹ă‚ă‚ŠăŸă™ă€‚ äŸ‹ăˆă°ă€`Body`ă«ăƒœăƒ‡ă‚ŁăƒȘクスă‚čトた`example`ă‚’æžĄă™ă“ăšăŒă§ăăŸă™: ```Python hl_lines="21 22 23 24 25 26" -{!../../../docs_src/schema_extra_example/tutorial003.py!} +{!../../docs_src/schema_extra_example/tutorial003.py!} ``` ## ăƒ‰ă‚­ăƒ„ăƒĄăƒłăƒˆăźUIăźäŸ‹ diff --git a/docs/ja/docs/tutorial/security/first-steps.md b/docs/ja/docs/tutorial/security/first-steps.md index c78a3755e..51f7bf829 100644 --- a/docs/ja/docs/tutorial/security/first-steps.md +++ b/docs/ja/docs/tutorial/security/first-steps.md @@ -21,7 +21,7 @@ `main.py`ă«ă€äž‹èš˜ăźäŸ‹ă‚’ă‚łăƒ”ăƒŒă—ăŸă™: ```Python -{!../../../docs_src/security/tutorial001.py!} +{!../../docs_src/security/tutorial001.py!} ``` ## ćźŸèĄŒ @@ -129,7 +129,7 @@ OAuth2は、バックスンドやAPIăŒăƒŠăƒŒă‚¶ăƒŒă‚’èȘèšŒă™ă‚‹ă‚”ăƒŒăƒăƒŒ `OAuth2PasswordBearer` ă‚Żăƒ©ă‚čăźă‚€ăƒłă‚čタンă‚čă‚’äœœæˆă™ă‚‹æ™‚ă«ă€ăƒ‘ăƒ©ăƒĄăƒŒă‚żăƒŒ`tokenUrl`ă‚’æžĄă—ăŸă™ă€‚ă“ăźăƒ‘ăƒ©ăƒĄăƒŒă‚żăƒŒă«ăŻă€ă‚Żăƒ©ă‚€ă‚ąăƒłăƒˆ (ăƒŠăƒŒă‚¶ăƒŒăźăƒ–ăƒ©ă‚Šă‚¶ă§ć‹•äœœă™ă‚‹ăƒ•ăƒ­ăƒłăƒˆă‚šăƒłăƒ‰) ăŒăƒˆăƒŒă‚Żăƒłă‚’ć–ćŸ—ă™ă‚‹ăŸă‚ă«`ăƒŠăƒŒă‚¶ăƒŒć`ず`パă‚čăƒŻăƒŒăƒ‰`を送信するURLă‚’æŒ‡ćźšă—ăŸă™ă€‚ ```Python hl_lines="6" -{!../../../docs_src/security/tutorial001.py!} +{!../../docs_src/security/tutorial001.py!} ``` /// tip | "豆矄識" @@ -169,7 +169,7 @@ oauth2_scheme(some, parameters) これで`oauth2_scheme`を`Depends`ă§äŸć­˜é–ąäż‚ă«æžĄă™ă“ăšăŒă§ăăŸă™ă€‚ ```Python hl_lines="10" -{!../../../docs_src/security/tutorial001.py!} +{!../../docs_src/security/tutorial001.py!} ``` ă“ăźäŸć­˜é–ąäż‚ăŻă€*path operation function*ăźăƒ‘ăƒ©ăƒĄăƒŒă‚żăƒŒ`token`ă«ä»Łć…„ă•ă‚Œă‚‹`str`ă‚’æäŸ›ă—ăŸă™ă€‚ diff --git a/docs/ja/docs/tutorial/security/get-current-user.md b/docs/ja/docs/tutorial/security/get-current-user.md index 250f66b81..0edbd983f 100644 --- a/docs/ja/docs/tutorial/security/get-current-user.md +++ b/docs/ja/docs/tutorial/security/get-current-user.md @@ -3,7 +3,7 @@ äž€ă€ć‰ăźç« ă§ăŻă€ïŒˆäŸć­˜æ€§æłšć…„ă‚·ă‚čăƒ†ăƒ ă«ćŸșă„ă„ăŸïŒ‰ă‚»ă‚­ăƒ„ăƒȘăƒ†ă‚Łă‚·ă‚čテムは、 *path operationé–ąæ•°* に `str` べしど `token` ă‚’äžŽăˆăŠă„ăŸă—ăŸ: ```Python hl_lines="10" -{!../../../docs_src/security/tutorial001.py!} +{!../../docs_src/security/tutorial001.py!} ``` ă—ă‹ă—ă€ăă‚ŒăŻăŸă ăă‚“ăȘă«æœ‰ç”šă§ăŻă‚ă‚ŠăŸă›ă‚“ă€‚ @@ -17,7 +17,7 @@ ăƒœăƒ‡ă‚Łă‚’ćźŁèš€ă™ă‚‹ăźă«Pydantică‚’äœżç”šă™ă‚‹ăźăšćŒă˜ă‚„ă‚Šæ–čで、Pydantică‚’ćˆ„ăźă©ă‚“ăȘăšă“ă‚ă§ă‚‚äœżă†ă“ăšăŒă§ăăŸă™: ```Python hl_lines="5 12-16" -{!../../../docs_src/security/tutorial002.py!} +{!../../docs_src/security/tutorial002.py!} ``` ## äŸć­˜é–ąäż‚ `get_current_user` ă‚’äœœæˆ @@ -31,7 +31,7 @@ ä»„ć‰ç›ŽæŽ„ *path operation* ăźäž­ă§ă—ăŠă„ăŸăźăšćŒă˜ă‚ˆă†ă«ă€æ–°ă—ă„äŸć­˜é–ąäż‚ă§ă‚ă‚‹ `get_current_user` は `str` べしど `token` ă‚’ć—ă‘ć–ă‚‹ă‚ˆă†ă«ăȘă‚ŠăŸă™: ```Python hl_lines="25" -{!../../../docs_src/security/tutorial002.py!} +{!../../docs_src/security/tutorial002.py!} ``` ## ăƒŠăƒŒă‚¶ăƒŒăźć–ćŸ— @@ -39,7 +39,7 @@ `get_current_user` ăŻäœœæˆă—ăŸïŒˆćœç‰©ăźïŒ‰ăƒŠăƒŒăƒ†ă‚ŁăƒȘăƒ†ă‚Łé–ąæ•°ă‚’äœżăŁăŠă€ `str` ăšă—ăŠăƒˆăƒŒă‚Żăƒłă‚’ć—ă‘ć–ă‚Šă€ć…ˆă»ă©ăźPydanticた `User` ăƒąăƒ‡ăƒ«ă‚’èż”ćŽă—ăŸă™: ```Python hl_lines="19-22 26-27" -{!../../../docs_src/security/tutorial002.py!} +{!../../docs_src/security/tutorial002.py!} ``` ## çŸćœšăźăƒŠăƒŒă‚¶ăƒŒăźæłšć…„ @@ -47,7 +47,7 @@ ですぼで、 `get_current_user` ă«ćŻŸă—ăŠćŒæ§˜ă« *path operation* た䞭で `Depends` ă‚’ćˆ©ç”šă§ăăŸă™ă€‚ ```Python hl_lines="31" -{!../../../docs_src/security/tutorial002.py!} +{!../../docs_src/security/tutorial002.py!} ``` Pydanticăƒąăƒ‡ăƒ«ăź `User` べしど、 `current_user` ăźćž‹ă‚’ćźŁèš€ă™ă‚‹ă“ăšă«æłšæ„ă—ăŠăă ă•ă„ă€‚ @@ -104,7 +104,7 @@ Pydanticăƒąăƒ‡ăƒ«ăź `User` べしど、 `current_user` ăźćž‹ă‚’ćźŁèš€ă™ă‚‹ă“ ă•ă‚‰ă«ă€ă“ă†ă—ăŸäœ•ćƒă‚‚ăź *path operations* は、たった3èĄŒă§èĄšçŸă§ăă‚‹ăźă§ă™: ```Python hl_lines="30-32" -{!../../../docs_src/security/tutorial002.py!} +{!../../docs_src/security/tutorial002.py!} ``` ## ăŸăšă‚ diff --git a/docs/ja/docs/tutorial/security/oauth2-jwt.md b/docs/ja/docs/tutorial/security/oauth2-jwt.md index 4f6aebd4c..b2f511610 100644 --- a/docs/ja/docs/tutorial/security/oauth2-jwt.md +++ b/docs/ja/docs/tutorial/security/oauth2-jwt.md @@ -119,7 +119,7 @@ PassLibたcontextă«ăŻă€æ€œèšŒă ă‘ăŒèš±ă•ă‚ŒăŸéžæŽšć„šăźć€ă„ăƒăƒƒă‚· ă•ă‚‰ă«ă€ăƒŠăƒŒă‚¶ăƒŒă‚’èȘèšŒă—ăŠèż”ă™é–ąæ•°ă‚‚äœœæˆă—ăŸă™ă€‚ ```Python hl_lines="7 48 55-56 59-60 69-75" -{!../../../docs_src/security/tutorial004.py!} +{!../../docs_src/security/tutorial004.py!} ``` /// note | "ć‚™è€ƒ" @@ -157,7 +157,7 @@ JWTăƒˆăƒŒă‚ŻăƒłăźçœČćă«äœżç”šă™ă‚‹ă‚ąăƒ«ă‚ŽăƒȘă‚șム`"HS256"`ă‚’æŒ‡ćźšă— æ–°ă—ă„ă‚ąă‚Żă‚»ă‚čăƒˆăƒŒă‚Żăƒłă‚’ç”Ÿæˆă™ă‚‹ăƒŠăƒŒăƒ†ă‚ŁăƒȘăƒ†ă‚Łé–ąæ•°ă‚’äœœæˆă—ăŸă™ă€‚ ```Python hl_lines="6 12-14 28-30 78-86" -{!../../../docs_src/security/tutorial004.py!} +{!../../docs_src/security/tutorial004.py!} ``` ## äŸć­˜é–ąäż‚ăźæ›Žæ–° @@ -169,7 +169,7 @@ JWTăƒˆăƒŒă‚ŻăƒłăźçœČćă«äœżç”šă™ă‚‹ă‚ąăƒ«ă‚ŽăƒȘă‚șム`"HS256"`ă‚’æŒ‡ćźšă— ăƒˆăƒŒă‚ŻăƒłăŒç„ĄćŠčăȘć ŽćˆăŻă€ă™ăă«HTTPă‚šăƒ©ăƒŒă‚’èż”ă—ăŸă™ă€‚ ```Python hl_lines="89-106" -{!../../../docs_src/security/tutorial004.py!} +{!../../docs_src/security/tutorial004.py!} ``` ## `/token` パă‚čă‚ȘăƒšăƒŹăƒŒă‚·ăƒ§ăƒłăźæ›Žæ–° @@ -179,7 +179,7 @@ JWTăƒˆăƒŒă‚ŻăƒłăźçœČćă«äœżç”šă™ă‚‹ă‚ąăƒ«ă‚ŽăƒȘă‚șム`"HS256"`ă‚’æŒ‡ćźšă— JWTスクセă‚čăƒˆăƒŒă‚Żăƒłă‚’äœœæˆă—ă€ăă‚Œă‚’èż”ă—ăŸă™ă€‚ ```Python hl_lines="115-130" -{!../../../docs_src/security/tutorial004.py!} +{!../../docs_src/security/tutorial004.py!} ``` ### JWTた"subject" `sub` ă«ă€ă„ăŠăźæŠ€èĄ“çš„ăȘè©łçŽ° diff --git a/docs/ja/docs/tutorial/static-files.md b/docs/ja/docs/tutorial/static-files.md index c9d95bc34..e6002a1fb 100644 --- a/docs/ja/docs/tutorial/static-files.md +++ b/docs/ja/docs/tutorial/static-files.md @@ -8,7 +8,7 @@ * `StaticFiles()` ă‚€ăƒłă‚čタンă‚čă‚’ç”Ÿæˆă—ă€ç‰č漚ぼパă‚čă«ă€Œăƒžă‚Šăƒłăƒˆă€ă€‚ ```Python hl_lines="2 6" -{!../../../docs_src/static_files/tutorial001.py!} +{!../../docs_src/static_files/tutorial001.py!} ``` /// note | "æŠ€èĄ“è©łçŽ°" diff --git a/docs/ja/docs/tutorial/testing.md b/docs/ja/docs/tutorial/testing.md index 3ed03ebea..6c5e712e8 100644 --- a/docs/ja/docs/tutorial/testing.md +++ b/docs/ja/docs/tutorial/testing.md @@ -19,7 +19,7 @@ チェックしたい Python ăźæš™æș–çš„ăȘćŒăšć…±ă«ă€ă‚·ăƒłăƒ—ăƒ«ă« `assert` æ–‡ă‚’èš˜èż°ă—ăŸă™ă€‚ ```Python hl_lines="2 12 15-18" -{!../../../docs_src/app_testing/tutorial001.py!} +{!../../docs_src/app_testing/tutorial001.py!} ``` /// tip | "豆矄識" @@ -57,7 +57,7 @@ FastAPIケプăƒȘă‚±ăƒŒă‚·ăƒ§ăƒłăžăźăƒȘクスă‚čăƒˆăźé€äżĄăšăŻćˆ„ă«ă€ăƒ† **FastAPI** ケプăƒȘに `main.py` ăƒ•ă‚Ąă‚€ăƒ«ăŒă‚ă‚‹ăšă—ăŸă™: ```Python -{!../../../docs_src/app_testing/main.py!} +{!../../docs_src/app_testing/main.py!} ``` ### テă‚čăƒˆăƒ•ă‚Ąă‚€ăƒ« @@ -65,7 +65,7 @@ FastAPIケプăƒȘă‚±ăƒŒă‚·ăƒ§ăƒłăžăźăƒȘクスă‚čăƒˆăźé€äżĄăšăŻćˆ„ă«ă€ăƒ† æŹĄă«ă€ăƒ†ă‚čăƒˆă‚’ć«ă‚€ `test_main.py` ăƒ•ă‚Ąă‚€ăƒ«ă‚’äœœæˆă—ă€`main` ăƒąă‚žăƒ„ăƒŒăƒ« (`main.py`) から `app` ă‚’ă‚€ăƒłăƒăƒŒăƒˆă—ăŸă™: ```Python -{!../../../docs_src/app_testing/test_main.py!} +{!../../docs_src/app_testing/test_main.py!} ``` ## テă‚čト: äŸ‹ăźæ‹ĄćŒ” @@ -86,7 +86,7 @@ FastAPIケプăƒȘă‚±ăƒŒă‚·ăƒ§ăƒłăžăźăƒȘクスă‚čăƒˆăźé€äżĄăšăŻćˆ„ă«ă€ăƒ† //// tab | Python 3.10+ ```Python -{!> ../../../docs_src/app_testing/app_b_py310/main.py!} +{!> ../../docs_src/app_testing/app_b_py310/main.py!} ``` //// @@ -94,7 +94,7 @@ FastAPIケプăƒȘă‚±ăƒŒă‚·ăƒ§ăƒłăžăźăƒȘクスă‚čăƒˆăźé€äżĄăšăŻćˆ„ă«ă€ăƒ† //// tab | Python 3.6+ ```Python -{!> ../../../docs_src/app_testing/app_b/main.py!} +{!> ../../docs_src/app_testing/app_b/main.py!} ``` //// @@ -104,7 +104,7 @@ FastAPIケプăƒȘă‚±ăƒŒă‚·ăƒ§ăƒłăžăźăƒȘクスă‚čăƒˆăźé€äżĄăšăŻćˆ„ă«ă€ăƒ† æŹĄă«ă€ć…ˆçš‹ăźă‚‚ăźă«æ‹ĄćŒ”ç‰ˆăźăƒ†ă‚čトを抠えた、`test_main_b.py` ă‚’äœœæˆă—ăŸă™ă€‚ ```Python -{!> ../../../docs_src/app_testing/app_b/test_main.py!} +{!> ../../docs_src/app_testing/app_b/test_main.py!} ``` ăƒȘクスă‚čăƒˆă«æƒ…ć ±ă‚’æžĄă›ă‚‹ă‚Żăƒ©ă‚€ă‚ąăƒłăƒˆăŒćż…èŠă§ă€ăăźæ–čæł•ăŒă‚ă‹ă‚‰ăȘă„ć ŽćˆăŻă„ă€ă§ă‚‚ă€`httpx` ă§ăźćźŸçŸæ–čæł•ă‚’æ€œçŽą (Google) ă§ăăŸă™ă€‚ diff --git a/docs/ko/docs/advanced/events.md b/docs/ko/docs/advanced/events.md index e155f41f1..94867c198 100644 --- a/docs/ko/docs/advanced/events.md +++ b/docs/ko/docs/advanced/events.md @@ -15,7 +15,7 @@ 응용 í”„ëĄœê·žëžšì„ 시작하Ʞ 전에 싀행하렀는 핚수넌 "startup" 읎ëČ€íŠžëĄœ 선얞합니닀: ```Python hl_lines="8" -{!../../../docs_src/events/tutorial001.py!} +{!../../docs_src/events/tutorial001.py!} ``` 읎 êČœìš° `startup` 읎ëȀ튞 í•žë“€ëŸŹ 핚수는 닚순히 ëȘ‡ 가지 ê°’ìœŒëĄœ ê”Źì„±ëœ `dict` 형식의 "데읎터ëČ ìŽìŠ€"넌 쎈Ʞ화합니닀. @@ -29,7 +29,7 @@ 응용 í”„ëĄœê·žëžšìŽ ìą…ëŁŒë  때 싀행하렀는 핚수넌 추가하렀멎 `"shutdown"` 읎ëČ€íŠžëĄœ 선얞합니닀: ```Python hl_lines="6" -{!../../../docs_src/events/tutorial002.py!} +{!../../docs_src/events/tutorial002.py!} ``` 읎 예제에서 `shutdown` 읎ëȀ튞 í•žë“€ëŸŹ 핚수는 `"Application shutdown"`읎띌는 텍슀튞가 적힌 `log.txt` 파음을 추가할 êČƒìž…ë‹ˆë‹€. diff --git a/docs/ko/docs/python-types.md b/docs/ko/docs/python-types.md index 5c458e48d..6d7346189 100644 --- a/docs/ko/docs/python-types.md +++ b/docs/ko/docs/python-types.md @@ -23,7 +23,7 @@ 간닚한 예제부터 시작핎뎅시닀: ```Python -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` 읎 í”„ëĄœê·žëžšì„ 싀행한 êČ°êłŒê°’: @@ -39,7 +39,7 @@ John Doe * 두 닚얎넌 쀑간에 êł”ë°±ì„ ë‘êł  연êČ°í•©ë‹ˆë‹€. ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` ### 윔드 수정 @@ -83,7 +83,7 @@ John Doe 읎êȌ "타입 힌튾"입니닀: ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial002.py!} +{!../../docs_src/python_types/tutorial002.py!} ``` 타입힌튞는 ë‹€ìŒêłŒ 같읎 êž°ëłž 값을 선얞하는 êČƒêłŒëŠ” 닀늅니닀: @@ -113,7 +113,7 @@ John Doe 아래 핚수넌 볎멎, ìŽëŻž 타입 힌튞가 적용되얎 있는 걞 ëłŒ 수 있슔니닀: ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial003.py!} +{!../../docs_src/python_types/tutorial003.py!} ``` 펞집Ʞ가 ëł€ìˆ˜ì˜ 타입을 ì•Œêł  있Ʞ ë•ŒëŹžì—, 자동완성 뿐 아니띌 ì—ëŸŹë„ 확읞할 수 있슔니닀: @@ -123,7 +123,7 @@ John Doe 읎제 êł ìłì•Œí•˜ëŠ” 걞 알Ʞ ë•ŒëŹžì—, `age`넌 `str(age)`êłŒ 같읎 ëŹžìžì—ŽëĄœ 바꟞êȌ 됩니닀: ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial004.py!} +{!../../docs_src/python_types/tutorial004.py!} ``` ## 타입 ì„ ì–ž @@ -144,7 +144,7 @@ John Doe * `bytes` ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial005.py!} +{!../../docs_src/python_types/tutorial005.py!} ``` ### 타입 ë§€ê°œëł€ìˆ˜ë„Œ 활용한 Generic(제넀늭) 타입 @@ -162,7 +162,7 @@ John Doe `typing`에서 `List`(ëŒ€ëŹžìž `L`)넌 import 합니닀. ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial006.py!} +{!../../docs_src/python_types/tutorial006.py!} ``` ìœœëĄ (`:`) 돞ëČ•ì„ ìŽìš©í•˜ì—Ź ëł€ìˆ˜ë„Œ 선얞합니닀. @@ -172,7 +172,7 @@ John Doe 읎때 배엎은 낎부 타입을 포핹하는 타입읎Ʞ ë•ŒëŹžì— 대ꎄ혞 안에 ë„Łì–Žì€ë‹ˆë‹€. ```Python hl_lines="4" -{!../../../docs_src/python_types/tutorial006.py!} +{!../../docs_src/python_types/tutorial006.py!} ``` /// tip | "팁" @@ -200,7 +200,7 @@ John Doe `tuple`êłŒ `set`도 동음하êȌ ì„ ì–ží•  수 있슔니닀. ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial007.py!} +{!../../docs_src/python_types/tutorial007.py!} ``` 읎 뜻은 아래와 같슔니닀: @@ -217,7 +217,7 @@ John Doe 두 ëČˆì§ž ë§€ê°œëł€ìˆ˜ëŠ” `dict`의 값(value)입니닀. ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial008.py!} +{!../../docs_src/python_types/tutorial008.py!} ``` 읎 뜻은 아래와 같슔니닀: @@ -231,7 +231,7 @@ John Doe `str`êłŒ 같읎 타입을 ì„ ì–ží•  때 `Optional`을 쓞 수도 있는데, "선택적(Optional)"ìŽêž°ë•ŒëŹžì— `None`도 될 수 있슔니닀: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009.py!} +{!../../docs_src/python_types/tutorial009.py!} ``` `Optional[str]`을 `str` 대신 쓰êȌ 되멎, íŠč정 값읎 ì‹€ì œëĄœëŠ” `None`읎 될 수도 있는데 항상 `str`ìŽëŒêł  가정하는 상황에서 에디터가 ì—ëŸŹë„Œ ì°ŸêȌ 도와쀄 수 있슔니닀. @@ -256,13 +256,13 @@ John Doe 읎늄(name)을 가진 `Person` 큎래슀가 ìžˆë‹€êł  핎뎅시닀. ```Python hl_lines="1-3" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` ê·žë ‡êȌ 하멎 ëł€ìˆ˜ë„Œ `Person`ìŽëŒêł  ì„ ì–ží•  수 있êȌ 됩니닀. ```Python hl_lines="6" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` ê·žëŠŹêł  역시나 ëȘšë“  에디터 도움을 받êȌ 되êČ ìŁ . @@ -284,7 +284,7 @@ John Doe Pydantic êł”ì‹ ëŹžì„œ 예시: ```Python -{!../../../docs_src/python_types/tutorial011.py!} +{!../../docs_src/python_types/tutorial011.py!} ``` /// info | "ì •ëłŽ" diff --git a/docs/ko/docs/tutorial/background-tasks.md b/docs/ko/docs/tutorial/background-tasks.md index 880a1c198..376c52524 100644 --- a/docs/ko/docs/tutorial/background-tasks.md +++ b/docs/ko/docs/tutorial/background-tasks.md @@ -16,7 +16,7 @@ FastAPI에서는 응닔을 반환한 후에 싀행할 백귞띌욎드 작업을 뚌저 아래와 같읎 `BackgroundTasks`넌 ìž„íŹíŠží•˜êł , `BackgroundTasks`넌 _êČœëĄœ 작동 핚수_ 에서 ë§€ê°œëł€ìˆ˜ëĄœ ê°€ì žì˜€êł  정의합니닀. ```Python hl_lines="1 13" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` **FastAPI** 는 `BackgroundTasks` 개ìČŽë„Œ ìƒì„±í•˜êł , 맀개 ëł€ìˆ˜ëĄœ ì „ë‹Źí•©ë‹ˆë‹€. @@ -34,7 +34,7 @@ FastAPI에서는 응닔을 반환한 후에 싀행할 백귞띌욎드 작업을 ê·žëŠŹêł  읎 작업은 `async`와 `await`넌 ì‚Źìš©í•˜ì§€ ì•ŠìœŒëŻ€ëĄœ 음반 `def` í•šìˆ˜ëĄœ 선얞합니닀. ```Python hl_lines="6-9" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` ## 백귞띌욎드 작업 추가 @@ -42,7 +42,7 @@ FastAPI에서는 응닔을 반환한 후에 싀행할 백귞띌욎드 작업을 _êČœëĄœ 작동 핚수_ 낎에서 작업 핚수넌 `.add_task()` 핚수 톔핎 _백귞띌욎드 작업_ 개ìČŽì— ì „ë‹Źí•©ë‹ˆë‹€. ```Python hl_lines="14" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` `.add_task()` 핚수는 ë‹€ìŒêłŒ 같은 읞자넌 받슔니닀 : @@ -60,7 +60,7 @@ _êČœëĄœ 작동 핚수_ 낎에서 작업 핚수넌 `.add_task()` 핚수 톔핎 _ //// tab | Python 3.6 and above ```Python hl_lines="13 15 22 25" -{!> ../../../docs_src/background_tasks/tutorial002.py!} +{!> ../../docs_src/background_tasks/tutorial002.py!} ``` //// @@ -68,7 +68,7 @@ _êČœëĄœ 작동 핚수_ 낎에서 작업 핚수넌 `.add_task()` 핚수 톔핎 _ //// tab | Python 3.10 and above ```Python hl_lines="11 13 20 23" -{!> ../../../docs_src/background_tasks/tutorial002_py310.py!} +{!> ../../docs_src/background_tasks/tutorial002_py310.py!} ``` //// diff --git a/docs/ko/docs/tutorial/body-fields.md b/docs/ko/docs/tutorial/body-fields.md index b74722e26..a13159c27 100644 --- a/docs/ko/docs/tutorial/body-fields.md +++ b/docs/ko/docs/tutorial/body-fields.md @@ -9,7 +9,7 @@ //// tab | Python 3.10+ ```Python hl_lines="4" -{!> ../../../docs_src/body_fields/tutorial001_an_py310.py!} +{!> ../../docs_src/body_fields/tutorial001_an_py310.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | Python 3.9+ ```Python hl_lines="4" -{!> ../../../docs_src/body_fields/tutorial001_an_py39.py!} +{!> ../../docs_src/body_fields/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ //// tab | Python 3.8+ ```Python hl_lines="4" -{!> ../../../docs_src/body_fields/tutorial001_an.py!} +{!> ../../docs_src/body_fields/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ /// ```Python hl_lines="2" -{!> ../../../docs_src/body_fields/tutorial001_py310.py!} +{!> ../../docs_src/body_fields/tutorial001_py310.py!} ``` //// @@ -53,7 +53,7 @@ /// ```Python hl_lines="4" -{!> ../../../docs_src/body_fields/tutorial001.py!} +{!> ../../docs_src/body_fields/tutorial001.py!} ``` //// @@ -71,7 +71,7 @@ //// tab | Python 3.10+ ```Python hl_lines="11-14" -{!> ../../../docs_src/body_fields/tutorial001_an_py310.py!} +{!> ../../docs_src/body_fields/tutorial001_an_py310.py!} ``` //// @@ -79,7 +79,7 @@ //// tab | Python 3.9+ ```Python hl_lines="11-14" -{!> ../../../docs_src/body_fields/tutorial001_an_py39.py!} +{!> ../../docs_src/body_fields/tutorial001_an_py39.py!} ``` //// @@ -87,7 +87,7 @@ //// tab | Python 3.8+ ```Python hl_lines="12-15" -{!> ../../../docs_src/body_fields/tutorial001_an.py!} +{!> ../../docs_src/body_fields/tutorial001_an.py!} ``` //// @@ -101,7 +101,7 @@ /// ```Python hl_lines="9-12" -{!> ../../../docs_src/body_fields/tutorial001_py310.py!} +{!> ../../docs_src/body_fields/tutorial001_py310.py!} ``` //// @@ -115,7 +115,7 @@ /// ```Python hl_lines="11-14" -{!> ../../../docs_src/body_fields/tutorial001.py!} +{!> ../../docs_src/body_fields/tutorial001.py!} ``` //// diff --git a/docs/ko/docs/tutorial/body-multiple-params.md b/docs/ko/docs/tutorial/body-multiple-params.md index 023575e1b..0a0f34585 100644 --- a/docs/ko/docs/tutorial/body-multiple-params.md +++ b/docs/ko/docs/tutorial/body-multiple-params.md @@ -11,7 +11,7 @@ 또한, êž°ëłž 값을 `None`ìœŒëĄœ 섀정핎 볞돞 ë§€ê°œëł€ìˆ˜ë„Œ ì„ íƒì‚Źí•­ìœŒëĄœ ì„ ì–ží•  수 있슔니닀. ```Python hl_lines="19-21" -{!../../../docs_src/body_multiple_params/tutorial001.py!} +{!../../docs_src/body_multiple_params/tutorial001.py!} ``` /// note | "ì°žêł " @@ -36,7 +36,7 @@ 하지만, 닀쀑 볞돞 ë§€ê°œëł€ìˆ˜ 역시 ì„ ì–ží•  수 있슔니닀. 예. `item`êłŒ `user`: ```Python hl_lines="22" -{!../../../docs_src/body_multiple_params/tutorial002.py!} +{!../../docs_src/body_multiple_params/tutorial002.py!} ``` 읎 êČœìš°ì—, **FastAPI**는 읎 핚수 안에 한 개 읎상의 볞돞 ë§€ê°œëł€ìˆ˜(Pydantic ëȘšëžìž 두 ë§€ê°œëł€ìˆ˜)가 ìžˆë‹€êł  알 êČƒìž…ë‹ˆë‹€. @@ -80,7 +80,7 @@ FastAPI는 요ìČ­ì„ ìžë™ìœŒëĄœ 변환핮, ë§€ê°œëł€ìˆ˜ì˜ `item`êłŒ `user`넌 ```Python hl_lines="23" -{!../../../docs_src/body_multiple_params/tutorial003.py!} +{!../../docs_src/body_multiple_params/tutorial003.py!} ``` 읎 êČœìš°ì—ëŠ” **FastAPI**는 ëłžëŹžì„ 읎와 같읎 ì˜ˆìžĄí•  êČƒìž…ë‹ˆë‹€: @@ -111,7 +111,7 @@ FastAPI는 요ìČ­ì„ ìžë™ìœŒëĄœ 변환핮, ë§€ê°œëł€ìˆ˜ì˜ `item`êłŒ `user`넌 êž°ëłžì ìœŒëĄœ 닚음 값은 ìżŒëŠŹ ë§€ê°œëł€ìˆ˜ëĄœ í•Žì„ë˜ëŻ€ëĄœ, ëȘ…ì‹œì ìœŒëĄœ `Query`넌 추가할 필요가 ì—†êł , 아래ìČ˜ëŸŒ 할 수 있슔니닀: ```Python hl_lines="27" -{!../../../docs_src/body_multiple_params/tutorial004.py!} +{!../../docs_src/body_multiple_params/tutorial004.py!} ``` 읎렇êȌ: @@ -135,7 +135,7 @@ Pydantic ëȘšëž `Item`의 `item`을 볞돞 ë§€ê°œëł€ìˆ˜ëĄœ 였직 한개만 갖 하지만, 만앜 ëȘšëž 낎용에 `item `킀넌 가진 JSONìœŒëĄœ ì˜ˆìžĄí•˜êžž 원한닀멎, 추가적읞 볞돞 ë§€ê°œëł€ìˆ˜ë„Œ 선얞한 êȃìČ˜ëŸŒ `Body`의 íŠč별한 ë§€ê°œëł€ìˆ˜ìž `embed`넌 ì‚Źìš©í•  수 있슔니닀: ```Python hl_lines="17" -{!../../../docs_src/body_multiple_params/tutorial005.py!} +{!../../docs_src/body_multiple_params/tutorial005.py!} ``` 아래 ìČ˜ëŸŒ: diff --git a/docs/ko/docs/tutorial/body-nested-models.md b/docs/ko/docs/tutorial/body-nested-models.md index 4d785f64b..12fb4e0cc 100644 --- a/docs/ko/docs/tutorial/body-nested-models.md +++ b/docs/ko/docs/tutorial/body-nested-models.md @@ -6,7 +6,7 @@ ì–ŽíŠžëŠŹë·°íŠžë„Œ ì„œëžŒíƒ€ìž…ìœŒëĄœ 정의할 수 있슔니닀. 예넌 듀얎 íŒŒìŽìŹ `list`는: ```Python hl_lines="14" -{!../../../docs_src/body_nested_models/tutorial001.py!} +{!../../docs_src/body_nested_models/tutorial001.py!} ``` 읎는 `tags`넌 항ëȘ© ëŠŹìŠ€íŠžëĄœ 만듭니닀. 각 항ëȘ©ì˜ 타입을 선얞하지 않더띌도요. @@ -20,7 +20,7 @@ 뚌저, íŒŒìŽìŹ 표쀀 `typing` ëȘšë“ˆì—ì„œ `List`넌 ìž„íŹíŠží•©ë‹ˆë‹€: ```Python hl_lines="1" -{!../../../docs_src/body_nested_models/tutorial002.py!} +{!../../docs_src/body_nested_models/tutorial002.py!} ``` ### 타입 ë§€ê°œëł€ìˆ˜ëĄœ `List` ì„ ì–ž @@ -43,7 +43,7 @@ my_list: List[str] ë§ˆì°Źê°€ì§€ëĄœ 예제에서 `tags`넌 ê”ŹìČŽì ìœŒëĄœ "ëŹžìžì—Žì˜ ëŠŹìŠ€íŠž"로 만듀 수 있슔니닀: ```Python hl_lines="14" -{!../../../docs_src/body_nested_models/tutorial002.py!} +{!../../docs_src/body_nested_models/tutorial002.py!} ``` ## 집합 타입 @@ -55,7 +55,7 @@ my_list: List[str] 귞렇닀멎 `Set`을 ìž„íŹíŠž í•˜êł  `tags`넌 `str`의 `set`ìœŒëĄœ ì„ ì–ží•  수 있슔니닀: ```Python hl_lines="1 14" -{!../../../docs_src/body_nested_models/tutorial003.py!} +{!../../docs_src/body_nested_models/tutorial003.py!} ``` 덕분에 ì€‘ëł” 데읎터가 있는 요ìČ­ì„ 수신하더띌도 êł ìœ í•œ 항ëȘ©ë“€ì˜ ì§‘í•©ìœŒëĄœ ëł€í™˜ë©ë‹ˆë‹€. @@ -79,7 +79,7 @@ Pydantic ëȘšëžì˜ 각 ì–ŽíŠžëŠŹë·°íŠžëŠ” 타입을 갖슔니닀. 예넌 듀얎, `Image` ëȘšëžì„ ì„ ì–ží•  수 있슔니닀: ```Python hl_lines="9-11" -{!../../../docs_src/body_nested_models/tutorial004.py!} +{!../../docs_src/body_nested_models/tutorial004.py!} ``` ### 서람ëȘšë“ˆì„ íƒ€ìž…ìœŒëĄœ ì‚Źìš© @@ -87,7 +87,7 @@ Pydantic ëȘšëžì˜ 각 ì–ŽíŠžëŠŹë·°íŠžëŠ” 타입을 갖슔니닀. ê·žëŠŹêł  ì–ŽíŠžëŠŹë·°íŠžì˜ íƒ€ìž…ìœŒëĄœ ì‚Źìš©í•  수 있슔니닀: ```Python hl_lines="20" -{!../../../docs_src/body_nested_models/tutorial004.py!} +{!../../docs_src/body_nested_models/tutorial004.py!} ``` 읎는 **FastAPI**가 ë‹€ìŒêłŒ ìœ ì‚Źí•œ ëłžëŹžì„ Ʞ대한닀는 êČƒì„ ì˜ëŻží•©ë‹ˆë‹€: @@ -122,7 +122,7 @@ Pydantic ëȘšëžì˜ 각 ì–ŽíŠžëŠŹë·°íŠžëŠ” 타입을 갖슔니닀. 예넌 듀얎 `Image` ëȘšëž 안에 `url` 필드넌 `str` 대신 Pydantic의 `HttpUrl`로 ì„ ì–ží•  수 있슔니닀: ```Python hl_lines="4 10" -{!../../../docs_src/body_nested_models/tutorial005.py!} +{!../../docs_src/body_nested_models/tutorial005.py!} ``` 읎 ëŹžìžì—ŽìŽ 유횚한 URL읞지 êČ€ì‚Źí•˜êł  JSON 슀킀마/OpenAPI로 ëŹžì„œí™” 됩니닀. @@ -132,7 +132,7 @@ Pydantic ëȘšëžì˜ 각 ì–ŽíŠžëŠŹë·°íŠžëŠ” 타입을 갖슔니닀. `list`, `set` 등의 ì„œëžŒíƒ€ìž…ìœŒëĄœ Pydantic ëȘšëžì„ ì‚Źìš©í•  수도 있슔니닀: ```Python hl_lines="20" -{!../../../docs_src/body_nested_models/tutorial006.py!} +{!../../docs_src/body_nested_models/tutorial006.py!} ``` 아래와 같은 JSON ëłžëŹžìœŒëĄœ 예상(변환, êČ€ìŠ, ëŹžì„œí™” 등을)합니닀: @@ -172,7 +172,7 @@ Pydantic ëȘšëžì˜ 각 ì–ŽíŠžëŠŹë·°íŠžëŠ” 타입을 갖슔니닀. ë‹šë…ìœŒëĄœ êčŠêȌ 쀑ìČ©ëœ ëȘšëžì„ 정의할 수 있슔니닀: ```Python hl_lines="9 14 20 23 27" -{!../../../docs_src/body_nested_models/tutorial007.py!} +{!../../docs_src/body_nested_models/tutorial007.py!} ``` /// info | "ì •ëłŽ" @@ -192,7 +192,7 @@ images: List[Image] 읎넌 아래ìČ˜ëŸŒ: ```Python hl_lines="15" -{!../../../docs_src/body_nested_models/tutorial008.py!} +{!../../docs_src/body_nested_models/tutorial008.py!} ``` ## 얎디서나 펞집Ʞ 지원 @@ -224,7 +224,7 @@ Pydantic ëȘšëž 대신에 `dict`넌 직접 ì‚Źìš©í•˜ì—Ź 작업할 êČœìš°, ìŽëŸŹ 읎 êČœìš°, `float` 값을 가진 `int` 킀가 있는 ëȘšë“  `dict`넌 받아듀입니닀: ```Python hl_lines="15" -{!../../../docs_src/body_nested_models/tutorial009.py!} +{!../../docs_src/body_nested_models/tutorial009.py!} ``` /// tip | "팁" diff --git a/docs/ko/docs/tutorial/body.md b/docs/ko/docs/tutorial/body.md index 337218eb4..8df8d556e 100644 --- a/docs/ko/docs/tutorial/body.md +++ b/docs/ko/docs/tutorial/body.md @@ -25,7 +25,7 @@ //// tab | Python 3.10+ ```Python hl_lines="2" -{!> ../../../docs_src/body/tutorial001_py310.py!} +{!> ../../docs_src/body/tutorial001_py310.py!} ``` //// @@ -33,7 +33,7 @@ //// tab | Python 3.8+ ```Python hl_lines="4" -{!> ../../../docs_src/body/tutorial001.py!} +{!> ../../docs_src/body/tutorial001.py!} ``` //// @@ -47,7 +47,7 @@ //// tab | Python 3.10+ ```Python hl_lines="5-9" -{!> ../../../docs_src/body/tutorial001_py310.py!} +{!> ../../docs_src/body/tutorial001_py310.py!} ``` //// @@ -55,7 +55,7 @@ //// tab | Python 3.8+ ```Python hl_lines="7-11" -{!> ../../../docs_src/body/tutorial001.py!} +{!> ../../docs_src/body/tutorial001.py!} ``` //// @@ -89,7 +89,7 @@ //// tab | Python 3.10+ ```Python hl_lines="16" -{!> ../../../docs_src/body/tutorial001_py310.py!} +{!> ../../docs_src/body/tutorial001_py310.py!} ``` //// @@ -97,7 +97,7 @@ //// tab | Python 3.8+ ```Python hl_lines="18" -{!> ../../../docs_src/body/tutorial001.py!} +{!> ../../docs_src/body/tutorial001.py!} ``` //// @@ -170,7 +170,7 @@ //// tab | Python 3.10+ ```Python hl_lines="19" -{!> ../../../docs_src/body/tutorial002_py310.py!} +{!> ../../docs_src/body/tutorial002_py310.py!} ``` //// @@ -178,7 +178,7 @@ //// tab | Python 3.8+ ```Python hl_lines="21" -{!> ../../../docs_src/body/tutorial002.py!} +{!> ../../docs_src/body/tutorial002.py!} ``` //// @@ -192,7 +192,7 @@ //// tab | Python 3.10+ ```Python hl_lines="15-16" -{!> ../../../docs_src/body/tutorial003_py310.py!} +{!> ../../docs_src/body/tutorial003_py310.py!} ``` //// @@ -200,7 +200,7 @@ //// tab | Python 3.8+ ```Python hl_lines="17-18" -{!> ../../../docs_src/body/tutorial003.py!} +{!> ../../docs_src/body/tutorial003.py!} ``` //// @@ -214,7 +214,7 @@ //// tab | Python 3.10+ ```Python hl_lines="16" -{!> ../../../docs_src/body/tutorial004_py310.py!} +{!> ../../docs_src/body/tutorial004_py310.py!} ``` //// @@ -222,7 +222,7 @@ //// tab | Python 3.8+ ```Python hl_lines="18" -{!> ../../../docs_src/body/tutorial004.py!} +{!> ../../docs_src/body/tutorial004.py!} ``` //// diff --git a/docs/ko/docs/tutorial/cookie-params.md b/docs/ko/docs/tutorial/cookie-params.md index 5f129b63f..1e21e069d 100644 --- a/docs/ko/docs/tutorial/cookie-params.md +++ b/docs/ko/docs/tutorial/cookie-params.md @@ -9,7 +9,7 @@ //// tab | Python 3.10+ ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py310.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ //// tab | Python 3.8+ ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001_an.py!} +{!> ../../docs_src/cookie_params/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ /// ```Python hl_lines="1" -{!> ../../../docs_src/cookie_params/tutorial001_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_py310.py!} ``` //// @@ -53,7 +53,7 @@ /// ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001.py!} +{!> ../../docs_src/cookie_params/tutorial001.py!} ``` //// @@ -67,7 +67,7 @@ //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py310.py!} ``` //// @@ -75,7 +75,7 @@ //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py39.py!} ``` //// @@ -83,7 +83,7 @@ //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/cookie_params/tutorial001_an.py!} +{!> ../../docs_src/cookie_params/tutorial001_an.py!} ``` //// @@ -97,7 +97,7 @@ /// ```Python hl_lines="7" -{!> ../../../docs_src/cookie_params/tutorial001_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_py310.py!} ``` //// @@ -111,7 +111,7 @@ /// ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001.py!} +{!> ../../docs_src/cookie_params/tutorial001.py!} ``` //// diff --git a/docs/ko/docs/tutorial/cors.md b/docs/ko/docs/tutorial/cors.md index 312fdee1b..65357ae3f 100644 --- a/docs/ko/docs/tutorial/cors.md +++ b/docs/ko/docs/tutorial/cors.md @@ -47,7 +47,7 @@ * íŠč정한 HTTP 헀더 또는 와음드ìčŽë“œ `"*"` 넌 ì‚Źìš©í•œ ëȘšë“  HTTP 헀더. ```Python hl_lines="2 6-11 13-19" -{!../../../docs_src/cors/tutorial001.py!} +{!../../docs_src/cors/tutorial001.py!} ``` `CORSMiddleware` 에서 ì‚Źìš©í•˜ëŠ” êž°ëłž ë§€ê°œëł€ìˆ˜ëŠ” ì œí•œì ìŽëŻ€ëĄœ, 람띌우저가 ꔐ찚-도메읞 상황에서 íŠč정한 출ìȘ, 메소드, 헀더 등을 ì‚Źìš©í•  수 ìžˆë„ëĄ 하렀멎 읎듀을 ëȘ…ì‹œì ìœŒëĄœ 허용핎알 합니닀. diff --git a/docs/ko/docs/tutorial/debugging.md b/docs/ko/docs/tutorial/debugging.md index cb45e5169..27e8f9abf 100644 --- a/docs/ko/docs/tutorial/debugging.md +++ b/docs/ko/docs/tutorial/debugging.md @@ -7,7 +7,7 @@ FastAPI ì• í”ŒëŠŹìŒ€ìŽì…˜ì—ì„œ `uvicorn`을 직접 ìž„íŹíŠží•˜ì—Ź 싀행합니닀 ```Python hl_lines="1 15" -{!../../../docs_src/debugging/tutorial001.py!} +{!../../docs_src/debugging/tutorial001.py!} ``` ### `__name__ == "__main__"` 에 ëŒ€í•˜ì—Ź diff --git a/docs/ko/docs/tutorial/dependencies/classes-as-dependencies.md b/docs/ko/docs/tutorial/dependencies/classes-as-dependencies.md index 259fe4b6d..7430efbb4 100644 --- a/docs/ko/docs/tutorial/dependencies/classes-as-dependencies.md +++ b/docs/ko/docs/tutorial/dependencies/classes-as-dependencies.md @@ -9,7 +9,7 @@ //// tab | íŒŒìŽìŹ 3.6 읎상 ```Python hl_lines="9" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | íŒŒìŽìŹ 3.10 읎상 ```Python hl_lines="7" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -84,7 +84,7 @@ FastAPI가 ì‹€ì§ˆì ìœŒëĄœ 확읞하는 êČƒì€ "혞출 가늄성"(핚수, 큮래 //// tab | íŒŒìŽìŹ 3.6 읎상 ```Python hl_lines="11-15" -{!> ../../../docs_src/dependencies/tutorial002.py!} +{!> ../../docs_src/dependencies/tutorial002.py!} ``` //// @@ -92,7 +92,7 @@ FastAPI가 ì‹€ì§ˆì ìœŒëĄœ 확읞하는 êČƒì€ "혞출 가늄성"(핚수, 큮래 //// tab | íŒŒìŽìŹ 3.10 읎상 ```Python hl_lines="9-13" -{!> ../../../docs_src/dependencies/tutorial002_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_py310.py!} ``` //// @@ -102,7 +102,7 @@ FastAPI가 ì‹€ì§ˆì ìœŒëĄœ 확읞하는 êČƒì€ "혞출 가늄성"(핚수, 큮래 //// tab | íŒŒìŽìŹ 3.6 읎상 ```Python hl_lines="12" -{!> ../../../docs_src/dependencies/tutorial002.py!} +{!> ../../docs_src/dependencies/tutorial002.py!} ``` //// @@ -110,7 +110,7 @@ FastAPI가 ì‹€ì§ˆì ìœŒëĄœ 확읞하는 êČƒì€ "혞출 가늄성"(핚수, 큮래 //// tab | íŒŒìŽìŹ 3.10 읎상 ```Python hl_lines="10" -{!> ../../../docs_src/dependencies/tutorial002_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_py310.py!} ``` //// @@ -120,7 +120,7 @@ FastAPI가 ì‹€ì§ˆì ìœŒëĄœ 확읞하는 êČƒì€ "혞출 가늄성"(핚수, 큮래 //// tab | íŒŒìŽìŹ 3.6 읎상 ```Python hl_lines="9" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -128,7 +128,7 @@ FastAPI가 ì‹€ì§ˆì ìœŒëĄœ 확읞하는 êČƒì€ "혞출 가늄성"(핚수, 큮래 //// tab | íŒŒìŽìŹ 3.10 읎상 ```Python hl_lines="6" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -150,7 +150,7 @@ FastAPI가 ì‹€ì§ˆì ìœŒëĄœ 확읞하는 êČƒì€ "혞출 가늄성"(핚수, 큮래 //// tab | íŒŒìŽìŹ 3.6 읎상 ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial002.py!} +{!> ../../docs_src/dependencies/tutorial002.py!} ``` //// @@ -158,7 +158,7 @@ FastAPI가 ì‹€ì§ˆì ìœŒëĄœ 확읞하는 êČƒì€ "혞출 가늄성"(핚수, 큮래 //// tab | íŒŒìŽìŹ 3.10 읎상 ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial002_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_py310.py!} ``` //// @@ -203,7 +203,7 @@ commons = Depends(CommonQueryParams) //// tab | íŒŒìŽìŹ 3.6 읎상 ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial003.py!} +{!> ../../docs_src/dependencies/tutorial003.py!} ``` //// @@ -211,7 +211,7 @@ commons = Depends(CommonQueryParams) //// tab | íŒŒìŽìŹ 3.10 읎상 ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial003_py310.py!} +{!> ../../docs_src/dependencies/tutorial003_py310.py!} ``` //// @@ -251,7 +251,7 @@ commons: CommonQueryParams = Depends() //// tab | íŒŒìŽìŹ 3.6 읎상 ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial004.py!} +{!> ../../docs_src/dependencies/tutorial004.py!} ``` //// @@ -259,7 +259,7 @@ commons: CommonQueryParams = Depends() //// tab | íŒŒìŽìŹ 3.10 읎상 ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial004_py310.py!} +{!> ../../docs_src/dependencies/tutorial004_py310.py!} ``` //// diff --git a/docs/ko/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md b/docs/ko/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md index bc8af488d..e71ba8546 100644 --- a/docs/ko/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md +++ b/docs/ko/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md @@ -17,7 +17,7 @@ //// tab | Python 3.9+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial006_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial006_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ //// tab | Python 3.8+ ```Python hl_lines="18" -{!> ../../../docs_src/dependencies/tutorial006_an.py!} +{!> ../../docs_src/dependencies/tutorial006_an.py!} ``` //// @@ -39,7 +39,7 @@ /// ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial006.py!} +{!> ../../docs_src/dependencies/tutorial006.py!} ``` //// @@ -75,7 +75,7 @@ //// tab | Python 3.9+ ```Python hl_lines="8 13" -{!> ../../../docs_src/dependencies/tutorial006_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial006_an_py39.py!} ``` //// @@ -83,7 +83,7 @@ //// tab | Python 3.8+ ```Python hl_lines="7 12" -{!> ../../../docs_src/dependencies/tutorial006_an.py!} +{!> ../../docs_src/dependencies/tutorial006_an.py!} ``` //// @@ -97,7 +97,7 @@ /// ```Python hl_lines="6 11" -{!> ../../../docs_src/dependencies/tutorial006.py!} +{!> ../../docs_src/dependencies/tutorial006.py!} ``` //// @@ -109,7 +109,7 @@ //// tab | Python 3.9+ ```Python hl_lines="10 15" -{!> ../../../docs_src/dependencies/tutorial006_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial006_an_py39.py!} ``` //// @@ -117,7 +117,7 @@ //// tab | Python 3.8+ ```Python hl_lines="9 14" -{!> ../../../docs_src/dependencies/tutorial006_an.py!} +{!> ../../docs_src/dependencies/tutorial006_an.py!} ``` //// @@ -131,7 +131,7 @@ /// ```Python hl_lines="8 13" -{!> ../../../docs_src/dependencies/tutorial006.py!} +{!> ../../docs_src/dependencies/tutorial006.py!} ``` //// @@ -145,7 +145,7 @@ //// tab | Python 3.9+ ```Python hl_lines="11 16" -{!> ../../../docs_src/dependencies/tutorial006_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial006_an_py39.py!} ``` //// @@ -153,7 +153,7 @@ //// tab | Python 3.8+ ```Python hl_lines="10 15" -{!> ../../../docs_src/dependencies/tutorial006_an.py!} +{!> ../../docs_src/dependencies/tutorial006_an.py!} ``` //// @@ -167,7 +167,7 @@ /// ```Python hl_lines="9 14" -{!> ../../../docs_src/dependencies/tutorial006.py!} +{!> ../../docs_src/dependencies/tutorial006.py!} ``` //// diff --git a/docs/ko/docs/tutorial/dependencies/global-dependencies.md b/docs/ko/docs/tutorial/dependencies/global-dependencies.md index 2ce2cf4f2..dd6586c3e 100644 --- a/docs/ko/docs/tutorial/dependencies/global-dependencies.md +++ b/docs/ko/docs/tutorial/dependencies/global-dependencies.md @@ -9,7 +9,7 @@ //// tab | Python 3.9+ ```Python hl_lines="16" -{!> ../../../docs_src/dependencies/tutorial012_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial012_an_py39.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | Python 3.8+ ```Python hl_lines="16" -{!> ../../../docs_src/dependencies/tutorial012_an.py!} +{!> ../../docs_src/dependencies/tutorial012_an.py!} ``` //// @@ -31,7 +31,7 @@ /// ```Python hl_lines="15" -{!> ../../../docs_src/dependencies/tutorial012.py!} +{!> ../../docs_src/dependencies/tutorial012.py!} ``` //// diff --git a/docs/ko/docs/tutorial/dependencies/index.md b/docs/ko/docs/tutorial/dependencies/index.md index 361989e2b..f7b2f1788 100644 --- a/docs/ko/docs/tutorial/dependencies/index.md +++ b/docs/ko/docs/tutorial/dependencies/index.md @@ -34,7 +34,7 @@ //// tab | Python 3.10+ ```Python hl_lines="8-9" -{!> ../../../docs_src/dependencies/tutorial001_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// @@ -42,7 +42,7 @@ //// tab | Python 3.9+ ```Python hl_lines="8-11" -{!> ../../../docs_src/dependencies/tutorial001_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py39.py!} ``` //// @@ -50,7 +50,7 @@ //// tab | Python 3.8+ ```Python hl_lines="9-12" -{!> ../../../docs_src/dependencies/tutorial001_an.py!} +{!> ../../docs_src/dependencies/tutorial001_an.py!} ``` //// @@ -64,7 +64,7 @@ /// ```Python hl_lines="6-7" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -78,7 +78,7 @@ /// ```Python hl_lines="8-11" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -116,7 +116,7 @@ FastAPI는 0.95.0 ëČ„ì „ë¶€í„° `Annotated`에 대한 지원을 (ê·žëŠŹêł  읎넌 //// tab | Python 3.10+ ```Python hl_lines="3" -{!> ../../../docs_src/dependencies/tutorial001_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// @@ -124,7 +124,7 @@ FastAPI는 0.95.0 ëČ„ì „ë¶€í„° `Annotated`에 대한 지원을 (ê·žëŠŹêł  읎넌 //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/dependencies/tutorial001_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py39.py!} ``` //// @@ -132,7 +132,7 @@ FastAPI는 0.95.0 ëČ„ì „ë¶€í„° `Annotated`에 대한 지원을 (ê·žëŠŹêł  읎넌 //// tab | Python 3.8+ ```Python hl_lines="3" -{!> ../../../docs_src/dependencies/tutorial001_an.py!} +{!> ../../docs_src/dependencies/tutorial001_an.py!} ``` //// @@ -146,7 +146,7 @@ FastAPI는 0.95.0 ëČ„ì „ë¶€í„° `Annotated`에 대한 지원을 (ê·žëŠŹêł  읎넌 /// ```Python hl_lines="1" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -160,7 +160,7 @@ FastAPI는 0.95.0 ëČ„ì „ë¶€í„° `Annotated`에 대한 지원을 (ê·žëŠŹêł  읎넌 /// ```Python hl_lines="3" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -172,7 +172,7 @@ FastAPI는 0.95.0 ëČ„ì „ë¶€í„° `Annotated`에 대한 지원을 (ê·žëŠŹêł  읎넌 //// tab | Python 3.10+ ```Python hl_lines="13 18" -{!> ../../../docs_src/dependencies/tutorial001_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// @@ -180,7 +180,7 @@ FastAPI는 0.95.0 ëČ„ì „ë¶€í„° `Annotated`에 대한 지원을 (ê·žëŠŹêł  읎넌 //// tab | Python 3.9+ ```Python hl_lines="15 20" -{!> ../../../docs_src/dependencies/tutorial001_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py39.py!} ``` //// @@ -188,7 +188,7 @@ FastAPI는 0.95.0 ëČ„ì „ë¶€í„° `Annotated`에 대한 지원을 (ê·žëŠŹêł  읎넌 //// tab | Python 3.8+ ```Python hl_lines="16 21" -{!> ../../../docs_src/dependencies/tutorial001_an.py!} +{!> ../../docs_src/dependencies/tutorial001_an.py!} ``` //// @@ -202,7 +202,7 @@ FastAPI는 0.95.0 ëČ„ì „ë¶€í„° `Annotated`에 대한 지원을 (ê·žëŠŹêł  읎넌 /// ```Python hl_lines="11 16" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -216,7 +216,7 @@ FastAPI는 0.95.0 ëČ„ì „ë¶€í„° `Annotated`에 대한 지원을 (ê·žëŠŹêł  읎넌 /// ```Python hl_lines="15 20" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -279,7 +279,7 @@ commons: Annotated[dict, Depends(common_parameters)] //// tab | Python 3.10+ ```Python hl_lines="12 16 21" -{!> ../../../docs_src/dependencies/tutorial001_02_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_02_an_py310.py!} ``` //// @@ -287,7 +287,7 @@ commons: Annotated[dict, Depends(common_parameters)] //// tab | Python 3.9+ ```Python hl_lines="14 18 23" -{!> ../../../docs_src/dependencies/tutorial001_02_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_02_an_py39.py!} ``` //// @@ -295,7 +295,7 @@ commons: Annotated[dict, Depends(common_parameters)] //// tab | Python 3.8+ ```Python hl_lines="15 19 24" -{!> ../../../docs_src/dependencies/tutorial001_02_an.py!} +{!> ../../docs_src/dependencies/tutorial001_02_an.py!} ``` //// diff --git a/docs/ko/docs/tutorial/encoder.md b/docs/ko/docs/tutorial/encoder.md index b8e87449c..732566d6d 100644 --- a/docs/ko/docs/tutorial/encoder.md +++ b/docs/ko/docs/tutorial/encoder.md @@ -21,7 +21,7 @@ JSON 혾환 가늄 데읎터만 수신하는 `fake_db` 데읎터ëČ ìŽìŠ€ê°€ ìĄŽ Pydantic ëȘšëžêłŒ 같은 객ìČŽë„Œ ë°›êł  JSON 혾환 가늄한 ëČ„ì „ìœŒëĄœ 반환합니닀: ```Python hl_lines="5 22" -{!../../../docs_src/encoder/tutorial001.py!} +{!../../docs_src/encoder/tutorial001.py!} ``` 읎 예시는 Pydantic ëȘšëžì„ `dict`로, `datetime` 형식을 `str`로 ëł€í™˜í•©ë‹ˆë‹€. diff --git a/docs/ko/docs/tutorial/extra-data-types.md b/docs/ko/docs/tutorial/extra-data-types.md index df3c7a06e..8baaa64fc 100644 --- a/docs/ko/docs/tutorial/extra-data-types.md +++ b/docs/ko/docs/tutorial/extra-data-types.md @@ -58,7 +58,7 @@ //// tab | Python 3.10+ ```Python hl_lines="1 3 12-16" -{!> ../../../docs_src/extra_data_types/tutorial001_an_py310.py!} +{!> ../../docs_src/extra_data_types/tutorial001_an_py310.py!} ``` //// @@ -66,7 +66,7 @@ //// tab | Python 3.9+ ```Python hl_lines="1 3 12-16" -{!> ../../../docs_src/extra_data_types/tutorial001_an_py39.py!} +{!> ../../docs_src/extra_data_types/tutorial001_an_py39.py!} ``` //// @@ -74,7 +74,7 @@ //// tab | Python 3.8+ ```Python hl_lines="1 3 13-17" -{!> ../../../docs_src/extra_data_types/tutorial001_an.py!} +{!> ../../docs_src/extra_data_types/tutorial001_an.py!} ``` //// @@ -88,7 +88,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="1 2 11-15" -{!> ../../../docs_src/extra_data_types/tutorial001_py310.py!} +{!> ../../docs_src/extra_data_types/tutorial001_py310.py!} ``` //// @@ -102,7 +102,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="1 2 12-16" -{!> ../../../docs_src/extra_data_types/tutorial001.py!} +{!> ../../docs_src/extra_data_types/tutorial001.py!} ``` //// @@ -112,7 +112,7 @@ Prefer to use the `Annotated` version if possible. //// tab | Python 3.10+ ```Python hl_lines="18-19" -{!> ../../../docs_src/extra_data_types/tutorial001_an_py310.py!} +{!> ../../docs_src/extra_data_types/tutorial001_an_py310.py!} ``` //// @@ -120,7 +120,7 @@ Prefer to use the `Annotated` version if possible. //// tab | Python 3.9+ ```Python hl_lines="18-19" -{!> ../../../docs_src/extra_data_types/tutorial001_an_py39.py!} +{!> ../../docs_src/extra_data_types/tutorial001_an_py39.py!} ``` //// @@ -128,7 +128,7 @@ Prefer to use the `Annotated` version if possible. //// tab | Python 3.8+ ```Python hl_lines="19-20" -{!> ../../../docs_src/extra_data_types/tutorial001_an.py!} +{!> ../../docs_src/extra_data_types/tutorial001_an.py!} ``` //// @@ -142,7 +142,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="17-18" -{!> ../../../docs_src/extra_data_types/tutorial001_py310.py!} +{!> ../../docs_src/extra_data_types/tutorial001_py310.py!} ``` //// @@ -156,7 +156,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="18-19" -{!> ../../../docs_src/extra_data_types/tutorial001.py!} +{!> ../../docs_src/extra_data_types/tutorial001.py!} ``` //// diff --git a/docs/ko/docs/tutorial/first-steps.md b/docs/ko/docs/tutorial/first-steps.md index 52e53fd89..c2c48fb3e 100644 --- a/docs/ko/docs/tutorial/first-steps.md +++ b/docs/ko/docs/tutorial/first-steps.md @@ -3,7 +3,7 @@ 가임 닚순한 FastAPI 파음은 ë‹€ìŒêłŒ 같읎 ëłŽìŒ êČƒìž…ë‹ˆë‹€: ```Python -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` 위 윔드넌 `main.py`에 ëł”ì‚Źí•©ë‹ˆë‹€. @@ -134,7 +134,7 @@ API와 톔신하는 큎띌읎얞튞(í”„ëĄ íŠžì—”ë“œ, ëȘšë°”음, IoT ì• í”ŒëŠŹìŒ€ ### 1 ë‹šêł„: `FastAPI` ìž„íŹíŠž ```Python hl_lines="1" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` `FastAPI`는 ë‹č신의 API넌 위한 ëȘšë“  Ʞ늄을 ì œêł”í•˜ëŠ” íŒŒìŽìŹ 큎래슀입니닀. @@ -150,7 +150,7 @@ API와 톔신하는 큎띌읎얞튞(í”„ëĄ íŠžì—”ë“œ, ëȘšë°”음, IoT ì• í”ŒëŠŹìŒ€ ### 2 ë‹šêł„: `FastAPI` "읞슀턎슀" 생성 ```Python hl_lines="3" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` ì—Źêž°ì—ì„œ `app` ëł€ìˆ˜ëŠ” `FastAPI` 큎래슀의 "읞슀턎슀"가 됩니닀. @@ -172,7 +172,7 @@ $ uvicorn main:app --reload 아래ìČ˜ëŸŒ 앱을 만든닀멎: ```Python hl_lines="3" -{!../../../docs_src/first_steps/tutorial002.py!} +{!../../docs_src/first_steps/tutorial002.py!} ``` 읎넌 `main.py` 파음에 ë„Łêł , `uvicorn`을 아래ìČ˜ëŸŒ 혞출핎알 합니닀: @@ -251,7 +251,7 @@ API넌 ì„€êł„í•  때 ìŒë°˜ì ìœŒëĄœ íŠč정 행동을 수행하Ʞ 위핎 íŠč정 #### *êČœëĄœ 작동 데윔레읎터* 정의 ```Python hl_lines="6" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` `@app.get("/")`은 **FastAPI**에êȌ 바로 아래에 있는 핚수가 ë‹€ìŒìœŒëĄœ 읎동하는 요ìČ­ì„ ìČ˜ëŠŹí•œë‹€ëŠ” êČƒì„ 알렀쀍니닀. @@ -307,7 +307,7 @@ API넌 ì„€êł„í•  때 ìŒë°˜ì ìœŒëĄœ íŠč정 행동을 수행하Ʞ 위핎 íŠč정 * **핚수**: 는 "데윔레읎터" 아래에 있는 핚수입니닀 (`@app.get("/")` 아래). ```Python hl_lines="7" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` 읎êČƒì€ íŒŒìŽìŹ 핚수입니닀. @@ -321,7 +321,7 @@ URL "`/`"에 대한 `GET` 작동을 ì‚Źìš©í•˜ëŠ” 요ìČ­ì„ 받을 때마닀 **Fa `async def`을 읎용하는 대신 음반 í•šìˆ˜ëĄœ 정의할 수 있슔니닀: ```Python hl_lines="7" -{!../../../docs_src/first_steps/tutorial003.py!} +{!../../docs_src/first_steps/tutorial003.py!} ``` /// note | "ì°žêł " @@ -333,7 +333,7 @@ URL "`/`"에 대한 `GET` 작동을 ì‚Źìš©í•˜ëŠ” 요ìČ­ì„ 받을 때마닀 **Fa ### 5 ë‹šêł„: 윘텐잠 반환 ```Python hl_lines="8" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` `dict`, `list`, 닚음값을 가진 `str`, `int` 등을 반환할 수 있슔니닀. diff --git a/docs/ko/docs/tutorial/header-params.md b/docs/ko/docs/tutorial/header-params.md index d403b9175..26e198869 100644 --- a/docs/ko/docs/tutorial/header-params.md +++ b/docs/ko/docs/tutorial/header-params.md @@ -7,7 +7,7 @@ 뚌저 `Header`넌 ìž„íŹíŠží•©ë‹ˆë‹€: ```Python hl_lines="3" -{!../../../docs_src/header_params/tutorial001.py!} +{!../../docs_src/header_params/tutorial001.py!} ``` ## `Header` ë§€ê°œëł€ìˆ˜ ì„ ì–ž @@ -17,7 +17,7 @@ ìČ« ëČˆì§ž 값은 êž°ëłžê°’ìŽë©°, 추가 êČ€ìŠìŽë‚˜ 얎녞테읎션 ë§€ê°œëł€ìˆ˜ ëȘšë‘ ì „ë‹Źí•  수 있슔니닀: ```Python hl_lines="9" -{!../../../docs_src/header_params/tutorial001.py!} +{!../../docs_src/header_params/tutorial001.py!} ``` /// note | "Ʞ술 ì„žë¶€ì‚Źí•­" @@ -51,7 +51,7 @@ 만앜 얞더슀윔얎넌 í•˜ìŽí”ˆìœŒëĄœ 자동 ëł€í™˜ì„ ëč„활성화핎알 할 ì–Žë–€ 읎유가 있닀멎, `Header`의 `convert_underscores` ë§€ê°œëł€ìˆ˜ë„Œ `False`로 섀정하십시였: ```Python hl_lines="10" -{!../../../docs_src/header_params/tutorial002.py!} +{!../../docs_src/header_params/tutorial002.py!} ``` /// warning | "êČœêł " @@ -71,7 +71,7 @@ 예넌 듀얎, 두 ëȈ 읎상 나타날 수 있는 `X-Token`헀더넌 선얞하렀멎, ë‹€ìŒêłŒ 같읎 작성합니닀: ```Python hl_lines="9" -{!../../../docs_src/header_params/tutorial003.py!} +{!../../docs_src/header_params/tutorial003.py!} ``` ë‹€ìŒêłŒ 같은 두 개의 HTTP 헀더넌 ì „ì†Ąí•˜ì—Ź 핮ë‹č *êČœëĄœ* 와 톔신할 êČœìš°: diff --git a/docs/ko/docs/tutorial/middleware.md b/docs/ko/docs/tutorial/middleware.md index 84f67bd26..f36f11a27 100644 --- a/docs/ko/docs/tutorial/middleware.md +++ b/docs/ko/docs/tutorial/middleware.md @@ -32,7 +32,7 @@ * `response`넌 반환하Ʞ 전에 ì¶”ê°€ëĄœ `response`넌 수정할 수 있슔니닀. ```Python hl_lines="8-9 11 14" -{!../../../docs_src/middleware/tutorial001.py!} +{!../../docs_src/middleware/tutorial001.py!} ``` /// tip | "팁" @@ -60,7 +60,7 @@ 예넌 듀얎, 요ìČ­ì„ ìˆ˜í–‰í•˜êł  응닔을 생성하는데 êčŒì§€ 걞늰 시간 값을 ê°€ì§€êł  있는 `X-Process-Time` 같은 ì‚Źìš©ìž 정의 헀더넌 추가할 수 있슔니닀. ```Python hl_lines="10 12-13" -{!../../../docs_src/middleware/tutorial001.py!} +{!../../docs_src/middleware/tutorial001.py!} ``` ## 닀넞 ëŻžë“€ì›šì–Ž diff --git a/docs/ko/docs/tutorial/path-operation-configuration.md b/docs/ko/docs/tutorial/path-operation-configuration.md index b6608a14d..6ebe613a8 100644 --- a/docs/ko/docs/tutorial/path-operation-configuration.md +++ b/docs/ko/docs/tutorial/path-operation-configuration.md @@ -17,7 +17,7 @@ 하지만 각 윔드의 ì˜ëŻžë„Œ ëȘšë„žë‹€ë©Ž, `status`에 있는 닚축 상수듀을 ì‚Źìš©í• ìˆ˜ 있슔니닀: ```Python hl_lines="3 17" -{!../../../docs_src/path_operation_configuration/tutorial001.py!} +{!../../docs_src/path_operation_configuration/tutorial001.py!} ``` 각 상태 윔드듀은 응닔에 ì‚Źìš©ë˜ë©°, OpenAPI 슀킀마에 추가됩니닀. @@ -35,7 +35,7 @@ (볎톔 닚음 `str`읞) `str`로 ê”Źì„±ëœ `list`와 핚께 ë§€ê°œëł€ìˆ˜ `tags`넌 ì „ë‹Źí•˜ì—Ź, `êČœëĄœ 작동`에 태귞넌 추가할 수 있슔니닀: ```Python hl_lines="17 22 27" -{!../../../docs_src/path_operation_configuration/tutorial002.py!} +{!../../docs_src/path_operation_configuration/tutorial002.py!} ``` ì „ë‹Źëœ 태귞듀은 OpenAPI의 슀킀마에 추가되며, 자동 ëŹžì„œ 읞터페읎슀에서 ì‚Źìš©ë©ë‹ˆë‹€: @@ -47,7 +47,7 @@ `summary`와 `description`을 추가할 수 있슔니닀: ```Python hl_lines="20-21" -{!../../../docs_src/path_operation_configuration/tutorial003.py!} +{!../../docs_src/path_operation_configuration/tutorial003.py!} ``` ## ë…ìŠ€íŠžë§ìœŒëĄœ 만든 Ʞ술 @@ -57,7 +57,7 @@ ë§ˆíŹë‹€ìšŽ 돞ëČ•ìœŒëĄœ 독슀튞링을 작성할 수 있슔니닀, 작성된 ë§ˆíŹë‹€ìšŽ 형식의 독슀튞링은 (ë§ˆíŹë‹€ìšŽì˜ ë“€ì—Źì“°êž°ë„Œ êł ë €í•˜ì—Ź) ì˜Źë°”ë„ŽêȌ 화멎에 출렄됩니닀. ```Python hl_lines="19-27" -{!../../../docs_src/path_operation_configuration/tutorial004.py!} +{!../../docs_src/path_operation_configuration/tutorial004.py!} ``` 읎는 대화형 ëŹžì„œì—ì„œ ì‚Źìš©ë©ë‹ˆë‹€: @@ -69,7 +69,7 @@ `response_description` ë§€ê°œëł€ìˆ˜ëĄœ 응닔에 ꎀ한 ì„€ëȘ…을 ëȘ…시할 수 있슔니닀: ```Python hl_lines="21" -{!../../../docs_src/path_operation_configuration/tutorial005.py!} +{!../../docs_src/path_operation_configuration/tutorial005.py!} ``` /// info | "ì •ëłŽ" @@ -93,7 +93,7 @@ OpenAPI는 각 *êČœëĄœ 작동*읎 응닔에 ꎀ한 ì„€ëȘ…을 ìš”ê”Źí•  êČƒì„ 닚음 *êČœëĄœ 작동*을 없애지 ì•Šêł  지원쀑닚을 핎알한닀멎, `deprecated` ë§€ê°œëł€ìˆ˜ë„Œ ì „ë‹Źí•˜ë©Ž 됩니닀. ```Python hl_lines="16" -{!../../../docs_src/path_operation_configuration/tutorial006.py!} +{!../../docs_src/path_operation_configuration/tutorial006.py!} ``` 대화형 ëŹžì„œì— ì§€ì›ì€‘ë‹šìŽëŒêł  표시됩니닀. diff --git a/docs/ko/docs/tutorial/path-params-numeric-validations.md b/docs/ko/docs/tutorial/path-params-numeric-validations.md index 6d3215c24..caab2d453 100644 --- a/docs/ko/docs/tutorial/path-params-numeric-validations.md +++ b/docs/ko/docs/tutorial/path-params-numeric-validations.md @@ -7,7 +7,7 @@ 뚌저 `fastapi`에서 `Path`넌 ìž„íŹíŠží•©ë‹ˆë‹€: ```Python hl_lines="3" -{!../../../docs_src/path_params_numeric_validations/tutorial001.py!} +{!../../docs_src/path_params_numeric_validations/tutorial001.py!} ``` ## 메타데읎터 ì„ ì–ž @@ -17,7 +17,7 @@ 예넌 듀얎, `title` 메타데읎터 값을 êČœëĄœ ë§€ê°œëł€ìˆ˜ `item_id`에 선얞하렀멎 ë‹€ìŒêłŒ 같읎 ìž…ë „í•  수 있슔니닀: ```Python hl_lines="10" -{!../../../docs_src/path_params_numeric_validations/tutorial001.py!} +{!../../docs_src/path_params_numeric_validations/tutorial001.py!} ``` /// note | "ì°žêł " @@ -47,7 +47,7 @@ 따띌서 핚수넌 ë‹€ìŒêłŒ 같읎 ì„ ì–ž 할 수 있슔니닀: ```Python hl_lines="7" -{!../../../docs_src/path_params_numeric_validations/tutorial002.py!} +{!../../docs_src/path_params_numeric_validations/tutorial002.py!} ``` ## 필요한 êČœìš° ë§€ê°œëł€ìˆ˜ ì •ë Źí•˜êž°, 튾멭 @@ -59,7 +59,7 @@ íŒŒìŽìŹì€ `*`ìœŒëĄœ ì•„ëŹŽëŸ° 행동도 하지 않지만, 따넎는 ë§€ê°œëł€ìˆ˜ë“€ì€ kwargs로도 알렀진 킀워드 읞자(í‚€-값 쌍)ì—Źì•Œ 핚을 읞지합니닀. êž°ëłžê°’ì„ ê°€ì§€êł  있지 않더띌도 귞렇슔니닀. ```Python hl_lines="7" -{!../../../docs_src/path_params_numeric_validations/tutorial003.py!} +{!../../docs_src/path_params_numeric_validations/tutorial003.py!} ``` ## 숫자 êČ€ìŠ: íŹê±°ë‚˜ 같음 @@ -69,7 +69,7 @@ ì—Źêž°ì„œ `ge=1`읞 êČœìš°, `item_id`는 `1`볎닀 "íŹê±°ë‚˜(`g`reater) 같은(`e`qual)" 정수형 ìˆ«ìžì—Źì•Œ 합니닀. ```Python hl_lines="8" -{!../../../docs_src/path_params_numeric_validations/tutorial004.py!} +{!../../docs_src/path_params_numeric_validations/tutorial004.py!} ``` ## 숫자 êČ€ìŠ: íŹê±°ë‚˜ 같음 및 작거나 같음 @@ -80,7 +80,7 @@ * `le`: 작거나 같은(`l`ess than or `e`qual) ```Python hl_lines="9" -{!../../../docs_src/path_params_numeric_validations/tutorial005.py!} +{!../../docs_src/path_params_numeric_validations/tutorial005.py!} ``` ## 숫자 êČ€ìŠ: 부동소수, íŹê±°ë‚˜ 및 작거나 @@ -94,7 +94,7 @@ lt 역시 ë§ˆì°Źê°€ì§€ìž…ë‹ˆë‹€. ```Python hl_lines="11" -{!../../../docs_src/path_params_numeric_validations/tutorial006.py!} +{!../../docs_src/path_params_numeric_validations/tutorial006.py!} ``` ## 요앜 diff --git a/docs/ko/docs/tutorial/path-params.md b/docs/ko/docs/tutorial/path-params.md index 67a2d899d..09a27a7b3 100644 --- a/docs/ko/docs/tutorial/path-params.md +++ b/docs/ko/docs/tutorial/path-params.md @@ -3,7 +3,7 @@ íŒŒìŽìŹì˜ íŹë§· ëŹžìžì—Ž ëŠŹí„°ëŸŽì—ì„œ ì‚Źìš©ë˜ëŠ” 돞ëČ•ì„ ìŽìš©í•˜ì—Ź êČœëĄœ "ë§€ê°œëł€ìˆ˜" 또는 "ëł€ìˆ˜"넌 ì„ ì–ží•  수 있슔니닀: ```Python hl_lines="6-7" -{!../../../docs_src/path_params/tutorial001.py!} +{!../../docs_src/path_params/tutorial001.py!} ``` êČœëĄœ ë§€ê°œëł€ìˆ˜ `item_id`의 값은 핚수의 `item_id` ìžìžëĄœ ì „ë‹Źë©ë‹ˆë‹€. @@ -19,7 +19,7 @@ íŒŒìŽìŹ 표쀀 타입 얎녞테읎션을 ì‚Źìš©í•˜ì—Ź 핚수에 있는 êČœëĄœ ë§€ê°œëł€ìˆ˜ì˜ 타입을 ì„ ì–ží•  수 있슔니닀: ```Python hl_lines="7" -{!../../../docs_src/path_params/tutorial002.py!} +{!../../docs_src/path_params/tutorial002.py!} ``` 위의 예시에서, `item_id`는 `int`로 선얞되었슔니닀. @@ -122,7 +122,7 @@ *êČœëĄœ 작동*은 ìˆœì°šì ìœŒëĄœ 싀행되Ʞ ë•ŒëŹžì— `/users/{user_id}` 읎전에 `/users/me`넌 뚌저 선얞핎알 합니닀: ```Python hl_lines="6 11" -{!../../../docs_src/path_params/tutorial003.py!} +{!../../docs_src/path_params/tutorial003.py!} ``` 귞렇지 않윌멎 `/users/{user_id}`는 `/users/me` 요ìČ­ 또한 ë§€ê°œëł€ìˆ˜ `user_id`의 값읎 `"me"`읞 êČƒìœŒëĄœ "생각하êȌ" 됩니닀. @@ -140,7 +140,7 @@ 가늄한 값듀에 핮ë‹č하는 êł ì •ëœ 값의 큎래슀 ì–ŽíŠžëŠŹë·°íŠžë“€ì„ 만듭니닀: ```Python hl_lines="1 6-9" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` /// info | "ì •ëłŽ" @@ -160,7 +160,7 @@ 생성한 엎거형 큎래슀(`ModelName`)넌 ì‚Źìš©í•˜ëŠ” 타입 ì–Žë…ží…ŒìŽì…˜ìœŒëĄœ *êČœëĄœ ë§€ê°œëł€ìˆ˜*넌 만듭니닀: ```Python hl_lines="16" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` ### ëŹžì„œ 확읞 @@ -178,7 +178,7 @@ 엎거형 `ModelName`의 *엎거형 ë©€ëȄ*넌 ëč„ꔐ할 수 있슔니닀: ```Python hl_lines="17" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` #### *엎거형 값* 가젞였Ʞ @@ -186,7 +186,7 @@ `model_name.value` 또는 ìŒë°˜ì ìœŒëĄœ `your_enum_member.value`넌 ìŽìš©í•˜ì—Ź 싀제 값(위 예시의 êČœìš° `str`)을 ê°€ì žì˜Ź 수 있슔니닀: ```Python hl_lines="20" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` /// tip | "팁" @@ -202,7 +202,7 @@ 큎띌읎얞튞에 반환하Ʞ 전에 핮ë‹č 값(읎 êČœìš° ëŹžìžì—Ž)ìœŒëĄœ ëł€í™˜ë©ë‹ˆë‹€: ```Python hl_lines="18 21 23" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` 큎띌읎얞튞는 아래의 JSON 응닔을 얻슔니닀: @@ -243,7 +243,7 @@ Starlette의 옔션을 직접 ìŽìš©í•˜ì—Ź ë‹€ìŒêłŒ 같은 URL을 ì‚Źìš©í•šìœŒ 따띌서 ë‹€ìŒêłŒ 같읎 ì‚Źìš©í•  수 있슔니닀: ```Python hl_lines="6" -{!../../../docs_src/path_params/tutorial004.py!} +{!../../docs_src/path_params/tutorial004.py!} ``` /// tip | "팁" diff --git a/docs/ko/docs/tutorial/query-params-str-validations.md b/docs/ko/docs/tutorial/query-params-str-validations.md index 11193950b..e44f6dd16 100644 --- a/docs/ko/docs/tutorial/query-params-str-validations.md +++ b/docs/ko/docs/tutorial/query-params-str-validations.md @@ -5,7 +5,7 @@ 읎 응용 í”„ëĄœê·žëžšì„ ì˜ˆëĄœ ë“€ì–ŽëłŽêČ ìŠ”ë‹ˆë‹€: ```Python hl_lines="9" -{!../../../docs_src/query_params_str_validations/tutorial001.py!} +{!../../docs_src/query_params_str_validations/tutorial001.py!} ``` ìżŒëŠŹ ë§€ê°œëł€ìˆ˜ `q`는 `Optional[str]` ìžëŁŒí˜•ìž…ë‹ˆë‹€. 슉, `str` ìžëŁŒí˜•ìŽì§€ë§Œ `None` 역시 될 수 있음을 ëœ»í•˜êł , ì‹€ì œëĄœ êž°ëłžê°’ì€ `None`읎Ʞ ë•ŒëŹžì— FastAPI는 읎 ë§€ê°œëł€ìˆ˜ê°€ 필수가 아니띌는 êČƒì„ 압니닀. @@ -27,7 +27,7 @@ FastAPI는 `q`의 êž°ëłžê°’ìŽ `= None`읎Ʞ ë•ŒëŹžì— 필수가 아님을 압 읎넌 위핎 뚌저 `fastapi`에서 `Query`넌 ìž„íŹíŠží•©ë‹ˆë‹€: ```Python hl_lines="3" -{!../../../docs_src/query_params_str_validations/tutorial002.py!} +{!../../docs_src/query_params_str_validations/tutorial002.py!} ``` ## êž°ëłžê°’ìœŒëĄœ `Query` ì‚Źìš© @@ -35,7 +35,7 @@ FastAPI는 `q`의 êž°ëłžê°’ìŽ `= None`읎Ʞ ë•ŒëŹžì— 필수가 아님을 압 읎제 `Query`넌 ë§€ê°œëł€ìˆ˜ì˜ êž°ëłžê°’ìœŒëĄœ ì‚Źìš©í•˜ì—Ź `max_length` ë§€ê°œëł€ìˆ˜ë„Œ 50ìœŒëĄœ 섀정합니닀: ```Python hl_lines="9" -{!../../../docs_src/query_params_str_validations/tutorial002.py!} +{!../../docs_src/query_params_str_validations/tutorial002.py!} ``` êž°ëłžê°’ `None`을 `Query(None)`ìœŒëĄœ ë°”êż”ì•Œ 하므로, `Query`의 ìČ« ëČˆì§ž ë§€ê°œëł€ìˆ˜ëŠ” êž°ëłžê°’ì„ 정의하는 êČƒêłŒ 같은 ëȘ©ì ìœŒëĄœ ì‚Źìš©ë©ë‹ˆë‹€. @@ -87,7 +87,7 @@ q: str = Query(None, max_length=50) ë§€ê°œëł€ìˆ˜ `min_length` 또한 추가할 수 있슔니닀: ```Python hl_lines="9" -{!../../../docs_src/query_params_str_validations/tutorial003.py!} +{!../../docs_src/query_params_str_validations/tutorial003.py!} ``` ## 정규식 추가 @@ -95,7 +95,7 @@ q: str = Query(None, max_length=50) ë§€ê°œëł€ìˆ˜ì™€ 음ìč˜í•Žì•Œ 하는 정규표현식을 정의할 수 있슔니닀: ```Python hl_lines="10" -{!../../../docs_src/query_params_str_validations/tutorial004.py!} +{!../../docs_src/query_params_str_validations/tutorial004.py!} ``` 읎 íŠč정 정규표현식은 ì „ë‹Ź 받은 ë§€ê°œëł€ìˆ˜ 값을 êČ€ì‚Źí•©ë‹ˆë‹€: @@ -115,7 +115,7 @@ q: str = Query(None, max_length=50) `min_length`가 `3`ìŽêł , êž°ëłžê°’ìŽ `"fixedquery"`읞 ìżŒëŠŹ ë§€ê°œëł€ìˆ˜ `q`넌 선얞핎뎅시닀: ```Python hl_lines="7" -{!../../../docs_src/query_params_str_validations/tutorial005.py!} +{!../../docs_src/query_params_str_validations/tutorial005.py!} ``` /// note | "ì°žêł " @@ -147,7 +147,7 @@ q: Optional[str] = Query(None, min_length=3) 귞래서 `Query`넌 í•„ìˆ˜ê°’ìœŒëĄœ 만듀얎알 할 때멎, ìČ« ëČˆì§ž ìžìžëĄœ `...`넌 ì‚Źìš©í•  수 있슔니닀: ```Python hl_lines="7" -{!../../../docs_src/query_params_str_validations/tutorial006.py!} +{!../../docs_src/query_params_str_validations/tutorial006.py!} ``` /// info | "ì •ëłŽ" @@ -165,7 +165,7 @@ q: Optional[str] = Query(None, min_length=3) 예넌 듀얎, URL에서 ì—ŹëŸŹëȈ 나였는 `q` ìżŒëŠŹ ë§€ê°œëł€ìˆ˜ë„Œ 선얞하렀멎 ë‹€ìŒêłŒ 같읎 작성할 수 있슔니닀: ```Python hl_lines="9" -{!../../../docs_src/query_params_str_validations/tutorial011.py!} +{!../../docs_src/query_params_str_validations/tutorial011.py!} ``` 아래와 같은 URL을 ì‚Źìš©í•©ë‹ˆë‹€: @@ -202,7 +202,7 @@ http://localhost:8000/items/?q=foo&q=bar ê·žëŠŹêł  ì œêł”ëœ 값읎 없윌멎 êž°ëłž `list` 값을 정의할 수도 있슔니닀: ```Python hl_lines="9" -{!../../../docs_src/query_params_str_validations/tutorial012.py!} +{!../../docs_src/query_params_str_validations/tutorial012.py!} ``` ì•„ëž˜ëĄœ 읎동한닀멎: @@ -227,7 +227,7 @@ http://localhost:8000/items/ `List[str]` 대신 `list`넌 직접 ì‚Źìš©í•  수도 있슔니닀: ```Python hl_lines="7" -{!../../../docs_src/query_params_str_validations/tutorial013.py!} +{!../../docs_src/query_params_str_validations/tutorial013.py!} ``` /// note | "ì°žêł " @@ -255,13 +255,13 @@ http://localhost:8000/items/ `title`을 추가할 수 있슔니닀: ```Python hl_lines="10" -{!../../../docs_src/query_params_str_validations/tutorial007.py!} +{!../../docs_src/query_params_str_validations/tutorial007.py!} ``` ê·žëŠŹêł  `description`도 추가할 수 있슔니닀: ```Python hl_lines="13" -{!../../../docs_src/query_params_str_validations/tutorial008.py!} +{!../../docs_src/query_params_str_validations/tutorial008.py!} ``` ## 별ìč­ ë§€ê°œëł€ìˆ˜ @@ -283,7 +283,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems 읎럎 êČœìš° `alias`넌 ì„ ì–ží•  수 있윌며, 핮ë‹č 별ìč­ì€ ë§€ê°œëł€ìˆ˜ 값을 찟는 데 ì‚Źìš©ë©ë‹ˆë‹€: ```Python hl_lines="9" -{!../../../docs_src/query_params_str_validations/tutorial009.py!} +{!../../docs_src/query_params_str_validations/tutorial009.py!} ``` ## ë§€ê°œëł€ìˆ˜ ì‚Źìš©í•˜ì§€ 않êȌ 하Ʞ @@ -295,7 +295,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems 귞렇닀멎 `deprecated=True` ë§€ê°œëł€ìˆ˜ë„Œ `Query`로 ì „ë‹Źí•©ë‹ˆë‹€: ```Python hl_lines="18" -{!../../../docs_src/query_params_str_validations/tutorial010.py!} +{!../../docs_src/query_params_str_validations/tutorial010.py!} ``` ëŹžì„œê°€ 아래와 같읎 ëłŽìŒêČë‹ˆë‹€: diff --git a/docs/ko/docs/tutorial/query-params.md b/docs/ko/docs/tutorial/query-params.md index e71444c18..b2a946c09 100644 --- a/docs/ko/docs/tutorial/query-params.md +++ b/docs/ko/docs/tutorial/query-params.md @@ -3,7 +3,7 @@ êČœëĄœ ë§€ê°œëł€ìˆ˜ì˜ 음부가 아닌 닀넞 핚수 ë§€ê°œëł€ìˆ˜ë„Œ 선얞하멎 "ìżŒëŠŹ" ë§€ê°œëł€ìˆ˜ëĄœ 자동 핎석합니닀. ```Python hl_lines="9" -{!../../../docs_src/query_params/tutorial001.py!} +{!../../docs_src/query_params/tutorial001.py!} ``` ìżŒëŠŹëŠ” URL에서 `?` 후에 ë‚˜ì˜€êł  `&`ìœŒëĄœ ê”Źë¶„ë˜ëŠ” í‚€-값 쌍의 집합입니닀. @@ -64,7 +64,7 @@ http://127.0.0.1:8000/items/?skip=20 같은 ë°©ëČ•ìœŒëĄœ êž°ëłžê°’ì„ `None`ìœŒëĄœ ì„€ì •í•˜ì—Ź 선택적 ë§€ê°œëł€ìˆ˜ë„Œ ì„ ì–ží•  수 있슔니닀: ```Python hl_lines="9" -{!../../../docs_src/query_params/tutorial002.py!} +{!../../docs_src/query_params/tutorial002.py!} ``` 읎 êČœìš° 핚수 ë§€ê°œëł€ìˆ˜ `q`는 선택적읎며 êž°ëłžê°’ìœŒëĄœ `None` 값읎 됩니닀. @@ -88,7 +88,7 @@ FastAPI는 `q`가 `= None`ìŽëŻ€ëĄœ 선택적읎띌는 êČƒì„ 읞지합니닀. `bool` í˜•ìœŒëĄœ ì„ ì–ží•  수도 ìžˆêł , 아래ìČ˜ëŸŒ ëł€í™˜ë©ë‹ˆë‹€: ```Python hl_lines="9" -{!../../../docs_src/query_params/tutorial003.py!} +{!../../docs_src/query_params/tutorial003.py!} ``` 읎 êČœìš°, ì•„ëž˜ëĄœ 읎동하멎: @@ -133,7 +133,7 @@ http://127.0.0.1:8000/items/foo?short=yes ë§€ê°œëł€ìˆ˜ë“€ì€ ìŽëŠ„ìœŒëĄœ 감지됩니닀: ```Python hl_lines="8 10" -{!../../../docs_src/query_params/tutorial004.py!} +{!../../docs_src/query_params/tutorial004.py!} ``` ## 필수 ìżŒëŠŹ ë§€ê°œëł€ìˆ˜ @@ -145,7 +145,7 @@ http://127.0.0.1:8000/items/foo?short=yes ê·žëŸŹë‚˜ ìżŒëŠŹ ë§€ê°œëł€ìˆ˜ë„Œ í•„ìˆ˜ëĄœ 만듀렀멎 닚순히 êž°ëłžê°’ì„ 선얞하지 않윌멎 됩니닀: ```Python hl_lines="6-7" -{!../../../docs_src/query_params/tutorial005.py!} +{!../../docs_src/query_params/tutorial005.py!} ``` ì—Źêž° ìżŒëŠŹ ë§€ê°œëł€ìˆ˜ `needy`는 `str`형읞 필수 ìżŒëŠŹ ë§€ê°œëł€ìˆ˜ìž…ë‹ˆë‹€. @@ -191,7 +191,7 @@ http://127.0.0.1:8000/items/foo-item?needy=sooooneedy ê·žëŠŹêł  ëŹŒëĄ , 음부 ë§€ê°œëł€ìˆ˜ëŠ” í•„ìˆ˜ëĄœ, 닀넞 음부는 êž°ëłžê°’ì„, 또 닀넞 음부는 ì„ íƒì ìœŒëĄœ ì„ ì–ží•  수 있슔니닀: ```Python hl_lines="10" -{!../../../docs_src/query_params/tutorial006.py!} +{!../../docs_src/query_params/tutorial006.py!} ``` 위 예시에서는 3가지 ìżŒëŠŹ ë§€ê°œëł€ìˆ˜ê°€ 있슔니닀: diff --git a/docs/ko/docs/tutorial/request-files.md b/docs/ko/docs/tutorial/request-files.md index b7781ef5e..40579dd51 100644 --- a/docs/ko/docs/tutorial/request-files.md +++ b/docs/ko/docs/tutorial/request-files.md @@ -17,7 +17,7 @@ `fastapi` 에서 `File` êłŒ `UploadFile` 을 ìž„íŹíŠž 합니닀: ```Python hl_lines="1" -{!../../../docs_src/request_files/tutorial001.py!} +{!../../docs_src/request_files/tutorial001.py!} ``` ## `File` ë§€ê°œëł€ìˆ˜ 정의 @@ -25,7 +25,7 @@ `Body` 및 `Form` êłŒ 동음한 ë°©ì‹ìœŒëĄœ 파음의 ë§€ê°œëł€ìˆ˜ë„Œ 생성합니닀: ```Python hl_lines="7" -{!../../../docs_src/request_files/tutorial001.py!} +{!../../docs_src/request_files/tutorial001.py!} ``` /// info | "ì •ëłŽ" @@ -55,7 +55,7 @@ File의 ëłžëŹžì„ ì„ ì–ží•  때, ë§€ê°œëł€ìˆ˜ê°€ ìżŒëŠŹ ë§€ê°œëł€ìˆ˜ 또는 ëłž `File` ë§€ê°œëł€ìˆ˜ë„Œ `UploadFile` íƒ€ìž…ìœŒëĄœ 정의합니닀: ```Python hl_lines="12" -{!../../../docs_src/request_files/tutorial001.py!} +{!../../docs_src/request_files/tutorial001.py!} ``` `UploadFile` 을 ì‚Źìš©í•˜ëŠ” êČƒì€ `bytes` êłŒ ëč„ꔐ핎 ë‹€ìŒêłŒ 같은 임점읎 있슔니닀: @@ -143,7 +143,7 @@ HTML의 폌듀(`
`)읎 서ëČ„ì— 데읎터넌 ì „ì†Ąí•˜ëŠ” 방식은 읎 Ʞ늄을 ì‚Źìš©í•˜êž° 위핎 , `bytes` 의 `List` 또는 `UploadFile` 넌 선얞하Ʞ 바랍니닀: ```Python hl_lines="10 15" -{!../../../docs_src/request_files/tutorial002.py!} +{!../../docs_src/request_files/tutorial002.py!} ``` ì„ ì–ží•œëŒ€ëĄœ, `bytes` 의 `list` 또는 `UploadFile` 듀을 ì „ì†Ąë°›ì„ êČƒìž…ë‹ˆë‹€. diff --git a/docs/ko/docs/tutorial/request-forms-and-files.md b/docs/ko/docs/tutorial/request-forms-and-files.md index 0867414ea..24501fe34 100644 --- a/docs/ko/docs/tutorial/request-forms-and-files.md +++ b/docs/ko/docs/tutorial/request-forms-and-files.md @@ -13,7 +13,7 @@ ## `File` 및 `Form` ì—…ëĄœë“œ ```Python hl_lines="1" -{!../../../docs_src/request_forms_and_files/tutorial001.py!} +{!../../docs_src/request_forms_and_files/tutorial001.py!} ``` ## `File` 및 `Form` ë§€ê°œëł€ìˆ˜ 정의 @@ -21,7 +21,7 @@ `Body` 및 `Query`와 동음한 ë°©ì‹ìœŒëĄœ íŒŒìŒêłŒ 폌의 ë§€ê°œëł€ìˆ˜ë„Œ 생성합니닀: ```Python hl_lines="8" -{!../../../docs_src/request_forms_and_files/tutorial001.py!} +{!../../docs_src/request_forms_and_files/tutorial001.py!} ``` íŒŒìŒêłŒ 폌 필드는 폌 데읎터 í˜•ì‹ìœŒëĄœ ì—…ëĄœë“œë˜ì–Ž íŒŒìŒêłŒ 폌 필드로 ì „ë‹Źë©ë‹ˆë‹€. diff --git a/docs/ko/docs/tutorial/response-model.md b/docs/ko/docs/tutorial/response-model.md index fc74a60b3..74034e34d 100644 --- a/docs/ko/docs/tutorial/response-model.md +++ b/docs/ko/docs/tutorial/response-model.md @@ -9,7 +9,7 @@ * Ʞ타. ```Python hl_lines="17" -{!../../../docs_src/response_model/tutorial001.py!} +{!../../docs_src/response_model/tutorial001.py!} ``` /// note | "ì°žêł " @@ -42,13 +42,13 @@ FastAPI는 읎 `response_model`넌 ì‚Źìš©í•˜ì—Ź: ì—Źêž°ì„œ ìš°ëŠŹëŠ” 평묾 ëč„ë°€ëČˆí˜žë„Œ 포핹하는 `UserIn` ëȘšëžì„ 선얞합니닀: ```Python hl_lines="9 11" -{!../../../docs_src/response_model/tutorial002.py!} +{!../../docs_src/response_model/tutorial002.py!} ``` ê·žëŠŹêł  읎 ëȘšëžì„ ì‚Źìš©í•˜ì—Ź 입렄을 ì„ ì–ží•˜êł  같은 ëȘšëžëĄœ 출렄을 선얞합니닀: ```Python hl_lines="17-18" -{!../../../docs_src/response_model/tutorial002.py!} +{!../../docs_src/response_model/tutorial002.py!} ``` 읎제 람띌우저가 ëč„ë°€ëȈ혾로 ì‚Źìš©ìžë„Œ 만듀 때마닀 API는 ì‘ë‹”ìœŒëĄœ 동음한 ëč„ë°€ëČˆí˜žë„Œ 반환합니닀. @@ -68,19 +68,19 @@ FastAPI는 읎 `response_model`넌 ì‚Źìš©í•˜ì—Ź: 대신 평묾 ëč„ë°€ëȈ혾로 ìž…ë „ ëȘšëžì„ ë§Œë“€êł  핮ë‹č ëč„ë°€ëȈ혞 없읎 출렄 ëȘšëžì„ 만듀 수 있슔니닀: ```Python hl_lines="9 11 16" -{!../../../docs_src/response_model/tutorial003.py!} +{!../../docs_src/response_model/tutorial003.py!} ``` ì—Źêž°ì„œ *êČœëĄœ 작동 핚수*가 ëč„ë°€ëČˆí˜žë„Œ 포핹하는 동음한 ìž…ë „ ì‚Źìš©ìžë„Œ 반환할지띌도: ```Python hl_lines="24" -{!../../../docs_src/response_model/tutorial003.py!} +{!../../docs_src/response_model/tutorial003.py!} ``` ...`response_model`을 `UserOut` ëȘšëžëĄœ 선얞했Ʞ ë•ŒëŹžì— ëč„ë°€ëČˆí˜žë„Œ íŹí•ší•˜ì§€ 않슔니닀: ```Python hl_lines="22" -{!../../../docs_src/response_model/tutorial003.py!} +{!../../docs_src/response_model/tutorial003.py!} ``` 따띌서 **FastAPI**는 출렄 ëȘšëžì—ì„œ 선얞하지 않은 ëȘšë“  데읎터넌 (Pydantic을 ì‚Źìš©í•˜ì—Ź) 필터링합니닀. @@ -100,7 +100,7 @@ FastAPI는 읎 `response_model`넌 ì‚Źìš©í•˜ì—Ź: 응닔 ëȘšëžì€ 아래와 같읎 êž°ëłžê°’ì„ 가질 수 있슔니닀: ```Python hl_lines="11 13-14" -{!../../../docs_src/response_model/tutorial004.py!} +{!../../docs_src/response_model/tutorial004.py!} ``` * `description: Optional[str] = None`은 êž°ëłžê°’ìœŒëĄœ `None`을 갖슔니닀. @@ -116,7 +116,7 @@ FastAPI는 읎 `response_model`넌 ì‚Źìš©í•˜ì—Ź: *êČœëĄœ 작동 데윔레읎터* ë§€ê°œëł€ìˆ˜ë„Œ `response_model_exclude_unset=True`로 섀정 할 수 있슔니닀: ```Python hl_lines="24" -{!../../../docs_src/response_model/tutorial004.py!} +{!../../docs_src/response_model/tutorial004.py!} ``` ìŽëŸŹí•œ êž°ëłžê°’ì€ 응닔에 íŹí•šë˜ì§€ ì•Šêł  ì‹€ì œëĄœ 섀정된 값만 íŹí•šë©ë‹ˆë‹€. @@ -208,7 +208,7 @@ Pydantic ëȘšëžìŽ 하나만 ìžˆêł  출렄에서 ​​음부 데읎터넌 제 /// ```Python hl_lines="31 37" -{!../../../docs_src/response_model/tutorial005.py!} +{!../../docs_src/response_model/tutorial005.py!} ``` /// tip | "팁" @@ -224,7 +224,7 @@ Pydantic ëȘšëžìŽ 하나만 ìžˆêł  출렄에서 ​​음부 데읎터넌 제 `list` 또는 `tuple` 대신 `set`을 ì‚Źìš©í•˜ëŠ” ëČ•ì„ 잊었더띌도, FastAPI는 `set`ìœŒëĄœ ëł€í™˜í•˜êł  ì •ìƒì ìœŒëĄœ 작동합니닀: ```Python hl_lines="31 37" -{!../../../docs_src/response_model/tutorial006.py!} +{!../../docs_src/response_model/tutorial006.py!} ``` ## 요앜 diff --git a/docs/ko/docs/tutorial/response-status-code.md b/docs/ko/docs/tutorial/response-status-code.md index 48cb49cbf..57eef6ba1 100644 --- a/docs/ko/docs/tutorial/response-status-code.md +++ b/docs/ko/docs/tutorial/response-status-code.md @@ -9,7 +9,7 @@ * Ʞ타 ```Python hl_lines="6" -{!../../../docs_src/response_status_code/tutorial001.py!} +{!../../docs_src/response_status_code/tutorial001.py!} ``` /// note | "ì°žêł " @@ -77,7 +77,7 @@ HTTP는 ì„žìžëŠŹì˜ 숫자 상태 윔드넌 응닔의 ìŒë¶€ëĄœ ì „ì†Ąí•©ë‹ˆë‹€ 상Ʞ 예시 ì°žêł : ```Python hl_lines="6" -{!../../../docs_src/response_status_code/tutorial001.py!} +{!../../docs_src/response_status_code/tutorial001.py!} ``` `201` 은 "생성됚"넌 ì˜ëŻží•˜ëŠ” 상태 윔드입니닀. @@ -87,7 +87,7 @@ HTTP는 ì„žìžëŠŹì˜ 숫자 상태 윔드넌 응닔의 ìŒë¶€ëĄœ ì „ì†Ąí•©ë‹ˆë‹€ `fastapi.status` 의 펞의 ëł€ìˆ˜ë„Œ ì‚Źìš©í•  수 있슔니닀. ```Python hl_lines="1 6" -{!../../../docs_src/response_status_code/tutorial002.py!} +{!../../docs_src/response_status_code/tutorial002.py!} ``` 읎êČƒì€ 닚순히 작업을 펾멬하êȌ 하Ʞ 위한 êČƒìœŒëĄœ, HTTP 상태 윔드와 동음한 ëČˆí˜žë„Œ ê°–êł ìžˆì§€ë§Œ, 읎넌 ì‚Źìš©í•˜ë©Ž 펞집Ʞ의 자동완성 Ʞ늄을 ì‚Źìš©í•  수 있슔니닀: diff --git a/docs/ko/docs/tutorial/schema-extra-example.md b/docs/ko/docs/tutorial/schema-extra-example.md index 7b5ccdd32..71052b334 100644 --- a/docs/ko/docs/tutorial/schema-extra-example.md +++ b/docs/ko/docs/tutorial/schema-extra-example.md @@ -11,7 +11,7 @@ //// tab | Python 3.10+ Pydantic v2 ```Python hl_lines="13-24" -{!> ../../../docs_src/schema_extra_example/tutorial001_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial001_py310.py!} ``` //// @@ -19,7 +19,7 @@ //// tab | Python 3.10+ Pydantic v1 ```Python hl_lines="13-23" -{!> ../../../docs_src/schema_extra_example/tutorial001_py310_pv1.py!} +{!> ../../docs_src/schema_extra_example/tutorial001_py310_pv1.py!} ``` //// @@ -27,7 +27,7 @@ //// tab | Python 3.8+ Pydantic v2 ```Python hl_lines="15-26" -{!> ../../../docs_src/schema_extra_example/tutorial001.py!} +{!> ../../docs_src/schema_extra_example/tutorial001.py!} ``` //// @@ -35,7 +35,7 @@ //// tab | Python 3.8+ Pydantic v1 ```Python hl_lines="15-25" -{!> ../../../docs_src/schema_extra_example/tutorial001_pv1.py!} +{!> ../../docs_src/schema_extra_example/tutorial001_pv1.py!} ``` //// @@ -83,7 +83,7 @@ Pydantic ëȘšëžêłŒ 같읎 `Field()`넌 ì‚Źìš©í•  때 추가적읞 `examples`넌 //// tab | Python 3.10+ ```Python hl_lines="2 8-11" -{!> ../../../docs_src/schema_extra_example/tutorial002_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial002_py310.py!} ``` //// @@ -91,7 +91,7 @@ Pydantic ëȘšëžêłŒ 같읎 `Field()`넌 ì‚Źìš©í•  때 추가적읞 `examples`넌 //// tab | Python 3.8+ ```Python hl_lines="4 10-13" -{!> ../../../docs_src/schema_extra_example/tutorial002.py!} +{!> ../../docs_src/schema_extra_example/tutorial002.py!} ``` //// @@ -117,7 +117,7 @@ Pydantic ëȘšëžêłŒ 같읎 `Field()`넌 ì‚Źìš©í•  때 추가적읞 `examples`넌 //// tab | Python 3.10+ ```Python hl_lines="22-29" -{!> ../../../docs_src/schema_extra_example/tutorial003_an_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial003_an_py310.py!} ``` //// @@ -125,7 +125,7 @@ Pydantic ëȘšëžêłŒ 같읎 `Field()`넌 ì‚Źìš©í•  때 추가적읞 `examples`넌 //// tab | Python 3.9+ ```Python hl_lines="22-29" -{!> ../../../docs_src/schema_extra_example/tutorial003_an_py39.py!} +{!> ../../docs_src/schema_extra_example/tutorial003_an_py39.py!} ``` //// @@ -133,7 +133,7 @@ Pydantic ëȘšëžêłŒ 같읎 `Field()`넌 ì‚Źìš©í•  때 추가적읞 `examples`넌 //// tab | Python 3.8+ ```Python hl_lines="23-30" -{!> ../../../docs_src/schema_extra_example/tutorial003_an.py!} +{!> ../../docs_src/schema_extra_example/tutorial003_an.py!} ``` //// @@ -147,7 +147,7 @@ Pydantic ëȘšëžêłŒ 같읎 `Field()`넌 ì‚Źìš©í•  때 추가적읞 `examples`넌 /// ```Python hl_lines="18-25" -{!> ../../../docs_src/schema_extra_example/tutorial003_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial003_py310.py!} ``` //// @@ -161,7 +161,7 @@ Pydantic ëȘšëžêłŒ 같읎 `Field()`넌 ì‚Źìš©í•  때 추가적읞 `examples`넌 /// ```Python hl_lines="20-27" -{!> ../../../docs_src/schema_extra_example/tutorial003.py!} +{!> ../../docs_src/schema_extra_example/tutorial003.py!} ``` //// @@ -179,7 +179,7 @@ Pydantic ëȘšëžêłŒ 같읎 `Field()`넌 ì‚Źìš©í•  때 추가적읞 `examples`넌 //// tab | Python 3.10+ ```Python hl_lines="23-38" -{!> ../../../docs_src/schema_extra_example/tutorial004_an_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial004_an_py310.py!} ``` //// @@ -187,7 +187,7 @@ Pydantic ëȘšëžêłŒ 같읎 `Field()`넌 ì‚Źìš©í•  때 추가적읞 `examples`넌 //// tab | Python 3.9+ ```Python hl_lines="23-38" -{!> ../../../docs_src/schema_extra_example/tutorial004_an_py39.py!} +{!> ../../docs_src/schema_extra_example/tutorial004_an_py39.py!} ``` //// @@ -195,7 +195,7 @@ Pydantic ëȘšëžêłŒ 같읎 `Field()`넌 ì‚Źìš©í•  때 추가적읞 `examples`넌 //// tab | Python 3.8+ ```Python hl_lines="24-39" -{!> ../../../docs_src/schema_extra_example/tutorial004_an.py!} +{!> ../../docs_src/schema_extra_example/tutorial004_an.py!} ``` //// @@ -209,7 +209,7 @@ Pydantic ëȘšëžêłŒ 같읎 `Field()`넌 ì‚Źìš©í•  때 추가적읞 `examples`넌 /// ```Python hl_lines="19-34" -{!> ../../../docs_src/schema_extra_example/tutorial004_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial004_py310.py!} ``` //// @@ -223,7 +223,7 @@ Pydantic ëȘšëžêłŒ 같읎 `Field()`넌 ì‚Źìš©í•  때 추가적읞 `examples`넌 /// ```Python hl_lines="21-36" -{!> ../../../docs_src/schema_extra_example/tutorial004.py!} +{!> ../../docs_src/schema_extra_example/tutorial004.py!} ``` //// @@ -270,7 +270,7 @@ Pydantic ëȘšëžêłŒ 같읎 `Field()`넌 ì‚Źìš©í•  때 추가적읞 `examples`넌 //// tab | Python 3.10+ ```Python hl_lines="23-49" -{!> ../../../docs_src/schema_extra_example/tutorial005_an_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial005_an_py310.py!} ``` //// @@ -278,7 +278,7 @@ Pydantic ëȘšëžêłŒ 같읎 `Field()`넌 ì‚Źìš©í•  때 추가적읞 `examples`넌 //// tab | Python 3.9+ ```Python hl_lines="23-49" -{!> ../../../docs_src/schema_extra_example/tutorial005_an_py39.py!} +{!> ../../docs_src/schema_extra_example/tutorial005_an_py39.py!} ``` //// @@ -286,7 +286,7 @@ Pydantic ëȘšëžêłŒ 같읎 `Field()`넌 ì‚Źìš©í•  때 추가적읞 `examples`넌 //// tab | Python 3.8+ ```Python hl_lines="24-50" -{!> ../../../docs_src/schema_extra_example/tutorial005_an.py!} +{!> ../../docs_src/schema_extra_example/tutorial005_an.py!} ``` //// @@ -300,7 +300,7 @@ Pydantic ëȘšëžêłŒ 같읎 `Field()`넌 ì‚Źìš©í•  때 추가적읞 `examples`넌 /// ```Python hl_lines="19-45" -{!> ../../../docs_src/schema_extra_example/tutorial005_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial005_py310.py!} ``` //// @@ -314,7 +314,7 @@ Pydantic ëȘšëžêłŒ 같읎 `Field()`넌 ì‚Źìš©í•  때 추가적읞 `examples`넌 /// ```Python hl_lines="21-47" -{!> ../../../docs_src/schema_extra_example/tutorial005.py!} +{!> ../../docs_src/schema_extra_example/tutorial005.py!} ``` //// diff --git a/docs/ko/docs/tutorial/security/get-current-user.md b/docs/ko/docs/tutorial/security/get-current-user.md index 9bf3d4ee1..56f5792a7 100644 --- a/docs/ko/docs/tutorial/security/get-current-user.md +++ b/docs/ko/docs/tutorial/security/get-current-user.md @@ -3,7 +3,7 @@ 읎전 임에서 (ì˜ìĄŽì„± ìŁŒìž… 시슀템을 êž°ë°˜ìœŒëĄœ 한)ëłŽì•ˆ 시슀템은 *êČœëĄœ 작동 핚수*에서 `str`로 `token`을 ì œêł”í–ˆìŠ”ë‹ˆë‹€: ```Python hl_lines="10" -{!../../../docs_src/security/tutorial001.py!} +{!../../docs_src/security/tutorial001.py!} ``` ê·žëŸŹë‚˜ 아직도 유용하지 않슔니닀. @@ -19,7 +19,7 @@ Pydantic을 ì‚Źìš©í•˜ì—Ź ëłžëŹžì„ 선얞하는 êČƒêłŒ 같은 ë°©ì‹ìœŒëĄœ ë‹€ //// tab | íŒŒìŽìŹ 3.7 읎상 ```Python hl_lines="5 12-16" -{!> ../../../docs_src/security/tutorial002.py!} +{!> ../../docs_src/security/tutorial002.py!} ``` //// @@ -27,7 +27,7 @@ Pydantic을 ì‚Źìš©í•˜ì—Ź ëłžëŹžì„ 선얞하는 êČƒêłŒ 같은 ë°©ì‹ìœŒëĄœ ë‹€ //// tab | íŒŒìŽìŹ 3.10 읎상 ```Python hl_lines="3 10-14" -{!> ../../../docs_src/security/tutorial002_py310.py!} +{!> ../../docs_src/security/tutorial002_py310.py!} ``` //// @@ -45,7 +45,7 @@ Pydantic을 ì‚Źìš©í•˜ì—Ź ëłžëŹžì„ 선얞하는 êČƒêłŒ 같은 ë°©ì‹ìœŒëĄœ ë‹€ //// tab | íŒŒìŽìŹ 3.7 읎상 ```Python hl_lines="25" -{!> ../../../docs_src/security/tutorial002.py!} +{!> ../../docs_src/security/tutorial002.py!} ``` //// @@ -53,7 +53,7 @@ Pydantic을 ì‚Źìš©í•˜ì—Ź ëłžëŹžì„ 선얞하는 êČƒêłŒ 같은 ë°©ì‹ìœŒëĄœ ë‹€ //// tab | íŒŒìŽìŹ 3.10 읎상 ```Python hl_lines="23" -{!> ../../../docs_src/security/tutorial002_py310.py!} +{!> ../../docs_src/security/tutorial002_py310.py!} ``` //// @@ -65,7 +65,7 @@ Pydantic을 ì‚Źìš©í•˜ì—Ź ëłžëŹžì„ 선얞하는 êČƒêłŒ 같은 ë°©ì‹ìœŒëĄœ ë‹€ //// tab | íŒŒìŽìŹ 3.7 읎상 ```Python hl_lines="19-22 26-27" -{!> ../../../docs_src/security/tutorial002.py!} +{!> ../../docs_src/security/tutorial002.py!} ``` //// @@ -73,7 +73,7 @@ Pydantic을 ì‚Źìš©í•˜ì—Ź ëłžëŹžì„ 선얞하는 êČƒêłŒ 같은 ë°©ì‹ìœŒëĄœ ë‹€ //// tab | íŒŒìŽìŹ 3.10 읎상 ```Python hl_lines="17-20 24-25" -{!> ../../../docs_src/security/tutorial002_py310.py!} +{!> ../../docs_src/security/tutorial002_py310.py!} ``` //// @@ -85,7 +85,7 @@ Pydantic을 ì‚Źìš©í•˜ì—Ź ëłžëŹžì„ 선얞하는 êČƒêłŒ 같은 ë°©ì‹ìœŒëĄœ ë‹€ //// tab | íŒŒìŽìŹ 3.7 읎상 ```Python hl_lines="31" -{!> ../../../docs_src/security/tutorial002.py!} +{!> ../../docs_src/security/tutorial002.py!} ``` //// @@ -93,7 +93,7 @@ Pydantic을 ì‚Źìš©í•˜ì—Ź ëłžëŹžì„ 선얞하는 êČƒêłŒ 같은 ë°©ì‹ìœŒëĄœ ë‹€ //// tab | íŒŒìŽìŹ 3.10 읎상 ```Python hl_lines="29" -{!> ../../../docs_src/security/tutorial002_py310.py!} +{!> ../../docs_src/security/tutorial002_py310.py!} ``` //// @@ -153,7 +153,7 @@ Pydantic ëȘšëžìž `User`로 `current_user`의 타입을 선얞하는 êČƒì„ 알 //// tab | íŒŒìŽìŹ 3.7 읎상 ```Python hl_lines="30-32" -{!> ../../../docs_src/security/tutorial002.py!} +{!> ../../docs_src/security/tutorial002.py!} ``` //// @@ -161,7 +161,7 @@ Pydantic ëȘšëžìž `User`로 `current_user`의 타입을 선얞하는 êČƒì„ 알 //// tab | íŒŒìŽìŹ 3.10 읎상 ```Python hl_lines="28-30" -{!> ../../../docs_src/security/tutorial002_py310.py!} +{!> ../../docs_src/security/tutorial002_py310.py!} ``` //// diff --git a/docs/ko/docs/tutorial/security/simple-oauth2.md b/docs/ko/docs/tutorial/security/simple-oauth2.md index 9593f96f5..fd18c1d47 100644 --- a/docs/ko/docs/tutorial/security/simple-oauth2.md +++ b/docs/ko/docs/tutorial/security/simple-oauth2.md @@ -55,7 +55,7 @@ OAuth2의 êČœìš° ëŹžìžì—ŽìŒ ëżìž…ë‹ˆë‹€. //// tab | íŒŒìŽìŹ 3.7 읎상 ```Python hl_lines="4 76" -{!> ../../../docs_src/security/tutorial003.py!} +{!> ../../docs_src/security/tutorial003.py!} ``` //// @@ -63,7 +63,7 @@ OAuth2의 êČœìš° ëŹžìžì—ŽìŒ ëżìž…ë‹ˆë‹€. //// tab | íŒŒìŽìŹ 3.10 읎상 ```Python hl_lines="2 74" -{!> ../../../docs_src/security/tutorial003_py310.py!} +{!> ../../docs_src/security/tutorial003_py310.py!} ``` //// @@ -117,7 +117,7 @@ OAuth2 ì‚Źì–‘ì€ ì‹€ì œëĄœ `password`띌는 êł ì • 값읎 있는 `grant_type` //// tab | íŒŒìŽìŹ 3.7 읎상 ```Python hl_lines="3 77-79" -{!> ../../../docs_src/security/tutorial003.py!} +{!> ../../docs_src/security/tutorial003.py!} ``` //// @@ -125,7 +125,7 @@ OAuth2 ì‚Źì–‘ì€ ì‹€ì œëĄœ `password`띌는 êł ì • 값읎 있는 `grant_type` //// tab | íŒŒìŽìŹ 3.10 읎상 ```Python hl_lines="1 75-77" -{!> ../../../docs_src/security/tutorial003_py310.py!} +{!> ../../docs_src/security/tutorial003_py310.py!} ``` //// @@ -157,7 +157,7 @@ OAuth2 ì‚Źì–‘ì€ ì‹€ì œëĄœ `password`띌는 êł ì • 값읎 있는 `grant_type` //// tab | PíŒŒìŽìŹ 3.7 읎상 ```Python hl_lines="80-83" -{!> ../../../docs_src/security/tutorial003.py!} +{!> ../../docs_src/security/tutorial003.py!} ``` //// @@ -165,7 +165,7 @@ OAuth2 ì‚Źì–‘ì€ ì‹€ì œëĄœ `password`띌는 êł ì • 값읎 있는 `grant_type` //// tab | íŒŒìŽìŹ 3.10 읎상 ```Python hl_lines="78-81" -{!> ../../../docs_src/security/tutorial003_py310.py!} +{!> ../../docs_src/security/tutorial003_py310.py!} ``` //// @@ -213,7 +213,7 @@ UserInDB( //// tab | íŒŒìŽìŹ 3.7 읎상 ```Python hl_lines="85" -{!> ../../../docs_src/security/tutorial003.py!} +{!> ../../docs_src/security/tutorial003.py!} ``` //// @@ -221,7 +221,7 @@ UserInDB( //// tab | íŒŒìŽìŹ 3.10 읎상 ```Python hl_lines="83" -{!> ../../../docs_src/security/tutorial003_py310.py!} +{!> ../../docs_src/security/tutorial003_py310.py!} ``` //// @@ -253,7 +253,7 @@ UserInDB( //// tab | íŒŒìŽìŹ 3.7 읎상 ```Python hl_lines="58-66 69-72 90" -{!> ../../../docs_src/security/tutorial003.py!} +{!> ../../docs_src/security/tutorial003.py!} ``` //// @@ -261,7 +261,7 @@ UserInDB( //// tab | íŒŒìŽìŹ 3.10 읎상 ```Python hl_lines="55-64 67-70 88" -{!> ../../../docs_src/security/tutorial003_py310.py!} +{!> ../../docs_src/security/tutorial003_py310.py!} ``` //// diff --git a/docs/ko/docs/tutorial/static-files.md b/docs/ko/docs/tutorial/static-files.md index 360aaaa6b..90a60d193 100644 --- a/docs/ko/docs/tutorial/static-files.md +++ b/docs/ko/docs/tutorial/static-files.md @@ -8,7 +8,7 @@ * íŠč정 êČœëĄœì— `StaticFiles()` 읞슀턎슀넌 "마욎튞" 합니닀. ```Python hl_lines="2 6" -{!../../../docs_src/static_files/tutorial001.py!} +{!../../docs_src/static_files/tutorial001.py!} ``` /// note | "Ʞ술적 ì„žë¶€ì‚Źí•­" diff --git a/docs/nl/docs/python-types.md b/docs/nl/docs/python-types.md index a5562b795..00052037c 100644 --- a/docs/nl/docs/python-types.md +++ b/docs/nl/docs/python-types.md @@ -23,7 +23,7 @@ Als je een Python expert bent en alles al weet over type hints, sla dan dit hoof Laten we beginnen met een eenvoudig voorbeeld: ```Python -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` Het aanroepen van dit programma leidt tot het volgende resultaat: @@ -40,7 +40,7 @@ De functie voert het volgende uit: * Voeg samen met een spatie in het midden. ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` ### Bewerk het @@ -84,7 +84,7 @@ Dat is alles. Dat zijn de "type hints": ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial002.py!} +{!../../docs_src/python_types/tutorial002.py!} ``` Dit is niet hetzelfde als het declareren van standaardwaarden zoals bij: @@ -114,7 +114,7 @@ Nu kun je de opties bekijken en er doorheen scrollen totdat je de optie vindt di Bekijk deze functie, deze heeft al type hints: ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial003.py!} +{!../../docs_src/python_types/tutorial003.py!} ``` Omdat de editor de types van de variabelen kent, krijgt u niet alleen aanvulling, maar ook controles op fouten: @@ -124,7 +124,7 @@ Omdat de editor de types van de variabelen kent, krijgt u niet alleen aanvulling Nu weet je hoe je het moet oplossen, converteer `age` naar een string met `str(age)`: ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial004.py!} +{!../../docs_src/python_types/tutorial004.py!} ``` ## Types declareren @@ -145,7 +145,7 @@ Je kunt bijvoorbeeld het volgende gebruiken: * `bytes` ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial005.py!} +{!../../docs_src/python_types/tutorial005.py!} ``` ### Generieke types met typeparameters @@ -183,7 +183,7 @@ Als type, vul `list` in. Doordat de list een type is dat enkele interne types bevat, zet je ze tussen vierkante haakjes: ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial006_py39.py!} +{!> ../../docs_src/python_types/tutorial006_py39.py!} ``` //// @@ -193,7 +193,7 @@ Doordat de list een type is dat enkele interne types bevat, zet je ze tussen vie Van `typing`, importeer `List` (met een hoofdletter `L`): ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial006.py!} +{!> ../../docs_src/python_types/tutorial006.py!} ``` Declareer de variabele met dezelfde dubbele punt (`:`) syntax. @@ -203,7 +203,7 @@ Zet als type de `List` die je hebt geĂŻmporteerd uit `typing`. Doordat de list een type is dat enkele interne types bevat, zet je ze tussen vierkante haakjes: ```Python hl_lines="4" -{!> ../../../docs_src/python_types/tutorial006.py!} +{!> ../../docs_src/python_types/tutorial006.py!} ``` //// @@ -241,7 +241,7 @@ Je kunt hetzelfde doen om `tuple`s en `set`s te declareren: //// tab | Python 3.9+ ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial007_py39.py!} +{!> ../../docs_src/python_types/tutorial007_py39.py!} ``` //// @@ -249,7 +249,7 @@ Je kunt hetzelfde doen om `tuple`s en `set`s te declareren: //// tab | Python 3.8+ ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial007.py!} +{!> ../../docs_src/python_types/tutorial007.py!} ``` //// @@ -270,7 +270,7 @@ De tweede typeparameter is voor de waarden (values) van het `dict`: //// tab | Python 3.9+ ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial008_py39.py!} +{!> ../../docs_src/python_types/tutorial008_py39.py!} ``` //// @@ -278,7 +278,7 @@ De tweede typeparameter is voor de waarden (values) van het `dict`: //// tab | Python 3.8+ ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial008.py!} +{!> ../../docs_src/python_types/tutorial008.py!} ``` //// @@ -300,7 +300,7 @@ In Python 3.10 is er ook een **nieuwe syntax** waarin je de mogelijke types kunt //// tab | Python 3.10+ ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial008b_py310.py!} +{!> ../../docs_src/python_types/tutorial008b_py310.py!} ``` //// @@ -308,7 +308,7 @@ In Python 3.10 is er ook een **nieuwe syntax** waarin je de mogelijke types kunt //// tab | Python 3.8+ ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial008b.py!} +{!> ../../docs_src/python_types/tutorial008b.py!} ``` //// @@ -322,7 +322,7 @@ Je kunt declareren dat een waarde een type kan hebben, zoals `str`, maar dat het In Python 3.6 en hoger (inclusief Python 3.10) kun je het declareren door `Optional` te importeren en te gebruiken vanuit de `typing`-module. ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009.py!} +{!../../docs_src/python_types/tutorial009.py!} ``` Door `Optional[str]` te gebruiken in plaats van alleen `str`, kan de editor je helpen fouten te detecteren waarbij je ervan uit zou kunnen gaan dat een waarde altijd een `str` is, terwijl het in werkelijkheid ook `None` zou kunnen zijn. @@ -334,7 +334,7 @@ Dit betekent ook dat je in Python 3.10 `EenType | None` kunt gebruiken: //// tab | Python 3.10+ ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial009_py310.py!} +{!> ../../docs_src/python_types/tutorial009_py310.py!} ``` //// @@ -342,7 +342,7 @@ Dit betekent ook dat je in Python 3.10 `EenType | None` kunt gebruiken: //// tab | Python 3.8+ ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial009.py!} +{!> ../../docs_src/python_types/tutorial009.py!} ``` //// @@ -350,7 +350,7 @@ Dit betekent ook dat je in Python 3.10 `EenType | None` kunt gebruiken: //// tab | Python 3.8+ alternative ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial009b.py!} +{!> ../../docs_src/python_types/tutorial009b.py!} ``` //// @@ -371,7 +371,7 @@ Het gaat alleen om de woorden en naamgeving. Maar die naamgeving kan invloed heb Laten we als voorbeeld deze functie nemen: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009c.py!} +{!../../docs_src/python_types/tutorial009c.py!} ``` De parameter `name` is gedefinieerd als `Optional[str]`, maar is **niet optioneel**, je kunt de functie niet aanroepen zonder de parameter: @@ -389,7 +389,7 @@ say_hi(name=None) # Dit werkt, None is geldig 🎉 Het goede nieuws is dat als je eenmaal Python 3.10 gebruikt, je je daar geen zorgen meer over hoeft te maken, omdat je dan gewoon `|` kunt gebruiken om unions van types te definiĂ«ren: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009c_py310.py!} +{!../../docs_src/python_types/tutorial009c_py310.py!} ``` Dan hoef je je geen zorgen te maken over namen als `Optional` en `Union`. 😎 @@ -453,13 +453,13 @@ Je kunt een klasse ook declareren als het type van een variabele. Stel dat je een klasse `Person` hebt, met een naam: ```Python hl_lines="1-3" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` Vervolgens kun je een variabele van het type `Persoon` declareren: ```Python hl_lines="6" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` Dan krijg je ook nog eens volledige editorondersteuning: @@ -487,7 +487,7 @@ Een voorbeeld uit de officiĂ«le Pydantic-documentatie: //// tab | Python 3.10+ ```Python -{!> ../../../docs_src/python_types/tutorial011_py310.py!} +{!> ../../docs_src/python_types/tutorial011_py310.py!} ``` //// @@ -495,7 +495,7 @@ Een voorbeeld uit de officiĂ«le Pydantic-documentatie: //// tab | Python 3.9+ ```Python -{!> ../../../docs_src/python_types/tutorial011_py39.py!} +{!> ../../docs_src/python_types/tutorial011_py39.py!} ``` //// @@ -503,7 +503,7 @@ Een voorbeeld uit de officiĂ«le Pydantic-documentatie: //// tab | Python 3.8+ ```Python -{!> ../../../docs_src/python_types/tutorial011.py!} +{!> ../../docs_src/python_types/tutorial011.py!} ``` //// @@ -533,7 +533,7 @@ Python heeft ook een functie waarmee je **extra ../../../docs_src/python_types/tutorial013_py39.py!} +{!> ../../docs_src/python_types/tutorial013_py39.py!} ``` //// @@ -545,7 +545,7 @@ In versies lager dan Python 3.9 importeer je `Annotated` vanuit `typing_extensio Het wordt al geĂŻnstalleerd met **FastAPI**. ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial013.py!} +{!> ../../docs_src/python_types/tutorial013.py!} ``` //// diff --git a/docs/pl/docs/tutorial/first-steps.md b/docs/pl/docs/tutorial/first-steps.md index 8f1b9b922..99c425f12 100644 --- a/docs/pl/docs/tutorial/first-steps.md +++ b/docs/pl/docs/tutorial/first-steps.md @@ -3,7 +3,7 @@ Najprostszy plik FastAPI moĆŒe wyglądać tak: ```Python -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` Skopiuj to do pliku `main.py`. @@ -134,7 +134,7 @@ MoĆŒesz go rĂłwnieĆŒ uĆŒyć do automatycznego generowania kodu dla klientĂłw, kt ### Krok 1: zaimportuj `FastAPI` ```Python hl_lines="1" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` `FastAPI` jest klasą, ktĂłra zapewnia wszystkie funkcjonalnoƛci Twojego API. @@ -150,7 +150,7 @@ Oznacza to, ĆŒe moĆŒesz korzystać ze wszystkich funkcjonalnoƛci ../../../docs_src/additional_status_codes/tutorial001_an_py310.py!} +{!> ../../docs_src/additional_status_codes/tutorial001_an_py310.py!} ``` //// @@ -25,7 +25,7 @@ Para conseguir isso, importe `JSONResponse` e retorne o seu conteĂșdo diretament //// tab | Python 3.9+ ```Python hl_lines="4 25" -{!> ../../../docs_src/additional_status_codes/tutorial001_an_py39.py!} +{!> ../../docs_src/additional_status_codes/tutorial001_an_py39.py!} ``` //// @@ -33,7 +33,7 @@ Para conseguir isso, importe `JSONResponse` e retorne o seu conteĂșdo diretament //// tab | Python 3.8+ ```Python hl_lines="4 26" -{!> ../../../docs_src/additional_status_codes/tutorial001_an.py!} +{!> ../../docs_src/additional_status_codes/tutorial001_an.py!} ``` //// @@ -47,7 +47,7 @@ Faça uso da versĂŁo `Annotated` quando possĂ­vel. /// ```Python hl_lines="2 23" -{!> ../../../docs_src/additional_status_codes/tutorial001_py310.py!} +{!> ../../docs_src/additional_status_codes/tutorial001_py310.py!} ``` //// @@ -61,7 +61,7 @@ Faça uso da versĂŁo `Annotated` quando possĂ­vel. /// ```Python hl_lines="4 25" -{!> ../../../docs_src/additional_status_codes/tutorial001.py!} +{!> ../../docs_src/additional_status_codes/tutorial001.py!} ``` //// diff --git a/docs/pt/docs/advanced/advanced-dependencies.md b/docs/pt/docs/advanced/advanced-dependencies.md index 5a7b921b2..a656390a4 100644 --- a/docs/pt/docs/advanced/advanced-dependencies.md +++ b/docs/pt/docs/advanced/advanced-dependencies.md @@ -21,7 +21,7 @@ Para fazer isso, nĂłs declaramos o mĂ©todo `__call__`: //// tab | Python 3.9+ ```Python hl_lines="12" -{!> ../../../docs_src/dependencies/tutorial011_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial011_an_py39.py!} ``` //// @@ -29,7 +29,7 @@ Para fazer isso, nĂłs declaramos o mĂ©todo `__call__`: //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/dependencies/tutorial011_an.py!} +{!> ../../docs_src/dependencies/tutorial011_an.py!} ``` //// @@ -43,7 +43,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="10" -{!> ../../../docs_src/dependencies/tutorial011.py!} +{!> ../../docs_src/dependencies/tutorial011.py!} ``` //// @@ -57,7 +57,7 @@ E agora, nĂłs podemos utilizar o `__init__` para declarar os parĂąmetros da inst //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/dependencies/tutorial011_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial011_an_py39.py!} ``` //// @@ -65,7 +65,7 @@ E agora, nĂłs podemos utilizar o `__init__` para declarar os parĂąmetros da inst //// tab | Python 3.8+ ```Python hl_lines="8" -{!> ../../../docs_src/dependencies/tutorial011_an.py!} +{!> ../../docs_src/dependencies/tutorial011_an.py!} ``` //// @@ -79,7 +79,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="7" -{!> ../../../docs_src/dependencies/tutorial011.py!} +{!> ../../docs_src/dependencies/tutorial011.py!} ``` //// @@ -93,7 +93,7 @@ NĂłs poderĂ­amos criar uma instĂąncia desta classe com: //// tab | Python 3.9+ ```Python hl_lines="18" -{!> ../../../docs_src/dependencies/tutorial011_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial011_an_py39.py!} ``` //// @@ -101,7 +101,7 @@ NĂłs poderĂ­amos criar uma instĂąncia desta classe com: //// tab | Python 3.8+ ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial011_an.py!} +{!> ../../docs_src/dependencies/tutorial011_an.py!} ``` //// @@ -115,7 +115,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="16" -{!> ../../../docs_src/dependencies/tutorial011.py!} +{!> ../../docs_src/dependencies/tutorial011.py!} ``` //// @@ -137,7 +137,7 @@ checker(q="somequery") //// tab | Python 3.9+ ```Python hl_lines="22" -{!> ../../../docs_src/dependencies/tutorial011_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial011_an_py39.py!} ``` //// @@ -145,7 +145,7 @@ checker(q="somequery") //// tab | Python 3.8+ ```Python hl_lines="21" -{!> ../../../docs_src/dependencies/tutorial011_an.py!} +{!> ../../docs_src/dependencies/tutorial011_an.py!} ``` //// @@ -159,7 +159,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="20" -{!> ../../../docs_src/dependencies/tutorial011.py!} +{!> ../../docs_src/dependencies/tutorial011.py!} ``` //// diff --git a/docs/pt/docs/advanced/async-tests.md b/docs/pt/docs/advanced/async-tests.md index 7cac26262..c81d6124b 100644 --- a/docs/pt/docs/advanced/async-tests.md +++ b/docs/pt/docs/advanced/async-tests.md @@ -33,13 +33,13 @@ Para um exemplos simples, vamos considerar uma estrutura de arquivos semelhante O arquivo `main.py` teria: ```Python -{!../../../docs_src/async_tests/main.py!} +{!../../docs_src/async_tests/main.py!} ``` O arquivo `test_main.py` teria os testes para para o arquivo `main.py`, ele poderia ficar assim: ```Python -{!../../../docs_src/async_tests/test_main.py!} +{!../../docs_src/async_tests/test_main.py!} ``` ## ExecutĂĄ-lo @@ -61,7 +61,7 @@ $ pytest O marcador `@pytest.mark.anyio` informa ao pytest que esta função de teste deve ser invocada de maneira assĂ­ncrona: ```Python hl_lines="7" -{!../../../docs_src/async_tests/test_main.py!} +{!../../docs_src/async_tests/test_main.py!} ``` /// tip | "Dica" @@ -73,7 +73,7 @@ Note que a função de teste Ă© `async def` agora, no lugar de apenas `def` como EntĂŁo podemos criar um `AsyncClient` com a aplicação, e enviar requisiçÔes assĂ­ncronas para ela utilizando `await`. ```Python hl_lines="9-12" -{!../../../docs_src/async_tests/test_main.py!} +{!../../docs_src/async_tests/test_main.py!} ``` Isso Ă© equivalente a: diff --git a/docs/pt/docs/advanced/behind-a-proxy.md b/docs/pt/docs/advanced/behind-a-proxy.md index 2dfc5ca25..3c65b5a0a 100644 --- a/docs/pt/docs/advanced/behind-a-proxy.md +++ b/docs/pt/docs/advanced/behind-a-proxy.md @@ -19,7 +19,7 @@ Nesse caso, o caminho original `/app` seria servido em `/api/v1/app`. Embora todo o seu cĂłdigo esteja escrito assumindo que existe apenas `/app`. ```Python hl_lines="6" -{!../../../docs_src/behind_a_proxy/tutorial001.py!} +{!../../docs_src/behind_a_proxy/tutorial001.py!} ``` E o proxy estaria **"removendo"** o **prefixo do caminho** dinamicamente antes de transmitir a solicitação para o servidor da aplicação (provavelmente Uvicorn via CLI do FastAPI), mantendo sua aplicação convencida de que estĂĄ sendo servida em `/app`, para que vocĂȘ nĂŁo precise atualizar todo o seu cĂłdigo para incluir o prefixo `/api/v1`. @@ -99,7 +99,7 @@ VocĂȘ pode obter o `root_path` atual usado pela sua aplicação para cada solici Aqui estamos incluindo ele na mensagem apenas para fins de demonstração. ```Python hl_lines="8" -{!../../../docs_src/behind_a_proxy/tutorial001.py!} +{!../../docs_src/behind_a_proxy/tutorial001.py!} ``` EntĂŁo, se vocĂȘ iniciar o Uvicorn com: @@ -128,7 +128,7 @@ A resposta seria algo como: Alternativamente, se vocĂȘ nĂŁo tiver uma maneira de fornecer uma opção de linha de comando como `--root-path` ou equivalente, vocĂȘ pode definir o parĂąmetro `--root-path` ao criar sua aplicação FastAPI: ```Python hl_lines="3" -{!../../../docs_src/behind_a_proxy/tutorial002.py!} +{!../../docs_src/behind_a_proxy/tutorial002.py!} ``` Passar o `root_path`h para `FastAPI` seria o equivalente a passar a opção de linha de comando `--root-path` para Uvicorn ou Hypercorn. @@ -310,7 +310,7 @@ Se vocĂȘ passar uma lista personalizada de `servers` e houver um `root_path` (po Por exemplo: ```Python hl_lines="4-7" -{!../../../docs_src/behind_a_proxy/tutorial003.py!} +{!../../docs_src/behind_a_proxy/tutorial003.py!} ``` GerarĂĄ um OpenAPI schema como: @@ -359,7 +359,7 @@ A interface de documentação interagirĂĄ com o servidor que vocĂȘ selecionar. Se vocĂȘ nĂŁo quiser que o **FastAPI** inclua um servidor automĂĄtico usando o `root_path`, vocĂȘ pode usar o parĂąmetro `root_path_in_servers=False`: ```Python hl_lines="9" -{!../../../docs_src/behind_a_proxy/tutorial004.py!} +{!../../docs_src/behind_a_proxy/tutorial004.py!} ``` e entĂŁo ele nĂŁo serĂĄ incluĂ­do no OpenAPI schema. diff --git a/docs/pt/docs/advanced/events.md b/docs/pt/docs/advanced/events.md index 5f722763e..02f5b6d2b 100644 --- a/docs/pt/docs/advanced/events.md +++ b/docs/pt/docs/advanced/events.md @@ -32,7 +32,7 @@ Vamos iniciar com um exemplo e ver isso detalhadamente. NĂłs criamos uma função assĂ­ncrona chamada `lifespan()` com `yield` como este: ```Python hl_lines="16 19" -{!../../../docs_src/events/tutorial003.py!} +{!../../docs_src/events/tutorial003.py!} ``` Aqui nĂłs estamos simulando a *inicialização* custosa do carregamento do modelo colocando a (falsa) função de modelo no dicionĂĄrio com modelos de _machine learning_ antes do `yield`. Este cĂłdigo serĂĄ executado **antes** da aplicação **começar a receber requisiçÔes**, durante a *inicialização*. @@ -52,7 +52,7 @@ Talvez vocĂȘ precise inicializar uma nova versĂŁo, ou apenas cansou de executĂĄ- A primeira coisa a notar, Ă© que estamos definindo uma função assĂ­ncrona com `yield`. Isso Ă© muito semelhante Ă  DependĂȘncias com `yield`. ```Python hl_lines="14-19" -{!../../../docs_src/events/tutorial003.py!} +{!../../docs_src/events/tutorial003.py!} ``` A primeira parte da função, antes do `yield`, serĂĄ executada **antes** da aplicação inicializar. @@ -66,7 +66,7 @@ Se vocĂȘ verificar, a função estĂĄ decorada com um `@asynccontextmanager`. Que converte a função em algo chamado de "**Gerenciador de Contexto AssĂ­ncrono**". ```Python hl_lines="1 13" -{!../../../docs_src/events/tutorial003.py!} +{!../../docs_src/events/tutorial003.py!} ``` Um **gerenciador de contexto** em Python Ă© algo que vocĂȘ pode usar em uma declaração `with`, por exemplo, `open()` pode ser usado como um gerenciador de contexto: @@ -90,7 +90,7 @@ No nosso exemplo de cĂłdigo acima, nĂłs nĂŁo usamos ele diretamente, mas nĂłs pa O parĂąmetro `lifespan` da aplicação `FastAPI` usa um **Gerenciador de Contexto AssĂ­ncrono**, entĂŁo nĂłs podemos passar nosso novo gerenciador de contexto assĂ­ncrono do `lifespan` para ele. ```Python hl_lines="22" -{!../../../docs_src/events/tutorial003.py!} +{!../../docs_src/events/tutorial003.py!} ``` ## Eventos alternativos (deprecados) @@ -114,7 +114,7 @@ Essas funçÔes podem ser declaradas com `async def` ou `def` normal. Para adicionar uma função que deve rodar antes da aplicação iniciar, declare-a com o evento `"startup"`: ```Python hl_lines="8" -{!../../../docs_src/events/tutorial001.py!} +{!../../docs_src/events/tutorial001.py!} ``` Nesse caso, a função de manipulação de evento `startup` irĂĄ inicializar os itens do "banco de dados" (sĂł um `dict`) com alguns valores. @@ -128,7 +128,7 @@ E sua aplicação nĂŁo irĂĄ começar a receber requisiçÔes atĂ© que todos os m Para adicionar uma função que deve ser executada quando a aplicação estiver encerrando, declare ela com o evento `"shutdown"`: ```Python hl_lines="6" -{!../../../docs_src/events/tutorial002.py!} +{!../../docs_src/events/tutorial002.py!} ``` Aqui, a função de manipulação de evento `shutdown` irĂĄ escrever uma linha de texto `"Application shutdown"` no arquivo `log.txt`. diff --git a/docs/pt/docs/advanced/openapi-webhooks.md b/docs/pt/docs/advanced/openapi-webhooks.md index 2ccd0e819..5a0226c74 100644 --- a/docs/pt/docs/advanced/openapi-webhooks.md +++ b/docs/pt/docs/advanced/openapi-webhooks.md @@ -33,7 +33,7 @@ Webhooks estĂŁo disponĂ­veis a partir do OpenAPI 3.1.0, e possui suporte do Fast Quando vocĂȘ cria uma aplicação com o **FastAPI**, existe um atributo chamado `webhooks`, que vocĂȘ utilizar para defini-los da mesma maneira que vocĂȘ definiria as suas **operaçÔes de rotas**, utilizando por exemplo `@app.webhooks.post()`. ```Python hl_lines="9-13 36-53" -{!../../../docs_src/openapi_webhooks/tutorial001.py!} +{!../../docs_src/openapi_webhooks/tutorial001.py!} ``` Os webhooks que vocĂȘ define aparecerĂŁo no esquema do **OpenAPI** e na **pĂĄgina de documentação** gerada automaticamente. diff --git a/docs/pt/docs/advanced/response-change-status-code.md b/docs/pt/docs/advanced/response-change-status-code.md index 99695c831..2ac5eca18 100644 --- a/docs/pt/docs/advanced/response-change-status-code.md +++ b/docs/pt/docs/advanced/response-change-status-code.md @@ -21,7 +21,7 @@ VocĂȘ pode declarar um parĂąmetro do tipo `Response` em sua *função de operaç E entĂŁo vocĂȘ pode definir o `status_code` neste objeto de retorno temporal. ```Python hl_lines="1 9 12" -{!../../../docs_src/response_change_status_code/tutorial001.py!} +{!../../docs_src/response_change_status_code/tutorial001.py!} ``` E entĂŁo vocĂȘ pode retornar qualquer objeto que vocĂȘ precise, como vocĂȘ faria normalmente (um `dict`, um modelo de banco de dados, etc.). diff --git a/docs/pt/docs/advanced/response-directly.md b/docs/pt/docs/advanced/response-directly.md index fc571d39b..fd2a0eef1 100644 --- a/docs/pt/docs/advanced/response-directly.md +++ b/docs/pt/docs/advanced/response-directly.md @@ -35,7 +35,7 @@ Por exemplo, vocĂȘ nĂŁo pode colocar um modelo do Pydantic em uma `JSONResponse` Para esses casos, vocĂȘ pode usar o `jsonable_encoder` para converter seus dados antes de repassĂĄ-los para a resposta: ```Python hl_lines="6-7 21-22" -{!../../../docs_src/response_directly/tutorial001.py!} +{!../../docs_src/response_directly/tutorial001.py!} ``` /// note | Detalhes TĂ©cnicos @@ -57,7 +57,7 @@ Vamos dizer quer retornar uma resposta ../../../docs_src/security/tutorial006_an_py39.py!} +{!> ../../docs_src/security/tutorial006_an_py39.py!} ``` //// @@ -31,7 +31,7 @@ EntĂŁo, quando vocĂȘ digitar o usuĂĄrio e senha, o navegador os envia automatica //// tab | Python 3.8+ ```Python hl_lines="2 7 11" -{!> ../../../docs_src/security/tutorial006_an.py!} +{!> ../../docs_src/security/tutorial006_an.py!} ``` //// @@ -45,7 +45,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="2 6 10" -{!> ../../../docs_src/security/tutorial006.py!} +{!> ../../docs_src/security/tutorial006.py!} ``` //// @@ -71,7 +71,7 @@ EntĂŁo nĂłs podemos utilizar o `secrets.compare_digest()` para garantir que o `c //// tab | Python 3.9+ ```Python hl_lines="1 12-24" -{!> ../../../docs_src/security/tutorial007_an_py39.py!} +{!> ../../docs_src/security/tutorial007_an_py39.py!} ``` //// @@ -79,7 +79,7 @@ EntĂŁo nĂłs podemos utilizar o `secrets.compare_digest()` para garantir que o `c //// tab | Python 3.8+ ```Python hl_lines="1 12-24" -{!> ../../../docs_src/security/tutorial007_an.py!} +{!> ../../docs_src/security/tutorial007_an.py!} ``` //// @@ -93,7 +93,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="1 11-21" -{!> ../../../docs_src/security/tutorial007.py!} +{!> ../../docs_src/security/tutorial007.py!} ``` //// @@ -164,7 +164,7 @@ ApĂłs detectar que as credenciais estĂŁo incorretas, retorne um `HTTPException` //// tab | Python 3.9+ ```Python hl_lines="26-30" -{!> ../../../docs_src/security/tutorial007_an_py39.py!} +{!> ../../docs_src/security/tutorial007_an_py39.py!} ``` //// @@ -172,7 +172,7 @@ ApĂłs detectar que as credenciais estĂŁo incorretas, retorne um `HTTPException` //// tab | Python 3.8+ ```Python hl_lines="26-30" -{!> ../../../docs_src/security/tutorial007_an.py!} +{!> ../../docs_src/security/tutorial007_an.py!} ``` //// @@ -186,7 +186,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="23-27" -{!> ../../../docs_src/security/tutorial007.py!} +{!> ../../docs_src/security/tutorial007.py!} ``` //// diff --git a/docs/pt/docs/advanced/security/oauth2-scopes.md b/docs/pt/docs/advanced/security/oauth2-scopes.md index 4ad7c807e..fa4594c89 100644 --- a/docs/pt/docs/advanced/security/oauth2-scopes.md +++ b/docs/pt/docs/advanced/security/oauth2-scopes.md @@ -65,7 +65,7 @@ Primeiro, vamos olhar rapidamente as partes que mudam dos exemplos do **Tutorial //// tab | Python 3.10+ ```Python hl_lines="5 9 13 47 65 106 108-116 122-125 129-135 140 156" -{!> ../../../docs_src/security/tutorial005_an_py310.py!} +{!> ../../docs_src/security/tutorial005_an_py310.py!} ``` //// @@ -73,7 +73,7 @@ Primeiro, vamos olhar rapidamente as partes que mudam dos exemplos do **Tutorial //// tab | Python 3.9+ ```Python hl_lines="2 5 9 13 47 65 106 108-116 122-125 129-135 140 156" -{!> ../../../docs_src/security/tutorial005_an_py39.py!} +{!> ../../docs_src/security/tutorial005_an_py39.py!} ``` //// @@ -81,7 +81,7 @@ Primeiro, vamos olhar rapidamente as partes que mudam dos exemplos do **Tutorial //// tab | Python 3.8+ ```Python hl_lines="2 5 9 13 48 66 107 109-117 123-126 130-136 141 157" -{!> ../../../docs_src/security/tutorial005_an.py!} +{!> ../../docs_src/security/tutorial005_an.py!} ``` //// @@ -95,7 +95,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="4 8 12 46 64 105 107-115 121-124 128-134 139 155" -{!> ../../../docs_src/security/tutorial005_py310.py!} +{!> ../../docs_src/security/tutorial005_py310.py!} ``` //// @@ -109,7 +109,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="2 5 9 13 47 65 106 108-116 122-125 129-135 140 156" -{!> ../../../docs_src/security/tutorial005_py39.py!} +{!> ../../docs_src/security/tutorial005_py39.py!} ``` //// @@ -123,7 +123,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="2 5 9 13 47 65 106 108-116 122-125 129-135 140 156" -{!> ../../../docs_src/security/tutorial005.py!} +{!> ../../docs_src/security/tutorial005.py!} ``` //// @@ -139,7 +139,7 @@ O parĂąmetro `scopes` recebe um `dict` contendo cada escopo como chave e a descr //// tab | Python 3.10+ ```Python hl_lines="63-66" -{!> ../../../docs_src/security/tutorial005_an_py310.py!} +{!> ../../docs_src/security/tutorial005_an_py310.py!} ``` //// @@ -147,7 +147,7 @@ O parĂąmetro `scopes` recebe um `dict` contendo cada escopo como chave e a descr //// tab | Python 3.9+ ```Python hl_lines="63-66" -{!> ../../../docs_src/security/tutorial005_an_py39.py!} +{!> ../../docs_src/security/tutorial005_an_py39.py!} ``` //// @@ -155,7 +155,7 @@ O parĂąmetro `scopes` recebe um `dict` contendo cada escopo como chave e a descr //// tab | Python 3.8+ ```Python hl_lines="64-67" -{!> ../../../docs_src/security/tutorial005_an.py!} +{!> ../../docs_src/security/tutorial005_an.py!} ``` //// @@ -169,7 +169,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="62-65" -{!> ../../../docs_src/security/tutorial005_py310.py!} +{!> ../../docs_src/security/tutorial005_py310.py!} ``` //// @@ -183,7 +183,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="63-66" -{!> ../../../docs_src/security/tutorial005_py39.py!} +{!> ../../docs_src/security/tutorial005_py39.py!} ``` //// @@ -197,7 +197,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="63-66" -{!> ../../../docs_src/security/tutorial005.py!} +{!> ../../docs_src/security/tutorial005.py!} ``` //// @@ -229,7 +229,7 @@ PorĂ©m em sua aplicação, por segurança, vocĂȘ deve garantir que vocĂȘ apenas //// tab | Python 3.10+ ```Python hl_lines="156" -{!> ../../../docs_src/security/tutorial005_an_py310.py!} +{!> ../../docs_src/security/tutorial005_an_py310.py!} ``` //// @@ -237,7 +237,7 @@ PorĂ©m em sua aplicação, por segurança, vocĂȘ deve garantir que vocĂȘ apenas //// tab | Python 3.9+ ```Python hl_lines="156" -{!> ../../../docs_src/security/tutorial005_an_py39.py!} +{!> ../../docs_src/security/tutorial005_an_py39.py!} ``` //// @@ -245,7 +245,7 @@ PorĂ©m em sua aplicação, por segurança, vocĂȘ deve garantir que vocĂȘ apenas //// tab | Python 3.8+ ```Python hl_lines="157" -{!> ../../../docs_src/security/tutorial005_an.py!} +{!> ../../docs_src/security/tutorial005_an.py!} ``` //// @@ -259,7 +259,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="155" -{!> ../../../docs_src/security/tutorial005_py310.py!} +{!> ../../docs_src/security/tutorial005_py310.py!} ``` //// @@ -273,7 +273,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="156" -{!> ../../../docs_src/security/tutorial005_py39.py!} +{!> ../../docs_src/security/tutorial005_py39.py!} ``` //// @@ -287,7 +287,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="156" -{!> ../../../docs_src/security/tutorial005.py!} +{!> ../../docs_src/security/tutorial005.py!} ``` //// @@ -319,7 +319,7 @@ NĂłs estamos fazendo isso aqui para demonstrar como o **FastAPI** lida com escop //// tab | Python 3.10+ ```Python hl_lines="5 140 171" -{!> ../../../docs_src/security/tutorial005_an_py310.py!} +{!> ../../docs_src/security/tutorial005_an_py310.py!} ``` //// @@ -327,7 +327,7 @@ NĂłs estamos fazendo isso aqui para demonstrar como o **FastAPI** lida com escop //// tab | Python 3.9+ ```Python hl_lines="5 140 171" -{!> ../../../docs_src/security/tutorial005_an_py39.py!} +{!> ../../docs_src/security/tutorial005_an_py39.py!} ``` //// @@ -335,7 +335,7 @@ NĂłs estamos fazendo isso aqui para demonstrar como o **FastAPI** lida com escop //// tab | Python 3.8+ ```Python hl_lines="5 141 172" -{!> ../../../docs_src/security/tutorial005_an.py!} +{!> ../../docs_src/security/tutorial005_an.py!} ``` //// @@ -349,7 +349,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="4 139 168" -{!> ../../../docs_src/security/tutorial005_py310.py!} +{!> ../../docs_src/security/tutorial005_py310.py!} ``` //// @@ -363,7 +363,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="5 140 169" -{!> ../../../docs_src/security/tutorial005_py39.py!} +{!> ../../docs_src/security/tutorial005_py39.py!} ``` //// @@ -377,7 +377,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="5 140 169" -{!> ../../../docs_src/security/tutorial005.py!} +{!> ../../docs_src/security/tutorial005.py!} ``` //// @@ -409,7 +409,7 @@ A classe `SecurityScopes` Ă© semelhante Ă  classe `Request` (`Request` foi utili //// tab | Python 3.10+ ```Python hl_lines="9 106" -{!> ../../../docs_src/security/tutorial005_an_py310.py!} +{!> ../../docs_src/security/tutorial005_an_py310.py!} ``` //// @@ -417,7 +417,7 @@ A classe `SecurityScopes` Ă© semelhante Ă  classe `Request` (`Request` foi utili //// tab | Python 3.9+ ```Python hl_lines="9 106" -{!> ../../../docs_src/security/tutorial005_an_py39.py!} +{!> ../../docs_src/security/tutorial005_an_py39.py!} ``` //// @@ -425,7 +425,7 @@ A classe `SecurityScopes` Ă© semelhante Ă  classe `Request` (`Request` foi utili //// tab | Python 3.8+ ```Python hl_lines="9 107" -{!> ../../../docs_src/security/tutorial005_an.py!} +{!> ../../docs_src/security/tutorial005_an.py!} ``` //// @@ -439,7 +439,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="8 105" -{!> ../../../docs_src/security/tutorial005_py310.py!} +{!> ../../docs_src/security/tutorial005_py310.py!} ``` //// @@ -453,7 +453,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="9 106" -{!> ../../../docs_src/security/tutorial005_py39.py!} +{!> ../../docs_src/security/tutorial005_py39.py!} ``` //// @@ -467,7 +467,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="9 106" -{!> ../../../docs_src/security/tutorial005.py!} +{!> ../../docs_src/security/tutorial005.py!} ``` //// @@ -487,7 +487,7 @@ Nesta exceção, nĂłs incluĂ­mos os escopos necessĂĄrios (se houver algum) como //// tab | Python 3.10+ ```Python hl_lines="106 108-116" -{!> ../../../docs_src/security/tutorial005_an_py310.py!} +{!> ../../docs_src/security/tutorial005_an_py310.py!} ``` //// @@ -495,7 +495,7 @@ Nesta exceção, nĂłs incluĂ­mos os escopos necessĂĄrios (se houver algum) como //// tab | Python 3.9+ ```Python hl_lines="106 108-116" -{!> ../../../docs_src/security/tutorial005_an_py39.py!} +{!> ../../docs_src/security/tutorial005_an_py39.py!} ``` //// @@ -503,7 +503,7 @@ Nesta exceção, nĂłs incluĂ­mos os escopos necessĂĄrios (se houver algum) como //// tab | Python 3.8+ ```Python hl_lines="107 109-117" -{!> ../../../docs_src/security/tutorial005_an.py!} +{!> ../../docs_src/security/tutorial005_an.py!} ``` //// @@ -517,7 +517,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="105 107-115" -{!> ../../../docs_src/security/tutorial005_py310.py!} +{!> ../../docs_src/security/tutorial005_py310.py!} ``` //// @@ -531,7 +531,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="106 108-116" -{!> ../../../docs_src/security/tutorial005_py39.py!} +{!> ../../docs_src/security/tutorial005_py39.py!} ``` //// @@ -545,7 +545,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="106 108-116" -{!> ../../../docs_src/security/tutorial005.py!} +{!> ../../docs_src/security/tutorial005.py!} ``` //// @@ -567,7 +567,7 @@ NĂłs tambĂ©m verificamos que nĂłs temos um usuĂĄrio com o "*username*", e caso c //// tab | Python 3.10+ ```Python hl_lines="47 117-128" -{!> ../../../docs_src/security/tutorial005_an_py310.py!} +{!> ../../docs_src/security/tutorial005_an_py310.py!} ``` //// @@ -575,7 +575,7 @@ NĂłs tambĂ©m verificamos que nĂłs temos um usuĂĄrio com o "*username*", e caso c //// tab | Python 3.9+ ```Python hl_lines="47 117-128" -{!> ../../../docs_src/security/tutorial005_an_py39.py!} +{!> ../../docs_src/security/tutorial005_an_py39.py!} ``` //// @@ -583,7 +583,7 @@ NĂłs tambĂ©m verificamos que nĂłs temos um usuĂĄrio com o "*username*", e caso c //// tab | Python 3.8+ ```Python hl_lines="48 118-129" -{!> ../../../docs_src/security/tutorial005_an.py!} +{!> ../../docs_src/security/tutorial005_an.py!} ``` //// @@ -597,7 +597,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="46 116-127" -{!> ../../../docs_src/security/tutorial005_py310.py!} +{!> ../../docs_src/security/tutorial005_py310.py!} ``` //// @@ -611,7 +611,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="47 117-128" -{!> ../../../docs_src/security/tutorial005_py39.py!} +{!> ../../docs_src/security/tutorial005_py39.py!} ``` //// @@ -625,7 +625,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="47 117-128" -{!> ../../../docs_src/security/tutorial005.py!} +{!> ../../docs_src/security/tutorial005.py!} ``` //// @@ -639,7 +639,7 @@ Para isso, nĂłs utilizamos `security_scopes.scopes`, que contĂ©m uma `list` com //// tab | Python 3.10+ ```Python hl_lines="129-135" -{!> ../../../docs_src/security/tutorial005_an_py310.py!} +{!> ../../docs_src/security/tutorial005_an_py310.py!} ``` //// @@ -647,7 +647,7 @@ Para isso, nĂłs utilizamos `security_scopes.scopes`, que contĂ©m uma `list` com //// tab | Python 3.9+ ```Python hl_lines="129-135" -{!> ../../../docs_src/security/tutorial005_an_py39.py!} +{!> ../../docs_src/security/tutorial005_an_py39.py!} ``` //// @@ -655,7 +655,7 @@ Para isso, nĂłs utilizamos `security_scopes.scopes`, que contĂ©m uma `list` com //// tab | Python 3.8+ ```Python hl_lines="130-136" -{!> ../../../docs_src/security/tutorial005_an.py!} +{!> ../../docs_src/security/tutorial005_an.py!} ``` //// @@ -669,7 +669,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="128-134" -{!> ../../../docs_src/security/tutorial005_py310.py!} +{!> ../../docs_src/security/tutorial005_py310.py!} ``` //// @@ -683,7 +683,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="129-135" -{!> ../../../docs_src/security/tutorial005_py39.py!} +{!> ../../docs_src/security/tutorial005_py39.py!} ``` //// @@ -697,7 +697,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="129-135" -{!> ../../../docs_src/security/tutorial005.py!} +{!> ../../docs_src/security/tutorial005.py!} ``` //// diff --git a/docs/pt/docs/advanced/settings.md b/docs/pt/docs/advanced/settings.md index db2b4c9cc..d32b70ed4 100644 --- a/docs/pt/docs/advanced/settings.md +++ b/docs/pt/docs/advanced/settings.md @@ -181,7 +181,7 @@ VocĂȘ pode utilizar todas as ferramentas e funcionalidades de validação que s //// tab | Pydantic v2 ```Python hl_lines="2 5-8 11" -{!> ../../../docs_src/settings/tutorial001.py!} +{!> ../../docs_src/settings/tutorial001.py!} ``` //// @@ -195,7 +195,7 @@ Na versĂŁo 1 do Pydantic vocĂȘ importaria `BaseSettings` diretamente do mĂłdulo /// ```Python hl_lines="2 5-8 11" -{!> ../../../docs_src/settings/tutorial001_pv1.py!} +{!> ../../docs_src/settings/tutorial001_pv1.py!} ``` //// @@ -215,7 +215,7 @@ Depois ele irĂĄ converter e validar os dados. Assim, quando vocĂȘ utilizar aquel Depois, VocĂȘ pode utilizar o novo objeto `settings` na sua aplicação: ```Python hl_lines="18-20" -{!../../../docs_src/settings/tutorial001.py!} +{!../../docs_src/settings/tutorial001.py!} ``` ### Executando o servidor @@ -251,13 +251,13 @@ VocĂȘ tambĂ©m pode incluir essas configuraçÔes em um arquivo de um mĂłdulo sep Por exemplo, vocĂȘ pode adicionar um arquivo `config.py` com: ```Python -{!../../../docs_src/settings/app01/config.py!} +{!../../docs_src/settings/app01/config.py!} ``` E utilizar essa configuração em `main.py`: ```Python hl_lines="3 11-13" -{!../../../docs_src/settings/app01/main.py!} +{!../../docs_src/settings/app01/main.py!} ``` /// dica @@ -277,7 +277,7 @@ Isso Ă© especialmente Ăștil durante os testes, jĂĄ que Ă© bastante simples sobre Baseando-se no exemplo anterior, seu arquivo `config.py` seria parecido com isso: ```Python hl_lines="10" -{!../../../docs_src/settings/app02/config.py!} +{!../../docs_src/settings/app02/config.py!} ``` Perceba que dessa vez nĂŁo criamos uma instĂąncia padrĂŁo `settings = Settings()`. @@ -289,7 +289,7 @@ Agora criamos a dependĂȘncia que retorna um novo objeto `config.Settings()`. //// tab | Python 3.9+ ```Python hl_lines="6 12-13" -{!> ../../../docs_src/settings/app02_an_py39/main.py!} +{!> ../../docs_src/settings/app02_an_py39/main.py!} ``` //// @@ -297,7 +297,7 @@ Agora criamos a dependĂȘncia que retorna um novo objeto `config.Settings()`. //// tab | Python 3.8+ ```Python hl_lines="6 12-13" -{!> ../../../docs_src/settings/app02_an/main.py!} +{!> ../../docs_src/settings/app02_an/main.py!} ``` //// @@ -311,7 +311,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="5 11-12" -{!> ../../../docs_src/settings/app02/main.py!} +{!> ../../docs_src/settings/app02/main.py!} ``` //// @@ -329,7 +329,7 @@ E entĂŁo podemos declarar essas configuraçÔes como uma dependĂȘncia na funçã //// tab | Python 3.9+ ```Python hl_lines="17 19-21" -{!> ../../../docs_src/settings/app02_an_py39/main.py!} +{!> ../../docs_src/settings/app02_an_py39/main.py!} ``` //// @@ -337,7 +337,7 @@ E entĂŁo podemos declarar essas configuraçÔes como uma dependĂȘncia na funçã //// tab | Python 3.8+ ```Python hl_lines="17 19-21" -{!> ../../../docs_src/settings/app02_an/main.py!} +{!> ../../docs_src/settings/app02_an/main.py!} ``` //// @@ -351,7 +351,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="16 18-20" -{!> ../../../docs_src/settings/app02/main.py!} +{!> ../../docs_src/settings/app02/main.py!} ``` //// @@ -361,7 +361,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. EntĂŁo seria muito fĂĄcil fornecer uma configuração diferente durante a execução dos testes sobrescrevendo a dependĂȘncia de `get_settings`: ```Python hl_lines="9-10 13 21" -{!../../../docs_src/settings/app02/test_main.py!} +{!../../docs_src/settings/app02/test_main.py!} ``` Na sobrescrita da dependĂȘncia, definimos um novo valor para `admin_email` quando instanciamos um novo objeto `Settings`, e entĂŁo retornamos esse novo objeto. @@ -406,7 +406,7 @@ E entĂŁo adicionar o seguinte cĂłdigo em `config.py`: //// tab | Pydantic v2 ```Python hl_lines="9" -{!> ../../../docs_src/settings/app03_an/config.py!} +{!> ../../docs_src/settings/app03_an/config.py!} ``` /// dica @@ -420,7 +420,7 @@ O atributo `model_config` Ă© usado apenas para configuração do Pydantic. VocĂȘ //// tab | Pydantic v1 ```Python hl_lines="9-10" -{!> ../../../docs_src/settings/app03_an/config_pv1.py!} +{!> ../../docs_src/settings/app03_an/config_pv1.py!} ``` /// dica @@ -465,7 +465,7 @@ Mas como estamos utilizando o decorador `@lru_cache` acima, o objeto `Settings` //// tab | Python 3.9+ ```Python hl_lines="1 11" -{!> ../../../docs_src/settings/app03_an_py39/main.py!} +{!> ../../docs_src/settings/app03_an_py39/main.py!} ``` //// @@ -473,7 +473,7 @@ Mas como estamos utilizando o decorador `@lru_cache` acima, o objeto `Settings` //// tab | Python 3.8+ ```Python hl_lines="1 11" -{!> ../../../docs_src/settings/app03_an/main.py!} +{!> ../../docs_src/settings/app03_an/main.py!} ``` //// @@ -487,7 +487,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="1 10" -{!> ../../../docs_src/settings/app03/main.py!} +{!> ../../docs_src/settings/app03/main.py!} ``` //// diff --git a/docs/pt/docs/advanced/sub-applications.md b/docs/pt/docs/advanced/sub-applications.md index 8149edc5a..7f0381cc2 100644 --- a/docs/pt/docs/advanced/sub-applications.md +++ b/docs/pt/docs/advanced/sub-applications.md @@ -11,7 +11,7 @@ Se vocĂȘ precisar ter duas aplicaçÔes FastAPI independentes, cada uma com seu Primeiro, crie a aplicação principal, de nĂ­vel superior, **FastAPI**, e suas *operaçÔes de rota*: ```Python hl_lines="3 6-8" -{!../../../docs_src/sub_applications/tutorial001.py!} +{!../../docs_src/sub_applications/tutorial001.py!} ``` ### Sub-aplicação @@ -21,7 +21,7 @@ Em seguida, crie sua sub-aplicação e suas *operaçÔes de rota*. Essa sub-aplicação Ă© apenas outra aplicação FastAPI padrĂŁo, mas esta Ă© a que serĂĄ "montada": ```Python hl_lines="11 14-16" -{!../../../docs_src/sub_applications/tutorial001.py!} +{!../../docs_src/sub_applications/tutorial001.py!} ``` ### Monte a sub-aplicação @@ -31,7 +31,7 @@ Na sua aplicação de nĂ­vel superior, `app`, monte a sub-aplicação, `subapi`. Neste caso, ela serĂĄ montada no caminho `/subapi`: ```Python hl_lines="11 19" -{!../../../docs_src/sub_applications/tutorial001.py!} +{!../../docs_src/sub_applications/tutorial001.py!} ``` ### Verifique a documentação automĂĄtica da API diff --git a/docs/pt/docs/advanced/templates.md b/docs/pt/docs/advanced/templates.md index 6d231b3c2..88a5b940e 100644 --- a/docs/pt/docs/advanced/templates.md +++ b/docs/pt/docs/advanced/templates.md @@ -26,7 +26,7 @@ $ pip install jinja2 * Use o `template` que vocĂȘ criou para renderizar e retornar uma `TemplateResponse`, passe o nome do template, o request object, e um "context" dict com pares chave-valor a serem usados dentro do template do Jinja2. ```Python hl_lines="4 11 15-18" -{!../../../docs_src/templates/tutorial001.py!} +{!../../docs_src/templates/tutorial001.py!} ``` /// note @@ -56,7 +56,7 @@ VocĂȘ tambĂ©m poderia usar `from starlette.templating import Jinja2Templates`. EntĂŁo vocĂȘ pode escrever um template em `templates/item.html`, por exemplo: ```jinja hl_lines="7" -{!../../../docs_src/templates/templates/item.html!} +{!../../docs_src/templates/templates/item.html!} ``` ### Interpolação de Valores no Template @@ -110,13 +110,13 @@ Por exemplo, com um ID de `42`, isso renderizarĂĄ: VocĂȘ tambĂ©m pode usar `url_for()` dentro do template e usĂĄ-lo, por examplo, com o `StaticFiles` que vocĂȘ montou com o `name="static"`. ```jinja hl_lines="4" -{!../../../docs_src/templates/templates/item.html!} +{!../../docs_src/templates/templates/item.html!} ``` Neste exemplo, ele seria vinculado a um arquivo CSS em `static/styles.css` com: ```CSS hl_lines="4" -{!../../../docs_src/templates/static/styles.css!} +{!../../docs_src/templates/static/styles.css!} ``` E como vocĂȘ estĂĄ usando `StaticFiles`, este arquivo CSS serĂĄ automaticamente servido pela sua aplicação FastAPI na URL `/static/styles.css`. diff --git a/docs/pt/docs/advanced/testing-dependencies.md b/docs/pt/docs/advanced/testing-dependencies.md index 747dd7d06..f978350a5 100644 --- a/docs/pt/docs/advanced/testing-dependencies.md +++ b/docs/pt/docs/advanced/testing-dependencies.md @@ -31,7 +31,7 @@ E entĂŁo o **FastAPI** chamarĂĄ a sobreposição no lugar da dependĂȘncia origin //// tab | Python 3.10+ ```Python hl_lines="26-27 30" -{!> ../../../docs_src/dependency_testing/tutorial001_an_py310.py!} +{!> ../../docs_src/dependency_testing/tutorial001_an_py310.py!} ``` //// @@ -39,7 +39,7 @@ E entĂŁo o **FastAPI** chamarĂĄ a sobreposição no lugar da dependĂȘncia origin //// tab | Python 3.9+ ```Python hl_lines="28-29 32" -{!> ../../../docs_src/dependency_testing/tutorial001_an_py39.py!} +{!> ../../docs_src/dependency_testing/tutorial001_an_py39.py!} ``` //// @@ -47,7 +47,7 @@ E entĂŁo o **FastAPI** chamarĂĄ a sobreposição no lugar da dependĂȘncia origin //// tab | Python 3.8+ ```Python hl_lines="29-30 33" -{!> ../../../docs_src/dependency_testing/tutorial001_an.py!} +{!> ../../docs_src/dependency_testing/tutorial001_an.py!} ``` //// @@ -61,7 +61,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="24-25 28" -{!> ../../../docs_src/dependency_testing/tutorial001_py310.py!} +{!> ../../docs_src/dependency_testing/tutorial001_py310.py!} ``` //// @@ -75,7 +75,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="28-29 32" -{!> ../../../docs_src/dependency_testing/tutorial001.py!} +{!> ../../docs_src/dependency_testing/tutorial001.py!} ``` //// diff --git a/docs/pt/docs/advanced/testing-events.md b/docs/pt/docs/advanced/testing-events.md index 392fb741c..b6796e835 100644 --- a/docs/pt/docs/advanced/testing-events.md +++ b/docs/pt/docs/advanced/testing-events.md @@ -3,5 +3,5 @@ Quando vocĂȘ precisa que os seus manipuladores de eventos (`startup` e `shutdown`) sejam executados em seus testes, vocĂȘ pode utilizar o `TestClient` usando a instrução `with`: ```Python hl_lines="9-12 20-24" -{!../../../docs_src/app_testing/tutorial003.py!} +{!../../docs_src/app_testing/tutorial003.py!} ``` diff --git a/docs/pt/docs/advanced/testing-websockets.md b/docs/pt/docs/advanced/testing-websockets.md index f458a05d4..daa610df6 100644 --- a/docs/pt/docs/advanced/testing-websockets.md +++ b/docs/pt/docs/advanced/testing-websockets.md @@ -5,7 +5,7 @@ VocĂȘ pode usar o mesmo `TestClient` para testar WebSockets. Para isso, vocĂȘ utiliza o `TestClient` dentro de uma instrução `with`, conectando com o WebSocket: ```Python hl_lines="27-31" -{!../../../docs_src/app_testing/tutorial002.py!} +{!../../docs_src/app_testing/tutorial002.py!} ``` /// note | "Nota" diff --git a/docs/pt/docs/advanced/using-request-directly.md b/docs/pt/docs/advanced/using-request-directly.md index 3dd0a8aef..c2114c214 100644 --- a/docs/pt/docs/advanced/using-request-directly.md +++ b/docs/pt/docs/advanced/using-request-directly.md @@ -30,7 +30,7 @@ Vamos imaginar que vocĂȘ deseja obter o endereço de IP/host do cliente dentro d Para isso vocĂȘ precisa acessar a requisição diretamente. ```Python hl_lines="1 7-8" -{!../../../docs_src/using_request_directly/tutorial001.py!} +{!../../docs_src/using_request_directly/tutorial001.py!} ``` Ao declarar o parĂąmetro com o tipo sendo um `Request` em sua *função de operação de rota*, o **FastAPI** saberĂĄ como passar o `Request` neste parĂąmetro. diff --git a/docs/pt/docs/advanced/wsgi.md b/docs/pt/docs/advanced/wsgi.md index 2c7ac1ffe..e6d08c8db 100644 --- a/docs/pt/docs/advanced/wsgi.md +++ b/docs/pt/docs/advanced/wsgi.md @@ -13,7 +13,7 @@ Em seguinda, encapsular a aplicação WSGI (e.g. Flask) com o middleware. E entĂŁo **"montar"** em um caminho de rota. ```Python hl_lines="2-3 23" -{!../../../docs_src/wsgi/tutorial001.py!} +{!../../docs_src/wsgi/tutorial001.py!} ``` ## Conferindo diff --git a/docs/pt/docs/how-to/conditional-openapi.md b/docs/pt/docs/how-to/conditional-openapi.md index cfa652fa5..675b812e6 100644 --- a/docs/pt/docs/how-to/conditional-openapi.md +++ b/docs/pt/docs/how-to/conditional-openapi.md @@ -30,7 +30,7 @@ VocĂȘ pode usar facilmente as mesmas configuraçÔes do Pydantic para configurar Por exemplo: ```Python hl_lines="6 11" -{!../../../docs_src/conditional_openapi/tutorial001.py!} +{!../../docs_src/conditional_openapi/tutorial001.py!} ``` Aqui declaramos a configuração `openapi_url` com o mesmo padrĂŁo de `"/openapi.json"`. diff --git a/docs/pt/docs/how-to/configure-swagger-ui.md b/docs/pt/docs/how-to/configure-swagger-ui.md index ceb8c634e..58bb1557c 100644 --- a/docs/pt/docs/how-to/configure-swagger-ui.md +++ b/docs/pt/docs/how-to/configure-swagger-ui.md @@ -19,7 +19,7 @@ Sem alterar as configuraçÔes, o destaque de sintaxe Ă© habilitado por padrĂŁo: Mas vocĂȘ pode desabilitĂĄ-lo definindo `syntaxHighlight` como `False`: ```Python hl_lines="3" -{!../../../docs_src/configure_swagger_ui/tutorial001.py!} +{!../../docs_src/configure_swagger_ui/tutorial001.py!} ``` ...e entĂŁo o Swagger UI nĂŁo mostrarĂĄ mais o destaque de sintaxe: @@ -31,7 +31,7 @@ Mas vocĂȘ pode desabilitĂĄ-lo definindo `syntaxHighlight` como `False`: Da mesma forma que vocĂȘ pode definir o tema de destaque de sintaxe com a chave `"syntaxHighlight.theme"` (observe que hĂĄ um ponto no meio): ```Python hl_lines="3" -{!../../../docs_src/configure_swagger_ui/tutorial002.py!} +{!../../docs_src/configure_swagger_ui/tutorial002.py!} ``` Essa configuração alteraria o tema de cores de destaque de sintaxe: @@ -45,7 +45,7 @@ O FastAPI inclui alguns parĂąmetros de configuração padrĂŁo apropriados para a Inclui estas configuraçÔes padrĂŁo: ```Python -{!../../../fastapi/openapi/docs.py[ln:7-23]!} +{!../../fastapi/openapi/docs.py[ln:7-23]!} ``` VocĂȘ pode substituir qualquer um deles definindo um valor diferente no argumento `swagger_ui_parameters`. @@ -53,7 +53,7 @@ VocĂȘ pode substituir qualquer um deles definindo um valor diferente no argument Por exemplo, para desabilitar `deepLinking` vocĂȘ pode passar essas configuraçÔes para `swagger_ui_parameters`: ```Python hl_lines="3" -{!../../../docs_src/configure_swagger_ui/tutorial003.py!} +{!../../docs_src/configure_swagger_ui/tutorial003.py!} ``` ## Outros parĂąmetros da UI do Swagger diff --git a/docs/pt/docs/how-to/graphql.md b/docs/pt/docs/how-to/graphql.md index 0b711aa5e..2cfd790c5 100644 --- a/docs/pt/docs/how-to/graphql.md +++ b/docs/pt/docs/how-to/graphql.md @@ -36,7 +36,7 @@ Dependendo do seu caso de uso, vocĂȘ pode preferir usar uma biblioteca diferente Aqui estĂĄ uma pequena prĂ©via de como vocĂȘ poderia integrar Strawberry com FastAPI: ```Python hl_lines="3 22 25-26" -{!../../../docs_src/graphql/tutorial001.py!} +{!../../docs_src/graphql/tutorial001.py!} ``` VocĂȘ pode aprender mais sobre Strawberry na documentação do Strawberry. diff --git a/docs/pt/docs/python-types.md b/docs/pt/docs/python-types.md index 86630cd2a..05faa860c 100644 --- a/docs/pt/docs/python-types.md +++ b/docs/pt/docs/python-types.md @@ -23,7 +23,7 @@ Se vocĂȘ Ă© um especialista em Python e jĂĄ sabe tudo sobre type hints, pule par Vamos começar com um exemplo simples: ```Python -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` A chamada deste programa gera: @@ -39,7 +39,7 @@ A função faz o seguinte: * Concatena com um espaço no meio. ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` ### Edite-o @@ -83,7 +83,7 @@ para: Esses sĂŁo os "type hints": ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial002.py!} +{!../../docs_src/python_types/tutorial002.py!} ``` Isso nĂŁo Ă© o mesmo que declarar valores padrĂŁo como seria com: @@ -113,7 +113,7 @@ Com isso, vocĂȘ pode rolar, vendo as opçÔes, atĂ© encontrar o que "toca uma ca Marque esta função, ela jĂĄ possui type hints: ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial003.py!} +{!../../docs_src/python_types/tutorial003.py!} ``` Como o editor conhece os tipos de variĂĄveis, vocĂȘ nĂŁo apenas obtĂ©m a conclusĂŁo, mas tambĂ©m as verificaçÔes de erro: @@ -123,7 +123,7 @@ Como o editor conhece os tipos de variĂĄveis, vocĂȘ nĂŁo apenas obtĂ©m a conclus Agora vocĂȘ sabe que precisa corrigĂ­-lo, converta `age` em uma string com `str (age)`: ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial004.py!} +{!../../docs_src/python_types/tutorial004.py!} ``` ## Tipos de declaração @@ -144,7 +144,7 @@ VocĂȘ pode usar, por exemplo: * `bytes` ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial005.py!} +{!../../docs_src/python_types/tutorial005.py!} ``` ### Tipos genĂ©ricos com parĂąmetros de tipo @@ -162,7 +162,7 @@ Por exemplo, vamos definir uma variĂĄvel para ser uma `lista` de `str`. Em `typing`, importe `List` (com um `L` maiĂșsculo): ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial006.py!} +{!../../docs_src/python_types/tutorial006.py!} ``` Declare a variĂĄvel com a mesma sintaxe de dois pontos (`:`). @@ -172,7 +172,7 @@ Como o tipo, coloque a `List`. Como a lista Ă© um tipo que contĂ©m alguns tipos internos, vocĂȘ os coloca entre colchetes: ```Python hl_lines="4" -{!../../../docs_src/python_types/tutorial006.py!} +{!../../docs_src/python_types/tutorial006.py!} ``` /// tip | "Dica" @@ -200,7 +200,7 @@ E, ainda assim, o editor sabe que Ă© um `str` e fornece suporte para isso. VocĂȘ faria o mesmo para declarar `tuple`s e `set`s: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial007.py!} +{!../../docs_src/python_types/tutorial007.py!} ``` Isso significa que: @@ -217,7 +217,7 @@ O primeiro parĂąmetro de tipo Ă© para as chaves do `dict`. O segundo parĂąmetro de tipo Ă© para os valores do `dict`: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial008.py!} +{!../../docs_src/python_types/tutorial008.py!} ``` Isso significa que: @@ -231,7 +231,7 @@ Isso significa que: VocĂȘ tambĂ©m pode usar o `Opcional` para declarar que uma variĂĄvel tem um tipo, como `str`, mas que Ă© "opcional", o que significa que tambĂ©m pode ser `None`: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009.py!} +{!../../docs_src/python_types/tutorial009.py!} ``` O uso de `Opcional [str]` em vez de apenas `str` permitirĂĄ que o editor o ajude a detectar erros, onde vocĂȘ pode estar assumindo que um valor Ă© sempre um `str`, quando na verdade tambĂ©m pode ser `None`. @@ -256,13 +256,13 @@ VocĂȘ tambĂ©m pode declarar uma classe como o tipo de uma variĂĄvel. Digamos que vocĂȘ tenha uma classe `Person`, com um nome: ```Python hl_lines="1 2 3" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` EntĂŁo vocĂȘ pode declarar que uma variĂĄvel Ă© do tipo `Person`: ```Python hl_lines="6" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` E entĂŁo, novamente, vocĂȘ recebe todo o suporte do editor: @@ -284,7 +284,7 @@ E vocĂȘ recebe todo o suporte do editor com esse objeto resultante. Retirado dos documentos oficiais dos Pydantic: ```Python -{!../../../docs_src/python_types/tutorial011.py!} +{!../../docs_src/python_types/tutorial011.py!} ``` /// info | "Informação" diff --git a/docs/pt/docs/tutorial/background-tasks.md b/docs/pt/docs/tutorial/background-tasks.md index 625fa2b11..2b5f82464 100644 --- a/docs/pt/docs/tutorial/background-tasks.md +++ b/docs/pt/docs/tutorial/background-tasks.md @@ -16,7 +16,7 @@ Isso inclui, por exemplo: Primeiro, importe `BackgroundTasks` e defina um parĂąmetro em sua _função de operação de caminho_ com uma declaração de tipo de `BackgroundTasks`: ```Python hl_lines="1 13" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` O **FastAPI** criarĂĄ o objeto do tipo `BackgroundTasks` para vocĂȘ e o passarĂĄ como esse parĂąmetro. @@ -34,7 +34,7 @@ Nesse caso, a função de tarefa gravarĂĄ em um arquivo (simulando o envio de um E como a operação de gravação nĂŁo usa `async` e `await`, definimos a função com `def` normal: ```Python hl_lines="6-9" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` ## Adicionar a tarefa em segundo plano @@ -42,7 +42,7 @@ E como a operação de gravação nĂŁo usa `async` e `await`, definimos a funç Dentro de sua _função de operação de caminho_, passe sua função de tarefa para o objeto _tarefas em segundo plano_ com o mĂ©todo `.add_task()`: ```Python hl_lines="14" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` `.add_task()` recebe como argumentos: @@ -58,7 +58,7 @@ Usar `BackgroundTasks` tambĂ©m funciona com o sistema de injeção de dependĂȘnc O **FastAPI** sabe o que fazer em cada caso e como reutilizar o mesmo objeto, de forma que todas as tarefas em segundo plano sejam mescladas e executadas em segundo plano posteriormente: ```Python hl_lines="13 15 22 25" -{!../../../docs_src/background_tasks/tutorial002.py!} +{!../../docs_src/background_tasks/tutorial002.py!} ``` Neste exemplo, as mensagens serĂŁo gravadas no arquivo `log.txt` _apĂłs_ o envio da resposta. diff --git a/docs/pt/docs/tutorial/bigger-applications.md b/docs/pt/docs/tutorial/bigger-applications.md index 7137bf865..fcc30961f 100644 --- a/docs/pt/docs/tutorial/bigger-applications.md +++ b/docs/pt/docs/tutorial/bigger-applications.md @@ -86,7 +86,7 @@ VocĂȘ pode criar as *operaçÔes de rotas* para esse mĂłdulo usando o `APIRouter vocĂȘ o importa e cria uma "instĂąncia" da mesma maneira que faria com a classe `FastAPI`: ```Python hl_lines="1 3" title="app/routers/users.py" -{!../../../docs_src/bigger_applications/app/routers/users.py!} +{!../../docs_src/bigger_applications/app/routers/users.py!} ``` ### *OperaçÔes de Rota* com `APIRouter` @@ -96,7 +96,7 @@ E entĂŁo vocĂȘ o utiliza para declarar suas *operaçÔes de rota*. Utilize-o da mesma maneira que utilizaria a classe `FastAPI`: ```Python hl_lines="6 11 16" title="app/routers/users.py" -{!../../../docs_src/bigger_applications/app/routers/users.py!} +{!../../docs_src/bigger_applications/app/routers/users.py!} ``` VocĂȘ pode pensar em `APIRouter` como uma classe "mini `FastAPI`". @@ -124,7 +124,7 @@ Agora usaremos uma dependĂȘncia simples para ler um cabeçalho `X-Token` persona //// tab | Python 3.9+ ```Python hl_lines="3 6-8" title="app/dependencies.py" -{!> ../../../docs_src/bigger_applications/app_an_py39/dependencies.py!} +{!> ../../docs_src/bigger_applications/app_an_py39/dependencies.py!} ``` //// @@ -132,7 +132,7 @@ Agora usaremos uma dependĂȘncia simples para ler um cabeçalho `X-Token` persona //// tab | Python 3.8+ ```Python hl_lines="1 5-7" title="app/dependencies.py" -{!> ../../../docs_src/bigger_applications/app_an/dependencies.py!} +{!> ../../docs_src/bigger_applications/app_an/dependencies.py!} ``` //// @@ -146,7 +146,7 @@ Prefira usar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="1 4-6" title="app/dependencies.py" -{!> ../../../docs_src/bigger_applications/app/dependencies.py!} +{!> ../../docs_src/bigger_applications/app/dependencies.py!} ``` //// @@ -182,7 +182,7 @@ Sabemos que todas as *operaçÔes de rota* neste mĂłdulo tĂȘm o mesmo: EntĂŁo, em vez de adicionar tudo isso a cada *operação de rota*, podemos adicionĂĄ-lo ao `APIRouter`. ```Python hl_lines="5-10 16 21" title="app/routers/items.py" -{!../../../docs_src/bigger_applications/app/routers/items.py!} +{!../../docs_src/bigger_applications/app/routers/items.py!} ``` Como o caminho de cada *operação de rota* deve começar com `/`, como em: @@ -243,7 +243,7 @@ E precisamos obter a função de dependĂȘncia do mĂłdulo `app.dependencies`, o a EntĂŁo usamos uma importação relativa com `..` para as dependĂȘncias: ```Python hl_lines="3" title="app/routers/items.py" -{!../../../docs_src/bigger_applications/app/routers/items.py!} +{!../../docs_src/bigger_applications/app/routers/items.py!} ``` #### Como funcionam as importaçÔes relativas @@ -316,7 +316,7 @@ NĂŁo estamos adicionando o prefixo `/items` nem `tags=["items"]` a cada *operaç Mas ainda podemos adicionar _mais_ `tags` que serĂŁo aplicadas a uma *operação de rota* especĂ­fica, e tambĂ©m algumas `respostas` extras especĂ­ficas para essa *operação de rota*: ```Python hl_lines="30-31" title="app/routers/items.py" -{!../../../docs_src/bigger_applications/app/routers/items.py!} +{!../../docs_src/bigger_applications/app/routers/items.py!} ``` /// tip | "Dica" @@ -344,7 +344,7 @@ VocĂȘ importa e cria uma classe `FastAPI` normalmente. E podemos atĂ© declarar [dependĂȘncias globais](dependencies/global-dependencies.md){.internal-link target=_blank} que serĂŁo combinadas com as dependĂȘncias para cada `APIRouter`: ```Python hl_lines="1 3 7" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` ### Importe o `APIRouter` @@ -352,7 +352,7 @@ E podemos atĂ© declarar [dependĂȘncias globais](dependencies/global-dependencies Agora importamos os outros submĂłdulos que possuem `APIRouter`s: ```Python hl_lines="4-5" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` Como os arquivos `app/routers/users.py` e `app/routers/items.py` sĂŁo submĂłdulos que fazem parte do mesmo pacote Python `app`, podemos usar um Ășnico ponto `.` para importĂĄ-los usando "importaçÔes relativas". @@ -417,7 +417,7 @@ o `router` de `users` sobrescreveria o de `items` e nĂŁo poderĂ­amos usĂĄ-los ao EntĂŁo, para poder usar ambos no mesmo arquivo, importamos os submĂłdulos diretamente: ```Python hl_lines="5" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` ### Incluir o `APIRouter`s para `usuĂĄrios` e `itens` @@ -425,7 +425,7 @@ EntĂŁo, para poder usar ambos no mesmo arquivo, importamos os submĂłdulos direta Agora, vamos incluir os `roteadores` dos submĂłdulos `usuĂĄrios` e `itens`: ```Python hl_lines="10-11" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` /// info | "Informação" @@ -467,7 +467,7 @@ Ele contĂ©m um `APIRouter` com algumas *operaçÔes de rota* de administração Para este exemplo, serĂĄ super simples. Mas digamos que, como ele Ă© compartilhado com outros projetos na organização, nĂŁo podemos modificĂĄ-lo e adicionar um `prefix`, `dependencies`, `tags`, etc. diretamente ao `APIRouter`: ```Python hl_lines="3" title="app/internal/admin.py" -{!../../../docs_src/bigger_applications/app/internal/admin.py!} +{!../../docs_src/bigger_applications/app/internal/admin.py!} ``` Mas ainda queremos definir um `prefixo` personalizado ao incluir o `APIRouter` para que todas as suas *operaçÔes de rota* comecem com `/admin`, queremos protegĂȘ-lo com as `dependĂȘncias` que jĂĄ temos para este projeto e queremos incluir `tags` e `responses`. @@ -475,7 +475,7 @@ Mas ainda queremos definir um `prefixo` personalizado ao incluir o `APIRouter` p Podemos declarar tudo isso sem precisar modificar o `APIRouter` original passando esses parĂąmetros para `app.include_router()`: ```Python hl_lines="14-17" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` Dessa forma, o `APIRouter` original permanecerĂĄ inalterado, para que possamos compartilhar o mesmo arquivo `app/internal/admin.py` com outros projetos na organização. @@ -498,7 +498,7 @@ TambĂ©m podemos adicionar *operaçÔes de rota* diretamente ao aplicativo `FastA Aqui fazemos isso... sĂł para mostrar que podemos đŸ€·: ```Python hl_lines="21-23" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` e funcionarĂĄ corretamente, junto com todas as outras *operaçÔes de rota* adicionadas com `app.include_router()`. diff --git a/docs/pt/docs/tutorial/body-fields.md b/docs/pt/docs/tutorial/body-fields.md index cce37cd55..ab9377fdb 100644 --- a/docs/pt/docs/tutorial/body-fields.md +++ b/docs/pt/docs/tutorial/body-fields.md @@ -7,7 +7,7 @@ Da mesma forma que vocĂȘ pode declarar validaçÔes adicionais e metadados nos p Primeiro, vocĂȘ tem que importĂĄ-lo: ```Python hl_lines="4" -{!../../../docs_src/body_fields/tutorial001.py!} +{!../../docs_src/body_fields/tutorial001.py!} ``` /// warning | "Aviso" @@ -21,7 +21,7 @@ Note que `Field` Ă© importado diretamente do `pydantic`, nĂŁo do `fastapi` como VocĂȘ pode entĂŁo utilizar `Field` com atributos do modelo: ```Python hl_lines="11-14" -{!../../../docs_src/body_fields/tutorial001.py!} +{!../../docs_src/body_fields/tutorial001.py!} ``` `Field` funciona da mesma forma que `Query`, `Path` e `Body`, ele possui todos os mesmos parĂąmetros, etc. diff --git a/docs/pt/docs/tutorial/body-multiple-params.md b/docs/pt/docs/tutorial/body-multiple-params.md index d36dd60b3..400813a7b 100644 --- a/docs/pt/docs/tutorial/body-multiple-params.md +++ b/docs/pt/docs/tutorial/body-multiple-params.md @@ -11,7 +11,7 @@ E vocĂȘ tambĂ©m pode declarar parĂąmetros de corpo como opcionais, definindo o v //// tab | Python 3.10+ ```Python hl_lines="17-19" -{!> ../../../docs_src/body_multiple_params/tutorial001_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial001_py310.py!} ``` //// @@ -19,7 +19,7 @@ E vocĂȘ tambĂ©m pode declarar parĂąmetros de corpo como opcionais, definindo o v //// tab | Python 3.8+ ```Python hl_lines="19-21" -{!> ../../../docs_src/body_multiple_params/tutorial001.py!} +{!> ../../docs_src/body_multiple_params/tutorial001.py!} ``` //// @@ -48,7 +48,7 @@ Mas vocĂȘ pode tambĂ©m declarar mĂșltiplos parĂąmetros de corpo, por exemplo, `i //// tab | Python 3.10+ ```Python hl_lines="20" -{!> ../../../docs_src/body_multiple_params/tutorial002_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial002_py310.py!} ``` //// @@ -56,7 +56,7 @@ Mas vocĂȘ pode tambĂ©m declarar mĂșltiplos parĂąmetros de corpo, por exemplo, `i //// tab | Python 3.8+ ```Python hl_lines="22" -{!> ../../../docs_src/body_multiple_params/tutorial002.py!} +{!> ../../docs_src/body_multiple_params/tutorial002.py!} ``` //// @@ -103,7 +103,7 @@ Mas vocĂȘ pode instruir o **FastAPI** para tratĂĄ-lo como outra chave do corpo u //// tab | Python 3.8+ ```Python hl_lines="22" -{!> ../../../docs_src/body_multiple_params/tutorial003.py!} +{!> ../../docs_src/body_multiple_params/tutorial003.py!} ``` //// @@ -111,7 +111,7 @@ Mas vocĂȘ pode instruir o **FastAPI** para tratĂĄ-lo como outra chave do corpo u //// tab | Python 3.10+ ```Python hl_lines="20" -{!> ../../../docs_src/body_multiple_params/tutorial003_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial003_py310.py!} ``` //// @@ -157,7 +157,7 @@ Por exemplo: //// tab | Python 3.10+ ```Python hl_lines="26" -{!> ../../../docs_src/body_multiple_params/tutorial004_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial004_py310.py!} ``` //// @@ -165,7 +165,7 @@ Por exemplo: //// tab | Python 3.8+ ```Python hl_lines="27" -{!> ../../../docs_src/body_multiple_params/tutorial004.py!} +{!> ../../docs_src/body_multiple_params/tutorial004.py!} ``` //// @@ -193,7 +193,7 @@ como em: //// tab | Python 3.10+ ```Python hl_lines="15" -{!> ../../../docs_src/body_multiple_params/tutorial005_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial005_py310.py!} ``` //// @@ -201,7 +201,7 @@ como em: //// tab | Python 3.8+ ```Python hl_lines="17" -{!> ../../../docs_src/body_multiple_params/tutorial005.py!} +{!> ../../docs_src/body_multiple_params/tutorial005.py!} ``` //// diff --git a/docs/pt/docs/tutorial/body-nested-models.md b/docs/pt/docs/tutorial/body-nested-models.md index 7d933b27f..3aa79d563 100644 --- a/docs/pt/docs/tutorial/body-nested-models.md +++ b/docs/pt/docs/tutorial/body-nested-models.md @@ -7,7 +7,7 @@ Com o **FastAPI**, vocĂȘ pode definir, validar, documentar e usar modelos profun VocĂȘ pode definir um atributo como um subtipo. Por exemplo, uma `list` do Python: ```Python hl_lines="14" -{!../../../docs_src/body_nested_models/tutorial001.py!} +{!../../docs_src/body_nested_models/tutorial001.py!} ``` Isso farĂĄ com que tags seja uma lista de itens mesmo sem declarar o tipo dos elementos desta lista. @@ -21,7 +21,7 @@ Mas o Python tem uma maneira especĂ­fica de declarar listas com tipos internos o Primeiramente, importe `List` do mĂłdulo `typing` que jĂĄ vem por padrĂŁo no Python: ```Python hl_lines="1" -{!../../../docs_src/body_nested_models/tutorial002.py!} +{!../../docs_src/body_nested_models/tutorial002.py!} ``` ### Declare a `List` com um parĂąmetro de tipo @@ -45,7 +45,7 @@ Portanto, em nosso exemplo, podemos fazer com que `tags` sejam especificamente u ```Python hl_lines="14" -{!../../../docs_src/body_nested_models/tutorial002.py!} +{!../../docs_src/body_nested_models/tutorial002.py!} ``` ## Tipo "set" @@ -59,7 +59,7 @@ EntĂŁo podemos importar `Set` e declarar `tags` como um `set` de `str`s: ```Python hl_lines="1 14" -{!../../../docs_src/body_nested_models/tutorial003.py!} +{!../../docs_src/body_nested_models/tutorial003.py!} ``` Com isso, mesmo que vocĂȘ receba uma requisição contendo dados duplicados, ela serĂĄ convertida em um conjunto de itens exclusivos. @@ -83,7 +83,7 @@ Tudo isso, aninhado arbitrariamente. Por exemplo, nĂłs podemos definir um modelo `Image`: ```Python hl_lines="9-11" -{!../../../docs_src/body_nested_models/tutorial004.py!} +{!../../docs_src/body_nested_models/tutorial004.py!} ``` ### Use o sub-modelo como um tipo @@ -91,7 +91,7 @@ Por exemplo, nĂłs podemos definir um modelo `Image`: E entĂŁo podemos usa-lo como o tipo de um atributo: ```Python hl_lines="20" -{!../../../docs_src/body_nested_models/tutorial004.py!} +{!../../docs_src/body_nested_models/tutorial004.py!} ``` Isso significa que o **FastAPI** vai esperar um corpo similar Ă : @@ -126,7 +126,7 @@ Para ver todas as opçÔes possĂ­veis, cheque a documentação para os ../../../docs_src/cookie_params/tutorial001_an_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py310.py!} ``` //// @@ -17,7 +17,7 @@ Primeiro importe `Cookie`: //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ Primeiro importe `Cookie`: //// tab | Python 3.8+ ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001_an.py!} +{!> ../../docs_src/cookie_params/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="1" -{!> ../../../docs_src/cookie_params/tutorial001_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_py310.py!} ``` //// @@ -53,7 +53,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001.py!} +{!> ../../docs_src/cookie_params/tutorial001.py!} ``` //// @@ -68,7 +68,7 @@ VocĂȘ pode definir o valor padrĂŁo, assim como todas as validaçÔes extras ou p //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py310.py!} ``` //// @@ -76,7 +76,7 @@ VocĂȘ pode definir o valor padrĂŁo, assim como todas as validaçÔes extras ou p //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py39.py!} ``` //// @@ -84,7 +84,7 @@ VocĂȘ pode definir o valor padrĂŁo, assim como todas as validaçÔes extras ou p //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/cookie_params/tutorial001_an.py!} +{!> ../../docs_src/cookie_params/tutorial001_an.py!} ``` //// @@ -98,7 +98,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="7" -{!> ../../../docs_src/cookie_params/tutorial001_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_py310.py!} ``` //// @@ -112,7 +112,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001.py!} +{!> ../../docs_src/cookie_params/tutorial001.py!} ``` //// diff --git a/docs/pt/docs/tutorial/cors.md b/docs/pt/docs/tutorial/cors.md index e5e2f8c27..16c4e9bf5 100644 --- a/docs/pt/docs/tutorial/cors.md +++ b/docs/pt/docs/tutorial/cors.md @@ -47,7 +47,7 @@ VocĂȘ tambĂ©m pode especificar se o seu backend permite: * Cabeçalhos HTTP especĂ­ficos ou todos eles com o curinga `"*"`. ```Python hl_lines="2 6-11 13-19" -{!../../../docs_src/cors/tutorial001.py!} +{!../../docs_src/cors/tutorial001.py!} ``` Os parĂąmetros padrĂŁo usados ​​pela implementação `CORSMiddleware` sĂŁo restritivos por padrĂŁo, entĂŁo vocĂȘ precisarĂĄ habilitar explicitamente as origens, mĂ©todos ou cabeçalhos especĂ­ficos para que os navegadores tenham permissĂŁo para usĂĄ-los em um contexto de domĂ­nios diferentes. diff --git a/docs/pt/docs/tutorial/debugging.md b/docs/pt/docs/tutorial/debugging.md index 54582fcbc..6bac7eb85 100644 --- a/docs/pt/docs/tutorial/debugging.md +++ b/docs/pt/docs/tutorial/debugging.md @@ -7,7 +7,7 @@ VocĂȘ pode conectar o depurador no seu editor, por exemplo, com o Visual Studio Em seu aplicativo FastAPI, importe e execute `uvicorn` diretamente: ```Python hl_lines="1 15" -{!../../../docs_src/debugging/tutorial001.py!} +{!../../docs_src/debugging/tutorial001.py!} ``` ### Sobre `__name__ == "__main__"` diff --git a/docs/pt/docs/tutorial/dependencies/classes-as-dependencies.md b/docs/pt/docs/tutorial/dependencies/classes-as-dependencies.md index 420503b87..179bfefb5 100644 --- a/docs/pt/docs/tutorial/dependencies/classes-as-dependencies.md +++ b/docs/pt/docs/tutorial/dependencies/classes-as-dependencies.md @@ -9,7 +9,7 @@ No exemplo anterior, nĂłs retornĂĄvamos um `dict` da nossa dependĂȘncia ("injet //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/dependencies/tutorial001_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// @@ -17,7 +17,7 @@ No exemplo anterior, nĂłs retornĂĄvamos um `dict` da nossa dependĂȘncia ("injet //// tab | Python 3.9+ ```Python hl_lines="11" -{!> ../../../docs_src/dependencies/tutorial001_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ No exemplo anterior, nĂłs retornĂĄvamos um `dict` da nossa dependĂȘncia ("injet //// tab | Python 3.8+ ```Python hl_lines="12" -{!> ../../../docs_src/dependencies/tutorial001_an.py!} +{!> ../../docs_src/dependencies/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="7" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -53,7 +53,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="11" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -122,7 +122,7 @@ EntĂŁo, podemos mudar o "injetĂĄvel" na dependĂȘncia `common_parameters` acima p //// tab | Python 3.10+ ```Python hl_lines="11-15" -{!> ../../../docs_src/dependencies/tutorial002_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_an_py310.py!} ``` //// @@ -130,7 +130,7 @@ EntĂŁo, podemos mudar o "injetĂĄvel" na dependĂȘncia `common_parameters` acima p //// tab | Python 3.9+ ```Python hl_lines="11-15" -{!> ../../../docs_src/dependencies/tutorial002_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial002_an_py39.py!} ``` //// @@ -138,7 +138,7 @@ EntĂŁo, podemos mudar o "injetĂĄvel" na dependĂȘncia `common_parameters` acima p //// tab | Python 3.8+ ```Python hl_lines="12-16" -{!> ../../../docs_src/dependencies/tutorial002_an.py!} +{!> ../../docs_src/dependencies/tutorial002_an.py!} ``` //// @@ -152,7 +152,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="9-13" -{!> ../../../docs_src/dependencies/tutorial002_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_py310.py!} ``` //// @@ -166,7 +166,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="11-15" -{!> ../../../docs_src/dependencies/tutorial002.py!} +{!> ../../docs_src/dependencies/tutorial002.py!} ``` //// @@ -176,7 +176,7 @@ Observe o mĂ©todo `__init__` usado para criar uma instĂąncia da classe: //// tab | Python 3.10+ ```Python hl_lines="12" -{!> ../../../docs_src/dependencies/tutorial002_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_an_py310.py!} ``` //// @@ -184,7 +184,7 @@ Observe o mĂ©todo `__init__` usado para criar uma instĂąncia da classe: //// tab | Python 3.9+ ```Python hl_lines="12" -{!> ../../../docs_src/dependencies/tutorial002_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial002_an_py39.py!} ``` //// @@ -192,7 +192,7 @@ Observe o mĂ©todo `__init__` usado para criar uma instĂąncia da classe: //// tab | Python 3.8+ ```Python hl_lines="13" -{!> ../../../docs_src/dependencies/tutorial002_an.py!} +{!> ../../docs_src/dependencies/tutorial002_an.py!} ``` //// @@ -206,7 +206,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="10" -{!> ../../../docs_src/dependencies/tutorial002_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_py310.py!} ``` //// @@ -220,7 +220,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="12" -{!> ../../../docs_src/dependencies/tutorial002.py!} +{!> ../../docs_src/dependencies/tutorial002.py!} ``` //// @@ -230,7 +230,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. //// tab | Python 3.10+ ```Python hl_lines="8" -{!> ../../../docs_src/dependencies/tutorial001_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// @@ -238,7 +238,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/dependencies/tutorial001_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py39.py!} ``` //// @@ -246,7 +246,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/dependencies/tutorial001_an.py!} +{!> ../../docs_src/dependencies/tutorial001_an.py!} ``` //// @@ -260,7 +260,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="6" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -274,7 +274,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="9" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -296,7 +296,7 @@ Agora vocĂȘ pode declarar sua dependĂȘncia utilizando essa classe. //// tab | Python 3.10+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial002_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_an_py310.py!} ``` //// @@ -304,7 +304,7 @@ Agora vocĂȘ pode declarar sua dependĂȘncia utilizando essa classe. //// tab | Python 3.9+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial002_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial002_an_py39.py!} ``` //// @@ -312,7 +312,7 @@ Agora vocĂȘ pode declarar sua dependĂȘncia utilizando essa classe. //// tab | Python 3.8+ ```Python hl_lines="20" -{!> ../../../docs_src/dependencies/tutorial002_an.py!} +{!> ../../docs_src/dependencies/tutorial002_an.py!} ``` //// @@ -326,7 +326,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial002_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_py310.py!} ``` //// @@ -340,7 +340,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial002.py!} +{!> ../../docs_src/dependencies/tutorial002.py!} ``` //// @@ -440,7 +440,7 @@ commons = Depends(CommonQueryParams) //// tab | Python 3.10+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial003_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial003_an_py310.py!} ``` //// @@ -448,7 +448,7 @@ commons = Depends(CommonQueryParams) //// tab | Python 3.9+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial003_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial003_an_py39.py!} ``` //// @@ -456,7 +456,7 @@ commons = Depends(CommonQueryParams) //// tab | Python 3.8+ ```Python hl_lines="20" -{!> ../../../docs_src/dependencies/tutorial003_an.py!} +{!> ../../docs_src/dependencies/tutorial003_an.py!} ``` //// @@ -470,7 +470,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial003_py310.py!} +{!> ../../docs_src/dependencies/tutorial003_py310.py!} ``` //// @@ -484,7 +484,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial003.py!} +{!> ../../docs_src/dependencies/tutorial003.py!} ``` //// @@ -578,7 +578,7 @@ O mesmo exemplo ficaria entĂŁo dessa forma: //// tab | Python 3.10+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial004_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial004_an_py310.py!} ``` //// @@ -586,7 +586,7 @@ O mesmo exemplo ficaria entĂŁo dessa forma: //// tab | Python 3.9+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial004_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial004_an_py39.py!} ``` //// @@ -594,7 +594,7 @@ O mesmo exemplo ficaria entĂŁo dessa forma: //// tab | Python 3.8+ ```Python hl_lines="20" -{!> ../../../docs_src/dependencies/tutorial004_an.py!} +{!> ../../docs_src/dependencies/tutorial004_an.py!} ``` //// @@ -608,7 +608,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial004_py310.py!} +{!> ../../docs_src/dependencies/tutorial004_py310.py!} ``` //// @@ -622,7 +622,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial004.py!} +{!> ../../docs_src/dependencies/tutorial004.py!} ``` //// diff --git a/docs/pt/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md b/docs/pt/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md index 4a7a29390..7d7086945 100644 --- a/docs/pt/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md +++ b/docs/pt/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md @@ -17,7 +17,7 @@ Ele deve ser uma lista de `Depends()`: //// tab | Python 3.9+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial006_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial006_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ Ele deve ser uma lista de `Depends()`: //// tab | Python 3.8+ ```Python hl_lines="18" -{!> ../../../docs_src/dependencies/tutorial006_an.py!} +{!> ../../docs_src/dependencies/tutorial006_an.py!} ``` //// @@ -39,7 +39,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel /// ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial006.py!} +{!> ../../docs_src/dependencies/tutorial006.py!} ``` //// @@ -75,7 +75,7 @@ DependĂȘncias podem declarar requisitos de requisiçÔes (como cabeçalhos) ou o //// tab | Python 3.9+ ```Python hl_lines="8 13" -{!> ../../../docs_src/dependencies/tutorial006_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial006_an_py39.py!} ``` //// @@ -83,7 +83,7 @@ DependĂȘncias podem declarar requisitos de requisiçÔes (como cabeçalhos) ou o //// tab | Python 3.8+ ```Python hl_lines="7 12" -{!> ../../../docs_src/dependencies/tutorial006_an.py!} +{!> ../../docs_src/dependencies/tutorial006_an.py!} ``` //// @@ -97,7 +97,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel /// ```Python hl_lines="6 11" -{!> ../../../docs_src/dependencies/tutorial006.py!} +{!> ../../docs_src/dependencies/tutorial006.py!} ``` //// @@ -109,7 +109,7 @@ Essas dependĂȘncias podem levantar exceçÔes, da mesma forma que dependĂȘncias //// tab | Python 3.9+ ```Python hl_lines="10 15" -{!> ../../../docs_src/dependencies/tutorial006_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial006_an_py39.py!} ``` //// @@ -117,7 +117,7 @@ Essas dependĂȘncias podem levantar exceçÔes, da mesma forma que dependĂȘncias //// tab | Python 3.8+ ```Python hl_lines="9 14" -{!> ../../../docs_src/dependencies/tutorial006_an.py!} +{!> ../../docs_src/dependencies/tutorial006_an.py!} ``` //// @@ -131,7 +131,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel /// ```Python hl_lines="8 13" -{!> ../../../docs_src/dependencies/tutorial006.py!} +{!> ../../docs_src/dependencies/tutorial006.py!} ``` //// @@ -145,7 +145,7 @@ EntĂŁo, vocĂȘ pode reutilizar uma dependĂȘncia comum (que retorna um valor) que //// tab | Python 3.9+ ```Python hl_lines="11 16" -{!> ../../../docs_src/dependencies/tutorial006_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial006_an_py39.py!} ``` //// @@ -153,7 +153,7 @@ EntĂŁo, vocĂȘ pode reutilizar uma dependĂȘncia comum (que retorna um valor) que //// tab | Python 3.8+ ```Python hl_lines="10 15" -{!> ../../../docs_src/dependencies/tutorial006_an.py!} +{!> ../../docs_src/dependencies/tutorial006_an.py!} ``` //// @@ -169,7 +169,7 @@ EntĂŁo, vocĂȘ pode reutilizar uma dependĂȘncia comum (que retorna um valor) que Utilize a versĂŁo com `Annotated` se possĂ­vel ```Python hl_lines="9 14" -{!> ../../../docs_src/dependencies/tutorial006.py!} +{!> ../../docs_src/dependencies/tutorial006.py!} ``` //// diff --git a/docs/pt/docs/tutorial/dependencies/dependencies-with-yield.md b/docs/pt/docs/tutorial/dependencies/dependencies-with-yield.md index 16c2cf899..d90bebe39 100644 --- a/docs/pt/docs/tutorial/dependencies/dependencies-with-yield.md +++ b/docs/pt/docs/tutorial/dependencies/dependencies-with-yield.md @@ -30,19 +30,19 @@ Por exemplo, vocĂȘ poderia utilizar isso para criar uma sessĂŁo do banco de dado Apenas o cĂłdigo anterior a declaração com `yield` e o cĂłdigo contendo essa declaração sĂŁo executados antes de criar uma resposta. ```Python hl_lines="2-4" -{!../../../docs_src/dependencies/tutorial007.py!} +{!../../docs_src/dependencies/tutorial007.py!} ``` O valor gerado (yielded) Ă© o que Ă© injetado nas *operaçÔes de rota* e outras dependĂȘncias. ```Python hl_lines="4" -{!../../../docs_src/dependencies/tutorial007.py!} +{!../../docs_src/dependencies/tutorial007.py!} ``` O cĂłdigo apĂłs o `yield` Ă© executado apĂłs a resposta ser entregue: ```Python hl_lines="5-6" -{!../../../docs_src/dependencies/tutorial007.py!} +{!../../docs_src/dependencies/tutorial007.py!} ``` /// tip | "Dica" @@ -64,7 +64,7 @@ EntĂŁo, vocĂȘ pode procurar por essa exceção especĂ­fica dentro da dependĂȘnci Da mesma forma, vocĂȘ pode utilizar `finally` para garantir que os passos de saĂ­da sĂŁo executados, com ou sem exceçÔes. ```python hl_lines="3 5" -{!../../../docs_src/dependencies/tutorial007.py!} +{!../../docs_src/dependencies/tutorial007.py!} ``` ## SubdependĂȘncias com `yield` @@ -78,7 +78,7 @@ Por exemplo, `dependency_c` pode depender de `dependency_b`, e `dependency_b` de //// tab | python 3.9+ ```python hl_lines="6 14 22" -{!> ../../../docs_src/dependencies/tutorial008_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial008_an_py39.py!} ``` //// @@ -86,7 +86,7 @@ Por exemplo, `dependency_c` pode depender de `dependency_b`, e `dependency_b` de //// tab | python 3.8+ ```python hl_lines="5 13 21" -{!> ../../../docs_src/dependencies/tutorial008_an.py!} +{!> ../../docs_src/dependencies/tutorial008_an.py!} ``` //// @@ -100,7 +100,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```python hl_lines="4 12 20" -{!> ../../../docs_src/dependencies/tutorial008.py!} +{!> ../../docs_src/dependencies/tutorial008.py!} ``` //// @@ -114,7 +114,7 @@ E, por outro lado, `dependency_b` precisa que o valor de `dependency_a` (nomeada //// tab | python 3.9+ ```python hl_lines="18-19 26-27" -{!> ../../../docs_src/dependencies/tutorial008_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial008_an_py39.py!} ``` //// @@ -122,7 +122,7 @@ E, por outro lado, `dependency_b` precisa que o valor de `dependency_a` (nomeada //// tab | python 3.8+ ```python hl_lines="17-18 25-26" -{!> ../../../docs_src/dependencies/tutorial008_an.py!} +{!> ../../docs_src/dependencies/tutorial008_an.py!} ``` //// @@ -136,7 +136,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```python hl_lines="16-17 24-25" -{!> ../../../docs_src/dependencies/tutorial008.py!} +{!> ../../docs_src/dependencies/tutorial008.py!} ``` //// @@ -174,7 +174,7 @@ Mas ela existe para ser utilizada caso vocĂȘ precise. đŸ€“ //// tab | python 3.9+ ```python hl_lines="18-22 31" -{!> ../../../docs_src/dependencies/tutorial008b_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial008b_an_py39.py!} ``` //// @@ -182,7 +182,7 @@ Mas ela existe para ser utilizada caso vocĂȘ precise. đŸ€“ //// tab | python 3.8+ ```python hl_lines="17-21 30" -{!> ../../../docs_src/dependencies/tutorial008b_an.py!} +{!> ../../docs_src/dependencies/tutorial008b_an.py!} ``` //// @@ -196,7 +196,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```python hl_lines="16-20 29" -{!> ../../../docs_src/dependencies/tutorial008b.py!} +{!> ../../docs_src/dependencies/tutorial008b.py!} ``` //// @@ -210,7 +210,7 @@ Se vocĂȘ capturar uma exceção com `except` em uma dependĂȘncia que utilize `yi //// tab | Python 3.9+ ```Python hl_lines="15-16" -{!> ../../../docs_src/dependencies/tutorial008c_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial008c_an_py39.py!} ``` //// @@ -218,7 +218,7 @@ Se vocĂȘ capturar uma exceção com `except` em uma dependĂȘncia que utilize `yi //// tab | Python 3.8+ ```Python hl_lines="14-15" -{!> ../../../docs_src/dependencies/tutorial008c_an.py!} +{!> ../../docs_src/dependencies/tutorial008c_an.py!} ``` //// @@ -232,7 +232,7 @@ utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="13-14" -{!> ../../../docs_src/dependencies/tutorial008c.py!} +{!> ../../docs_src/dependencies/tutorial008c.py!} ``` //// @@ -248,7 +248,7 @@ VocĂȘ pode relançar a mesma exceção utilizando `raise`: //// tab | Python 3.9+ ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial008d_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial008d_an_py39.py!} ``` //// @@ -256,7 +256,7 @@ VocĂȘ pode relançar a mesma exceção utilizando `raise`: //// tab | Python 3.8+ ```Python hl_lines="16" -{!> ../../../docs_src/dependencies/tutorial008d_an.py!} +{!> ../../docs_src/dependencies/tutorial008d_an.py!} ``` //// @@ -270,7 +270,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="15" -{!> ../../../docs_src/dependencies/tutorial008d.py!} +{!> ../../docs_src/dependencies/tutorial008d.py!} ``` //// @@ -403,7 +403,7 @@ Em python, vocĂȘ pode criar Gerenciadores de Contexto ao ../../../docs_src/dependencies/tutorial012_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial012_an_py39.py!} ``` //// @@ -17,7 +17,7 @@ Nesse caso, elas serĂŁo aplicadas a todas as *operaçÔes de rota* da aplicaçã //// tab | Python 3.8+ ```Python hl_lines="16" -{!> ../../../docs_src/dependencies/tutorial012_an.py!} +{!> ../../docs_src/dependencies/tutorial012_an.py!} ``` //// @@ -31,7 +31,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="15" -{!> ../../../docs_src/dependencies/tutorial012.py!} +{!> ../../docs_src/dependencies/tutorial012.py!} ``` //// diff --git a/docs/pt/docs/tutorial/dependencies/index.md b/docs/pt/docs/tutorial/dependencies/index.md index f7b32966c..2a63e7ab8 100644 --- a/docs/pt/docs/tutorial/dependencies/index.md +++ b/docs/pt/docs/tutorial/dependencies/index.md @@ -34,7 +34,7 @@ Ela Ă© apenas uma função que pode receber os mesmos parĂąmetros de uma *funç //// tab | Python 3.10+ ```Python hl_lines="8-9" -{!> ../../../docs_src/dependencies/tutorial001_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// @@ -42,7 +42,7 @@ Ela Ă© apenas uma função que pode receber os mesmos parĂąmetros de uma *funç //// tab | Python 3.9+ ```Python hl_lines="8-11" -{!> ../../../docs_src/dependencies/tutorial001_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py39.py!} ``` //// @@ -50,7 +50,7 @@ Ela Ă© apenas uma função que pode receber os mesmos parĂąmetros de uma *funç //// tab | Python 3.8+ ```Python hl_lines="9-12" -{!> ../../../docs_src/dependencies/tutorial001_an.py!} +{!> ../../docs_src/dependencies/tutorial001_an.py!} ``` //// @@ -64,7 +64,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="6-7" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -78,7 +78,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="8-11" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -116,7 +116,7 @@ Certifique-se de [Atualizar a versĂŁo do FastAPI](../../deployment/versions.md#a //// tab | Python 3.10+ ```Python hl_lines="3" -{!> ../../../docs_src/dependencies/tutorial001_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// @@ -124,7 +124,7 @@ Certifique-se de [Atualizar a versĂŁo do FastAPI](../../deployment/versions.md#a //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/dependencies/tutorial001_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py39.py!} ``` //// @@ -132,7 +132,7 @@ Certifique-se de [Atualizar a versĂŁo do FastAPI](../../deployment/versions.md#a //// tab | Python 3.8+ ```Python hl_lines="3" -{!> ../../../docs_src/dependencies/tutorial001_an.py!} +{!> ../../docs_src/dependencies/tutorial001_an.py!} ``` //// @@ -146,7 +146,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="1" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -160,7 +160,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="3" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -172,7 +172,7 @@ Da mesma forma que vocĂȘ utiliza `Body`, `Query`, etc. Como parĂąmetros de sua * //// tab | Python 3.10+ ```Python hl_lines="13 18" -{!> ../../../docs_src/dependencies/tutorial001_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// @@ -180,7 +180,7 @@ Da mesma forma que vocĂȘ utiliza `Body`, `Query`, etc. Como parĂąmetros de sua * //// tab | Python 3.9+ ```Python hl_lines="15 20" -{!> ../../../docs_src/dependencies/tutorial001_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py39.py!} ``` //// @@ -188,7 +188,7 @@ Da mesma forma que vocĂȘ utiliza `Body`, `Query`, etc. Como parĂąmetros de sua * //// tab | Python 3.8+ ```Python hl_lines="16 21" -{!> ../../../docs_src/dependencies/tutorial001_an.py!} +{!> ../../docs_src/dependencies/tutorial001_an.py!} ``` //// @@ -202,7 +202,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="11 16" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -216,7 +216,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="15 20" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -279,7 +279,7 @@ Mas como estamos utilizando `Annotated`, podemos guardar esse valor `Annotated` //// tab | Python 3.10+ ```Python hl_lines="12 16 21" -{!> ../../../docs_src/dependencies/tutorial001_02_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_02_an_py310.py!} ``` //// @@ -287,7 +287,7 @@ Mas como estamos utilizando `Annotated`, podemos guardar esse valor `Annotated` //// tab | Python 3.9+ ```Python hl_lines="14 18 23" -{!> ../../../docs_src/dependencies/tutorial001_02_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_02_an_py39.py!} ``` //// @@ -295,7 +295,7 @@ Mas como estamos utilizando `Annotated`, podemos guardar esse valor `Annotated` //// tab | Python 3.8+ ```Python hl_lines="15 19 24" -{!> ../../../docs_src/dependencies/tutorial001_02_an.py!} +{!> ../../docs_src/dependencies/tutorial001_02_an.py!} ``` //// diff --git a/docs/pt/docs/tutorial/dependencies/sub-dependencies.md b/docs/pt/docs/tutorial/dependencies/sub-dependencies.md index 279bf3339..b890fe793 100644 --- a/docs/pt/docs/tutorial/dependencies/sub-dependencies.md +++ b/docs/pt/docs/tutorial/dependencies/sub-dependencies.md @@ -13,7 +13,7 @@ VocĂȘ pode criar uma primeira dependĂȘncia (injetĂĄvel) dessa forma: //// tab | Python 3.10+ ```Python hl_lines="8-9" -{!> ../../../docs_src/dependencies/tutorial005_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_an_py310.py!} ``` //// @@ -21,7 +21,7 @@ VocĂȘ pode criar uma primeira dependĂȘncia (injetĂĄvel) dessa forma: //// tab | Python 3.9+ ```Python hl_lines="8-9" -{!> ../../../docs_src/dependencies/tutorial005_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial005_an_py39.py!} ``` //// @@ -29,7 +29,7 @@ VocĂȘ pode criar uma primeira dependĂȘncia (injetĂĄvel) dessa forma: //// tab | Python 3.8+ ```Python hl_lines="9-10" -{!> ../../../docs_src/dependencies/tutorial005_an.py!} +{!> ../../docs_src/dependencies/tutorial005_an.py!} ``` //// @@ -43,7 +43,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="6-7" -{!> ../../../docs_src/dependencies/tutorial005_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_py310.py!} ``` //// @@ -57,7 +57,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="8-9" -{!> ../../../docs_src/dependencies/tutorial005.py!} +{!> ../../docs_src/dependencies/tutorial005.py!} ``` //// @@ -73,7 +73,7 @@ EntĂŁo, vocĂȘ pode criar uma outra função para uma dependĂȘncia (um "injetĂĄve //// tab | Python 3.10+ ```Python hl_lines="13" -{!> ../../../docs_src/dependencies/tutorial005_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_an_py310.py!} ``` //// @@ -81,7 +81,7 @@ EntĂŁo, vocĂȘ pode criar uma outra função para uma dependĂȘncia (um "injetĂĄve //// tab | Python 3.9+ ```Python hl_lines="13" -{!> ../../../docs_src/dependencies/tutorial005_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial005_an_py39.py!} ``` //// @@ -89,7 +89,7 @@ EntĂŁo, vocĂȘ pode criar uma outra função para uma dependĂȘncia (um "injetĂĄve //// tab | Python 3.8+ ```Python hl_lines="14" -{!> ../../../docs_src/dependencies/tutorial005_an.py!} +{!> ../../docs_src/dependencies/tutorial005_an.py!} ``` //// @@ -103,7 +103,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="11" -{!> ../../../docs_src/dependencies/tutorial005_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_py310.py!} ``` //// @@ -117,7 +117,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="13" -{!> ../../../docs_src/dependencies/tutorial005.py!} +{!> ../../docs_src/dependencies/tutorial005.py!} ``` //// @@ -136,7 +136,7 @@ EntĂŁo podemos utilizar a dependĂȘncia com: //// tab | Python 3.10+ ```Python hl_lines="23" -{!> ../../../docs_src/dependencies/tutorial005_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_an_py310.py!} ``` //// @@ -144,7 +144,7 @@ EntĂŁo podemos utilizar a dependĂȘncia com: //// tab | Python 3.9+ ```Python hl_lines="23" -{!> ../../../docs_src/dependencies/tutorial005_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial005_an_py39.py!} ``` //// @@ -152,7 +152,7 @@ EntĂŁo podemos utilizar a dependĂȘncia com: //// tab | Python 3.8+ ```Python hl_lines="24" -{!> ../../../docs_src/dependencies/tutorial005_an.py!} +{!> ../../docs_src/dependencies/tutorial005_an.py!} ``` //// @@ -166,7 +166,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial005_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_py310.py!} ``` //// @@ -180,7 +180,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="22" -{!> ../../../docs_src/dependencies/tutorial005.py!} +{!> ../../docs_src/dependencies/tutorial005.py!} ``` //// diff --git a/docs/pt/docs/tutorial/encoder.md b/docs/pt/docs/tutorial/encoder.md index c104098ee..c8ce77e74 100644 --- a/docs/pt/docs/tutorial/encoder.md +++ b/docs/pt/docs/tutorial/encoder.md @@ -23,7 +23,7 @@ A função recebe um objeto, como um modelo Pydantic e retorna uma versĂŁo compa //// tab | Python 3.10+ ```Python hl_lines="4 21" -{!> ../../../docs_src/encoder/tutorial001_py310.py!} +{!> ../../docs_src/encoder/tutorial001_py310.py!} ``` //// @@ -31,7 +31,7 @@ A função recebe um objeto, como um modelo Pydantic e retorna uma versĂŁo compa //// tab | Python 3.8+ ```Python hl_lines="5 22" -{!> ../../../docs_src/encoder/tutorial001.py!} +{!> ../../docs_src/encoder/tutorial001.py!} ``` //// diff --git a/docs/pt/docs/tutorial/extra-data-types.md b/docs/pt/docs/tutorial/extra-data-types.md index 5d50d8942..78f7ac694 100644 --- a/docs/pt/docs/tutorial/extra-data-types.md +++ b/docs/pt/docs/tutorial/extra-data-types.md @@ -56,11 +56,11 @@ Aqui estĂŁo alguns dos tipos de dados adicionais que vocĂȘ pode usar: Aqui estĂĄ um exemplo de *operação de rota* com parĂąmetros utilizando-se de alguns dos tipos acima. ```Python hl_lines="1 3 12-16" -{!../../../docs_src/extra_data_types/tutorial001.py!} +{!../../docs_src/extra_data_types/tutorial001.py!} ``` Note que os parĂąmetros dentro da função tem seu tipo de dados natural, e vocĂȘ pode, por exemplo, realizar manipulaçÔes normais de data, como: ```Python hl_lines="18-19" -{!../../../docs_src/extra_data_types/tutorial001.py!} +{!../../docs_src/extra_data_types/tutorial001.py!} ``` diff --git a/docs/pt/docs/tutorial/extra-models.md b/docs/pt/docs/tutorial/extra-models.md index 564aeadca..03227f2bb 100644 --- a/docs/pt/docs/tutorial/extra-models.md +++ b/docs/pt/docs/tutorial/extra-models.md @@ -23,7 +23,7 @@ Aqui estĂĄ uma ideia geral de como os modelos poderiam parecer com seus campos d //// tab | Python 3.8 and above ```Python hl_lines="9 11 16 22 24 29-30 33-35 40-41" -{!> ../../../docs_src/extra_models/tutorial001.py!} +{!> ../../docs_src/extra_models/tutorial001.py!} ``` //// @@ -31,7 +31,7 @@ Aqui estĂĄ uma ideia geral de como os modelos poderiam parecer com seus campos d //// tab | Python 3.10 and above ```Python hl_lines="7 9 14 20 22 27-28 31-33 38-39" -{!> ../../../docs_src/extra_models/tutorial001_py310.py!} +{!> ../../docs_src/extra_models/tutorial001_py310.py!} ``` //// @@ -171,7 +171,7 @@ Dessa forma, podemos declarar apenas as diferenças entre os modelos (com `passw //// tab | Python 3.8 and above ```Python hl_lines="9 15-16 19-20 23-24" -{!> ../../../docs_src/extra_models/tutorial002.py!} +{!> ../../docs_src/extra_models/tutorial002.py!} ``` //// @@ -179,7 +179,7 @@ Dessa forma, podemos declarar apenas as diferenças entre os modelos (com `passw //// tab | Python 3.10 and above ```Python hl_lines="7 13-14 17-18 21-22" -{!> ../../../docs_src/extra_models/tutorial002_py310.py!} +{!> ../../docs_src/extra_models/tutorial002_py310.py!} ``` //// @@ -201,7 +201,7 @@ Ao definir um ../../../docs_src/extra_models/tutorial003.py!} +{!> ../../docs_src/extra_models/tutorial003.py!} ``` //// @@ -209,7 +209,7 @@ Ao definir um ../../../docs_src/extra_models/tutorial003_py310.py!} +{!> ../../docs_src/extra_models/tutorial003_py310.py!} ``` //// @@ -237,7 +237,7 @@ Para isso, use o padrĂŁo Python `typing.List` (ou simplesmente `list` no Python //// tab | Python 3.8 and above ```Python hl_lines="1 20" -{!> ../../../docs_src/extra_models/tutorial004.py!} +{!> ../../docs_src/extra_models/tutorial004.py!} ``` //// @@ -245,7 +245,7 @@ Para isso, use o padrĂŁo Python `typing.List` (ou simplesmente `list` no Python //// tab | Python 3.9 and above ```Python hl_lines="18" -{!> ../../../docs_src/extra_models/tutorial004_py39.py!} +{!> ../../docs_src/extra_models/tutorial004_py39.py!} ``` //// @@ -261,7 +261,7 @@ Neste caso, vocĂȘ pode usar `typing.Dict` (ou simplesmente dict no Python 3.9 e //// tab | Python 3.8 and above ```Python hl_lines="1 8" -{!> ../../../docs_src/extra_models/tutorial005.py!} +{!> ../../docs_src/extra_models/tutorial005.py!} ``` //// @@ -269,7 +269,7 @@ Neste caso, vocĂȘ pode usar `typing.Dict` (ou simplesmente dict no Python 3.9 e //// tab | Python 3.9 and above ```Python hl_lines="6" -{!> ../../../docs_src/extra_models/tutorial005_py39.py!} +{!> ../../docs_src/extra_models/tutorial005_py39.py!} ``` //// diff --git a/docs/pt/docs/tutorial/first-steps.md b/docs/pt/docs/tutorial/first-steps.md index 4c2a8a8e3..4990b5984 100644 --- a/docs/pt/docs/tutorial/first-steps.md +++ b/docs/pt/docs/tutorial/first-steps.md @@ -3,7 +3,7 @@ O arquivo FastAPI mais simples pode se parecer com: ```Python -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` Copie o conteĂșdo para um arquivo `main.py`. @@ -134,7 +134,7 @@ VocĂȘ tambĂ©m pode usĂĄ-lo para gerar cĂłdigo automaticamente para clientes que ### Passo 1: importe `FastAPI` ```Python hl_lines="1" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` `FastAPI` Ă© uma classe Python que fornece todas as funcionalidades para sua API. @@ -150,7 +150,7 @@ VocĂȘ pode usar todas as funcionalidades do ../../../docs_src/header_params/tutorial001_py310.py!} +{!> ../../docs_src/header_params/tutorial001_py310.py!} ``` //// @@ -17,7 +17,7 @@ Primeiro importe `Header`: //// tab | Python 3.8+ ```Python hl_lines="3" -{!> ../../../docs_src/header_params/tutorial001.py!} +{!> ../../docs_src/header_params/tutorial001.py!} ``` //// @@ -31,7 +31,7 @@ O primeiro valor Ă© o valor padrĂŁo, vocĂȘ pode passar todas as validaçÔes adi //// tab | Python 3.10+ ```Python hl_lines="7" -{!> ../../../docs_src/header_params/tutorial001_py310.py!} +{!> ../../docs_src/header_params/tutorial001_py310.py!} ``` //// @@ -39,7 +39,7 @@ O primeiro valor Ă© o valor padrĂŁo, vocĂȘ pode passar todas as validaçÔes adi //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial001.py!} +{!> ../../docs_src/header_params/tutorial001.py!} ``` //// @@ -77,7 +77,7 @@ Se por algum motivo vocĂȘ precisar desabilitar a conversĂŁo automĂĄtica de subli //// tab | Python 3.10+ ```Python hl_lines="8" -{!> ../../../docs_src/header_params/tutorial002_py310.py!} +{!> ../../docs_src/header_params/tutorial002_py310.py!} ``` //// @@ -85,7 +85,7 @@ Se por algum motivo vocĂȘ precisar desabilitar a conversĂŁo automĂĄtica de subli //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/header_params/tutorial002.py!} +{!> ../../docs_src/header_params/tutorial002.py!} ``` //// @@ -109,7 +109,7 @@ Por exemplo, para declarar um cabeçalho de `X-Token` que pode aparecer mais de //// tab | Python 3.10+ ```Python hl_lines="7" -{!> ../../../docs_src/header_params/tutorial003_py310.py!} +{!> ../../docs_src/header_params/tutorial003_py310.py!} ``` //// @@ -117,7 +117,7 @@ Por exemplo, para declarar um cabeçalho de `X-Token` que pode aparecer mais de //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial003_py39.py!} +{!> ../../docs_src/header_params/tutorial003_py39.py!} ``` //// @@ -125,7 +125,7 @@ Por exemplo, para declarar um cabeçalho de `X-Token` que pode aparecer mais de //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial003.py!} +{!> ../../docs_src/header_params/tutorial003.py!} ``` //// diff --git a/docs/pt/docs/tutorial/middleware.md b/docs/pt/docs/tutorial/middleware.md index 1760246ee..35c61d5fc 100644 --- a/docs/pt/docs/tutorial/middleware.md +++ b/docs/pt/docs/tutorial/middleware.md @@ -32,7 +32,7 @@ A função middleware recebe: * VocĂȘ pode entĂŁo modificar ainda mais o `response` antes de retornĂĄ-lo. ```Python hl_lines="8-9 11 14" -{!../../../docs_src/middleware/tutorial001.py!} +{!../../docs_src/middleware/tutorial001.py!} ``` /// tip | "Dica" @@ -60,7 +60,7 @@ E tambĂ©m depois que a `response` Ă© gerada, antes de retornĂĄ-la. Por exemplo, vocĂȘ pode adicionar um cabeçalho personalizado `X-Process-Time` contendo o tempo em segundos que levou para processar a solicitação e gerar uma resposta: ```Python hl_lines="10 12-13" -{!../../../docs_src/middleware/tutorial001.py!} +{!../../docs_src/middleware/tutorial001.py!} ``` ## Outros middlewares diff --git a/docs/pt/docs/tutorial/path-operation-configuration.md b/docs/pt/docs/tutorial/path-operation-configuration.md index c57813780..48753d725 100644 --- a/docs/pt/docs/tutorial/path-operation-configuration.md +++ b/docs/pt/docs/tutorial/path-operation-configuration.md @@ -19,7 +19,7 @@ Mas se vocĂȘ nĂŁo se lembrar o que cada cĂłdigo numĂ©rico significa, pode usar a //// tab | Python 3.8 and above ```Python hl_lines="3 17" -{!> ../../../docs_src/path_operation_configuration/tutorial001.py!} +{!> ../../docs_src/path_operation_configuration/tutorial001.py!} ``` //// @@ -27,7 +27,7 @@ Mas se vocĂȘ nĂŁo se lembrar o que cada cĂłdigo numĂ©rico significa, pode usar a //// tab | Python 3.9 and above ```Python hl_lines="3 17" -{!> ../../../docs_src/path_operation_configuration/tutorial001_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial001_py39.py!} ``` //// @@ -35,7 +35,7 @@ Mas se vocĂȘ nĂŁo se lembrar o que cada cĂłdigo numĂ©rico significa, pode usar a //// tab | Python 3.10 and above ```Python hl_lines="1 15" -{!> ../../../docs_src/path_operation_configuration/tutorial001_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial001_py310.py!} ``` //// @@ -57,7 +57,7 @@ VocĂȘ pode adicionar tags para sua *operação de rota*, passe o parĂąmetro `tag //// tab | Python 3.8 and above ```Python hl_lines="17 22 27" -{!> ../../../docs_src/path_operation_configuration/tutorial002.py!} +{!> ../../docs_src/path_operation_configuration/tutorial002.py!} ``` //// @@ -65,7 +65,7 @@ VocĂȘ pode adicionar tags para sua *operação de rota*, passe o parĂąmetro `tag //// tab | Python 3.9 and above ```Python hl_lines="17 22 27" -{!> ../../../docs_src/path_operation_configuration/tutorial002_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial002_py39.py!} ``` //// @@ -73,7 +73,7 @@ VocĂȘ pode adicionar tags para sua *operação de rota*, passe o parĂąmetro `tag //// tab | Python 3.10 and above ```Python hl_lines="15 20 25" -{!> ../../../docs_src/path_operation_configuration/tutorial002_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial002_py310.py!} ``` //// @@ -91,7 +91,7 @@ Nestes casos, pode fazer sentido armazenar as tags em um `Enum`. **FastAPI** suporta isso da mesma maneira que com strings simples: ```Python hl_lines="1 8-10 13 18" -{!../../../docs_src/path_operation_configuration/tutorial002b.py!} +{!../../docs_src/path_operation_configuration/tutorial002b.py!} ``` ## Resumo e descrição @@ -101,7 +101,7 @@ VocĂȘ pode adicionar um `summary` e uma `description`: //// tab | Python 3.8 and above ```Python hl_lines="20-21" -{!> ../../../docs_src/path_operation_configuration/tutorial003.py!} +{!> ../../docs_src/path_operation_configuration/tutorial003.py!} ``` //// @@ -109,7 +109,7 @@ VocĂȘ pode adicionar um `summary` e uma `description`: //// tab | Python 3.9 and above ```Python hl_lines="20-21" -{!> ../../../docs_src/path_operation_configuration/tutorial003_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial003_py39.py!} ``` //// @@ -117,7 +117,7 @@ VocĂȘ pode adicionar um `summary` e uma `description`: //// tab | Python 3.10 and above ```Python hl_lines="18-19" -{!> ../../../docs_src/path_operation_configuration/tutorial003_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial003_py310.py!} ``` //// @@ -131,7 +131,7 @@ VocĂȘ pode escrever ../../../docs_src/path_operation_configuration/tutorial004.py!} +{!> ../../docs_src/path_operation_configuration/tutorial004.py!} ``` //// @@ -139,7 +139,7 @@ VocĂȘ pode escrever ../../../docs_src/path_operation_configuration/tutorial004_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial004_py39.py!} ``` //// @@ -147,7 +147,7 @@ VocĂȘ pode escrever ../../../docs_src/path_operation_configuration/tutorial004_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial004_py310.py!} ``` //// @@ -164,7 +164,7 @@ VocĂȘ pode especificar a descrição da resposta com o parĂąmetro `response_desc //// tab | Python 3.8 and above ```Python hl_lines="21" -{!> ../../../docs_src/path_operation_configuration/tutorial005.py!} +{!> ../../docs_src/path_operation_configuration/tutorial005.py!} ``` //// @@ -172,7 +172,7 @@ VocĂȘ pode especificar a descrição da resposta com o parĂąmetro `response_desc //// tab | Python 3.9 and above ```Python hl_lines="21" -{!> ../../../docs_src/path_operation_configuration/tutorial005_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial005_py39.py!} ``` //// @@ -180,7 +180,7 @@ VocĂȘ pode especificar a descrição da resposta com o parĂąmetro `response_desc //// tab | Python 3.10 and above ```Python hl_lines="19" -{!> ../../../docs_src/path_operation_configuration/tutorial005_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial005_py310.py!} ``` //// @@ -206,7 +206,7 @@ EntĂŁo, se vocĂȘ nĂŁo fornecer uma, o **FastAPI** irĂĄ gerar automaticamente uma Se vocĂȘ precisar marcar uma *operação de rota* como descontinuada, mas sem removĂȘ-la, passe o parĂąmetro `deprecated`: ```Python hl_lines="16" -{!../../../docs_src/path_operation_configuration/tutorial006.py!} +{!../../docs_src/path_operation_configuration/tutorial006.py!} ``` Ela serĂĄ claramente marcada como descontinuada nas documentaçÔes interativas: diff --git a/docs/pt/docs/tutorial/path-params-numeric-validations.md b/docs/pt/docs/tutorial/path-params-numeric-validations.md index 08ed03f75..28c55482f 100644 --- a/docs/pt/docs/tutorial/path-params-numeric-validations.md +++ b/docs/pt/docs/tutorial/path-params-numeric-validations.md @@ -9,7 +9,7 @@ Primeiro, importe `Path` de `fastapi`: //// tab | Python 3.10+ ```Python hl_lines="1" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_py310.py!} ``` //// @@ -17,7 +17,7 @@ Primeiro, importe `Path` de `fastapi`: //// tab | Python 3.8+ ```Python hl_lines="3" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001.py!} ``` //// @@ -31,7 +31,7 @@ Por exemplo para declarar um valor de metadado `title` para o parĂąmetro de rota //// tab | Python 3.10+ ```Python hl_lines="8" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_py310.py!} ``` //// @@ -39,7 +39,7 @@ Por exemplo para declarar um valor de metadado `title` para o parĂąmetro de rota //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001.py!} ``` //// @@ -71,7 +71,7 @@ Isso nĂŁo faz diferença para o **FastAPI**. Ele vai detectar os parĂąmetros pel EntĂŁo, vocĂȘ pode declarar sua função assim: ```Python hl_lines="7" -{!../../../docs_src/path_params_numeric_validations/tutorial002.py!} +{!../../docs_src/path_params_numeric_validations/tutorial002.py!} ``` ## Ordene os parĂąmetros de a acordo com sua necessidade, truques @@ -83,7 +83,7 @@ Passe `*`, como o primeiro parĂąmetro da função. O Python nĂŁo vai fazer nada com esse `*`, mas ele vai saber que a partir dali os parĂąmetros seguintes deverĂŁo ser chamados argumentos nomeados (pares chave-valor), tambĂ©m conhecidos como kwargs. Mesmo que eles nĂŁo possuam um valor padrĂŁo. ```Python hl_lines="7" -{!../../../docs_src/path_params_numeric_validations/tutorial003.py!} +{!../../docs_src/path_params_numeric_validations/tutorial003.py!} ``` ## ValidaçÔes numĂ©ricas: maior que ou igual @@ -93,7 +93,7 @@ Com `Query` e `Path` (e outras que vocĂȘ verĂĄ mais tarde) vocĂȘ pode declarar r Aqui, com `ge=1`, `item_id` precisarĂĄ ser um nĂșmero inteiro maior que ("`g`reater than") ou igual ("`e`qual") a 1. ```Python hl_lines="8" -{!../../../docs_src/path_params_numeric_validations/tutorial004.py!} +{!../../docs_src/path_params_numeric_validations/tutorial004.py!} ``` ## ValidaçÔes numĂ©ricas: maior que e menor que ou igual @@ -104,7 +104,7 @@ O mesmo se aplica para: * `le`: menor que ou igual (`l`ess than or `e`qual) ```Python hl_lines="9" -{!../../../docs_src/path_params_numeric_validations/tutorial005.py!} +{!../../docs_src/path_params_numeric_validations/tutorial005.py!} ``` ## ValidaçÔes numĂ©ricas: valores do tipo float, maior que e menor que @@ -118,7 +118,7 @@ Assim, `0.5` seria um valor vĂĄlido. Mas `0.0` ou `0` nĂŁo seria. E o mesmo para lt. ```Python hl_lines="11" -{!../../../docs_src/path_params_numeric_validations/tutorial006.py!} +{!../../docs_src/path_params_numeric_validations/tutorial006.py!} ``` ## Recapitulando diff --git a/docs/pt/docs/tutorial/path-params.md b/docs/pt/docs/tutorial/path-params.md index fb872e4f5..a68354a1b 100644 --- a/docs/pt/docs/tutorial/path-params.md +++ b/docs/pt/docs/tutorial/path-params.md @@ -3,7 +3,7 @@ VocĂȘ pode declarar os "parĂąmetros" ou "variĂĄveis" com a mesma sintaxe utilizada pelo formato de strings do Python: ```Python hl_lines="6-7" -{!../../../docs_src/path_params/tutorial001.py!} +{!../../docs_src/path_params/tutorial001.py!} ``` O valor do parĂąmetro que foi passado Ă  `item_id` serĂĄ passado para a sua função como o argumento `item_id`. @@ -19,7 +19,7 @@ EntĂŁo, se vocĂȘ rodar este exemplo e for atĂ© expressĂŁo regular que combine com um padrĂŁo esperado pelo parĂąmetro: ```Python hl_lines="11" -{!../../../docs_src/query_params_str_validations/tutorial004.py!} +{!../../docs_src/query_params_str_validations/tutorial004.py!} ``` Essa expressĂŁo regular especĂ­fica verifica se o valor recebido no parĂąmetro: @@ -115,7 +115,7 @@ Da mesma maneira que vocĂȘ utiliza `None` como o primeiro argumento para ser uti Vamos dizer que vocĂȘ queira que o parĂąmetro de consulta `q` tenha um `min_length` de `3`, e um valor padrĂŁo de `"fixedquery"`, entĂŁo declararĂ­amos assim: ```Python hl_lines="7" -{!../../../docs_src/query_params_str_validations/tutorial005.py!} +{!../../docs_src/query_params_str_validations/tutorial005.py!} ``` /// note | "Observação" @@ -147,7 +147,7 @@ q: Union[str, None] = Query(default=None, min_length=3) EntĂŁo, quando vocĂȘ precisa declarar um parĂąmetro obrigatĂłrio utilizando o `Query`, vocĂȘ pode utilizar `...` como o primeiro argumento: ```Python hl_lines="7" -{!../../../docs_src/query_params_str_validations/tutorial006.py!} +{!../../docs_src/query_params_str_validations/tutorial006.py!} ``` /// info | "Informação" @@ -165,7 +165,7 @@ Quando vocĂȘ declara explicitamente um parĂąmetro com `Query` vocĂȘ pode declar Por exemplo, para declarar que o parĂąmetro `q` pode aparecer diversas vezes na URL, vocĂȘ escreveria: ```Python hl_lines="9" -{!../../../docs_src/query_params_str_validations/tutorial011.py!} +{!../../docs_src/query_params_str_validations/tutorial011.py!} ``` EntĂŁo, com uma URL assim: @@ -202,7 +202,7 @@ A documentação interativa da API irĂĄ atualizar de acordo, permitindo mĂșltipl E vocĂȘ tambĂ©m pode definir uma lista (`list`) de valores padrĂŁo caso nenhum seja informado: ```Python hl_lines="9" -{!../../../docs_src/query_params_str_validations/tutorial012.py!} +{!../../docs_src/query_params_str_validations/tutorial012.py!} ``` Se vocĂȘ for atĂ©: @@ -227,7 +227,7 @@ O valor padrĂŁo de `q` serĂĄ: `["foo", "bar"]` e sua resposta serĂĄ: VocĂȘ tambĂ©m pode utilizar o tipo `list` diretamente em vez de `List[str]`: ```Python hl_lines="7" -{!../../../docs_src/query_params_str_validations/tutorial013.py!} +{!../../docs_src/query_params_str_validations/tutorial013.py!} ``` /// note | "Observação" @@ -255,13 +255,13 @@ Algumas delas nĂŁo exibem todas as informaçÔes extras que declaramos, ainda qu VocĂȘ pode adicionar um `title`: ```Python hl_lines="10" -{!../../../docs_src/query_params_str_validations/tutorial007.py!} +{!../../docs_src/query_params_str_validations/tutorial007.py!} ``` E uma `description`: ```Python hl_lines="13" -{!../../../docs_src/query_params_str_validations/tutorial008.py!} +{!../../docs_src/query_params_str_validations/tutorial008.py!} ``` ## Apelidos (alias) de parĂąmetros @@ -283,7 +283,7 @@ Mas ainda vocĂȘ precisa que o nome seja exatamente `item-query`... EntĂŁo vocĂȘ pode declarar um `alias`, e esse apelido (alias) que serĂĄ utilizado para encontrar o valor do parĂąmetro: ```Python hl_lines="9" -{!../../../docs_src/query_params_str_validations/tutorial009.py!} +{!../../docs_src/query_params_str_validations/tutorial009.py!} ``` ## ParĂąmetros descontinuados @@ -295,7 +295,7 @@ VocĂȘ tem que deixĂĄ-lo ativo por um tempo, jĂĄ que existem clientes o utilizand EntĂŁo vocĂȘ passa o parĂąmetro `deprecated=True` para `Query`: ```Python hl_lines="18" -{!../../../docs_src/query_params_str_validations/tutorial010.py!} +{!../../docs_src/query_params_str_validations/tutorial010.py!} ``` Na documentação aparecerĂĄ assim: diff --git a/docs/pt/docs/tutorial/query-params.md b/docs/pt/docs/tutorial/query-params.md index 78d54f09b..6e6699cd5 100644 --- a/docs/pt/docs/tutorial/query-params.md +++ b/docs/pt/docs/tutorial/query-params.md @@ -3,7 +3,7 @@ Quando vocĂȘ declara outros parĂąmetros na função que nĂŁo fazem parte dos parĂąmetros da rota, esses parĂąmetros sĂŁo automaticamente interpretados como parĂąmetros de "consulta". ```Python hl_lines="9" -{!../../../docs_src/query_params/tutorial001.py!} +{!../../docs_src/query_params/tutorial001.py!} ``` A consulta Ă© o conjunto de pares chave-valor que vai depois de `?` na URL, separado pelo caractere `&`. @@ -66,7 +66,7 @@ Da mesma forma, vocĂȘ pode declarar parĂąmetros de consulta opcionais, definindo //// tab | Python 3.10+ ```Python hl_lines="7" -{!> ../../../docs_src/query_params/tutorial002_py310.py!} +{!> ../../docs_src/query_params/tutorial002_py310.py!} ``` //// @@ -74,7 +74,7 @@ Da mesma forma, vocĂȘ pode declarar parĂąmetros de consulta opcionais, definindo //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params/tutorial002.py!} +{!> ../../docs_src/query_params/tutorial002.py!} ``` //// @@ -94,7 +94,7 @@ VocĂȘ tambĂ©m pode declarar tipos `bool`, e eles serĂŁo convertidos: //// tab | Python 3.10+ ```Python hl_lines="7" -{!> ../../../docs_src/query_params/tutorial003_py310.py!} +{!> ../../docs_src/query_params/tutorial003_py310.py!} ``` //// @@ -102,7 +102,7 @@ VocĂȘ tambĂ©m pode declarar tipos `bool`, e eles serĂŁo convertidos: //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params/tutorial003.py!} +{!> ../../docs_src/query_params/tutorial003.py!} ``` //// @@ -150,7 +150,7 @@ Eles serĂŁo detectados pelo nome: //// tab | Python 3.10+ ```Python hl_lines="6 8" -{!> ../../../docs_src/query_params/tutorial004_py310.py!} +{!> ../../docs_src/query_params/tutorial004_py310.py!} ``` //// @@ -158,7 +158,7 @@ Eles serĂŁo detectados pelo nome: //// tab | Python 3.8+ ```Python hl_lines="8 10" -{!> ../../../docs_src/query_params/tutorial004.py!} +{!> ../../docs_src/query_params/tutorial004.py!} ``` //// @@ -172,7 +172,7 @@ Caso vocĂȘ nĂŁo queira adicionar um valor especĂ­fico mas queira apenas tornĂĄ-l PorĂ©m, quando vocĂȘ quiser fazer com que o parĂąmetro de consulta seja obrigatĂłrio, vocĂȘ pode simplesmente nĂŁo declarar nenhum valor como padrĂŁo. ```Python hl_lines="6-7" -{!../../../docs_src/query_params/tutorial005.py!} +{!../../docs_src/query_params/tutorial005.py!} ``` Aqui o parĂąmetro de consulta `needy` Ă© um valor obrigatĂłrio, do tipo `str`. @@ -220,7 +220,7 @@ E claro, vocĂȘ pode definir alguns parĂąmetros como obrigatĂłrios, alguns possui //// tab | Python 3.10+ ```Python hl_lines="8" -{!> ../../../docs_src/query_params/tutorial006_py310.py!} +{!> ../../docs_src/query_params/tutorial006_py310.py!} ``` //// @@ -228,7 +228,7 @@ E claro, vocĂȘ pode definir alguns parĂąmetros como obrigatĂłrios, alguns possui //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params/tutorial006.py!} +{!> ../../docs_src/query_params/tutorial006.py!} ``` //// diff --git a/docs/pt/docs/tutorial/request-form-models.md b/docs/pt/docs/tutorial/request-form-models.md index a9db18e9d..837e24c34 100644 --- a/docs/pt/docs/tutorial/request-form-models.md +++ b/docs/pt/docs/tutorial/request-form-models.md @@ -27,7 +27,7 @@ VocĂȘ precisa apenas declarar um **modelo Pydantic** com os campos que deseja re //// tab | Python 3.9+ ```Python hl_lines="9-11 15" -{!> ../../../docs_src/request_form_models/tutorial001_an_py39.py!} +{!> ../../docs_src/request_form_models/tutorial001_an_py39.py!} ``` //// @@ -35,7 +35,7 @@ VocĂȘ precisa apenas declarar um **modelo Pydantic** com os campos que deseja re //// tab | Python 3.8+ ```Python hl_lines="8-10 14" -{!> ../../../docs_src/request_form_models/tutorial001_an.py!} +{!> ../../docs_src/request_form_models/tutorial001_an.py!} ``` //// @@ -49,7 +49,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="7-9 13" -{!> ../../../docs_src/request_form_models/tutorial001.py!} +{!> ../../docs_src/request_form_models/tutorial001.py!} ``` //// @@ -79,7 +79,7 @@ VocĂȘ pode utilizar a configuração de modelo do Pydantic para `proibir` qualqu //// tab | Python 3.9+ ```Python hl_lines="12" -{!> ../../../docs_src/request_form_models/tutorial002_an_py39.py!} +{!> ../../docs_src/request_form_models/tutorial002_an_py39.py!} ``` //// @@ -87,7 +87,7 @@ VocĂȘ pode utilizar a configuração de modelo do Pydantic para `proibir` qualqu //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/request_form_models/tutorial002_an.py!} +{!> ../../docs_src/request_form_models/tutorial002_an.py!} ``` //// @@ -101,7 +101,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="10" -{!> ../../../docs_src/request_form_models/tutorial002.py!} +{!> ../../docs_src/request_form_models/tutorial002.py!} ``` //// diff --git a/docs/pt/docs/tutorial/request-forms-and-files.md b/docs/pt/docs/tutorial/request-forms-and-files.md index 2cf406386..29488b4f2 100644 --- a/docs/pt/docs/tutorial/request-forms-and-files.md +++ b/docs/pt/docs/tutorial/request-forms-and-files.md @@ -13,7 +13,7 @@ Por exemplo: `pip install python-multipart`. ## Importe `File` e `Form` ```Python hl_lines="1" -{!../../../docs_src/request_forms_and_files/tutorial001.py!} +{!../../docs_src/request_forms_and_files/tutorial001.py!} ``` ## Defina parĂąmetros de `File` e `Form` @@ -21,7 +21,7 @@ Por exemplo: `pip install python-multipart`. Crie parĂąmetros de arquivo e formulĂĄrio da mesma forma que vocĂȘ faria para `Body` ou `Query`: ```Python hl_lines="8" -{!../../../docs_src/request_forms_and_files/tutorial001.py!} +{!../../docs_src/request_forms_and_files/tutorial001.py!} ``` Os arquivos e campos de formulĂĄrio serĂŁo carregados como dados de formulĂĄrio e vocĂȘ receberĂĄ os arquivos e campos de formulĂĄrio. diff --git a/docs/pt/docs/tutorial/request-forms.md b/docs/pt/docs/tutorial/request-forms.md index fc8c7bbad..1e2faf269 100644 --- a/docs/pt/docs/tutorial/request-forms.md +++ b/docs/pt/docs/tutorial/request-forms.md @@ -15,7 +15,7 @@ Ex: `pip install python-multipart`. Importe `Form` de `fastapi`: ```Python hl_lines="1" -{!../../../docs_src/request_forms/tutorial001.py!} +{!../../docs_src/request_forms/tutorial001.py!} ``` ## Declare parĂąmetros de `Form` @@ -23,7 +23,7 @@ Importe `Form` de `fastapi`: Crie parĂąmetros de formulĂĄrio da mesma forma que vocĂȘ faria para `Body` ou `Query`: ```Python hl_lines="7" -{!../../../docs_src/request_forms/tutorial001.py!} +{!../../docs_src/request_forms/tutorial001.py!} ``` Por exemplo, em uma das maneiras que a especificação OAuth2 pode ser usada (chamada "fluxo de senha"), Ă© necessĂĄrio enviar um `username` e uma `password` como campos do formulĂĄrio. diff --git a/docs/pt/docs/tutorial/request_files.md b/docs/pt/docs/tutorial/request_files.md index 60e4ecb26..39bfe284a 100644 --- a/docs/pt/docs/tutorial/request_files.md +++ b/docs/pt/docs/tutorial/request_files.md @@ -19,7 +19,7 @@ Importe `File` e `UploadFile` do `fastapi`: //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/request_files/tutorial001_an_py39.py!} +{!> ../../docs_src/request_files/tutorial001_an_py39.py!} ``` //// @@ -27,7 +27,7 @@ Importe `File` e `UploadFile` do `fastapi`: //// tab | Python 3.8+ ```Python hl_lines="1" -{!> ../../../docs_src/request_files/tutorial001_an.py!} +{!> ../../docs_src/request_files/tutorial001_an.py!} ``` //// @@ -41,7 +41,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="1" -{!> ../../../docs_src/request_files/tutorial001.py!} +{!> ../../docs_src/request_files/tutorial001.py!} ``` //// @@ -53,7 +53,7 @@ Cria os parĂąmetros do arquivo da mesma forma que vocĂȘ faria para `Body` ou `Fo //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/request_files/tutorial001_an_py39.py!} +{!> ../../docs_src/request_files/tutorial001_an_py39.py!} ``` //// @@ -61,7 +61,7 @@ Cria os parĂąmetros do arquivo da mesma forma que vocĂȘ faria para `Body` ou `Fo //// tab | Python 3.8+ ```Python hl_lines="8" -{!> ../../../docs_src/request_files/tutorial001_an.py!} +{!> ../../docs_src/request_files/tutorial001_an.py!} ``` //// @@ -75,7 +75,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="7" -{!> ../../../docs_src/request_files/tutorial001.py!} +{!> ../../docs_src/request_files/tutorial001.py!} ``` //// @@ -109,7 +109,7 @@ Defina um parĂąmetro de arquivo com o tipo `UploadFile` //// tab | Python 3.9+ ```Python hl_lines="14" -{!> ../../../docs_src/request_files/tutorial001_an_py39.py!} +{!> ../../docs_src/request_files/tutorial001_an_py39.py!} ``` //// @@ -117,7 +117,7 @@ Defina um parĂąmetro de arquivo com o tipo `UploadFile` //// tab | Python 3.8+ ```Python hl_lines="13" -{!> ../../../docs_src/request_files/tutorial001_an.py!} +{!> ../../docs_src/request_files/tutorial001_an.py!} ``` //// @@ -131,7 +131,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="12" -{!> ../../../docs_src/request_files/tutorial001.py!} +{!> ../../docs_src/request_files/tutorial001.py!} ``` //// @@ -220,7 +220,7 @@ VocĂȘ pode definir um arquivo como opcional utilizando as anotaçÔes de tipo pa //// tab | Python 3.10+ ```Python hl_lines="9 17" -{!> ../../../docs_src/request_files/tutorial001_02_an_py310.py!} +{!> ../../docs_src/request_files/tutorial001_02_an_py310.py!} ``` //// @@ -228,7 +228,7 @@ VocĂȘ pode definir um arquivo como opcional utilizando as anotaçÔes de tipo pa //// tab | Python 3.9+ ```Python hl_lines="9 17" -{!> ../../../docs_src/request_files/tutorial001_02_an_py39.py!} +{!> ../../docs_src/request_files/tutorial001_02_an_py39.py!} ``` //// @@ -236,7 +236,7 @@ VocĂȘ pode definir um arquivo como opcional utilizando as anotaçÔes de tipo pa //// tab | Python 3.8+ ```Python hl_lines="10 18" -{!> ../../../docs_src/request_files/tutorial001_02_an.py!} +{!> ../../docs_src/request_files/tutorial001_02_an.py!} ``` //// @@ -250,7 +250,7 @@ Utilize a versĂŁo com `Annotated`, se possĂ­vel /// ```Python hl_lines="7 15" -{!> ../../../docs_src/request_files/tutorial001_02_py310.py!} +{!> ../../docs_src/request_files/tutorial001_02_py310.py!} ``` //// @@ -264,7 +264,7 @@ Utilize a versĂŁo com `Annotated`, se possĂ­vel /// ```Python hl_lines="9 17" -{!> ../../../docs_src/request_files/tutorial001_02.py!} +{!> ../../docs_src/request_files/tutorial001_02.py!} ``` //// @@ -276,7 +276,7 @@ VocĂȘ tambĂ©m pode utilizar `File()` com `UploadFile`, por exemplo, para definir //// tab | Python 3.9+ ```Python hl_lines="9 15" -{!> ../../../docs_src/request_files/tutorial001_03_an_py39.py!} +{!> ../../docs_src/request_files/tutorial001_03_an_py39.py!} ``` //// @@ -284,7 +284,7 @@ VocĂȘ tambĂ©m pode utilizar `File()` com `UploadFile`, por exemplo, para definir //// tab | Python 3.8+ ```Python hl_lines="8 14" -{!> ../../../docs_src/request_files/tutorial001_03_an.py!} +{!> ../../docs_src/request_files/tutorial001_03_an.py!} ``` //// @@ -298,7 +298,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel /// ```Python hl_lines="7 13" -{!> ../../../docs_src/request_files/tutorial001_03.py!} +{!> ../../docs_src/request_files/tutorial001_03.py!} ``` //// @@ -314,7 +314,7 @@ Para usar isso, declare uma lista de `bytes` ou `UploadFile`: //// tab | Python 3.9+ ```Python hl_lines="10 15" -{!> ../../../docs_src/request_files/tutorial002_an_py39.py!} +{!> ../../docs_src/request_files/tutorial002_an_py39.py!} ``` //// @@ -322,7 +322,7 @@ Para usar isso, declare uma lista de `bytes` ou `UploadFile`: //// tab | Python 3.8+ ```Python hl_lines="11 16" -{!> ../../../docs_src/request_files/tutorial002_an.py!} +{!> ../../docs_src/request_files/tutorial002_an.py!} ``` //// @@ -336,7 +336,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel /// ```Python hl_lines="8 13" -{!> ../../../docs_src/request_files/tutorial002_py39.py!} +{!> ../../docs_src/request_files/tutorial002_py39.py!} ``` //// @@ -350,7 +350,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel /// ```Python hl_lines="10 15" -{!> ../../../docs_src/request_files/tutorial002.py!} +{!> ../../docs_src/request_files/tutorial002.py!} ``` //// @@ -372,7 +372,7 @@ E da mesma forma que antes, vocĂȘ pode utilizar `File()` para definir parĂąmetro //// tab | Python 3.9+ ```Python hl_lines="11 18-20" -{!> ../../../docs_src/request_files/tutorial003_an_py39.py!} +{!> ../../docs_src/request_files/tutorial003_an_py39.py!} ``` //// @@ -380,7 +380,7 @@ E da mesma forma que antes, vocĂȘ pode utilizar `File()` para definir parĂąmetro //// tab | Python 3.8+ ```Python hl_lines="12 19-21" -{!> ../../../docs_src/request_files/tutorial003_an.py!} +{!> ../../docs_src/request_files/tutorial003_an.py!} ``` //// @@ -394,7 +394,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="9 16" -{!> ../../../docs_src/request_files/tutorial003_py39.py!} +{!> ../../docs_src/request_files/tutorial003_py39.py!} ``` //// @@ -408,7 +408,7 @@ Utilize a versĂŁo com `Annotated` se possĂ­vel. /// ```Python hl_lines="11 18" -{!> ../../../docs_src/request_files/tutorial003.py!} +{!> ../../docs_src/request_files/tutorial003.py!} ``` //// diff --git a/docs/pt/docs/tutorial/response-status-code.md b/docs/pt/docs/tutorial/response-status-code.md index dc8e12048..bc4a2cd34 100644 --- a/docs/pt/docs/tutorial/response-status-code.md +++ b/docs/pt/docs/tutorial/response-status-code.md @@ -9,7 +9,7 @@ Da mesma forma que vocĂȘ pode especificar um modelo de resposta, vocĂȘ tambĂ©m p * etc. ```Python hl_lines="6" -{!../../../docs_src/response_status_code/tutorial001.py!} +{!../../docs_src/response_status_code/tutorial001.py!} ``` /// note | "Nota" @@ -78,7 +78,7 @@ Para saber mais sobre cada cĂłdigo de status e qual cĂłdigo serve para quĂȘ, ver Vamos ver o exemplo anterior novamente: ```Python hl_lines="6" -{!../../../docs_src/response_status_code/tutorial001.py!} +{!../../docs_src/response_status_code/tutorial001.py!} ``` `201` Ă© o cĂłdigo de status para "Criado". @@ -88,7 +88,7 @@ Mas vocĂȘ nĂŁo precisa memorizar o que cada um desses cĂłdigos significa. VocĂȘ pode usar as variĂĄveis de conveniĂȘncia de `fastapi.status`. ```Python hl_lines="1 6" -{!../../../docs_src/response_status_code/tutorial002.py!} +{!../../docs_src/response_status_code/tutorial002.py!} ``` Eles sĂŁo apenas uma conveniĂȘncia, eles possuem o mesmo nĂșmero, mas dessa forma vocĂȘ pode usar o autocomplete do editor para encontrĂĄ-los: diff --git a/docs/pt/docs/tutorial/schema-extra-example.md b/docs/pt/docs/tutorial/schema-extra-example.md index a291db045..2d78e4ef1 100644 --- a/docs/pt/docs/tutorial/schema-extra-example.md +++ b/docs/pt/docs/tutorial/schema-extra-example.md @@ -9,7 +9,7 @@ Aqui estĂŁo vĂĄrias formas de se fazer isso. VocĂȘ pode declarar um `example` para um modelo Pydantic usando `Config` e `schema_extra`, conforme descrito em Documentação do Pydantic: Schema customization: ```Python hl_lines="15-23" -{!../../../docs_src/schema_extra_example/tutorial001.py!} +{!../../docs_src/schema_extra_example/tutorial001.py!} ``` Essas informaçÔes extras serĂŁo adicionadas como se encontram no **JSON Schema** de resposta desse modelo e serĂŁo usadas na documentação da API. @@ -29,7 +29,7 @@ Ao usar `Field ()` com modelos Pydantic, vocĂȘ tambĂ©m pode declarar informaçÔ VocĂȘ pode usar isso para adicionar um `example` para cada campo: ```Python hl_lines="4 10-13" -{!../../../docs_src/schema_extra_example/tutorial002.py!} +{!../../docs_src/schema_extra_example/tutorial002.py!} ``` /// warning | "Atenção" @@ -57,7 +57,7 @@ vocĂȘ tambĂ©m pode declarar um dado `example` ou um grupo de `examples` com info Aqui nĂłs passamos um `example` dos dados esperados por `Body()`: ```Python hl_lines="21-26" -{!../../../docs_src/schema_extra_example/tutorial003.py!} +{!../../docs_src/schema_extra_example/tutorial003.py!} ``` ### Exemplo na UI da documentação @@ -80,7 +80,7 @@ Cada `dict` de exemplo especĂ­fico em `examples` pode conter: * `externalValue`: alternativa ao `value`, uma URL apontando para o exemplo. Embora isso possa nĂŁo ser suportado por tantas ferramentas quanto `value`. ```Python hl_lines="22-48" -{!../../../docs_src/schema_extra_example/tutorial004.py!} +{!../../docs_src/schema_extra_example/tutorial004.py!} ``` ### Exemplos na UI da documentação diff --git a/docs/pt/docs/tutorial/security/first-steps.md b/docs/pt/docs/tutorial/security/first-steps.md index 007fefcb9..9fb94fe67 100644 --- a/docs/pt/docs/tutorial/security/first-steps.md +++ b/docs/pt/docs/tutorial/security/first-steps.md @@ -20,7 +20,7 @@ Vamos primeiro usar o cĂłdigo e ver como funciona, e depois voltaremos para ente Copie o exemplo em um arquivo `main.py`: ```Python -{!../../../docs_src/security/tutorial001.py!} +{!../../docs_src/security/tutorial001.py!} ``` ## Execute-o @@ -136,7 +136,7 @@ Neste exemplo, nĂłs vamos usar o **OAuth2** com o fluxo de **Senha**, usando um Quando nĂłs criamos uma instĂąncia da classe `OAuth2PasswordBearer`, nĂłs passamos pelo parĂąmetro `tokenUrl` Esse parĂąmetro contĂ©m a URL que o client (o frontend rodando no browser do usuĂĄrio) vai usar para mandar o `username` e `senha` para obter um token. ```Python hl_lines="6" -{!../../../docs_src/security/tutorial001.py!} +{!../../docs_src/security/tutorial001.py!} ``` /// tip | "Dica" @@ -180,7 +180,7 @@ EntĂŁo, pode ser usado com `Depends`. Agora vocĂȘ pode passar aquele `oauth2_scheme` em uma dependĂȘncia com `Depends`. ```Python hl_lines="10" -{!../../../docs_src/security/tutorial001.py!} +{!../../docs_src/security/tutorial001.py!} ``` Esse dependĂȘncia vai fornecer uma `str` que Ă© atribuĂ­do ao parĂąmetro `token da *função do path operation* diff --git a/docs/pt/docs/tutorial/static-files.md b/docs/pt/docs/tutorial/static-files.md index efaf07dfb..901fca1d2 100644 --- a/docs/pt/docs/tutorial/static-files.md +++ b/docs/pt/docs/tutorial/static-files.md @@ -8,7 +8,7 @@ VocĂȘ pode servir arquivos estĂĄticos automaticamente de um diretĂłrio usando `S * "Monte" uma instĂąncia de `StaticFiles()` em um caminho especĂ­fico. ```Python hl_lines="2 6" -{!../../../docs_src/static_files/tutorial001.py!} +{!../../docs_src/static_files/tutorial001.py!} ``` /// note | "Detalhes tĂ©cnicos" diff --git a/docs/pt/docs/tutorial/testing.md b/docs/pt/docs/tutorial/testing.md index f734a7d9a..4e28a43c0 100644 --- a/docs/pt/docs/tutorial/testing.md +++ b/docs/pt/docs/tutorial/testing.md @@ -31,7 +31,7 @@ Use o objeto `TestClient` da mesma forma que vocĂȘ faz com `httpx`. Escreva instruçÔes `assert` simples com as expressĂ”es Python padrĂŁo que vocĂȘ precisa verificar (novamente, `pytest` padrĂŁo). ```Python hl_lines="2 12 15-18" -{!../../../docs_src/app_testing/tutorial001.py!} +{!../../docs_src/app_testing/tutorial001.py!} ``` /// tip | "Dica" @@ -79,7 +79,7 @@ No arquivo `main.py` vocĂȘ tem seu aplicativo **FastAPI**: ```Python -{!../../../docs_src/app_testing/main.py!} +{!../../docs_src/app_testing/main.py!} ``` ### Arquivo de teste @@ -97,7 +97,7 @@ EntĂŁo vocĂȘ poderia ter um arquivo `test_main.py` com seus testes. Ele poderia Como esse arquivo estĂĄ no mesmo pacote, vocĂȘ pode usar importaçÔes relativas para importar o objeto `app` do mĂłdulo `main` (`main.py`): ```Python hl_lines="3" -{!../../../docs_src/app_testing/test_main.py!} +{!../../docs_src/app_testing/test_main.py!} ``` ...e ter o cĂłdigo para os testes como antes. @@ -129,7 +129,7 @@ Ambas as *operaçÔes de rotas* requerem um cabeçalho `X-Token`. //// tab | Python 3.10+ ```Python -{!> ../../../docs_src/app_testing/app_b_an_py310/main.py!} +{!> ../../docs_src/app_testing/app_b_an_py310/main.py!} ``` //// @@ -137,7 +137,7 @@ Ambas as *operaçÔes de rotas* requerem um cabeçalho `X-Token`. //// tab | Python 3.9+ ```Python -{!> ../../../docs_src/app_testing/app_b_an_py39/main.py!} +{!> ../../docs_src/app_testing/app_b_an_py39/main.py!} ``` //// @@ -145,7 +145,7 @@ Ambas as *operaçÔes de rotas* requerem um cabeçalho `X-Token`. //// tab | Python 3.8+ ```Python -{!> ../../../docs_src/app_testing/app_b_an/main.py!} +{!> ../../docs_src/app_testing/app_b_an/main.py!} ``` //// @@ -159,7 +159,7 @@ Prefira usar a versĂŁo `Annotated` se possĂ­vel. /// ```Python -{!> ../../../docs_src/app_testing/app_b_py310/main.py!} +{!> ../../docs_src/app_testing/app_b_py310/main.py!} ``` //// @@ -173,7 +173,7 @@ Prefira usar a versĂŁo `Annotated` se possĂ­vel. /// ```Python -{!> ../../../docs_src/app_testing/app_b/main.py!} +{!> ../../docs_src/app_testing/app_b/main.py!} ``` //// @@ -183,7 +183,7 @@ Prefira usar a versĂŁo `Annotated` se possĂ­vel. VocĂȘ pode entĂŁo atualizar `test_main.py` com os testes estendidos: ```Python -{!> ../../../docs_src/app_testing/app_b/test_main.py!} +{!> ../../docs_src/app_testing/app_b/test_main.py!} ``` Sempre que vocĂȘ precisar que o cliente passe informaçÔes na requisição e nĂŁo souber como, vocĂȘ pode pesquisar (no Google) como fazer isso no `httpx`, ou atĂ© mesmo como fazer isso com `requests`, jĂĄ que o design do HTTPX Ă© baseado no design do Requests. diff --git a/docs/ru/docs/python-types.md b/docs/ru/docs/python-types.md index c052bc675..e5905304a 100644 --- a/docs/ru/docs/python-types.md +++ b/docs/ru/docs/python-types.md @@ -23,7 +23,7 @@ Python ĐžĐŒĐ”Đ”Ń‚ ĐżĐŸĐŽĐŽĐ”Ń€Đ¶Đșу ĐœĐ”ĐŸĐ±ŃĐ·Đ°Ń‚Đ”Đ»ŃŒĐœŃ‹Ń… Đ°ĐœĐœĐŸŃ‚Đ°Ń† ДаĐČаĐčтД ĐœĐ°Ń‡ĐœĐ”ĐŒ с ĐżŃ€ĐŸŃŃ‚ĐŸĐłĐŸ ĐżŃ€ĐžĐŒĐ”Ń€Đ°: ```Python -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` Đ’Ń‹Đ·ĐŸĐČ ŃŃ‚ĐŸĐč ĐżŃ€ĐŸĐłŃ€Đ°ĐŒĐŒŃ‹ ĐČыĐČĐŸĐŽĐžŃ‚: @@ -39,7 +39,7 @@ John Doe * ĐĄĐŸĐ”ĐŽĐžĐœŃĐ”Ń‚ ох чДрДз ĐżŃ€ĐŸĐ±Đ”Đ». ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` ### ОтрДЎаĐșŃ‚ĐžŃ€ŃƒĐ”ĐŒ ĐżŃ€ĐžĐŒĐ”Ń€ @@ -83,7 +83,7 @@ John Doe Đ­Ń‚ĐŸ Đ°ĐœĐœĐŸŃ‚Đ°Ń†ĐžĐž Ń‚ĐžĐżĐŸĐČ: ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial002.py!} +{!../../docs_src/python_types/tutorial002.py!} ``` Đ­Ń‚ĐŸ ĐœĐ” Ń‚ĐŸ жД ŃĐ°ĐŒĐŸĐ”, Ń‡Ń‚ĐŸ ĐŸĐ±ŃŠŃĐČĐ»Đ”ĐœĐžĐ” Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐč ĐżĐŸ ŃƒĐŒĐŸĐ»Ń‡Đ°ĐœĐžŃŽ, ĐœĐ°ĐżŃ€ĐžĐŒĐ”Ń€: @@ -113,7 +113,7 @@ John Doe ĐŸŃ€ĐŸĐČĐ”Ń€ŃŒŃ‚Đ” эту Ń„ŃƒĐœĐșцою, ĐŸĐœĐ° ужД ĐžĐŒĐ”Đ”Ń‚ Đ°ĐœĐœĐŸŃ‚Đ°Ń†ĐžĐž Ń‚ĐžĐżĐŸĐČ: ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial003.py!} +{!../../docs_src/python_types/tutorial003.py!} ``` ĐŸĐŸŃĐșĐŸĐ»ŃŒĐșу рДЎаĐșŃ‚ĐŸŃ€ Đ·ĐœĐ°Đ”Ń‚ топы ĐżĐ”Ń€Đ”ĐŒĐ”ĐœĐœŃ‹Ń…, ĐČы ĐżĐŸĐ»ŃƒŃ‡Đ°Đ”Ń‚Đ” ĐœĐ” Ń‚ĐŸĐ»ŃŒĐșĐŸ ĐŽĐŸĐżĐŸĐ»ĐœĐ”ĐœĐžĐ”, ĐœĐŸ Đž ĐżŃ€ĐŸĐČДрĐșĐž ĐŸŃˆĐžĐ±ĐŸĐș: @@ -123,7 +123,7 @@ John Doe ĐąĐ”ĐżĐ”Ń€ŃŒ ĐČы Đ·ĐœĐ°Đ”Ń‚Đ”, Ń‡Ń‚ĐŸ ĐČĐ°ĐŒ ĐœŃƒĐ¶ĐœĐŸ оспраĐČоть, ĐżŃ€Đ”ĐŸĐ±Ń€Đ°Đ·ĐŸĐČаĐČ `age` ĐČ ŃŃ‚Ń€ĐŸĐșу с `str(age)`: ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial004.py!} +{!../../docs_src/python_types/tutorial004.py!} ``` ## ĐžĐ±ŃŠŃĐČĐ»Đ”ĐœĐžĐ” Ń‚ĐžĐżĐŸĐČ @@ -144,7 +144,7 @@ John Doe * `bytes` ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial005.py!} +{!../../docs_src/python_types/tutorial005.py!} ``` ### Generic-топы с ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€Đ°ĐŒĐž Ń‚ĐžĐżĐŸĐČ @@ -162,7 +162,7 @@ John Doe Đ˜ĐŒĐżĐŸŃ€Ń‚ĐžŃ€ŃƒĐčтД `List` Оз `typing` (с заглаĐČĐœĐŸĐč `L`): ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial006.py!} +{!../../docs_src/python_types/tutorial006.py!} ``` ĐžĐ±ŃŠŃĐČОтД ĐżĐ”Ń€Đ”ĐŒĐ”ĐœĐœŃƒŃŽ с Ń‚Đ”ĐŒ жД ŃĐžĐœŃ‚Đ°ĐșŃĐžŃĐŸĐŒ ĐŽĐČĐŸĐ”Ń‚ĐŸŃ‡ĐžŃ (`:`). @@ -172,7 +172,7 @@ John Doe ĐŸĐŸŃĐșĐŸĐ»ŃŒĐșу ŃĐżĐžŃĐŸĐș яĐČĐ»ŃĐ”Ń‚ŃŃ Ń‚ĐžĐżĐŸĐŒ, ŃĐŸĐŽĐ”Ń€Đ¶Đ°Ń‰ĐžĐŒ ĐœĐ”ĐșĐŸŃ‚ĐŸŃ€Ń‹Đ” ĐČĐœŃƒŃ‚Ń€Đ”ĐœĐœĐžĐ” топы, ĐČы ĐżĐŸĐŒĐ”Ń‰Đ°Đ”Ń‚Đ” ох ĐČ ĐșĐČĐ°ĐŽŃ€Đ°Ń‚ĐœŃ‹Đ” сĐșĐŸĐ±ĐșĐž: ```Python hl_lines="4" -{!../../../docs_src/python_types/tutorial006.py!} +{!../../docs_src/python_types/tutorial006.py!} ``` /// tip @@ -200,7 +200,7 @@ John Doe Вы бы сЎДлалО Ń‚ĐŸ жД ŃĐ°ĐŒĐŸĐ”, Ń‡Ń‚ĐŸĐ±Ń‹ ĐŸĐ±ŃŠŃĐČоть `tuple` Đž `set`: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial007.py!} +{!../../docs_src/python_types/tutorial007.py!} ``` Đ­Ń‚ĐŸ ĐŸĐ·ĐœĐ°Ń‡Đ°Đ”Ń‚: @@ -217,7 +217,7 @@ John Doe Đ’Ń‚ĐŸŃ€ĐŸĐč ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€ топа ĐżŃ€Đ”ĐŽĐœĐ°Đ·ĐœĐ°Ń‡Đ”Đœ ĐŽĐ»Ń Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐč `dict`: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial008.py!} +{!../../docs_src/python_types/tutorial008.py!} ``` Đ­Ń‚ĐŸ ĐŸĐ·ĐœĐ°Ń‡Đ°Đ”Ń‚: @@ -231,7 +231,7 @@ John Doe Вы таĐșжД ĐŒĐŸĐ¶Đ”Ń‚Đ” ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать `Optional`, Ń‡Ń‚ĐŸĐ±Ń‹ ĐŸĐ±ŃŠŃĐČоть, Ń‡Ń‚ĐŸ ĐżĐ”Ń€Đ”ĐŒĐ”ĐœĐœĐ°Ń ĐžĐŒĐ”Đ”Ń‚ топ, ĐœĐ°ĐżŃ€ĐžĐŒĐ”Ń€, `str`, ĐœĐŸ ŃŃ‚ĐŸ яĐČĐ»ŃĐ”Ń‚ŃŃ Â«ĐœĐ”ĐŸĐ±ŃĐ·Đ°Ń‚Đ”Đ»ŃŒĐœŃ‹ĐŒÂ», Ń‡Ń‚ĐŸ ĐŸĐ·ĐœĐ°Ń‡Đ°Đ”Ń‚, Ń‡Ń‚ĐŸ ĐŸĐœĐ° таĐșжД ĐŒĐŸĐ¶Đ”Ń‚ Đ±Ń‹Ń‚ŃŒ `None`: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009.py!} +{!../../docs_src/python_types/tutorial009.py!} ``` Đ˜ŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČĐ°ĐœĐžĐ” `Optional[str]` ĐČĐŒĐ”ŃŃ‚ĐŸ ĐżŃ€ĐŸŃŃ‚ĐŸ `str` ĐżĐŸĐ·ĐČĐŸĐ»ĐžŃ‚ рДЎаĐșŃ‚ĐŸŃ€Ńƒ ĐżĐŸĐŒĐŸŃ‡ŃŒ ĐČĐ°ĐŒ ĐČ ĐŸĐ±ĐœĐ°Ń€ŃƒĐ¶Đ”ĐœĐžĐž ĐŸŃˆĐžĐ±ĐŸĐș, ĐČ ĐșĐŸŃ‚ĐŸŃ€Ń‹Ń… ĐČы ĐŒĐŸĐłĐ»Đž бы ĐżŃ€Đ”ĐŽĐżĐŸĐ»ĐŸĐ¶ĐžŃ‚ŃŒ, Ń‡Ń‚ĐŸ Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐ” ĐČсДгЎа яĐČĐ»ŃĐ”Ń‚ŃŃ `str`, Ń…ĐŸŃ‚Ń ĐœĐ° ŃĐ°ĐŒĐŸĐŒ ЎДлД ŃŃ‚ĐŸ ĐŒĐŸĐ¶Đ”Ń‚ Đ±Ń‹Ń‚ŃŒ Đž `None`. @@ -256,13 +256,13 @@ John Doe Đ”ĐŸĐżŃƒŃŃ‚ĐžĐŒ, у ĐČас Đ”ŃŃ‚ŃŒ Đșласс `Person` с ĐżĐŸĐ»Đ”ĐŒ `name`: ```Python hl_lines="1-3" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` ĐąĐŸĐłĐŽĐ° ĐČы ĐŒĐŸĐ¶Đ”Ń‚Đ” ĐŸĐ±ŃŠŃĐČоть ĐżĐ”Ń€Đ”ĐŒĐ”ĐœĐœŃƒŃŽ топа `Person`: ```Python hl_lines="6" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` И ŃĐœĐŸĐČа ĐČы ĐżĐŸĐ»ŃƒŃ‡Đ°Đ”Ń‚Đ” ĐżĐŸĐ»ĐœŃƒŃŽ ĐżĐŸĐŽĐŽĐ”Ń€Đ¶Đșу рДЎаĐșŃ‚ĐŸŃ€Đ°: @@ -284,7 +284,7 @@ John Doe Đ’Đ·ŃŃ‚ĐŸ Оз ĐŸŃ„ĐžŃ†ĐžĐ°Đ»ŃŒĐœĐŸĐč ĐŽĐŸĐșŃƒĐŒĐ”ĐœŃ‚Đ°Ń†ĐžĐž Pydantic: ```Python -{!../../../docs_src/python_types/tutorial011.py!} +{!../../docs_src/python_types/tutorial011.py!} ``` /// info diff --git a/docs/ru/docs/tutorial/background-tasks.md b/docs/ru/docs/tutorial/background-tasks.md index 073276848..0f6ce0eb3 100644 --- a/docs/ru/docs/tutorial/background-tasks.md +++ b/docs/ru/docs/tutorial/background-tasks.md @@ -16,7 +16,7 @@ ĐĄĐœĐ°Ń‡Đ°Đ»Đ° ĐžĐŒĐżĐŸŃ€Ń‚ĐžŃ€ŃƒĐčтД `BackgroundTasks`, ĐżĐŸŃ‚ĐŸĐŒ ĐŽĐŸĐ±Đ°ĐČŃŒŃ‚Đ” ĐČ Ń„ŃƒĐœĐșцою ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€ с Ń‚ĐžĐżĐŸĐŒ `BackgroundTasks`: ```Python hl_lines="1 13" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` **FastAPI** ŃĐŸĐ·ĐŽĐ°ŃŃ‚ ĐŸĐ±ŃŠĐ”Đșт Đșласса `BackgroundTasks` ĐŽĐ»Ń ĐČас Đž Đ·Đ°ĐżĐžŃˆĐ”Ń‚ Đ”ĐłĐŸ ĐČ ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€. @@ -34,7 +34,7 @@ йаĐș ĐșаĐș ĐŸĐżĐ”Ń€Đ°Ń†ĐžŃ запОсО ĐœĐ” ĐžŃĐżĐŸĐ»ŃŒĐ·ŃƒĐ”Ń‚ `async` Đž `await`, ĐŒŃ‹ ĐŸĐżŃ€Đ”ĐŽĐ”Đ»ĐžĐŒ ДД ĐșаĐș ĐŸĐ±Ń‹Ń‡ĐœŃƒŃŽ `def`: ```Python hl_lines="6-9" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` ## Đ”ĐŸĐ±Đ°ĐČĐ»Đ”ĐœĐžĐ” Ń„ĐŸĐœĐŸĐČĐŸĐč заЎачО @@ -42,7 +42,7 @@ Đ’ĐœŃƒŃ‚Ń€Đž Ń„ŃƒĐœĐșцоо ĐČŃ‹Đ·ĐŸĐČОтД ĐŒĐ”Ń‚ĐŸĐŽ `.add_task()` у ĐŸĐ±ŃŠĐ”Đșта *background tasks* Đž пДрДЎаĐčтД Đ”ĐŒŃƒ Ń„ŃƒĐœĐșцою, ĐșĐŸŃ‚ĐŸŃ€ŃƒŃŽ Ń…ĐŸŃ‚ĐžŃ‚Đ” ĐČŃ‹ĐżĐŸĐ»ĐœĐžŃ‚ŃŒ ĐČ Ń„ĐŸĐœĐ”: ```Python hl_lines="14" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` `.add_task()` ĐżŃ€ĐžĐœĐžĐŒĐ°Đ”Ń‚ ŃĐ»Đ”ĐŽŃƒŃŽŃ‰ĐžĐ” Đ°Ń€ĐłŃƒĐŒĐ”ĐœŃ‚Ń‹: @@ -60,7 +60,7 @@ //// tab | Python 3.10+ ```Python hl_lines="11 13 20 23" -{!> ../../../docs_src/background_tasks/tutorial002_py310.py!} +{!> ../../docs_src/background_tasks/tutorial002_py310.py!} ``` //// @@ -68,7 +68,7 @@ //// tab | Python 3.8+ ```Python hl_lines="13 15 22 25" -{!> ../../../docs_src/background_tasks/tutorial002.py!} +{!> ../../docs_src/background_tasks/tutorial002.py!} ``` //// diff --git a/docs/ru/docs/tutorial/body-fields.md b/docs/ru/docs/tutorial/body-fields.md index f4db0e9ff..f3b2c6113 100644 --- a/docs/ru/docs/tutorial/body-fields.md +++ b/docs/ru/docs/tutorial/body-fields.md @@ -9,7 +9,7 @@ //// tab | Python 3.10+ ```Python hl_lines="2" -{!> ../../../docs_src/body_fields/tutorial001_py310.py!} +{!> ../../docs_src/body_fields/tutorial001_py310.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | Python 3.8+ ```Python hl_lines="4" -{!> ../../../docs_src/body_fields/tutorial001.py!} +{!> ../../docs_src/body_fields/tutorial001.py!} ``` //// @@ -35,7 +35,7 @@ //// tab | Python 3.10+ ```Python hl_lines="9-12" -{!> ../../../docs_src/body_fields/tutorial001_py310.py!} +{!> ../../docs_src/body_fields/tutorial001_py310.py!} ``` //// @@ -43,7 +43,7 @@ //// tab | Python 3.8+ ```Python hl_lines="11-14" -{!> ../../../docs_src/body_fields/tutorial001.py!} +{!> ../../docs_src/body_fields/tutorial001.py!} ``` //// diff --git a/docs/ru/docs/tutorial/body-multiple-params.md b/docs/ru/docs/tutorial/body-multiple-params.md index 107e6293b..53965f0ec 100644 --- a/docs/ru/docs/tutorial/body-multiple-params.md +++ b/docs/ru/docs/tutorial/body-multiple-params.md @@ -11,7 +11,7 @@ //// tab | Python 3.10+ ```Python hl_lines="18-20" -{!> ../../../docs_src/body_multiple_params/tutorial001_an_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial001_an_py310.py!} ``` //// @@ -19,7 +19,7 @@ //// tab | Python 3.9+ ```Python hl_lines="18-20" -{!> ../../../docs_src/body_multiple_params/tutorial001_an_py39.py!} +{!> ../../docs_src/body_multiple_params/tutorial001_an_py39.py!} ``` //// @@ -27,7 +27,7 @@ //// tab | Python 3.8+ ```Python hl_lines="19-21" -{!> ../../../docs_src/body_multiple_params/tutorial001_an.py!} +{!> ../../docs_src/body_multiple_params/tutorial001_an.py!} ``` //// @@ -41,7 +41,7 @@ /// ```Python hl_lines="17-19" -{!> ../../../docs_src/body_multiple_params/tutorial001_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial001_py310.py!} ``` //// @@ -55,7 +55,7 @@ /// ```Python hl_lines="19-21" -{!> ../../../docs_src/body_multiple_params/tutorial001.py!} +{!> ../../docs_src/body_multiple_params/tutorial001.py!} ``` //// @@ -84,7 +84,7 @@ //// tab | Python 3.10+ ```Python hl_lines="20" -{!> ../../../docs_src/body_multiple_params/tutorial002_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial002_py310.py!} ``` //// @@ -92,7 +92,7 @@ //// tab | Python 3.8+ ```Python hl_lines="22" -{!> ../../../docs_src/body_multiple_params/tutorial002.py!} +{!> ../../docs_src/body_multiple_params/tutorial002.py!} ``` //// @@ -139,7 +139,7 @@ //// tab | Python 3.10+ ```Python hl_lines="23" -{!> ../../../docs_src/body_multiple_params/tutorial003_an_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial003_an_py310.py!} ``` //// @@ -147,7 +147,7 @@ //// tab | Python 3.9+ ```Python hl_lines="23" -{!> ../../../docs_src/body_multiple_params/tutorial003_an_py39.py!} +{!> ../../docs_src/body_multiple_params/tutorial003_an_py39.py!} ``` //// @@ -155,7 +155,7 @@ //// tab | Python 3.8+ ```Python hl_lines="24" -{!> ../../../docs_src/body_multiple_params/tutorial003_an.py!} +{!> ../../docs_src/body_multiple_params/tutorial003_an.py!} ``` //// @@ -169,7 +169,7 @@ /// ```Python hl_lines="20" -{!> ../../../docs_src/body_multiple_params/tutorial003_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial003_py310.py!} ``` //// @@ -183,7 +183,7 @@ /// ```Python hl_lines="22" -{!> ../../../docs_src/body_multiple_params/tutorial003.py!} +{!> ../../docs_src/body_multiple_params/tutorial003.py!} ``` //// @@ -229,7 +229,7 @@ q: str | None = None //// tab | Python 3.10+ ```Python hl_lines="27" -{!> ../../../docs_src/body_multiple_params/tutorial004_an_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial004_an_py310.py!} ``` //// @@ -237,7 +237,7 @@ q: str | None = None //// tab | Python 3.9+ ```Python hl_lines="27" -{!> ../../../docs_src/body_multiple_params/tutorial004_an_py39.py!} +{!> ../../docs_src/body_multiple_params/tutorial004_an_py39.py!} ``` //// @@ -245,7 +245,7 @@ q: str | None = None //// tab | Python 3.8+ ```Python hl_lines="28" -{!> ../../../docs_src/body_multiple_params/tutorial004_an.py!} +{!> ../../docs_src/body_multiple_params/tutorial004_an.py!} ``` //// @@ -259,7 +259,7 @@ q: str | None = None /// ```Python hl_lines="25" -{!> ../../../docs_src/body_multiple_params/tutorial004_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial004_py310.py!} ``` //// @@ -273,7 +273,7 @@ q: str | None = None /// ```Python hl_lines="27" -{!> ../../../docs_src/body_multiple_params/tutorial004.py!} +{!> ../../docs_src/body_multiple_params/tutorial004.py!} ``` //// @@ -301,7 +301,7 @@ item: Item = Body(embed=True) //// tab | Python 3.10+ ```Python hl_lines="17" -{!> ../../../docs_src/body_multiple_params/tutorial005_an_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial005_an_py310.py!} ``` //// @@ -309,7 +309,7 @@ item: Item = Body(embed=True) //// tab | Python 3.9+ ```Python hl_lines="17" -{!> ../../../docs_src/body_multiple_params/tutorial005_an_py39.py!} +{!> ../../docs_src/body_multiple_params/tutorial005_an_py39.py!} ``` //// @@ -317,7 +317,7 @@ item: Item = Body(embed=True) //// tab | Python 3.8+ ```Python hl_lines="18" -{!> ../../../docs_src/body_multiple_params/tutorial005_an.py!} +{!> ../../docs_src/body_multiple_params/tutorial005_an.py!} ``` //// @@ -331,7 +331,7 @@ item: Item = Body(embed=True) /// ```Python hl_lines="15" -{!> ../../../docs_src/body_multiple_params/tutorial005_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial005_py310.py!} ``` //// @@ -345,7 +345,7 @@ item: Item = Body(embed=True) /// ```Python hl_lines="17" -{!> ../../../docs_src/body_multiple_params/tutorial005.py!} +{!> ../../docs_src/body_multiple_params/tutorial005.py!} ``` //// diff --git a/docs/ru/docs/tutorial/body-nested-models.md b/docs/ru/docs/tutorial/body-nested-models.md index ecb8b92a7..780946725 100644 --- a/docs/ru/docs/tutorial/body-nested-models.md +++ b/docs/ru/docs/tutorial/body-nested-models.md @@ -9,7 +9,7 @@ //// tab | Python 3.10+ ```Python hl_lines="12" -{!> ../../../docs_src/body_nested_models/tutorial001_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial001_py310.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | Python 3.8+ ```Python hl_lines="14" -{!> ../../../docs_src/body_nested_models/tutorial001.py!} +{!> ../../docs_src/body_nested_models/tutorial001.py!} ``` //// @@ -35,7 +35,7 @@ ĐĐŸ ĐČ ĐČĐ”Ń€ŃĐžŃŃ… Python ĐŽĐŸ 3.9 (ĐœĐ°Ń‡ĐžĐœĐ°Ń с 3.6) ŃĐœĐ°Ń‡Đ°Đ»Đ° ĐČĐ°ĐŒ ĐœĐ”ĐŸĐ±Ń…ĐŸĐŽĐžĐŒĐŸ ĐžĐŒĐżĐŸŃ€Ń‚ĐžŃ€ĐŸĐČать `List` Оз ŃŃ‚Đ°ĐœĐŽĐ°Ń€Ń‚ĐœĐŸĐłĐŸ ĐŒĐŸĐŽŃƒĐ»Ń `typing` ĐČ Python: ```Python hl_lines="1" -{!> ../../../docs_src/body_nested_models/tutorial002.py!} +{!> ../../docs_src/body_nested_models/tutorial002.py!} ``` ### ĐžĐ±ŃŠŃĐČĐ»Đ”ĐœĐžĐ” `list` с уĐșĐ°Đ·Đ°ĐœĐžĐ”ĐŒ Ń‚ĐžĐżĐŸĐČ ĐŽĐ»Ń ĐČĐ»ĐŸĐ¶Đ”ĐœĐœŃ‹Ń… ŃĐ»Đ”ĐŒĐ”ĐœŃ‚ĐŸĐČ @@ -68,7 +68,7 @@ my_list: List[str] //// tab | Python 3.10+ ```Python hl_lines="12" -{!> ../../../docs_src/body_nested_models/tutorial002_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial002_py310.py!} ``` //// @@ -76,7 +76,7 @@ my_list: List[str] //// tab | Python 3.9+ ```Python hl_lines="14" -{!> ../../../docs_src/body_nested_models/tutorial002_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial002_py39.py!} ``` //// @@ -84,7 +84,7 @@ my_list: List[str] //// tab | Python 3.8+ ```Python hl_lines="14" -{!> ../../../docs_src/body_nested_models/tutorial002.py!} +{!> ../../docs_src/body_nested_models/tutorial002.py!} ``` //// @@ -100,7 +100,7 @@ my_list: List[str] //// tab | Python 3.10+ ```Python hl_lines="12" -{!> ../../../docs_src/body_nested_models/tutorial003_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial003_py310.py!} ``` //// @@ -108,7 +108,7 @@ my_list: List[str] //// tab | Python 3.9+ ```Python hl_lines="14" -{!> ../../../docs_src/body_nested_models/tutorial003_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial003_py39.py!} ``` //// @@ -116,7 +116,7 @@ my_list: List[str] //// tab | Python 3.8+ ```Python hl_lines="1 14" -{!> ../../../docs_src/body_nested_models/tutorial003.py!} +{!> ../../docs_src/body_nested_models/tutorial003.py!} ``` //// @@ -144,7 +144,7 @@ my_list: List[str] //// tab | Python 3.10+ ```Python hl_lines="7-9" -{!> ../../../docs_src/body_nested_models/tutorial004_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial004_py310.py!} ``` //// @@ -152,7 +152,7 @@ my_list: List[str] //// tab | Python 3.9+ ```Python hl_lines="9-11" -{!> ../../../docs_src/body_nested_models/tutorial004_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial004_py39.py!} ``` //// @@ -160,7 +160,7 @@ my_list: List[str] //// tab | Python 3.8+ ```Python hl_lines="9-11" -{!> ../../../docs_src/body_nested_models/tutorial004.py!} +{!> ../../docs_src/body_nested_models/tutorial004.py!} ``` //// @@ -172,7 +172,7 @@ my_list: List[str] //// tab | Python 3.10+ ```Python hl_lines="18" -{!> ../../../docs_src/body_nested_models/tutorial004_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial004_py310.py!} ``` //// @@ -180,7 +180,7 @@ my_list: List[str] //// tab | Python 3.9+ ```Python hl_lines="20" -{!> ../../../docs_src/body_nested_models/tutorial004_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial004_py39.py!} ``` //// @@ -188,7 +188,7 @@ my_list: List[str] //// tab | Python 3.8+ ```Python hl_lines="20" -{!> ../../../docs_src/body_nested_models/tutorial004.py!} +{!> ../../docs_src/body_nested_models/tutorial004.py!} ``` //// @@ -227,7 +227,7 @@ my_list: List[str] //// tab | Python 3.10+ ```Python hl_lines="2 8" -{!> ../../../docs_src/body_nested_models/tutorial005_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial005_py310.py!} ``` //// @@ -235,7 +235,7 @@ my_list: List[str] //// tab | Python 3.9+ ```Python hl_lines="4 10" -{!> ../../../docs_src/body_nested_models/tutorial005_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial005_py39.py!} ``` //// @@ -243,7 +243,7 @@ my_list: List[str] //// tab | Python 3.8+ ```Python hl_lines="4 10" -{!> ../../../docs_src/body_nested_models/tutorial005.py!} +{!> ../../docs_src/body_nested_models/tutorial005.py!} ``` //// @@ -257,7 +257,7 @@ my_list: List[str] //// tab | Python 3.10+ ```Python hl_lines="18" -{!> ../../../docs_src/body_nested_models/tutorial006_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial006_py310.py!} ``` //// @@ -265,7 +265,7 @@ my_list: List[str] //// tab | Python 3.9+ ```Python hl_lines="20" -{!> ../../../docs_src/body_nested_models/tutorial006_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial006_py39.py!} ``` //// @@ -273,7 +273,7 @@ my_list: List[str] //// tab | Python 3.8+ ```Python hl_lines="20" -{!> ../../../docs_src/body_nested_models/tutorial006.py!} +{!> ../../docs_src/body_nested_models/tutorial006.py!} ``` //// @@ -317,7 +317,7 @@ my_list: List[str] //// tab | Python 3.10+ ```Python hl_lines="7 12 18 21 25" -{!> ../../../docs_src/body_nested_models/tutorial007_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial007_py310.py!} ``` //// @@ -325,7 +325,7 @@ my_list: List[str] //// tab | Python 3.9+ ```Python hl_lines="9 14 20 23 27" -{!> ../../../docs_src/body_nested_models/tutorial007_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial007_py39.py!} ``` //// @@ -333,7 +333,7 @@ my_list: List[str] //// tab | Python 3.8+ ```Python hl_lines="9 14 20 23 27" -{!> ../../../docs_src/body_nested_models/tutorial007.py!} +{!> ../../docs_src/body_nested_models/tutorial007.py!} ``` //// @@ -363,7 +363,7 @@ images: list[Image] //// tab | Python 3.9+ ```Python hl_lines="13" -{!> ../../../docs_src/body_nested_models/tutorial008_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial008_py39.py!} ``` //// @@ -371,7 +371,7 @@ images: list[Image] //// tab | Python 3.8+ ```Python hl_lines="15" -{!> ../../../docs_src/body_nested_models/tutorial008.py!} +{!> ../../docs_src/body_nested_models/tutorial008.py!} ``` //// @@ -407,7 +407,7 @@ images: list[Image] //// tab | Python 3.9+ ```Python hl_lines="7" -{!> ../../../docs_src/body_nested_models/tutorial009_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial009_py39.py!} ``` //// @@ -415,7 +415,7 @@ images: list[Image] //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/body_nested_models/tutorial009.py!} +{!> ../../docs_src/body_nested_models/tutorial009.py!} ``` //// diff --git a/docs/ru/docs/tutorial/body-updates.md b/docs/ru/docs/tutorial/body-updates.md index c458329d8..3ecfe52f4 100644 --- a/docs/ru/docs/tutorial/body-updates.md +++ b/docs/ru/docs/tutorial/body-updates.md @@ -9,7 +9,7 @@ //// tab | Python 3.10+ ```Python hl_lines="28-33" -{!> ../../../docs_src/body_updates/tutorial001_py310.py!} +{!> ../../docs_src/body_updates/tutorial001_py310.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | Python 3.9+ ```Python hl_lines="30-35" -{!> ../../../docs_src/body_updates/tutorial001_py39.py!} +{!> ../../docs_src/body_updates/tutorial001_py39.py!} ``` //// @@ -25,7 +25,7 @@ //// tab | Python 3.6+ ```Python hl_lines="30-35" -{!> ../../../docs_src/body_updates/tutorial001.py!} +{!> ../../docs_src/body_updates/tutorial001.py!} ``` //// @@ -77,7 +77,7 @@ //// tab | Python 3.10+ ```Python hl_lines="32" -{!> ../../../docs_src/body_updates/tutorial002_py310.py!} +{!> ../../docs_src/body_updates/tutorial002_py310.py!} ``` //// @@ -85,7 +85,7 @@ //// tab | Python 3.9+ ```Python hl_lines="34" -{!> ../../../docs_src/body_updates/tutorial002_py39.py!} +{!> ../../docs_src/body_updates/tutorial002_py39.py!} ``` //// @@ -93,7 +93,7 @@ //// tab | Python 3.6+ ```Python hl_lines="34" -{!> ../../../docs_src/body_updates/tutorial002.py!} +{!> ../../docs_src/body_updates/tutorial002.py!} ``` //// @@ -107,7 +107,7 @@ //// tab | Python 3.10+ ```Python hl_lines="33" -{!> ../../../docs_src/body_updates/tutorial002_py310.py!} +{!> ../../docs_src/body_updates/tutorial002_py310.py!} ``` //// @@ -115,7 +115,7 @@ //// tab | Python 3.9+ ```Python hl_lines="35" -{!> ../../../docs_src/body_updates/tutorial002_py39.py!} +{!> ../../docs_src/body_updates/tutorial002_py39.py!} ``` //// @@ -123,7 +123,7 @@ //// tab | Python 3.6+ ```Python hl_lines="35" -{!> ../../../docs_src/body_updates/tutorial002.py!} +{!> ../../docs_src/body_updates/tutorial002.py!} ``` //// @@ -146,7 +146,7 @@ //// tab | Python 3.10+ ```Python hl_lines="28-35" -{!> ../../../docs_src/body_updates/tutorial002_py310.py!} +{!> ../../docs_src/body_updates/tutorial002_py310.py!} ``` //// @@ -154,7 +154,7 @@ //// tab | Python 3.9+ ```Python hl_lines="30-37" -{!> ../../../docs_src/body_updates/tutorial002_py39.py!} +{!> ../../docs_src/body_updates/tutorial002_py39.py!} ``` //// @@ -162,7 +162,7 @@ //// tab | Python 3.6+ ```Python hl_lines="30-37" -{!> ../../../docs_src/body_updates/tutorial002.py!} +{!> ../../docs_src/body_updates/tutorial002.py!} ``` //// diff --git a/docs/ru/docs/tutorial/body.md b/docs/ru/docs/tutorial/body.md index c3e6326da..91b169d07 100644 --- a/docs/ru/docs/tutorial/body.md +++ b/docs/ru/docs/tutorial/body.md @@ -23,7 +23,7 @@ ĐŸĐ”Ń€ĐČĐŸĐ”, Ń‡Ń‚ĐŸ ĐČĐ°ĐŒ ĐœĐ”ĐŸĐ±Ń…ĐŸĐŽĐžĐŒĐŸ ŃĐŽĐ”Đ»Đ°Ń‚ŃŒ, ŃŃ‚ĐŸ ĐžĐŒĐżĐŸŃ€Ń‚ĐžŃ€ĐŸĐČать `BaseModel` Оз паĐșДта `pydantic`: ```Python hl_lines="4" -{!../../../docs_src/body/tutorial001.py!} +{!../../docs_src/body/tutorial001.py!} ``` ## ĐĄĐŸĐ·ĐŽĐ°ĐœĐžĐ” ĐČашДĐč ŃĐŸĐ±ŃŃ‚ĐČĐ”ĐœĐœĐŸĐč ĐŒĐŸĐŽĐ”Đ»Đž @@ -33,7 +33,7 @@ Đ˜ŃĐżĐŸĐ»ŃŒĐ·ŃƒĐčтД Đ°ĐœĐœĐŸŃ‚Đ°Ń†ĐžĐž Ń‚ĐžĐżĐŸĐČ Python ĐŽĐ»Ń ĐČсДх Đ°Ń‚Ń€ĐžĐ±ŃƒŃ‚ĐŸĐČ: ```Python hl_lines="7-11" -{!../../../docs_src/body/tutorial001.py!} +{!../../docs_src/body/tutorial001.py!} ``` йаĐșжД ĐșаĐș Đž про ĐŸĐżĐžŃĐ°ĐœĐžĐž ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€ĐŸĐČ Đ·Đ°ĐżŃ€ĐŸŃĐ°, ĐșĐŸĐłĐŽĐ° Đ°Ń‚Ń€ĐžĐ±ŃƒŃ‚ ĐŒĐŸĐŽĐ”Đ»Đž ĐžĐŒĐ”Đ”Ń‚ Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐ” ĐżĐŸ ŃƒĐŒĐŸĐ»Ń‡Đ°ĐœĐžŃŽ, ĐŸĐœ яĐČĐ»ŃĐ”Ń‚ŃŃ ĐœĐ”ĐŸĐ±ŃĐ·Đ°Ń‚Đ”Đ»ŃŒĐœŃ‹ĐŒ. Đ˜ĐœĐ°Ń‡Đ” ĐŸĐœ ĐŸĐ±ŃĐ·Đ°Ń‚Đ”Đ»Đ”Đœ. Đ˜ŃĐżĐŸĐ»ŃŒĐ·ŃƒĐčтД `None`, Ń‡Ń‚ĐŸĐ±Ń‹ ŃĐŽĐ”Đ»Đ°Ń‚ŃŒ Đ”ĐłĐŸ ĐœĐ”ĐŸĐ±ŃĐ·Đ°Ń‚Đ”Đ»ŃŒĐœŃ‹ĐŒ бДз ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČĐ°ĐœĐžŃ ĐșĐŸĐœĐșŃ€Đ”Ń‚ĐœŃ‹Ń… Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐč ĐżĐŸ ŃƒĐŒĐŸĐ»Ń‡Đ°ĐœĐžŃŽ. @@ -63,7 +63,7 @@ Đ§Ń‚ĐŸĐ±Ń‹ ĐŽĐŸĐ±Đ°ĐČоть ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€ Đș ĐČĐ°ŃˆĐ”ĐŒŃƒ *ĐŸĐ±Ń€Đ°Đ±ĐŸŃ‚Ń‡ĐžĐșу*, ĐŸĐ±ŃŠŃĐČОтД Đ”ĐłĐŸ таĐșжД, ĐșаĐș ĐČы ĐŸĐ±ŃŠŃĐČĐ»ŃĐ»Đž ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€Ń‹ путо ОлО ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€Ń‹ Đ·Đ°ĐżŃ€ĐŸŃĐ°: ```Python hl_lines="18" -{!../../../docs_src/body/tutorial001.py!} +{!../../docs_src/body/tutorial001.py!} ``` ...Đž уĐșажОтД ŃĐŸĐ·ĐŽĐ°ĐœĐœŃƒŃŽ ĐŒĐŸĐŽĐ”Đ»ŃŒ ĐČ ĐșачДстĐČĐ” топа ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€Đ°, `Item`. @@ -132,7 +132,7 @@ Đ’ĐœŃƒŃ‚Ń€Đž Ń„ŃƒĐœĐșцоо ĐČĐ°ĐŒ ĐŽĐŸŃŃ‚ŃƒĐżĐœŃ‹ ĐČсД Đ°Ń‚Ń€ĐžĐ±ŃƒŃ‚Ń‹ ĐŸĐ±ŃŠĐ”Đșта ĐŒĐŸĐŽĐ”Đ»Đž ĐœĐ°ĐżŃ€ŃĐŒŃƒŃŽ: ```Python hl_lines="21" -{!../../../docs_src/body/tutorial002.py!} +{!../../docs_src/body/tutorial002.py!} ``` ## ĐąĐ”Đ»ĐŸ Đ·Đ°ĐżŃ€ĐŸŃĐ° + ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€Ń‹ путо @@ -142,7 +142,7 @@ **FastAPI** Ń€Đ°ŃĐżĐŸĐ·ĐœĐ°Đ”Ń‚, ĐșаĐșОД ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€Ń‹ Ń„ŃƒĐœĐșцоо ŃĐŸĐŸŃ‚ĐČДтстĐČуют ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€Đ°ĐŒ путо Đž ĐŽĐŸĐ»Đ¶ĐœŃ‹ Đ±Ń‹Ń‚ŃŒ **ĐżĐŸĐ»ŃƒŃ‡Đ”ĐœŃ‹ Оз путо**, а ĐșаĐșОД ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€Ń‹ Ń„ŃƒĐœĐșцоо, ĐŸĐ±ŃŠŃĐČĐ»Đ”ĐœĐœŃ‹Đ” ĐșаĐș ĐŒĐŸĐŽĐ”Đ»Đž Pydantic, ĐŽĐŸĐ»Đ¶ĐœŃ‹ Đ±Ń‹Ń‚ŃŒ **ĐżĐŸĐ»ŃƒŃ‡Đ”ĐœŃ‹ Оз тДла Đ·Đ°ĐżŃ€ĐŸŃĐ°**. ```Python hl_lines="17-18" -{!../../../docs_src/body/tutorial003.py!} +{!../../docs_src/body/tutorial003.py!} ``` ## ĐąĐ”Đ»ĐŸ Đ·Đ°ĐżŃ€ĐŸŃĐ° + ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€Ń‹ путо + ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€Ń‹ Đ·Đ°ĐżŃ€ĐŸŃĐ° @@ -152,7 +152,7 @@ **FastAPI** Ń€Đ°ŃĐżĐŸĐ·ĐœĐ°Đ”Ń‚ ĐșажЎыĐč Оз ĐœĐžŃ… Đž ĐČĐŸĐ·ŃŒĐŒĐ”Ń‚ ĐŽĐ°ĐœĐœŃ‹Đ” Оз праĐČĐžĐ»ŃŒĐœĐŸĐłĐŸ ĐžŃŃ‚ĐŸŃ‡ĐœĐžĐșа. ```Python hl_lines="18" -{!../../../docs_src/body/tutorial004.py!} +{!../../docs_src/body/tutorial004.py!} ``` ĐŸĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€Ń‹ Ń„ŃƒĐœĐșцоо Ń€Đ°ŃĐżĐŸĐ·ĐœĐ°ŃŽŃ‚ŃŃ ŃĐ»Đ”ĐŽŃƒŃŽŃ‰ĐžĐŒ ĐŸĐ±Ń€Đ°Đ·ĐŸĐŒ: diff --git a/docs/ru/docs/tutorial/cookie-params.md b/docs/ru/docs/tutorial/cookie-params.md index e88b9d7ee..2a73a5918 100644 --- a/docs/ru/docs/tutorial/cookie-params.md +++ b/docs/ru/docs/tutorial/cookie-params.md @@ -9,7 +9,7 @@ //// tab | Python 3.10+ ```Python hl_lines="1" -{!> ../../../docs_src/cookie_params/tutorial001_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_py310.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | Python 3.8+ ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001.py!} +{!> ../../docs_src/cookie_params/tutorial001.py!} ``` //// @@ -31,7 +31,7 @@ //// tab | Python 3.10+ ```Python hl_lines="7" -{!> ../../../docs_src/cookie_params/tutorial001_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_py310.py!} ``` //// @@ -39,7 +39,7 @@ //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001.py!} +{!> ../../docs_src/cookie_params/tutorial001.py!} ``` //// diff --git a/docs/ru/docs/tutorial/cors.md b/docs/ru/docs/tutorial/cors.md index 852833208..8d415a2c1 100644 --- a/docs/ru/docs/tutorial/cors.md +++ b/docs/ru/docs/tutorial/cors.md @@ -47,7 +47,7 @@ * ĐžŃ‚ĐŽĐ”Đ»ŃŒĐœŃ‹Ń… HTTP-Đ·Đ°ĐłĐŸĐ»ĐŸĐČĐșĐŸĐČ ĐžĐ»Đž ĐČсДх ĐČĐŒĐ”ŃŃ‚Đ”, ĐžŃĐżĐŸĐ»ŃŒĐ·ŃƒŃ `"*"`. ```Python hl_lines="2 6-11 13-19" -{!../../../docs_src/cors/tutorial001.py!} +{!../../docs_src/cors/tutorial001.py!} ``` `CORSMiddleware` ĐžŃĐżĐŸĐ»ŃŒĐ·ŃƒĐ”Ń‚ ĐŽĐ»Ń ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€ĐŸĐČ "запрДщающОД" Đ·ĐœĐ°Ń‡Đ”ĐœĐžŃ ĐżĐŸ ŃƒĐŒĐŸĐ»Ń‡Đ°ĐœĐžŃŽ, ĐżĐŸŃŃ‚ĐŸĐŒŃƒ ĐČĐ°ĐŒ ĐœŃƒĐ¶ĐœĐŸ яĐČĐœŃ‹ĐŒ ĐŸĐ±Ń€Đ°Đ·ĐŸĐŒ Ń€Đ°Đ·Ń€Đ”ŃˆĐžŃ‚ŃŒ ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČĐ°ĐœĐžĐ” ĐŸŃ‚ĐŽĐ”Đ»ŃŒĐœŃ‹Ń… ĐžŃŃ‚ĐŸŃ‡ĐœĐžĐșĐŸĐČ, ĐŒĐ”Ń‚ĐŸĐŽĐŸĐČ ĐžĐ»Đž Đ·Đ°ĐłĐŸĐ»ĐŸĐČĐșĐŸĐČ, Ń‡Ń‚ĐŸĐ±Ń‹ Đ±Ń€Đ°ŃƒĐ·Đ”Ń€Ń‹ ĐŒĐŸĐłĐ»Đž ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать ох ĐČ ĐșŃ€ĐŸŃŃ-ĐŽĐŸĐŒĐ”ĐœĐœĐŸĐŒ ĐșĐŸĐœŃ‚Đ”ĐșстД. diff --git a/docs/ru/docs/tutorial/debugging.md b/docs/ru/docs/tutorial/debugging.md index 685fb7356..606a32bfc 100644 --- a/docs/ru/docs/tutorial/debugging.md +++ b/docs/ru/docs/tutorial/debugging.md @@ -7,7 +7,7 @@ В ĐČĐ°ŃˆĐ”ĐŒ FastAPI ĐżŃ€ĐžĐ»ĐŸĐ¶Đ”ĐœĐžĐž, ĐžĐŒĐżĐŸŃ€Ń‚ĐžŃ€ŃƒĐčтД Đž ĐČŃ‹Đ·ĐŸĐČОтД `uvicorn` ĐœĐ°ĐżŃ€ŃĐŒŃƒŃŽ: ```Python hl_lines="1 15" -{!../../../docs_src/debugging/tutorial001.py!} +{!../../docs_src/debugging/tutorial001.py!} ``` ### ĐžĐżĐžŃĐ°ĐœĐžĐ” `__name__ == "__main__"` diff --git a/docs/ru/docs/tutorial/dependencies/classes-as-dependencies.md b/docs/ru/docs/tutorial/dependencies/classes-as-dependencies.md index d0471baca..161101bb3 100644 --- a/docs/ru/docs/tutorial/dependencies/classes-as-dependencies.md +++ b/docs/ru/docs/tutorial/dependencies/classes-as-dependencies.md @@ -9,7 +9,7 @@ //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/dependencies/tutorial001_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | Python 3.9+ ```Python hl_lines="11" -{!> ../../../docs_src/dependencies/tutorial001_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ //// tab | Python 3.6+ ```Python hl_lines="12" -{!> ../../../docs_src/dependencies/tutorial001_an.py!} +{!> ../../docs_src/dependencies/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ /// ```Python hl_lines="7" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -53,7 +53,7 @@ /// ```Python hl_lines="11" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -120,7 +120,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | Python 3.10+ ```Python hl_lines="11-15" -{!> ../../../docs_src/dependencies/tutorial002_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_an_py310.py!} ``` //// @@ -128,7 +128,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | Python 3.9+ ```Python hl_lines="11-15" -{!> ../../../docs_src/dependencies/tutorial002_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial002_an_py39.py!} ``` //// @@ -136,7 +136,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | Python 3.6+ ```Python hl_lines="12-16" -{!> ../../../docs_src/dependencies/tutorial002_an.py!} +{!> ../../docs_src/dependencies/tutorial002_an.py!} ``` //// @@ -150,7 +150,7 @@ fluffy = Cat(name="Mr Fluffy") /// ```Python hl_lines="9-13" -{!> ../../../docs_src/dependencies/tutorial002_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_py310.py!} ``` //// @@ -164,7 +164,7 @@ fluffy = Cat(name="Mr Fluffy") /// ```Python hl_lines="11-15" -{!> ../../../docs_src/dependencies/tutorial002.py!} +{!> ../../docs_src/dependencies/tutorial002.py!} ``` //// @@ -174,7 +174,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | Python 3.10+ ```Python hl_lines="12" -{!> ../../../docs_src/dependencies/tutorial002_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_an_py310.py!} ``` //// @@ -182,7 +182,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | Python 3.9+ ```Python hl_lines="12" -{!> ../../../docs_src/dependencies/tutorial002_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial002_an_py39.py!} ``` //// @@ -190,7 +190,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | Python 3.6+ ```Python hl_lines="13" -{!> ../../../docs_src/dependencies/tutorial002_an.py!} +{!> ../../docs_src/dependencies/tutorial002_an.py!} ``` //// @@ -204,7 +204,7 @@ fluffy = Cat(name="Mr Fluffy") /// ```Python hl_lines="10" -{!> ../../../docs_src/dependencies/tutorial002_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_py310.py!} ``` //// @@ -218,7 +218,7 @@ fluffy = Cat(name="Mr Fluffy") /// ```Python hl_lines="12" -{!> ../../../docs_src/dependencies/tutorial002.py!} +{!> ../../docs_src/dependencies/tutorial002.py!} ``` //// @@ -228,7 +228,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | Python 3.10+ ```Python hl_lines="8" -{!> ../../../docs_src/dependencies/tutorial001_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// @@ -236,7 +236,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/dependencies/tutorial001_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py39.py!} ``` //// @@ -244,7 +244,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | Python 3.6+ ```Python hl_lines="10" -{!> ../../../docs_src/dependencies/tutorial001_an.py!} +{!> ../../docs_src/dependencies/tutorial001_an.py!} ``` //// @@ -258,7 +258,7 @@ fluffy = Cat(name="Mr Fluffy") /// ```Python hl_lines="6" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -272,7 +272,7 @@ fluffy = Cat(name="Mr Fluffy") /// ```Python hl_lines="9" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -294,7 +294,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | Python 3.10+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial002_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_an_py310.py!} ``` //// @@ -302,7 +302,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | Python 3.9+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial002_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial002_an_py39.py!} ``` //// @@ -310,7 +310,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | Python 3.6+ ```Python hl_lines="20" -{!> ../../../docs_src/dependencies/tutorial002_an.py!} +{!> ../../docs_src/dependencies/tutorial002_an.py!} ``` //// @@ -324,7 +324,7 @@ fluffy = Cat(name="Mr Fluffy") /// ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial002_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_py310.py!} ``` //// @@ -338,7 +338,7 @@ fluffy = Cat(name="Mr Fluffy") /// ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial002.py!} +{!> ../../docs_src/dependencies/tutorial002.py!} ``` //// @@ -438,7 +438,7 @@ commons = Depends(CommonQueryParams) //// tab | Python 3.10+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial003_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial003_an_py310.py!} ``` //// @@ -446,7 +446,7 @@ commons = Depends(CommonQueryParams) //// tab | Python 3.9+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial003_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial003_an_py39.py!} ``` //// @@ -454,7 +454,7 @@ commons = Depends(CommonQueryParams) //// tab | Python 3.6+ ```Python hl_lines="20" -{!> ../../../docs_src/dependencies/tutorial003_an.py!} +{!> ../../docs_src/dependencies/tutorial003_an.py!} ``` //// @@ -468,7 +468,7 @@ commons = Depends(CommonQueryParams) /// ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial003_py310.py!} +{!> ../../docs_src/dependencies/tutorial003_py310.py!} ``` //// @@ -482,7 +482,7 @@ commons = Depends(CommonQueryParams) /// ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial003.py!} +{!> ../../docs_src/dependencies/tutorial003.py!} ``` //// @@ -575,7 +575,7 @@ commons: CommonQueryParams = Depends() //// tab | Python 3.10+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial004_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial004_an_py310.py!} ``` //// @@ -583,7 +583,7 @@ commons: CommonQueryParams = Depends() //// tab | Python 3.9+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial004_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial004_an_py39.py!} ``` //// @@ -591,7 +591,7 @@ commons: CommonQueryParams = Depends() //// tab | Python 3.6+ ```Python hl_lines="20" -{!> ../../../docs_src/dependencies/tutorial004_an.py!} +{!> ../../docs_src/dependencies/tutorial004_an.py!} ``` //// @@ -605,7 +605,7 @@ commons: CommonQueryParams = Depends() /// ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial004_py310.py!} +{!> ../../docs_src/dependencies/tutorial004_py310.py!} ``` //// @@ -619,7 +619,7 @@ commons: CommonQueryParams = Depends() /// ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial004.py!} +{!> ../../docs_src/dependencies/tutorial004.py!} ``` //// diff --git a/docs/ru/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md b/docs/ru/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md index 11df4b474..305ce46cb 100644 --- a/docs/ru/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md +++ b/docs/ru/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md @@ -17,7 +17,7 @@ //// tab | Python 3.9+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial006_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial006_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ //// tab | Python 3.8+ ```Python hl_lines="18" -{!> ../../../docs_src/dependencies/tutorial006_an.py!} +{!> ../../docs_src/dependencies/tutorial006_an.py!} ``` //// @@ -39,7 +39,7 @@ /// ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial006.py!} +{!> ../../docs_src/dependencies/tutorial006.py!} ``` //// @@ -75,7 +75,7 @@ //// tab | Python 3.9+ ```Python hl_lines="8 13" -{!> ../../../docs_src/dependencies/tutorial006_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial006_an_py39.py!} ``` //// @@ -83,7 +83,7 @@ //// tab | Python 3.8+ ```Python hl_lines="7 12" -{!> ../../../docs_src/dependencies/tutorial006_an.py!} +{!> ../../docs_src/dependencies/tutorial006_an.py!} ``` //// @@ -97,7 +97,7 @@ /// ```Python hl_lines="6 11" -{!> ../../../docs_src/dependencies/tutorial006.py!} +{!> ../../docs_src/dependencies/tutorial006.py!} ``` //// @@ -109,7 +109,7 @@ //// tab | Python 3.9+ ```Python hl_lines="10 15" -{!> ../../../docs_src/dependencies/tutorial006_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial006_an_py39.py!} ``` //// @@ -117,7 +117,7 @@ //// tab | Python 3.8+ ```Python hl_lines="9 14" -{!> ../../../docs_src/dependencies/tutorial006_an.py!} +{!> ../../docs_src/dependencies/tutorial006_an.py!} ``` //// @@ -131,7 +131,7 @@ /// ```Python hl_lines="8 13" -{!> ../../../docs_src/dependencies/tutorial006.py!} +{!> ../../docs_src/dependencies/tutorial006.py!} ``` //// @@ -145,7 +145,7 @@ //// tab | Python 3.9+ ```Python hl_lines="11 16" -{!> ../../../docs_src/dependencies/tutorial006_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial006_an_py39.py!} ``` //// @@ -153,7 +153,7 @@ //// tab | Python 3.8+ ```Python hl_lines="10 15" -{!> ../../../docs_src/dependencies/tutorial006_an.py!} +{!> ../../docs_src/dependencies/tutorial006_an.py!} ``` //// @@ -167,7 +167,7 @@ /// ```Python hl_lines="9 14" -{!> ../../../docs_src/dependencies/tutorial006.py!} +{!> ../../docs_src/dependencies/tutorial006.py!} ``` //// diff --git a/docs/ru/docs/tutorial/dependencies/dependencies-with-yield.md b/docs/ru/docs/tutorial/dependencies/dependencies-with-yield.md index ece7ef8e3..99a86e999 100644 --- a/docs/ru/docs/tutorial/dependencies/dependencies-with-yield.md +++ b/docs/ru/docs/tutorial/dependencies/dependencies-with-yield.md @@ -30,19 +30,19 @@ FastAPI ĐżĐŸĐŽĐŽĐ”Ń€Đ¶ĐžĐČаДт заĐČĐžŃĐžĐŒĐŸŃŃ‚Đž, ĐșĐŸŃ‚ĐŸŃ€Ń‹Đ” ĐČŃ‹ĐżĐŸ ĐŸĐ”Ń€Đ”ĐŽ ŃĐŸĐ·ĐŽĐ°ĐœĐžĐ”ĐŒ ĐŸŃ‚ĐČДта Đ±ŃƒĐŽĐ”Ń‚ ĐČŃ‹ĐżĐŸĐ»ĐœĐ”Đœ Ń‚ĐŸĐ»ŃŒĐșĐŸ ĐșĐŸĐŽ ĐŽĐŸ Đž ĐČĐșĐ»ŃŽŃ‡Đ°Ń `yield`. ```Python hl_lines="2-4" -{!../../../docs_src/dependencies/tutorial007.py!} +{!../../docs_src/dependencies/tutorial007.py!} ``` ĐŸĐŸĐ»ŃƒŃ‡Đ”ĐœĐœĐŸĐ” Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐ” Đž Đ”ŃŃ‚ŃŒ Ń‚ĐŸ, Ń‡Ń‚ĐŸ Đ±ŃƒĐŽĐ”Ń‚ ĐČĐœĐ”ĐŽŃ€Đ”ĐœĐŸ ĐČ Ń„ŃƒĐœĐșцою ĐŸĐżĐ”Ń€Đ°Ń†ĐžĐž путо Đž ĐŽŃ€ŃƒĐłĐžĐ” заĐČĐžŃĐžĐŒĐŸŃŃ‚Đž: ```Python hl_lines="4" -{!../../../docs_src/dependencies/tutorial007.py!} +{!../../docs_src/dependencies/tutorial007.py!} ``` ĐšĐŸĐŽ, ŃĐ»Đ”ĐŽŃƒŃŽŃ‰ĐžĐč за ĐŸĐżĐ”Ń€Đ°Ń‚ĐŸŃ€ĐŸĐŒ `yield`, ĐČŃ‹ĐżĐŸĐ»ĐœŃĐ”Ń‚ŃŃ ĐżĐŸŃĐ»Đ” ĐŽĐŸŃŃ‚Đ°ĐČĐșĐž ĐŸŃ‚ĐČДта: ```Python hl_lines="5-6" -{!../../../docs_src/dependencies/tutorial007.py!} +{!../../docs_src/dependencies/tutorial007.py!} ``` /// tip | "ĐŸĐŸĐŽŃĐșазĐșа" @@ -64,7 +64,7 @@ FastAPI ĐżĐŸĐŽĐŽĐ”Ń€Đ¶ĐžĐČаДт заĐČĐžŃĐžĐŒĐŸŃŃ‚Đž, ĐșĐŸŃ‚ĐŸŃ€Ń‹Đ” ĐČŃ‹ĐżĐŸ йаĐșĐžĐŒ жД ĐŸĐ±Ń€Đ°Đ·ĐŸĐŒ ĐŒĐŸĐ¶ĐœĐŸ ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать `finally`, Ń‡Ń‚ĐŸĐ±Ń‹ ŃƒĐ±Đ”ĐŽĐžŃ‚ŃŒŃŃ, Ń‡Ń‚ĐŸ ĐŸĐ±ŃĐ·Đ°Ń‚Đ”Đ»ŃŒĐœŃ‹Đ” шагО про ĐČŃ‹Ń…ĐŸĐŽĐ” ĐČŃ‹ĐżĐŸĐ»ĐœĐ”ĐœŃ‹, ĐœĐ”Đ·Đ°ĐČĐžŃĐžĐŒĐŸ ĐŸŃ‚ Ń‚ĐŸĐłĐŸ, Đ±Ń‹Đ»ĐŸ лО ОсĐșĐ»ŃŽŃ‡Đ”ĐœĐžĐ” ОлО ĐœĐ”Ń‚. ```Python hl_lines="3 5" -{!../../../docs_src/dependencies/tutorial007.py!} +{!../../docs_src/dependencies/tutorial007.py!} ``` ## ĐŸĐŸĐŽĐ·Đ°ĐČĐžŃĐžĐŒĐŸŃŃ‚Đž с `yield` @@ -78,7 +78,7 @@ FastAPI ĐżĐŸĐŽĐŽĐ”Ń€Đ¶ĐžĐČаДт заĐČĐžŃĐžĐŒĐŸŃŃ‚Đž, ĐșĐŸŃ‚ĐŸŃ€Ń‹Đ” ĐČŃ‹ĐżĐŸ //// tab | Python 3.9+ ```Python hl_lines="6 14 22" -{!> ../../../docs_src/dependencies/tutorial008_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial008_an_py39.py!} ``` //// @@ -86,7 +86,7 @@ FastAPI ĐżĐŸĐŽĐŽĐ”Ń€Đ¶ĐžĐČаДт заĐČĐžŃĐžĐŒĐŸŃŃ‚Đž, ĐșĐŸŃ‚ĐŸŃ€Ń‹Đ” ĐČŃ‹ĐżĐŸ //// tab | Python 3.6+ ```Python hl_lines="5 13 21" -{!> ../../../docs_src/dependencies/tutorial008_an.py!} +{!> ../../docs_src/dependencies/tutorial008_an.py!} ``` //// @@ -100,7 +100,7 @@ FastAPI ĐżĐŸĐŽĐŽĐ”Ń€Đ¶ĐžĐČаДт заĐČĐžŃĐžĐŒĐŸŃŃ‚Đž, ĐșĐŸŃ‚ĐŸŃ€Ń‹Đ” ĐČŃ‹ĐżĐŸ /// ```Python hl_lines="4 12 20" -{!> ../../../docs_src/dependencies/tutorial008.py!} +{!> ../../docs_src/dependencies/tutorial008.py!} ``` //// @@ -114,7 +114,7 @@ FastAPI ĐżĐŸĐŽĐŽĐ”Ń€Đ¶ĐžĐČаДт заĐČĐžŃĐžĐŒĐŸŃŃ‚Đž, ĐșĐŸŃ‚ĐŸŃ€Ń‹Đ” ĐČŃ‹ĐżĐŸ //// tab | Python 3.9+ ```Python hl_lines="18-19 26-27" -{!> ../../../docs_src/dependencies/tutorial008_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial008_an_py39.py!} ``` //// @@ -122,7 +122,7 @@ FastAPI ĐżĐŸĐŽĐŽĐ”Ń€Đ¶ĐžĐČаДт заĐČĐžŃĐžĐŒĐŸŃŃ‚Đž, ĐșĐŸŃ‚ĐŸŃ€Ń‹Đ” ĐČŃ‹ĐżĐŸ //// tab | Python 3.6+ ```Python hl_lines="17-18 25-26" -{!> ../../../docs_src/dependencies/tutorial008_an.py!} +{!> ../../docs_src/dependencies/tutorial008_an.py!} ``` //// @@ -136,7 +136,7 @@ FastAPI ĐżĐŸĐŽĐŽĐ”Ń€Đ¶ĐžĐČаДт заĐČĐžŃĐžĐŒĐŸŃŃ‚Đž, ĐșĐŸŃ‚ĐŸŃ€Ń‹Đ” ĐČŃ‹ĐżĐŸ /// ```Python hl_lines="16-17 24-25" -{!> ../../../docs_src/dependencies/tutorial008.py!} +{!> ../../docs_src/dependencies/tutorial008.py!} ``` //// @@ -304,7 +304,7 @@ with open("./somefile.txt") as f: `with` ОлО `async with` ĐČĐœŃƒŃ‚Ń€Đž Ń„ŃƒĐœĐșцоо заĐČĐžŃĐžĐŒĐŸŃŃ‚Đž: ```Python hl_lines="1-9 13" -{!../../../docs_src/dependencies/tutorial010.py!} +{!../../docs_src/dependencies/tutorial010.py!} ``` /// tip | "ĐŸĐŸĐŽŃĐșазĐșа" diff --git a/docs/ru/docs/tutorial/dependencies/global-dependencies.md b/docs/ru/docs/tutorial/dependencies/global-dependencies.md index 9e03e3723..7dbd50ae1 100644 --- a/docs/ru/docs/tutorial/dependencies/global-dependencies.md +++ b/docs/ru/docs/tutorial/dependencies/global-dependencies.md @@ -9,7 +9,7 @@ //// tab | Python 3.9+ ```Python hl_lines="16" -{!> ../../../docs_src/dependencies/tutorial012_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial012_an_py39.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | Python 3.8+ ```Python hl_lines="16" -{!> ../../../docs_src/dependencies/tutorial012_an.py!} +{!> ../../docs_src/dependencies/tutorial012_an.py!} ``` //// @@ -31,7 +31,7 @@ /// ```Python hl_lines="15" -{!> ../../../docs_src/dependencies/tutorial012.py!} +{!> ../../docs_src/dependencies/tutorial012.py!} ``` //// diff --git a/docs/ru/docs/tutorial/dependencies/index.md b/docs/ru/docs/tutorial/dependencies/index.md index b244b3fdc..fcd9f46dc 100644 --- a/docs/ru/docs/tutorial/dependencies/index.md +++ b/docs/ru/docs/tutorial/dependencies/index.md @@ -32,7 +32,7 @@ //// tab | Python 3.10+ ```Python hl_lines="8-9" -{!> ../../../docs_src/dependencies/tutorial001_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// @@ -40,7 +40,7 @@ //// tab | Python 3.9+ ```Python hl_lines="8-11" -{!> ../../../docs_src/dependencies/tutorial001_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py39.py!} ``` //// @@ -48,7 +48,7 @@ //// tab | Python 3.8+ ```Python hl_lines="9-12" -{!> ../../../docs_src/dependencies/tutorial001_an.py!} +{!> ../../docs_src/dependencies/tutorial001_an.py!} ``` //// @@ -62,7 +62,7 @@ /// ```Python hl_lines="6-7" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -76,7 +76,7 @@ /// ```Python hl_lines="8-11" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -114,7 +114,7 @@ //// tab | Python 3.10+ ```Python hl_lines="3" -{!> ../../../docs_src/dependencies/tutorial001_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// @@ -122,7 +122,7 @@ //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/dependencies/tutorial001_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py39.py!} ``` //// @@ -130,7 +130,7 @@ //// tab | Python 3.8+ ```Python hl_lines="3" -{!> ../../../docs_src/dependencies/tutorial001_an.py!} +{!> ../../docs_src/dependencies/tutorial001_an.py!} ``` //// @@ -144,7 +144,7 @@ /// ```Python hl_lines="1" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -158,7 +158,7 @@ /// ```Python hl_lines="3" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -170,7 +170,7 @@ //// tab | Python 3.10+ ```Python hl_lines="13 18" -{!> ../../../docs_src/dependencies/tutorial001_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// @@ -178,7 +178,7 @@ //// tab | Python 3.9+ ```Python hl_lines="15 20" -{!> ../../../docs_src/dependencies/tutorial001_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_an_py39.py!} ``` //// @@ -186,7 +186,7 @@ //// tab | Python 3.8+ ```Python hl_lines="16 21" -{!> ../../../docs_src/dependencies/tutorial001_an.py!} +{!> ../../docs_src/dependencies/tutorial001_an.py!} ``` //// @@ -200,7 +200,7 @@ /// ```Python hl_lines="11 16" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -214,7 +214,7 @@ /// ```Python hl_lines="15 20" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -273,7 +273,7 @@ commons: Annotated[dict, Depends(common_parameters)] //// tab | Python 3.10+ ```Python hl_lines="12 16 21" -{!> ../../../docs_src/dependencies/tutorial001_02_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_02_an_py310.py!} ``` //// @@ -281,7 +281,7 @@ commons: Annotated[dict, Depends(common_parameters)] //// tab | Python 3.9+ ```Python hl_lines="14 18 23" -{!> ../../../docs_src/dependencies/tutorial001_02_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial001_02_an_py39.py!} ``` //// @@ -289,7 +289,7 @@ commons: Annotated[dict, Depends(common_parameters)] //// tab | Python 3.8+ ```Python hl_lines="15 19 24" -{!> ../../../docs_src/dependencies/tutorial001_02_an.py!} +{!> ../../docs_src/dependencies/tutorial001_02_an.py!} ``` //// diff --git a/docs/ru/docs/tutorial/dependencies/sub-dependencies.md b/docs/ru/docs/tutorial/dependencies/sub-dependencies.md index 332470396..ae0fd0824 100644 --- a/docs/ru/docs/tutorial/dependencies/sub-dependencies.md +++ b/docs/ru/docs/tutorial/dependencies/sub-dependencies.md @@ -13,7 +13,7 @@ //// tab | Python 3.10+ ```Python hl_lines="8-9" -{!> ../../../docs_src/dependencies/tutorial005_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_an_py310.py!} ``` //// @@ -21,7 +21,7 @@ //// tab | Python 3.9+ ```Python hl_lines="8-9" -{!> ../../../docs_src/dependencies/tutorial005_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial005_an_py39.py!} ``` //// @@ -29,7 +29,7 @@ //// tab | Python 3.6+ ```Python hl_lines="9-10" -{!> ../../../docs_src/dependencies/tutorial005_an.py!} +{!> ../../docs_src/dependencies/tutorial005_an.py!} ``` //// @@ -43,7 +43,7 @@ /// ```Python hl_lines="6-7" -{!> ../../../docs_src/dependencies/tutorial005_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_py310.py!} ``` //// @@ -57,7 +57,7 @@ /// ```Python hl_lines="8-9" -{!> ../../../docs_src/dependencies/tutorial005.py!} +{!> ../../docs_src/dependencies/tutorial005.py!} ``` //// @@ -73,7 +73,7 @@ //// tab | Python 3.10+ ```Python hl_lines="13" -{!> ../../../docs_src/dependencies/tutorial005_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_an_py310.py!} ``` //// @@ -81,7 +81,7 @@ //// tab | Python 3.9+ ```Python hl_lines="13" -{!> ../../../docs_src/dependencies/tutorial005_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial005_an_py39.py!} ``` //// @@ -89,7 +89,7 @@ //// tab | Python 3.6+ ```Python hl_lines="14" -{!> ../../../docs_src/dependencies/tutorial005_an.py!} +{!> ../../docs_src/dependencies/tutorial005_an.py!} ``` //// @@ -103,7 +103,7 @@ /// ```Python hl_lines="11" -{!> ../../../docs_src/dependencies/tutorial005_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_py310.py!} ``` //// @@ -117,7 +117,7 @@ /// ```Python hl_lines="13" -{!> ../../../docs_src/dependencies/tutorial005.py!} +{!> ../../docs_src/dependencies/tutorial005.py!} ``` //// @@ -136,7 +136,7 @@ //// tab | Python 3.10+ ```Python hl_lines="23" -{!> ../../../docs_src/dependencies/tutorial005_an_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_an_py310.py!} ``` //// @@ -144,7 +144,7 @@ //// tab | Python 3.9+ ```Python hl_lines="23" -{!> ../../../docs_src/dependencies/tutorial005_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial005_an_py39.py!} ``` //// @@ -152,7 +152,7 @@ //// tab | Python 3.6+ ```Python hl_lines="24" -{!> ../../../docs_src/dependencies/tutorial005_an.py!} +{!> ../../docs_src/dependencies/tutorial005_an.py!} ``` //// @@ -166,7 +166,7 @@ /// ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial005_py310.py!} +{!> ../../docs_src/dependencies/tutorial005_py310.py!} ``` //// @@ -180,7 +180,7 @@ /// ```Python hl_lines="22" -{!> ../../../docs_src/dependencies/tutorial005.py!} +{!> ../../docs_src/dependencies/tutorial005.py!} ``` //// diff --git a/docs/ru/docs/tutorial/encoder.md b/docs/ru/docs/tutorial/encoder.md index 02c3587f3..c9900cb2c 100644 --- a/docs/ru/docs/tutorial/encoder.md +++ b/docs/ru/docs/tutorial/encoder.md @@ -23,7 +23,7 @@ //// tab | Python 3.10+ ```Python hl_lines="4 21" -{!> ../../../docs_src/encoder/tutorial001_py310.py!} +{!> ../../docs_src/encoder/tutorial001_py310.py!} ``` //// @@ -31,7 +31,7 @@ //// tab | Python 3.6+ ```Python hl_lines="5 22" -{!> ../../../docs_src/encoder/tutorial001.py!} +{!> ../../docs_src/encoder/tutorial001.py!} ``` //// diff --git a/docs/ru/docs/tutorial/extra-data-types.md b/docs/ru/docs/tutorial/extra-data-types.md index 2650bb0af..82cb0ff7a 100644 --- a/docs/ru/docs/tutorial/extra-data-types.md +++ b/docs/ru/docs/tutorial/extra-data-types.md @@ -58,7 +58,7 @@ //// tab | Python 3.8 Đž ĐČŃ‹ŃˆĐ” ```Python hl_lines="1 3 12-16" -{!> ../../../docs_src/extra_data_types/tutorial001.py!} +{!> ../../docs_src/extra_data_types/tutorial001.py!} ``` //// @@ -66,7 +66,7 @@ //// tab | Python 3.10 Đž ĐČŃ‹ŃˆĐ” ```Python hl_lines="1 2 11-15" -{!> ../../../docs_src/extra_data_types/tutorial001_py310.py!} +{!> ../../docs_src/extra_data_types/tutorial001_py310.py!} ``` //// @@ -76,7 +76,7 @@ //// tab | Python 3.8 Đž ĐČŃ‹ŃˆĐ” ```Python hl_lines="18-19" -{!> ../../../docs_src/extra_data_types/tutorial001.py!} +{!> ../../docs_src/extra_data_types/tutorial001.py!} ``` //// @@ -84,7 +84,7 @@ //// tab | Python 3.10 Đž ĐČŃ‹ŃˆĐ” ```Python hl_lines="17-18" -{!> ../../../docs_src/extra_data_types/tutorial001_py310.py!} +{!> ../../docs_src/extra_data_types/tutorial001_py310.py!} ``` //// diff --git a/docs/ru/docs/tutorial/extra-models.md b/docs/ru/docs/tutorial/extra-models.md index 2aac76aa3..e7ff3f40f 100644 --- a/docs/ru/docs/tutorial/extra-models.md +++ b/docs/ru/docs/tutorial/extra-models.md @@ -23,7 +23,7 @@ //// tab | Python 3.10+ ```Python hl_lines="7 9 14 20 22 27-28 31-33 38-39" -{!> ../../../docs_src/extra_models/tutorial001_py310.py!} +{!> ../../docs_src/extra_models/tutorial001_py310.py!} ``` //// @@ -31,7 +31,7 @@ //// tab | Python 3.8+ ```Python hl_lines="9 11 16 22 24 29-30 33-35 40-41" -{!> ../../../docs_src/extra_models/tutorial001.py!} +{!> ../../docs_src/extra_models/tutorial001.py!} ``` //// @@ -171,7 +171,7 @@ UserInDB( //// tab | Python 3.10+ ```Python hl_lines="7 13-14 17-18 21-22" -{!> ../../../docs_src/extra_models/tutorial002_py310.py!} +{!> ../../docs_src/extra_models/tutorial002_py310.py!} ``` //// @@ -179,7 +179,7 @@ UserInDB( //// tab | Python 3.8+ ```Python hl_lines="9 15-16 19-20 23-24" -{!> ../../../docs_src/extra_models/tutorial002.py!} +{!> ../../docs_src/extra_models/tutorial002.py!} ``` //// @@ -201,7 +201,7 @@ UserInDB( //// tab | Python 3.10+ ```Python hl_lines="1 14-15 18-20 33" -{!> ../../../docs_src/extra_models/tutorial003_py310.py!} +{!> ../../docs_src/extra_models/tutorial003_py310.py!} ``` //// @@ -209,7 +209,7 @@ UserInDB( //// tab | Python 3.8+ ```Python hl_lines="1 14-15 18-20 33" -{!> ../../../docs_src/extra_models/tutorial003.py!} +{!> ../../docs_src/extra_models/tutorial003.py!} ``` //// @@ -237,7 +237,7 @@ some_variable: PlaneItem | CarItem //// tab | Python 3.9+ ```Python hl_lines="18" -{!> ../../../docs_src/extra_models/tutorial004_py39.py!} +{!> ../../docs_src/extra_models/tutorial004_py39.py!} ``` //// @@ -245,7 +245,7 @@ some_variable: PlaneItem | CarItem //// tab | Python 3.8+ ```Python hl_lines="1 20" -{!> ../../../docs_src/extra_models/tutorial004.py!} +{!> ../../docs_src/extra_models/tutorial004.py!} ``` //// @@ -261,7 +261,7 @@ some_variable: PlaneItem | CarItem //// tab | Python 3.9+ ```Python hl_lines="6" -{!> ../../../docs_src/extra_models/tutorial005_py39.py!} +{!> ../../docs_src/extra_models/tutorial005_py39.py!} ``` //// @@ -269,7 +269,7 @@ some_variable: PlaneItem | CarItem //// tab | Python 3.8+ ```Python hl_lines="1 8" -{!> ../../../docs_src/extra_models/tutorial005.py!} +{!> ../../docs_src/extra_models/tutorial005.py!} ``` //// diff --git a/docs/ru/docs/tutorial/first-steps.md b/docs/ru/docs/tutorial/first-steps.md index e60d58823..b1de217cd 100644 --- a/docs/ru/docs/tutorial/first-steps.md +++ b/docs/ru/docs/tutorial/first-steps.md @@ -3,7 +3,7 @@ ĐĄĐ°ĐŒŃ‹Đč ĐżŃ€ĐŸŃŃ‚ĐŸĐč FastAPI фаĐčĐ» ĐŒĐŸĐ¶Đ”Ń‚ ĐČŃ‹ĐłĐ»ŃĐŽĐ”Ń‚ŃŒ таĐș: ```Python -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` ĐĄĐșĐŸĐżĐžŃ€ŃƒĐčтД ĐČ Ń„Đ°ĐčĐ» `main.py`. @@ -134,7 +134,7 @@ OpenAPI ĐŸĐżĐžŃŃ‹ĐČаДт ŃŃ…Đ”ĐŒŃƒ API. Эта ŃŃ…Đ”ĐŒĐ° ŃĐŸĐŽĐ”Ń€Đ¶ĐžŃ‚ ĐŸ ### Каг 1: ĐžĐŒĐżĐŸŃ€Ń‚ĐžŃ€ŃƒĐčтД `FastAPI` ```Python hl_lines="1" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` `FastAPI` ŃŃ‚ĐŸ Đșласс ĐČ Python, ĐșĐŸŃ‚ĐŸŃ€Ń‹Đč ĐżŃ€Đ”ĐŽĐŸŃŃ‚Đ°ĐČĐ»ŃĐ”Ń‚ ĐČсю Ń„ŃƒĐœĐșŃ†ĐžĐŸĐœĐ°Đ»ŃŒĐœĐŸŃŃ‚ŃŒ ĐŽĐ»Ń API. @@ -150,7 +150,7 @@ OpenAPI ĐŸĐżĐžŃŃ‹ĐČаДт ŃŃ…Đ”ĐŒŃƒ API. Эта ŃŃ…Đ”ĐŒĐ° ŃĐŸĐŽĐ”Ń€Đ¶ĐžŃ‚ ĐŸ ### Каг 2: ŃĐŸĐ·ĐŽĐ°ĐčтД эĐșĐ·Đ”ĐŒĐżĐ»ŃŃ€ `FastAPI` ```Python hl_lines="3" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` ĐŸĐ”Ń€Đ”ĐŒĐ”ĐœĐœĐ°Ń `app` яĐČĐ»ŃĐ”Ń‚ŃŃ эĐșĐ·Đ”ĐŒĐżĐ»ŃŃ€ĐŸĐŒ Đșласса `FastAPI`. @@ -172,7 +172,7 @@ $ uvicorn main:app --reload ЕслО ŃĐŸĐ·ĐŽĐ°Ń‚ŃŒ таĐșĐŸĐ” ĐżŃ€ĐžĐ»ĐŸĐ¶Đ”ĐœĐžĐ”: ```Python hl_lines="3" -{!../../../docs_src/first_steps/tutorial002.py!} +{!../../docs_src/first_steps/tutorial002.py!} ``` И ĐżĐŸĐŒĐ”ŃŃ‚ĐžŃ‚ŃŒ Đ”ĐłĐŸ ĐČ `main.py`, Ń‚ĐŸĐłĐŽĐ° ĐČŃ‹Đ·ĐŸĐČ `uvicorn` Đ±ŃƒĐŽĐ”Ń‚ таĐșĐžĐŒ: @@ -251,7 +251,7 @@ https://example.com/items/foo #### ОпрДЎДлОтД *ĐŽĐ”ĐșĐŸŃ€Đ°Ń‚ĐŸŃ€ ĐŸĐżĐ”Ń€Đ°Ń†ĐžĐž путо (path operation decorator)* ```Python hl_lines="6" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` ДДĐșĐŸŃ€Đ°Ń‚ĐŸŃ€ `@app.get("/")` уĐșазыĐČаДт **FastAPI**, Ń‡Ń‚ĐŸ Ń„ŃƒĐœĐșцоя, ĐżŃ€ŃĐŒĐŸ ĐżĐŸĐŽ ĐœĐžĐŒ, ĐŸŃ‚ĐČДчаДт за ĐŸĐ±Ń€Đ°Đ±ĐŸŃ‚Đșу Đ·Đ°ĐżŃ€ĐŸŃĐŸĐČ, ĐżĐŸŃŃ‚ŃƒĐżĐ°ŃŽŃ‰ĐžŃ… ĐżĐŸ Đ°ĐŽŃ€Đ”ŃŃƒ: @@ -307,7 +307,7 @@ https://example.com/items/foo * **Ń„ŃƒĐœĐșцоя**: Ń„ŃƒĐœĐșцоя ĐœĐžĐ¶Đ” "ĐŽĐ”ĐșĐŸŃ€Đ°Ń‚ĐŸŃ€Đ°" (ĐœĐžĐ¶Đ” `@app.get("/")`). ```Python hl_lines="7" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` Đ­Ń‚ĐŸ ĐŸĐ±Ń‹Ń‡ĐœĐ°Ń Python Ń„ŃƒĐœĐșцоя. @@ -321,7 +321,7 @@ https://example.com/items/foo Вы таĐșжД ĐŒĐŸĐ¶Đ”Ń‚Đ” ĐŸĐżŃ€Đ”ĐŽĐ”Đ»ĐžŃ‚ŃŒ ДД ĐșаĐș ĐŸĐ±Ń‹Ń‡ĐœŃƒŃŽ Ń„ŃƒĐœĐșцою ĐČĐŒĐ”ŃŃ‚ĐŸ `async def`: ```Python hl_lines="7" -{!../../../docs_src/first_steps/tutorial003.py!} +{!../../docs_src/first_steps/tutorial003.py!} ``` /// note | "ĐąĐ”Ń…ĐœĐžŃ‡Đ”ŃĐșОД ЎДталО" @@ -333,7 +333,7 @@ https://example.com/items/foo ### Каг 5: ĐČĐ”Ń€ĐœĐžŃ‚Đ” Ń€Đ”Đ·ŃƒĐ»ŃŒŃ‚Đ°Ń‚ ```Python hl_lines="8" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` Вы ĐŒĐŸĐ¶Đ”Ń‚Đ” ĐČĐ”Ń€ĐœŃƒŃ‚ŃŒ `dict`, `list`, ĐŸŃ‚ĐŽĐ”Đ»ŃŒĐœŃ‹Đ” Đ·ĐœĐ°Ń‡Đ”ĐœĐžŃ `str`, `int` Đž т.ĐŽ. diff --git a/docs/ru/docs/tutorial/handling-errors.md b/docs/ru/docs/tutorial/handling-errors.md index 028f3e0d2..e7bfb85aa 100644 --- a/docs/ru/docs/tutorial/handling-errors.md +++ b/docs/ru/docs/tutorial/handling-errors.md @@ -26,7 +26,7 @@ ### Đ˜ĐŒĐżĐŸŃ€Ń‚ĐžŃ€ŃƒĐčтД `HTTPException` ```Python hl_lines="1" -{!../../../docs_src/handling_errors/tutorial001.py!} +{!../../docs_src/handling_errors/tutorial001.py!} ``` ### Đ’Ń‹Đ·ĐŸĐČОтД `HTTPException` ĐČ ŃĐČĐŸĐ”ĐŒ ĐșĐŸĐŽĐ” @@ -42,7 +42,7 @@ В ĐŽĐ°ĐœĐœĐŸĐŒ ĐżŃ€ĐžĐŒĐ”Ń€Đ”, ĐșĐŸĐłĐŽĐ° ĐșĐ»ĐžĐ”ĐœŃ‚ Đ·Đ°ĐżŃ€Đ°ŃˆĐžĐČаДт ŃĐ»Đ”ĐŒĐ”ĐœŃ‚ ĐżĐŸ ĐœĐ”ŃŃƒŃ‰Đ”ŃŃ‚ĐČŃƒŃŽŃ‰Đ”ĐŒŃƒ ID, ĐČĐŸĐ·ĐœĐžĐșаДт ОсĐșĐ»ŃŽŃ‡Đ”ĐœĐžĐ” ŃĐŸ статус-ĐșĐŸĐŽĐŸĐŒ `404`: ```Python hl_lines="11" -{!../../../docs_src/handling_errors/tutorial001.py!} +{!../../docs_src/handling_errors/tutorial001.py!} ``` ### Đ’ĐŸĐ·ĐČŃ€Đ°Ń‰Đ°Đ”ĐŒŃ‹Đč ĐŸŃ‚ĐČДт @@ -82,7 +82,7 @@ ĐĐŸ ĐČ ŃĐ»ŃƒŃ‡Đ°Đ”, ДслО ŃŃ‚ĐŸ ĐœĐ”ĐŸĐ±Ń…ĐŸĐŽĐžĐŒĐŸ ĐŽĐ»Ń ĐżŃ€ĐŸĐŽĐČĐžĐœŃƒŃ‚ĐŸĐłĐŸ ŃŃ†Đ”ĐœĐ°Ń€ĐžŃ, ĐŒĐŸĐ¶ĐœĐŸ ĐŽĐŸĐ±Đ°ĐČоть ĐżĐŸĐ»ŃŒĐ·ĐŸĐČĐ°Ń‚Đ”Đ»ŃŒŃĐșОД Đ·Đ°ĐłĐŸĐ»ĐŸĐČĐșĐž: ```Python hl_lines="14" -{!../../../docs_src/handling_errors/tutorial002.py!} +{!../../docs_src/handling_errors/tutorial002.py!} ``` ## ĐŁŃŃ‚Đ°ĐœĐŸĐČĐșа ĐżĐŸĐ»ŃŒĐ·ĐŸĐČĐ°Ń‚Đ”Đ»ŃŒŃĐșох ĐŸĐ±Ń€Đ°Đ±ĐŸŃ‚Ń‡ĐžĐșĐŸĐČ ĐžŃĐșĐ»ŃŽŃ‡Đ”ĐœĐžĐč @@ -96,7 +96,7 @@ ĐœĐŸĐ¶ĐœĐŸ ĐŽĐŸĐ±Đ°ĐČоть ŃĐŸĐ±ŃŃ‚ĐČĐ”ĐœĐœŃ‹Đč ĐŸĐ±Ń€Đ°Đ±ĐŸŃ‚Ń‡ĐžĐș ОсĐșĐ»ŃŽŃ‡Đ”ĐœĐžĐč с ĐżĐŸĐŒĐŸŃ‰ŃŒŃŽ `@app.exception_handler()`: ```Python hl_lines="5-7 13-18 24" -{!../../../docs_src/handling_errors/tutorial003.py!} +{!../../docs_src/handling_errors/tutorial003.py!} ``` Đ—ĐŽĐ”ŃŃŒ, ДслО Đ·Đ°ĐżŃ€ĐŸŃĐžŃ‚ŃŒ `/unicorns/yolo`, Ń‚ĐŸ *ĐŸĐżĐ”Ń€Đ°Ń†ĐžŃ путо* ĐČŃ‹Đ·ĐŸĐČДт `UnicornException`. @@ -136,7 +136,7 @@ ĐžĐ±Ń€Đ°Đ±ĐŸŃ‚Ń‡ĐžĐș ОсĐșĐ»ŃŽŃ‡Đ”ĐœĐžŃ ĐżĐŸĐ»ŃƒŃ‡ĐžŃ‚ ĐŸĐ±ŃŠĐ”Đșт `Request` Đž ОсĐșĐ»ŃŽŃ‡Đ”ĐœĐžĐ”. ```Python hl_lines="2 14-16" -{!../../../docs_src/handling_errors/tutorial004.py!} +{!../../docs_src/handling_errors/tutorial004.py!} ``` ĐąĐ”ĐżĐ”Ń€ŃŒ, ДслО пДрДĐčто Đș `/items/foo`, Ń‚ĐŸ ĐČĐŒĐ”ŃŃ‚ĐŸ ŃŃ‚Đ°ĐœĐŽĐ°Ń€Ń‚ĐœĐŸĐč JSON-ĐŸŃˆĐžĐ±ĐșĐž с: @@ -189,7 +189,7 @@ path -> item_id ĐĐ°ĐżŃ€ĐžĐŒĐ”Ń€, ĐŽĐ»Ń этох ĐŸŃˆĐžĐ±ĐŸĐș ĐŒĐŸĐ¶ĐœĐŸ ĐČĐ”Ń€ĐœŃƒŃ‚ŃŒ ĐŸĐ±Ń‹Ń‡ĐœŃ‹Đč тДĐșŃŃ‚ĐŸĐČыĐč ĐŸŃ‚ĐČДт ĐČĐŒĐ”ŃŃ‚ĐŸ JSON: ```Python hl_lines="3-4 9-11 22" -{!../../../docs_src/handling_errors/tutorial004.py!} +{!../../docs_src/handling_errors/tutorial004.py!} ``` /// note | "ĐąĐ”Ń…ĐœĐžŃ‡Đ”ŃĐșОД ЎДталО" @@ -207,7 +207,7 @@ path -> item_id Вы ĐŒĐŸĐ¶Đ”Ń‚Đ” ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать Đ”ĐłĐŸ про Ń€Đ°Đ·Ń€Đ°Đ±ĐŸŃ‚ĐșĐ” ĐżŃ€ĐžĐ»ĐŸĐ¶Đ”ĐœĐžŃ ĐŽĐ»Ń рДгОстрацОО тДла Đž Đ”ĐłĐŸ ĐŸŃ‚Đ»Đ°ĐŽĐșĐž, ĐČĐŸĐ·ĐČрата ĐżĐŸĐ»ŃŒĐ·ĐŸĐČатДлю Đž т.ĐŽ. ```Python hl_lines="14" -{!../../../docs_src/handling_errors/tutorial005.py!} +{!../../docs_src/handling_errors/tutorial005.py!} ``` ĐąĐ”ĐżĐ”Ń€ŃŒ ĐżĐŸĐżŃ€ĐŸĐ±ŃƒĐčтД ĐŸŃ‚ĐżŃ€Đ°ĐČоть ĐœĐ”ĐŽĐ”ĐčстĐČĐžŃ‚Đ”Đ»ŃŒĐœŃ‹Đč ŃĐ»Đ”ĐŒĐ”ĐœŃ‚, ĐœĐ°ĐżŃ€ĐžĐŒĐ”Ń€: @@ -267,7 +267,7 @@ from starlette.exceptions import HTTPException as StarletteHTTPException ЕслО ĐČы Ń…ĐŸŃ‚ĐžŃ‚Đ” ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать ОсĐșĐ»ŃŽŃ‡Đ”ĐœĐžĐ” ĐČĐŒĐ”ŃŃ‚Đ” с Ń‚Đ”ĐŒĐž жД ĐŸĐ±Ń€Đ°Đ±ĐŸŃ‚Ń‡ĐžĐșĐ°ĐŒĐž ОсĐșĐ»ŃŽŃ‡Đ”ĐœĐžĐč ĐżĐŸ ŃƒĐŒĐŸĐ»Ń‡Đ°ĐœĐžŃŽ Оз **FastAPI**, ĐČы ĐŒĐŸĐ¶Đ”Ń‚Đ” ĐžĐŒĐżĐŸŃ€Ń‚ĐžŃ€ĐŸĐČать Đž ĐżĐŸĐČŃ‚ĐŸŃ€ĐœĐŸ ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать ĐŸĐ±Ń€Đ°Đ±ĐŸŃ‚Ń‡ĐžĐșĐž ОсĐșĐ»ŃŽŃ‡Đ”ĐœĐžĐč ĐżĐŸ ŃƒĐŒĐŸĐ»Ń‡Đ°ĐœĐžŃŽ Оз `fastapi.exception_handlers`: ```Python hl_lines="2-5 15 21" -{!../../../docs_src/handling_errors/tutorial006.py!} +{!../../docs_src/handling_errors/tutorial006.py!} ``` В ŃŃ‚ĐŸĐŒ ĐżŃ€ĐžĐŒĐ”Ń€Đ” ĐČы ĐżŃ€ĐŸŃŃ‚ĐŸ `ĐČыĐČĐŸĐŽĐžŃ‚Đ” ĐČ Ń‚Đ”Ń€ĐŒĐžĐœĐ°Đ»` ĐŸŃˆĐžĐ±Đșу с ĐŸŃ‡Đ”ĐœŃŒ ĐČŃ‹Ń€Đ°Đ·ĐžŃ‚Đ”Đ»ŃŒĐœŃ‹ĐŒ ŃĐŸĐŸĐ±Ń‰Đ”ĐœĐžĐ”ĐŒ, ĐœĐŸ ĐžĐŽĐ”Ń ĐČĐ°ĐŒ ĐżĐŸĐœŃŃ‚ĐœĐ°. Вы ĐŒĐŸĐ¶Đ”Ń‚Đ” ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать ОсĐșĐ»ŃŽŃ‡Đ”ĐœĐžĐ”, а Đ·Đ°Ń‚Đ”ĐŒ ĐżŃ€ĐŸŃŃ‚ĐŸ ĐżĐŸĐČŃ‚ĐŸŃ€ĐœĐŸ ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать ŃŃ‚Đ°ĐœĐŽĐ°Ń€Ń‚ĐœŃ‹Đ” ĐŸĐ±Ń€Đ°Đ±ĐŸŃ‚Ń‡ĐžĐșĐž ОсĐșĐ»ŃŽŃ‡Đ”ĐœĐžĐč. diff --git a/docs/ru/docs/tutorial/header-params.md b/docs/ru/docs/tutorial/header-params.md index 3b5e38328..18e1e60d0 100644 --- a/docs/ru/docs/tutorial/header-params.md +++ b/docs/ru/docs/tutorial/header-params.md @@ -9,7 +9,7 @@ //// tab | Python 3.10+ ```Python hl_lines="3" -{!> ../../../docs_src/header_params/tutorial001_an_py310.py!} +{!> ../../docs_src/header_params/tutorial001_an_py310.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/header_params/tutorial001_an_py39.py!} +{!> ../../docs_src/header_params/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ //// tab | Python 3.8+ ```Python hl_lines="3" -{!> ../../../docs_src/header_params/tutorial001_an.py!} +{!> ../../docs_src/header_params/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ /// ```Python hl_lines="1" -{!> ../../../docs_src/header_params/tutorial001_py310.py!} +{!> ../../docs_src/header_params/tutorial001_py310.py!} ``` //// @@ -53,7 +53,7 @@ /// ```Python hl_lines="3" -{!> ../../../docs_src/header_params/tutorial001.py!} +{!> ../../docs_src/header_params/tutorial001.py!} ``` //// @@ -67,7 +67,7 @@ //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial001_an_py310.py!} +{!> ../../docs_src/header_params/tutorial001_an_py310.py!} ``` //// @@ -75,7 +75,7 @@ //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial001_an_py39.py!} +{!> ../../docs_src/header_params/tutorial001_an_py39.py!} ``` //// @@ -83,7 +83,7 @@ //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/header_params/tutorial001_an.py!} +{!> ../../docs_src/header_params/tutorial001_an.py!} ``` //// @@ -97,7 +97,7 @@ /// ```Python hl_lines="7" -{!> ../../../docs_src/header_params/tutorial001_py310.py!} +{!> ../../docs_src/header_params/tutorial001_py310.py!} ``` //// @@ -111,7 +111,7 @@ /// ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial001.py!} +{!> ../../docs_src/header_params/tutorial001.py!} ``` //// @@ -149,7 +149,7 @@ //// tab | Python 3.10+ ```Python hl_lines="10" -{!> ../../../docs_src/header_params/tutorial002_an_py310.py!} +{!> ../../docs_src/header_params/tutorial002_an_py310.py!} ``` //// @@ -157,7 +157,7 @@ //// tab | Python 3.9+ ```Python hl_lines="11" -{!> ../../../docs_src/header_params/tutorial002_an_py39.py!} +{!> ../../docs_src/header_params/tutorial002_an_py39.py!} ``` //// @@ -165,7 +165,7 @@ //// tab | Python 3.8+ ```Python hl_lines="12" -{!> ../../../docs_src/header_params/tutorial002_an.py!} +{!> ../../docs_src/header_params/tutorial002_an.py!} ``` //// @@ -179,7 +179,7 @@ /// ```Python hl_lines="8" -{!> ../../../docs_src/header_params/tutorial002_py310.py!} +{!> ../../docs_src/header_params/tutorial002_py310.py!} ``` //// @@ -193,7 +193,7 @@ /// ```Python hl_lines="10" -{!> ../../../docs_src/header_params/tutorial002.py!} +{!> ../../docs_src/header_params/tutorial002.py!} ``` //// @@ -217,7 +217,7 @@ //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial003_an_py310.py!} +{!> ../../docs_src/header_params/tutorial003_an_py310.py!} ``` //// @@ -225,7 +225,7 @@ //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial003_an_py39.py!} +{!> ../../docs_src/header_params/tutorial003_an_py39.py!} ``` //// @@ -233,7 +233,7 @@ //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/header_params/tutorial003_an.py!} +{!> ../../docs_src/header_params/tutorial003_an.py!} ``` //// @@ -247,7 +247,7 @@ /// ```Python hl_lines="7" -{!> ../../../docs_src/header_params/tutorial003_py310.py!} +{!> ../../docs_src/header_params/tutorial003_py310.py!} ``` //// @@ -261,7 +261,7 @@ /// ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial003_py39.py!} +{!> ../../docs_src/header_params/tutorial003_py39.py!} ``` //// @@ -275,7 +275,7 @@ /// ```Python hl_lines="9" -{!> ../../../docs_src/header_params/tutorial003.py!} +{!> ../../docs_src/header_params/tutorial003.py!} ``` //// diff --git a/docs/ru/docs/tutorial/metadata.md b/docs/ru/docs/tutorial/metadata.md index 9799fe538..246458f42 100644 --- a/docs/ru/docs/tutorial/metadata.md +++ b/docs/ru/docs/tutorial/metadata.md @@ -18,7 +18,7 @@ Вы ĐŒĐŸĐ¶Đ”Ń‚Đ” Đ·Đ°ĐŽĐ°Ń‚ŃŒ ох ŃĐ»Đ”ĐŽŃƒŃŽŃ‰ĐžĐŒ ĐŸĐ±Ń€Đ°Đ·ĐŸĐŒ: ```Python hl_lines="3-16 19-31" -{!../../../docs_src/metadata/tutorial001.py!} +{!../../docs_src/metadata/tutorial001.py!} ``` /// tip | "ĐŸĐŸĐŽŃĐșазĐșа" @@ -52,7 +52,7 @@ ĐĄĐŸĐ·ĐŽĐ°ĐčтД ĐŒĐ”Ń‚Đ°ĐŽĐ°ĐœĐœŃ‹Đ” ĐŽĐ»Ń ĐČашох Ń‚Đ”ĐłĐŸĐČ Đž пДрДЎаĐčтД ох ĐČ ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€Đ” `openapi_tags`: ```Python hl_lines="3-16 18" -{!../../../docs_src/metadata/tutorial004.py!} +{!../../docs_src/metadata/tutorial004.py!} ``` ĐŸĐŸĐŒĐœĐžŃ‚Đ”, Ń‡Ń‚ĐŸ ĐČы ĐŒĐŸĐ¶Đ”Ń‚Đ” ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать Markdown ĐČĐœŃƒŃ‚Ń€Đž ĐŸĐżĐžŃĐ°ĐœĐžŃ, Đș ĐżŃ€ĐžĐŒĐ”Ń€Ńƒ "login" Đ±ŃƒĐŽĐ”Ń‚ ĐŸŃ‚ĐŸĐ±Ń€Đ°Đ¶Đ”Đœ Đ¶ĐžŃ€ĐœŃ‹ĐŒ ŃˆŃ€ĐžŃ„Ń‚ĐŸĐŒ (**login**) Đž "fancy" Đ±ŃƒĐŽĐ”Ń‚ ĐŸŃ‚ĐŸĐ±Ń€Đ°Đ¶Đ°Ń‚ŃŒŃŃ ĐșурсоĐČĐŸĐŒ (_fancy_). @@ -67,7 +67,7 @@ Đ˜ŃĐżĐŸĐ»ŃŒĐ·ŃƒĐčтД ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€ `tags` с ĐČĐ°ŃˆĐžĐŒĐž *ĐŸĐżĐ”Ń€Đ°Ń†ĐžŃĐŒĐž путо* (Đž `APIRouter`Đ°ĐŒĐž), Ń‡Ń‚ĐŸĐ±Ń‹ просĐČĐŸĐžŃ‚ŃŒ ĐžĐŒ Ń€Đ°Đ·Đ»ĐžŃ‡ĐœŃ‹Đ” тДгО: ```Python hl_lines="21 26" -{!../../../docs_src/metadata/tutorial004.py!} +{!../../docs_src/metadata/tutorial004.py!} ``` /// info | "Đ”ĐŸĐżĐŸĐ»ĐœĐžŃ‚Đ”Đ»ŃŒĐœĐ°Ń ĐžĐœŃ„ĐŸŃ€ĐŒĐ°Ń†ĐžŃ" @@ -97,7 +97,7 @@ К ĐżŃ€ĐžĐŒĐ”Ń€Ńƒ, Ń‡Ń‚ĐŸĐ±Ń‹ Đ·Đ°ĐŽĐ°Ń‚ŃŒ Дё ĐŸŃ‚ĐŸĐ±Ń€Đ°Đ¶Đ”ĐœĐžĐ” ĐżĐŸ Đ°ĐŽŃ€Đ”ŃŃƒ `/api/v1/openapi.json`: ```Python hl_lines="3" -{!../../../docs_src/metadata/tutorial002.py!} +{!../../docs_src/metadata/tutorial002.py!} ``` ЕслО ĐČы Ń…ĐŸŃ‚ĐžŃ‚Đ” ĐŸŃ‚ĐșĐ»ŃŽŃ‡ĐžŃ‚ŃŒ ŃŃ…Đ”ĐŒŃƒ OpenAPI ĐżĐŸĐ»ĐœĐŸŃŃ‚ŃŒŃŽ, ĐČы ĐŒĐŸĐ¶Đ”Ń‚Đ” Đ·Đ°ĐŽĐ°Ń‚ŃŒ `openapi_url=None`, ŃŃ‚ĐŸ таĐșжД ĐŸŃ‚ĐșлючОт ĐżĐŸĐ»ŃŒĐ·ĐŸĐČĐ°Ń‚Đ”Đ»ŃŒŃĐșОД ĐžĐœŃ‚Đ”Ń€Ń„Đ”Đčсы ĐŽĐŸĐșŃƒĐŒĐ”ĐœŃ‚Đ°Ń†ĐžĐž, ĐșĐŸŃ‚ĐŸŃ€Ń‹Đ” Đ”ĐłĐŸ ĐžŃĐżĐŸĐ»ŃŒĐ·ŃƒĐ”Ń‚. @@ -116,5 +116,5 @@ К ĐżŃ€ĐžĐŒĐ”Ń€Ńƒ, Ń‡Ń‚ĐŸĐ±Ń‹ Đ·Đ°ĐŽĐ°Ń‚ŃŒ ĐŸŃ‚ĐŸĐ±Ń€Đ°Đ¶Đ”ĐœĐžĐ” Swagger UI ĐżĐŸ Đ°ĐŽŃ€Đ”ŃŃƒ `/documentation` Đž ĐŸŃ‚ĐșĐ»ŃŽŃ‡ĐžŃ‚ŃŒ ReDoc: ```Python hl_lines="3" -{!../../../docs_src/metadata/tutorial003.py!} +{!../../docs_src/metadata/tutorial003.py!} ``` diff --git a/docs/ru/docs/tutorial/path-operation-configuration.md b/docs/ru/docs/tutorial/path-operation-configuration.md index 26b1726ad..5f3855af2 100644 --- a/docs/ru/docs/tutorial/path-operation-configuration.md +++ b/docs/ru/docs/tutorial/path-operation-configuration.md @@ -19,7 +19,7 @@ //// tab | Python 3.10+ ```Python hl_lines="1 15" -{!> ../../../docs_src/path_operation_configuration/tutorial001_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial001_py310.py!} ``` //// @@ -27,7 +27,7 @@ //// tab | Python 3.9+ ```Python hl_lines="3 17" -{!> ../../../docs_src/path_operation_configuration/tutorial001_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial001_py39.py!} ``` //// @@ -35,7 +35,7 @@ //// tab | Python 3.8+ ```Python hl_lines="3 17" -{!> ../../../docs_src/path_operation_configuration/tutorial001.py!} +{!> ../../docs_src/path_operation_configuration/tutorial001.py!} ``` //// @@ -57,7 +57,7 @@ //// tab | Python 3.10+ ```Python hl_lines="15 20 25" -{!> ../../../docs_src/path_operation_configuration/tutorial002_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial002_py310.py!} ``` //// @@ -65,7 +65,7 @@ //// tab | Python 3.9+ ```Python hl_lines="17 22 27" -{!> ../../../docs_src/path_operation_configuration/tutorial002_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial002_py39.py!} ``` //// @@ -73,7 +73,7 @@ //// tab | Python 3.8+ ```Python hl_lines="17 22 27" -{!> ../../../docs_src/path_operation_configuration/tutorial002.py!} +{!> ../../docs_src/path_operation_configuration/tutorial002.py!} ``` //// @@ -91,7 +91,7 @@ **FastAPI** ĐżĐŸĐŽĐŽĐ”Ń€Đ¶ĐžĐČаДт ŃŃ‚ĐŸ таĐș жД, ĐșаĐș Đž ĐČ ŃĐ»ŃƒŃ‡Đ°Đ” с ĐŸĐ±Ń‹Ń‡ĐœŃ‹ĐŒĐž ŃŃ‚Ń€ĐŸĐșĐ°ĐŒĐž: ```Python hl_lines="1 8-10 13 18" -{!../../../docs_src/path_operation_configuration/tutorial002b.py!} +{!../../docs_src/path_operation_configuration/tutorial002b.py!} ``` ## КратĐșĐŸĐ” Đž разĐČŃ‘Ń€ĐœŃƒŃ‚ĐŸĐ” ŃĐŸĐŽĐ”Ń€Đ¶Đ°ĐœĐžĐ” @@ -101,7 +101,7 @@ //// tab | Python 3.10+ ```Python hl_lines="18-19" -{!> ../../../docs_src/path_operation_configuration/tutorial003_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial003_py310.py!} ``` //// @@ -109,7 +109,7 @@ //// tab | Python 3.9+ ```Python hl_lines="20-21" -{!> ../../../docs_src/path_operation_configuration/tutorial003_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial003_py39.py!} ``` //// @@ -117,7 +117,7 @@ //// tab | Python 3.8+ ```Python hl_lines="20-21" -{!> ../../../docs_src/path_operation_configuration/tutorial003.py!} +{!> ../../docs_src/path_operation_configuration/tutorial003.py!} ``` //// @@ -131,7 +131,7 @@ //// tab | Python 3.10+ ```Python hl_lines="17-25" -{!> ../../../docs_src/path_operation_configuration/tutorial004_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial004_py310.py!} ``` //// @@ -139,7 +139,7 @@ //// tab | Python 3.9+ ```Python hl_lines="19-27" -{!> ../../../docs_src/path_operation_configuration/tutorial004_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial004_py39.py!} ``` //// @@ -147,7 +147,7 @@ //// tab | Python 3.8+ ```Python hl_lines="19-27" -{!> ../../../docs_src/path_operation_configuration/tutorial004.py!} +{!> ../../docs_src/path_operation_configuration/tutorial004.py!} ``` //// @@ -163,7 +163,7 @@ //// tab | Python 3.10+ ```Python hl_lines="19" -{!> ../../../docs_src/path_operation_configuration/tutorial005_py310.py!} +{!> ../../docs_src/path_operation_configuration/tutorial005_py310.py!} ``` //// @@ -171,7 +171,7 @@ //// tab | Python 3.9+ ```Python hl_lines="21" -{!> ../../../docs_src/path_operation_configuration/tutorial005_py39.py!} +{!> ../../docs_src/path_operation_configuration/tutorial005_py39.py!} ``` //// @@ -179,7 +179,7 @@ //// tab | Python 3.8+ ```Python hl_lines="21" -{!> ../../../docs_src/path_operation_configuration/tutorial005.py!} +{!> ../../docs_src/path_operation_configuration/tutorial005.py!} ``` //// @@ -205,7 +205,7 @@ OpenAPI уĐșазыĐČаДт, Ń‡Ń‚ĐŸ ĐșĐ°Đ¶ĐŽĐŸĐč *ĐŸĐżĐ”Ń€Đ°Ń†ĐžĐž путо* ĐœĐ” ЕслО ĐČĐ°ĐŒ ĐœĐ”ĐŸĐ±Ń…ĐŸĐŽĐžĐŒĐŸ ĐżĐŸĐŒĐ”Ń‚ĐžŃ‚ŃŒ *ĐŸĐżĐ”Ń€Đ°Ń†ĐžŃŽ путо* ĐșаĐș ŃƒŃŃ‚Đ°Ń€Đ”ĐČшую, про ŃŃ‚ĐŸĐŒ ĐœĐ” ŃƒĐŽĐ°Đ»ŃŃ Дё, пДрДЎаĐčтД ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€ `deprecated`: ```Python hl_lines="16" -{!../../../docs_src/path_operation_configuration/tutorial006.py!} +{!../../docs_src/path_operation_configuration/tutorial006.py!} ``` ĐžĐœ Đ±ŃƒĐŽĐ”Ń‚ чДтĐșĐŸ ĐżĐŸĐŒĐ”Ń‡Đ”Đœ ĐșаĐș ŃƒŃŃ‚Đ°Ń€Đ”ĐČшОĐč ĐČ ĐžĐœŃ‚Đ”Ń€Đ°ĐșтоĐČĐœĐŸĐč ĐŽĐŸĐșŃƒĐŒĐ”ĐœŃ‚Đ°Ń†ĐžĐž: diff --git a/docs/ru/docs/tutorial/path-params-numeric-validations.md b/docs/ru/docs/tutorial/path-params-numeric-validations.md index ced12c826..bf42ec725 100644 --- a/docs/ru/docs/tutorial/path-params-numeric-validations.md +++ b/docs/ru/docs/tutorial/path-params-numeric-validations.md @@ -9,7 +9,7 @@ //// tab | Python 3.10+ ```Python hl_lines="1 3" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | Python 3.9+ ```Python hl_lines="1 3" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ //// tab | Python 3.8+ ```Python hl_lines="3-4" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ /// ```Python hl_lines="1" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_py310.py!} ``` //// @@ -53,7 +53,7 @@ /// ```Python hl_lines="3" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001.py!} ``` //// @@ -77,7 +77,7 @@ //// tab | Python 3.10+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py!} ``` //// @@ -85,7 +85,7 @@ //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_an_py39.py!} ``` //// @@ -93,7 +93,7 @@ //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_an.py!} ``` //// @@ -107,7 +107,7 @@ /// ```Python hl_lines="8" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001_py310.py!} ``` //// @@ -121,7 +121,7 @@ /// ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial001.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial001.py!} ``` //// @@ -167,7 +167,7 @@ Path-ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€ ĐČсДгЎа яĐČĐ»ŃĐ”Ń‚ŃŃ ĐŸĐ±ŃĐ·Đ°Ń‚Đ”Đ»ŃŒĐœŃ‹ĐŒ, Đż /// ```Python hl_lines="7" -{!> ../../../docs_src/path_params_numeric_validations/tutorial002.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial002.py!} ``` //// @@ -177,7 +177,7 @@ Path-ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€ ĐČсДгЎа яĐČĐ»ŃĐ”Ń‚ŃŃ ĐŸĐ±ŃĐ·Đ°Ń‚Đ”Đ»ŃŒĐœŃ‹ĐŒ, Đż //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial002_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial002_an_py39.py!} ``` //// @@ -185,7 +185,7 @@ Path-ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€ ĐČсДгЎа яĐČĐ»ŃĐ”Ń‚ŃŃ ĐŸĐ±ŃĐ·Đ°Ń‚Đ”Đ»ŃŒĐœŃ‹ĐŒ, Đż //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/path_params_numeric_validations/tutorial002_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial002_an.py!} ``` //// @@ -214,7 +214,7 @@ Path-ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€ ĐČсДгЎа яĐČĐ»ŃĐ”Ń‚ŃŃ ĐŸĐ±ŃĐ·Đ°Ń‚Đ”Đ»ŃŒĐœŃ‹ĐŒ, Đż Python ĐœĐ” Đ±ŃƒĐŽĐ”Ń‚ ĐœĐžŃ‡Đ”ĐłĐŸ ĐŽĐ”Đ»Đ°Ń‚ŃŒ с `*`, ĐœĐŸ ĐŸĐœ Đ±ŃƒĐŽĐ”Ń‚ Đ·ĐœĐ°Ń‚ŃŒ, Ń‡Ń‚ĐŸ ĐČсД ŃĐ»Đ”ĐŽŃƒŃŽŃ‰ĐžĐ” ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€Ń‹ яĐČĐ»ŃŃŽŃ‚ŃŃ ĐžĐŒĐ”ĐœĐŸĐČĐ°ĐœĐœŃ‹ĐŒĐž Đ°Ń€ĐłŃƒĐŒĐ”ĐœŃ‚Đ°ĐŒĐž (ĐżĐ°Ń€Đ°ĐŒĐž Đșлюч-Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐ”), таĐșжД ОзĐČĐ”ŃŃ‚ĐœŃ‹ĐŒĐž ĐșаĐș kwargs, ЎажД ДслО у ĐœĐžŃ… ĐœĐ”Ń‚ Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐč ĐżĐŸ ŃƒĐŒĐŸĐ»Ń‡Đ°ĐœĐžŃŽ. ```Python hl_lines="7" -{!../../../docs_src/path_params_numeric_validations/tutorial003.py!} +{!../../docs_src/path_params_numeric_validations/tutorial003.py!} ``` ### Đ›ŃƒŃ‡ŃˆĐ” с `Annotated` @@ -224,7 +224,7 @@ Python ĐœĐ” Đ±ŃƒĐŽĐ”Ń‚ ĐœĐžŃ‡Đ”ĐłĐŸ ĐŽĐ”Đ»Đ°Ń‚ŃŒ с `*`, ĐœĐŸ ĐŸĐœ Đ±ŃƒĐŽĐ”Ń‚ Đ· //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial003_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial003_an_py39.py!} ``` //// @@ -232,7 +232,7 @@ Python ĐœĐ” Đ±ŃƒĐŽĐ”Ń‚ ĐœĐžŃ‡Đ”ĐłĐŸ ĐŽĐ”Đ»Đ°Ń‚ŃŒ с `*`, ĐœĐŸ ĐŸĐœ Đ±ŃƒĐŽĐ”Ń‚ Đ· //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/path_params_numeric_validations/tutorial003_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial003_an.py!} ``` //// @@ -246,7 +246,7 @@ Python ĐœĐ” Đ±ŃƒĐŽĐ”Ń‚ ĐœĐžŃ‡Đ”ĐłĐŸ ĐŽĐ”Đ»Đ°Ń‚ŃŒ с `*`, ĐœĐŸ ĐŸĐœ Đ±ŃƒĐŽĐ”Ń‚ Đ· //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial004_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial004_an_py39.py!} ``` //// @@ -254,7 +254,7 @@ Python ĐœĐ” Đ±ŃƒĐŽĐ”Ń‚ ĐœĐžŃ‡Đ”ĐłĐŸ ĐŽĐ”Đ»Đ°Ń‚ŃŒ с `*`, ĐœĐŸ ĐŸĐœ Đ±ŃƒĐŽĐ”Ń‚ Đ· //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/path_params_numeric_validations/tutorial004_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial004_an.py!} ``` //// @@ -268,7 +268,7 @@ Python ĐœĐ” Đ±ŃƒĐŽĐ”Ń‚ ĐœĐžŃ‡Đ”ĐłĐŸ ĐŽĐ”Đ»Đ°Ń‚ŃŒ с `*`, ĐœĐŸ ĐŸĐœ Đ±ŃƒĐŽĐ”Ń‚ Đ· /// ```Python hl_lines="8" -{!> ../../../docs_src/path_params_numeric_validations/tutorial004.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial004.py!} ``` //// @@ -283,7 +283,7 @@ Python ĐœĐ” Đ±ŃƒĐŽĐ”Ń‚ ĐœĐžŃ‡Đ”ĐłĐŸ ĐŽĐ”Đ»Đ°Ń‚ŃŒ с `*`, ĐœĐŸ ĐŸĐœ Đ±ŃƒĐŽĐ”Ń‚ Đ· //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/path_params_numeric_validations/tutorial005_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial005_an_py39.py!} ``` //// @@ -291,7 +291,7 @@ Python ĐœĐ” Đ±ŃƒĐŽĐ”Ń‚ ĐœĐžŃ‡Đ”ĐłĐŸ ĐŽĐ”Đ»Đ°Ń‚ŃŒ с `*`, ĐœĐŸ ĐŸĐœ Đ±ŃƒĐŽĐ”Ń‚ Đ· //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/path_params_numeric_validations/tutorial005_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial005_an.py!} ``` //// @@ -305,7 +305,7 @@ Python ĐœĐ” Đ±ŃƒĐŽĐ”Ń‚ ĐœĐžŃ‡Đ”ĐłĐŸ ĐŽĐ”Đ»Đ°Ń‚ŃŒ с `*`, ĐœĐŸ ĐŸĐœ Đ±ŃƒĐŽĐ”Ń‚ Đ· /// ```Python hl_lines="9" -{!> ../../../docs_src/path_params_numeric_validations/tutorial005.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial005.py!} ``` //// @@ -323,7 +323,7 @@ Python ĐœĐ” Đ±ŃƒĐŽĐ”Ń‚ ĐœĐžŃ‡Đ”ĐłĐŸ ĐŽĐ”Đ»Đ°Ń‚ŃŒ с `*`, ĐœĐŸ ĐŸĐœ Đ±ŃƒĐŽĐ”Ń‚ Đ· //// tab | Python 3.9+ ```Python hl_lines="13" -{!> ../../../docs_src/path_params_numeric_validations/tutorial006_an_py39.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial006_an_py39.py!} ``` //// @@ -331,7 +331,7 @@ Python ĐœĐ” Đ±ŃƒĐŽĐ”Ń‚ ĐœĐžŃ‡Đ”ĐłĐŸ ĐŽĐ”Đ»Đ°Ń‚ŃŒ с `*`, ĐœĐŸ ĐŸĐœ Đ±ŃƒĐŽĐ”Ń‚ Đ· //// tab | Python 3.8+ ```Python hl_lines="12" -{!> ../../../docs_src/path_params_numeric_validations/tutorial006_an.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial006_an.py!} ``` //// @@ -345,7 +345,7 @@ Python ĐœĐ” Đ±ŃƒĐŽĐ”Ń‚ ĐœĐžŃ‡Đ”ĐłĐŸ ĐŽĐ”Đ»Đ°Ń‚ŃŒ с `*`, ĐœĐŸ ĐŸĐœ Đ±ŃƒĐŽĐ”Ń‚ Đ· /// ```Python hl_lines="11" -{!> ../../../docs_src/path_params_numeric_validations/tutorial006.py!} +{!> ../../docs_src/path_params_numeric_validations/tutorial006.py!} ``` //// diff --git a/docs/ru/docs/tutorial/path-params.md b/docs/ru/docs/tutorial/path-params.md index dc3d64af4..d1d76cf7b 100644 --- a/docs/ru/docs/tutorial/path-params.md +++ b/docs/ru/docs/tutorial/path-params.md @@ -3,7 +3,7 @@ Вы ĐŒĐŸĐ¶Đ”Ń‚Đ” ĐŸĐżŃ€Đ”ĐŽĐ”Đ»ĐžŃ‚ŃŒ "ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€Ń‹" ОлО "ĐżĐ”Ń€Đ”ĐŒĐ”ĐœĐœŃ‹Đ”" путо, ĐžŃĐżĐŸĐ»ŃŒĐ·ŃƒŃ ŃĐžĐœŃ‚Đ°ĐșсОс Ń„ĐŸŃ€ĐŒĐ°Ń‚ĐžŃ€ĐŸĐČĐ°ĐœĐœŃ‹Ń… ŃŃ‚Ń€ĐŸĐș Python: ```Python hl_lines="6-7" -{!../../../docs_src/path_params/tutorial001.py!} +{!../../docs_src/path_params/tutorial001.py!} ``` Đ—ĐœĐ°Ń‡Đ”ĐœĐžĐ” ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€Đ° путо `item_id` Đ±ŃƒĐŽĐ”Ń‚ ĐżĐ”Ń€Đ”ĐŽĐ°ĐœĐŸ ĐČ Ń„ŃƒĐœĐșцою ĐČ ĐșачДстĐČĐ” Đ°Ń€ĐłŃƒĐŒĐ”ĐœŃ‚Đ° `item_id`. @@ -19,7 +19,7 @@ Вы ĐŒĐŸĐ¶Đ”Ń‚Đ” ĐŸĐ±ŃŠŃĐČоть топ ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€Đ° путо ĐČ Ń„ŃƒĐœĐșцоо, ĐžŃĐżĐŸĐ»ŃŒĐ·ŃƒŃ ŃŃ‚Đ°ĐœĐŽĐ°Ń€Ń‚ĐœŃ‹Đ” Đ°ĐœĐœĐŸŃ‚Đ°Ń†ĐžĐž Ń‚ĐžĐżĐŸĐČ Python. ```Python hl_lines="7" -{!../../../docs_src/path_params/tutorial002.py!} +{!../../docs_src/path_params/tutorial002.py!} ``` Đ—ĐŽĐ”ŃŃŒ, `item_id` ĐŸĐ±ŃŠŃĐČĐ»Đ”Đœ Ń‚ĐžĐżĐŸĐŒ `int`. @@ -123,7 +123,7 @@ ```Python hl_lines="6 11" -{!../../../docs_src/path_params/tutorial003.py!} +{!../../docs_src/path_params/tutorial003.py!} ``` Đ˜ĐœĐ°Ń‡Đ” путь ĐŽĐ»Ń `/users/{user_id}` таĐșжД Đ±ŃƒĐŽĐ”Ń‚ ŃĐŸĐŸŃ‚ĐČДтстĐČĐŸĐČать `/users/me`, "ĐżĐŸĐŽŃ€Đ°Đ·ŃƒĐŒĐ”ĐČая", Ń‡Ń‚ĐŸ ĐŸĐœ ĐżĐŸĐ»ŃƒŃ‡Đ°Đ”Ń‚ ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€ `user_id` ŃĐŸ Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐ”ĐŒ `"me"`. @@ -131,7 +131,7 @@ ĐĐœĐ°Đ»ĐŸĐłĐžŃ‡ĐœĐŸ, ĐČы ĐœĐ” ĐŒĐŸĐ¶Đ”Ń‚Đ” ĐżĐ”Ń€Đ”ĐŸĐżŃ€Đ”ĐŽĐ”Đ»ĐžŃ‚ŃŒ ĐŸĐżĐ”Ń€Đ°Ń†ĐžŃŽ с ĐżŃƒŃ‚Đ”ĐŒ: ```Python hl_lines="6 11" -{!../../../docs_src/path_params/tutorial003b.py!} +{!../../docs_src/path_params/tutorial003b.py!} ``` ĐŸĐ”Ń€ĐČыĐč Đ±ŃƒĐŽĐ”Ń‚ ĐČŃ‹ĐżĐŸĐ»ĐœŃŃ‚ŃŒŃŃ ĐČсДгЎа, таĐș ĐșаĐș путь ŃĐŸĐČпаЎаДт пДрĐČŃ‹ĐŒ. @@ -149,7 +149,7 @@ Đ—Đ°Ń‚Đ”ĐŒ ŃĐŸĐ·ĐŽĐ°ĐčтД Đ°Ń‚Ń€ĐžĐ±ŃƒŃ‚Ń‹ Đșласса с фоĐșŃĐžŃ€ĐŸĐČĐ°ĐœĐœŃ‹ĐŒĐž ĐŽĐŸĐżŃƒŃŃ‚ĐžĐŒŃ‹ĐŒĐž Đ·ĐœĐ°Ń‡Đ”ĐœĐžŃĐŒĐž: ```Python hl_lines="1 6-9" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` /// info | "Đ”ĐŸĐżĐŸĐ»ĐœĐžŃ‚Đ”Đ»ŃŒĐœĐ°Ń ĐžĐœŃ„ĐŸŃ€ĐŒĐ°Ń†ĐžŃ" @@ -169,7 +169,7 @@ ОпрДЎДлОтД *ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€ путо*, ĐžŃĐżĐŸĐ»ŃŒĐ·ŃƒŃ ĐČ Đ°ĐœĐœĐŸŃ‚Đ°Ń†ĐžĐž топа Đșласс ĐżĐ”Ń€Đ”Ń‡ĐžŃĐ»Đ”ĐœĐžŃ (`ModelName`), ŃĐŸĐ·ĐŽĐ°ĐœĐœŃ‹Đč Ń€Đ°ĐœĐ”Đ”: ```Python hl_lines="16" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` ### ĐŸŃ€ĐŸĐČĐ”Ń€ŃŒŃ‚Đ” ĐŽĐŸĐșŃƒĐŒĐ”ĐœŃ‚Đ°Ń†ĐžŃŽ @@ -187,7 +187,7 @@ Вы ĐŒĐŸĐ¶Đ”Ń‚Đ” сраĐČĐœĐžŃ‚ŃŒ ŃŃ‚ĐŸ Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐ” с *ŃĐ»Đ”ĐŒĐ”ĐœŃ‚ĐŸĐŒ ĐżĐ”Ń€Đ”Ń‡ĐžŃĐ»Đ”ĐœĐžŃ* Đșласса `ModelName`: ```Python hl_lines="17" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` #### ĐŸĐŸĐ»ŃƒŃ‡Đ”ĐœĐžĐ” *Đ·ĐœĐ°Ń‡Đ”ĐœĐžŃ ĐżĐ”Ń€Đ”Ń‡ĐžŃĐ»Đ”ĐœĐžŃ* @@ -195,7 +195,7 @@ ĐœĐŸĐ¶ĐœĐŸ ĐżĐŸĐ»ŃƒŃ‡ĐžŃ‚ŃŒ фаĐșтОчДсĐșĐŸĐ” Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐ” (ĐČ ĐŽĐ°ĐœĐœĐŸĐŒ ŃĐ»ŃƒŃ‡Đ°Đ” - `str`) с ĐżĐŸĐŒĐŸŃ‰ŃŒŃŽ `model_name.value` ОлО ĐČ ĐŸĐ±Ń‰Đ”ĐŒ ŃĐ»ŃƒŃ‡Đ°Đ” `your_enum_member.value`: ```Python hl_lines="20" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` /// tip | "ĐŸĐŸĐŽŃĐșазĐșа" @@ -211,7 +211,7 @@ ĐžĐœĐž Đ±ŃƒĐŽŃƒŃ‚ ĐżŃ€Đ”ĐŸĐ±Ń€Đ°Đ·ĐŸĐČĐ°ĐœŃ‹ ĐČ ŃĐŸĐŸŃ‚ĐČДтстĐČŃƒŃŽŃ‰ĐžĐ” Đ·ĐœĐ°Ń‡Đ”ĐœĐžŃ (ĐČ ĐŽĐ°ĐœĐœĐŸĐŒ ŃĐ»ŃƒŃ‡Đ°Đ” - ŃŃ‚Ń€ĐŸĐșĐž) пДрДЎ ох ĐČĐŸĐ·ĐČŃ€Đ°Ń‚ĐŸĐŒ ĐșĐ»ĐžĐ”ĐœŃ‚Ńƒ: ```Python hl_lines="18 21 23" -{!../../../docs_src/path_params/tutorial005.py!} +{!../../docs_src/path_params/tutorial005.py!} ``` Вы ĐŸŃ‚ĐżŃ€Đ°ĐČОтД ĐșĐ»ĐžĐ”ĐœŃ‚Ńƒ таĐșĐŸĐč JSON-ĐŸŃ‚ĐČДт: @@ -251,7 +251,7 @@ OpenAPI ĐœĐ” ĐżĐŸĐŽĐŽĐ”Ń€Đ¶ĐžĐČаДт ŃĐżĐŸŃĐŸĐ±ĐŸĐČ ĐŸĐ±ŃŠŃĐČĐ»Đ”ĐœĐžŃ *Đż ĐœĐŸĐ¶Đ”Ń‚Đ” ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать таĐș: ```Python hl_lines="6" -{!../../../docs_src/path_params/tutorial004.py!} +{!../../docs_src/path_params/tutorial004.py!} ``` /// tip | "ĐŸĐŸĐŽŃĐșазĐșа" diff --git a/docs/ru/docs/tutorial/query-params-str-validations.md b/docs/ru/docs/tutorial/query-params-str-validations.md index e6653a837..0054af6ed 100644 --- a/docs/ru/docs/tutorial/query-params-str-validations.md +++ b/docs/ru/docs/tutorial/query-params-str-validations.md @@ -7,7 +7,7 @@ //// tab | Python 3.10+ ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial001_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial001_py310.py!} ``` //// @@ -15,7 +15,7 @@ //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial001.py!} +{!> ../../docs_src/query_params_str_validations/tutorial001.py!} ``` //// @@ -46,7 +46,7 @@ FastAPI ĐŸĐżŃ€Đ”ĐŽĐ”Đ»ĐžŃ‚ ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€ `q` ĐșаĐș ĐœĐ”ĐŸĐ±ŃĐ·Đ°Ń‚Đ”Đ»ŃŒĐœ В Python 3.9 ОлО ĐČŃ‹ŃˆĐ”, `Annotated` яĐČĐ»ŃĐ”Ń‚ŃŃ частью ŃŃ‚Đ°ĐœĐŽĐ°Ń€Ń‚ĐœĐŸĐč Đ±ĐžĐ±Đ»ĐžĐŸŃ‚Đ”ĐșĐž, таĐșĐžĐŒ ĐŸĐ±Ń€Đ°Đ·ĐŸĐŒ ĐČы ĐŒĐŸĐ¶Đ”Ń‚Đ” ĐžĐŒĐżĐŸŃ€Ń‚ĐžŃ€ĐŸĐČать Đ”ĐłĐŸ Оз `typing`. ```Python hl_lines="1 3" -{!> ../../../docs_src/query_params_str_validations/tutorial002_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial002_an_py310.py!} ``` //// @@ -58,7 +58,7 @@ FastAPI ĐŸĐżŃ€Đ”ĐŽĐ”Đ»ĐžŃ‚ ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€ `q` ĐșаĐș ĐœĐ”ĐŸĐ±ŃĐ·Đ°Ń‚Đ”Đ»ŃŒĐœ Эта Đ±ĐžĐ±Đ»ĐžĐŸŃ‚Đ”Đșа Đ±ŃƒĐŽĐ”Ń‚ ŃƒŃŃ‚Đ°ĐœĐŸĐČĐ»Đ”ĐœĐ° ĐČĐŒĐ”ŃŃ‚Đ” с FastAPI. ```Python hl_lines="3-4" -{!> ../../../docs_src/query_params_str_validations/tutorial002_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial002_an.py!} ``` //// @@ -116,7 +116,7 @@ q: Annotated[Union[str, None]] = None //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial002_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial002_an_py310.py!} ``` //// @@ -124,7 +124,7 @@ q: Annotated[Union[str, None]] = None //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial002_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial002_an.py!} ``` //// @@ -154,7 +154,7 @@ q: Annotated[Union[str, None]] = None //// tab | Python 3.10+ ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial002_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial002_py310.py!} ``` //// @@ -162,7 +162,7 @@ q: Annotated[Union[str, None]] = None //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial002.py!} +{!> ../../docs_src/query_params_str_validations/tutorial002.py!} ``` //// @@ -268,7 +268,7 @@ q: str = Query(default="rick") //// tab | Python 3.10+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial003_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial003_an_py310.py!} ``` //// @@ -276,7 +276,7 @@ q: str = Query(default="rick") //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial003_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial003_an_py39.py!} ``` //// @@ -284,7 +284,7 @@ q: str = Query(default="rick") //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/query_params_str_validations/tutorial003_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial003_an.py!} ``` //// @@ -298,7 +298,7 @@ q: str = Query(default="rick") /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial003_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial003_py310.py!} ``` //// @@ -312,7 +312,7 @@ q: str = Query(default="rick") /// ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial003.py!} +{!> ../../docs_src/query_params_str_validations/tutorial003.py!} ``` //// @@ -324,7 +324,7 @@ q: str = Query(default="rick") //// tab | Python 3.10+ ```Python hl_lines="11" -{!> ../../../docs_src/query_params_str_validations/tutorial004_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial004_an_py310.py!} ``` //// @@ -332,7 +332,7 @@ q: str = Query(default="rick") //// tab | Python 3.9+ ```Python hl_lines="11" -{!> ../../../docs_src/query_params_str_validations/tutorial004_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial004_an_py39.py!} ``` //// @@ -340,7 +340,7 @@ q: str = Query(default="rick") //// tab | Python 3.8+ ```Python hl_lines="12" -{!> ../../../docs_src/query_params_str_validations/tutorial004_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial004_an.py!} ``` //// @@ -354,7 +354,7 @@ q: str = Query(default="rick") /// ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial004_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial004_py310.py!} ``` //// @@ -368,7 +368,7 @@ q: str = Query(default="rick") /// ```Python hl_lines="11" -{!> ../../../docs_src/query_params_str_validations/tutorial004.py!} +{!> ../../docs_src/query_params_str_validations/tutorial004.py!} ``` //// @@ -392,7 +392,7 @@ q: str = Query(default="rick") //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial005_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial005_an_py39.py!} ``` //// @@ -400,7 +400,7 @@ q: str = Query(default="rick") //// tab | Python 3.8+ ```Python hl_lines="8" -{!> ../../../docs_src/query_params_str_validations/tutorial005_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial005_an.py!} ``` //// @@ -414,7 +414,7 @@ q: str = Query(default="rick") /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial005.py!} +{!> ../../docs_src/query_params_str_validations/tutorial005.py!} ``` //// @@ -462,7 +462,7 @@ q: Union[str, None] = Query(default=None, min_length=3) //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial006_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006_an_py39.py!} ``` //// @@ -470,7 +470,7 @@ q: Union[str, None] = Query(default=None, min_length=3) //// tab | Python 3.8+ ```Python hl_lines="8" -{!> ../../../docs_src/query_params_str_validations/tutorial006_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006_an.py!} ``` //// @@ -484,7 +484,7 @@ q: Union[str, None] = Query(default=None, min_length=3) /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial006.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006.py!} ``` /// tip | "ĐŸĐŸĐŽŃĐșазĐșа" @@ -504,7 +504,7 @@ q: Union[str, None] = Query(default=None, min_length=3) //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial006b_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006b_an_py39.py!} ``` //// @@ -512,7 +512,7 @@ q: Union[str, None] = Query(default=None, min_length=3) //// tab | Python 3.8+ ```Python hl_lines="8" -{!> ../../../docs_src/query_params_str_validations/tutorial006b_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006b_an.py!} ``` //// @@ -526,7 +526,7 @@ q: Union[str, None] = Query(default=None, min_length=3) /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial006b.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006b.py!} ``` //// @@ -550,7 +550,7 @@ q: Union[str, None] = Query(default=None, min_length=3) //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial006c_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006c_an_py310.py!} ``` //// @@ -558,7 +558,7 @@ q: Union[str, None] = Query(default=None, min_length=3) //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial006c_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006c_an_py39.py!} ``` //// @@ -566,7 +566,7 @@ q: Union[str, None] = Query(default=None, min_length=3) //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial006c_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006c_an.py!} ``` //// @@ -580,7 +580,7 @@ q: Union[str, None] = Query(default=None, min_length=3) /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial006c_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006c_py310.py!} ``` //// @@ -594,7 +594,7 @@ q: Union[str, None] = Query(default=None, min_length=3) /// ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial006c.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006c.py!} ``` //// @@ -612,7 +612,7 @@ Pydantic, ĐŒĐŸŃ‰ŃŒ ĐșĐŸŃ‚ĐŸŃ€ĐŸĐłĐŸ ĐžŃĐżĐŸĐ»ŃŒĐ·ŃƒĐ”Ń‚ŃŃ ĐČ FastAPI ĐŽĐ»Ń //// tab | Python 3.9+ ```Python hl_lines="4 10" -{!> ../../../docs_src/query_params_str_validations/tutorial006d_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006d_an_py39.py!} ``` //// @@ -620,7 +620,7 @@ Pydantic, ĐŒĐŸŃ‰ŃŒ ĐșĐŸŃ‚ĐŸŃ€ĐŸĐłĐŸ ĐžŃĐżĐŸĐ»ŃŒĐ·ŃƒĐ”Ń‚ŃŃ ĐČ FastAPI ĐŽĐ»Ń //// tab | Python 3.8+ ```Python hl_lines="2 9" -{!> ../../../docs_src/query_params_str_validations/tutorial006d_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006d_an.py!} ``` //// @@ -634,7 +634,7 @@ Pydantic, ĐŒĐŸŃ‰ŃŒ ĐșĐŸŃ‚ĐŸŃ€ĐŸĐłĐŸ ĐžŃĐżĐŸĐ»ŃŒĐ·ŃƒĐ”Ń‚ŃŃ ĐČ FastAPI ĐŽĐ»Ń /// ```Python hl_lines="2 8" -{!> ../../../docs_src/query_params_str_validations/tutorial006d.py!} +{!> ../../docs_src/query_params_str_validations/tutorial006d.py!} ``` //// @@ -654,7 +654,7 @@ Pydantic, ĐŒĐŸŃ‰ŃŒ ĐșĐŸŃ‚ĐŸŃ€ĐŸĐłĐŸ ĐžŃĐżĐŸĐ»ŃŒĐ·ŃƒĐ”Ń‚ŃŃ ĐČ FastAPI ĐŽĐ»Ń //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial011_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial011_an_py310.py!} ``` //// @@ -662,7 +662,7 @@ Pydantic, ĐŒĐŸŃ‰ŃŒ ĐșĐŸŃ‚ĐŸŃ€ĐŸĐłĐŸ ĐžŃĐżĐŸĐ»ŃŒĐ·ŃƒĐ”Ń‚ŃŃ ĐČ FastAPI ĐŽĐ»Ń //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial011_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial011_an_py39.py!} ``` //// @@ -670,7 +670,7 @@ Pydantic, ĐŒĐŸŃ‰ŃŒ ĐșĐŸŃ‚ĐŸŃ€ĐŸĐłĐŸ ĐžŃĐżĐŸĐ»ŃŒĐ·ŃƒĐ”Ń‚ŃŃ ĐČ FastAPI ĐŽĐ»Ń //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial011_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial011_an.py!} ``` //// @@ -684,7 +684,7 @@ Pydantic, ĐŒĐŸŃ‰ŃŒ ĐșĐŸŃ‚ĐŸŃ€ĐŸĐłĐŸ ĐžŃĐżĐŸĐ»ŃŒĐ·ŃƒĐ”Ń‚ŃŃ ĐČ FastAPI ĐŽĐ»Ń /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial011_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial011_py310.py!} ``` //// @@ -698,7 +698,7 @@ Pydantic, ĐŒĐŸŃ‰ŃŒ ĐșĐŸŃ‚ĐŸŃ€ĐŸĐłĐŸ ĐžŃĐżĐŸĐ»ŃŒĐ·ŃƒĐ”Ń‚ŃŃ ĐČ FastAPI ĐŽĐ»Ń /// ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial011_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial011_py39.py!} ``` //// @@ -712,7 +712,7 @@ Pydantic, ĐŒĐŸŃ‰ŃŒ ĐșĐŸŃ‚ĐŸŃ€ĐŸĐłĐŸ ĐžŃĐżĐŸĐ»ŃŒĐ·ŃƒĐ”Ń‚ŃŃ ĐČ FastAPI ĐŽĐ»Ń /// ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial011.py!} +{!> ../../docs_src/query_params_str_validations/tutorial011.py!} ``` //// @@ -753,7 +753,7 @@ http://localhost:8000/items/?q=foo&q=bar //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial012_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial012_an_py39.py!} ``` //// @@ -761,7 +761,7 @@ http://localhost:8000/items/?q=foo&q=bar //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial012_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial012_an.py!} ``` //// @@ -775,7 +775,7 @@ http://localhost:8000/items/?q=foo&q=bar /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial012_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial012_py39.py!} ``` //// @@ -789,7 +789,7 @@ http://localhost:8000/items/?q=foo&q=bar /// ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial012.py!} +{!> ../../docs_src/query_params_str_validations/tutorial012.py!} ``` //// @@ -818,7 +818,7 @@ http://localhost:8000/items/ //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial013_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial013_an_py39.py!} ``` //// @@ -826,7 +826,7 @@ http://localhost:8000/items/ //// tab | Python 3.8+ ```Python hl_lines="8" -{!> ../../../docs_src/query_params_str_validations/tutorial013_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial013_an.py!} ``` //// @@ -840,7 +840,7 @@ http://localhost:8000/items/ /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial013.py!} +{!> ../../docs_src/query_params_str_validations/tutorial013.py!} ``` //// @@ -872,7 +872,7 @@ http://localhost:8000/items/ //// tab | Python 3.10+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial007_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial007_an_py310.py!} ``` //// @@ -880,7 +880,7 @@ http://localhost:8000/items/ //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial007_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial007_an_py39.py!} ``` //// @@ -888,7 +888,7 @@ http://localhost:8000/items/ //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/query_params_str_validations/tutorial007_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial007_an.py!} ``` //// @@ -902,7 +902,7 @@ http://localhost:8000/items/ /// ```Python hl_lines="8" -{!> ../../../docs_src/query_params_str_validations/tutorial007_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial007_py310.py!} ``` //// @@ -916,7 +916,7 @@ http://localhost:8000/items/ /// ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial007.py!} +{!> ../../docs_src/query_params_str_validations/tutorial007.py!} ``` //// @@ -926,7 +926,7 @@ http://localhost:8000/items/ //// tab | Python 3.10+ ```Python hl_lines="14" -{!> ../../../docs_src/query_params_str_validations/tutorial008_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial008_an_py310.py!} ``` //// @@ -934,7 +934,7 @@ http://localhost:8000/items/ //// tab | Python 3.9+ ```Python hl_lines="14" -{!> ../../../docs_src/query_params_str_validations/tutorial008_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial008_an_py39.py!} ``` //// @@ -942,7 +942,7 @@ http://localhost:8000/items/ //// tab | Python 3.8+ ```Python hl_lines="15" -{!> ../../../docs_src/query_params_str_validations/tutorial008_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial008_an.py!} ``` //// @@ -956,7 +956,7 @@ http://localhost:8000/items/ /// ```Python hl_lines="11" -{!> ../../../docs_src/query_params_str_validations/tutorial008_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial008_py310.py!} ``` //// @@ -970,7 +970,7 @@ http://localhost:8000/items/ /// ```Python hl_lines="13" -{!> ../../../docs_src/query_params_str_validations/tutorial008.py!} +{!> ../../docs_src/query_params_str_validations/tutorial008.py!} ``` //// @@ -996,7 +996,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial009_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial009_an_py310.py!} ``` //// @@ -1004,7 +1004,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial009_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial009_an_py39.py!} ``` //// @@ -1012,7 +1012,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial009_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial009_an.py!} ``` //// @@ -1026,7 +1026,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems /// ```Python hl_lines="7" -{!> ../../../docs_src/query_params_str_validations/tutorial009_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial009_py310.py!} ``` //// @@ -1040,7 +1040,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems /// ```Python hl_lines="9" -{!> ../../../docs_src/query_params_str_validations/tutorial009.py!} +{!> ../../docs_src/query_params_str_validations/tutorial009.py!} ``` //// @@ -1056,7 +1056,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems //// tab | Python 3.10+ ```Python hl_lines="19" -{!> ../../../docs_src/query_params_str_validations/tutorial010_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial010_an_py310.py!} ``` //// @@ -1064,7 +1064,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems //// tab | Python 3.9+ ```Python hl_lines="19" -{!> ../../../docs_src/query_params_str_validations/tutorial010_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial010_an_py39.py!} ``` //// @@ -1072,7 +1072,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems //// tab | Python 3.8+ ```Python hl_lines="20" -{!> ../../../docs_src/query_params_str_validations/tutorial010_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial010_an.py!} ``` //// @@ -1086,7 +1086,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems /// ```Python hl_lines="16" -{!> ../../../docs_src/query_params_str_validations/tutorial010_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial010_py310.py!} ``` //// @@ -1100,7 +1100,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems /// ```Python hl_lines="18" -{!> ../../../docs_src/query_params_str_validations/tutorial010.py!} +{!> ../../docs_src/query_params_str_validations/tutorial010.py!} ``` //// @@ -1116,7 +1116,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems //// tab | Python 3.10+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial014_an_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial014_an_py310.py!} ``` //// @@ -1124,7 +1124,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems //// tab | Python 3.9+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial014_an_py39.py!} +{!> ../../docs_src/query_params_str_validations/tutorial014_an_py39.py!} ``` //// @@ -1132,7 +1132,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/query_params_str_validations/tutorial014_an.py!} +{!> ../../docs_src/query_params_str_validations/tutorial014_an.py!} ``` //// @@ -1146,7 +1146,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems /// ```Python hl_lines="8" -{!> ../../../docs_src/query_params_str_validations/tutorial014_py310.py!} +{!> ../../docs_src/query_params_str_validations/tutorial014_py310.py!} ``` //// @@ -1160,7 +1160,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems /// ```Python hl_lines="10" -{!> ../../../docs_src/query_params_str_validations/tutorial014.py!} +{!> ../../docs_src/query_params_str_validations/tutorial014.py!} ``` //// diff --git a/docs/ru/docs/tutorial/query-params.md b/docs/ru/docs/tutorial/query-params.md index 061f9be04..edf06746b 100644 --- a/docs/ru/docs/tutorial/query-params.md +++ b/docs/ru/docs/tutorial/query-params.md @@ -3,7 +3,7 @@ ĐšĐŸĐłĐŽĐ° ĐČы ĐŸĐ±ŃŠŃĐČĐ»ŃĐ”Ń‚Đ” ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€Ń‹ Ń„ŃƒĐœĐșцоо, ĐșĐŸŃ‚ĐŸŃ€Ń‹Đ” ĐœĐ” яĐČĐ»ŃŃŽŃ‚ŃŃ ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€Đ°ĐŒĐž путо, ĐŸĐœĐž аĐČŃ‚ĐŸĐŒĐ°Ń‚ĐžŃ‡Đ”ŃĐșĐž ĐžĐœŃ‚Đ”Ń€ĐżŃ€Đ”Ń‚ĐžŃ€ŃƒŃŽŃ‚ŃŃ ĐșаĐș "query"-ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€Ń‹. ```Python hl_lines="9" -{!../../../docs_src/query_params/tutorial001.py!} +{!../../docs_src/query_params/tutorial001.py!} ``` Query-ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€Ń‹ прДЎстаĐČĐ»ŃŃŽŃ‚ Оз ŃĐ”Đ±Ń ĐœĐ°Đ±ĐŸŃ€ пар Đșлюч-Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐ”, ĐșĐŸŃ‚ĐŸŃ€Ń‹Đ” оЮут ĐżĐŸŃĐ»Đ” Đ·ĐœĐ°Đșа `?` ĐČ URL-аЎрДсД, Ń€Đ°Đ·ĐŽĐ”Đ»Đ”ĐœĐœŃ‹Đ” ŃĐžĐŒĐČĐŸĐ»Đ°ĐŒĐž `&`. @@ -66,7 +66,7 @@ http://127.0.0.1:8000/items/?skip=20 //// tab | Python 3.10+ ```Python hl_lines="7" -{!> ../../../docs_src/query_params/tutorial002_py310.py!} +{!> ../../docs_src/query_params/tutorial002_py310.py!} ``` //// @@ -74,7 +74,7 @@ http://127.0.0.1:8000/items/?skip=20 //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params/tutorial002.py!} +{!> ../../docs_src/query_params/tutorial002.py!} ``` //// @@ -94,7 +94,7 @@ http://127.0.0.1:8000/items/?skip=20 //// tab | Python 3.10+ ```Python hl_lines="7" -{!> ../../../docs_src/query_params/tutorial003_py310.py!} +{!> ../../docs_src/query_params/tutorial003_py310.py!} ``` //// @@ -102,7 +102,7 @@ http://127.0.0.1:8000/items/?skip=20 //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params/tutorial003.py!} +{!> ../../docs_src/query_params/tutorial003.py!} ``` //// @@ -151,7 +151,7 @@ http://127.0.0.1:8000/items/foo?short=yes //// tab | Python 3.10+ ```Python hl_lines="6 8" -{!> ../../../docs_src/query_params/tutorial004_py310.py!} +{!> ../../docs_src/query_params/tutorial004_py310.py!} ``` //// @@ -159,7 +159,7 @@ http://127.0.0.1:8000/items/foo?short=yes //// tab | Python 3.8+ ```Python hl_lines="8 10" -{!> ../../../docs_src/query_params/tutorial004.py!} +{!> ../../docs_src/query_params/tutorial004.py!} ``` //// @@ -173,7 +173,7 @@ http://127.0.0.1:8000/items/foo?short=yes ĐĐŸ ДслО ĐČы Ń…ĐŸŃ‚ĐžŃ‚Đ” ŃĐŽĐ”Đ»Đ°Ń‚ŃŒ query-ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€ ĐŸĐ±ŃĐ·Đ°Ń‚Đ”Đ»ŃŒĐœŃ‹ĐŒ, ĐČы ĐŒĐŸĐ¶Đ”Ń‚Đ” ĐżŃ€ĐŸŃŃ‚ĐŸ ĐœĐ” уĐșазыĐČать Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐ” ĐżĐŸ ŃƒĐŒĐŸĐ»Ń‡Đ°ĐœĐžŃŽ: ```Python hl_lines="6-7" -{!../../../docs_src/query_params/tutorial005.py!} +{!../../docs_src/query_params/tutorial005.py!} ``` Đ—ĐŽĐ”ŃŃŒ ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€ Đ·Đ°ĐżŃ€ĐŸŃĐ° `needy` яĐČĐ»ŃĐ”Ń‚ŃŃ ĐŸĐ±ŃĐ·Đ°Ń‚Đ”Đ»ŃŒĐœŃ‹ĐŒ ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€ĐŸĐŒ с Ń‚ĐžĐżĐŸĐŒ ĐŽĐ°ĐœĐœŃ‹Ń… `str`. @@ -221,7 +221,7 @@ http://127.0.0.1:8000/items/foo-item?needy=sooooneedy //// tab | Python 3.10+ ```Python hl_lines="8" -{!> ../../../docs_src/query_params/tutorial006_py310.py!} +{!> ../../docs_src/query_params/tutorial006_py310.py!} ``` //// @@ -229,7 +229,7 @@ http://127.0.0.1:8000/items/foo-item?needy=sooooneedy //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params/tutorial006.py!} +{!> ../../docs_src/query_params/tutorial006.py!} ``` //// diff --git a/docs/ru/docs/tutorial/request-files.md b/docs/ru/docs/tutorial/request-files.md index 1fbc4acc0..34b9c94fa 100644 --- a/docs/ru/docs/tutorial/request-files.md +++ b/docs/ru/docs/tutorial/request-files.md @@ -19,7 +19,7 @@ //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/request_files/tutorial001_an_py39.py!} +{!> ../../docs_src/request_files/tutorial001_an_py39.py!} ``` //// @@ -27,7 +27,7 @@ //// tab | Python 3.6+ ```Python hl_lines="1" -{!> ../../../docs_src/request_files/tutorial001_an.py!} +{!> ../../docs_src/request_files/tutorial001_an.py!} ``` //// @@ -41,7 +41,7 @@ /// ```Python hl_lines="1" -{!> ../../../docs_src/request_files/tutorial001.py!} +{!> ../../docs_src/request_files/tutorial001.py!} ``` //// @@ -53,7 +53,7 @@ //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/request_files/tutorial001_an_py39.py!} +{!> ../../docs_src/request_files/tutorial001_an_py39.py!} ``` //// @@ -61,7 +61,7 @@ //// tab | Python 3.6+ ```Python hl_lines="8" -{!> ../../../docs_src/request_files/tutorial001_an.py!} +{!> ../../docs_src/request_files/tutorial001_an.py!} ``` //// @@ -75,7 +75,7 @@ /// ```Python hl_lines="7" -{!> ../../../docs_src/request_files/tutorial001.py!} +{!> ../../docs_src/request_files/tutorial001.py!} ``` //// @@ -109,7 +109,7 @@ //// tab | Python 3.9+ ```Python hl_lines="14" -{!> ../../../docs_src/request_files/tutorial001_an_py39.py!} +{!> ../../docs_src/request_files/tutorial001_an_py39.py!} ``` //// @@ -117,7 +117,7 @@ //// tab | Python 3.6+ ```Python hl_lines="13" -{!> ../../../docs_src/request_files/tutorial001_an.py!} +{!> ../../docs_src/request_files/tutorial001_an.py!} ``` //// @@ -131,7 +131,7 @@ /// ```Python hl_lines="12" -{!> ../../../docs_src/request_files/tutorial001.py!} +{!> ../../docs_src/request_files/tutorial001.py!} ``` //// @@ -220,7 +220,7 @@ contents = myfile.file.read() //// tab | Python 3.10+ ```Python hl_lines="9 17" -{!> ../../../docs_src/request_files/tutorial001_02_an_py310.py!} +{!> ../../docs_src/request_files/tutorial001_02_an_py310.py!} ``` //// @@ -228,7 +228,7 @@ contents = myfile.file.read() //// tab | Python 3.9+ ```Python hl_lines="9 17" -{!> ../../../docs_src/request_files/tutorial001_02_an_py39.py!} +{!> ../../docs_src/request_files/tutorial001_02_an_py39.py!} ``` //// @@ -236,7 +236,7 @@ contents = myfile.file.read() //// tab | Python 3.6+ ```Python hl_lines="10 18" -{!> ../../../docs_src/request_files/tutorial001_02_an.py!} +{!> ../../docs_src/request_files/tutorial001_02_an.py!} ``` //// @@ -250,7 +250,7 @@ contents = myfile.file.read() /// ```Python hl_lines="7 15" -{!> ../../../docs_src/request_files/tutorial001_02_py310.py!} +{!> ../../docs_src/request_files/tutorial001_02_py310.py!} ``` //// @@ -264,7 +264,7 @@ contents = myfile.file.read() /// ```Python hl_lines="9 17" -{!> ../../../docs_src/request_files/tutorial001_02.py!} +{!> ../../docs_src/request_files/tutorial001_02.py!} ``` //// @@ -276,7 +276,7 @@ contents = myfile.file.read() //// tab | Python 3.9+ ```Python hl_lines="9 15" -{!> ../../../docs_src/request_files/tutorial001_03_an_py39.py!} +{!> ../../docs_src/request_files/tutorial001_03_an_py39.py!} ``` //// @@ -284,7 +284,7 @@ contents = myfile.file.read() //// tab | Python 3.6+ ```Python hl_lines="8 14" -{!> ../../../docs_src/request_files/tutorial001_03_an.py!} +{!> ../../docs_src/request_files/tutorial001_03_an.py!} ``` //// @@ -298,7 +298,7 @@ contents = myfile.file.read() /// ```Python hl_lines="7 13" -{!> ../../../docs_src/request_files/tutorial001_03.py!} +{!> ../../docs_src/request_files/tutorial001_03.py!} ``` //// @@ -314,7 +314,7 @@ contents = myfile.file.read() //// tab | Python 3.9+ ```Python hl_lines="10 15" -{!> ../../../docs_src/request_files/tutorial002_an_py39.py!} +{!> ../../docs_src/request_files/tutorial002_an_py39.py!} ``` //// @@ -322,7 +322,7 @@ contents = myfile.file.read() //// tab | Python 3.6+ ```Python hl_lines="11 16" -{!> ../../../docs_src/request_files/tutorial002_an.py!} +{!> ../../docs_src/request_files/tutorial002_an.py!} ``` //// @@ -336,7 +336,7 @@ contents = myfile.file.read() /// ```Python hl_lines="8 13" -{!> ../../../docs_src/request_files/tutorial002_py39.py!} +{!> ../../docs_src/request_files/tutorial002_py39.py!} ``` //// @@ -350,7 +350,7 @@ contents = myfile.file.read() /// ```Python hl_lines="10 15" -{!> ../../../docs_src/request_files/tutorial002.py!} +{!> ../../docs_src/request_files/tutorial002.py!} ``` //// @@ -372,7 +372,7 @@ contents = myfile.file.read() //// tab | Python 3.9+ ```Python hl_lines="11 18-20" -{!> ../../../docs_src/request_files/tutorial003_an_py39.py!} +{!> ../../docs_src/request_files/tutorial003_an_py39.py!} ``` //// @@ -380,7 +380,7 @@ contents = myfile.file.read() //// tab | Python 3.6+ ```Python hl_lines="12 19-21" -{!> ../../../docs_src/request_files/tutorial003_an.py!} +{!> ../../docs_src/request_files/tutorial003_an.py!} ``` //// @@ -394,7 +394,7 @@ contents = myfile.file.read() /// ```Python hl_lines="9 16" -{!> ../../../docs_src/request_files/tutorial003_py39.py!} +{!> ../../docs_src/request_files/tutorial003_py39.py!} ``` //// @@ -408,7 +408,7 @@ contents = myfile.file.read() /// ```Python hl_lines="11 18" -{!> ../../../docs_src/request_files/tutorial003.py!} +{!> ../../docs_src/request_files/tutorial003.py!} ``` //// diff --git a/docs/ru/docs/tutorial/request-forms-and-files.md b/docs/ru/docs/tutorial/request-forms-and-files.md index b38962866..9b449bcd9 100644 --- a/docs/ru/docs/tutorial/request-forms-and-files.md +++ b/docs/ru/docs/tutorial/request-forms-and-files.md @@ -15,7 +15,7 @@ //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/request_forms_and_files/tutorial001_an_py39.py!} +{!> ../../docs_src/request_forms_and_files/tutorial001_an_py39.py!} ``` //// @@ -23,7 +23,7 @@ //// tab | Python 3.6+ ```Python hl_lines="1" -{!> ../../../docs_src/request_forms_and_files/tutorial001_an.py!} +{!> ../../docs_src/request_forms_and_files/tutorial001_an.py!} ``` //// @@ -37,7 +37,7 @@ /// ```Python hl_lines="1" -{!> ../../../docs_src/request_forms_and_files/tutorial001.py!} +{!> ../../docs_src/request_forms_and_files/tutorial001.py!} ``` //// @@ -49,7 +49,7 @@ //// tab | Python 3.9+ ```Python hl_lines="10-12" -{!> ../../../docs_src/request_forms_and_files/tutorial001_an_py39.py!} +{!> ../../docs_src/request_forms_and_files/tutorial001_an_py39.py!} ``` //// @@ -57,7 +57,7 @@ //// tab | Python 3.6+ ```Python hl_lines="9-11" -{!> ../../../docs_src/request_forms_and_files/tutorial001_an.py!} +{!> ../../docs_src/request_forms_and_files/tutorial001_an.py!} ``` //// @@ -71,7 +71,7 @@ /// ```Python hl_lines="8" -{!> ../../../docs_src/request_forms_and_files/tutorial001.py!} +{!> ../../docs_src/request_forms_and_files/tutorial001.py!} ``` //// diff --git a/docs/ru/docs/tutorial/request-forms.md b/docs/ru/docs/tutorial/request-forms.md index 3737f1347..93b44437b 100644 --- a/docs/ru/docs/tutorial/request-forms.md +++ b/docs/ru/docs/tutorial/request-forms.md @@ -17,7 +17,7 @@ //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/request_forms/tutorial001_an_py39.py!} +{!> ../../docs_src/request_forms/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ //// tab | Python 3.8+ ```Python hl_lines="1" -{!> ../../../docs_src/request_forms/tutorial001_an.py!} +{!> ../../docs_src/request_forms/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ /// ```Python hl_lines="1" -{!> ../../../docs_src/request_forms/tutorial001.py!} +{!> ../../docs_src/request_forms/tutorial001.py!} ``` //// @@ -51,7 +51,7 @@ //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/request_forms/tutorial001_an_py39.py!} +{!> ../../docs_src/request_forms/tutorial001_an_py39.py!} ``` //// @@ -59,7 +59,7 @@ //// tab | Python 3.8+ ```Python hl_lines="8" -{!> ../../../docs_src/request_forms/tutorial001_an.py!} +{!> ../../docs_src/request_forms/tutorial001_an.py!} ``` //// @@ -73,7 +73,7 @@ /// ```Python hl_lines="7" -{!> ../../../docs_src/request_forms/tutorial001.py!} +{!> ../../docs_src/request_forms/tutorial001.py!} ``` //// diff --git a/docs/ru/docs/tutorial/response-model.md b/docs/ru/docs/tutorial/response-model.md index f8c910fe9..363e64676 100644 --- a/docs/ru/docs/tutorial/response-model.md +++ b/docs/ru/docs/tutorial/response-model.md @@ -7,7 +7,7 @@ FastAPI ĐżĐŸĐ·ĐČĐŸĐ»ŃĐ”Ń‚ ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать **Đ°ĐœĐœĐŸŃ‚Đ°Ń†ĐžĐž топ //// tab | Python 3.10+ ```Python hl_lines="16 21" -{!> ../../../docs_src/response_model/tutorial001_01_py310.py!} +{!> ../../docs_src/response_model/tutorial001_01_py310.py!} ``` //// @@ -15,7 +15,7 @@ FastAPI ĐżĐŸĐ·ĐČĐŸĐ»ŃĐ”Ń‚ ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать **Đ°ĐœĐœĐŸŃ‚Đ°Ń†ĐžĐž топ //// tab | Python 3.9+ ```Python hl_lines="18 23" -{!> ../../../docs_src/response_model/tutorial001_01_py39.py!} +{!> ../../docs_src/response_model/tutorial001_01_py39.py!} ``` //// @@ -23,7 +23,7 @@ FastAPI ĐżĐŸĐ·ĐČĐŸĐ»ŃĐ”Ń‚ ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать **Đ°ĐœĐœĐŸŃ‚Đ°Ń†ĐžĐž топ //// tab | Python 3.8+ ```Python hl_lines="18 23" -{!> ../../../docs_src/response_model/tutorial001_01.py!} +{!> ../../docs_src/response_model/tutorial001_01.py!} ``` //// @@ -62,7 +62,7 @@ FastAPI Đ±ŃƒĐŽĐ”Ń‚ ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать ŃŃ‚ĐŸŃ‚ ĐČĐŸĐ·ĐČŃ€Đ°Ń‰Đ°Đ”ĐŒŃ‹Đč т //// tab | Python 3.10+ ```Python hl_lines="17 22 24-27" -{!> ../../../docs_src/response_model/tutorial001_py310.py!} +{!> ../../docs_src/response_model/tutorial001_py310.py!} ``` //// @@ -70,7 +70,7 @@ FastAPI Đ±ŃƒĐŽĐ”Ń‚ ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать ŃŃ‚ĐŸŃ‚ ĐČĐŸĐ·ĐČŃ€Đ°Ń‰Đ°Đ”ĐŒŃ‹Đč т //// tab | Python 3.9+ ```Python hl_lines="17 22 24-27" -{!> ../../../docs_src/response_model/tutorial001_py39.py!} +{!> ../../docs_src/response_model/tutorial001_py39.py!} ``` //// @@ -78,7 +78,7 @@ FastAPI Đ±ŃƒĐŽĐ”Ń‚ ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать ŃŃ‚ĐŸŃ‚ ĐČĐŸĐ·ĐČŃ€Đ°Ń‰Đ°Đ”ĐŒŃ‹Đč т //// tab | Python 3.8+ ```Python hl_lines="17 22 24-27" -{!> ../../../docs_src/response_model/tutorial001.py!} +{!> ../../docs_src/response_model/tutorial001.py!} ``` //// @@ -116,7 +116,7 @@ FastAPI Đ±ŃƒĐŽĐ”Ń‚ ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐ” `response_model` ĐŽ //// tab | Python 3.10+ ```Python hl_lines="7 9" -{!> ../../../docs_src/response_model/tutorial002_py310.py!} +{!> ../../docs_src/response_model/tutorial002_py310.py!} ``` //// @@ -124,7 +124,7 @@ FastAPI Đ±ŃƒĐŽĐ”Ń‚ ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐ” `response_model` ĐŽ //// tab | Python 3.8+ ```Python hl_lines="9 11" -{!> ../../../docs_src/response_model/tutorial002.py!} +{!> ../../docs_src/response_model/tutorial002.py!} ``` //// @@ -142,7 +142,7 @@ FastAPI Đ±ŃƒĐŽĐ”Ń‚ ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐ” `response_model` ĐŽ //// tab | Python 3.10+ ```Python hl_lines="16" -{!> ../../../docs_src/response_model/tutorial002_py310.py!} +{!> ../../docs_src/response_model/tutorial002_py310.py!} ``` //// @@ -150,7 +150,7 @@ FastAPI Đ±ŃƒĐŽĐ”Ń‚ ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐ” `response_model` ĐŽ //// tab | Python 3.8+ ```Python hl_lines="18" -{!> ../../../docs_src/response_model/tutorial002.py!} +{!> ../../docs_src/response_model/tutorial002.py!} ``` //// @@ -174,7 +174,7 @@ FastAPI Đ±ŃƒĐŽĐ”Ń‚ ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐ” `response_model` ĐŽ //// tab | Python 3.10+ ```Python hl_lines="9 11 16" -{!> ../../../docs_src/response_model/tutorial003_py310.py!} +{!> ../../docs_src/response_model/tutorial003_py310.py!} ``` //// @@ -182,7 +182,7 @@ FastAPI Đ±ŃƒĐŽĐ”Ń‚ ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐ” `response_model` ĐŽ //// tab | Python 3.8+ ```Python hl_lines="9 11 16" -{!> ../../../docs_src/response_model/tutorial003.py!} +{!> ../../docs_src/response_model/tutorial003.py!} ``` //// @@ -192,7 +192,7 @@ FastAPI Đ±ŃƒĐŽĐ”Ń‚ ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐ” `response_model` ĐŽ //// tab | Python 3.10+ ```Python hl_lines="24" -{!> ../../../docs_src/response_model/tutorial003_py310.py!} +{!> ../../docs_src/response_model/tutorial003_py310.py!} ``` //// @@ -200,7 +200,7 @@ FastAPI Đ±ŃƒĐŽĐ”Ń‚ ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐ” `response_model` ĐŽ //// tab | Python 3.8+ ```Python hl_lines="24" -{!> ../../../docs_src/response_model/tutorial003.py!} +{!> ../../docs_src/response_model/tutorial003.py!} ``` //// @@ -210,7 +210,7 @@ FastAPI Đ±ŃƒĐŽĐ”Ń‚ ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐ” `response_model` ĐŽ //// tab | Python 3.10+ ```Python hl_lines="22" -{!> ../../../docs_src/response_model/tutorial003_py310.py!} +{!> ../../docs_src/response_model/tutorial003_py310.py!} ``` //// @@ -218,7 +218,7 @@ FastAPI Đ±ŃƒĐŽĐ”Ń‚ ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐ” `response_model` ĐŽ //// tab | Python 3.8+ ```Python hl_lines="22" -{!> ../../../docs_src/response_model/tutorial003.py!} +{!> ../../docs_src/response_model/tutorial003.py!} ``` //// @@ -248,7 +248,7 @@ FastAPI Đ±ŃƒĐŽĐ”Ń‚ ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐ” `response_model` ĐŽ //// tab | Python 3.10+ ```Python hl_lines="7-10 13-14 18" -{!> ../../../docs_src/response_model/tutorial003_01_py310.py!} +{!> ../../docs_src/response_model/tutorial003_01_py310.py!} ``` //// @@ -256,7 +256,7 @@ FastAPI Đ±ŃƒĐŽĐ”Ń‚ ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать Đ·ĐœĐ°Ń‡Đ”ĐœĐžĐ” `response_model` ĐŽ //// tab | Python 3.8+ ```Python hl_lines="9-13 15-16 20" -{!> ../../../docs_src/response_model/tutorial003_01.py!} +{!> ../../docs_src/response_model/tutorial003_01.py!} ``` //// @@ -302,7 +302,7 @@ FastAPI ŃĐŸĐČĐŒĐ”ŃŃ‚ĐœĐŸ с Pydantic ĐČŃ‹ĐżĐŸĐ»ĐœĐžŃ‚ ĐœĐ”ĐșĐŸŃ‚ĐŸŃ€ŃƒŃŽ ĐŒĐ° ĐĄĐ°ĐŒŃ‹Đč частыĐč ŃŃ†Đ”ĐœĐ°Ń€ĐžĐč ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČĐ°ĐœĐžŃ - ŃŃ‚ĐŸ [ĐČĐŸĐ·ĐČращать Response ĐœĐ°ĐżŃ€ŃĐŒŃƒŃŽ, ĐșаĐș ĐŸĐżĐžŃĐ°ĐœĐŸ ĐČ Ń€Đ°ŃŃˆĐžŃ€Đ”ĐœĐœĐŸĐč ĐŽĐŸĐșŃƒĐŒĐ”ĐœŃ‚Đ°Ń†ĐžĐž](../advanced/response-directly.md){.internal-link target=_blank}. ```Python hl_lines="8 10-11" -{!> ../../../docs_src/response_model/tutorial003_02.py!} +{!> ../../docs_src/response_model/tutorial003_02.py!} ``` Đ­Ń‚ĐŸ ĐżĐŸĐŽĐŽĐ”Ń€Đ¶ĐžĐČĐ°Đ”Ń‚ŃŃ FastAPI ĐżĐŸ-ŃƒĐŒĐŸĐ»Ń‡Đ°ĐœĐžŃŽ, т.Đș. Đ°ĐœĐœĐŸŃ‚Đ°Ń†ĐžŃ ĐżŃ€ĐŸŃŃ‚Đ°ĐČĐ»Đ”ĐœĐ° ĐČ ĐșлассД (ОлО ĐżĐŸĐŽĐșлассД) `Response`. @@ -314,7 +314,7 @@ FastAPI ŃĐŸĐČĐŒĐ”ŃŃ‚ĐœĐŸ с Pydantic ĐČŃ‹ĐżĐŸĐ»ĐœĐžŃ‚ ĐœĐ”ĐșĐŸŃ‚ĐŸŃ€ŃƒŃŽ ĐŒĐ° Вы таĐșжД ĐŒĐŸĐ¶Đ”Ń‚Đ” уĐșĐ°Đ·Đ°Ń‚ŃŒ ĐżĐŸĐŽĐșласс `Response` ĐČ Đ°ĐœĐœĐŸŃ‚Đ°Ń†ĐžĐž топа: ```Python hl_lines="8-9" -{!> ../../../docs_src/response_model/tutorial003_03.py!} +{!> ../../docs_src/response_model/tutorial003_03.py!} ``` Đ­Ń‚ĐŸ ŃŃ€Đ°Đ±ĐŸŃ‚Đ°Đ”Ń‚, ĐżĐŸŃ‚ĐŸĐŒŃƒ Ń‡Ń‚ĐŸ `RedirectResponse` яĐČĐ»ŃĐ”Ń‚ŃŃ ĐżĐŸĐŽĐșĐ»Đ°ŃŃĐŸĐŒ `Response` Đž FastAPI аĐČŃ‚ĐŸĐŒĐ°Ń‚ĐžŃ‡Đ”ŃĐșĐž ĐŸĐ±Ń€Đ°Đ±ĐŸŃ‚Đ°Đ”Ń‚ ŃŃ‚ĐŸŃ‚ ĐżŃ€ĐŸŃŃ‚Đ”ĐčшОĐč ŃĐ»ŃƒŃ‡Đ°Đč. @@ -328,7 +328,7 @@ FastAPI ŃĐŸĐČĐŒĐ”ŃŃ‚ĐœĐŸ с Pydantic ĐČŃ‹ĐżĐŸĐ»ĐœĐžŃ‚ ĐœĐ”ĐșĐŸŃ‚ĐŸŃ€ŃƒŃŽ ĐŒĐ° //// tab | Python 3.10+ ```Python hl_lines="8" -{!> ../../../docs_src/response_model/tutorial003_04_py310.py!} +{!> ../../docs_src/response_model/tutorial003_04_py310.py!} ``` //// @@ -336,7 +336,7 @@ FastAPI ŃĐŸĐČĐŒĐ”ŃŃ‚ĐœĐŸ с Pydantic ĐČŃ‹ĐżĐŸĐ»ĐœĐžŃ‚ ĐœĐ”ĐșĐŸŃ‚ĐŸŃ€ŃƒŃŽ ĐŒĐ° //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/response_model/tutorial003_04.py!} +{!> ../../docs_src/response_model/tutorial003_04.py!} ``` //// @@ -354,7 +354,7 @@ FastAPI ŃĐŸĐČĐŒĐ”ŃŃ‚ĐœĐŸ с Pydantic ĐČŃ‹ĐżĐŸĐ»ĐœĐžŃ‚ ĐœĐ”ĐșĐŸŃ‚ĐŸŃ€ŃƒŃŽ ĐŒĐ° //// tab | Python 3.10+ ```Python hl_lines="7" -{!> ../../../docs_src/response_model/tutorial003_05_py310.py!} +{!> ../../docs_src/response_model/tutorial003_05_py310.py!} ``` //// @@ -362,7 +362,7 @@ FastAPI ŃĐŸĐČĐŒĐ”ŃŃ‚ĐœĐŸ с Pydantic ĐČŃ‹ĐżĐŸĐ»ĐœĐžŃ‚ ĐœĐ”ĐșĐŸŃ‚ĐŸŃ€ŃƒŃŽ ĐŒĐ° //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/response_model/tutorial003_05.py!} +{!> ../../docs_src/response_model/tutorial003_05.py!} ``` //// @@ -376,7 +376,7 @@ FastAPI ŃĐŸĐČĐŒĐ”ŃŃ‚ĐœĐŸ с Pydantic ĐČŃ‹ĐżĐŸĐ»ĐœĐžŃ‚ ĐœĐ”ĐșĐŸŃ‚ĐŸŃ€ŃƒŃŽ ĐŒĐ° //// tab | Python 3.10+ ```Python hl_lines="9 11-12" -{!> ../../../docs_src/response_model/tutorial004_py310.py!} +{!> ../../docs_src/response_model/tutorial004_py310.py!} ``` //// @@ -384,7 +384,7 @@ FastAPI ŃĐŸĐČĐŒĐ”ŃŃ‚ĐœĐŸ с Pydantic ĐČŃ‹ĐżĐŸĐ»ĐœĐžŃ‚ ĐœĐ”ĐșĐŸŃ‚ĐŸŃ€ŃƒŃŽ ĐŒĐ° //// tab | Python 3.9+ ```Python hl_lines="11 13-14" -{!> ../../../docs_src/response_model/tutorial004_py39.py!} +{!> ../../docs_src/response_model/tutorial004_py39.py!} ``` //// @@ -392,7 +392,7 @@ FastAPI ŃĐŸĐČĐŒĐ”ŃŃ‚ĐœĐŸ с Pydantic ĐČŃ‹ĐżĐŸĐ»ĐœĐžŃ‚ ĐœĐ”ĐșĐŸŃ‚ĐŸŃ€ŃƒŃŽ ĐŒĐ° //// tab | Python 3.8+ ```Python hl_lines="11 13-14" -{!> ../../../docs_src/response_model/tutorial004.py!} +{!> ../../docs_src/response_model/tutorial004.py!} ``` //// @@ -412,7 +412,7 @@ FastAPI ŃĐŸĐČĐŒĐ”ŃŃ‚ĐœĐŸ с Pydantic ĐČŃ‹ĐżĐŸĐ»ĐœĐžŃ‚ ĐœĐ”ĐșĐŸŃ‚ĐŸŃ€ŃƒŃŽ ĐŒĐ° //// tab | Python 3.10+ ```Python hl_lines="22" -{!> ../../../docs_src/response_model/tutorial004_py310.py!} +{!> ../../docs_src/response_model/tutorial004_py310.py!} ``` //// @@ -420,7 +420,7 @@ FastAPI ŃĐŸĐČĐŒĐ”ŃŃ‚ĐœĐŸ с Pydantic ĐČŃ‹ĐżĐŸĐ»ĐœĐžŃ‚ ĐœĐ”ĐșĐŸŃ‚ĐŸŃ€ŃƒŃŽ ĐŒĐ° //// tab | Python 3.9+ ```Python hl_lines="24" -{!> ../../../docs_src/response_model/tutorial004_py39.py!} +{!> ../../docs_src/response_model/tutorial004_py39.py!} ``` //// @@ -428,7 +428,7 @@ FastAPI ŃĐŸĐČĐŒĐ”ŃŃ‚ĐœĐŸ с Pydantic ĐČŃ‹ĐżĐŸĐ»ĐœĐžŃ‚ ĐœĐ”ĐșĐŸŃ‚ĐŸŃ€ŃƒŃŽ ĐŒĐ° //// tab | Python 3.8+ ```Python hl_lines="24" -{!> ../../../docs_src/response_model/tutorial004.py!} +{!> ../../docs_src/response_model/tutorial004.py!} ``` //// @@ -523,7 +523,7 @@ FastAPI ĐŽĐŸŃŃ‚Đ°Ń‚ĐŸŃ‡ĐœĐŸ ŃƒĐŒĐ”Đœ (ĐœĐ° ŃĐ°ĐŒĐŸĐŒ ЎДлД, ŃŃ‚ĐŸ засл //// tab | Python 3.10+ ```Python hl_lines="29 35" -{!> ../../../docs_src/response_model/tutorial005_py310.py!} +{!> ../../docs_src/response_model/tutorial005_py310.py!} ``` //// @@ -531,7 +531,7 @@ FastAPI ĐŽĐŸŃŃ‚Đ°Ń‚ĐŸŃ‡ĐœĐŸ ŃƒĐŒĐ”Đœ (ĐœĐ° ŃĐ°ĐŒĐŸĐŒ ЎДлД, ŃŃ‚ĐŸ засл //// tab | Python 3.8+ ```Python hl_lines="31 37" -{!> ../../../docs_src/response_model/tutorial005.py!} +{!> ../../docs_src/response_model/tutorial005.py!} ``` //// @@ -551,7 +551,7 @@ FastAPI ĐŽĐŸŃŃ‚Đ°Ń‚ĐŸŃ‡ĐœĐŸ ŃƒĐŒĐ”Đœ (ĐœĐ° ŃĐ°ĐŒĐŸĐŒ ЎДлД, ŃŃ‚ĐŸ засл //// tab | Python 3.10+ ```Python hl_lines="29 35" -{!> ../../../docs_src/response_model/tutorial006_py310.py!} +{!> ../../docs_src/response_model/tutorial006_py310.py!} ``` //// @@ -559,7 +559,7 @@ FastAPI ĐŽĐŸŃŃ‚Đ°Ń‚ĐŸŃ‡ĐœĐŸ ŃƒĐŒĐ”Đœ (ĐœĐ° ŃĐ°ĐŒĐŸĐŒ ЎДлД, ŃŃ‚ĐŸ засл //// tab | Python 3.8+ ```Python hl_lines="31 37" -{!> ../../../docs_src/response_model/tutorial006.py!} +{!> ../../docs_src/response_model/tutorial006.py!} ``` //// diff --git a/docs/ru/docs/tutorial/response-status-code.md b/docs/ru/docs/tutorial/response-status-code.md index a36c42d05..48808bea7 100644 --- a/docs/ru/docs/tutorial/response-status-code.md +++ b/docs/ru/docs/tutorial/response-status-code.md @@ -9,7 +9,7 @@ * Đž Юругох. ```Python hl_lines="6" -{!../../../docs_src/response_status_code/tutorial001.py!} +{!../../docs_src/response_status_code/tutorial001.py!} ``` /// note | "ĐŸŃ€ĐžĐŒĐ”Ń‡Đ°ĐœĐžĐ”" @@ -77,7 +77,7 @@ FastAPI Đ·ĐœĐ°Đ”Ń‚ ĐŸĐ± ŃŃ‚ĐŸĐŒ Đž ŃĐŸĐ·ĐŽĐ°ŃŃ‚ ĐŽĐŸĐșŃƒĐŒĐ”ĐœŃ‚Đ°Ń†ĐžŃŽ Open Đ Đ°ŃŃĐŒĐŸŃ‚Ń€ĐžĐŒ ĐżŃ€Đ”ĐŽŃ‹ĐŽŃƒŃ‰ĐžĐč ĐżŃ€ĐžĐŒĐ”Ń€ ДщД раз: ```Python hl_lines="6" -{!../../../docs_src/response_status_code/tutorial001.py!} +{!../../docs_src/response_status_code/tutorial001.py!} ``` `201` – ŃŃ‚ĐŸ ĐșĐŸĐŽ статуса "ĐĄĐŸĐ·ĐŽĐ°ĐœĐŸ". @@ -87,7 +87,7 @@ FastAPI Đ·ĐœĐ°Đ”Ń‚ ĐŸĐ± ŃŃ‚ĐŸĐŒ Đž ŃĐŸĐ·ĐŽĐ°ŃŃ‚ ĐŽĐŸĐșŃƒĐŒĐ”ĐœŃ‚Đ°Ń†ĐžŃŽ Open Đ”Đ»Ń ŃƒĐŽĐŸĐ±ŃŃ‚ĐČа ĐČы ĐŒĐŸĐ¶Đ”Ń‚Đ” ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать ĐżĐ”Ń€Đ”ĐŒĐ”ĐœĐœŃ‹Đ” Оз `fastapi.status`. ```Python hl_lines="1 6" -{!../../../docs_src/response_status_code/tutorial002.py!} +{!../../docs_src/response_status_code/tutorial002.py!} ``` ĐžĐœĐž ŃĐŸĐŽĐ”Ń€Đ¶Đ°Ń‚ тД жД Ń‡ĐžŃĐ»ĐŸĐČыД Đ·ĐœĐ°Ń‡Đ”ĐœĐžŃ, ĐœĐŸ ĐżĐŸĐ·ĐČĐŸĐ»ŃŃŽŃ‚ ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать ĐżĐŸĐŽŃĐșазĐșĐž рДЎаĐșŃ‚ĐŸŃ€Đ° ĐŽĐ»Ń ĐČŃ‹Đ±ĐŸŃ€Đ° ĐșĐŸĐŽĐ° статуса: diff --git a/docs/ru/docs/tutorial/schema-extra-example.md b/docs/ru/docs/tutorial/schema-extra-example.md index 1b216de3a..daa264afc 100644 --- a/docs/ru/docs/tutorial/schema-extra-example.md +++ b/docs/ru/docs/tutorial/schema-extra-example.md @@ -11,7 +11,7 @@ //// tab | Python 3.10+ ```Python hl_lines="13-21" -{!> ../../../docs_src/schema_extra_example/tutorial001_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial001_py310.py!} ``` //// @@ -19,7 +19,7 @@ //// tab | Python 3.8+ ```Python hl_lines="15-23" -{!> ../../../docs_src/schema_extra_example/tutorial001.py!} +{!> ../../docs_src/schema_extra_example/tutorial001.py!} ``` //// @@ -43,7 +43,7 @@ //// tab | Python 3.10+ ```Python hl_lines="2 8-11" -{!> ../../../docs_src/schema_extra_example/tutorial002_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial002_py310.py!} ``` //// @@ -51,7 +51,7 @@ //// tab | Python 3.8+ ```Python hl_lines="4 10-13" -{!> ../../../docs_src/schema_extra_example/tutorial002.py!} +{!> ../../docs_src/schema_extra_example/tutorial002.py!} ``` //// @@ -83,7 +83,7 @@ //// tab | Python 3.10+ ```Python hl_lines="22-27" -{!> ../../../docs_src/schema_extra_example/tutorial003_an_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial003_an_py310.py!} ``` //// @@ -91,7 +91,7 @@ //// tab | Python 3.9+ ```Python hl_lines="22-27" -{!> ../../../docs_src/schema_extra_example/tutorial003_an_py39.py!} +{!> ../../docs_src/schema_extra_example/tutorial003_an_py39.py!} ``` //// @@ -99,7 +99,7 @@ //// tab | Python 3.8+ ```Python hl_lines="23-28" -{!> ../../../docs_src/schema_extra_example/tutorial003_an.py!} +{!> ../../docs_src/schema_extra_example/tutorial003_an.py!} ``` //// @@ -113,7 +113,7 @@ /// ```Python hl_lines="18-23" -{!> ../../../docs_src/schema_extra_example/tutorial003_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial003_py310.py!} ``` //// @@ -127,7 +127,7 @@ /// ```Python hl_lines="20-25" -{!> ../../../docs_src/schema_extra_example/tutorial003.py!} +{!> ../../docs_src/schema_extra_example/tutorial003.py!} ``` //// @@ -154,7 +154,7 @@ //// tab | Python 3.10+ ```Python hl_lines="23-49" -{!> ../../../docs_src/schema_extra_example/tutorial004_an_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial004_an_py310.py!} ``` //// @@ -162,7 +162,7 @@ //// tab | Python 3.9+ ```Python hl_lines="23-49" -{!> ../../../docs_src/schema_extra_example/tutorial004_an_py39.py!} +{!> ../../docs_src/schema_extra_example/tutorial004_an_py39.py!} ``` //// @@ -170,7 +170,7 @@ //// tab | Python 3.8+ ```Python hl_lines="24-50" -{!> ../../../docs_src/schema_extra_example/tutorial004_an.py!} +{!> ../../docs_src/schema_extra_example/tutorial004_an.py!} ``` //// @@ -184,7 +184,7 @@ /// ```Python hl_lines="19-45" -{!> ../../../docs_src/schema_extra_example/tutorial004_py310.py!} +{!> ../../docs_src/schema_extra_example/tutorial004_py310.py!} ``` //// @@ -198,7 +198,7 @@ /// ```Python hl_lines="21-47" -{!> ../../../docs_src/schema_extra_example/tutorial004.py!} +{!> ../../docs_src/schema_extra_example/tutorial004.py!} ``` //// diff --git a/docs/ru/docs/tutorial/security/first-steps.md b/docs/ru/docs/tutorial/security/first-steps.md index 444a06915..c98ce2c60 100644 --- a/docs/ru/docs/tutorial/security/first-steps.md +++ b/docs/ru/docs/tutorial/security/first-steps.md @@ -23,7 +23,7 @@ //// tab | Python 3.9+ ```Python -{!> ../../../docs_src/security/tutorial001_an_py39.py!} +{!> ../../docs_src/security/tutorial001_an_py39.py!} ``` //// @@ -31,7 +31,7 @@ //// tab | Python 3.8+ ```Python -{!> ../../../docs_src/security/tutorial001_an.py!} +{!> ../../docs_src/security/tutorial001_an.py!} ``` //// @@ -45,7 +45,7 @@ /// ```Python -{!> ../../../docs_src/security/tutorial001.py!} +{!> ../../docs_src/security/tutorial001.py!} ``` //// @@ -155,7 +155,7 @@ OAuth2 был Ń€Đ°Đ·Ń€Đ°Đ±ĐŸŃ‚Đ°Đœ ĐŽĐ»Ń Ń‚ĐŸĐłĐŸ, Ń‡Ń‚ĐŸĐ±Ń‹ Đ±ŃĐșŃĐœĐŽ Ол //// tab | Python 3.9+ ```Python hl_lines="8" -{!> ../../../docs_src/security/tutorial001_an_py39.py!} +{!> ../../docs_src/security/tutorial001_an_py39.py!} ``` //// @@ -163,7 +163,7 @@ OAuth2 был Ń€Đ°Đ·Ń€Đ°Đ±ĐŸŃ‚Đ°Đœ ĐŽĐ»Ń Ń‚ĐŸĐłĐŸ, Ń‡Ń‚ĐŸĐ±Ń‹ Đ±ŃĐșŃĐœĐŽ Ол //// tab | Python 3.8+ ```Python hl_lines="7" -{!> ../../../docs_src/security/tutorial001_an.py!} +{!> ../../docs_src/security/tutorial001_an.py!} ``` //// @@ -177,7 +177,7 @@ OAuth2 был Ń€Đ°Đ·Ń€Đ°Đ±ĐŸŃ‚Đ°Đœ ĐŽĐ»Ń Ń‚ĐŸĐłĐŸ, Ń‡Ń‚ĐŸĐ±Ń‹ Đ±ŃĐșŃĐœĐŽ Ол /// ```Python hl_lines="6" -{!> ../../../docs_src/security/tutorial001.py!} +{!> ../../docs_src/security/tutorial001.py!} ``` //// @@ -221,7 +221,7 @@ oauth2_scheme(some, parameters) //// tab | Python 3.9+ ```Python hl_lines="12" -{!> ../../../docs_src/security/tutorial001_an_py39.py!} +{!> ../../docs_src/security/tutorial001_an_py39.py!} ``` //// @@ -229,7 +229,7 @@ oauth2_scheme(some, parameters) //// tab | Python 3.8+ ```Python hl_lines="11" -{!> ../../../docs_src/security/tutorial001_an.py!} +{!> ../../docs_src/security/tutorial001_an.py!} ``` //// @@ -243,7 +243,7 @@ oauth2_scheme(some, parameters) /// ```Python hl_lines="10" -{!> ../../../docs_src/security/tutorial001.py!} +{!> ../../docs_src/security/tutorial001.py!} ``` //// diff --git a/docs/ru/docs/tutorial/static-files.md b/docs/ru/docs/tutorial/static-files.md index ccddae249..4734554f3 100644 --- a/docs/ru/docs/tutorial/static-files.md +++ b/docs/ru/docs/tutorial/static-files.md @@ -8,7 +8,7 @@ * "ĐŸŃ€ĐžĐŒĐŸĐœŃ‚ĐžŃ€ŃƒĐčтД" эĐșĐ·Đ”ĐŒĐżĐ»ŃŃ€ `StaticFiles()` с уĐșĐ°Đ·Đ°ĐœĐžĐ”ĐŒ ĐŸĐżŃ€Đ”ĐŽĐ”Đ»Đ”ĐœĐœĐŸĐč ЎОрДĐșŃ‚ĐŸŃ€ĐžĐž. ```Python hl_lines="2 6" -{!../../../docs_src/static_files/tutorial001.py!} +{!../../docs_src/static_files/tutorial001.py!} ``` /// note | "ĐąĐ”Ń…ĐœĐžŃ‡Đ”ŃĐșОД ЎДталО" diff --git a/docs/ru/docs/tutorial/testing.md b/docs/ru/docs/tutorial/testing.md index efefbfb01..ae045bbbe 100644 --- a/docs/ru/docs/tutorial/testing.md +++ b/docs/ru/docs/tutorial/testing.md @@ -27,7 +27,7 @@ ĐĐ°ĐżĐžŃˆĐžŃ‚Đ” ĐżŃ€ĐŸŃŃ‚ĐŸĐ” утĐČĐ”Ń€Đ¶ĐŽĐ”ĐœĐžĐ” с `assert` Ўабы ĐżŃ€ĐŸĐČĐ”Ń€ĐžŃ‚ŃŒ ĐžŃŃ‚ĐžĐœĐœĐŸŃŃ‚ŃŒ Python-ĐČŃ‹Ń€Đ°Đ¶Đ”ĐœĐžŃ (ŃŃ‚ĐŸ Ń‚ĐŸĐ¶Đ” ŃŃ‚Đ°ĐœĐŽĐ°Ń€Ń‚ `pytest`). ```Python hl_lines="2 12 15-18" -{!../../../docs_src/app_testing/tutorial001.py!} +{!../../docs_src/app_testing/tutorial001.py!} ``` /// tip | "ĐŸĐŸĐŽŃĐșазĐșа" @@ -75,7 +75,7 @@ ```Python -{!../../../docs_src/app_testing/main.py!} +{!../../docs_src/app_testing/main.py!} ``` ### ЀаĐčĐ» Ń‚Đ”ŃŃ‚ĐŸĐČ @@ -93,7 +93,7 @@ йаĐș ĐșаĐș ĐŸĐ±Đ° фаĐčла ĐœĐ°Ń…ĐŸĐŽŃŃ‚ŃŃ ĐČ ĐŸĐŽĐœĐŸĐč ЎОрДĐșŃ‚ĐŸŃ€ĐžĐž, ĐŽĐ»Ń ĐžĐŒĐżĐŸŃ€Ń‚Đ° ĐŸĐ±ŃŠĐ”Đșта ĐżŃ€ĐžĐ»ĐŸĐ¶Đ”ĐœĐžŃ Оз фаĐčла `main` ĐČ Ń„Đ°ĐčĐ» `test_main` Вы ĐŒĐŸĐ¶Đ”Ń‚Đ” ĐžŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČать ĐŸŃ‚ĐœĐŸŃĐžŃ‚Đ”Đ»ŃŒĐœŃ‹Đč ĐžĐŒĐżĐŸŃ€Ń‚: ```Python hl_lines="3" -{!../../../docs_src/app_testing/test_main.py!} +{!../../docs_src/app_testing/test_main.py!} ``` ...Đž посать ĐŽĐ°Đ»ŃŒŃˆĐ” тДсты, ĐșаĐș Đž Ń€Đ°ĐœŃŒŃˆĐ”. @@ -125,7 +125,7 @@ //// tab | Python 3.10+ ```Python -{!> ../../../docs_src/app_testing/app_b_an_py310/main.py!} +{!> ../../docs_src/app_testing/app_b_an_py310/main.py!} ``` //// @@ -133,7 +133,7 @@ //// tab | Python 3.9+ ```Python -{!> ../../../docs_src/app_testing/app_b_an_py39/main.py!} +{!> ../../docs_src/app_testing/app_b_an_py39/main.py!} ``` //// @@ -141,7 +141,7 @@ //// tab | Python 3.8+ ```Python -{!> ../../../docs_src/app_testing/app_b_an/main.py!} +{!> ../../docs_src/app_testing/app_b_an/main.py!} ``` //// @@ -155,7 +155,7 @@ /// ```Python -{!> ../../../docs_src/app_testing/app_b_py310/main.py!} +{!> ../../docs_src/app_testing/app_b_py310/main.py!} ``` //// @@ -169,7 +169,7 @@ /// ```Python -{!> ../../../docs_src/app_testing/app_b/main.py!} +{!> ../../docs_src/app_testing/app_b/main.py!} ``` //// @@ -179,7 +179,7 @@ ĐąĐ”ĐżĐ”Ń€ŃŒ ĐŸĐ±ĐœĐŸĐČĐžĐŒ фаĐčĐ» `test_main.py`, ĐŽĐŸĐ±Đ°ĐČĐžĐČ ĐČ ĐœĐ”ĐłĐŸ Ń‚Đ”ŃŃ‚ĐŸĐČ: ```Python -{!> ../../../docs_src/app_testing/app_b/test_main.py!} +{!> ../../docs_src/app_testing/app_b/test_main.py!} ``` ЕслО Вы ĐœĐ” Đ·ĐœĐ°Đ”Ń‚Đ”, ĐșаĐș ĐżĐ”Ń€Đ”ĐŽĐ°Ń‚ŃŒ ĐžĐœŃ„ĐŸŃ€ĐŒĐ°Ń†ĐžŃŽ ĐČ Đ·Đ°ĐżŃ€ĐŸŃĐ”, ĐŒĐŸĐ¶Đ”Ń‚Đ” ĐČĐŸŃĐżĐŸĐ»ŃŒĐ·ĐŸĐČаться ĐżĐŸĐžŃĐșĐŸĐČĐžĐșĐŸĐŒ (ĐżĐŸĐłŃƒĐłĐ»ĐžŃ‚ŃŒ) Đž Đ·Đ°ĐŽĐ°Ń‚ŃŒ ĐČĐŸĐżŃ€ĐŸŃ: "КаĐș ĐżĐ”Ń€Đ”ĐŽĐ°Ń‚ŃŒ ĐžĐœŃ„ĐŸŃ€ĐŒĐ°Ń†ĐžŃŽ ĐČ Đ·Đ°ĐżŃ€ĐŸŃĐ” с ĐżĐŸĐŒĐŸŃ‰ŃŒŃŽ `httpx`", ĐŒĐŸĐ¶ĐœĐŸ ЎажД ŃĐżŃ€ĐŸŃĐžŃ‚ŃŒ: "КаĐș ĐżĐ”Ń€Đ”ĐŽĐ°Ń‚ŃŒ ĐžĐœŃ„ĐŸŃ€ĐŒĐ°Ń†ĐžŃŽ ĐČ Đ·Đ°ĐżŃ€ĐŸŃĐ” с ĐżĐŸĐŒĐŸŃ‰ŃŒŃŽ `requests`", ĐżĐŸŃĐșĐŸĐ»ŃŒĐșу ЎОзаĐčĐœ HTTPX ĐŸŃĐœĐŸĐČĐ°Đœ ĐœĐ° ЎОзаĐčĐœĐ” Requests. diff --git a/docs/tr/docs/advanced/testing-websockets.md b/docs/tr/docs/advanced/testing-websockets.md index 59a2499e2..aa8a040d0 100644 --- a/docs/tr/docs/advanced/testing-websockets.md +++ b/docs/tr/docs/advanced/testing-websockets.md @@ -5,7 +5,7 @@ WebSockets testi yapmak için `TestClient`'ı kullanabilirsiniz. Bu ißlem için, `TestClient`'ı bir `with` ifadesinde kullanarak WebSocket'e bağlanabilirsiniz: ```Python hl_lines="27-31" -{!../../../docs_src/app_testing/tutorial002.py!} +{!../../docs_src/app_testing/tutorial002.py!} ``` /// note | "Not" diff --git a/docs/tr/docs/advanced/wsgi.md b/docs/tr/docs/advanced/wsgi.md index 54a6f20e2..bc8da16df 100644 --- a/docs/tr/docs/advanced/wsgi.md +++ b/docs/tr/docs/advanced/wsgi.md @@ -13,7 +13,7 @@ Ardından WSGI (örneğin Flask) uygulamanızı middleware ile sarmalayın. Son olarak da bir yol altında bağlama ißlemini gerçekleßtirin. ```Python hl_lines="2-3 23" -{!../../../docs_src/wsgi/tutorial001.py!} +{!../../docs_src/wsgi/tutorial001.py!} ``` ## Kontrol Edelim diff --git a/docs/tr/docs/python-types.md b/docs/tr/docs/python-types.md index b8b880c6d..9584a5732 100644 --- a/docs/tr/docs/python-types.md +++ b/docs/tr/docs/python-types.md @@ -23,7 +23,7 @@ Python uzmanıysanız ve tip belirteçleri ilgili her ßeyi zaten biliyorsanız, Basit bir örnek ile baßlayalım: ```Python -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` Programın çıktısı: @@ -39,7 +39,7 @@ Fonksiyon sırayla ßunları yapar: * Değißkenleri aralarında bir boßlukla beraber Birleßtirir. ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` ### DĂŒzenle @@ -83,7 +83,7 @@ Bu kadar. İßte bunlar "tip belirteçleri": ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial002.py!} +{!../../docs_src/python_types/tutorial002.py!} ``` Bu, aßağıdaki gibi varsayılan değerleri bildirmekle aynı ßey değildir: @@ -113,7 +113,7 @@ Aradığınızı bulana kadar seçenekleri kaydırabilirsiniz: Bu fonksiyon, zaten tĂŒr belirteçlerine sahip: ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial003.py!} +{!../../docs_src/python_types/tutorial003.py!} ``` Editör değißkenlerin tiplerini bildiğinden, yalnızca otomatik tamamlama değil, hata kontrolleri de sağlar: @@ -123,7 +123,7 @@ Editör değißkenlerin tiplerini bildiğinden, yalnızca otomatik tamamlama de Artık `age` değißkenini `str(age)` olarak kullanmanız gerektiğini biliyorsunuz: ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial004.py!} +{!../../docs_src/python_types/tutorial004.py!} ``` ## Tip bildirme @@ -144,7 +144,7 @@ Yalnızca `str` değil, tĂŒm standart Python tiplerinin bildirebilirsiniz. * `bytes` ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial005.py!} +{!../../docs_src/python_types/tutorial005.py!} ``` ### Tip parametreleri ile Generic tipler @@ -162,7 +162,7 @@ Bu tĂŒr tip belirteçlerini desteklemek için özel olarak mevcuttur. From `typing`, import `List` (bĂŒyĂŒk harf olan `L` ile): ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial006.py!} +{!../../docs_src/python_types/tutorial006.py!} ``` Değißkenin tipini yine iki nokta ĂŒstĂŒste (`:`) ile belirleyin. @@ -172,7 +172,7 @@ tip olarak `List` kullanın. Liste, bazı dahili tipleri içeren bir tĂŒr olduğundan, bunları kĂ¶ĆŸeli parantez içine alırsınız: ```Python hl_lines="4" -{!../../../docs_src/python_types/tutorial006.py!} +{!../../docs_src/python_types/tutorial006.py!} ``` /// tip | "Ipucu" @@ -200,7 +200,7 @@ Ve yine, editör bunun bir `str` ​​olduğunu biliyor ve bunun için destek s `Tuple` ve `set`lerin tiplerini bildirmek için de aynısını yapıyoruz: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial007.py!} +{!../../docs_src/python_types/tutorial007.py!} ``` Bu ßu anlama geliyor: @@ -217,7 +217,7 @@ Bir `dict` tanımlamak için virgĂŒlle ayrılmıß iki parametre verebilirsiniz. İkinci parametre ise `dict` değerinin `value` değeri içindir: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial008.py!} +{!../../docs_src/python_types/tutorial008.py!} ``` Bu ßu anlama gelir: @@ -231,7 +231,7 @@ Bu ßu anlama gelir: `Optional` bir değißkenin `str`gibi bir tipi olabileceğini ama isteğe bağlı olarak tipinin `None` olabileceğini belirtir: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009.py!} +{!../../docs_src/python_types/tutorial009.py!} ``` `str` yerine `Optional[str]` kullanmak editorĂŒn bu değerin her zaman `str` tipinde değil bazen `None` tipinde de olabileceğini belirtir ve hataları tespit etmemizde yardımcı olur. @@ -256,13 +256,13 @@ Bir değißkenin tipini bir sınıf ile bildirebilirsiniz. Diyelim ki `name` değerine sahip `Person` sınıfınız var: ```Python hl_lines="1-3" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` Sonra bir değißkeni 'Person' tipinde tanımlayabilirsiniz: ```Python hl_lines="6" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` Ve yine bĂŒtĂŒn editör desteğini alırsınız: @@ -284,7 +284,7 @@ Ve ortaya çıkan nesne ĂŒzerindeki bĂŒtĂŒn editör desteğini alırsınız. Resmi Pydantic dokĂŒmanlarından alınmıßtır: ```Python -{!../../../docs_src/python_types/tutorial011.py!} +{!../../docs_src/python_types/tutorial011.py!} ``` /// info diff --git a/docs/tr/docs/tutorial/cookie-params.md b/docs/tr/docs/tutorial/cookie-params.md index 807f85e8a..895cf9b03 100644 --- a/docs/tr/docs/tutorial/cookie-params.md +++ b/docs/tr/docs/tutorial/cookie-params.md @@ -9,7 +9,7 @@ //// tab | Python 3.10+ ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py310.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ //// tab | Python 3.8+ ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001_an.py!} +{!> ../../docs_src/cookie_params/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ MĂŒmkĂŒn mertebe 'Annotated' sınıfını kullanmaya çalıßın. /// ```Python hl_lines="1" -{!> ../../../docs_src/cookie_params/tutorial001_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_py310.py!} ``` //// @@ -53,7 +53,7 @@ MĂŒmkĂŒn mertebe 'Annotated' sınıfını kullanmaya çalıßın. /// ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001.py!} +{!> ../../docs_src/cookie_params/tutorial001.py!} ``` //// @@ -67,7 +67,7 @@ MĂŒmkĂŒn mertebe 'Annotated' sınıfını kullanmaya çalıßın. //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py310.py!} ``` //// @@ -75,7 +75,7 @@ MĂŒmkĂŒn mertebe 'Annotated' sınıfını kullanmaya çalıßın. //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py39.py!} ``` //// @@ -83,7 +83,7 @@ MĂŒmkĂŒn mertebe 'Annotated' sınıfını kullanmaya çalıßın. //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/cookie_params/tutorial001_an.py!} +{!> ../../docs_src/cookie_params/tutorial001_an.py!} ``` //// @@ -97,7 +97,7 @@ MĂŒmkĂŒn mertebe 'Annotated' sınıfını kullanmaya çalıßın. /// ```Python hl_lines="7" -{!> ../../../docs_src/cookie_params/tutorial001_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_py310.py!} ``` //// @@ -111,7 +111,7 @@ MĂŒmkĂŒn mertebe 'Annotated' sınıfını kullanmaya çalıßın. /// ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001.py!} +{!> ../../docs_src/cookie_params/tutorial001.py!} ``` //// diff --git a/docs/tr/docs/tutorial/first-steps.md b/docs/tr/docs/tutorial/first-steps.md index 76c035992..335fcaece 100644 --- a/docs/tr/docs/tutorial/first-steps.md +++ b/docs/tr/docs/tutorial/first-steps.md @@ -3,7 +3,7 @@ En sade FastAPI dosyası ßu ßekilde görĂŒnĂŒr: ```Python -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` Yukarıdaki içeriği bir `main.py` dosyasına kopyalayalım. @@ -134,7 +134,7 @@ Ayrıca, API'ınızla iletißim kuracak önyĂŒz, mobil veya IoT uygulamaları gi ### Adım 1: `FastAPI`yı Projemize Dahil Edelim ```Python hl_lines="1" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` `FastAPI`, API'niz için tĂŒm ißlevselliği sağlayan bir Python sınıfıdır. @@ -150,7 +150,7 @@ Ayrıca, API'ınızla iletißim kuracak önyĂŒz, mobil veya IoT uygulamaları gi ### Adım 2: Bir `FastAPI` "Örneği" Olußturalım ```Python hl_lines="3" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` Burada `app` değißkeni `FastAPI` sınıfının bir örneği olacaktır. @@ -172,7 +172,7 @@ $ uvicorn main:app --reload Uygulamanızı aßağıdaki gibi olußturursanız: ```Python hl_lines="3" -{!../../../docs_src/first_steps/tutorial002.py!} +{!../../docs_src/first_steps/tutorial002.py!} ``` Ve bunu `main.py` dosyasına yerleßtirirseniz eğer `uvicorn` komutunu ßu ßekilde çalıßtırabilirsiniz: @@ -251,7 +251,7 @@ Biz de onları "**operasyonlar**" olarak adlandıracağız. #### Bir *Yol Operasyonu DekoratörĂŒ* Tanımlayalım ```Python hl_lines="6" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` `@app.get("/")` dekoratörĂŒ, **FastAPI**'a hemen altındaki fonksiyonun aßağıdaki durumlardan sorumlu olduğunu söyler: @@ -307,7 +307,7 @@ Aßağıdaki, bizim **yol operasyonu fonksiyonumuzdur**: * **fonksiyon**: "dekoratör"ĂŒn (`@app.get("/")`'in) altındaki fonksiyondur. ```Python hl_lines="7" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` Bu bir Python fonksiyonudur. @@ -321,7 +321,7 @@ Bu durumda bu fonksiyon bir `async` fonksiyondur. Bu fonksiyonu `async def` yerine normal bir fonksiyon olarak da tanımlayabilirsiniz. ```Python hl_lines="7" -{!../../../docs_src/first_steps/tutorial003.py!} +{!../../docs_src/first_steps/tutorial003.py!} ``` /// note | "Not" @@ -333,7 +333,7 @@ Eğer farkı bilmiyorsanız, [Async: *"Aceleniz mi var?"*](../async.md#in-a-hurr ### Adım 5: İçeriği Geri DöndĂŒrĂŒn ```Python hl_lines="8" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` Bir `dict`, `list` veya `str`, `int` gibi tekil değerler döndĂŒrebilirsiniz. diff --git a/docs/tr/docs/tutorial/path-params.md b/docs/tr/docs/tutorial/path-params.md index d36242083..9017d99ab 100644 --- a/docs/tr/docs/tutorial/path-params.md +++ b/docs/tr/docs/tutorial/path-params.md @@ -3,7 +3,7 @@ Yol "parametrelerini" veya "değißkenlerini" Python string biçimlemede kullanılan sözdizimi ile tanımlayabilirsiniz. ```Python hl_lines="6-7" -{!../../../docs_src/path_params/tutorial001.py!} +{!../../docs_src/path_params/tutorial001.py!} ``` Yol parametresi olan `item_id`'nin değeri, fonksiyonunuza `item_id` argĂŒmanı olarak aktarılacaktır. @@ -19,7 +19,7 @@ Eğer bu örneği çalıßtırıp ../../../docs_src/query_params/tutorial002_py310.py!} +{!> ../../docs_src/query_params/tutorial002_py310.py!} ``` //// @@ -74,7 +74,7 @@ Aynı ßekilde, varsayılan değerlerini `None` olarak atayarak isteğe bağlı //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params/tutorial002.py!} +{!> ../../docs_src/query_params/tutorial002.py!} ``` //// @@ -94,7 +94,7 @@ Aßağıda görĂŒldĂŒÄŸĂŒ gibi dönĂŒĆŸtĂŒrĂŒlmek ĂŒzere `bool` tipleri de tanı //// tab | Python 3.10+ ```Python hl_lines="7" -{!> ../../../docs_src/query_params/tutorial003_py310.py!} +{!> ../../docs_src/query_params/tutorial003_py310.py!} ``` //// @@ -102,7 +102,7 @@ Aßağıda görĂŒldĂŒÄŸĂŒ gibi dönĂŒĆŸtĂŒrĂŒlmek ĂŒzere `bool` tipleri de tanı //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/query_params/tutorial003.py!} +{!> ../../docs_src/query_params/tutorial003.py!} ``` //// @@ -151,7 +151,7 @@ Ve parametreleri, herhangi bir sıraya koymanıza da gerek yoktur. //// tab | Python 3.10+ ```Python hl_lines="6 8" -{!> ../../../docs_src/query_params/tutorial004_py310.py!} +{!> ../../docs_src/query_params/tutorial004_py310.py!} ``` //// @@ -159,7 +159,7 @@ Ve parametreleri, herhangi bir sıraya koymanıza da gerek yoktur. //// tab | Python 3.8+ ```Python hl_lines="8 10" -{!> ../../../docs_src/query_params/tutorial004.py!} +{!> ../../docs_src/query_params/tutorial004.py!} ``` //// @@ -173,7 +173,7 @@ Parametre için belirli bir değer atamak istemeyip parametrenin sadece isteğe Fakat, bir sorgu parametresini zorunlu yapmak istiyorsanız varsayılan bir değer atamamanız yeterli olacaktır: ```Python hl_lines="6-7" -{!../../../docs_src/query_params/tutorial005.py!} +{!../../docs_src/query_params/tutorial005.py!} ``` Burada `needy` parametresi `str` tipinden olußan zorunlu bir sorgu parametresidir. @@ -223,7 +223,7 @@ Ve elbette, bazı parametreleri zorunlu, bazılarını varsayılan değerli ve b //// tab | Python 3.10+ ```Python hl_lines="8" -{!> ../../../docs_src/query_params/tutorial006_py310.py!} +{!> ../../docs_src/query_params/tutorial006_py310.py!} ``` //// @@ -231,7 +231,7 @@ Ve elbette, bazı parametreleri zorunlu, bazılarını varsayılan değerli ve b //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/query_params/tutorial006.py!} +{!> ../../docs_src/query_params/tutorial006.py!} ``` //// diff --git a/docs/tr/docs/tutorial/request-forms.md b/docs/tr/docs/tutorial/request-forms.md index 8e8ccfba4..19b6150ff 100644 --- a/docs/tr/docs/tutorial/request-forms.md +++ b/docs/tr/docs/tutorial/request-forms.md @@ -17,7 +17,7 @@ Formları kullanmak için öncelikle ../../../docs_src/request_forms/tutorial001_an_py39.py!} +{!> ../../docs_src/request_forms/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ Formları kullanmak için öncelikle ../../../docs_src/request_forms/tutorial001_an.py!} +{!> ../../docs_src/request_forms/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="1" -{!> ../../../docs_src/request_forms/tutorial001.py!} +{!> ../../docs_src/request_forms/tutorial001.py!} ``` //// @@ -51,7 +51,7 @@ Form parametrelerini `Body` veya `Query` için yaptığınız gibi olußturun: //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/request_forms/tutorial001_an_py39.py!} +{!> ../../docs_src/request_forms/tutorial001_an_py39.py!} ``` //// @@ -59,7 +59,7 @@ Form parametrelerini `Body` veya `Query` için yaptığınız gibi olußturun: //// tab | Python 3.8+ ```Python hl_lines="8" -{!> ../../../docs_src/request_forms/tutorial001_an.py!} +{!> ../../docs_src/request_forms/tutorial001_an.py!} ``` //// @@ -73,7 +73,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="7" -{!> ../../../docs_src/request_forms/tutorial001.py!} +{!> ../../docs_src/request_forms/tutorial001.py!} ``` //// diff --git a/docs/tr/docs/tutorial/static-files.md b/docs/tr/docs/tutorial/static-files.md index b82be611f..8bff59744 100644 --- a/docs/tr/docs/tutorial/static-files.md +++ b/docs/tr/docs/tutorial/static-files.md @@ -8,7 +8,7 @@ * Bir `StaticFiles()` örneğini belirli bir yola bağlayın. ```Python hl_lines="2 6" -{!../../../docs_src/static_files/tutorial001.py!} +{!../../docs_src/static_files/tutorial001.py!} ``` /// note | "Teknik Detaylar" diff --git a/docs/uk/docs/python-types.md b/docs/uk/docs/python-types.md index 511a5264a..573b5372c 100644 --- a/docs/uk/docs/python-types.md +++ b/docs/uk/docs/python-types.md @@ -23,7 +23,7 @@ Python ĐżŃ–ĐŽŃ‚Ń€ĐžĐŒŃƒŃ” ĐŽĐŸĐŽĐ°Ń‚ĐșĐŸĐČі "піЮĐșазĐșĐž топу" ("type ДаĐČаĐčтД ĐżĐŸŃ‡ĐœĐ”ĐŒĐŸ Đ· ĐżŃ€ĐŸŃŃ‚ĐŸĐłĐŸ проĐșлаЎу: ```Python -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` ВоĐșлОĐș цієї ĐżŃ€ĐŸĐłŃ€Đ°ĐŒĐž ĐČĐžĐČĐŸĐŽĐžŃ‚ŃŒ: @@ -39,7 +39,7 @@ John Doe * ĐšĐŸĐœĐșĐ°Ń‚Đ”ĐœŃƒŃ” їх Ń€Đ°Đ·ĐŸĐŒ Ń–Đ· ĐżŃ€ĐŸĐ±Ń–Đ»ĐŸĐŒ ĐżĐŸ ŃĐ”Ń€Đ”ĐŽĐžĐœŃ–. ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` ### РДЎагуĐčтД цД @@ -83,7 +83,7 @@ John Doe ĐŠĐ” "type hints": ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial002.py!} +{!../../docs_src/python_types/tutorial002.py!} ``` ĐŠĐ” ĐœĐ” тД ŃĐ°ĐŒĐ”, Ń‰ĐŸ ĐŸĐłĐŸĐ»ĐŸŃˆĐ”ĐœĐœŃ Đ·ĐœĐ°Ń‡Đ”ĐœŃŒ за Đ·Đ°ĐŒĐŸĐČчуĐČĐ°ĐœĐœŃĐŒ, яĐș цД Đ±ŃƒĐ»ĐŸ б Đ·: @@ -113,7 +113,7 @@ John Doe ĐŸĐ”Ń€Đ”ĐČіртД цю Ń„ŃƒĐœĐșцію, ĐČĐŸĐœĐ° ĐČжД ĐŒĐ°Ń” Đ°ĐœĐŸŃ‚Đ°Ń†Ń–ŃŽ топу: ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial003.py!} +{!../../docs_src/python_types/tutorial003.py!} ``` ОсĐșŃ–Đ»ŃŒĐșĐž рДЎаĐșŃ‚ĐŸŃ€ Đ·ĐœĐ°Ń” топо Đ·ĐŒŃ–ĐœĐœĐžŃ…, ĐČĐž ĐœĐ” Ń‚Ń–Đ»ŃŒĐșĐž ĐŸŃ‚Ń€ĐžĐŒĐ°Ń”Ń‚Đ” аĐČŃ‚ĐŸĐ·Đ°ĐżĐŸĐČĐœĐ”ĐœĐœŃ, ĐČĐž таĐșĐŸĐ¶ ĐŸŃ‚Ń€ĐžĐŒĐ°Ń”Ń‚Đ” пДрДĐČірĐșу ĐżĐŸĐŒĐžĐ»ĐŸĐș: @@ -123,7 +123,7 @@ John Doe йДпДр ĐČĐž Đ·ĐœĐ°Ń”Ń‚Đ”, Ń‰ĐŸĐ± ĐČопраĐČото цД, ĐČĐ°ĐŒ ĐżĐŸŃ‚Ń€Ń–Đ±ĐœĐŸ пДрДтĐČĐŸŃ€ĐžŃ‚Đž `age` у ŃŃ‚Ń€ĐŸĐșу Đ· ĐŽĐŸĐżĐŸĐŒĐŸĐłĐŸŃŽ `str(age)`: ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial004.py!} +{!../../docs_src/python_types/tutorial004.py!} ``` ## ĐžĐłĐŸĐ»ĐŸŃˆĐ”ĐœĐœŃ топіĐČ @@ -144,7 +144,7 @@ John Doe * `bytes` ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial005.py!} +{!../../docs_src/python_types/tutorial005.py!} ``` ### Generic-топо Đ· ĐżĐ°Ń€Đ°ĐŒĐ”Ń‚Ń€Đ°ĐŒĐž топіĐČ @@ -172,7 +172,7 @@ John Doe З ĐŒĐŸĐŽŃƒĐ»Ń `typing`, Ń–ĐŒĐżĐŸŃ€Ń‚ŃƒŃ”ĐŒĐŸ `List` (Đ· ĐČДлОĐșĐŸŃ— літДрО `L`): ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial006.py!} +{!> ../../docs_src/python_types/tutorial006.py!} ``` ĐžĐłĐŸĐ»ĐŸŃĐžĐŒĐŸ Đ·ĐŒŃ–ĐœĐœŃƒ Đ· Ń‚ĐžĐŒ ŃĐ°ĐŒĐžĐŒ ŃĐžĐœŃ‚Đ°ĐșŃĐžŃĐŸĐŒ ĐŽĐČĐŸĐșрапĐșĐž (`:`). @@ -182,7 +182,7 @@ John Doe ОсĐșŃ–Đ»ŃŒĐșĐž ŃĐżĐžŃĐŸĐș є Ń‚ĐžĐżĐŸĐŒ, яĐșĐžĐč ĐŒŃ–ŃŃ‚ĐžŃ‚ŃŒ ĐŽĐ”ŃĐșі ĐČĐœŃƒŃ‚Ń€Ń–ŃˆĐœŃ– топо, ĐČĐž ĐżĐŸĐŒŃ–Ń‰Đ°Ń”Ń‚Đ” їх у ĐșĐČĐ°ĐŽŃ€Đ°Ń‚ĐœŃ– ЎужĐșĐž: ```Python hl_lines="4" -{!> ../../../docs_src/python_types/tutorial006.py!} +{!> ../../docs_src/python_types/tutorial006.py!} ``` //// @@ -196,7 +196,7 @@ John Doe ОсĐșŃ–Đ»ŃŒĐșĐž ŃĐżĐžŃĐŸĐș є Ń‚ĐžĐżĐŸĐŒ, яĐșĐžĐč ĐŒŃ–ŃŃ‚ĐžŃ‚ŃŒ ĐŽĐ”ŃĐșі ĐČĐœŃƒŃ‚Ń€Ń–ŃˆĐœŃ– топо, ĐČĐž ĐżĐŸĐŒŃ–Ń‰Đ°Ń”Ń‚Đ” їх у ĐșĐČĐ°ĐŽŃ€Đ°Ń‚ĐœŃ– ЎужĐșĐž: ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial006_py39.py!} +{!> ../../docs_src/python_types/tutorial006_py39.py!} ``` //// @@ -234,7 +234,7 @@ John Doe //// tab | Python 3.8 і ĐČОщД ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial007.py!} +{!> ../../docs_src/python_types/tutorial007.py!} ``` //// @@ -242,7 +242,7 @@ John Doe //// tab | Python 3.9 і ĐČОщД ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial007_py39.py!} +{!> ../../docs_src/python_types/tutorial007_py39.py!} ``` //// @@ -263,7 +263,7 @@ John Doe //// tab | Python 3.8 і ĐČОщД ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial008.py!} +{!> ../../docs_src/python_types/tutorial008.py!} ``` //// @@ -271,7 +271,7 @@ John Doe //// tab | Python 3.9 і ĐČОщД ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial008_py39.py!} +{!> ../../docs_src/python_types/tutorial008_py39.py!} ``` //// @@ -293,7 +293,7 @@ John Doe //// tab | Python 3.8 і ĐČОщД ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial008b.py!} +{!> ../../docs_src/python_types/tutorial008b.py!} ``` //// @@ -301,7 +301,7 @@ John Doe //// tab | Python 3.10 і ĐČОщД ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial008b_py310.py!} +{!> ../../docs_src/python_types/tutorial008b_py310.py!} ``` //// @@ -315,7 +315,7 @@ John Doe ĐŁ Python 3.6 і ĐČОщД (ĐČĐșлючаючО Python 3.10) ĐČĐž ĐŒĐŸĐ¶Đ”Ń‚Đ” ĐŸĐłĐŸĐ»ĐŸŃĐžŃ‚Đž ĐčĐŸĐłĐŸ, Ń–ĐŒĐżĐŸŃ€Ń‚ŃƒĐČаĐČшО та ĐČĐžĐșĐŸŃ€ĐžŃŃ‚ĐŸĐČуючо `Optional` Đ· ĐŒĐŸĐŽŃƒĐ»Ń `typing`. ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009.py!} +{!../../docs_src/python_types/tutorial009.py!} ``` ВоĐșĐŸŃ€ĐžŃŃ‚Đ°ĐœĐœŃ `Optional[str]` Đ·Đ°ĐŒŃ–ŃŃ‚ŃŒ ĐżŃ€ĐŸŃŃ‚ĐŸ `str` ĐŽĐŸĐ·ĐČĐŸĐ»ĐžŃ‚ŃŒ рДЎаĐșŃ‚ĐŸŃ€Ńƒ ĐŽĐŸĐżĐŸĐŒĐŸĐłŃ‚Đž ĐČĐ°ĐŒ ĐČояĐČото ĐżĐŸĐŒĐžĐ»ĐșĐž, ĐșĐŸĐ»Đž ĐČĐž ĐŒĐŸĐłĐ»Đž б ĐČĐČажатО, Ń‰ĐŸ Đ·ĐœĐ°Ń‡Đ”ĐœĐœŃĐŒ заĐČжЎО є `str`, Ń…ĐŸŃ‡Đ° ĐœĐ°ŃĐżŃ€Đ°ĐČЮі ĐČĐŸĐœĐŸ таĐșĐŸĐ¶ ĐŒĐŸĐ¶Đ” Đ±ŃƒŃ‚Đž `None`. @@ -327,7 +327,7 @@ John Doe //// tab | Python 3.8 і ĐČОщД ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial009.py!} +{!> ../../docs_src/python_types/tutorial009.py!} ``` //// @@ -335,7 +335,7 @@ John Doe //// tab | Python 3.8 і ĐČОщД - Đ°Đ»ŃŒŃ‚Đ”Ń€ĐœĐ°Ń‚ĐžĐČа ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial009b.py!} +{!> ../../docs_src/python_types/tutorial009b.py!} ``` //// @@ -343,7 +343,7 @@ John Doe //// tab | Python 3.10 і ĐČОщД ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial009_py310.py!} +{!> ../../docs_src/python_types/tutorial009_py310.py!} ``` //// @@ -407,13 +407,13 @@ John Doe ĐĄĐșĐ°Đ¶Ń–ĐŒĐŸ, у ĐČас є Đșлас `Person` Đ· Ń–ĐŒÊŒŃĐŒ: ```Python hl_lines="1-3" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` ĐŸĐŸŃ‚Ń–ĐŒ ĐČĐž ĐŒĐŸĐ¶Đ”Ń‚Đ” ĐŸĐłĐŸĐ»ĐŸŃĐžŃ‚Đž Đ·ĐŒŃ–ĐœĐœŃƒ топу `Person`: ```Python hl_lines="6" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` І Đ·ĐœĐŸĐČу ж таĐșĐž, ĐČĐž ĐŸŃ‚Ń€ĐžĐŒŃƒŃ”Ń‚Đ” ĐČсю ĐżŃ–ĐŽŃ‚Ń€ĐžĐŒĐșу рДЎаĐșŃ‚ĐŸŃ€Đ°: @@ -437,7 +437,7 @@ John Doe //// tab | Python 3.8 і ĐČОщД ```Python -{!> ../../../docs_src/python_types/tutorial011.py!} +{!> ../../docs_src/python_types/tutorial011.py!} ``` //// @@ -445,7 +445,7 @@ John Doe //// tab | Python 3.9 і ĐČОщД ```Python -{!> ../../../docs_src/python_types/tutorial011_py39.py!} +{!> ../../docs_src/python_types/tutorial011_py39.py!} ``` //// @@ -453,7 +453,7 @@ John Doe //// tab | Python 3.10 і ĐČОщД ```Python -{!> ../../../docs_src/python_types/tutorial011_py310.py!} +{!> ../../docs_src/python_types/tutorial011_py310.py!} ``` //// diff --git a/docs/uk/docs/tutorial/body-fields.md b/docs/uk/docs/tutorial/body-fields.md index e4d5b1fad..b1f645932 100644 --- a/docs/uk/docs/tutorial/body-fields.md +++ b/docs/uk/docs/tutorial/body-fields.md @@ -9,7 +9,7 @@ //// tab | Python 3.10+ ```Python hl_lines="4" -{!> ../../../docs_src/body_fields/tutorial001_an_py310.py!} +{!> ../../docs_src/body_fields/tutorial001_an_py310.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | Python 3.9+ ```Python hl_lines="4" -{!> ../../../docs_src/body_fields/tutorial001_an_py39.py!} +{!> ../../docs_src/body_fields/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ //// tab | Python 3.8+ ```Python hl_lines="4" -{!> ../../../docs_src/body_fields/tutorial001_an.py!} +{!> ../../docs_src/body_fields/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ /// ```Python hl_lines="2" -{!> ../../../docs_src/body_fields/tutorial001_py310.py!} +{!> ../../docs_src/body_fields/tutorial001_py310.py!} ``` //// @@ -53,7 +53,7 @@ /// ```Python hl_lines="4" -{!> ../../../docs_src/body_fields/tutorial001.py!} +{!> ../../docs_src/body_fields/tutorial001.py!} ``` //// @@ -71,7 +71,7 @@ //// tab | Python 3.10+ ```Python hl_lines="11-14" -{!> ../../../docs_src/body_fields/tutorial001_an_py310.py!} +{!> ../../docs_src/body_fields/tutorial001_an_py310.py!} ``` //// @@ -79,7 +79,7 @@ //// tab | Python 3.9+ ```Python hl_lines="11-14" -{!> ../../../docs_src/body_fields/tutorial001_an_py39.py!} +{!> ../../docs_src/body_fields/tutorial001_an_py39.py!} ``` //// @@ -87,7 +87,7 @@ //// tab | Python 3.8+ ```Python hl_lines="12-15" -{!> ../../../docs_src/body_fields/tutorial001_an.py!} +{!> ../../docs_src/body_fields/tutorial001_an.py!} ``` //// @@ -101,7 +101,7 @@ /// ```Python hl_lines="9-12" -{!> ../../../docs_src/body_fields/tutorial001_py310.py!} +{!> ../../docs_src/body_fields/tutorial001_py310.py!} ``` //// @@ -115,7 +115,7 @@ /// ```Python hl_lines="11-14" -{!> ../../../docs_src/body_fields/tutorial001.py!} +{!> ../../docs_src/body_fields/tutorial001.py!} ``` //// diff --git a/docs/uk/docs/tutorial/body.md b/docs/uk/docs/tutorial/body.md index 50fd76f84..1e4188831 100644 --- a/docs/uk/docs/tutorial/body.md +++ b/docs/uk/docs/tutorial/body.md @@ -25,7 +25,7 @@ //// tab | Python 3.8 і ĐČОщД ```Python hl_lines="4" -{!> ../../../docs_src/body/tutorial001.py!} +{!> ../../docs_src/body/tutorial001.py!} ``` //// @@ -33,7 +33,7 @@ //// tab | Python 3.10 і ĐČОщД ```Python hl_lines="2" -{!> ../../../docs_src/body/tutorial001_py310.py!} +{!> ../../docs_src/body/tutorial001_py310.py!} ``` //// @@ -47,7 +47,7 @@ //// tab | Python 3.8 і ĐČОщД ```Python hl_lines="7-11" -{!> ../../../docs_src/body/tutorial001.py!} +{!> ../../docs_src/body/tutorial001.py!} ``` //// @@ -55,7 +55,7 @@ //// tab | Python 3.10 і ĐČОщД ```Python hl_lines="5-9" -{!> ../../../docs_src/body/tutorial001_py310.py!} +{!> ../../docs_src/body/tutorial001_py310.py!} ``` //// @@ -89,7 +89,7 @@ //// tab | Python 3.8 і ĐČОщД ```Python hl_lines="18" -{!> ../../../docs_src/body/tutorial001.py!} +{!> ../../docs_src/body/tutorial001.py!} ``` //// @@ -97,7 +97,7 @@ //// tab | Python 3.10 і ĐČОщД ```Python hl_lines="16" -{!> ../../../docs_src/body/tutorial001_py310.py!} +{!> ../../docs_src/body/tutorial001_py310.py!} ``` //// @@ -170,7 +170,7 @@ //// tab | Python 3.8 і ĐČОщД ```Python hl_lines="21" -{!> ../../../docs_src/body/tutorial002.py!} +{!> ../../docs_src/body/tutorial002.py!} ``` //// @@ -178,7 +178,7 @@ //// tab | Python 3.10 і ĐČОщД ```Python hl_lines="19" -{!> ../../../docs_src/body/tutorial002_py310.py!} +{!> ../../docs_src/body/tutorial002_py310.py!} ``` //// @@ -192,7 +192,7 @@ //// tab | Python 3.8 і ĐČОщД ```Python hl_lines="17-18" -{!> ../../../docs_src/body/tutorial003.py!} +{!> ../../docs_src/body/tutorial003.py!} ``` //// @@ -200,7 +200,7 @@ //// tab | Python 3.10 і ĐČОщД ```Python hl_lines="15-16" -{!> ../../../docs_src/body/tutorial003_py310.py!} +{!> ../../docs_src/body/tutorial003_py310.py!} ``` //// @@ -214,7 +214,7 @@ //// tab | Python 3.8 і ĐČОщД ```Python hl_lines="18" -{!> ../../../docs_src/body/tutorial004.py!} +{!> ../../docs_src/body/tutorial004.py!} ``` //// @@ -222,7 +222,7 @@ //// tab | Python 3.10 і ĐČОщД ```Python hl_lines="16" -{!> ../../../docs_src/body/tutorial004_py310.py!} +{!> ../../docs_src/body/tutorial004_py310.py!} ``` //// diff --git a/docs/uk/docs/tutorial/cookie-params.md b/docs/uk/docs/tutorial/cookie-params.md index 4720a42ba..40ca4f6e6 100644 --- a/docs/uk/docs/tutorial/cookie-params.md +++ b/docs/uk/docs/tutorial/cookie-params.md @@ -9,7 +9,7 @@ //// tab | Python 3.10+ ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py310.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ //// tab | Python 3.8+ ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001_an.py!} +{!> ../../docs_src/cookie_params/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ /// ```Python hl_lines="1" -{!> ../../../docs_src/cookie_params/tutorial001_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_py310.py!} ``` //// @@ -53,7 +53,7 @@ /// ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001.py!} +{!> ../../docs_src/cookie_params/tutorial001.py!} ``` //// @@ -67,7 +67,7 @@ //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py310.py!} ``` //// @@ -75,7 +75,7 @@ //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py39.py!} ``` //// @@ -83,7 +83,7 @@ //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/cookie_params/tutorial001_an.py!} +{!> ../../docs_src/cookie_params/tutorial001_an.py!} ``` //// @@ -97,7 +97,7 @@ /// ```Python hl_lines="7" -{!> ../../../docs_src/cookie_params/tutorial001_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_py310.py!} ``` //// @@ -111,7 +111,7 @@ /// ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001.py!} +{!> ../../docs_src/cookie_params/tutorial001.py!} ``` //// diff --git a/docs/uk/docs/tutorial/encoder.md b/docs/uk/docs/tutorial/encoder.md index 9ef8d5c5d..39dca9be8 100644 --- a/docs/uk/docs/tutorial/encoder.md +++ b/docs/uk/docs/tutorial/encoder.md @@ -23,7 +23,7 @@ //// tab | Python 3.10+ ```Python hl_lines="4 21" -{!> ../../../docs_src/encoder/tutorial001_py310.py!} +{!> ../../docs_src/encoder/tutorial001_py310.py!} ``` //// @@ -31,7 +31,7 @@ //// tab | Python 3.8+ ```Python hl_lines="5 22" -{!> ../../../docs_src/encoder/tutorial001.py!} +{!> ../../docs_src/encoder/tutorial001.py!} ``` //// diff --git a/docs/uk/docs/tutorial/extra-data-types.md b/docs/uk/docs/tutorial/extra-data-types.md index 54cbd4b00..5e6c364e4 100644 --- a/docs/uk/docs/tutorial/extra-data-types.md +++ b/docs/uk/docs/tutorial/extra-data-types.md @@ -58,7 +58,7 @@ //// tab | Python 3.10+ ```Python hl_lines="1 3 12-16" -{!> ../../../docs_src/extra_data_types/tutorial001_an_py310.py!} +{!> ../../docs_src/extra_data_types/tutorial001_an_py310.py!} ``` //// @@ -66,7 +66,7 @@ //// tab | Python 3.9+ ```Python hl_lines="1 3 12-16" -{!> ../../../docs_src/extra_data_types/tutorial001_an_py39.py!} +{!> ../../docs_src/extra_data_types/tutorial001_an_py39.py!} ``` //// @@ -74,7 +74,7 @@ //// tab | Python 3.8+ ```Python hl_lines="1 3 13-17" -{!> ../../../docs_src/extra_data_types/tutorial001_an.py!} +{!> ../../docs_src/extra_data_types/tutorial001_an.py!} ``` //// @@ -88,7 +88,7 @@ /// ```Python hl_lines="1 2 11-15" -{!> ../../../docs_src/extra_data_types/tutorial001_py310.py!} +{!> ../../docs_src/extra_data_types/tutorial001_py310.py!} ``` //// @@ -102,7 +102,7 @@ /// ```Python hl_lines="1 2 12-16" -{!> ../../../docs_src/extra_data_types/tutorial001.py!} +{!> ../../docs_src/extra_data_types/tutorial001.py!} ``` //// @@ -112,7 +112,7 @@ //// tab | Python 3.10+ ```Python hl_lines="18-19" -{!> ../../../docs_src/extra_data_types/tutorial001_an_py310.py!} +{!> ../../docs_src/extra_data_types/tutorial001_an_py310.py!} ``` //// @@ -120,7 +120,7 @@ //// tab | Python 3.9+ ```Python hl_lines="18-19" -{!> ../../../docs_src/extra_data_types/tutorial001_an_py39.py!} +{!> ../../docs_src/extra_data_types/tutorial001_an_py39.py!} ``` //// @@ -128,7 +128,7 @@ //// tab | Python 3.8+ ```Python hl_lines="19-20" -{!> ../../../docs_src/extra_data_types/tutorial001_an.py!} +{!> ../../docs_src/extra_data_types/tutorial001_an.py!} ``` //// @@ -142,7 +142,7 @@ /// ```Python hl_lines="17-18" -{!> ../../../docs_src/extra_data_types/tutorial001_py310.py!} +{!> ../../docs_src/extra_data_types/tutorial001_py310.py!} ``` //// @@ -156,7 +156,7 @@ /// ```Python hl_lines="18-19" -{!> ../../../docs_src/extra_data_types/tutorial001.py!} +{!> ../../docs_src/extra_data_types/tutorial001.py!} ``` //// diff --git a/docs/uk/docs/tutorial/first-steps.md b/docs/uk/docs/tutorial/first-steps.md index 784da65f5..6f79c0d1d 100644 --- a/docs/uk/docs/tutorial/first-steps.md +++ b/docs/uk/docs/tutorial/first-steps.md @@ -3,7 +3,7 @@ НаĐčĐżŃ€ĐŸŃŃ‚Ń–ŃˆĐžĐč фаĐčĐ» FastAPI ĐŒĐŸĐ¶Đ” ĐČĐžĐłĐ»ŃĐŽĐ°Ń‚Đž таĐș: ```Python -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` ĐĄĐșĐŸĐżŃ–ŃŽĐčтД цД ĐŽĐŸ фаĐčлу `main.py`. @@ -158,7 +158,7 @@ OpenAPI ĐŸĐżĐžŃŃƒŃ” ŃŃ…Đ”ĐŒŃƒ ĐŽĐ»Ń ĐČĐ°ŃˆĐŸĐłĐŸ API. І ця ŃŃ…Đ”ĐŒĐ° ĐČĐș ### ĐšŃ€ĐŸĐș 1: Ń–ĐŒĐżĐŸŃ€Ń‚ŃƒŃ”ĐŒĐŸ `FastAPI` ```Python hl_lines="1" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` `FastAPI` цД Đșлас у Python, яĐșĐžĐč ĐœĐ°ĐŽĐ°Ń” ĐČсю Ń„ŃƒĐœĐșŃ†Ń–ĐŸĐœĐ°Đ»ŃŒĐœŃ–ŃŃ‚ŃŒ ĐŽĐ»Ń API. @@ -174,7 +174,7 @@ OpenAPI ĐŸĐżĐžŃŃƒŃ” ŃŃ…Đ”ĐŒŃƒ ĐŽĐ»Ń ĐČĐ°ŃˆĐŸĐłĐŸ API. І ця ŃŃ…Đ”ĐŒĐ° ĐČĐș ### ĐšŃ€ĐŸĐș 2: стĐČĐŸŃ€ŃŽŃ”ĐŒĐŸ Đ”ĐșĐ·Đ”ĐŒĐżĐ»ŃŃ€ `FastAPI` ```Python hl_lines="3" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` Đ—ĐŒŃ–ĐœĐœĐ° `app` є Đ”ĐșĐ·Đ”ĐŒĐżĐ»ŃŃ€ĐŸĐŒ Đșласу `FastAPI`. @@ -243,7 +243,7 @@ https://example.com/items/foo #### Đ’ĐžĐ·ĐœĐ°Ń‡Ń‚Đ” ĐŽĐ”ĐșĐŸŃ€Đ°Ń‚ĐŸŃ€ ĐŸĐżĐ”Ń€Đ°Ń†Ń–Ń— ŃˆĐ»ŃŃ…Ńƒ (path operation decorator) ```Python hl_lines="6" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` ДДĐșĐŸŃ€Đ°Ń‚ĐŸŃ€ `@app.get("/")` ĐČĐșĐ°Đ·ŃƒŃ” **FastAPI**, Ń‰ĐŸ Ń„ŃƒĐœĐșція ĐœĐžĐ¶Ń‡Đ”, ĐČŃ–ĐŽĐżĐŸĐČіЮає за ĐŸĐ±Ń€ĐŸĐ±Đșу запОтіĐČ, яĐșі ĐœĐ°ĐŽŃ…ĐŸĐŽŃŃ‚ŃŒ ĐŽĐŸ ĐœĐ”Ń—: @@ -298,7 +298,7 @@ https://example.com/items/foo * **Ń„ŃƒĐœĐșція**: цД Ń„ŃƒĐœĐșція, яĐșа Đ·ĐœĐ°Ń…ĐŸĐŽĐžŃ‚ŃŒŃŃ ĐœĐžĐ¶Ń‡Đ” "ĐŽĐ”ĐșĐŸŃ€Đ°Ń‚ĐŸŃ€Đ°" (ĐœĐžĐ¶Ń‡Đ” `@app.get("/")`). ```Python hl_lines="7" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` ĐŠĐ” Đ·ĐČочаĐčĐœĐ° Ń„ŃƒĐœĐșція Python. @@ -312,7 +312,7 @@ FastAPI ĐČĐžĐșлОĐșĐ°Ń‚ĐžĐŒĐ” її Ń‰ĐŸŃ€Đ°Đ·Ńƒ, ĐșĐŸĐ»Đž ĐŸŃ‚Ń€ĐžĐŒĐ°Ń” зап Во таĐșĐŸĐ¶ ĐŒĐŸĐ¶Đ”Ń‚Đ” ĐČĐžĐ·ĐœĐ°Ń‡ĐžŃ‚Đž її яĐș Đ·ĐČочаĐčĐœŃƒ Ń„ŃƒĐœĐșцію Đ·Đ°ĐŒŃ–ŃŃ‚ŃŒ `async def`: ```Python hl_lines="7" -{!../../../docs_src/first_steps/tutorial003.py!} +{!../../docs_src/first_steps/tutorial003.py!} ``` /// note | "ĐŸŃ€ĐžĐŒŃ–Ń‚Đșа" @@ -324,7 +324,7 @@ FastAPI ĐČĐžĐșлОĐșĐ°Ń‚ĐžĐŒĐ” її Ń‰ĐŸŃ€Đ°Đ·Ńƒ, ĐșĐŸĐ»Đž ĐŸŃ‚Ń€ĐžĐŒĐ°Ń” зап ### ĐšŃ€ĐŸĐș 5: ĐżĐŸĐČĐ”Ń€ĐœŃ–Ń‚ŃŒ Ń€Đ”Đ·ŃƒĐ»ŃŒŃ‚Đ°Ń‚ ```Python hl_lines="8" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` Во ĐŒĐŸĐ¶Đ”Ń‚Đ” ĐżĐŸĐČĐ”Ń€ĐœŃƒŃ‚Đž `dict`, `list`, а таĐșĐŸĐ¶ ĐŸĐșŃ€Đ”ĐŒŃ– Đ·ĐœĐ°Ń‡Đ”ĐœĐœŃ `str`, `int`, ітЮ. diff --git a/docs/vi/docs/python-types.md b/docs/vi/docs/python-types.md index 99d1d207f..275b0eb39 100644 --- a/docs/vi/docs/python-types.md +++ b/docs/vi/docs/python-types.md @@ -23,7 +23,7 @@ Náșżu báșĄn lĂ  một chuyĂȘn gia về Python, vĂ  báșĄn đã biáșżt mọi thứ HĂŁy báșŻt đáș§u với một vĂ­ dỄ Ä‘ÆĄn giáșŁn: ```Python -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` Káșżt quáșŁ khi gọi chÆ°ÆĄng trĂŹnh nĂ y: @@ -39,7 +39,7 @@ HĂ m thá»±c hiện như sau: * Nối chĂșng láșĄi với nhau báș±ng một kĂ­ tá»± tráșŻng ở giữa. ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` ### Sá»­a đổi @@ -83,7 +83,7 @@ ChĂ­nh lĂ  nĂł. Những thứ đó lĂ  "type hints": ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial002.py!} +{!../../docs_src/python_types/tutorial002.py!} ``` Đó khĂŽng giống như khai bĂĄo những giĂĄ trị máș·c định giống như: @@ -113,7 +113,7 @@ Với cĂĄi đó, báșĄn cĂł thể cuộn, nhĂŹn tháș„y cĂĄc lá»±a chọn, cho đ Kiểm tra hĂ m nĂ y, nĂł đã cĂł gợi Ăœ kiểu dữ liệu: ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial003.py!} +{!../../docs_src/python_types/tutorial003.py!} ``` Bởi vĂŹ trĂŹnh soáșĄn tháșŁo biáșżt kiểu dữ liệu cá»§a cĂĄc biáșżn, báșĄn khĂŽng chỉ cĂł Ä‘Æ°á»Łc completion, báșĄn cĆ©ng Ä‘Æ°á»Łc kiểm tra lỗi: @@ -123,7 +123,7 @@ Bởi vĂŹ trĂŹnh soáșĄn tháșŁo biáșżt kiểu dữ liệu cá»§a cĂĄc biáșżn, báșĄ BĂąy giờ báșĄn biáșżt ráș±ng báșĄn pháșŁi sá»­a nĂł, chuyển `age` sang một xĂąu với `str(age)`: ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial004.py!} +{!../../docs_src/python_types/tutorial004.py!} ``` ## Khai bĂĄo cĂĄc kiểu dữ liệu @@ -144,7 +144,7 @@ BáșĄn cĂł thể sá»­ dỄng, vĂ­ dỄ: * `bytes` ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial005.py!} +{!../../docs_src/python_types/tutorial005.py!} ``` ### CĂĄc kiểu dữ liệu tổng quĂĄt với tham số kiểu dữ liệu @@ -182,7 +182,7 @@ TÆ°ÆĄng tá»± kiểu dữ liệu `list`. Như danh sĂĄch lĂ  một kiểu dữ liệu chứa một vĂ i kiểu dữ liệu cĂł sáș”n, báșĄn đáș·t chĂșng trong cĂĄc dáș„u ngoáș·c vuĂŽng: ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial006_py39.py!} +{!> ../../docs_src/python_types/tutorial006_py39.py!} ``` //// @@ -192,7 +192,7 @@ Như danh sĂĄch lĂ  một kiểu dữ liệu chứa một vĂ i kiểu dữ liệ Từ `typing`, import `List` (với chữ cĂĄi `L` viáșżt hoa): ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial006.py!} +{!> ../../docs_src/python_types/tutorial006.py!} ``` Khai bĂĄo biáșżn với cĂčng dáș„u hai cháș„m (`:`). @@ -202,7 +202,7 @@ TÆ°ÆĄng tá»± như kiểu dữ liệu, `List` báșĄn import từ `typing`. Như danh sĂĄch lĂ  một kiểu dữ liệu chứa cĂĄc kiểu dữ liệu cĂł sáș”n, báșĄn đáș·t chĂșng bĂȘn trong dáș„u ngoáș·c vuĂŽng: ```Python hl_lines="4" -{!> ../../../docs_src/python_types/tutorial006.py!} +{!> ../../docs_src/python_types/tutorial006.py!} ``` //// @@ -240,7 +240,7 @@ BáșĄn sáșœ lĂ m điều tÆ°ÆĄng tá»± để khai bĂĄo cĂĄc `tuple` vĂ  cĂĄc `set //// tab | Python 3.9+ ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial007_py39.py!} +{!> ../../docs_src/python_types/tutorial007_py39.py!} ``` //// @@ -248,7 +248,7 @@ BáșĄn sáșœ lĂ m điều tÆ°ÆĄng tá»± để khai bĂĄo cĂĄc `tuple` vĂ  cĂĄc `set //// tab | Python 3.8+ ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial007.py!} +{!> ../../docs_src/python_types/tutorial007.py!} ``` //// @@ -269,7 +269,7 @@ Tham số kiểu dữ liệu thứ hai dĂ nh cho giĂĄ trị cá»§a `dict`. //// tab | Python 3.9+ ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial008_py39.py!} +{!> ../../docs_src/python_types/tutorial008_py39.py!} ``` //// @@ -277,7 +277,7 @@ Tham số kiểu dữ liệu thứ hai dĂ nh cho giĂĄ trị cá»§a `dict`. //// tab | Python 3.8+ ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial008.py!} +{!> ../../docs_src/python_types/tutorial008.py!} ``` //// @@ -302,7 +302,7 @@ Trong Python 3.10 cĆ©ng cĂł một **cĂș phĂĄp mới** mĂ  báșĄn cĂł thể đáș·t //// tab | Python 3.10+ ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial008b_py310.py!} +{!> ../../docs_src/python_types/tutorial008b_py310.py!} ``` //// @@ -310,7 +310,7 @@ Trong Python 3.10 cĆ©ng cĂł một **cĂș phĂĄp mới** mĂ  báșĄn cĂł thể đáș·t //// tab | Python 3.8+ ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial008b.py!} +{!> ../../docs_src/python_types/tutorial008b.py!} ``` //// @@ -324,7 +324,7 @@ BáșĄn cĂł thể khai bĂĄo một giĂĄ trị cĂł thể cĂł một kiểu dữ liệ Trong Python 3.6 hoáș·c lớn hÆĄn (bao gồm Python 3.10) báșĄn cĂł thể khai bĂĄo nĂł báș±ng cĂĄc import vĂ  sá»­ dỄng `Optional` từ mĂŽ đun `typing`. ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009.py!} +{!../../docs_src/python_types/tutorial009.py!} ``` Sá»­ dỄng `Optional[str]` thay cho `str` sáșœ cho phĂ©p trĂŹnh soáșĄn tháșŁo giĂșp báșĄn phĂĄt hiện cĂĄc lỗi mĂ  báșĄn cĂł thể gáș·p như một giĂĄ trị luĂŽn lĂ  một `str`, trong khi thá»±c táșż nĂł ráș„t cĂł thể lĂ  `None`. @@ -336,7 +336,7 @@ Sá»­ dỄng `Optional[str]` thay cho `str` sáșœ cho phĂ©p trĂŹnh soáșĄn tháșŁo g //// tab | Python 3.10+ ```Python hl_lines="1" -{!> ../../../docs_src/python_types/tutorial009_py310.py!} +{!> ../../docs_src/python_types/tutorial009_py310.py!} ``` //// @@ -344,7 +344,7 @@ Sá»­ dỄng `Optional[str]` thay cho `str` sáșœ cho phĂ©p trĂŹnh soáșĄn tháșŁo g //// tab | Python 3.8+ ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial009.py!} +{!> ../../docs_src/python_types/tutorial009.py!} ``` //// @@ -352,7 +352,7 @@ Sá»­ dỄng `Optional[str]` thay cho `str` sáșœ cho phĂ©p trĂŹnh soáșĄn tháșŁo g //// tab | Python 3.8+ alternative ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial009b.py!} +{!> ../../docs_src/python_types/tutorial009b.py!} ``` //// @@ -375,7 +375,7 @@ NĂł chỉ lĂ  về cĂĄc từ vĂ  tĂȘn. Nhưng những từ đó cĂł thể áșŁnh Cho một vĂ­ dỄ, hĂŁy để Ăœ hĂ m nĂ y: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009c.py!} +{!../../docs_src/python_types/tutorial009c.py!} ``` Tham số `name` Ä‘Æ°á»Łc định nghÄ©a lĂ  `Optional[str]`, nhưng nĂł **khĂŽng pháșŁi lĂ  tĂčy chọn**, báșĄn khĂŽng thể gọi hĂ m mĂ  khĂŽng cĂł tham số: @@ -393,7 +393,7 @@ say_hi(name=None) # This works, None is valid 🎉 Tin tốt lĂ , khi báșĄn sá»­ dỄng Python 3.10, báșĄn sáșœ khĂŽng pháșŁi lo láșŻng về điều đó, báșĄn sáșœ cĂł thể sá»­ dỄng `|` để định nghÄ©a hợp cá»§a cĂĄc kiểu dữ liệu một cĂĄch Ä‘ÆĄn giáșŁn: ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial009c_py310.py!} +{!../../docs_src/python_types/tutorial009c_py310.py!} ``` VĂ  sau đó, báșĄn sáșœ khĂŽng pháșŁi lo ráș±ng những cĂĄi tĂȘn như `Optional` vĂ  `Union`. 😎 @@ -458,13 +458,13 @@ BáșĄn cĆ©ng cĂł thể khai bĂĄo một lớp như lĂ  kiểu dữ liệu cá»§a m HĂŁy nĂłi ráș±ng báșĄn muốn cĂł một lớp `Person` với một tĂȘn: ```Python hl_lines="1-3" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` Sau đó báșĄn cĂł thể khai bĂĄo một biáșżn cĂł kiểu lĂ  `Person`: ```Python hl_lines="6" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` VĂ  láșĄi một láș§n nữa, báșĄn cĂł Ä‘Æ°á»Łc táș„t cáșŁ sá»± hỗ trợ từ trĂŹnh soáșĄn tháșŁo: @@ -492,7 +492,7 @@ Một vĂ­ dỄ từ tĂ i liệu chĂ­nh thức cá»§a Pydantic: //// tab | Python 3.10+ ```Python -{!> ../../../docs_src/python_types/tutorial011_py310.py!} +{!> ../../docs_src/python_types/tutorial011_py310.py!} ``` //// @@ -500,7 +500,7 @@ Một vĂ­ dỄ từ tĂ i liệu chĂ­nh thức cá»§a Pydantic: //// tab | Python 3.9+ ```Python -{!> ../../../docs_src/python_types/tutorial011_py39.py!} +{!> ../../docs_src/python_types/tutorial011_py39.py!} ``` //// @@ -508,7 +508,7 @@ Một vĂ­ dỄ từ tĂ i liệu chĂ­nh thức cá»§a Pydantic: //// tab | Python 3.8+ ```Python -{!> ../../../docs_src/python_types/tutorial011.py!} +{!> ../../docs_src/python_types/tutorial011.py!} ``` //// @@ -538,7 +538,7 @@ Python cĆ©ng cĂł một tĂ­nh năng cho phĂ©p đáș·t **metadata bổ sung** trong Trong Python 3.9, `Annotated` lĂ  một pháș§n cá»§a thư viện chuáș©n, do đó báșĄn cĂł thể import nĂł từ `typing`. ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial013_py39.py!} +{!> ../../docs_src/python_types/tutorial013_py39.py!} ``` //// @@ -550,7 +550,7 @@ Trong Python 3.9, `Annotated` lĂ  một pháș§n cá»§a thư viện chuáș©n, do đ NĂł đã Ä‘Æ°á»Łc cĂ i đáș·t sáș”ng cĂčng với **FastAPI**. ```Python hl_lines="1 4" -{!> ../../../docs_src/python_types/tutorial013.py!} +{!> ../../docs_src/python_types/tutorial013.py!} ``` //// diff --git a/docs/vi/docs/tutorial/first-steps.md b/docs/vi/docs/tutorial/first-steps.md index ce808eb91..d80d78506 100644 --- a/docs/vi/docs/tutorial/first-steps.md +++ b/docs/vi/docs/tutorial/first-steps.md @@ -3,7 +3,7 @@ Tệp tin FastAPI Ä‘ÆĄn giáșŁn nháș„t cĂł thể trĂŽng như nĂ y: ```Python -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` Sao chĂ©p sang một tệp tin `main.py`. @@ -134,7 +134,7 @@ BáșĄn cĆ©ng cĂł thể sá»­ dỄng nĂł để sinh code tá»± động, với cĂĄc c ### Bước 1: import `FastAPI` ```Python hl_lines="1" -{!../../../docs_src/first_steps/tutorial001.py!} +{!../../docs_src/first_steps/tutorial001.py!} ``` `FastAPI` lĂ  một Python class cung cáș„p táș„t cáșŁ chức năng cho API cá»§a báșĄn. @@ -150,7 +150,7 @@ BáșĄn cĆ©ng cĂł thể sá»­ dỄng táș„t cáșŁ `dataclasses` ```Python hl_lines="1 7-12 19-20" -{!../../../docs_src/dataclasses/tutorial001.py!} +{!../../docs_src/dataclasses/tutorial001.py!} ``` èż™èż˜æ˜Żć€ŸćŠ©äșŽ **Pydantic** ćŠć…¶ć†…çœźçš„Â `dataclasses`。 @@ -35,7 +35,7 @@ FastAPI ćŸșäșŽ **Pydantic** 构ć»șïŒŒć‰æ–‡ć·Čç»ä»‹ç»èż‡ćŠ‚äœ•äœżç”š Pydantic 朹 `response_model` ć‚æ•°äž­äœżç”š `dataclasses` ```Python hl_lines="1 7-13 19" -{!../../../docs_src/dataclasses/tutorial002.py!} +{!../../docs_src/dataclasses/tutorial002.py!} ``` æœŹäŸ‹æŠŠæ•°æźç±»è‡ȘćŠšèœŹæąäžș Pydantic æ•°æźç±»ă€‚ @@ -53,7 +53,7 @@ API æ–‡æĄŁäž­äčŸäŒšæ˜Ÿç€șç›žć…łæŠ‚ć›ŸïŒš æœŹäŸ‹æŠŠæ ‡ć‡†çš„ `dataclasses` ç›ŽæŽ„æ›żæąäžș `pydantic.dataclasses` ```{ .python .annotate hl_lines="1 5 8-11 14-17 23-25 28" } -{!../../../docs_src/dataclasses/tutorial003.py!} +{!../../docs_src/dataclasses/tutorial003.py!} ``` 1. æœŹäŸ‹äŸç„¶èŠä»Žæ ‡ć‡†çš„ `dataclasses` äž­ćŻŒć…„ `field` diff --git a/docs/zh/docs/advanced/events.md b/docs/zh/docs/advanced/events.md index c9389f533..e5b44f321 100644 --- a/docs/zh/docs/advanced/events.md +++ b/docs/zh/docs/advanced/events.md @@ -15,7 +15,7 @@ äœżç”š `startup` äș‹ä»¶ćŁ°æ˜Ž `app` ćŻćŠšć‰èżèĄŒçš„ć‡œæ•°ïŒš ```Python hl_lines="8" -{!../../../docs_src/events/tutorial001.py!} +{!../../docs_src/events/tutorial001.py!} ``` æœŹäŸ‹äž­ïŒŒ`startup` äș‹ä»¶ć€„ç†ć™šć‡œæ•°äžșéĄčç›źæ•°æźćș“ćȘæ˜Ż**歗慾**提䟛äș†äž€äș›ćˆć§‹ć€Œă€‚ @@ -29,7 +29,7 @@ äœżç”š `shutdown` äș‹ä»¶ćŁ°æ˜Ž `app` ć…łé—­æ—¶èżèĄŒçš„ć‡œæ•°ïŒš ```Python hl_lines="6" -{!../../../docs_src/events/tutorial002.py!} +{!../../docs_src/events/tutorial002.py!} ``` æ­€ć€„ïŒŒ`shutdown` äș‹ä»¶ć€„ç†ć™šć‡œæ•°ćœš `log.txt` äž­ć†™ć…„äž€èĄŒæ–‡æœŹ `Application shutdown`。 diff --git a/docs/zh/docs/advanced/generate-clients.md b/docs/zh/docs/advanced/generate-clients.md index 56aad3bd2..baf131361 100644 --- a/docs/zh/docs/advanced/generate-clients.md +++ b/docs/zh/docs/advanced/generate-clients.md @@ -19,7 +19,7 @@ //// tab | Python 3.9+ ```Python hl_lines="7-9 12-13 16-17 21" -{!> ../../../docs_src/generate_clients/tutorial001_py39.py!} +{!> ../../docs_src/generate_clients/tutorial001_py39.py!} ``` //// @@ -27,7 +27,7 @@ //// tab | Python 3.8+ ```Python hl_lines="9-11 14-15 18 19 23" -{!> ../../../docs_src/generate_clients/tutorial001.py!} +{!> ../../docs_src/generate_clients/tutorial001.py!} ``` //// @@ -138,7 +138,7 @@ frontend-app@1.0.0 generate-client /home/user/code/frontend-app //// tab | Python 3.9+ ```Python hl_lines="21 26 34" -{!> ../../../docs_src/generate_clients/tutorial002_py39.py!} +{!> ../../docs_src/generate_clients/tutorial002_py39.py!} ``` //// @@ -146,7 +146,7 @@ frontend-app@1.0.0 generate-client /home/user/code/frontend-app //// tab | Python 3.8+ ```Python hl_lines="23 28 36" -{!> ../../../docs_src/generate_clients/tutorial002.py!} +{!> ../../docs_src/generate_clients/tutorial002.py!} ``` //// @@ -199,7 +199,7 @@ FastAPIäžșæŻäžȘ*è·ŻćŸ„æ“äœœ*äœżç”šäž€äžȘ**支侀ID**ïŒŒćźƒç”šäșŽ**操䜜ID** //// tab | Python 3.9+ ```Python hl_lines="6-7 10" -{!> ../../../docs_src/generate_clients/tutorial003_py39.py!} +{!> ../../docs_src/generate_clients/tutorial003_py39.py!} ``` //// @@ -207,7 +207,7 @@ FastAPIäžșæŻäžȘ*è·ŻćŸ„æ“äœœ*äœżç”šäž€äžȘ**支侀ID**ïŒŒćźƒç”šäșŽ**操䜜ID** //// tab | Python 3.8+ ```Python hl_lines="8-9 12" -{!> ../../../docs_src/generate_clients/tutorial003.py!} +{!> ../../docs_src/generate_clients/tutorial003.py!} ``` //// @@ -233,7 +233,7 @@ FastAPIäžșæŻäžȘ*è·ŻćŸ„æ“äœœ*äœżç”šäž€äžȘ**支侀ID**ïŒŒćźƒç”šäșŽ**操䜜ID** æˆ‘ä»ŹćŻä»„ć°† OpenAPI JSON äž‹èœœćˆ°äž€äžȘ損äžș`openapi.json`çš„æ–‡ä»¶äž­ïŒŒç„¶ćŽäœżç”šä»„äž‹è„šæœŹ**ćˆ é™€æ­€ć‰çŒ€çš„æ ‡ç­Ÿ** ```Python -{!../../../docs_src/generate_clients/tutorial004.py!} +{!../../docs_src/generate_clients/tutorial004.py!} ``` é€šèż‡èż™æ ·ćšïŒŒæ“äœœIDć°†ä»Žç±»äŒŒäșŽ `items-get_items` çš„ćç§°é‡ć‘œćäžș `get_items` ïŒŒèż™æ ·ćźąæˆ·ç«Żç”Ÿæˆć™šć°±ćŻä»„ç”Ÿæˆæ›Žçź€æŽçš„æ–čæł•ćç§°ă€‚ diff --git a/docs/zh/docs/advanced/middleware.md b/docs/zh/docs/advanced/middleware.md index 926082b94..525dc89ac 100644 --- a/docs/zh/docs/advanced/middleware.md +++ b/docs/zh/docs/advanced/middleware.md @@ -58,7 +58,7 @@ app.add_middleware(UnicornMiddleware, some_config="rainbow") ä»»äœ•äŒ ć‘ `http` 或 `ws` çš„èŻ·æ±‚éƒœäŒšèą«é‡ćźšć‘è‡łćź‰ć…šæ–čæĄˆă€‚ ```Python hl_lines="2 6" -{!../../../docs_src/advanced_middleware/tutorial001.py!} +{!../../docs_src/advanced_middleware/tutorial001.py!} ``` ## `TrustedHostMiddleware` @@ -66,7 +66,7 @@ app.add_middleware(UnicornMiddleware, some_config="rainbow") ćŒșćˆ¶æ‰€æœ‰äŒ ć…„èŻ·æ±‚éƒœćż…éĄ»æ­ŁçĄźèźŸçœź `Host` èŻ·æ±‚ć€ŽïŒŒä»„é˜Č HTTP äž»æœșć€Žæ”»ć‡»ă€‚ ```Python hl_lines="2 6-8" -{!../../../docs_src/advanced_middleware/tutorial002.py!} +{!../../docs_src/advanced_middleware/tutorial002.py!} ``` æ”ŻæŒä»„äž‹ć‚æ•°ïŒš @@ -82,7 +82,7 @@ app.add_middleware(UnicornMiddleware, some_config="rainbow") äž­é—Žä»¶äŒšć€„ç†æ ‡ć‡†ć“ćș”äžŽæ”ć“ćș”。 ```Python hl_lines="2 6" -{!../../../docs_src/advanced_middleware/tutorial003.py!} +{!../../docs_src/advanced_middleware/tutorial003.py!} ``` æ”ŻæŒä»„äž‹ć‚æ•°ïŒš diff --git a/docs/zh/docs/advanced/openapi-callbacks.md b/docs/zh/docs/advanced/openapi-callbacks.md index 7c7323cb5..dc1c2539b 100644 --- a/docs/zh/docs/advanced/openapi-callbacks.md +++ b/docs/zh/docs/advanced/openapi-callbacks.md @@ -32,7 +32,7 @@ API 的甚户 ïŒˆć€–éƒšćŒ€ć‘è€…ïŒ‰èŠćœšæ‚šçš„ API ć†…äœżç”š POST èŻ·æ±‚ćˆ›ć»ș èż™éƒšćˆ†ä»Łç ćŸˆćžžè§„ïŒŒæ‚šćŻčç»ć€§ć€šæ•°ä»Łç ćș”èŻ„éƒœæŻ”èŸƒç†Ÿæ‚‰äș†ïŒš ```Python hl_lines="10-14 37-54" -{!../../../docs_src/openapi_callbacks/tutorial001.py!} +{!../../docs_src/openapi_callbacks/tutorial001.py!} ``` /// tip | "提ç€ș" @@ -93,7 +93,7 @@ requests.post(callback_url, json={"description": "Invoice paid", "paid": True}) éŠ–ć…ˆïŒŒæ–°ć»șćŒ…ć«äž€äș›ç”šäșŽć›žè°ƒçš„ `APIRouter`。 ```Python hl_lines="5 26" -{!../../../docs_src/openapi_callbacks/tutorial001.py!} +{!../../docs_src/openapi_callbacks/tutorial001.py!} ``` ### 戛ć»șć›žè°ƒ*è·ŻćŸ„æ“äœœ* @@ -106,7 +106,7 @@ requests.post(callback_url, json={"description": "Invoice paid", "paid": True}) * èż˜èŠćŁ°æ˜ŽèŠèż”ć›žçš„ć“ćș”ïŒŒäŸ‹ćŠ‚ïŒŒ`response_model=InvoiceEventReceived` ```Python hl_lines="17-19 22-23 29-33" -{!../../../docs_src/openapi_callbacks/tutorial001.py!} +{!../../docs_src/openapi_callbacks/tutorial001.py!} ``` ć›žè°ƒ*è·ŻćŸ„æ“äœœ*äžŽćžžè§„*è·ŻćŸ„æ“äœœ*有䞀ç‚č䞻芁ćŒșćˆ«ïŒš @@ -176,7 +176,7 @@ JSON èŻ·æ±‚äœ“ćŒ…ć«ćŠ‚äž‹ć†…ćźč çŽ°ćœšäœżç”š API *è·ŻćŸ„æ“äœœèŁ…é„°ć™š*çš„ć‚æ•° `callbacks`ïŒŒä»Žć›žè°ƒè·Żç”±äŒ é€’ć±žæ€§ `.routes`ïŒˆćźžé™…äžŠćȘæ˜Żè·Żç”±/è·ŻćŸ„æ“äœœçš„**ćˆ—èĄš** ```Python hl_lines="36" -{!../../../docs_src/openapi_callbacks/tutorial001.py!} +{!../../docs_src/openapi_callbacks/tutorial001.py!} ``` /// tip | "提ç€ș" diff --git a/docs/zh/docs/advanced/path-operation-advanced-configuration.md b/docs/zh/docs/advanced/path-operation-advanced-configuration.md index c37846916..0d77dd69e 100644 --- a/docs/zh/docs/advanced/path-operation-advanced-configuration.md +++ b/docs/zh/docs/advanced/path-operation-advanced-configuration.md @@ -13,7 +13,7 @@ ćŠĄćż…çĄźäżæŻäžȘæ“äœœè·ŻćŸ„çš„ `operation_id` éƒœæ˜Żć”Żäž€çš„ă€‚ ```Python hl_lines="6" -{!../../../docs_src/path_operation_advanced_configuration/tutorial001.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial001.py!} ``` ### äœżç”š *è·ŻćŸ„æ“äœœć‡œæ•°* çš„ć‡œæ•°ćäœœäžș operationId @@ -23,7 +23,7 @@ 䜠ćș”èŻ„ćœšæ·»ćŠ äș†æ‰€æœ‰ *è·ŻćŸ„æ“äœœ* äč‹ćŽæ‰§èĄŒæ­€æ“äœœă€‚ ```Python hl_lines="2 12 13 14 15 16 17 18 19 20 21 24" -{!../../../docs_src/path_operation_advanced_configuration/tutorial002.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial002.py!} ``` /// tip @@ -45,7 +45,7 @@ äœżç”šć‚æ•° `include_in_schema` ćč¶ć°†ć…¶èźŸçœźäžș `False` 杄从生成的 OpenAPI æ–čæĄˆäž­æŽ’陀䞀äžȘ *è·ŻćŸ„æ“äœœ*ïŒˆèż™æ ·äž€æ„ïŒŒć°±ä»Žè‡ȘćŠšćŒ–æ–‡æĄŁçł»ç»Ÿäž­æŽ’é™€æŽ‰äș†ïŒ‰ă€‚ ```Python hl_lines="6" -{!../../../docs_src/path_operation_advanced_configuration/tutorial003.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial003.py!} ``` ## docstring 的高çș§æèż° @@ -58,5 +58,5 @@ ```Python hl_lines="19 20 21 22 23 24 25 26 27 28 29" -{!../../../docs_src/path_operation_advanced_configuration/tutorial004.py!} +{!../../docs_src/path_operation_advanced_configuration/tutorial004.py!} ``` diff --git a/docs/zh/docs/advanced/response-change-status-code.md b/docs/zh/docs/advanced/response-change-status-code.md index a289cf201..c38f80f1f 100644 --- a/docs/zh/docs/advanced/response-change-status-code.md +++ b/docs/zh/docs/advanced/response-change-status-code.md @@ -21,7 +21,7 @@ ç„¶ćŽäœ ćŻä»„ćœšèż™äžȘ*䞎时*操ćș”ćŻčè±Ąäž­èźŸçœź`status_code`。 ```Python hl_lines="1 9 12" -{!../../../docs_src/response_change_status_code/tutorial001.py!} +{!../../docs_src/response_change_status_code/tutorial001.py!} ``` ç„¶ćŽäœ ćŻä»„ćƒćčłćžžäž€æ ·èż”ć›žä»»äœ•äœ éœ€èŠçš„ćŻčè±ĄïŒˆäŸ‹ćŠ‚äž€äžȘ`dict`或者䞀äžȘæ•°æźćș“æšĄćž‹ïŒ‰ă€‚ćŠ‚æžœäœ ćŁ°æ˜Žäș†äž€äžȘ`response_model`ïŒŒćźƒä»ç„¶äŒšèą«ç”šæ„èż‡æ»€ć’ŒèœŹæąäœ èż”ć›žçš„ćŻčè±Ąă€‚ diff --git a/docs/zh/docs/advanced/response-cookies.md b/docs/zh/docs/advanced/response-cookies.md index dd942a981..5772664b0 100644 --- a/docs/zh/docs/advanced/response-cookies.md +++ b/docs/zh/docs/advanced/response-cookies.md @@ -5,7 +5,7 @@ äœ ćŻä»„ćœš *è·ŻćŸ„ć‡œæ•°* 侭漚äč‰äž€äžȘ类枋äžș `Response`çš„ć‚æ•°ïŒŒèż™æ ·äœ ć°±ćŻä»„ćœšèż™äžȘäžŽæ—¶ć“ćș”ćŻčè±Ąäž­èźŸçœźcookieäș†ă€‚ ```Python hl_lines="1 8-9" -{!../../../docs_src/response_cookies/tutorial002.py!} +{!../../docs_src/response_cookies/tutorial002.py!} ``` è€Œäž”äœ èż˜ćŻä»„æ čæźäœ çš„éœ€èŠć“ćș”äžćŒçš„ćŻčè±ĄïŒŒæŻ”ćŠ‚ćžžç”šçš„ `dict`ïŒŒæ•°æźćș“model等。 @@ -25,7 +25,7 @@ ç„¶ćŽèźŸçœźCookiesćč¶èż”ć›žïŒš ```Python hl_lines="10-12" -{!../../../docs_src/response_cookies/tutorial001.py!} +{!../../docs_src/response_cookies/tutorial001.py!} ``` /// tip diff --git a/docs/zh/docs/advanced/response-directly.md b/docs/zh/docs/advanced/response-directly.md index b2c7de8fd..9d191c622 100644 --- a/docs/zh/docs/advanced/response-directly.md +++ b/docs/zh/docs/advanced/response-directly.md @@ -36,7 +36,7 @@ ```Python hl_lines="4 6 20 21" -{!../../../docs_src/response_directly/tutorial001.py!} +{!../../docs_src/response_directly/tutorial001.py!} ``` /// note | "æŠ€æœŻç»†èŠ‚" @@ -58,7 +58,7 @@ äœ ćŻä»„æŠŠäœ çš„ XML 憅ćźčæ”Ÿćˆ°äž€äžȘ歗笩äžČäž­ïŒŒæ”Ÿćˆ°äž€äžȘ `Response` äž­ïŒŒç„¶ćŽèż”ć›žă€‚ ```Python hl_lines="1 18" -{!../../../docs_src/response_directly/tutorial002.py!} +{!../../docs_src/response_directly/tutorial002.py!} ``` ## èŻŽæ˜Ž diff --git a/docs/zh/docs/advanced/response-headers.md b/docs/zh/docs/advanced/response-headers.md index e18d1620d..d593fdccc 100644 --- a/docs/zh/docs/advanced/response-headers.md +++ b/docs/zh/docs/advanced/response-headers.md @@ -6,7 +6,7 @@ ç„¶ćŽäœ ćŻä»„ćœšèż™äžȘ*䞎时*操ćș”ćŻčè±Ąäž­èźŸçœźć€Žéƒšă€‚ ```Python hl_lines="1 7-8" -{!../../../docs_src/response_headers/tutorial002.py!} +{!../../docs_src/response_headers/tutorial002.py!} ``` ç„¶ćŽäœ ćŻä»„ćƒćčłćžžäž€æ ·èż”ć›žä»»äœ•äœ éœ€èŠçš„ćŻčè±ĄïŒˆäŸ‹ćŠ‚äž€äžȘ`dict`或者䞀äžȘæ•°æźćș“æšĄćž‹ïŒ‰ă€‚ćŠ‚æžœäœ ćŁ°æ˜Žäș†äž€äžȘ`response_model`ïŒŒćźƒä»ç„¶äŒšèą«ç”šæ„èż‡æ»€ć’ŒèœŹæąäœ èż”ć›žçš„ćŻčè±Ąă€‚ @@ -21,7 +21,7 @@ 按照[ç›ŽæŽ„èż”ć›žć“ćș”](response-directly.md){.internal-link target=_blank}äž­æ‰€èż°ćˆ›ć»ș操ćș”ćč¶ć°†ć€Žéƒšäœœäžșé™„ćŠ ć‚æ•°äŒ é€’ïŒš ```Python hl_lines="10-12" -{!../../../docs_src/response_headers/tutorial001.py!} +{!../../docs_src/response_headers/tutorial001.py!} ``` diff --git a/docs/zh/docs/advanced/security/http-basic-auth.md b/docs/zh/docs/advanced/security/http-basic-auth.md index a76353186..06c6dbbab 100644 --- a/docs/zh/docs/advanced/security/http-basic-auth.md +++ b/docs/zh/docs/advanced/security/http-basic-auth.md @@ -23,7 +23,7 @@ HTTP ćŸșçĄ€æŽˆæƒèź©æ”è§ˆć™šæ˜Ÿç€șć†…çœźçš„ç”šæˆ·ćäžŽćŻ†ç æç€ș。 //// tab | Python 3.9+ ```Python hl_lines="4 8 12" -{!> ../../../docs_src/security/tutorial006_an_py39.py!} +{!> ../../docs_src/security/tutorial006_an_py39.py!} ``` //// @@ -31,7 +31,7 @@ HTTP ćŸșçĄ€æŽˆæƒèź©æ”è§ˆć™šæ˜Ÿç€șć†…çœźçš„ç”šæˆ·ćäžŽćŻ†ç æç€ș。 //// tab | Python 3.8+ ```Python hl_lines="2 7 11" -{!> ../../../docs_src/security/tutorial006_an.py!} +{!> ../../docs_src/security/tutorial006_an.py!} ``` //// @@ -45,7 +45,7 @@ HTTP ćŸșçĄ€æŽˆæƒèź©æ”è§ˆć™šæ˜Ÿç€șć†…çœźçš„ç”šæˆ·ćäžŽćŻ†ç æç€ș。 /// ```Python hl_lines="2 6 10" -{!> ../../../docs_src/security/tutorial006.py!} +{!> ../../docs_src/security/tutorial006.py!} ``` //// @@ -71,7 +71,7 @@ HTTP ćŸșçĄ€æŽˆæƒèź©æ”è§ˆć™šæ˜Ÿç€șć†…çœźçš„ç”šæˆ·ćäžŽćŻ†ç æç€ș。 //// tab | Python 3.9+ ```Python hl_lines="1 12-24" -{!> ../../../docs_src/security/tutorial007_an_py39.py!} +{!> ../../docs_src/security/tutorial007_an_py39.py!} ``` //// @@ -79,7 +79,7 @@ HTTP ćŸșçĄ€æŽˆæƒèź©æ”è§ˆć™šæ˜Ÿç€șć†…çœźçš„ç”šæˆ·ćäžŽćŻ†ç æç€ș。 //// tab | Python 3.8+ ```Python hl_lines="1 12-24" -{!> ../../../docs_src/security/tutorial007_an.py!} +{!> ../../docs_src/security/tutorial007_an.py!} ``` //// @@ -93,7 +93,7 @@ HTTP ćŸșçĄ€æŽˆæƒèź©æ”è§ˆć™šæ˜Ÿç€șć†…çœźçš„ç”šæˆ·ćäžŽćŻ†ç æç€ș。 /// ```Python hl_lines="1 11-21" -{!> ../../../docs_src/security/tutorial007.py!} +{!> ../../docs_src/security/tutorial007.py!} ``` //// @@ -163,7 +163,7 @@ if "stanleyjobsox" == "stanleyjobson" and "love123" == "swordfish": //// tab | Python 3.9+ ```Python hl_lines="26-30" -{!> ../../../docs_src/security/tutorial007_an_py39.py!} +{!> ../../docs_src/security/tutorial007_an_py39.py!} ``` //// @@ -171,7 +171,7 @@ if "stanleyjobsox" == "stanleyjobson" and "love123" == "swordfish": //// tab | Python 3.8+ ```Python hl_lines="26-30" -{!> ../../../docs_src/security/tutorial007_an.py!} +{!> ../../docs_src/security/tutorial007_an.py!} ``` //// @@ -185,7 +185,7 @@ if "stanleyjobsox" == "stanleyjobson" and "love123" == "swordfish": /// ```Python hl_lines="23-27" -{!> ../../../docs_src/security/tutorial007.py!} +{!> ../../docs_src/security/tutorial007.py!} ``` //// diff --git a/docs/zh/docs/advanced/security/oauth2-scopes.md b/docs/zh/docs/advanced/security/oauth2-scopes.md index b75ae11a4..d6354230e 100644 --- a/docs/zh/docs/advanced/security/oauth2-scopes.md +++ b/docs/zh/docs/advanced/security/oauth2-scopes.md @@ -63,7 +63,7 @@ OAuth2 䞭**äœœç”šćŸŸ**ćȘæ˜ŻćŁ°æ˜Žç‰čćźšæƒé™çš„ć­—çŹŠäžČ。 éŠ–ć…ˆïŒŒćż«é€Ÿæ”è§ˆäž€äž‹ä»„äž‹ä»Łç äžŽ**ç”šæˆ·æŒ‡ć—**äž­ [OAuth2 漞现毆码擈澌侎 Bearer JWT 什牌éȘŒè݁](../../tutorial/security/oauth2-jwt.md){.internal-link target=_blank}䞀章䞭代码的ćŒșćˆ«ă€‚ä»„äž‹ä»Łç äœżç”š OAuth2 äœœç”šćŸŸïŒš ```Python hl_lines="2 4 8 12 46 64 105 107-115 121-124 128-134 139 153" -{!../../../docs_src/security/tutorial005.py!} +{!../../docs_src/security/tutorial005.py!} ``` äž‹éąïŒŒæˆ‘ä»Źé€æ­„èŻŽæ˜Žäżźæ”č的代码憅ćźč。 @@ -75,7 +75,7 @@ OAuth2 䞭**äœœç”šćŸŸ**ćȘæ˜ŻćŁ°æ˜Žç‰čćźšæƒé™çš„ć­—çŹŠäžČ。 `scopes` ć‚æ•°æŽ„æ”¶**歗慾**ïŒŒé”źæ˜Żäœœç”šćŸŸă€ć€Œæ˜Żäœœç”šćŸŸçš„æèż°ïŒš ```Python hl_lines="62-65" -{!../../../docs_src/security/tutorial005.py!} +{!../../docs_src/security/tutorial005.py!} ``` 曠äžșćŁ°æ˜Žäș†äœœç”šćŸŸïŒŒæ‰€ä»„ç™»ćœ•æˆ–æŽˆæƒæ—¶äŒšćœš API æ–‡æĄŁäž­æ˜Ÿç€ș。 @@ -103,7 +103,7 @@ OAuth2 䞭**äœœç”šćŸŸ**ćȘæ˜ŻćŁ°æ˜Žç‰čćźšæƒé™çš„ć­—çŹŠäžČ。 /// ```Python hl_lines="153" -{!../../../docs_src/security/tutorial005.py!} +{!../../docs_src/security/tutorial005.py!} ``` ## 朹*è·ŻćŸ„æ“äœœ*䞎䟝蔖éĄčäž­ćŁ°æ˜Žäœœç”šćŸŸ @@ -131,7 +131,7 @@ OAuth2 䞭**äœœç”šćŸŸ**ćȘæ˜ŻćŁ°æ˜Žç‰čćźšæƒé™çš„ć­—çŹŠäžČ。 /// ```Python hl_lines="4 139 166" -{!../../../docs_src/security/tutorial005.py!} +{!../../docs_src/security/tutorial005.py!} ``` /// info | "æŠ€æœŻç»†èŠ‚" @@ -159,7 +159,7 @@ OAuth2 䞭**äœœç”šćŸŸ**ćȘæ˜ŻćŁ°æ˜Žç‰čćźšæƒé™çš„ć­—çŹŠäžČ。 `SecuriScopes` 类䞎 `Request` 类䌌`Request` 甹äșŽç›ŽæŽ„æć–èŻ·æ±‚ćŻčè±ĄïŒ‰ă€‚ ```Python hl_lines="8 105" -{!../../../docs_src/security/tutorial005.py!} +{!../../docs_src/security/tutorial005.py!} ``` ## äœżç”š `scopes` @@ -175,7 +175,7 @@ OAuth2 䞭**äœœç”šćŸŸ**ćȘæ˜ŻćŁ°æ˜Žç‰čćźšæƒé™çš„ć­—çŹŠäžČ。 èŻ„ćŒ‚ćžžćŒ…ć«äș†äœœç”šćŸŸæ‰€éœ€çš„ïŒˆćŠ‚æœ‰ïŒ‰ïŒŒä»„ç©șæ Œćˆ†ć‰Č的歗笩äžČïŒˆäœżç”š `scope_str`ïŒ‰ă€‚èŻ„ć­—çŹŠäžČèŠæ”Ÿćˆ°ćŒ…ć«äœœç”šćŸŸçš„ `WWW-Authenticate` èŻ·æ±‚ć€Žäž­ïŒˆèż™ä蟿˜Żè§„èŒƒçš„èŠæ±‚ïŒ‰ă€‚ ```Python hl_lines="105 107-115" -{!../../../docs_src/security/tutorial005.py!} +{!../../docs_src/security/tutorial005.py!} ``` ## æ ĄéȘŒ `username` äžŽæ•°æźćœąçŠ¶ @@ -193,7 +193,7 @@ OAuth2 䞭**äœœç”šćŸŸ**ćȘæ˜ŻćŁ°æ˜Žç‰čćźšæƒé™çš„ć­—çŹŠäžČ。 èż˜ćŻä»„äœżç”šç”šæˆ·ćéȘŒèŻç”šæˆ·ïŒŒćŠ‚æžœæČĄæœ‰ç”šæˆ·ïŒŒäčŸäŒšè§Šć‘äč‹ć‰ćˆ›ć»șçš„ćŒ‚ćžžă€‚ ```Python hl_lines="46 116-127" -{!../../../docs_src/security/tutorial005.py!} +{!../../docs_src/security/tutorial005.py!} ``` ## æ ĄéȘŒ `scopes` @@ -203,7 +203,7 @@ OAuth2 䞭**äœœç”šćŸŸ**ćȘæ˜ŻćŁ°æ˜Žç‰čćźšæƒé™çš„ć­—çŹŠäžČ。 äžșæ­€ïŒŒèŠäœżç”šćŒ…ć«æ‰€æœ‰äœœç”šćŸŸ**歗笩äžČćˆ—èĄš**的 `security_scopes.scopes` 。 ```Python hl_lines="128-134" -{!../../../docs_src/security/tutorial005.py!} +{!../../docs_src/security/tutorial005.py!} ``` ## 䟝蔖éĄčæ ‘äžŽäœœç”šćŸŸ diff --git a/docs/zh/docs/advanced/settings.md b/docs/zh/docs/advanced/settings.md index 37a2d98d3..4d35731cb 100644 --- a/docs/zh/docs/advanced/settings.md +++ b/docs/zh/docs/advanced/settings.md @@ -151,7 +151,7 @@ Hello World from Python æ‚šćŻä»„äœżç”šäžŽ Pydantic æšĄćž‹ç›žćŒçš„éȘŒèŻćŠŸèƒœć’Œć·„ć…·ïŒŒæŻ”ćŠ‚äžćŒçš„æ•°æźç±»ćž‹ć’Œäœżç”š `Field()` èż›èĄŒé™„ćŠ éȘŒèŻă€‚ ```Python hl_lines="2 5-8 11" -{!../../../docs_src/settings/tutorial001.py!} +{!../../docs_src/settings/tutorial001.py!} ``` /// tip @@ -169,7 +169,7 @@ Hello World from Python ç„¶ćŽïŒŒæ‚šćŻä»„ćœšćș”甚皋ćșäž­äœżç”šæ–°çš„ `settings` ćŻčè±ĄïŒš ```Python hl_lines="18-20" -{!../../../docs_src/settings/tutorial001.py!} +{!../../docs_src/settings/tutorial001.py!} ``` ### èżèĄŒæœćŠĄć™š @@ -205,13 +205,13 @@ $ ADMIN_EMAIL="deadpool@example.com" APP_NAME="ChimichangApp"uvicorn main:app äŸ‹ćŠ‚ïŒŒæ‚šćŻä»„ćˆ›ć»ș侀äžȘ損äžș `config.py` çš„æ–‡ä»¶ïŒŒć…¶äž­ćŒ…ć«ä»„äž‹ć†…ćźč ```Python -{!../../../docs_src/settings/app01/config.py!} +{!../../docs_src/settings/app01/config.py!} ``` ç„¶ćŽćœšäž€äžȘ損äžș `main.py` çš„æ–‡ä»¶äž­äœżç”šćźƒïŒš ```Python hl_lines="3 11-13" -{!../../../docs_src/settings/app01/main.py!} +{!../../docs_src/settings/app01/main.py!} ``` /// tip @@ -231,7 +231,7 @@ $ ADMIN_EMAIL="deadpool@example.com" APP_NAME="ChimichangApp"uvicorn main:app æ čæźć‰éąçš„ç€ș䟋悚的 `config.py` æ–‡ä»¶ćŻèƒœćŠ‚äž‹æ‰€ç€ș ```Python hl_lines="10" -{!../../../docs_src/settings/app02/config.py!} +{!../../docs_src/settings/app02/config.py!} ``` èŻ·æłšæ„ïŒŒçŽ°ćœšæˆ‘ä»Źäžćˆ›ć»șé»˜èź€ćźžäŸ‹ `settings = Settings()`。 @@ -243,7 +243,7 @@ $ ADMIN_EMAIL="deadpool@example.com" APP_NAME="ChimichangApp"uvicorn main:app //// tab | Python 3.9+ ```Python hl_lines="6 12-13" -{!> ../../../docs_src/settings/app02_an_py39/main.py!} +{!> ../../docs_src/settings/app02_an_py39/main.py!} ``` //// @@ -251,7 +251,7 @@ $ ADMIN_EMAIL="deadpool@example.com" APP_NAME="ChimichangApp"uvicorn main:app //// tab | Python 3.8+ ```Python hl_lines="6 12-13" -{!> ../../../docs_src/settings/app02_an/main.py!} +{!> ../../docs_src/settings/app02_an/main.py!} ``` //// @@ -265,7 +265,7 @@ $ ADMIN_EMAIL="deadpool@example.com" APP_NAME="ChimichangApp"uvicorn main:app /// ```Python hl_lines="5 11-12" -{!> ../../../docs_src/settings/app02/main.py!} +{!> ../../docs_src/settings/app02/main.py!} ``` //// @@ -283,7 +283,7 @@ $ ADMIN_EMAIL="deadpool@example.com" APP_NAME="ChimichangApp"uvicorn main:app //// tab | Python 3.9+ ```Python hl_lines="17 19-21" -{!> ../../../docs_src/settings/app02_an_py39/main.py!} +{!> ../../docs_src/settings/app02_an_py39/main.py!} ``` //// @@ -291,7 +291,7 @@ $ ADMIN_EMAIL="deadpool@example.com" APP_NAME="ChimichangApp"uvicorn main:app //// tab | Python 3.8+ ```Python hl_lines="17 19-21" -{!> ../../../docs_src/settings/app02_an/main.py!} +{!> ../../docs_src/settings/app02_an/main.py!} ``` //// @@ -305,7 +305,7 @@ $ ADMIN_EMAIL="deadpool@example.com" APP_NAME="ChimichangApp"uvicorn main:app /// ```Python hl_lines="16 18-20" -{!> ../../../docs_src/settings/app02/main.py!} +{!> ../../docs_src/settings/app02/main.py!} ``` //// @@ -315,7 +315,7 @@ $ ADMIN_EMAIL="deadpool@example.com" APP_NAME="ChimichangApp"uvicorn main:app ç„¶ćŽïŒŒćœšæ”‹èŻ•æœŸé—ŽïŒŒé€šèż‡ćˆ›ć»ș `get_settings` 的䟝蔖éĄčèŠ†ç›–ïŒŒćŸˆćźč易提䟛䞀äžȘäžćŒçš„èźŸçœźćŻčè±ĄïŒš ```Python hl_lines="9-10 13 21" -{!../../../docs_src/settings/app02/test_main.py!} +{!../../docs_src/settings/app02/test_main.py!} ``` ćœšäŸè”–éĄčèŠ†ç›–äž­ïŒŒæˆ‘ä»Źćœšćˆ›ć»ș新的 `Settings` ćŻčè±Ąæ—¶äžș `admin_email` èźŸçœźäș†äž€äžȘæ–°ć€ŒïŒŒç„¶ćŽèż”ć›žèŻ„æ–°ćŻčè±Ąă€‚ @@ -358,7 +358,7 @@ APP_NAME="ChimichangApp" ç„¶ćŽïŒŒæ‚šćŻä»„äœżç”šä»„äž‹æ–čćŒæ›Žæ–°æ‚šçš„ `config.py` ```Python hl_lines="9-10" -{!../../../docs_src/settings/app03/config.py!} +{!../../docs_src/settings/app03/config.py!} ``` ćœšèż™é‡ŒïŒŒæˆ‘ä»Źćœš Pydantic 的 `Settings` ç±»äž­ćˆ›ć»șäș†äž€äžȘ損äžș `Config` 的类ćč¶ć°† `env_file` èźŸçœźäžșæˆ‘ä»ŹæƒłèŠäœżç”šçš„ dotenv æ–‡ä»¶çš„æ–‡ä»¶ćă€‚ @@ -395,7 +395,7 @@ def get_settings(): //// tab | Python 3.9+ ```Python hl_lines="1 11" -{!> ../../../docs_src/settings/app03_an_py39/main.py!} +{!> ../../docs_src/settings/app03_an_py39/main.py!} ``` //// @@ -403,7 +403,7 @@ def get_settings(): //// tab | Python 3.8+ ```Python hl_lines="1 11" -{!> ../../../docs_src/settings/app03_an/main.py!} +{!> ../../docs_src/settings/app03_an/main.py!} ``` //// @@ -417,7 +417,7 @@ def get_settings(): /// ```Python hl_lines="1 10" -{!> ../../../docs_src/settings/app03/main.py!} +{!> ../../docs_src/settings/app03/main.py!} ``` //// diff --git a/docs/zh/docs/advanced/sub-applications.md b/docs/zh/docs/advanced/sub-applications.md index a26301b50..f93ab1d24 100644 --- a/docs/zh/docs/advanced/sub-applications.md +++ b/docs/zh/docs/advanced/sub-applications.md @@ -11,7 +11,7 @@ éŠ–ć…ˆïŒŒćˆ›ć»șäž»ïŒˆéĄ¶ć±‚ïŒ‰**FastAPI** ćș”ç”šćŠć…¶*è·ŻćŸ„æ“äœœ* ```Python hl_lines="3 6-8" -{!../../../docs_src/sub_applications/tutorial001.py!} +{!../../docs_src/sub_applications/tutorial001.py!} ``` ### 歐ćș”甚 @@ -21,7 +21,7 @@ 歐ćș”甚ćȘæ˜ŻćŠäž€äžȘæ ‡ć‡† FastAPI ćș”ç”šïŒŒäœ†èż™äžȘćș”ç”šæ˜Żèą«**挂蜜**的ćș”甚 ```Python hl_lines="11 14-16" -{!../../../docs_src/sub_applications/tutorial001.py!} +{!../../docs_src/sub_applications/tutorial001.py!} ``` ### æŒ‚èœœć­ćș”甚 @@ -31,7 +31,7 @@ æœŹäŸ‹çš„ć­ćș”ç”šæŒ‚èœœćœš `/subapi` è·ŻćŸ„äž‹ïŒš ```Python hl_lines="11 19" -{!../../../docs_src/sub_applications/tutorial001.py!} +{!../../docs_src/sub_applications/tutorial001.py!} ``` ### æŸ„çœ‹æ–‡æĄŁ diff --git a/docs/zh/docs/advanced/templates.md b/docs/zh/docs/advanced/templates.md index b09644e39..1159302a9 100644 --- a/docs/zh/docs/advanced/templates.md +++ b/docs/zh/docs/advanced/templates.md @@ -28,7 +28,7 @@ $ pip install jinja2 * äœżç”š `templates` æžČ染ćč¶èż”曞 `TemplateResponse` äŒ é€’æšĄæżçš„ćç§°ă€requestćŻčè±Ąä»„ćŠäž€äžȘćŒ…ć«ć€šäžȘé”źć€ŒćŻč甚äșŽJinja2æšĄæżïŒ‰çš„"context"ć­—ć…žïŒŒ ```Python hl_lines="4 11 15-16" -{!../../../docs_src/templates/tutorial001.py!} +{!../../docs_src/templates/tutorial001.py!} ``` /// note | "çŹ”èź°" @@ -57,7 +57,7 @@ $ pip install jinja2 çŒ–ć†™æšĄæż `templates/item.html`ïŒŒä»Łç ćŠ‚äž‹ïŒš ```jinja hl_lines="7" -{!../../../docs_src/templates/templates/item.html!} +{!../../docs_src/templates/templates/item.html!} ``` ### æšĄæżäžŠäž‹æ–‡ @@ -111,13 +111,13 @@ Item ID: 42 äœ èż˜ćŻä»„ćœšæšĄæżć†…éƒšć°† `url_for()`甹äșŽé™æ€æ–‡ä»¶ïŒŒäŸ‹ćŠ‚äœ æŒ‚èœœçš„ `name="static"`的 `StaticFiles`。 ```jinja hl_lines="4" -{!../../../docs_src/templates/templates/item.html!} +{!../../docs_src/templates/templates/item.html!} ``` æœŹäŸ‹äž­ïŒŒćźƒć°†é“ŸæŽ„ćˆ° `static/styles.css`侭的CSS文件 ```CSS hl_lines="4" -{!../../../docs_src/templates/static/styles.css!} +{!../../docs_src/templates/static/styles.css!} ``` 曠äžșäœżç”šäș† `StaticFiles` **FastAPI** ćș”甚䌚è‡ȘćŠšæäŸ›äœäșŽ URL `/static/styles.css`的 CSS æ–‡ä»¶ă€‚ diff --git a/docs/zh/docs/advanced/testing-database.md b/docs/zh/docs/advanced/testing-database.md index 58bf9af8c..ecab4f65b 100644 --- a/docs/zh/docs/advanced/testing-database.md +++ b/docs/zh/docs/advanced/testing-database.md @@ -49,7 +49,7 @@ äœ†ć…¶äœ™çš„äŒšèŻä»Łç ćŸșæœŹäžŠéƒœæ˜Żäž€æ ·çš„ïŒŒćȘèŠć€ćˆ¶ć°±ćŻä»„äș†ă€‚ ```Python hl_lines="8-13" -{!../../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} +{!../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} ``` /// tip | "提ç€ș" @@ -73,7 +73,7 @@ Base.metadata.create_all(bind=engine) ć› æ­€ïŒŒèŠćœšæ”‹èŻ•ä»Łç äž­æ·»ćŠ èż™èĄŒä»Łç ćˆ›ć»șæ–°çš„æ•°æźćș“æ–‡ä»¶ă€‚ ```Python hl_lines="16" -{!../../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} +{!../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} ``` ## 芆盖䟝蔖éĄč @@ -81,7 +81,7 @@ Base.metadata.create_all(bind=engine) æŽ„äž‹æ„ïŒŒćˆ›ć»ș芆盖䟝蔖éĄčćč¶äžșćș”ç”šæ·»ćŠ èŠ†ç›–ć†…ćźč。 ```Python hl_lines="19-24 27" -{!../../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} +{!../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} ``` /// tip | "提ç€ș" @@ -95,7 +95,7 @@ Base.metadata.create_all(bind=engine) ç„¶ćŽïŒŒć°±ćŻä»„æ­Łćžžæ”‹èŻ•äș†ă€‚ ```Python hl_lines="32-47" -{!../../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} +{!../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} ``` æ”‹èŻ•æœŸé—ŽïŒŒæ‰€æœ‰ćœšæ•°æźćș“äž­æ‰€ćšçš„äżźæ”čéƒœćœš `test.db` é‡ŒïŒŒäžäŒšćœ±ć“äž»ćș”甚的 `sql_app.db`。 diff --git a/docs/zh/docs/advanced/testing-dependencies.md b/docs/zh/docs/advanced/testing-dependencies.md index cc9a38200..c3d912e2f 100644 --- a/docs/zh/docs/advanced/testing-dependencies.md +++ b/docs/zh/docs/advanced/testing-dependencies.md @@ -29,7 +29,7 @@ èż™æ ·äž€æ„ïŒŒ**FastAPI** ć°±äŒšè°ƒç”šèŠ†ç›–äŸè”–éĄčïŒŒäžć†è°ƒç”šćŽŸäŸè”–éĄč。 ```Python hl_lines="26-27 30" -{!../../../docs_src/dependency_testing/tutorial001.py!} +{!../../docs_src/dependency_testing/tutorial001.py!} ``` /// tip | "提ç€ș" diff --git a/docs/zh/docs/advanced/testing-events.md b/docs/zh/docs/advanced/testing-events.md index 222a67c8c..00e661cd2 100644 --- a/docs/zh/docs/advanced/testing-events.md +++ b/docs/zh/docs/advanced/testing-events.md @@ -3,5 +3,5 @@ äœżç”š `TestClient` 撌 `with` èŻ­ć„ïŒŒćœšæ”‹èŻ•äž­èżèĄŒäș‹ä»¶ć€„ç†ć™šïŒˆ`startup` 侎 `shutdown`ïŒ‰ă€‚ ```Python hl_lines="9-12 20-24" -{!../../../docs_src/app_testing/tutorial003.py!} +{!../../docs_src/app_testing/tutorial003.py!} ``` diff --git a/docs/zh/docs/advanced/testing-websockets.md b/docs/zh/docs/advanced/testing-websockets.md index 795b73945..a69053f24 100644 --- a/docs/zh/docs/advanced/testing-websockets.md +++ b/docs/zh/docs/advanced/testing-websockets.md @@ -5,7 +5,7 @@ äžșæ­€ïŒŒèŠćœš `with` èŻ­ć„äž­äœżç”š `TestClient` èżžæŽ„ WebSocket。 ```Python hl_lines="27-31" -{!../../../docs_src/app_testing/tutorial002.py!} +{!../../docs_src/app_testing/tutorial002.py!} ``` /// note | "çŹ”èź°" diff --git a/docs/zh/docs/advanced/using-request-directly.md b/docs/zh/docs/advanced/using-request-directly.md index bc9e898d9..992458217 100644 --- a/docs/zh/docs/advanced/using-request-directly.md +++ b/docs/zh/docs/advanced/using-request-directly.md @@ -30,7 +30,7 @@ æ­€æ—¶ïŒŒéœ€èŠç›ŽæŽ„èźżé—źèŻ·æ±‚ă€‚ ```Python hl_lines="1 7-8" -{!../../../docs_src/using_request_directly/tutorial001.py!} +{!../../docs_src/using_request_directly/tutorial001.py!} ``` 把*è·ŻćŸ„æ“äœœć‡œæ•°*çš„ć‚æ•°ç±»ćž‹ćŁ°æ˜Žäžș `Request`**FastAPI** ć°±èƒœæŠŠ `Request` äŒ é€’ćˆ°ć‚æ•°é‡Œă€‚ diff --git a/docs/zh/docs/advanced/websockets.md b/docs/zh/docs/advanced/websockets.md index 3fcc36dfe..15ae84c58 100644 --- a/docs/zh/docs/advanced/websockets.md +++ b/docs/zh/docs/advanced/websockets.md @@ -35,7 +35,7 @@ $ pip install websockets äœ†èż™æ˜Żäž€ç§äž“æłšäșŽ WebSockets çš„æœćŠĄć™šç«Żćč¶æäŸ›äž€äžȘć·„äœœç€șäŸ‹çš„æœ€çź€ć•æ–čćŒïŒš ```Python hl_lines="2 6-38 41-43" -{!../../../docs_src/websockets/tutorial001.py!} +{!../../docs_src/websockets/tutorial001.py!} ``` ## 戛ć»ș `websocket` @@ -43,7 +43,7 @@ $ pip install websockets ćœšæ‚šçš„ **FastAPI** ćș”甚皋ćșäž­ïŒŒćˆ›ć»ș侀äžȘ `websocket` ```Python hl_lines="1 46-47" -{!../../../docs_src/websockets/tutorial001.py!} +{!../../docs_src/websockets/tutorial001.py!} ``` /// note | "æŠ€æœŻç»†èŠ‚" @@ -59,7 +59,7 @@ $ pip install websockets ćœšæ‚šçš„ WebSocket è·Żç”±äž­ïŒŒæ‚šćŻä»„äœżç”š `await` ç­‰ćŸ…æ¶ˆæŻćč¶ć‘é€æ¶ˆæŻă€‚ ```Python hl_lines="48-52" -{!../../../docs_src/websockets/tutorial001.py!} +{!../../docs_src/websockets/tutorial001.py!} ``` æ‚šćŻä»„æŽ„æ”¶ć’Œć‘é€äșŒèż›ćˆ¶ă€æ–‡æœŹć’Œ JSON æ•°æźă€‚ @@ -112,7 +112,7 @@ $ uvicorn main:app --reload //// tab | Python 3.10+ ```Python hl_lines="68-69 82" -{!> ../../../docs_src/websockets/tutorial002_an_py310.py!} +{!> ../../docs_src/websockets/tutorial002_an_py310.py!} ``` //// @@ -120,7 +120,7 @@ $ uvicorn main:app --reload //// tab | Python 3.9+ ```Python hl_lines="68-69 82" -{!> ../../../docs_src/websockets/tutorial002_an_py39.py!} +{!> ../../docs_src/websockets/tutorial002_an_py39.py!} ``` //// @@ -128,7 +128,7 @@ $ uvicorn main:app --reload //// tab | Python 3.8+ ```Python hl_lines="69-70 83" -{!> ../../../docs_src/websockets/tutorial002_an.py!} +{!> ../../docs_src/websockets/tutorial002_an.py!} ``` //// @@ -142,7 +142,7 @@ $ uvicorn main:app --reload /// ```Python hl_lines="66-67 79" -{!> ../../../docs_src/websockets/tutorial002_py310.py!} +{!> ../../docs_src/websockets/tutorial002_py310.py!} ``` //// @@ -156,7 +156,7 @@ $ uvicorn main:app --reload /// ```Python hl_lines="68-69 81" -{!> ../../../docs_src/websockets/tutorial002.py!} +{!> ../../docs_src/websockets/tutorial002.py!} ``` //// @@ -203,7 +203,7 @@ $ uvicorn main:app --reload //// tab | Python 3.9+ ```Python hl_lines="79-81" -{!> ../../../docs_src/websockets/tutorial003_py39.py!} +{!> ../../docs_src/websockets/tutorial003_py39.py!} ``` //// @@ -211,7 +211,7 @@ $ uvicorn main:app --reload //// tab | Python 3.8+ ```Python hl_lines="81-83" -{!> ../../../docs_src/websockets/tutorial003.py!} +{!> ../../docs_src/websockets/tutorial003.py!} ``` //// diff --git a/docs/zh/docs/advanced/wsgi.md b/docs/zh/docs/advanced/wsgi.md index 179ec88aa..92bd998d0 100644 --- a/docs/zh/docs/advanced/wsgi.md +++ b/docs/zh/docs/advanced/wsgi.md @@ -13,7 +13,7 @@ äč‹ćŽć°†ć…¶æŒ‚èœœćˆ°æŸäž€äžȘè·ŻćŸ„äž‹ă€‚ ```Python hl_lines="2-3 22" -{!../../../docs_src/wsgi/tutorial001.py!} +{!../../docs_src/wsgi/tutorial001.py!} ``` ## æŁ€æŸ„ diff --git a/docs/zh/docs/how-to/configure-swagger-ui.md b/docs/zh/docs/how-to/configure-swagger-ui.md index 17f89b22f..1a2daeec1 100644 --- a/docs/zh/docs/how-to/configure-swagger-ui.md +++ b/docs/zh/docs/how-to/configure-swagger-ui.md @@ -19,7 +19,7 @@ FastAPIäŒšć°†èż™äș›é…çœźèœŹæąäžș **JSON**ïŒŒäœżć…¶äžŽ JavaScript ć…ŒćźčïŒŒć›  äœ†æ˜Żäœ ćŻä»„é€šèż‡èźŸçœź `syntaxHighlight` äžș `False` 杄犁甚 Swagger UI äž­çš„èŻ­æł•é«˜äșźïŒš ```Python hl_lines="3" -{!../../../docs_src/configure_swagger_ui/tutorial001.py!} +{!../../docs_src/configure_swagger_ui/tutorial001.py!} ``` ...ćœšæ­€äč‹ćŽïŒŒSwagger UI ć°†äžäŒšé«˜äșźä»Łç : @@ -31,7 +31,7 @@ FastAPIäŒšć°†èż™äș›é…çœźèœŹæąäžș **JSON**ïŒŒäœżć…¶äžŽ JavaScript ć…ŒćźčïŒŒć›  ćŒæ ·ćœ°ïŒŒäœ äčŸćŻä»„é€šèż‡èźŸçœźé”ź `"syntaxHighlight.theme"` æ„èźŸçœźèŻ­æł•é«˜äșźäž»éą˜ïŒˆæłšæ„äž­é—Žæœ‰äž€äžȘç‚č ```Python hl_lines="3" -{!../../../docs_src/configure_swagger_ui/tutorial002.py!} +{!../../docs_src/configure_swagger_ui/tutorial002.py!} ``` èż™äžȘé…çœźäŒšæ”čć˜èŻ­æł•é«˜äșźäž»éą˜ïŒš @@ -45,7 +45,7 @@ FastAPI ćŒ…ć«äș†äž€äș›é»˜èź€é…çœźć‚数适甚äșŽć€§ć€šæ•°ç”šäŸ‹ă€‚ ć…¶ćŒ…æ‹Źèż™äș›é»˜èź€é…çœźć‚数 ```Python -{!../../../fastapi/openapi/docs.py[ln:7-23]!} +{!../../fastapi/openapi/docs.py[ln:7-23]!} ``` äœ ćŻä»„é€šèż‡ćœš `swagger_ui_parameters` äž­èźŸçœźäžćŒçš„ć€Œæ„èŠ†ç›–ćźƒä»Źă€‚ @@ -53,7 +53,7 @@ FastAPI ćŒ…ć«äș†äž€äș›é»˜èź€é…çœźć‚数适甚äșŽć€§ć€šæ•°ç”šäŸ‹ă€‚ æŻ”ćŠ‚ïŒŒćŠ‚æžœèŠçŠç”š `deepLinking`ïŒŒäœ ćŻä»„ćƒèż™æ ·äŒ é€’èźŸçœźćˆ° `swagger_ui_parameters` 䞭 ```Python hl_lines="3" -{!../../../docs_src/configure_swagger_ui/tutorial003.py!} +{!../../docs_src/configure_swagger_ui/tutorial003.py!} ``` ## ć…¶ä»– Swagger UI ć‚æ•° diff --git a/docs/zh/docs/python-types.md b/docs/zh/docs/python-types.md index c78852539..dab6bd4c0 100644 --- a/docs/zh/docs/python-types.md +++ b/docs/zh/docs/python-types.md @@ -23,7 +23,7 @@ èź©æˆ‘ä»Źä»Žäž€äžȘçź€ć•çš„äŸ‹ć­ćŒ€ć§‹ïŒš ```Python -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` èżèĄŒèż™æź”çš‹ćșć°†èŸ“ć‡ș @@ -39,7 +39,7 @@ John Doe * 侭问甹侀äžȘç©șæ Œæ„æ‹ŒæŽ„ćźƒä»Źă€‚ ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial001.py!} +{!../../docs_src/python_types/tutorial001.py!} ``` ### äżźæ”čç€ș䟋 @@ -83,7 +83,7 @@ John Doe èż™äș›ć°±æ˜Ż"ç±»ćž‹æç€ș" ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial002.py!} +{!../../docs_src/python_types/tutorial002.py!} ``` èż™ć’ŒćŁ°æ˜Žé»˜èź€ć€Œæ˜ŻäžćŒçš„ïŒŒäŸ‹ćŠ‚ïŒš @@ -113,7 +113,7 @@ John Doe äž‹éąæ˜Żäž€äžȘć·Čç»æœ‰ç±»ćž‹æç€șçš„ć‡œæ•°ïŒš ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial003.py!} +{!../../docs_src/python_types/tutorial003.py!} ``` 曠äžșçŒ–èŸ‘ć™šć·Č经矄道äș†èż™äș›ć˜é‡çš„ç±»ćž‹ïŒŒæ‰€ä»„䞍仅胜ćŻčä»Łç èż›èĄŒèĄ„ć…šïŒŒèż˜èƒœæŁ€æŸ„ć…¶äž­çš„é”™èŻŻïŒš @@ -123,7 +123,7 @@ John Doe çŽ°ćœšäœ çŸ„é“äș†ćż…éĄ»ć…ˆäżźć€èż™äžȘé—źéą˜ïŒŒé€šèż‡ `str(age)` 把 `age` èœŹæąæˆć­—çŹŠäžČ ```Python hl_lines="2" -{!../../../docs_src/python_types/tutorial004.py!} +{!../../docs_src/python_types/tutorial004.py!} ``` ## ćŁ°æ˜Žç±»ćž‹ @@ -144,7 +144,7 @@ John Doe * `bytes` ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial005.py!} +{!../../docs_src/python_types/tutorial005.py!} ``` ### ć”Œć„—ç±»ćž‹ @@ -162,7 +162,7 @@ John Doe 从 `typing` æšĄć—ćŻŒć…„ `List`ïŒˆæłšæ„æ˜Żć€§ć†™çš„ `L` ```Python hl_lines="1" -{!../../../docs_src/python_types/tutorial006.py!} +{!../../docs_src/python_types/tutorial006.py!} ``` ćŒæ ·ä»„ć†’ć·ïŒˆ`:`ïŒ‰æ„ćŁ°æ˜Žèż™äžȘ揘量。 @@ -172,7 +172,7 @@ John Doe 由äșŽćˆ—èĄšæ˜ŻćžŠæœ‰"歐类枋"çš„ç±»ćž‹ïŒŒæ‰€ä»„æˆ‘ä»ŹæŠŠć­ç±»ćž‹æ”Ÿćœšæ–čæ‹Źć·äž­ïŒš ```Python hl_lines="4" -{!../../../docs_src/python_types/tutorial006.py!} +{!../../docs_src/python_types/tutorial006.py!} ``` èż™èĄšç€ș"揘量 `items` æ˜Żäž€äžȘ `list`ćč¶äž”èż™äžȘćˆ—èĄšé‡Œçš„æŻäž€äžȘć…ƒçŽ éƒœæ˜Ż `str`"。 @@ -192,7 +192,7 @@ John Doe ćŁ°æ˜Ž `tuple` 撌 `set` 的æ–čæł•ä蟿˜Żäž€æ ·çš„ ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial007.py!} +{!../../docs_src/python_types/tutorial007.py!} ``` èż™èĄšç€ș @@ -209,7 +209,7 @@ John Doe 珏äșŒäžȘć­ç±»ćž‹ćŁ°æ˜Ž `dict` çš„æ‰€æœ‰ć€ŒïŒš ```Python hl_lines="1 4" -{!../../../docs_src/python_types/tutorial008.py!} +{!../../docs_src/python_types/tutorial008.py!} ``` èż™èĄšç€ș @@ -225,13 +225,13 @@ John Doe ć‡èźŸäœ æœ‰äž€äžȘ損äžș `Person` 的类拄有 name ć±žæ€§ïŒš ```Python hl_lines="1-3" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` æŽ„äž‹æ„ïŒŒäœ ćŻä»„ć°†äž€äžȘć˜é‡ćŁ°æ˜Žäžș `Person` ç±»ćž‹ïŒš ```Python hl_lines="6" -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` ç„¶ćŽïŒŒäœ ć°†ć†æŹĄèŽ·ćŸ—æ‰€æœ‰çš„çŒ–èŸ‘ć™šæ”ŻæŒïŒš @@ -253,7 +253,7 @@ John Doe äž‹éąçš„äŸ‹ć­æ„è‡Ș Pydantic 柘æ–čæ–‡æĄŁïŒš ```Python -{!../../../docs_src/python_types/tutorial010.py!} +{!../../docs_src/python_types/tutorial010.py!} ``` /// info diff --git a/docs/zh/docs/tutorial/background-tasks.md b/docs/zh/docs/tutorial/background-tasks.md index 95fd7b6b5..fc9312bc5 100644 --- a/docs/zh/docs/tutorial/background-tasks.md +++ b/docs/zh/docs/tutorial/background-tasks.md @@ -16,7 +16,7 @@ éŠ–ć…ˆćŻŒć…„ `BackgroundTasks` ćč¶ćœš *è·ŻćŸ„æ“äœœć‡œæ•°* äž­äœżç”šç±»ćž‹ćŁ°æ˜Ž `BackgroundTasks` 漚äč‰äž€äžȘć‚æ•°ïŒš ```Python hl_lines="1 13" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` **FastAPI** äŒšćˆ›ć»ș侀äžȘ `BackgroundTasks` 类枋的ćŻčè±Ąćč¶äœœäžșèŻ„ć‚æ•°äŒ ć…„ă€‚ @@ -34,7 +34,7 @@ 由äșŽć†™æ“äœœäžäœżç”š `async` 撌 `await`ïŒŒæˆ‘ä»Źç”šæ™źé€šçš„ `def` 漚äč‰ć‡œæ•°ïŒš ```Python hl_lines="6-9" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` ## æ·»ćŠ ćŽć°ä»»ćŠĄ @@ -42,7 +42,7 @@ ćœšäœ çš„ *è·ŻćŸ„æ“äœœć‡œæ•°* 里甚 `.add_task()` æ–čæł•ć°†ä»»ćŠĄć‡œæ•°äŒ ćˆ° *ćŽć°ä»»ćŠĄ* ćŻčè±Ąäž­ïŒš ```Python hl_lines="14" -{!../../../docs_src/background_tasks/tutorial001.py!} +{!../../docs_src/background_tasks/tutorial001.py!} ``` `.add_task()` æŽ„æ”¶ä»„äž‹ć‚æ•°ïŒš @@ -60,7 +60,7 @@ //// tab | Python 3.10+ ```Python hl_lines="13 15 22 25" -{!> ../../../docs_src/background_tasks/tutorial002_an_py310.py!} +{!> ../../docs_src/background_tasks/tutorial002_an_py310.py!} ``` //// @@ -68,7 +68,7 @@ //// tab | Python 3.9+ ```Python hl_lines="13 15 22 25" -{!> ../../../docs_src/background_tasks/tutorial002_an_py39.py!} +{!> ../../docs_src/background_tasks/tutorial002_an_py39.py!} ``` //// @@ -76,7 +76,7 @@ //// tab | Python 3.8+ ```Python hl_lines="14 16 23 26" -{!> ../../../docs_src/background_tasks/tutorial002_an.py!} +{!> ../../docs_src/background_tasks/tutorial002_an.py!} ``` //// @@ -90,7 +90,7 @@ /// ```Python hl_lines="11 13 20 23" -{!> ../../../docs_src/background_tasks/tutorial002_py310.py!} +{!> ../../docs_src/background_tasks/tutorial002_py310.py!} ``` //// @@ -104,7 +104,7 @@ /// ```Python hl_lines="13 15 22 25" -{!> ../../../docs_src/background_tasks/tutorial002.py!} +{!> ../../docs_src/background_tasks/tutorial002.py!} ``` //// diff --git a/docs/zh/docs/tutorial/bigger-applications.md b/docs/zh/docs/tutorial/bigger-applications.md index a0c7095e9..64afd99af 100644 --- a/docs/zh/docs/tutorial/bigger-applications.md +++ b/docs/zh/docs/tutorial/bigger-applications.md @@ -86,7 +86,7 @@ from app.routers import items äœ ćŻä»„ćŻŒć…„ćźƒćč¶é€šèż‡äžŽ `FastAPI` ç±»ç›žćŒçš„æ–čćŒćˆ›ć»ș侀äžȘă€ŒćźžäŸ‹ă€ïŒš ```Python hl_lines="1 3" title="app/routers/users.py" -{!../../../docs_src/bigger_applications/app/routers/users.py!} +{!../../docs_src/bigger_applications/app/routers/users.py!} ``` ### äœżç”š `APIRouter` 的*è·ŻćŸ„æ“äœœ* @@ -96,7 +96,7 @@ from app.routers import items äœżç”šæ–čćŒäžŽ `FastAPI` ç±»ç›žćŒïŒš ```Python hl_lines="6 11 16" title="app/routers/users.py" -{!../../../docs_src/bigger_applications/app/routers/users.py!} +{!../../docs_src/bigger_applications/app/routers/users.py!} ``` äœ ćŻä»„ć°† `APIRouter` 视äžș侀äžȘă€Œèż·äœ  `FastAPI`ă€ç±»ă€‚ @@ -122,7 +122,7 @@ from app.routers import items çŽ°ćœšæˆ‘ä»Źć°†äœżç”šäž€äžȘçź€ć•çš„äŸè”–éĄčæ„èŻ»ć–äž€äžȘè‡Ș漚äč‰çš„ `X-Token` èŻ·æ±‚éŠ–éƒšïŒš ```Python hl_lines="1 4-6" title="app/dependencies.py" -{!../../../docs_src/bigger_applications/app/dependencies.py!} +{!../../docs_src/bigger_applications/app/dependencies.py!} ``` /// tip @@ -156,7 +156,7 @@ from app.routers import items ć› æ­€ïŒŒæˆ‘ä»ŹćŻä»„ć°†ć…¶æ·»ćŠ ćˆ° `APIRouter` äž­ïŒŒè€Œäžæ˜Żć°†ć…¶æ·»ćŠ ćˆ°æŻäžȘè·ŻćŸ„æ“äœœäž­ă€‚ ```Python hl_lines="5-10 16 21" title="app/routers/items.py" -{!../../../docs_src/bigger_applications/app/routers/items.py!} +{!../../docs_src/bigger_applications/app/routers/items.py!} ``` 由äșŽæŻäžȘ*è·ŻćŸ„æ“äœœ*çš„è·ŻćŸ„éƒœćż…éĄ»ä»„ `/` ćŒ€ć€ŽïŒŒäŸ‹ćŠ‚ïŒš @@ -217,7 +217,7 @@ async def read_item(item_id: str): ć› æ­€ïŒŒæˆ‘ä»Źé€šèż‡ `..` ćŻč䟝蔖éĄčäœżç”šäș†ç›žćŻčćŻŒć…„ïŒš ```Python hl_lines="3" title="app/routers/items.py" -{!../../../docs_src/bigger_applications/app/routers/items.py!} +{!../../docs_src/bigger_applications/app/routers/items.py!} ``` #### 盾ćŻčćŻŒć…„ćŠ‚äœ•ć·„äœœ @@ -290,7 +290,7 @@ from ...dependencies import get_token_header äœ†æ˜Żæˆ‘ä»Źä»ç„¶ćŻä»„æ·»ćŠ *æ›Žć€š*ć°†äŒšćș”甚äșŽç‰č漚的*è·ŻćŸ„æ“äœœ*的 `tags`ïŒŒä»„ćŠäž€äș›ç‰č漚äșŽèŻ„*è·ŻćŸ„æ“äœœ*çš„éąć€– `responses` ```Python hl_lines="30-31" title="app/routers/items.py" -{!../../../docs_src/bigger_applications/app/routers/items.py!} +{!../../docs_src/bigger_applications/app/routers/items.py!} ``` /// tip @@ -318,7 +318,7 @@ from ...dependencies import get_token_header æˆ‘ä»Źç”šè‡łćŻä»„ćŁ°æ˜Ž[ć…šć±€äŸè”–éĄč](dependencies/global-dependencies.md){.internal-link target=_blank}ïŒŒćźƒäŒšć’ŒæŻäžȘ `APIRouter` 的䟝蔖éĄčç»„ćˆćœšäž€è”·ïŒš ```Python hl_lines="1 3 7" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` ### ćŻŒć…„ `APIRouter` @@ -326,7 +326,7 @@ from ...dependencies import get_token_header çŽ°ćœšïŒŒæˆ‘ä»ŹćŻŒć…„ć…·æœ‰ `APIRouter` çš„ć…¶ä»–ć­æšĄć—ïŒš ```Python hl_lines="5" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` 由äșŽæ–‡ä»¶ `app/routers/users.py` 撌 `app/routers/items.py` æ˜ŻćŒäž€ Python 挅 `app` 侀äžȘéƒšćˆ†çš„ć­æšĄć—ïŒŒć› æ­€æˆ‘ä»ŹćŻä»„äœżç”šć•äžȘç‚č ` .` é€šèż‡ă€Œç›žćŻčćŻŒć…„ă€æ„ćŻŒć…„ćźƒä»Źă€‚ @@ -391,7 +391,7 @@ from .routers.users import router ć› æ­€ïŒŒäžșäș†èƒœć€ŸćœšćŒäž€äžȘæ–‡ä»¶äž­äœżç”šćźƒä»ŹïŒŒæˆ‘ä»Źç›ŽæŽ„ćŻŒć…„ć­æšĄć—ïŒš ```Python hl_lines="5" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` ### ćŒ…ć« `users` 撌 `items` 的 `APIRouter` @@ -399,7 +399,7 @@ from .routers.users import router çŽ°ćœšïŒŒèź©æˆ‘ä»Źæ„ćŒ…ć«æ„è‡Ș `users` 撌 `items` ć­æšĄć—çš„ `router`。 ```Python hl_lines="10-11" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` /// info @@ -441,7 +441,7 @@ from .routers.users import router ćŻčäșŽæ­€ç€șäŸ‹ïŒŒćźƒć°†éžćžžçź€ć•ă€‚äœ†æ˜Żć‡èźŸç”±äșŽćꃿ˜ŻäžŽç»„织䞭的慶他éĄčç›źæ‰€ć…±äș«çš„ïŒŒć› æ­€æˆ‘ä»Źæ— æł•ćŻčć…¶èż›èĄŒäżźæ”čïŒŒä»„ćŠç›ŽæŽ„ćœš `APIRouter` äž­æ·»ćŠ  `prefix`、`dependencies`、`tags` 等 ```Python hl_lines="3" title="app/internal/admin.py" -{!../../../docs_src/bigger_applications/app/internal/admin.py!} +{!../../docs_src/bigger_applications/app/internal/admin.py!} ``` äœ†æ˜Żæˆ‘ä»Źä»ç„¶ćžŒæœ›ćœšćŒ…ć« `APIRouter` æ—¶èźŸçœźäž€äžȘè‡Ș漚äč‰çš„ `prefix`ïŒŒä»„äŸżć…¶æ‰€æœ‰*è·ŻćŸ„æ“äœœ*仄 `/admin` ćŒ€ć€ŽïŒŒæˆ‘ä»ŹćžŒæœ›äœżç”šæœŹéĄč盼ć·Č经有的 `dependencies` äżæŠ€ćźƒïŒŒćč¶äž”æˆ‘ä»ŹćžŒæœ›ćźƒćŒ…ć«è‡Ș漚äč‰çš„ `tags` 撌 `responses`。 @@ -449,7 +449,7 @@ from .routers.users import router æˆ‘ä»ŹćŻä»„é€šèż‡ć°†èż™äș›ć‚数䌠递给 `app.include_router()` æ„ćźŒæˆæ‰€æœ‰çš„ćŁ°æ˜ŽïŒŒè€Œäžćż…äżźæ”č掟構的 `APIRouter` ```Python hl_lines="14-17" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` èż™æ ·ïŒŒćŽŸć§‹çš„ `APIRouter` ć°†äżæŒäžć˜ïŒŒć› æ­€æˆ‘ä»Źä»ç„¶ćŻä»„äžŽç»„ç»‡äž­çš„ć…¶ä»–éĄč盟慱äș«ç›žćŒçš„ `app/internal/admin.py` æ–‡ä»¶ă€‚ @@ -472,7 +472,7 @@ from .routers.users import router èż™é‡Œæˆ‘ä»Źèż™æ ·ćšäș†...ćȘæ˜Żäžșäș†èĄšæ˜Žæˆ‘ä»ŹćŻä»„ćšćˆ°đŸ€·ïŒš ```Python hl_lines="21-23" title="app/main.py" -{!../../../docs_src/bigger_applications/app/main.py!} +{!../../docs_src/bigger_applications/app/main.py!} ``` ćźƒć°†äžŽé€šèż‡ `app.include_router()` æ·»ćŠ çš„æ‰€æœ‰ć…¶ä»–*è·ŻćŸ„æ“äœœ*äž€è”·æ­ŁćžžèżèĄŒă€‚ diff --git a/docs/zh/docs/tutorial/body-fields.md b/docs/zh/docs/tutorial/body-fields.md index 6e4c385dd..ac59d7e6a 100644 --- a/docs/zh/docs/tutorial/body-fields.md +++ b/docs/zh/docs/tutorial/body-fields.md @@ -9,7 +9,7 @@ //// tab | Python 3.10+ ```Python hl_lines="4" -{!> ../../../docs_src/body_fields/tutorial001_an_py310.py!} +{!> ../../docs_src/body_fields/tutorial001_an_py310.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | Python 3.9+ ```Python hl_lines="4" -{!> ../../../docs_src/body_fields/tutorial001_an_py39.py!} +{!> ../../docs_src/body_fields/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ //// tab | Python 3.8+ ```Python hl_lines="4" -{!> ../../../docs_src/body_fields/tutorial001_an.py!} +{!> ../../docs_src/body_fields/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ /// ```Python hl_lines="2" -{!> ../../../docs_src/body_fields/tutorial001_py310.py!} +{!> ../../docs_src/body_fields/tutorial001_py310.py!} ``` //// @@ -53,7 +53,7 @@ /// ```Python hl_lines="4" -{!> ../../../docs_src/body_fields/tutorial001.py!} +{!> ../../docs_src/body_fields/tutorial001.py!} ``` //// @@ -71,7 +71,7 @@ //// tab | Python 3.10+ ```Python hl_lines="11-14" -{!> ../../../docs_src/body_fields/tutorial001_an_py310.py!} +{!> ../../docs_src/body_fields/tutorial001_an_py310.py!} ``` //// @@ -79,7 +79,7 @@ //// tab | Python 3.9+ ```Python hl_lines="11-14" -{!> ../../../docs_src/body_fields/tutorial001_an_py39.py!} +{!> ../../docs_src/body_fields/tutorial001_an_py39.py!} ``` //// @@ -87,7 +87,7 @@ //// tab | Python 3.8+ ```Python hl_lines="12-15" -{!> ../../../docs_src/body_fields/tutorial001_an.py!} +{!> ../../docs_src/body_fields/tutorial001_an.py!} ``` //// @@ -101,7 +101,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="9-12" -{!> ../../../docs_src/body_fields/tutorial001_py310.py!} +{!> ../../docs_src/body_fields/tutorial001_py310.py!} ``` //// @@ -115,7 +115,7 @@ Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="11-14" -{!> ../../../docs_src/body_fields/tutorial001.py!} +{!> ../../docs_src/body_fields/tutorial001.py!} ``` //// diff --git a/docs/zh/docs/tutorial/body-multiple-params.md b/docs/zh/docs/tutorial/body-multiple-params.md index fe951e544..c3bc0db9e 100644 --- a/docs/zh/docs/tutorial/body-multiple-params.md +++ b/docs/zh/docs/tutorial/body-multiple-params.md @@ -11,7 +11,7 @@ //// tab | Python 3.10+ ```Python hl_lines="18-20" -{!> ../../../docs_src/body_multiple_params/tutorial001_an_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial001_an_py310.py!} ``` //// @@ -19,7 +19,7 @@ //// tab | Python 3.9+ ```Python hl_lines="18-20" -{!> ../../../docs_src/body_multiple_params/tutorial001_an_py39.py!} +{!> ../../docs_src/body_multiple_params/tutorial001_an_py39.py!} ``` //// @@ -27,7 +27,7 @@ //// tab | Python 3.8+ ```Python hl_lines="19-21" -{!> ../../../docs_src/body_multiple_params/tutorial001_an.py!} +{!> ../../docs_src/body_multiple_params/tutorial001_an.py!} ``` //// @@ -41,7 +41,7 @@ /// ```Python hl_lines="17-19" -{!> ../../../docs_src/body_multiple_params/tutorial001_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial001_py310.py!} ``` //// @@ -55,7 +55,7 @@ /// ```Python hl_lines="19-21" -{!> ../../../docs_src/body_multiple_params/tutorial001.py!} +{!> ../../docs_src/body_multiple_params/tutorial001.py!} ``` //// @@ -84,7 +84,7 @@ //// tab | Python 3.10+ ```Python hl_lines="20" -{!> ../../../docs_src/body_multiple_params/tutorial002_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial002_py310.py!} ``` //// @@ -92,7 +92,7 @@ //// tab | Python 3.8+ ```Python hl_lines="22" -{!> ../../../docs_src/body_multiple_params/tutorial002.py!} +{!> ../../docs_src/body_multiple_params/tutorial002.py!} ``` //// @@ -140,7 +140,7 @@ //// tab | Python 3.10+ ```Python hl_lines="23" -{!> ../../../docs_src/body_multiple_params/tutorial003_an_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial003_an_py310.py!} ``` //// @@ -148,7 +148,7 @@ //// tab | Python 3.9+ ```Python hl_lines="23" -{!> ../../../docs_src/body_multiple_params/tutorial003_an_py39.py!} +{!> ../../docs_src/body_multiple_params/tutorial003_an_py39.py!} ``` //// @@ -156,7 +156,7 @@ //// tab | Python 3.8+ ```Python hl_lines="24" -{!> ../../../docs_src/body_multiple_params/tutorial003_an.py!} +{!> ../../docs_src/body_multiple_params/tutorial003_an.py!} ``` //// @@ -170,7 +170,7 @@ /// ```Python hl_lines="20" -{!> ../../../docs_src/body_multiple_params/tutorial003_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial003_py310.py!} ``` //// @@ -184,7 +184,7 @@ /// ```Python hl_lines="22" -{!> ../../../docs_src/body_multiple_params/tutorial003.py!} +{!> ../../docs_src/body_multiple_params/tutorial003.py!} ``` //// @@ -225,7 +225,7 @@ q: str = None //// tab | Python 3.10+ ```Python hl_lines="27" -{!> ../../../docs_src/body_multiple_params/tutorial004_an_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial004_an_py310.py!} ``` //// @@ -233,7 +233,7 @@ q: str = None //// tab | Python 3.9+ ```Python hl_lines="27" -{!> ../../../docs_src/body_multiple_params/tutorial004_an_py39.py!} +{!> ../../docs_src/body_multiple_params/tutorial004_an_py39.py!} ``` //// @@ -241,7 +241,7 @@ q: str = None //// tab | Python 3.8+ ```Python hl_lines="28" -{!> ../../../docs_src/body_multiple_params/tutorial004_an.py!} +{!> ../../docs_src/body_multiple_params/tutorial004_an.py!} ``` //// @@ -255,7 +255,7 @@ q: str = None /// ```Python hl_lines="25" -{!> ../../../docs_src/body_multiple_params/tutorial004_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial004_py310.py!} ``` //// @@ -269,7 +269,7 @@ q: str = None /// ```Python hl_lines="27" -{!> ../../../docs_src/body_multiple_params/tutorial004.py!} +{!> ../../docs_src/body_multiple_params/tutorial004.py!} ``` //// @@ -297,7 +297,7 @@ item: Item = Body(embed=True) //// tab | Python 3.10+ ```Python hl_lines="17" -{!> ../../../docs_src/body_multiple_params/tutorial005_an_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial005_an_py310.py!} ``` //// @@ -305,7 +305,7 @@ item: Item = Body(embed=True) //// tab | Python 3.9+ ```Python hl_lines="17" -{!> ../../../docs_src/body_multiple_params/tutorial005_an_py39.py!} +{!> ../../docs_src/body_multiple_params/tutorial005_an_py39.py!} ``` //// @@ -313,7 +313,7 @@ item: Item = Body(embed=True) //// tab | Python 3.8+ ```Python hl_lines="18" -{!> ../../../docs_src/body_multiple_params/tutorial005_an.py!} +{!> ../../docs_src/body_multiple_params/tutorial005_an.py!} ``` //// @@ -327,7 +327,7 @@ item: Item = Body(embed=True) /// ```Python hl_lines="15" -{!> ../../../docs_src/body_multiple_params/tutorial005_py310.py!} +{!> ../../docs_src/body_multiple_params/tutorial005_py310.py!} ``` //// @@ -341,7 +341,7 @@ item: Item = Body(embed=True) /// ```Python hl_lines="17" -{!> ../../../docs_src/body_multiple_params/tutorial005.py!} +{!> ../../docs_src/body_multiple_params/tutorial005.py!} ``` //// diff --git a/docs/zh/docs/tutorial/body-nested-models.md b/docs/zh/docs/tutorial/body-nested-models.md index 26837abc6..316ba9878 100644 --- a/docs/zh/docs/tutorial/body-nested-models.md +++ b/docs/zh/docs/tutorial/body-nested-models.md @@ -9,7 +9,7 @@ //// tab | Python 3.10+ ```Python hl_lines="12" -{!> ../../../docs_src/body_nested_models/tutorial001_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial001_py310.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | Python 3.8+ ```Python hl_lines="14" -{!> ../../../docs_src/body_nested_models/tutorial001.py!} +{!> ../../docs_src/body_nested_models/tutorial001.py!} ``` //// @@ -33,7 +33,7 @@ éŠ–ć…ˆïŒŒä»Ž Python çš„æ ‡ć‡†ćș“ `typing` æšĄć—äž­ćŻŒć…„ `List` ```Python hl_lines="1" -{!> ../../../docs_src/body_nested_models/tutorial002.py!} +{!> ../../docs_src/body_nested_models/tutorial002.py!} ``` ### ćŁ°æ˜Žć…·æœ‰ć­ç±»ćž‹çš„ List @@ -58,7 +58,7 @@ my_list: List[str] //// tab | Python 3.10+ ```Python hl_lines="12" -{!> ../../../docs_src/body_nested_models/tutorial002_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial002_py310.py!} ``` //// @@ -66,7 +66,7 @@ my_list: List[str] //// tab | Python 3.9+ ```Python hl_lines="14" -{!> ../../../docs_src/body_nested_models/tutorial002_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial002_py39.py!} ``` //// @@ -74,7 +74,7 @@ my_list: List[str] //// tab | Python 3.8+ ```Python hl_lines="14" -{!> ../../../docs_src/body_nested_models/tutorial002.py!} +{!> ../../docs_src/body_nested_models/tutorial002.py!} ``` //// @@ -90,7 +90,7 @@ Python ć…·æœ‰äž€ç§ç‰čæźŠçš„æ•°æźç±»ćž‹æ„äżć­˜äž€ç»„ć”Żäž€çš„ć…ƒçŽ ïŒŒćł `se //// tab | Python 3.10+ ```Python hl_lines="12" -{!> ../../../docs_src/body_nested_models/tutorial003_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial003_py310.py!} ``` //// @@ -98,7 +98,7 @@ Python ć…·æœ‰äž€ç§ç‰čæźŠçš„æ•°æźç±»ćž‹æ„äżć­˜äž€ç»„ć”Żäž€çš„ć…ƒçŽ ïŒŒćł `se //// tab | Python 3.9+ ```Python hl_lines="14" -{!> ../../../docs_src/body_nested_models/tutorial003_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial003_py39.py!} ``` //// @@ -106,7 +106,7 @@ Python ć…·æœ‰äž€ç§ç‰čæźŠçš„æ•°æźç±»ćž‹æ„äżć­˜äž€ç»„ć”Żäž€çš„ć…ƒçŽ ïŒŒćł `se //// tab | Python 3.8+ ```Python hl_lines="1 14" -{!> ../../../docs_src/body_nested_models/tutorial003.py!} +{!> ../../docs_src/body_nested_models/tutorial003.py!} ``` //// @@ -134,7 +134,7 @@ Pydantic æšĄćž‹çš„æŻäžȘć±žæ€§éƒœć…·æœ‰ç±»ćž‹ă€‚ //// tab | Python 3.10+ ```Python hl_lines="7-9" -{!> ../../../docs_src/body_nested_models/tutorial004_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial004_py310.py!} ``` //// @@ -142,7 +142,7 @@ Pydantic æšĄćž‹çš„æŻäžȘć±žæ€§éƒœć…·æœ‰ç±»ćž‹ă€‚ //// tab | Python 3.9+ ```Python hl_lines="9-11" -{!> ../../../docs_src/body_nested_models/tutorial004_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial004_py39.py!} ``` //// @@ -150,7 +150,7 @@ Pydantic æšĄćž‹çš„æŻäžȘć±žæ€§éƒœć…·æœ‰ç±»ćž‹ă€‚ //// tab | Python 3.8+ ```Python hl_lines="9-11" -{!> ../../../docs_src/body_nested_models/tutorial004.py!} +{!> ../../docs_src/body_nested_models/tutorial004.py!} ``` //// @@ -162,7 +162,7 @@ Pydantic æšĄćž‹çš„æŻäžȘć±žæ€§éƒœć…·æœ‰ç±»ćž‹ă€‚ //// tab | Python 3.10+ ```Python hl_lines="18" -{!> ../../../docs_src/body_nested_models/tutorial004_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial004_py310.py!} ``` //// @@ -170,7 +170,7 @@ Pydantic æšĄćž‹çš„æŻäžȘć±žæ€§éƒœć…·æœ‰ç±»ćž‹ă€‚ //// tab | Python 3.9+ ```Python hl_lines="20" -{!> ../../../docs_src/body_nested_models/tutorial004_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial004_py39.py!} ``` //// @@ -178,7 +178,7 @@ Pydantic æšĄćž‹çš„æŻäžȘć±žæ€§éƒœć…·æœ‰ç±»ćž‹ă€‚ //// tab | Python 3.8+ ```Python hl_lines="20" -{!> ../../../docs_src/body_nested_models/tutorial004.py!} +{!> ../../docs_src/body_nested_models/tutorial004.py!} ``` //// @@ -217,7 +217,7 @@ Pydantic æšĄćž‹çš„æŻäžȘć±žæ€§éƒœć…·æœ‰ç±»ćž‹ă€‚ //// tab | Python 3.10+ ```Python hl_lines="2 8" -{!> ../../../docs_src/body_nested_models/tutorial005_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial005_py310.py!} ``` //// @@ -225,7 +225,7 @@ Pydantic æšĄćž‹çš„æŻäžȘć±žæ€§éƒœć…·æœ‰ç±»ćž‹ă€‚ //// tab | Python 3.9+ ```Python hl_lines="4 10" -{!> ../../../docs_src/body_nested_models/tutorial005_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial005_py39.py!} ``` //// @@ -233,7 +233,7 @@ Pydantic æšĄćž‹çš„æŻäžȘć±žæ€§éƒœć…·æœ‰ç±»ćž‹ă€‚ //// tab | Python 3.8+ ```Python hl_lines="4 10" -{!> ../../../docs_src/body_nested_models/tutorial005.py!} +{!> ../../docs_src/body_nested_models/tutorial005.py!} ``` //// @@ -247,7 +247,7 @@ Pydantic æšĄćž‹çš„æŻäžȘć±žæ€§éƒœć…·æœ‰ç±»ćž‹ă€‚ //// tab | Python 3.10+ ```Python hl_lines="18" -{!> ../../../docs_src/body_nested_models/tutorial006_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial006_py310.py!} ``` //// @@ -255,7 +255,7 @@ Pydantic æšĄćž‹çš„æŻäžȘć±žæ€§éƒœć…·æœ‰ç±»ćž‹ă€‚ //// tab | Python 3.9+ ```Python hl_lines="20" -{!> ../../../docs_src/body_nested_models/tutorial006_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial006_py39.py!} ``` //// @@ -263,7 +263,7 @@ Pydantic æšĄćž‹çš„æŻäžȘć±žæ€§éƒœć…·æœ‰ç±»ćž‹ă€‚ //// tab | Python 3.8+ ```Python hl_lines="20" -{!> ../../../docs_src/body_nested_models/tutorial006.py!} +{!> ../../docs_src/body_nested_models/tutorial006.py!} ``` //// @@ -307,7 +307,7 @@ Pydantic æšĄćž‹çš„æŻäžȘć±žæ€§éƒœć…·æœ‰ç±»ćž‹ă€‚ //// tab | Python 3.10+ ```Python hl_lines="7 12 18 21 25" -{!> ../../../docs_src/body_nested_models/tutorial007_py310.py!} +{!> ../../docs_src/body_nested_models/tutorial007_py310.py!} ``` //// @@ -315,7 +315,7 @@ Pydantic æšĄćž‹çš„æŻäžȘć±žæ€§éƒœć…·æœ‰ç±»ćž‹ă€‚ //// tab | Python 3.9+ ```Python hl_lines="9 14 20 23 27" -{!> ../../../docs_src/body_nested_models/tutorial007_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial007_py39.py!} ``` //// @@ -323,7 +323,7 @@ Pydantic æšĄćž‹çš„æŻäžȘć±žæ€§éƒœć…·æœ‰ç±»ćž‹ă€‚ //// tab | Python 3.8+ ```Python hl_lines="9 14 20 23 27" -{!> ../../../docs_src/body_nested_models/tutorial007.py!} +{!> ../../docs_src/body_nested_models/tutorial007.py!} ``` //// @@ -347,7 +347,7 @@ images: List[Image] //// tab | Python 3.9+ ```Python hl_lines="13" -{!> ../../../docs_src/body_nested_models/tutorial008_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial008_py39.py!} ``` //// @@ -355,7 +355,7 @@ images: List[Image] //// tab | Python 3.8+ ```Python hl_lines="15" -{!> ../../../docs_src/body_nested_models/tutorial008.py!} +{!> ../../docs_src/body_nested_models/tutorial008.py!} ``` //// @@ -391,7 +391,7 @@ images: List[Image] //// tab | Python 3.9+ ```Python hl_lines="7" -{!> ../../../docs_src/body_nested_models/tutorial009_py39.py!} +{!> ../../docs_src/body_nested_models/tutorial009_py39.py!} ``` //// @@ -399,7 +399,7 @@ images: List[Image] //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/body_nested_models/tutorial009.py!} +{!> ../../docs_src/body_nested_models/tutorial009.py!} ``` //// diff --git a/docs/zh/docs/tutorial/body-updates.md b/docs/zh/docs/tutorial/body-updates.md index 6c74d12e0..5e9008d6a 100644 --- a/docs/zh/docs/tutorial/body-updates.md +++ b/docs/zh/docs/tutorial/body-updates.md @@ -7,7 +7,7 @@ æŠŠèŸ“ć…„æ•°æźèœŹæąäžș仄 JSON æ ŒćŒć­˜ć‚šçš„æ•°æźïŒˆæŻ”ćŠ‚ïŒŒäœżç”š NoSQL æ•°æźćș“æ—¶ïŒ‰ïŒŒćŻä»„äœżç”š `jsonable_encoder`ă€‚äŸ‹ćŠ‚ïŒŒæŠŠ `datetime` èœŹæąäžș `str`。 ```Python hl_lines="30-35" -{!../../../docs_src/body_updates/tutorial001.py!} +{!../../docs_src/body_updates/tutorial001.py!} ``` `PUT` 甹äșŽæŽ„æ”¶æ›żæąçŽ°æœ‰æ•°æźçš„æ•°æźă€‚ @@ -57,7 +57,7 @@ ç„¶ćŽć†ç”šćźƒç”Ÿæˆäž€äžȘćȘ搫ć·ČèźŸçœźïŒˆćœšèŻ·æ±‚äž­æ‰€ć‘é€ïŒ‰æ•°æźïŒŒäž”çœç•„äș†é»˜èź€ć€Œçš„ `dict` ```Python hl_lines="34" -{!../../../docs_src/body_updates/tutorial002.py!} +{!../../docs_src/body_updates/tutorial002.py!} ``` ### äœżç”š Pydantic 的 `update` ć‚æ•° @@ -67,7 +67,7 @@ äŸ‹ćŠ‚ïŒŒ`stored_item_model.copy(update=update_data)` ```Python hl_lines="35" -{!../../../docs_src/body_updates/tutorial002.py!} +{!../../docs_src/body_updates/tutorial002.py!} ``` ### æ›Žæ–°éƒšćˆ†æ•°æźć°ç»“ @@ -86,7 +86,7 @@ * èż”ć›žæ›Žæ–°ćŽçš„æšĄćž‹ă€‚ ```Python hl_lines="30-37" -{!../../../docs_src/body_updates/tutorial002.py!} +{!../../docs_src/body_updates/tutorial002.py!} ``` /// tip | "提ç€ș" diff --git a/docs/zh/docs/tutorial/body.md b/docs/zh/docs/tutorial/body.md index c47abec77..67a7f28e0 100644 --- a/docs/zh/docs/tutorial/body.md +++ b/docs/zh/docs/tutorial/body.md @@ -25,7 +25,7 @@ API ćŸșæœŹäžŠè‚ŻćźšèŠć‘é€**操ćș”䜓**ïŒŒäœ†æ˜Żćźąæˆ·ç«Żäžäž€ćźšć‘é€**èŻ· //// tab | Python 3.10+ ```Python hl_lines="2" -{!> ../../../docs_src/body/tutorial001_py310.py!} +{!> ../../docs_src/body/tutorial001_py310.py!} ``` //// @@ -33,7 +33,7 @@ API ćŸșæœŹäžŠè‚ŻćźšèŠć‘é€**操ćș”䜓**ïŒŒäœ†æ˜Żćźąæˆ·ç«Żäžäž€ćźšć‘é€**èŻ· //// tab | Python 3.8+ ```Python hl_lines="4" -{!> ../../../docs_src/body/tutorial001.py!} +{!> ../../docs_src/body/tutorial001.py!} ``` //// @@ -47,7 +47,7 @@ API ćŸșæœŹäžŠè‚ŻćźšèŠć‘é€**操ćș”䜓**ïŒŒäœ†æ˜Żćźąæˆ·ç«Żäžäž€ćźšć‘é€**èŻ· //// tab | Python 3.10+ ```Python hl_lines="5-9" -{!> ../../../docs_src/body/tutorial001_py310.py!} +{!> ../../docs_src/body/tutorial001_py310.py!} ``` //// @@ -55,7 +55,7 @@ API ćŸșæœŹäžŠè‚ŻćźšèŠć‘é€**操ćș”䜓**ïŒŒäœ†æ˜Żćźąæˆ·ç«Żäžäž€ćźšć‘é€**èŻ· //// tab | Python 3.8+ ```Python hl_lines="7-11" -{!> ../../../docs_src/body/tutorial001.py!} +{!> ../../docs_src/body/tutorial001.py!} ``` //// @@ -89,7 +89,7 @@ API ćŸșæœŹäžŠè‚ŻćźšèŠć‘é€**操ćș”䜓**ïŒŒäœ†æ˜Żćźąæˆ·ç«Żäžäž€ćźšć‘é€**èŻ· //// tab | Python 3.10+ ```Python hl_lines="16" -{!> ../../../docs_src/body/tutorial001_py310.py!} +{!> ../../docs_src/body/tutorial001_py310.py!} ``` //// @@ -97,7 +97,7 @@ API ćŸșæœŹäžŠè‚ŻćźšèŠć‘é€**操ćș”䜓**ïŒŒäœ†æ˜Żćźąæˆ·ç«Żäžäž€ćźšć‘é€**èŻ· //// tab | Python 3.8+ ```Python hl_lines="18" -{!> ../../../docs_src/body/tutorial001.py!} +{!> ../../docs_src/body/tutorial001.py!} ``` //// @@ -170,7 +170,7 @@ Pydantic æšĄćž‹çš„ JSON æŠ‚ć›Ÿæ˜Ż OpenAPI ç”Ÿæˆçš„æŠ‚ć›Ÿéƒšä»¶ïŒŒćŻćœš API 文 //// tab | Python 3.10+ ```Python hl_lines="19" -{!> ../../../docs_src/body/tutorial002_py310.py!} +{!> ../../docs_src/body/tutorial002_py310.py!} ``` //// @@ -178,7 +178,7 @@ Pydantic æšĄćž‹çš„ JSON æŠ‚ć›Ÿæ˜Ż OpenAPI ç”Ÿæˆçš„æŠ‚ć›Ÿéƒšä»¶ïŒŒćŻćœš API 文 //// tab | Python 3.8+ ```Python hl_lines="21" -{!> ../../../docs_src/body/tutorial002.py!} +{!> ../../docs_src/body/tutorial002.py!} ``` //// @@ -192,7 +192,7 @@ Pydantic æšĄćž‹çš„ JSON æŠ‚ć›Ÿæ˜Ż OpenAPI ç”Ÿæˆçš„æŠ‚ć›Ÿéƒšä»¶ïŒŒćŻćœš API 文 //// tab | Python 3.10+ ```Python hl_lines="15-16" -{!> ../../../docs_src/body/tutorial003_py310.py!} +{!> ../../docs_src/body/tutorial003_py310.py!} ``` //// @@ -200,7 +200,7 @@ Pydantic æšĄćž‹çš„ JSON æŠ‚ć›Ÿæ˜Ż OpenAPI ç”Ÿæˆçš„æŠ‚ć›Ÿéƒšä»¶ïŒŒćŻćœš API 文 //// tab | Python 3.8+ ```Python hl_lines="17-18" -{!> ../../../docs_src/body/tutorial003.py!} +{!> ../../docs_src/body/tutorial003.py!} ``` //// @@ -214,7 +214,7 @@ Pydantic æšĄćž‹çš„ JSON æŠ‚ć›Ÿæ˜Ż OpenAPI ç”Ÿæˆçš„æŠ‚ć›Ÿéƒšä»¶ïŒŒćŻćœš API 文 //// tab | Python 3.10+ ```Python hl_lines="16" -{!> ../../../docs_src/body/tutorial004_py310.py!} +{!> ../../docs_src/body/tutorial004_py310.py!} ``` //// @@ -222,7 +222,7 @@ Pydantic æšĄćž‹çš„ JSON æŠ‚ć›Ÿæ˜Ż OpenAPI ç”Ÿæˆçš„æŠ‚ć›Ÿéƒšä»¶ïŒŒćŻćœš API 文 //// tab | Python 3.8+ ```Python hl_lines="18" -{!> ../../../docs_src/body/tutorial004.py!} +{!> ../../docs_src/body/tutorial004.py!} ``` //// diff --git a/docs/zh/docs/tutorial/cookie-params.md b/docs/zh/docs/tutorial/cookie-params.md index 7ca77696e..b01c28238 100644 --- a/docs/zh/docs/tutorial/cookie-params.md +++ b/docs/zh/docs/tutorial/cookie-params.md @@ -9,7 +9,7 @@ //// tab | Python 3.10+ ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py310.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | Python 3.9+ ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py39.py!} ``` //// @@ -25,7 +25,7 @@ //// tab | Python 3.8+ ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001_an.py!} +{!> ../../docs_src/cookie_params/tutorial001_an.py!} ``` //// @@ -39,7 +39,7 @@ /// ```Python hl_lines="1" -{!> ../../../docs_src/cookie_params/tutorial001_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_py310.py!} ``` //// @@ -53,7 +53,7 @@ /// ```Python hl_lines="3" -{!> ../../../docs_src/cookie_params/tutorial001.py!} +{!> ../../docs_src/cookie_params/tutorial001.py!} ``` //// @@ -68,7 +68,7 @@ //// tab | Python 3.10+ ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py310.py!} ``` //// @@ -76,7 +76,7 @@ //// tab | Python 3.9+ ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!} +{!> ../../docs_src/cookie_params/tutorial001_an_py39.py!} ``` //// @@ -84,7 +84,7 @@ //// tab | Python 3.8+ ```Python hl_lines="10" -{!> ../../../docs_src/cookie_params/tutorial001_an.py!} +{!> ../../docs_src/cookie_params/tutorial001_an.py!} ``` //// @@ -98,7 +98,7 @@ /// ```Python hl_lines="7" -{!> ../../../docs_src/cookie_params/tutorial001_py310.py!} +{!> ../../docs_src/cookie_params/tutorial001_py310.py!} ``` //// @@ -112,7 +112,7 @@ /// ```Python hl_lines="9" -{!> ../../../docs_src/cookie_params/tutorial001.py!} +{!> ../../docs_src/cookie_params/tutorial001.py!} ``` //// diff --git a/docs/zh/docs/tutorial/cors.md b/docs/zh/docs/tutorial/cors.md index de880f347..1166d5c97 100644 --- a/docs/zh/docs/tutorial/cors.md +++ b/docs/zh/docs/tutorial/cors.md @@ -47,7 +47,7 @@ * ç‰č漚的 HTTP headers æˆ–è€…äœżç”šé€šé…çŹŠ `"*"` ć…èźžæ‰€æœ‰ headers。 ```Python hl_lines="2 6-11 13-19" -{!../../../docs_src/cors/tutorial001.py!} +{!../../docs_src/cors/tutorial001.py!} ``` é»˜èź€æƒ…ć†”äž‹ïŒŒèż™äžȘ `CORSMiddleware` ćźžçŽ°æ‰€äœżç”šçš„é»˜èź€ć‚æ•°èŸƒäžșäżćźˆïŒŒæ‰€ä»„äœ éœ€èŠæ˜ŸćŒćœ°ćŻç”šç‰č漚的æșă€æ–čæł•或者 headersïŒŒä»„äŸżæ”è§ˆć™šèƒœć€Ÿćœšè·šćŸŸäžŠäž‹æ–‡äž­äœżç”šćźƒä»Źă€‚ diff --git a/docs/zh/docs/tutorial/debugging.md b/docs/zh/docs/tutorial/debugging.md index 945094207..a5afa1aaa 100644 --- a/docs/zh/docs/tutorial/debugging.md +++ b/docs/zh/docs/tutorial/debugging.md @@ -7,7 +7,7 @@ ćœšäœ çš„ FastAPI ćș”ç”šäž­ç›ŽæŽ„ćŻŒć…„ `uvicorn` ćč¶èżèĄŒïŒš ```Python hl_lines="1 15" -{!../../../docs_src/debugging/tutorial001.py!} +{!../../docs_src/debugging/tutorial001.py!} ``` ### 慳äșŽ `__name__ == "__main__"` diff --git a/docs/zh/docs/tutorial/dependencies/classes-as-dependencies.md b/docs/zh/docs/tutorial/dependencies/classes-as-dependencies.md index 9932f90fc..917459d1d 100644 --- a/docs/zh/docs/tutorial/dependencies/classes-as-dependencies.md +++ b/docs/zh/docs/tutorial/dependencies/classes-as-dependencies.md @@ -9,7 +9,7 @@ //// tab | Python 3.10+ ```Python hl_lines="7" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -17,7 +17,7 @@ //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -86,7 +86,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | Python 3.10+ ```Python hl_lines="9-13" -{!> ../../../docs_src/dependencies/tutorial002_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_py310.py!} ``` //// @@ -94,7 +94,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | Python 3.8+ ```Python hl_lines="11-15" -{!> ../../../docs_src/dependencies/tutorial002.py!} +{!> ../../docs_src/dependencies/tutorial002.py!} ``` //// @@ -104,7 +104,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | Python 3.10+ ```Python hl_lines="10" -{!> ../../../docs_src/dependencies/tutorial002_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_py310.py!} ``` //// @@ -112,7 +112,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | Python 3.6+ ```Python hl_lines="12" -{!> ../../../docs_src/dependencies/tutorial002.py!} +{!> ../../docs_src/dependencies/tutorial002.py!} ``` //// @@ -122,7 +122,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | Python 3.10+ ```Python hl_lines="6" -{!> ../../../docs_src/dependencies/tutorial001_py310.py!} +{!> ../../docs_src/dependencies/tutorial001_py310.py!} ``` //// @@ -130,7 +130,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | Python 3.6+ ```Python hl_lines="9" -{!> ../../../docs_src/dependencies/tutorial001.py!} +{!> ../../docs_src/dependencies/tutorial001.py!} ``` //// @@ -152,7 +152,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | Python 3.10+ ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial002_py310.py!} +{!> ../../docs_src/dependencies/tutorial002_py310.py!} ``` //// @@ -160,7 +160,7 @@ fluffy = Cat(name="Mr Fluffy") //// tab | Python 3.6+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial002.py!} +{!> ../../docs_src/dependencies/tutorial002.py!} ``` //// @@ -206,7 +206,7 @@ commons = Depends(CommonQueryParams) //// tab | Python 3.10+ ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial003_py310.py!} +{!> ../../docs_src/dependencies/tutorial003_py310.py!} ``` //// @@ -214,7 +214,7 @@ commons = Depends(CommonQueryParams) //// tab | Python 3.6+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial003.py!} +{!> ../../docs_src/dependencies/tutorial003.py!} ``` //// @@ -254,7 +254,7 @@ commons: CommonQueryParams = Depends() //// tab | Python 3.10+ ```Python hl_lines="17" -{!> ../../../docs_src/dependencies/tutorial004_py310.py!} +{!> ../../docs_src/dependencies/tutorial004_py310.py!} ``` //// @@ -262,7 +262,7 @@ commons: CommonQueryParams = Depends() //// tab | Python 3.6+ ```Python hl_lines="19" -{!> ../../../docs_src/dependencies/tutorial004.py!} +{!> ../../docs_src/dependencies/tutorial004.py!} ``` //// diff --git a/docs/zh/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md b/docs/zh/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md index e6bbd47c1..c7cfe0531 100644 --- a/docs/zh/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md +++ b/docs/zh/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md @@ -15,7 +15,7 @@ èŻ„ć‚æ•°çš„ć€Œæ˜Żç”± `Depends()` 组成的 `list` ```Python hl_lines="17" -{!../../../docs_src/dependencies/tutorial006.py!} +{!../../docs_src/dependencies/tutorial006.py!} ``` è·ŻćŸ„æ“äœœèŁ…é„°ć™šäŸè”–éĄčïŒˆä»„äž‹çź€ç§°äžș**â€œè·ŻćŸ„èŁ…é„°ć™šäŸè”–éĄč”**ïŒ‰çš„æ‰§èĄŒæˆ–è§Łæžæ–čćŒć’Œæ™źé€šäŸè”–éĄčäž€æ ·ïŒŒäœ†ć°±çź—èż™äș›äŸè”–éĄčäŒšèż”ć›žć€ŒïŒŒćźƒä»Źçš„ć€ŒäčŸäžäŒšäŒ é€’ç»™*è·ŻćŸ„æ“äœœć‡œæ•°*。 @@ -47,7 +47,7 @@ è·ŻćŸ„èŁ…é„°ć™šäŸè”–éĄčćŻä»„ćŁ°æ˜ŽèŻ·æ±‚çš„éœ€æ±‚éĄčïŒˆæŻ”ćŠ‚ć“ćș”ć€ŽïŒ‰æˆ–ć…¶ä»–ć­äŸè”–éĄč ```Python hl_lines="6 11" -{!../../../docs_src/dependencies/tutorial006.py!} +{!../../docs_src/dependencies/tutorial006.py!} ``` ### è§Šć‘ćŒ‚ćžž @@ -55,7 +55,7 @@ è·ŻćŸ„èŁ…é„°ć™šäŸè”–éĄčäžŽæ­Łćžžçš„äŸè”–éĄčäž€æ ·ïŒŒćŻä»„ `raise` ćŒ‚ćžžïŒš ```Python hl_lines="8 13" -{!../../../docs_src/dependencies/tutorial006.py!} +{!../../docs_src/dependencies/tutorial006.py!} ``` ### èż”ć›žć€Œ @@ -65,7 +65,7 @@ ć› æ­€ïŒŒćŻä»„ć€ç”šćœšć…¶ä»–äœçœźäœżç”šèż‡çš„ă€ïŒˆèƒœèż”ć›žć€Œçš„ïŒ‰æ™źé€šäŸè”–éĄčïŒŒćłäœżæČĄæœ‰äœżç”šèż™äžȘć€ŒïŒŒäčŸäŒšæ‰§èĄŒèŻ„äŸè”–éĄč ```Python hl_lines="9 14" -{!../../../docs_src/dependencies/tutorial006.py!} +{!../../docs_src/dependencies/tutorial006.py!} ``` ## äžșäž€ç»„è·ŻćŸ„æ“äœœćźšäč‰äŸè”–éĄč diff --git a/docs/zh/docs/tutorial/dependencies/dependencies-with-yield.md b/docs/zh/docs/tutorial/dependencies/dependencies-with-yield.md index 6058f7878..a30313719 100644 --- a/docs/zh/docs/tutorial/dependencies/dependencies-with-yield.md +++ b/docs/zh/docs/tutorial/dependencies/dependencies-with-yield.md @@ -30,19 +30,19 @@ FastAPIæ”ŻæŒćœšćźŒæˆćŽæ‰§èĄŒäž€äș› ../../../docs_src/dependencies/tutorial008_an.py!} +{!> ../../docs_src/dependencies/tutorial008_an.py!} ``` //// @@ -99,7 +99,7 @@ FastAPIæ”ŻæŒćœšćźŒæˆćŽæ‰§èĄŒäž€äș› ../../../docs_src/dependencies/tutorial008_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial008_an_py39.py!} ``` //// @@ -121,7 +121,7 @@ FastAPIæ”ŻæŒćœšćźŒæˆćŽæ‰§èĄŒäž€äș› ../../../docs_src/dependencies/tutorial008.py!} +{!> ../../docs_src/dependencies/tutorial008.py!} ``` //// @@ -173,7 +173,7 @@ FastAPIæ”ŻæŒćœšćźŒæˆćŽæ‰§èĄŒäž€äș› ../../../docs_src/dependencies/tutorial008b_an.py!} +{!> ../../docs_src/dependencies/tutorial008b_an.py!} ``` //// @@ -195,7 +195,7 @@ FastAPIæ”ŻæŒćœšćźŒæˆćŽæ‰§èĄŒäž€äș› ../../../docs_src/dependencies/tutorial008c_an_py39.py!} +{!> ../../docs_src/dependencies/tutorial008c_an_py39.py!} ``` //// @@ -217,7 +217,7 @@ FastAPIæ”ŻæŒćœšćźŒæˆćŽæ‰§èĄŒäž€äș› ../../../docs_src/dependencies/tutorial008c.py!} +{!> ../../docs_src/dependencies/tutorial008c.py!} ``` //// @@ -247,7 +247,7 @@ FastAPIæ”ŻæŒćœšćźŒæˆćŽæ‰§èĄŒäž€äș› ../../../docs_src/dependencies/tutorial008d_an.py!} +{!> ../../docs_src/dependencies/tutorial008d_an.py!} ``` //// @@ -269,7 +269,7 @@ FastAPIæ”ŻæŒćœšćźŒæˆćŽæ‰§èĄŒäž€äș› Date: Mon, 7 Oct 2024 20:11:42 +0000 Subject: [PATCH 60/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 490f99c70..26cba035b 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -35,6 +35,7 @@ hide: ### Internal +* đŸ‘· Tweak labeler to not override custom labels. PR [#12398](https://github.com/fastapi/fastapi/pull/12398) by [@tiangolo](https://github.com/tiangolo). * đŸ‘· Update worfkow deploy-docs-notify URL. PR [#12392](https://github.com/fastapi/fastapi/pull/12392) by [@tiangolo](https://github.com/tiangolo). * đŸ‘· Update Cloudflare GitHub Action. PR [#12387](https://github.com/fastapi/fastapi/pull/12387) by [@tiangolo](https://github.com/tiangolo). * ⬆ Bump pypa/gh-action-pypi-publish from 1.10.1 to 1.10.3. PR [#12386](https://github.com/fastapi/fastapi/pull/12386) by [@dependabot[bot]](https://github.com/apps/dependabot). From 797cad7162592b6e581228bec09682da8feb6752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Mon, 7 Oct 2024 22:18:07 +0200 Subject: [PATCH 61/90] =?UTF-8?q?=F0=9F=93=9D=20Fix=20extra=20mdx-base-pat?= =?UTF-8?q?h=20paths=20(#12397)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/tutorial/sql-databases.md | 48 ++++++++++---------- docs/it/docs/index.md | 3 -- docs/pt/docs/tutorial/cookie-param-models.md | 16 +++---- scripts/docs.py | 2 +- 4 files changed, 33 insertions(+), 36 deletions(-) diff --git a/docs/en/docs/tutorial/sql-databases.md b/docs/en/docs/tutorial/sql-databases.md index f65fa773c..7836efae1 100644 --- a/docs/en/docs/tutorial/sql-databases.md +++ b/docs/en/docs/tutorial/sql-databases.md @@ -296,7 +296,7 @@ But for security, the `password` won't be in other Pydantic *models*, for exampl //// tab | Python 3.10+ ```Python hl_lines="1 4-6 9-10 21-22 25-26" -{!> ../../../docs_src/sql_databases/sql_app_py310/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app_py310/schemas.py!} ``` //// @@ -304,7 +304,7 @@ But for security, the `password` won't be in other Pydantic *models*, for exampl //// tab | Python 3.9+ ```Python hl_lines="3 6-8 11-12 23-24 27-28" -{!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/schemas.py!} ``` //// @@ -312,7 +312,7 @@ But for security, the `password` won't be in other Pydantic *models*, for exampl //// tab | Python 3.8+ ```Python hl_lines="3 6-8 11-12 23-24 27-28" -{!> ../../../docs_src/sql_databases/sql_app/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app/schemas.py!} ``` //// @@ -346,7 +346,7 @@ Not only the IDs of those items, but all the data that we defined in the Pydanti //// tab | Python 3.10+ ```Python hl_lines="13-15 29-32" -{!> ../../../docs_src/sql_databases/sql_app_py310/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app_py310/schemas.py!} ``` //// @@ -354,7 +354,7 @@ Not only the IDs of those items, but all the data that we defined in the Pydanti //// tab | Python 3.9+ ```Python hl_lines="15-17 31-34" -{!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/schemas.py!} ``` //// @@ -362,7 +362,7 @@ Not only the IDs of those items, but all the data that we defined in the Pydanti //// tab | Python 3.8+ ```Python hl_lines="15-17 31-34" -{!> ../../../docs_src/sql_databases/sql_app/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app/schemas.py!} ``` //// @@ -384,7 +384,7 @@ In the `Config` class, set the attribute `orm_mode = True`. //// tab | Python 3.10+ ```Python hl_lines="13 17-18 29 34-35" -{!> ../../../docs_src/sql_databases/sql_app_py310/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app_py310/schemas.py!} ``` //// @@ -392,7 +392,7 @@ In the `Config` class, set the attribute `orm_mode = True`. //// tab | Python 3.9+ ```Python hl_lines="15 19-20 31 36-37" -{!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/schemas.py!} ``` //// @@ -400,7 +400,7 @@ In the `Config` class, set the attribute `orm_mode = True`. //// tab | Python 3.8+ ```Python hl_lines="15 19-20 31 36-37" -{!> ../../../docs_src/sql_databases/sql_app/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app/schemas.py!} ``` //// @@ -559,7 +559,7 @@ In a very simplistic way create the database tables: //// tab | Python 3.9+ ```Python hl_lines="7" -{!> ../../../docs_src/sql_databases/sql_app_py39/main.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/main.py!} ``` //// @@ -567,7 +567,7 @@ In a very simplistic way create the database tables: //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/sql_databases/sql_app/main.py!} +{!> ../../docs_src/sql_databases/sql_app/main.py!} ``` //// @@ -597,7 +597,7 @@ Our dependency will create a new SQLAlchemy `SessionLocal` that will be used in //// tab | Python 3.9+ ```Python hl_lines="13-18" -{!> ../../../docs_src/sql_databases/sql_app_py39/main.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/main.py!} ``` //// @@ -605,7 +605,7 @@ Our dependency will create a new SQLAlchemy `SessionLocal` that will be used in //// tab | Python 3.8+ ```Python hl_lines="15-20" -{!> ../../../docs_src/sql_databases/sql_app/main.py!} +{!> ../../docs_src/sql_databases/sql_app/main.py!} ``` //// @@ -629,7 +629,7 @@ This will then give us better editor support inside the *path operation function //// tab | Python 3.9+ ```Python hl_lines="22 30 36 45 51" -{!> ../../../docs_src/sql_databases/sql_app_py39/main.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/main.py!} ``` //// @@ -637,7 +637,7 @@ This will then give us better editor support inside the *path operation function //// tab | Python 3.8+ ```Python hl_lines="24 32 38 47 53" -{!> ../../../docs_src/sql_databases/sql_app/main.py!} +{!> ../../docs_src/sql_databases/sql_app/main.py!} ``` //// @@ -657,7 +657,7 @@ Now, finally, here's the standard **FastAPI** *path operations* code. //// tab | Python 3.9+ ```Python hl_lines="21-26 29-32 35-40 43-47 50-53" -{!> ../../../docs_src/sql_databases/sql_app_py39/main.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/main.py!} ``` //// @@ -665,7 +665,7 @@ Now, finally, here's the standard **FastAPI** *path operations* code. //// tab | Python 3.8+ ```Python hl_lines="23-28 31-34 37-42 45-49 52-55" -{!> ../../../docs_src/sql_databases/sql_app/main.py!} +{!> ../../docs_src/sql_databases/sql_app/main.py!} ``` //// @@ -766,7 +766,7 @@ For example, in a background task worker with ../../../docs_src/sql_databases/sql_app_py310/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app_py310/schemas.py!} ``` //// @@ -774,7 +774,7 @@ For example, in a background task worker with ../../../docs_src/sql_databases/sql_app_py39/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/schemas.py!} ``` //// @@ -782,7 +782,7 @@ For example, in a background task worker with ../../../docs_src/sql_databases/sql_app/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app/schemas.py!} ``` //// @@ -798,7 +798,7 @@ For example, in a background task worker with ../../../docs_src/sql_databases/sql_app_py39/main.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/main.py!} ``` //// @@ -806,7 +806,7 @@ For example, in a background task worker with ../../../docs_src/sql_databases/sql_app/main.py!} +{!> ../../docs_src/sql_databases/sql_app/main.py!} ``` //// @@ -863,7 +863,7 @@ The middleware we'll add (just a function) will create a new SQLAlchemy `Session //// tab | Python 3.9+ ```Python hl_lines="12-20" -{!> ../../../docs_src/sql_databases/sql_app_py39/alt_main.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/alt_main.py!} ``` //// @@ -871,7 +871,7 @@ The middleware we'll add (just a function) will create a new SQLAlchemy `Session //// tab | Python 3.8+ ```Python hl_lines="14-22" -{!> ../../../docs_src/sql_databases/sql_app/alt_main.py!} +{!> ../../docs_src/sql_databases/sql_app/alt_main.py!} ``` //// diff --git a/docs/it/docs/index.md b/docs/it/docs/index.md index 57940f0ed..3bfff82f1 100644 --- a/docs/it/docs/index.md +++ b/docs/it/docs/index.md @@ -1,6 +1,3 @@ -{!../../../docs/missing-translation.md!} - -

FastAPI

diff --git a/docs/pt/docs/tutorial/cookie-param-models.md b/docs/pt/docs/tutorial/cookie-param-models.md index 12d7ee08c..671e0d74f 100644 --- a/docs/pt/docs/tutorial/cookie-param-models.md +++ b/docs/pt/docs/tutorial/cookie-param-models.md @@ -23,7 +23,7 @@ Declare o parĂąmetro de **cookie** que vocĂȘ precisa em um **modelo Pydantic**, //// tab | Python 3.10+ ```Python hl_lines="9-12 16" -{!> ../../../docs_src/cookie_param_models/tutorial001_an_py310.py!} +{!> ../../docs_src/cookie_param_models/tutorial001_an_py310.py!} ``` //// @@ -31,7 +31,7 @@ Declare o parĂąmetro de **cookie** que vocĂȘ precisa em um **modelo Pydantic**, //// tab | Python 3.9+ ```Python hl_lines="9-12 16" -{!> ../../../docs_src/cookie_param_models/tutorial001_an_py39.py!} +{!> ../../docs_src/cookie_param_models/tutorial001_an_py39.py!} ``` //// @@ -39,7 +39,7 @@ Declare o parĂąmetro de **cookie** que vocĂȘ precisa em um **modelo Pydantic**, //// tab | Python 3.8+ ```Python hl_lines="10-13 17" -{!> ../../../docs_src/cookie_param_models/tutorial001_an.py!} +{!> ../../docs_src/cookie_param_models/tutorial001_an.py!} ``` //// @@ -53,7 +53,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="7-10 14" -{!> ../../../docs_src/cookie_param_models/tutorial001_py310.py!} +{!> ../../docs_src/cookie_param_models/tutorial001_py310.py!} ``` //// @@ -67,7 +67,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="9-12 16" -{!> ../../../docs_src/cookie_param_models/tutorial001.py!} +{!> ../../docs_src/cookie_param_models/tutorial001.py!} ``` //// @@ -105,7 +105,7 @@ Agora a sua API possui o poder de contrar o seu prĂłprio ../../../docs_src/cookie_param_models/tutorial002_an_py39.py!} +{!> ../../docs_src/cookie_param_models/tutorial002_an_py39.py!} ``` //// @@ -113,7 +113,7 @@ Agora a sua API possui o poder de contrar o seu prĂłprio ../../../docs_src/cookie_param_models/tutorial002_an.py!} +{!> ../../docs_src/cookie_param_models/tutorial002_an.py!} ``` //// @@ -127,7 +127,7 @@ Prefira utilizar a versĂŁo `Annotated` se possĂ­vel. /// ```Python hl_lines="10" -{!> ../../../docs_src/cookie_param_models/tutorial002.py!} +{!> ../../docs_src/cookie_param_models/tutorial002.py!} ``` //// diff --git a/scripts/docs.py b/scripts/docs.py index f0c51f7a6..e5c423d58 100644 --- a/scripts/docs.py +++ b/scripts/docs.py @@ -23,7 +23,7 @@ app = typer.Typer() mkdocs_name = "mkdocs.yml" missing_translation_snippet = """ -{!../../../docs/missing-translation.md!} +{!../../docs/missing-translation.md!} """ non_translated_sections = [ From ecc4133907df47830bab6f11607c981ec82091b2 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 7 Oct 2024 20:18:29 +0000 Subject: [PATCH 62/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 26cba035b..ab23184a1 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -35,6 +35,7 @@ hide: ### Internal +* 📝 Fix extra mdx-base-path paths. PR [#12397](https://github.com/fastapi/fastapi/pull/12397) by [@tiangolo](https://github.com/tiangolo). * đŸ‘· Tweak labeler to not override custom labels. PR [#12398](https://github.com/fastapi/fastapi/pull/12398) by [@tiangolo](https://github.com/tiangolo). * đŸ‘· Update worfkow deploy-docs-notify URL. PR [#12392](https://github.com/fastapi/fastapi/pull/12392) by [@tiangolo](https://github.com/tiangolo). * đŸ‘· Update Cloudflare GitHub Action. PR [#12387](https://github.com/fastapi/fastapi/pull/12387) by [@tiangolo](https://github.com/tiangolo). From 95f167f0480f8df94c06c95cd19323534d123a2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Mon, 7 Oct 2024 22:24:40 +0200 Subject: [PATCH 63/90] =?UTF-8?q?=E2=9E=95=20Add=20docs=20dependency:=20ma?= =?UTF-8?q?rkdown-include-variants=20(#12399)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/mkdocs.yml | 1 + requirements-docs.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/en/mkdocs.yml b/docs/en/mkdocs.yml index a18af2022..e55c6f176 100644 --- a/docs/en/mkdocs.yml +++ b/docs/en/mkdocs.yml @@ -305,6 +305,7 @@ markdown_extensions: # Other extensions mdx_include: + markdown_include_variants: extra: analytics: diff --git a/requirements-docs.txt b/requirements-docs.txt index 16b2998b9..c05bd51e3 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -16,3 +16,4 @@ griffe-typingdoc==0.2.7 # For griffe, it formats with black black==24.3.0 mkdocs-macros-plugin==1.0.5 +markdown-include-variants==0.0.1 From 6345147c245248302e90f0eb6371f7ab7557fd1b Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 7 Oct 2024 20:25:03 +0000 Subject: [PATCH 64/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index ab23184a1..b9dfe3da5 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -35,6 +35,7 @@ hide: ### Internal +* ➕ Add docs dependency: markdown-include-variants. PR [#12399](https://github.com/fastapi/fastapi/pull/12399) by [@tiangolo](https://github.com/tiangolo). * 📝 Fix extra mdx-base-path paths. PR [#12397](https://github.com/fastapi/fastapi/pull/12397) by [@tiangolo](https://github.com/tiangolo). * đŸ‘· Tweak labeler to not override custom labels. PR [#12398](https://github.com/fastapi/fastapi/pull/12398) by [@tiangolo](https://github.com/tiangolo). * đŸ‘· Update worfkow deploy-docs-notify URL. PR [#12392](https://github.com/fastapi/fastapi/pull/12392) by [@tiangolo](https://github.com/tiangolo). From 018e303fd9d04fe91a12cd39561d5bc5ca7b0aee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 8 Oct 2024 10:37:32 +0200 Subject: [PATCH 65/90] =?UTF-8?q?=F0=9F=94=A7=20Add=20speakeasy-api=20to?= =?UTF-8?q?=20`sponsors=5Fbadge.yml`=20(#12404)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/data/sponsors_badge.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/data/sponsors_badge.yml b/docs/en/data/sponsors_badge.yml index d8a41fbcb..d45028aaa 100644 --- a/docs/en/data/sponsors_badge.yml +++ b/docs/en/data/sponsors_badge.yml @@ -30,3 +30,4 @@ logins: - svix - zuplo-oss - Kong + - speakeasy-api From fcb15b4db162f2504d3f9f984d938e9a8ff03b35 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 8 Oct 2024 08:38:00 +0000 Subject: [PATCH 66/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index b9dfe3da5..d785805e9 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -35,6 +35,7 @@ hide: ### Internal +* 🔧 Add speakeasy-api to `sponsors_badge.yml`. PR [#12404](https://github.com/fastapi/fastapi/pull/12404) by [@tiangolo](https://github.com/tiangolo). * ➕ Add docs dependency: markdown-include-variants. PR [#12399](https://github.com/fastapi/fastapi/pull/12399) by [@tiangolo](https://github.com/tiangolo). * 📝 Fix extra mdx-base-path paths. PR [#12397](https://github.com/fastapi/fastapi/pull/12397) by [@tiangolo](https://github.com/tiangolo). * đŸ‘· Tweak labeler to not override custom labels. PR [#12398](https://github.com/fastapi/fastapi/pull/12398) by [@tiangolo](https://github.com/tiangolo). From 40490abaa3526eee394eb84362bfa4ca6b4da9d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 8 Oct 2024 12:55:26 +0200 Subject: [PATCH 67/90] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Update=20type=20anno?= =?UTF-8?q?tations=20for=20improved=20`python-multipart`=20(#12407)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastapi/dependencies/utils.py | 6 +++--- requirements-docs-tests.txt | 2 ++ requirements-tests.txt | 1 - 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/fastapi/dependencies/utils.py b/fastapi/dependencies/utils.py index 5cebbf00f..813c74620 100644 --- a/fastapi/dependencies/utils.py +++ b/fastapi/dependencies/utils.py @@ -91,14 +91,14 @@ multipart_incorrect_install_error = ( def ensure_multipart_is_installed() -> None: try: # __version__ is available in both multiparts, and can be mocked - from multipart import __version__ # type: ignore + from multipart import __version__ assert __version__ try: # parse_options_header is only available in the right multipart - from multipart.multipart import parse_options_header # type: ignore + from multipart.multipart import parse_options_header - assert parse_options_header + assert parse_options_header # type: ignore[truthy-function] except ImportError: logger.error(multipart_incorrect_install_error) raise RuntimeError(multipart_incorrect_install_error) from None diff --git a/requirements-docs-tests.txt b/requirements-docs-tests.txt index b82df4933..40b956e51 100644 --- a/requirements-docs-tests.txt +++ b/requirements-docs-tests.txt @@ -1,2 +1,4 @@ # For mkdocstrings and tests httpx >=0.23.0,<0.25.0 +# For linting and generating docs versions +ruff ==0.6.4 diff --git a/requirements-tests.txt b/requirements-tests.txt index 2f2576dd5..7b1f7ea1a 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -3,7 +3,6 @@ pytest >=7.1.3,<8.0.0 coverage[toml] >= 6.5.0,< 8.0 mypy ==1.8.0 -ruff ==0.6.4 dirty-equals ==0.6.0 # TODO: once removing databases from tutorial, upgrade SQLAlchemy # probably when including SQLModel From a94d61b2c09c7ba5bc2bf5016e590e2b0a35189e Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 8 Oct 2024 10:55:50 +0000 Subject: [PATCH 68/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index d785805e9..16faa52f9 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -7,6 +7,10 @@ hide: ## Latest Changes +### Refactors + +* ♻ Update type annotations for improved `python-multipart`. PR [#12407](https://github.com/fastapi/fastapi/pull/12407) by [@tiangolo](https://github.com/tiangolo). + ### Docs * 📝 Add External Link: How to profile a FastAPI asynchronous request. PR [#12389](https://github.com/fastapi/fastapi/pull/12389) by [@brouberol](https://github.com/brouberol). From c6dfdb85239d32eb0f9825b1374f780b33eb8a7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 8 Oct 2024 13:01:17 +0200 Subject: [PATCH 69/90] =?UTF-8?q?=F0=9F=94=A8=20Add=20script=20to=20genera?= =?UTF-8?q?te=20variants=20of=20files=20(#12405)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/docs.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/scripts/docs.py b/scripts/docs.py index e5c423d58..f26f96d85 100644 --- a/scripts/docs.py +++ b/scripts/docs.py @@ -15,6 +15,7 @@ import mkdocs.utils import typer import yaml from jinja2 import Template +from ruff.__main__ import find_ruff_bin logging.basicConfig(level=logging.INFO) @@ -382,5 +383,41 @@ def langs_json(): print(json.dumps(langs)) +@app.command() +def generate_docs_src_versions_for_file(file_path: Path) -> None: + target_versions = ["py39", "py310"] + base_content = file_path.read_text(encoding="utf-8") + previous_content = {base_content} + for target_version in target_versions: + version_result = subprocess.run( + [ + find_ruff_bin(), + "check", + "--target-version", + target_version, + "--fix", + "--unsafe-fixes", + "-", + ], + input=base_content.encode("utf-8"), + capture_output=True, + ) + content_target = version_result.stdout.decode("utf-8") + format_result = subprocess.run( + [find_ruff_bin(), "format", "-"], + input=content_target.encode("utf-8"), + capture_output=True, + ) + content_format = format_result.stdout.decode("utf-8") + if content_format in previous_content: + continue + previous_content.add(content_format) + version_file = file_path.with_name( + file_path.name.replace(".py", f"_{target_version}.py") + ) + logging.info(f"Writing to {version_file}") + version_file.write_text(content_format, encoding="utf-8") + + if __name__ == "__main__": app() From 13a18f80b3b0c7f0272c67b6ac7b73aafbb8584c Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 8 Oct 2024 11:01:43 +0000 Subject: [PATCH 70/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 16faa52f9..e34fd0df9 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -39,6 +39,7 @@ hide: ### Internal +* 🔹 Add script to generate variants of files. PR [#12405](https://github.com/fastapi/fastapi/pull/12405) by [@tiangolo](https://github.com/tiangolo). * 🔧 Add speakeasy-api to `sponsors_badge.yml`. PR [#12404](https://github.com/fastapi/fastapi/pull/12404) by [@tiangolo](https://github.com/tiangolo). * ➕ Add docs dependency: markdown-include-variants. PR [#12399](https://github.com/fastapi/fastapi/pull/12399) by [@tiangolo](https://github.com/tiangolo). * 📝 Fix extra mdx-base-path paths. PR [#12397](https://github.com/fastapi/fastapi/pull/12397) by [@tiangolo](https://github.com/tiangolo). From 7daaac2bc350e2907554a01eb7eb1286247e5832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Wed, 9 Oct 2024 21:44:42 +0200 Subject: [PATCH 71/90] =?UTF-8?q?=E2=9C=A8=20Add=20new=20tutorial=20for=20?= =?UTF-8?q?SQL=20databases=20with=20SQLModel=20(#12285)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/em/docs/advanced/testing-database.md | 101 -- docs/em/docs/how-to/sql-databases-peewee.md | 576 ------------ docs/en/docs/advanced/testing-database.md | 111 --- .../docs/how-to/async-sql-encode-databases.md | 201 ---- .../docs/how-to/nosql-databases-couchbase.md | 178 ---- docs/en/docs/how-to/sql-databases-peewee.md | 594 ------------ docs/en/docs/how-to/testing-database.md | 7 + .../img/tutorial/sql-databases/image01.png | Bin 78949 -> 69755 bytes .../img/tutorial/sql-databases/image02.png | Bin 83482 -> 69197 bytes docs/en/docs/tutorial/sql-databases.md | 888 ++++-------------- docs/en/mkdocs.yml | 9 +- docs/zh/docs/advanced/testing-database.md | 101 -- docs_src/async_sql_databases/tutorial001.py | 65 -- docs_src/nosql_databases/tutorial001.py | 53 -- docs_src/sql_databases/sql_app/__init__.py | 0 docs_src/sql_databases/sql_app/alt_main.py | 62 -- docs_src/sql_databases/sql_app/crud.py | 36 - docs_src/sql_databases/sql_app/database.py | 13 - docs_src/sql_databases/sql_app/main.py | 55 -- docs_src/sql_databases/sql_app/models.py | 26 - docs_src/sql_databases/sql_app/schemas.py | 37 - .../sql_databases/sql_app/tests/__init__.py | 0 .../sql_app/tests/test_sql_app.py | 50 - .../sql_databases/sql_app_py310/__init__.py | 0 .../sql_databases/sql_app_py310/alt_main.py | 60 -- docs_src/sql_databases/sql_app_py310/crud.py | 36 - .../sql_databases/sql_app_py310/database.py | 13 - docs_src/sql_databases/sql_app_py310/main.py | 53 -- .../sql_databases/sql_app_py310/models.py | 26 - .../sql_databases/sql_app_py310/schemas.py | 35 - .../sql_app_py310/tests/__init__.py | 0 .../sql_app_py310/tests/test_sql_app.py | 47 - .../sql_databases/sql_app_py39/__init__.py | 0 .../sql_databases/sql_app_py39/alt_main.py | 60 -- docs_src/sql_databases/sql_app_py39/crud.py | 36 - .../sql_databases/sql_app_py39/database.py | 13 - docs_src/sql_databases/sql_app_py39/main.py | 53 -- docs_src/sql_databases/sql_app_py39/models.py | 26 - .../sql_databases/sql_app_py39/schemas.py | 37 - .../sql_app_py39/tests/__init__.py | 0 .../sql_app_py39/tests/test_sql_app.py | 47 - docs_src/sql_databases/tutorial001.py | 71 ++ docs_src/sql_databases/tutorial001_an.py | 74 ++ .../sql_databases/tutorial001_an_py310.py | 73 ++ docs_src/sql_databases/tutorial001_an_py39.py | 73 ++ docs_src/sql_databases/tutorial001_py310.py | 69 ++ docs_src/sql_databases/tutorial001_py39.py | 71 ++ docs_src/sql_databases/tutorial002.py | 104 ++ docs_src/sql_databases/tutorial002_an.py | 104 ++ .../sql_databases/tutorial002_an_py310.py | 103 ++ docs_src/sql_databases/tutorial002_an_py39.py | 103 ++ docs_src/sql_databases/tutorial002_py310.py | 102 ++ docs_src/sql_databases/tutorial002_py39.py | 104 ++ requirements-docs.txt | 2 +- requirements-tests.txt | 5 +- scripts/playwright/sql_databases/image01.py | 37 + scripts/playwright/sql_databases/image02.py | 37 + .../test_async_sql_databases/__init__.py | 0 .../test_tutorial001.py | 146 --- .../test_sql_databases/test_sql_databases.py | 419 --------- .../test_sql_databases_middleware.py | 421 --------- .../test_sql_databases_middleware_py310.py | 433 --------- .../test_sql_databases_middleware_py39.py | 433 --------- .../test_sql_databases_py310.py | 432 --------- .../test_sql_databases_py39.py | 432 --------- .../test_testing_databases.py | 27 - .../test_testing_databases_py310.py | 28 - .../test_testing_databases_py39.py | 28 - .../test_sql_databases/test_tutorial001.py | 373 ++++++++ .../test_sql_databases/test_tutorial002.py | 481 ++++++++++ 70 files changed, 2154 insertions(+), 6336 deletions(-) delete mode 100644 docs/em/docs/advanced/testing-database.md delete mode 100644 docs/em/docs/how-to/sql-databases-peewee.md delete mode 100644 docs/en/docs/advanced/testing-database.md delete mode 100644 docs/en/docs/how-to/async-sql-encode-databases.md delete mode 100644 docs/en/docs/how-to/nosql-databases-couchbase.md delete mode 100644 docs/en/docs/how-to/sql-databases-peewee.md create mode 100644 docs/en/docs/how-to/testing-database.md delete mode 100644 docs/zh/docs/advanced/testing-database.md delete mode 100644 docs_src/async_sql_databases/tutorial001.py delete mode 100644 docs_src/nosql_databases/tutorial001.py delete mode 100644 docs_src/sql_databases/sql_app/__init__.py delete mode 100644 docs_src/sql_databases/sql_app/alt_main.py delete mode 100644 docs_src/sql_databases/sql_app/crud.py delete mode 100644 docs_src/sql_databases/sql_app/database.py delete mode 100644 docs_src/sql_databases/sql_app/main.py delete mode 100644 docs_src/sql_databases/sql_app/models.py delete mode 100644 docs_src/sql_databases/sql_app/schemas.py delete mode 100644 docs_src/sql_databases/sql_app/tests/__init__.py delete mode 100644 docs_src/sql_databases/sql_app/tests/test_sql_app.py delete mode 100644 docs_src/sql_databases/sql_app_py310/__init__.py delete mode 100644 docs_src/sql_databases/sql_app_py310/alt_main.py delete mode 100644 docs_src/sql_databases/sql_app_py310/crud.py delete mode 100644 docs_src/sql_databases/sql_app_py310/database.py delete mode 100644 docs_src/sql_databases/sql_app_py310/main.py delete mode 100644 docs_src/sql_databases/sql_app_py310/models.py delete mode 100644 docs_src/sql_databases/sql_app_py310/schemas.py delete mode 100644 docs_src/sql_databases/sql_app_py310/tests/__init__.py delete mode 100644 docs_src/sql_databases/sql_app_py310/tests/test_sql_app.py delete mode 100644 docs_src/sql_databases/sql_app_py39/__init__.py delete mode 100644 docs_src/sql_databases/sql_app_py39/alt_main.py delete mode 100644 docs_src/sql_databases/sql_app_py39/crud.py delete mode 100644 docs_src/sql_databases/sql_app_py39/database.py delete mode 100644 docs_src/sql_databases/sql_app_py39/main.py delete mode 100644 docs_src/sql_databases/sql_app_py39/models.py delete mode 100644 docs_src/sql_databases/sql_app_py39/schemas.py delete mode 100644 docs_src/sql_databases/sql_app_py39/tests/__init__.py delete mode 100644 docs_src/sql_databases/sql_app_py39/tests/test_sql_app.py create mode 100644 docs_src/sql_databases/tutorial001.py create mode 100644 docs_src/sql_databases/tutorial001_an.py create mode 100644 docs_src/sql_databases/tutorial001_an_py310.py create mode 100644 docs_src/sql_databases/tutorial001_an_py39.py create mode 100644 docs_src/sql_databases/tutorial001_py310.py create mode 100644 docs_src/sql_databases/tutorial001_py39.py create mode 100644 docs_src/sql_databases/tutorial002.py create mode 100644 docs_src/sql_databases/tutorial002_an.py create mode 100644 docs_src/sql_databases/tutorial002_an_py310.py create mode 100644 docs_src/sql_databases/tutorial002_an_py39.py create mode 100644 docs_src/sql_databases/tutorial002_py310.py create mode 100644 docs_src/sql_databases/tutorial002_py39.py create mode 100644 scripts/playwright/sql_databases/image01.py create mode 100644 scripts/playwright/sql_databases/image02.py delete mode 100644 tests/test_tutorial/test_async_sql_databases/__init__.py delete mode 100644 tests/test_tutorial/test_async_sql_databases/test_tutorial001.py delete mode 100644 tests/test_tutorial/test_sql_databases/test_sql_databases.py delete mode 100644 tests/test_tutorial/test_sql_databases/test_sql_databases_middleware.py delete mode 100644 tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py310.py delete mode 100644 tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py39.py delete mode 100644 tests/test_tutorial/test_sql_databases/test_sql_databases_py310.py delete mode 100644 tests/test_tutorial/test_sql_databases/test_sql_databases_py39.py delete mode 100644 tests/test_tutorial/test_sql_databases/test_testing_databases.py delete mode 100644 tests/test_tutorial/test_sql_databases/test_testing_databases_py310.py delete mode 100644 tests/test_tutorial/test_sql_databases/test_testing_databases_py39.py create mode 100644 tests/test_tutorial/test_sql_databases/test_tutorial001.py create mode 100644 tests/test_tutorial/test_sql_databases/test_tutorial002.py diff --git a/docs/em/docs/advanced/testing-database.md b/docs/em/docs/advanced/testing-database.md deleted file mode 100644 index 71b29f9b7..000000000 --- a/docs/em/docs/advanced/testing-database.md +++ /dev/null @@ -1,101 +0,0 @@ -# 🔬 đŸ’œ - -👆 đŸ’Ș ⚙ 🎏 🔗 🔐 âšȘïžâžĄïž [🔬 🔗 âźïž 🔐](testing-dependencies.md){.internal-link target=_blank} 📉 đŸ’œ 🔬. - -👆 đŸ’Ș 💚 ⚒ 🆙 🎏 đŸ’œ 🔬, đŸ’Ÿ đŸ’œ âźïž 💯, đŸ€-đŸ„§ ⚫ âźïž 🔬 đŸ’œ, ♒. - -👑 💭 ⚫❔ 🎏 👆 👀 👈 âźïž 📃. - -## 🚼 💯 🗄 đŸ“± - -âžĄïž â„č đŸ–Œ âšȘïžâžĄïž [🗄 (🔗) đŸ’œ](../tutorial/sql-databases.md){.internal-link target=_blank} ⚙ 🔬 đŸ’œ. - -🌐 đŸ“± 📟 🎏, 👆 đŸ’Ș đŸš¶ 🔙 👈 📃 ✅ ❔ ⚫. - -🕮 🔀 đŸ“„ 🆕 🔬 📁. - -👆 😐 🔗 `get_db()` 🔜 📹 đŸ’œ 🎉. - -💯, 👆 đŸ’Ș ⚙ 🔗 🔐 📹 👆 *🛃* đŸ’œ 🎉 ↩ 1ïžâƒŁ 👈 🔜 ⚙ 🛎. - -👉 đŸ–Œ đŸ‘„ 🔜 ✍ 🍕 đŸ’œ 🕮 💯. - -## 📁 📊 - -đŸ‘„ ✍ 🆕 📁 `sql_app/tests/test_sql_app.py`. - -🆕 📁 📊 👀 💖: - -``` hl_lines="9-11" -. -└── sql_app - ├── __init__.py - ├── crud.py - ├── database.py - ├── main.py - ├── models.py - ├── schemas.py - └── tests - ├── __init__.py - └── test_sql_app.py -``` - -## ✍ 🆕 đŸ’œ 🎉 - -đŸ„‡, đŸ‘„ ✍ 🆕 đŸ’œ 🎉 âźïž 🆕 đŸ’œ. - -💯 đŸ‘„ 🔜 ⚙ 📁 `test.db` ↩ `sql_app.db`. - -✋ 🎂 🎉 📟 🌅 ⚖ 🌘 🎏, đŸ‘„ 📁 ⚫. - -```Python hl_lines="8-13" -{!../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} -``` - -/// tip - -👆 đŸ’Ș 📉 ❎ 👈 📟 🚼 ⚫ 🔱 & ⚙ ⚫ âšȘïžâžĄïž đŸ‘Żâ€â™‚ïž `database.py` & `tests/test_sql_app.py`. - -🩁 & 🎯 🔛 🎯 🔬 📟, đŸ‘„ 🖹 ⚫. - -/// - -## ✍ đŸ’œ - -↩ 🔜 đŸ‘„ 🔜 ⚙ 🆕 đŸ’œ 🆕 📁, đŸ‘„ đŸ’Ș ⚒ 💭 đŸ‘„ ✍ đŸ’œ âźïž: - -```Python -Base.metadata.create_all(bind=engine) -``` - -👈 🛎 đŸ€™ `main.py`, ✋ ⏞ `main.py` ⚙ đŸ’œ 📁 `sql_app.db`, & đŸ‘„ đŸ’Ș ⚒ 💭 đŸ‘„ ✍ `test.db` 💯. - -đŸ‘„ 🚼 👈 ⏞ đŸ“„, âźïž 🆕 📁. - -```Python hl_lines="16" -{!../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} -``` - -## 🔗 🔐 - -🔜 đŸ‘„ ✍ 🔗 🔐 & 🚼 ⚫ 🔐 👆 đŸ“±. - -```Python hl_lines="19-24 27" -{!../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} -``` - -/// tip - -📟 `override_get_db()` 🌖 ⚫❔ 🎏 `get_db()`, ✋ `override_get_db()` đŸ‘„ ⚙ `TestingSessionLocal` 🔬 đŸ’œ ↩. - -/// - -## 💯 đŸ“± - -‎ đŸ‘„ đŸ’Ș 💯 đŸ“± 🛎. - -```Python hl_lines="32-47" -{!../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} -``` - -& 🌐 đŸ› ïž đŸ‘„ ⚒ đŸ’œ âźïž 💯 🔜 `test.db` đŸ’œ ↩ 👑 `sql_app.db`. diff --git a/docs/em/docs/how-to/sql-databases-peewee.md b/docs/em/docs/how-to/sql-databases-peewee.md deleted file mode 100644 index d25b77894..000000000 --- a/docs/em/docs/how-to/sql-databases-peewee.md +++ /dev/null @@ -1,576 +0,0 @@ -# 🗄 (🔗) đŸ’œ âźïž 🏒 - -/// warning - -đŸš„ 👆 ▶, 🔰 [🗄 (🔗) đŸ’œ](../tutorial/sql-databases.md){.internal-link target=_blank} 👈 ⚙ 🇾đŸ‡Č 🔜 đŸ„ƒ. - -💭 🆓 đŸš¶ 👉. - -/// - -đŸš„ 👆 ▶ 🏗 âšȘïžâžĄïž 🖌, 👆 đŸŽČ đŸ‘» 📆 âźïž 🇾đŸ‡Č 🐜 ([🗄 (🔗) đŸ’œ](../tutorial/sql-databases.md){.internal-link target=_blank}), ⚖ 🙆 🎏 🔁 🐜. - -đŸš„ 👆 âȘ ✔ 📟 🧱 👈 ⚙ 🏒 🐜, 👆 đŸ’Ș ✅ đŸ“„ ❔ ⚙ ⚫ âźïž **FastAPI**. - -/// warning | "🐍 3ïžâƒŁ.7ïžâƒŁ ➕ ✔" - -👆 🔜 đŸ’Ș 🐍 3ïžâƒŁ.7ïžâƒŁ ⚖ 🔛 🔒 ⚙ 🏒 âźïž FastAPI. - -/// - -## 🏒 🔁 - -🏒 đŸš« 🔧 🔁 đŸ› ïž, ⚖ âźïž đŸ‘« đŸ€Ż. - -🏒 ✔ đŸ‹ïž 🔑 🔃 🚼 🔱 & 🔃 ❔ ⚫ 🔜 ⚙. - -đŸš„ 👆 đŸ› ïž 🈾 âźïž 🗝 đŸš«-🔁 đŸ› ïž, & đŸ’Ș đŸ‘· âźïž 🌐 🚼 🔱, **⚫ đŸ’Ș 👑 🧰**. - -✋ đŸš„ 👆 đŸ’Ș 🔀 🔱, 🐕‍đŸŠș 🌖 🌘 1ïžâƒŁ 🔁 đŸ’œ, đŸ‘· âźïž 🔁 đŸ› ïž (💖 FastAPI), ♒, 👆 🔜 đŸ’Ș 🚼 🏗 ➕ 📟 🔐 👈 🔱. - -👐, ⚫ đŸ’Ș ⚫, & đŸ“„ 👆 🔜 👀 ⚫❔ ⚫❔ 📟 👆 ✔ 🚼 đŸ’Ș ⚙ 🏒 âźïž FastAPI. - -/// note | "📡 â„č" - -👆 đŸ’Ș ✍ 🌅 🔃 🏒 🧍 🔃 🔁 🐍 đŸ©ș, ❔, đŸ‡”đŸ‡·. - -/// - -## 🎏 đŸ“± - -đŸ‘„ 🔜 ✍ 🎏 🈾 🇾đŸ‡Č 🔰 ([🗄 (🔗) đŸ’œ](../tutorial/sql-databases.md){.internal-link target=_blank}). - -🌅 📟 đŸ€™ 🎏. - -, đŸ‘„ 🔜 🎯 🕮 🔛 đŸ”ș. - -## 📁 📊 - -âžĄïž 💬 👆 ✔ 📁 📛 `my_super_project` 👈 🔌 🎧-📁 đŸ€™ `sql_app` âźïž 📊 💖 👉: - -``` -. -└── sql_app - ├── __init__.py - ├── crud.py - ├── database.py - ├── main.py - └── schemas.py -``` - -👉 🌖 🎏 📊 đŸ‘„ ✔ 🇾đŸ‡Č 🔰. - -🔜 âžĄïž 👀 ⚫❔ 🔠 📁/đŸ•č 🔹. - -## ✍ 🏒 🍕 - -âžĄïž 🔗 📁 `sql_app/database.py`. - -### đŸ© 🏒 📟 - -âžĄïž đŸ„‡ ✅ 🌐 😐 🏒 📟, ✍ 🏒 đŸ’œ: - -```Python hl_lines="3 5 22" -{!../../docs_src/sql_databases_peewee/sql_app/database.py!} -``` - -/// tip - -✔ đŸ€Ż 👈 đŸš„ 👆 💚 ⚙ 🎏 đŸ’œ, 💖 ✳, 👆 đŸš« đŸš« 🔀 đŸŽ». 👆 🔜 đŸ’Ș ⚙ 🎏 🏒 đŸ’œ 🎓. - -/// - -#### 🗒 - -❌: - -```Python -check_same_thread=False -``` - -🌓 1ïžâƒŁ 🇾đŸ‡Č 🔰: - -```Python -connect_args={"check_same_thread": False} -``` - -...⚫ đŸ’Ș 🕮 `SQLite`. - -/// info | "📡 â„č" - -⚫❔ 🎏 📡 â„č [🗄 (🔗) đŸ’œ](../tutorial/sql-databases.md#_7){.internal-link target=_blank} ✔. - -/// - -### ⚒ 🏒 🔁-🔗 `PeeweeConnectionState` - -👑 ❔ âźïž 🏒 & FastAPI 👈 🏒 ⚓ 🙇 🔛 🐍 `threading.local`, & ⚫ đŸš« ✔ 🎯 🌌 🔐 ⚫ ⚖ âžĄïž 👆 đŸ” 🔗/🎉 🔗 (🔹 🇾đŸ‡Č 🔰). - -& `threading.local` đŸš« 🔗 âźïž 🆕 🔁 ⚒ 🏛 🐍. - -/// note | "📡 â„č" - -`threading.local` ⚙ ✔ "đŸŽ±" 🔱 👈 ✔ 🎏 đŸ’Č 🔠 đŸ§”. - -👉 ⚠ 🗝 đŸ› ïž 🏗 ✔ 1ïžâƒŁ 👁 đŸ§” 📍 📹, 🙅‍♂ 🌖, 🙅‍♂ 🌘. - -⚙ 👉, 🔠 📹 🔜 ✔ 🚼 👍 đŸ’œ 🔗/🎉, ❔ ☑ 🏁 đŸ„…. - -✋ FastAPI, ⚙ 🆕 🔁 ⚒, đŸ’Ș đŸ” 🌅 🌘 1ïžâƒŁ 📹 🔛 🎏 đŸ§”. & 🎏 🕰, 👁 📹, ⚫ đŸ’Ș 🏃 💗 👜 🎏 đŸ§” (đŸ§”), ⚓ 🔛 đŸš„ 👆 ⚙ `async def` ⚖ 😐 `def`. 👉 ⚫❔ đŸ€ 🌐 🎭 📈 FastAPI. - -/// - -✋ 🐍 3ïžâƒŁ.7ïžâƒŁ & 🔛 🚚 🌖 🏧 🎛 `threading.local`, 👈 đŸ’Ș ⚙ đŸ„‰ 🌐❔ `threading.local` 🔜 ⚙, ✋ 🔗 âźïž 🆕 🔁 ⚒. - -đŸ‘„ 🔜 ⚙ 👈. ⚫ đŸ€™ `contextvars`. - -đŸ‘„ 🔜 🔐 🔗 🍕 🏒 👈 ⚙ `threading.local` & ❎ đŸ‘« âźïž `contextvars`, âźïž 🔗 â„č. - -👉 5ïžâƒŁđŸ“† 😑 🍖 🏗 (& ⚫ đŸ€™), 👆 đŸš« đŸ€™ đŸ’Ș 🍕 đŸ€” ❔ ⚫ đŸ‘· ⚙ ⚫. - -đŸ‘„ 🔜 ✍ `PeeweeConnectionState`: - -```Python hl_lines="10-19" -{!../../docs_src/sql_databases_peewee/sql_app/database.py!} -``` - -👉 🎓 😖 âšȘïžâžĄïž 🎁 🔗 🎓 ⚙ 🏒. - -⚫ ✔ 🌐 ⚛ ⚒ 🏒 ⚙ `contextvars` ↩ `threading.local`. - -`contextvars` đŸ‘· 🍖 🎏 🌘 `threading.local`. ✋ 🎂 🏒 🔗 📟 đŸ€” 👈 👉 🎓 đŸ‘· âźïž `threading.local`. - -, đŸ‘„ đŸ’Ș ➕ đŸŽ± ⚒ ⚫ đŸ‘· đŸš„ ⚫ ⚙ `threading.local`. `__init__`, `__setattr__`, & `__getattr__` đŸ› ïž 🌐 ✔ đŸŽ± 👉 ⚙ 🏒 đŸ” đŸ€” 👈 ⚫ 🔜 🔗 âźïž FastAPI. - -/// tip - -👉 🔜 ⚒ 🏒 🎭 ☑ 🕐❔ ⚙ âźïž FastAPI. đŸš« đŸŽČ 📂 ⚖ đŸ“Ș 🔗 👈 ➖ ⚙, 🏗 ❌, ♒. - -✋ ⚫ đŸš« đŸ€ 🏒 🔁 💎-đŸ‹ïž. 👆 🔜 ⚙ 😐 `def` 🔱 & đŸš« `async def`. - -/// - -### ⚙ 🛃 `PeeweeConnectionState` 🎓 - -🔜, 📁 `._state` 🔗 🔱 🏒 đŸ’œ `db` 🎚 ⚙ 🆕 `PeeweeConnectionState`: - -```Python hl_lines="24" -{!../../docs_src/sql_databases_peewee/sql_app/database.py!} -``` - -/// tip - -⚒ 💭 👆 📁 `db._state` *âźïž* 🏗 `db`. - -/// - -/// tip - -👆 🔜 🎏 🙆 🎏 🏒 đŸ’œ, 🔌 `PostgresqlDatabase`, `MySQLDatabase`, ♒. - -/// - -## ✍ đŸ’œ đŸ· - -âžĄïž 🔜 👀 📁 `sql_app/models.py`. - -### ✍ 🏒 đŸ· 👆 đŸ’œ - -🔜 ✍ 🏒 đŸ· (🎓) `User` & `Item`. - -👉 🎏 👆 🔜 đŸš„ 👆 ⏩ 🏒 🔰 & â„č đŸ· ✔ 🎏 đŸ’œ 🇾đŸ‡Č 🔰. - -/// tip - -🏒 ⚙ ⚖ "**đŸ·**" 🔗 👉 🎓 & 👐 👈 🔗 âźïž đŸ’œ. - -✋ Pydantic ⚙ ⚖ "**đŸ·**" 🔗 🕳 🎏, đŸ’œ 🔬, đŸ› ïž, & đŸ§Ÿ 🎓 & 👐. - -/// - -🗄 `db` âšȘïžâžĄïž `database` (📁 `database.py` âšȘïžâžĄïž 🔛) & ⚙ ⚫ đŸ“„. - -```Python hl_lines="3 6-12 15-21" -{!../../docs_src/sql_databases_peewee/sql_app/models.py!} -``` - -/// tip - -🏒 ✍ 📚 đŸŽ± 🔱. - -⚫ 🔜 🔁 🚼 `id` 🔱 🔱 👑 🔑. - -⚫ 🔜 ⚒ 📛 🏓 ⚓ 🔛 🎓 📛. - - `Item`, ⚫ 🔜 ✍ 🔱 `owner_id` âźïž 🔱 🆔 `User`. ✋ đŸ‘„ đŸš« 📣 ⚫ 🙆. - -/// - -## ✍ Pydantic đŸ· - -🔜 âžĄïž ✅ 📁 `sql_app/schemas.py`. - -/// tip - -❎ 😹 🖖 🏒 *đŸ·* & Pydantic *đŸ·*, đŸ‘„ 🔜 ✔ 📁 `models.py` âźïž 🏒 đŸ·, & 📁 `schemas.py` âźïž Pydantic đŸ·. - -đŸ‘« Pydantic đŸ· 🔬 🌅 ⚖ 🌘 "🔗" (☑ 📊 💠). - -👉 🔜 â„č đŸ‘„ ❎ 😹 âȘ ⚙ đŸ‘Żâ€â™‚ïž. - -/// - -### ✍ Pydantic *đŸ·* / 🔗 - -✍ 🌐 🎏 Pydantic đŸ· 🇾đŸ‡Č 🔰: - -```Python hl_lines="16-18 21-22 25-30 34-35 38-39 42-48" -{!../../docs_src/sql_databases_peewee/sql_app/schemas.py!} -``` - -/// tip - -đŸ“„ đŸ‘„ 🏗 đŸ· âźïž `id`. - -đŸ‘„ đŸš« 🎯 ✔ `id` 🔱 🏒 đŸ·, ✋ 🏒 🚼 1ïžâƒŁ 🔁. - -đŸ‘„ ❎ đŸŽ± `owner_id` 🔱 `Item`. - -/// - -### ✍ `PeeweeGetterDict` Pydantic *đŸ·* / 🔗 - -🕐❔ 👆 🔐 💛 🏒 🎚, 💖 `some_user.items`, 🏒 đŸš« 🚚 `list` `Item`. - -⚫ 🚚 🎁 🛃 🎚 🎓 `ModelSelect`. - -⚫ đŸ’Ș ✍ `list` 🚼 🏬 âźïž `list(some_user.items)`. - -✋ 🎚 ⚫ đŸš« `list`. & ⚫ đŸš« ☑ 🐍 🚂. ↩ 👉, Pydantic đŸš« 💭 🔱 ❔ 🗜 ⚫ `list` Pydantic *đŸ·* / 🔗. - -✋ âźïž ⏬ Pydantic ✔ 🚚 🛃 🎓 👈 😖 âšȘïžâžĄïž `pydantic.utils.GetterDict`, 🚚 đŸ› ïž ⚙ 🕐❔ ⚙ `orm_mode = True` 🗃 đŸ’Č 🐜 đŸ· 🔱. - -đŸ‘„ 🔜 ✍ 🛃 `PeeweeGetterDict` 🎓 & ⚙ ⚫ 🌐 🎏 Pydantic *đŸ·* / 🔗 👈 ⚙ `orm_mode`: - -```Python hl_lines="3 8-13 31 49" -{!../../docs_src/sql_databases_peewee/sql_app/schemas.py!} -``` - -đŸ“„ đŸ‘„ ✅ đŸš„ 🔱 👈 ➖ 🔐 (✅ `.items` `some_user.items`) 👐 `peewee.ModelSelect`. - -& đŸš„ 👈 đŸ’Œ, 📹 `list` âźïž ⚫. - -& ‎ đŸ‘„ ⚙ ⚫ Pydantic *đŸ·* / 🔗 👈 ⚙ `orm_mode = True`, âźïž 📳 🔱 `getter_dict = PeeweeGetterDict`. - -/// tip - -đŸ‘„ 🕮 đŸ’Ș ✍ 1ïžâƒŁ `PeeweeGetterDict` 🎓, & đŸ‘„ đŸ’Ș ⚙ ⚫ 🌐 Pydantic *đŸ·* / 🔗. - -/// - -## đŸ’© đŸ‡šđŸ‡» - -🔜 âžĄïž 👀 📁 `sql_app/crud.py`. - -### ✍ 🌐 đŸ’© đŸ‡šđŸ‡» - -✍ 🌐 🎏 đŸ’© đŸ‡šđŸ‡» 🇾đŸ‡Č 🔰, 🌐 📟 đŸ“¶ 🎏: - -```Python hl_lines="1 4-5 8-9 12-13 16-20 23-24 27-30" -{!../../docs_src/sql_databases_peewee/sql_app/crud.py!} -``` - -đŸ“€ đŸ”ș âźïž 📟 🇾đŸ‡Č 🔰. - -đŸ‘„ đŸš« đŸš¶â€â™€ïž `db` 🔱 đŸ€­. ↩ đŸ‘„ ⚙ đŸ· 🔗. 👉 ↩ `db` 🎚 🌐 🎚, 👈 🔌 🌐 🔗 ⚛. 👈 ⚫❔ đŸ‘„ ✔ 🌐 `contextvars` â„č 🔛. - -🆖, 🕐❔ 🛬 📚 🎚, 💖 `get_users`, đŸ‘„ 🔗 đŸ€™ `list`, 💖: - -```Python -list(models.User.select()) -``` - -👉 🎏 đŸ€” 👈 đŸ‘„ ✔ ✍ 🛃 `PeeweeGetterDict`. ✋ 🛬 🕳 👈 âȘ `list` ↩ `peewee.ModelSelect` `response_model` *➡ đŸ› ïž* âźïž `List[models.User]` (👈 đŸ‘„ 🔜 👀 âȘ) 🔜 đŸ‘· ☑. - -## 👑 **FastAPI** đŸ“± - -& 🔜 📁 `sql_app/main.py` âžĄïž đŸ› ïž & ⚙ 🌐 🎏 🍕 đŸ‘„ ✍ ⏭. - -### ✍ đŸ’œ 🏓 - -đŸ“¶ 🙃 🌌 ✍ đŸ’œ 🏓: - -```Python hl_lines="9-11" -{!../../docs_src/sql_databases_peewee/sql_app/main.py!} -``` - -### ✍ 🔗 - -✍ 🔗 👈 🔜 🔗 đŸ’œ ▶ ▶ 📹 & 🔌 ⚫ 🔚: - -```Python hl_lines="23-29" -{!../../docs_src/sql_databases_peewee/sql_app/main.py!} -``` - -đŸ“„ đŸ‘„ ✔ 🛁 `yield` ↩ đŸ‘„ đŸ€™ đŸš« ⚙ đŸ’œ 🎚 🔗. - -⚫ 🔗 đŸ’œ & ♻ 🔗 đŸ’œ 🔗 🔱 👈 🔬 🔠 📹 (⚙ `contextvars` đŸŽ± âšȘïžâžĄïž 🔛). - -↩ đŸ’œ 🔗 ⚠ đŸ‘€/đŸ…Ÿ 🚧, 👉 🔗 ✍ âźïž 😐 `def` 🔱. - -& ‎, 🔠 *➡ đŸ› ïž 🔱* 👈 đŸ’Ș 🔐 đŸ’œ đŸ‘„ 🚼 ⚫ 🔗. - -✋ đŸ‘„ đŸš« ⚙ đŸ’Č 👐 👉 🔗 (⚫ đŸ€™ đŸš« đŸ€ 🙆 đŸ’Č, ⚫ ✔ 🛁 `yield`). , đŸ‘„ đŸš« 🚼 ⚫ *➡ đŸ› ïž 🔱* ✋ *➡ đŸ› ïž 👹‍🎹* `dependencies` 🔱: - -```Python hl_lines="32 40 47 59 65 72" -{!../../docs_src/sql_databases_peewee/sql_app/main.py!} -``` - -### 🔑 🔱 🎧-🔗 - -🌐 `contextvars` 🍕 đŸ‘·, đŸ‘„ đŸ’Ș ⚒ 💭 đŸ‘„ ✔ 🔬 đŸ’Č `ContextVar` 🔠 📹 👈 ⚙ đŸ’œ, & 👈 đŸ’Č 🔜 ⚙ đŸ’œ đŸ‡”đŸ‡ž (🔗, đŸ’”, ♒) 🎂 📹. - -👈, đŸ‘„ đŸ’Ș ✍ ➕1ïžâƒŁ `async` 🔗 `reset_db_state()` 👈 ⚙ 🎧-🔗 `get_db()`. ⚫ 🔜 ⚒ đŸ’Č 🔑 🔱 (âźïž 🔱 `dict`) 👈 🔜 ⚙ đŸ’œ đŸ‡”đŸ‡ž 🎂 📹. & ‎ 🔗 `get_db()` 🔜 đŸȘ ⚫ đŸ’œ đŸ‡”đŸ‡ž (🔗, đŸ’”, ♒). - -```Python hl_lines="18-20" -{!../../docs_src/sql_databases_peewee/sql_app/main.py!} -``` - -**⏭ 📹**, đŸ‘„ 🔜 âČ 👈 🔑 🔱 🔄 `async` 🔗 `reset_db_state()` & ‎ ✍ 🆕 🔗 `get_db()` 🔗, 👈 🆕 📹 🔜 ✔ 🚼 👍 đŸ’œ đŸ‡”đŸ‡ž (🔗, đŸ’”, ♒). - -/// tip - -FastAPI 🔁 đŸ› ïž, 1ïžâƒŁ 📹 đŸ’Ș ▶ ➖ đŸ› ïž, & ⏭ 🏁, ➕1ïžâƒŁ 📹 đŸ’Ș 📹 & ▶ 🏭 👍, & ⚫ 🌐 đŸ’Ș đŸ› ïž 🎏 đŸ§”. - -✋ 🔑 🔱 đŸ€” đŸ‘« 🔁 ⚒,, 🏒 đŸ’œ đŸ‡”đŸ‡ž ⚒ `async` 🔗 `reset_db_state()` 🔜 🚧 🚼 👍 đŸ’œ 🎂 🎂 📹. - - & 🎏 🕰, 🎏 đŸ› ïž 📹 🔜 ✔ 🚼 👍 đŸ’œ đŸ‡”đŸ‡ž 👈 🔜 🔬 🎂 📹. - -/// - -#### 🏒 🗳 - -đŸš„ 👆 ⚙ 🏒 🗳, ☑ đŸ’œ `db.obj`. - -, 👆 🔜 âČ ⚫ âźïž: - -```Python hl_lines="3-4" -async def reset_db_state(): - database.db.obj._state._state.set(db_state_default.copy()) - database.db.obj._state.reset() -``` - -### ✍ 👆 **FastAPI** *➡ đŸ› ïž* - -🔜, 😒, đŸ“„ đŸ© **FastAPI** *➡ đŸ› ïž* 📟. - -```Python hl_lines="32-37 40-43 46-53 56-62 65-68 71-79" -{!../../docs_src/sql_databases_peewee/sql_app/main.py!} -``` - -### 🔃 `def` 🆚 `async def` - -🎏 âźïž 🇾đŸ‡Č, đŸ‘„ đŸš« 🔹 🕳 💖: - -```Python -user = await models.User.select().first() -``` - -...✋ ↩ đŸ‘„ ⚙: - -```Python -user = models.User.select().first() -``` - -, 🔄, đŸ‘„ 🔜 📣 *➡ đŸ› ïž 🔱* & 🔗 đŸ” `async def`, âźïž 😐 `def`,: - -```Python hl_lines="2" -# Something goes here -def read_users(skip: int = 0, limit: int = 100): - # Something goes here -``` - -## 🔬 🏒 âźïž 🔁 - -👉 đŸ–Œ 🔌 ➕ *➡ đŸ› ïž* 👈 🔬 📏 🏭 📹 âźïž `time.sleep(sleep_time)`. - -⚫ 🔜 ✔ đŸ’œ 🔗 📂 ▶ & 🔜 ⌛ đŸ„ˆ ⏭ 🙇 🔙. & 🔠 🆕 📹 🔜 ⌛ 🕐 đŸ„ˆ 🌘. - -👉 🔜 đŸ’Ș âžĄïž 👆 💯 👈 👆 đŸ“± âźïž 🏒 & FastAPI 🎭 ☑ âźïž 🌐 đŸ’© 🔃 đŸ§”. - -đŸš„ 👆 💚 ✅ ❔ 🏒 🔜 💔 👆 đŸ“± đŸš„ ⚙ đŸ” đŸ› ïž, đŸš¶ `sql_app/database.py` 📁 & đŸ€ ⏞: - -```Python -# db._state = PeeweeConnectionState() -``` - -& 📁 `sql_app/main.py` 📁, đŸ€ đŸ’Ș `async` 🔗 `reset_db_state()` & ❎ ⚫ âźïž `pass`: - -```Python -async def reset_db_state(): -# database.db._state._state.set(db_state_default.copy()) -# database.db._state.reset() - pass -``` - -‎ 🏃 👆 đŸ“± âźïž Uvicorn: - -
- -```console -$ uvicorn sql_app.main:app --reload - -INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) -``` - -
- -📂 👆 đŸ–„ http://127.0.0.1:8000/docs & ✍ đŸ‘©â€â€â€đŸ‘š đŸ‘©â€đŸ’». - -‎ 📂 1ïžâƒŁ0ïžâƒŁ 📑 http://127.0.0.1:8000/docs#/default/read_🐌_đŸ‘©â€đŸ’»_slowusers_ = 🎏 🕰. - -đŸš¶ *➡ đŸ› ïž* "đŸ€š `/slowusers/`" 🌐 📑. ⚙ "🔄 ⚫ 👅" đŸ”Œ & đŸ› ïž 📹 🔠 📑, 1ïžâƒŁ ▶ âźïž 🎏. - -📑 🔜 ⌛ 🍖 & ‎ đŸ‘« 🔜 🎩 `Internal Server Error`. - -### ⚫❔ 🔹 - -đŸ„‡ 📑 🔜 ⚒ 👆 đŸ“± ✍ 🔗 đŸ’œ & ⌛ đŸ„ˆ ⏭ 🙇 🔙 & đŸ“Ș đŸ’œ 🔗. - -‎, 📹 ⏭ 📑, 👆 đŸ“± 🔜 ⌛ 🕐 đŸ„ˆ 🌘, & 🔛. - -👉 ⛓ 👈 ⚫ 🔜 🔚 🆙 🏁 🏁 📑' 📹 âȘ 🌘 âźïž 🕐. - -‎ 1ïžâƒŁ 🏁 📹 👈 ⌛ 🌘 đŸ„ˆ 🔜 🔄 📂 đŸ’œ 🔗, ✋ 1ïžâƒŁ 📚 âźïž 📹 🎏 📑 🔜 đŸŽČ đŸ” 🎏 đŸ§” đŸ„‡ 🕐, ⚫ 🔜 ✔ 🎏 đŸ’œ 🔗 👈 âȘ 📂, & 🏒 🔜 🚼 ❌ & 👆 🔜 👀 ⚫ đŸ“¶, & 📹 🔜 ✔ `Internal Server Error`. - -👉 🔜 đŸŽČ 🔹 🌅 🌘 1ïžâƒŁ 📚 📑. - -đŸš„ 👆 ✔ 💗 đŸ‘©â€đŸ’» 💬 👆 đŸ“± ⚫❔ 🎏 🕰, 👉 ⚫❔ đŸ’Ș 🔹. - -& 👆 đŸ“± ▶ đŸ” 🌅 & 🌖 đŸ‘©â€đŸ’» 🎏 🕰, ⌛ 🕰 👁 📹 đŸ’Ș 📏 & 📏 âČ ❌. - -### 🔧 🏒 âźïž FastAPI - -🔜 đŸš¶ 🔙 📁 `sql_app/database.py`, & ✍ ⏞: - -```Python -db._state = PeeweeConnectionState() -``` - -& 📁 `sql_app/main.py` 📁, ✍ đŸ’Ș `async` 🔗 `reset_db_state()`: - -```Python -async def reset_db_state(): - database.db._state._state.set(db_state_default.copy()) - database.db._state.reset() -``` - -❎ 👆 🏃‍♂ đŸ“± & ▶ ⚫ 🔄. - -🔁 🎏 đŸ› ïž âźïž 1ïžâƒŁ0ïžâƒŁ 📑. 👉 🕰 🌐 đŸ‘« 🔜 ⌛ & 👆 🔜 đŸ€š 🌐 🏁 đŸ” ❌. - -...👆 🔧 ⚫ ❗ - -## 📄 🌐 📁 - - 💭 👆 🔜 ✔ 📁 📛 `my_super_project` (⚖ 👐 👆 💚) 👈 🔌 🎧-📁 đŸ€™ `sql_app`. - -`sql_app` 🔜 ✔ 📄 📁: - -* `sql_app/__init__.py`: 🛁 📁. - -* `sql_app/database.py`: - -```Python -{!../../docs_src/sql_databases_peewee/sql_app/database.py!} -``` - -* `sql_app/models.py`: - -```Python -{!../../docs_src/sql_databases_peewee/sql_app/models.py!} -``` - -* `sql_app/schemas.py`: - -```Python -{!../../docs_src/sql_databases_peewee/sql_app/schemas.py!} -``` - -* `sql_app/crud.py`: - -```Python -{!../../docs_src/sql_databases_peewee/sql_app/crud.py!} -``` - -* `sql_app/main.py`: - -```Python -{!../../docs_src/sql_databases_peewee/sql_app/main.py!} -``` - -## 📡 â„č - -/// warning - -👉 đŸ“¶ 📡 â„č 👈 👆 đŸŽČ đŸš« đŸ’Ș. - -/// - -### ⚠ - -🏒 ⚙ `threading.local` 🔱 đŸȘ ⚫ đŸ’œ "đŸ‡”đŸ‡ž" đŸ’œ (🔗, đŸ’”, ♒). - -`threading.local` ✍ đŸ’Č 🌟 âźïž đŸ§”, ✋ 🔁 đŸ› ïž 🔜 🏃 🌐 📟 (✅ 🔠 📹) 🎏 đŸ§”, & đŸŽČ đŸš« ✔. - -🔛 🔝 👈, 🔁 đŸ› ïž đŸ’Ș 🏃 🔁 📟 đŸ§” (⚙ `asyncio.run_in_executor`), ✋ 🔗 🎏 📹. - -👉 ⛓ 👈, âźïž 🏒 âźïž đŸ› ïž, 💗 📋 đŸ’Ș ⚙ 🎏 `threading.local` 🔱 & 🔚 🆙 đŸ€ 🎏 🔗 & đŸ’œ (👈 đŸ‘« đŸš«đŸ”œ đŸš«), & 🎏 🕰, đŸš„ đŸ‘« đŸ› ïž 🔁 đŸ‘€/đŸ…Ÿ-🚧 📟 đŸ§” (âźïž 😐 `def` 🔱 FastAPI, *➡ đŸ› ïž* & 🔗), 👈 📟 🏆 đŸš« ✔ 🔐 đŸ’œ đŸ‡”đŸ‡ž 🔱, âȘ ⚫ 🍕 🎏 📹 & ⚫ 🔜 đŸ’Ș đŸ€š 🔐 🎏 đŸ’œ đŸ‡”đŸ‡ž. - -### 🔑 🔱 - -🐍 3ïžâƒŁ.7ïžâƒŁ ✔ `contextvars` 👈 đŸ’Ș ✍ 🇧🇿 🔱 đŸ“¶ 🎏 `threading.local`, ✋ 🔗 đŸ‘« 🔁 ⚒. - -đŸ“€ 📚 👜 ✔ đŸ€Ż. - -`ContextVar` ✔ ✍ 🔝 đŸ•č, 💖: - -```Python -some_var = ContextVar("some_var", default="default value") -``` - -⚒ đŸ’Č ⚙ âźïž "🔑" (✅ âźïž 📹) ⚙: - -```Python -some_var.set("new value") -``` - -đŸ€š đŸ’Č 🙆 🔘 🔑 (✅ 🙆 🍕 🚚 âźïž 📹) ⚙: - -```Python -some_var.get() -``` - -### ⚒ 🔑 🔱 `async` 🔗 `reset_db_state()` - -đŸš„ 🍕 🔁 📟 ⚒ đŸ’Č âźïž `some_var.set("updated in function")` (✅ 💖 `async` 🔗), 🎂 📟 ⚫ & 📟 👈 đŸš¶ âźïž (✅ 📟 🔘 `async` 🔱 đŸ€™ âźïž `await`) 🔜 👀 👈 🆕 đŸ’Č. - -, 👆 đŸ’Œ, đŸš„ đŸ‘„ ⚒ 🏒 đŸ‡”đŸ‡ž 🔱 (âźïž 🔱 `dict`) `async` 🔗, 🌐 🎂 🔗 📟 👆 đŸ“± 🔜 👀 👉 đŸ’Č & 🔜 đŸ’Ș ♻ ⚫ 🎂 📹. - -& 🔑 🔱 🔜 ⚒ 🔄 ⏭ 📹, đŸš„ đŸ‘« đŸ› ïž. - -### ⚒ đŸ’œ đŸ‡”đŸ‡ž 🔗 `get_db()` - -`get_db()` 😐 `def` 🔱, **FastAPI** 🔜 ⚒ ⚫ 🏃 đŸ§”, âźïž *📁* "🔑", đŸ§‘â€đŸ€â€đŸ§‘ 🎏 đŸ’Č 🔑 🔱 ( `dict` âźïž âČ đŸ’œ đŸ‡”đŸ‡ž). ‎ ⚫ đŸ’Ș 🚼 đŸ’œ đŸ‡”đŸ‡ž 👈 `dict`, 💖 🔗, ♒. - -✋ đŸš„ đŸ’Č 🔑 🔱 (🔱 `dict`) ⚒ 👈 😐 `def` 🔱, ⚫ 🔜 ✍ 🆕 đŸ’Č 👈 🔜 🚧 🕮 👈 đŸ§” đŸ§”, & 🎂 📟 (💖 *➡ đŸ› ïž 🔱*) đŸš«đŸ”œ ✔ 🔐 ⚫. `get_db()` đŸ‘„ đŸ’Ș 🕮 ⚒ đŸ’Č `dict`, ✋ đŸš« 🎂 `dict` ⚫. - -, đŸ‘„ đŸ’Ș ✔ `async` 🔗 `reset_db_state()` ⚒ `dict` 🔑 🔱. 👈 🌌, 🌐 📟 ✔ 🔐 🎏 `dict` đŸ’œ đŸ‡”đŸ‡ž 👁 📹. - -### 🔗 & 🔌 🔗 `get_db()` - -‎ ⏭ ❔ 🔜, ⚫❔ đŸš« 🔗 & 🔌 đŸ’œ `async` 🔗 ⚫, ↩ `get_db()`❓ - -`async` 🔗 ✔ `async` 🔑 🔱 🛡 🎂 📹, ✋ 🏗 & đŸ“Ș đŸ’œ 🔗 ⚠ 🚧, ⚫ đŸ’Ș 📉 🎭 đŸš„ ⚫ đŸ“€. - -đŸ‘„ đŸ’Ș 😐 `def` 🔗 `get_db()`. diff --git a/docs/en/docs/advanced/testing-database.md b/docs/en/docs/advanced/testing-database.md deleted file mode 100644 index 2b704f229..000000000 --- a/docs/en/docs/advanced/testing-database.md +++ /dev/null @@ -1,111 +0,0 @@ -# Testing a Database - -/// info - -These docs are about to be updated. 🎉 - -The current version assumes Pydantic v1, and SQLAlchemy versions less than 2.0. - -The new docs will include Pydantic v2 and will use SQLModel (which is also based on SQLAlchemy) once it is updated to use Pydantic v2 as well. - -/// - -You can use the same dependency overrides from [Testing Dependencies with Overrides](testing-dependencies.md){.internal-link target=_blank} to alter a database for testing. - -You could want to set up a different database for testing, rollback the data after the tests, pre-fill it with some testing data, etc. - -The main idea is exactly the same you saw in that previous chapter. - -## Add tests for the SQL app - -Let's update the example from [SQL (Relational) Databases](../tutorial/sql-databases.md){.internal-link target=_blank} to use a testing database. - -All the app code is the same, you can go back to that chapter check how it was. - -The only changes here are in the new testing file. - -Your normal dependency `get_db()` would return a database session. - -In the test, you could use a dependency override to return your *custom* database session instead of the one that would be used normally. - -In this example we'll create a temporary database only for the tests. - -## File structure - -We create a new file at `sql_app/tests/test_sql_app.py`. - -So the new file structure looks like: - -``` hl_lines="9-11" -. -└── sql_app - ├── __init__.py - ├── crud.py - ├── database.py - ├── main.py - ├── models.py - ├── schemas.py - └── tests - ├── __init__.py - └── test_sql_app.py -``` - -## Create the new database session - -First, we create a new database session with the new database. - -We'll use an in-memory database that persists during the tests instead of the local file `sql_app.db`. - -But the rest of the session code is more or less the same, we just copy it. - -```Python hl_lines="8-13" -{!../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} -``` - -/// tip - -You could reduce duplication in that code by putting it in a function and using it from both `database.py` and `tests/test_sql_app.py`. - -For simplicity and to focus on the specific testing code, we are just copying it. - -/// - -## Create the database - -Because now we are going to use a new database in a new file, we need to make sure we create the database with: - -```Python -Base.metadata.create_all(bind=engine) -``` - -That is normally called in `main.py`, but the line in `main.py` uses the database file `sql_app.db`, and we need to make sure we create `test.db` for the tests. - -So we add that line here, with the new file. - -```Python hl_lines="16" -{!../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} -``` - -## Dependency override - -Now we create the dependency override and add it to the overrides for our app. - -```Python hl_lines="19-24 27" -{!../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} -``` - -/// tip - -The code for `override_get_db()` is almost exactly the same as for `get_db()`, but in `override_get_db()` we use the `TestingSessionLocal` for the testing database instead. - -/// - -## Test the app - -Then we can just test the app as normally. - -```Python hl_lines="32-47" -{!../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} -``` - -And all the modifications we made in the database during the tests will be in the `test.db` database instead of the main `sql_app.db`. diff --git a/docs/en/docs/how-to/async-sql-encode-databases.md b/docs/en/docs/how-to/async-sql-encode-databases.md deleted file mode 100644 index a72316c4d..000000000 --- a/docs/en/docs/how-to/async-sql-encode-databases.md +++ /dev/null @@ -1,201 +0,0 @@ -# ~~Async SQL (Relational) Databases with Encode/Databases~~ (deprecated) - -/// info - -These docs are about to be updated. 🎉 - -The current version assumes Pydantic v1. - -The new docs will include Pydantic v2 and will use SQLModel once it is updated to use Pydantic v2 as well. - -/// - -/// warning | "Deprecated" - -This tutorial is deprecated and will be removed in a future version. - -/// - -You can also use `encode/databases` with **FastAPI** to connect to databases using `async` and `await`. - -It is compatible with: - -* PostgreSQL -* MySQL -* SQLite - -In this example, we'll use **SQLite**, because it uses a single file and Python has integrated support. So, you can copy this example and run it as is. - -Later, for your production application, you might want to use a database server like **PostgreSQL**. - -/// tip - -You could adopt ideas from the section about SQLAlchemy ORM ([SQL (Relational) Databases](../tutorial/sql-databases.md){.internal-link target=_blank}), like using utility functions to perform operations in the database, independent of your **FastAPI** code. - -This section doesn't apply those ideas, to be equivalent to the counterpart in Starlette. - -/// - -## Import and set up `SQLAlchemy` - -* Import `SQLAlchemy`. -* Create a `metadata` object. -* Create a table `notes` using the `metadata` object. - -```Python hl_lines="4 14 16-22" -{!../../docs_src/async_sql_databases/tutorial001.py!} -``` - -/// tip - -Notice that all this code is pure SQLAlchemy Core. - -`databases` is not doing anything here yet. - -/// - -## Import and set up `databases` - -* Import `databases`. -* Create a `DATABASE_URL`. -* Create a `database` object. - -```Python hl_lines="3 9 12" -{!../../docs_src/async_sql_databases/tutorial001.py!} -``` - -/// tip - -If you were connecting to a different database (e.g. PostgreSQL), you would need to change the `DATABASE_URL`. - -/// - -## Create the tables - -In this case, we are creating the tables in the same Python file, but in production, you would probably want to create them with Alembic, integrated with migrations, etc. - -Here, this section would run directly, right before starting your **FastAPI** application. - -* Create an `engine`. -* Create all the tables from the `metadata` object. - -```Python hl_lines="25-28" -{!../../docs_src/async_sql_databases/tutorial001.py!} -``` - -## Create models - -Create Pydantic models for: - -* Notes to be created (`NoteIn`). -* Notes to be returned (`Note`). - -```Python hl_lines="31-33 36-39" -{!../../docs_src/async_sql_databases/tutorial001.py!} -``` - -By creating these Pydantic models, the input data will be validated, serialized (converted), and annotated (documented). - -So, you will be able to see it all in the interactive API docs. - -## Connect and disconnect - -* Create your `FastAPI` application. -* Create event handlers to connect and disconnect from the database. - -```Python hl_lines="42 45-47 50-52" -{!../../docs_src/async_sql_databases/tutorial001.py!} -``` - -## Read notes - -Create the *path operation function* to read notes: - -```Python hl_lines="55-58" -{!../../docs_src/async_sql_databases/tutorial001.py!} -``` - -/// note - -Notice that as we communicate with the database using `await`, the *path operation function* is declared with `async`. - -/// - -### Notice the `response_model=List[Note]` - -It uses `typing.List`. - -That documents (and validates, serializes, filters) the output data, as a `list` of `Note`s. - -## Create notes - -Create the *path operation function* to create notes: - -```Python hl_lines="61-65" -{!../../docs_src/async_sql_databases/tutorial001.py!} -``` - -/// info - -In Pydantic v1 the method was called `.dict()`, it was deprecated (but still supported) in Pydantic v2, and renamed to `.model_dump()`. - -The examples here use `.dict()` for compatibility with Pydantic v1, but you should use `.model_dump()` instead if you can use Pydantic v2. - -/// - -/// note - -Notice that as we communicate with the database using `await`, the *path operation function* is declared with `async`. - -/// - -### About `{**note.dict(), "id": last_record_id}` - -`note` is a Pydantic `Note` object. - -`note.dict()` returns a `dict` with its data, something like: - -```Python -{ - "text": "Some note", - "completed": False, -} -``` - -but it doesn't have the `id` field. - -So we create a new `dict`, that contains the key-value pairs from `note.dict()` with: - -```Python -{**note.dict()} -``` - -`**note.dict()` "unpacks" the key value pairs directly, so, `{**note.dict()}` would be, more or less, a copy of `note.dict()`. - -And then, we extend that copy `dict`, adding another key-value pair: `"id": last_record_id`: - -```Python -{**note.dict(), "id": last_record_id} -``` - -So, the final result returned would be something like: - -```Python -{ - "id": 1, - "text": "Some note", - "completed": False, -} -``` - -## Check it - -You can copy this code as is, and see the docs at http://127.0.0.1:8000/docs. - -There you can see all your API documented and interact with it: - - - -## More info - -You can read more about `encode/databases` at its GitHub page. diff --git a/docs/en/docs/how-to/nosql-databases-couchbase.md b/docs/en/docs/how-to/nosql-databases-couchbase.md deleted file mode 100644 index feb4025dd..000000000 --- a/docs/en/docs/how-to/nosql-databases-couchbase.md +++ /dev/null @@ -1,178 +0,0 @@ -# ~~NoSQL (Distributed / Big Data) Databases with Couchbase~~ (deprecated) - -/// info - -These docs are about to be updated. 🎉 - -The current version assumes Pydantic v1. - -The new docs will hopefully use Pydantic v2 and will use ODMantic with MongoDB. - -/// - -/// warning | "Deprecated" - -This tutorial is deprecated and will be removed in a future version. - -/// - -**FastAPI** can also be integrated with any NoSQL. - -Here we'll see an example using **Couchbase**, a document based NoSQL database. - -You can adapt it to any other NoSQL database like: - -* **MongoDB** -* **Cassandra** -* **CouchDB** -* **ArangoDB** -* **ElasticSearch**, etc. - -/// tip - -There is an official project generator with **FastAPI** and **Couchbase**, all based on **Docker**, including a frontend and more tools: https://github.com/tiangolo/full-stack-fastapi-couchbase - -/// - -## Import Couchbase components - -For now, don't pay attention to the rest, only the imports: - -```Python hl_lines="3-5" -{!../../docs_src/nosql_databases/tutorial001.py!} -``` - -## Define a constant to use as a "document type" - -We will use it later as a fixed field `type` in our documents. - -This is not required by Couchbase, but is a good practice that will help you afterwards. - -```Python hl_lines="9" -{!../../docs_src/nosql_databases/tutorial001.py!} -``` - -## Add a function to get a `Bucket` - -In **Couchbase**, a bucket is a set of documents, that can be of different types. - -They are generally all related to the same application. - -The analogy in the relational database world would be a "database" (a specific database, not the database server). - -The analogy in **MongoDB** would be a "collection". - -In the code, a `Bucket` represents the main entrypoint of communication with the database. - -This utility function will: - -* Connect to a **Couchbase** cluster (that might be a single machine). - * Set defaults for timeouts. -* Authenticate in the cluster. -* Get a `Bucket` instance. - * Set defaults for timeouts. -* Return it. - -```Python hl_lines="12-21" -{!../../docs_src/nosql_databases/tutorial001.py!} -``` - -## Create Pydantic models - -As **Couchbase** "documents" are actually just "JSON objects", we can model them with Pydantic. - -### `User` model - -First, let's create a `User` model: - -```Python hl_lines="24-28" -{!../../docs_src/nosql_databases/tutorial001.py!} -``` - -We will use this model in our *path operation function*, so, we don't include in it the `hashed_password`. - -### `UserInDB` model - -Now, let's create a `UserInDB` model. - -This will have the data that is actually stored in the database. - -We don't create it as a subclass of Pydantic's `BaseModel` but as a subclass of our own `User`, because it will have all the attributes in `User` plus a couple more: - -```Python hl_lines="31-33" -{!../../docs_src/nosql_databases/tutorial001.py!} -``` - -/// note - -Notice that we have a `hashed_password` and a `type` field that will be stored in the database. - -But it is not part of the general `User` model (the one we will return in the *path operation*). - -/// - -## Get the user - -Now create a function that will: - -* Take a username. -* Generate a document ID from it. -* Get the document with that ID. -* Put the contents of the document in a `UserInDB` model. - -By creating a function that is only dedicated to getting your user from a `username` (or any other parameter) independent of your *path operation function*, you can more easily reuse it in multiple parts and also add unit tests for it: - -```Python hl_lines="36-42" -{!../../docs_src/nosql_databases/tutorial001.py!} -``` - -### f-strings - -If you are not familiar with the `f"userprofile::{username}"`, it is a Python "f-string". - -Any variable that is put inside of `{}` in an f-string will be expanded / injected in the string. - -### `dict` unpacking - -If you are not familiar with the `UserInDB(**result.value)`, it is using `dict` "unpacking". - -It will take the `dict` at `result.value`, and take each of its keys and values and pass them as key-values to `UserInDB` as keyword arguments. - -So, if the `dict` contains: - -```Python -{ - "username": "johndoe", - "hashed_password": "some_hash", -} -``` - -It will be passed to `UserInDB` as: - -```Python -UserInDB(username="johndoe", hashed_password="some_hash") -``` - -## Create your **FastAPI** code - -### Create the `FastAPI` app - -```Python hl_lines="46" -{!../../docs_src/nosql_databases/tutorial001.py!} -``` - -### Create the *path operation function* - -As our code is calling Couchbase and we are not using the experimental Python await support, we should declare our function with normal `def` instead of `async def`. - -Also, Couchbase recommends not using a single `Bucket` object in multiple "threads", so, we can just get the bucket directly and pass it to our utility functions: - -```Python hl_lines="49-53" -{!../../docs_src/nosql_databases/tutorial001.py!} -``` - -## Recap - -You can integrate any third party NoSQL database, just using their standard packages. - -The same applies to any other external tool, system or API. diff --git a/docs/en/docs/how-to/sql-databases-peewee.md b/docs/en/docs/how-to/sql-databases-peewee.md deleted file mode 100644 index e73ca369b..000000000 --- a/docs/en/docs/how-to/sql-databases-peewee.md +++ /dev/null @@ -1,594 +0,0 @@ -# ~~SQL (Relational) Databases with Peewee~~ (deprecated) - -/// warning | "Deprecated" - -This tutorial is deprecated and will be removed in a future version. - -/// - -/// warning - -If you are just starting, the tutorial [SQL (Relational) Databases](../tutorial/sql-databases.md){.internal-link target=_blank} that uses SQLAlchemy should be enough. - -Feel free to skip this. - -Peewee is not recommended with FastAPI as it doesn't play well with anything async Python. There are several better alternatives. - -/// - -/// info - -These docs assume Pydantic v1. - -Because Pewee doesn't play well with anything async and there are better alternatives, I won't update these docs for Pydantic v2, they are kept for now only for historical purposes. - -The examples here are no longer tested in CI (as they were before). - -/// - -If you are starting a project from scratch, you are probably better off with SQLAlchemy ORM ([SQL (Relational) Databases](../tutorial/sql-databases.md){.internal-link target=_blank}), or any other async ORM. - -If you already have a code base that uses Peewee ORM, you can check here how to use it with **FastAPI**. - -/// warning | "Python 3.7+ required" - -You will need Python 3.7 or above to safely use Peewee with FastAPI. - -/// - -## Peewee for async - -Peewee was not designed for async frameworks, or with them in mind. - -Peewee has some heavy assumptions about its defaults and about how it should be used. - -If you are developing an application with an older non-async framework, and can work with all its defaults, **it can be a great tool**. - -But if you need to change some of the defaults, support more than one predefined database, work with an async framework (like FastAPI), etc, you will need to add quite some complex extra code to override those defaults. - -Nevertheless, it's possible to do it, and here you'll see exactly what code you have to add to be able to use Peewee with FastAPI. - -/// note | "Technical Details" - -You can read more about Peewee's stand about async in Python in the docs, an issue, a PR. - -/// - -## The same app - -We are going to create the same application as in the SQLAlchemy tutorial ([SQL (Relational) Databases](../tutorial/sql-databases.md){.internal-link target=_blank}). - -Most of the code is actually the same. - -So, we are going to focus only on the differences. - -## File structure - -Let's say you have a directory named `my_super_project` that contains a sub-directory called `sql_app` with a structure like this: - -``` -. -└── sql_app - ├── __init__.py - ├── crud.py - ├── database.py - ├── main.py - └── schemas.py -``` - -This is almost the same structure as we had for the SQLAlchemy tutorial. - -Now let's see what each file/module does. - -## Create the Peewee parts - -Let's refer to the file `sql_app/database.py`. - -### The standard Peewee code - -Let's first check all the normal Peewee code, create a Peewee database: - -```Python hl_lines="3 5 22" -{!../../docs_src/sql_databases_peewee/sql_app/database.py!} -``` - -/// tip - -Keep in mind that if you wanted to use a different database, like PostgreSQL, you couldn't just change the string. You would need to use a different Peewee database class. - -/// - -#### Note - -The argument: - -```Python -check_same_thread=False -``` - -is equivalent to the one in the SQLAlchemy tutorial: - -```Python -connect_args={"check_same_thread": False} -``` - -...it is needed only for `SQLite`. - -/// info | "Technical Details" - -Exactly the same technical details as in [SQL (Relational) Databases](../tutorial/sql-databases.md#note){.internal-link target=_blank} apply. - -/// - -### Make Peewee async-compatible `PeeweeConnectionState` - -The main issue with Peewee and FastAPI is that Peewee relies heavily on Python's `threading.local`, and it doesn't have a direct way to override it or let you handle connections/sessions directly (as is done in the SQLAlchemy tutorial). - -And `threading.local` is not compatible with the new async features of modern Python. - -/// note | "Technical Details" - -`threading.local` is used to have a "magic" variable that has a different value for each thread. - -This was useful in older frameworks designed to have one single thread per request, no more, no less. - -Using this, each request would have its own database connection/session, which is the actual final goal. - -But FastAPI, using the new async features, could handle more than one request on the same thread. And at the same time, for a single request, it could run multiple things in different threads (in a threadpool), depending on if you use `async def` or normal `def`. This is what gives all the performance improvements to FastAPI. - -/// - -But Python 3.7 and above provide a more advanced alternative to `threading.local`, that can also be used in the places where `threading.local` would be used, but is compatible with the new async features. - -We are going to use that. It's called `contextvars`. - -We are going to override the internal parts of Peewee that use `threading.local` and replace them with `contextvars`, with the corresponding updates. - -This might seem a bit complex (and it actually is), you don't really need to completely understand how it works to use it. - -We will create a `PeeweeConnectionState`: - -```Python hl_lines="10-19" -{!../../docs_src/sql_databases_peewee/sql_app/database.py!} -``` - -This class inherits from a special internal class used by Peewee. - -It has all the logic to make Peewee use `contextvars` instead of `threading.local`. - -`contextvars` works a bit differently than `threading.local`. But the rest of Peewee's internal code assumes that this class works with `threading.local`. - -So, we need to do some extra tricks to make it work as if it was just using `threading.local`. The `__init__`, `__setattr__`, and `__getattr__` implement all the required tricks for this to be used by Peewee without knowing that it is now compatible with FastAPI. - -/// tip - -This will just make Peewee behave correctly when used with FastAPI. Not randomly opening or closing connections that are being used, creating errors, etc. - -But it doesn't give Peewee async super-powers. You should still use normal `def` functions and not `async def`. - -/// - -### Use the custom `PeeweeConnectionState` class - -Now, overwrite the `._state` internal attribute in the Peewee database `db` object using the new `PeeweeConnectionState`: - -```Python hl_lines="24" -{!../../docs_src/sql_databases_peewee/sql_app/database.py!} -``` - -/// tip - -Make sure you overwrite `db._state` *after* creating `db`. - -/// - -/// tip - -You would do the same for any other Peewee database, including `PostgresqlDatabase`, `MySQLDatabase`, etc. - -/// - -## Create the database models - -Let's now see the file `sql_app/models.py`. - -### Create Peewee models for our data - -Now create the Peewee models (classes) for `User` and `Item`. - -This is the same you would do if you followed the Peewee tutorial and updated the models to have the same data as in the SQLAlchemy tutorial. - -/// tip - -Peewee also uses the term "**model**" to refer to these classes and instances that interact with the database. - -But Pydantic also uses the term "**model**" to refer to something different, the data validation, conversion, and documentation classes and instances. - -/// - -Import `db` from `database` (the file `database.py` from above) and use it here. - -```Python hl_lines="3 6-12 15-21" -{!../../docs_src/sql_databases_peewee/sql_app/models.py!} -``` - -/// tip - -Peewee creates several magic attributes. - -It will automatically add an `id` attribute as an integer to be the primary key. - -It will chose the name of the tables based on the class names. - -For the `Item`, it will create an attribute `owner_id` with the integer ID of the `User`. But we don't declare it anywhere. - -/// - -## Create the Pydantic models - -Now let's check the file `sql_app/schemas.py`. - -/// tip - -To avoid confusion between the Peewee *models* and the Pydantic *models*, we will have the file `models.py` with the Peewee models, and the file `schemas.py` with the Pydantic models. - -These Pydantic models define more or less a "schema" (a valid data shape). - -So this will help us avoiding confusion while using both. - -/// - -### Create the Pydantic *models* / schemas - -Create all the same Pydantic models as in the SQLAlchemy tutorial: - -```Python hl_lines="16-18 21-22 25-30 34-35 38-39 42-48" -{!../../docs_src/sql_databases_peewee/sql_app/schemas.py!} -``` - -/// tip - -Here we are creating the models with an `id`. - -We didn't explicitly specify an `id` attribute in the Peewee models, but Peewee adds one automatically. - -We are also adding the magic `owner_id` attribute to `Item`. - -/// - -### Create a `PeeweeGetterDict` for the Pydantic *models* / schemas - -When you access a relationship in a Peewee object, like in `some_user.items`, Peewee doesn't provide a `list` of `Item`. - -It provides a special custom object of class `ModelSelect`. - -It's possible to create a `list` of its items with `list(some_user.items)`. - -But the object itself is not a `list`. And it's also not an actual Python generator. Because of this, Pydantic doesn't know by default how to convert it to a `list` of Pydantic *models* / schemas. - -But recent versions of Pydantic allow providing a custom class that inherits from `pydantic.utils.GetterDict`, to provide the functionality used when using the `orm_mode = True` to retrieve the values for ORM model attributes. - -We are going to create a custom `PeeweeGetterDict` class and use it in all the same Pydantic *models* / schemas that use `orm_mode`: - -```Python hl_lines="3 8-13 31 49" -{!../../docs_src/sql_databases_peewee/sql_app/schemas.py!} -``` - -Here we are checking if the attribute that is being accessed (e.g. `.items` in `some_user.items`) is an instance of `peewee.ModelSelect`. - -And if that's the case, just return a `list` with it. - -And then we use it in the Pydantic *models* / schemas that use `orm_mode = True`, with the configuration variable `getter_dict = PeeweeGetterDict`. - -/// tip - -We only need to create one `PeeweeGetterDict` class, and we can use it in all the Pydantic *models* / schemas. - -/// - -## CRUD utils - -Now let's see the file `sql_app/crud.py`. - -### Create all the CRUD utils - -Create all the same CRUD utils as in the SQLAlchemy tutorial, all the code is very similar: - -```Python hl_lines="1 4-5 8-9 12-13 16-20 23-24 27-30" -{!../../docs_src/sql_databases_peewee/sql_app/crud.py!} -``` - -There are some differences with the code for the SQLAlchemy tutorial. - -We don't pass a `db` attribute around. Instead we use the models directly. This is because the `db` object is a global object, that includes all the connection logic. That's why we had to do all the `contextvars` updates above. - -Aso, when returning several objects, like in `get_users`, we directly call `list`, like in: - -```Python -list(models.User.select()) -``` - -This is for the same reason that we had to create a custom `PeeweeGetterDict`. But by returning something that is already a `list` instead of the `peewee.ModelSelect` the `response_model` in the *path operation* with `List[models.User]` (that we'll see later) will work correctly. - -## Main **FastAPI** app - -And now in the file `sql_app/main.py` let's integrate and use all the other parts we created before. - -### Create the database tables - -In a very simplistic way create the database tables: - -```Python hl_lines="9-11" -{!../../docs_src/sql_databases_peewee/sql_app/main.py!} -``` - -### Create a dependency - -Create a dependency that will connect the database right at the beginning of a request and disconnect it at the end: - -```Python hl_lines="23-29" -{!../../docs_src/sql_databases_peewee/sql_app/main.py!} -``` - -Here we have an empty `yield` because we are actually not using the database object directly. - -It is connecting to the database and storing the connection data in an internal variable that is independent for each request (using the `contextvars` tricks from above). - -Because the database connection is potentially I/O blocking, this dependency is created with a normal `def` function. - -And then, in each *path operation function* that needs to access the database we add it as a dependency. - -But we are not using the value given by this dependency (it actually doesn't give any value, as it has an empty `yield`). So, we don't add it to the *path operation function* but to the *path operation decorator* in the `dependencies` parameter: - -```Python hl_lines="32 40 47 59 65 72" -{!../../docs_src/sql_databases_peewee/sql_app/main.py!} -``` - -### Context variable sub-dependency - -For all the `contextvars` parts to work, we need to make sure we have an independent value in the `ContextVar` for each request that uses the database, and that value will be used as the database state (connection, transactions, etc) for the whole request. - -For that, we need to create another `async` dependency `reset_db_state()` that is used as a sub-dependency in `get_db()`. It will set the value for the context variable (with just a default `dict`) that will be used as the database state for the whole request. And then the dependency `get_db()` will store in it the database state (connection, transactions, etc). - -```Python hl_lines="18-20" -{!../../docs_src/sql_databases_peewee/sql_app/main.py!} -``` - -For the **next request**, as we will reset that context variable again in the `async` dependency `reset_db_state()` and then create a new connection in the `get_db()` dependency, that new request will have its own database state (connection, transactions, etc). - -/// tip - -As FastAPI is an async framework, one request could start being processed, and before finishing, another request could be received and start processing as well, and it all could be processed in the same thread. - -But context variables are aware of these async features, so, a Peewee database state set in the `async` dependency `reset_db_state()` will keep its own data throughout the entire request. - -And at the same time, the other concurrent request will have its own database state that will be independent for the whole request. - -/// - -#### Peewee Proxy - -If you are using a Peewee Proxy, the actual database is at `db.obj`. - -So, you would reset it with: - -```Python hl_lines="3-4" -async def reset_db_state(): - database.db.obj._state._state.set(db_state_default.copy()) - database.db.obj._state.reset() -``` - -### Create your **FastAPI** *path operations* - -Now, finally, here's the standard **FastAPI** *path operations* code. - -```Python hl_lines="32-37 40-43 46-53 56-62 65-68 71-79" -{!../../docs_src/sql_databases_peewee/sql_app/main.py!} -``` - -### About `def` vs `async def` - -The same as with SQLAlchemy, we are not doing something like: - -```Python -user = await models.User.select().first() -``` - -...but instead we are using: - -```Python -user = models.User.select().first() -``` - -So, again, we should declare the *path operation functions* and the dependency without `async def`, just with a normal `def`, as: - -```Python hl_lines="2" -# Something goes here -def read_users(skip: int = 0, limit: int = 100): - # Something goes here -``` - -## Testing Peewee with async - -This example includes an extra *path operation* that simulates a long processing request with `time.sleep(sleep_time)`. - -It will have the database connection open at the beginning and will just wait some seconds before replying back. And each new request will wait one second less. - -This will easily let you test that your app with Peewee and FastAPI is behaving correctly with all the stuff about threads. - -If you want to check how Peewee would break your app if used without modification, go the `sql_app/database.py` file and comment the line: - -```Python -# db._state = PeeweeConnectionState() -``` - -And in the file `sql_app/main.py` file, comment the body of the `async` dependency `reset_db_state()` and replace it with a `pass`: - -```Python -async def reset_db_state(): -# database.db._state._state.set(db_state_default.copy()) -# database.db._state.reset() - pass -``` - -Then run your app with Uvicorn: - -
- -```console -$ uvicorn sql_app.main:app --reload - -INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) -``` - -
- -Open your browser at http://127.0.0.1:8000/docs and create a couple of users. - -Then open 10 tabs at http://127.0.0.1:8000/docs#/default/read_slow_users_slowusers__get at the same time. - -Go to the *path operation* "Get `/slowusers/`" in all of the tabs. Use the "Try it out" button and execute the request in each tab, one right after the other. - -The tabs will wait for a bit and then some of them will show `Internal Server Error`. - -### What happens - -The first tab will make your app create a connection to the database and wait for some seconds before replying back and closing the database connection. - -Then, for the request in the next tab, your app will wait for one second less, and so on. - -This means that it will end up finishing some of the last tabs' requests earlier than some of the previous ones. - -Then one the last requests that wait less seconds will try to open a database connection, but as one of those previous requests for the other tabs will probably be handled in the same thread as the first one, it will have the same database connection that is already open, and Peewee will throw an error and you will see it in the terminal, and the response will have an `Internal Server Error`. - -This will probably happen for more than one of those tabs. - -If you had multiple clients talking to your app exactly at the same time, this is what could happen. - -And as your app starts to handle more and more clients at the same time, the waiting time in a single request needs to be shorter and shorter to trigger the error. - -### Fix Peewee with FastAPI - -Now go back to the file `sql_app/database.py`, and uncomment the line: - -```Python -db._state = PeeweeConnectionState() -``` - -And in the file `sql_app/main.py` file, uncomment the body of the `async` dependency `reset_db_state()`: - -```Python -async def reset_db_state(): - database.db._state._state.set(db_state_default.copy()) - database.db._state.reset() -``` - -Terminate your running app and start it again. - -Repeat the same process with the 10 tabs. This time all of them will wait and you will get all the results without errors. - -...You fixed it! - -## Review all the files - - Remember you should have a directory named `my_super_project` (or however you want) that contains a sub-directory called `sql_app`. - -`sql_app` should have the following files: - -* `sql_app/__init__.py`: is an empty file. - -* `sql_app/database.py`: - -```Python -{!../../docs_src/sql_databases_peewee/sql_app/database.py!} -``` - -* `sql_app/models.py`: - -```Python -{!../../docs_src/sql_databases_peewee/sql_app/models.py!} -``` - -* `sql_app/schemas.py`: - -```Python -{!../../docs_src/sql_databases_peewee/sql_app/schemas.py!} -``` - -* `sql_app/crud.py`: - -```Python -{!../../docs_src/sql_databases_peewee/sql_app/crud.py!} -``` - -* `sql_app/main.py`: - -```Python -{!../../docs_src/sql_databases_peewee/sql_app/main.py!} -``` - -## Technical Details - -/// warning - -These are very technical details that you probably don't need. - -/// - -### The problem - -Peewee uses `threading.local` by default to store it's database "state" data (connection, transactions, etc). - -`threading.local` creates a value exclusive to the current thread, but an async framework would run all the code (e.g. for each request) in the same thread, and possibly not in order. - -On top of that, an async framework could run some sync code in a threadpool (using `asyncio.run_in_executor`), but belonging to the same request. - -This means that, with Peewee's current implementation, multiple tasks could be using the same `threading.local` variable and end up sharing the same connection and data (that they shouldn't), and at the same time, if they execute sync I/O-blocking code in a threadpool (as with normal `def` functions in FastAPI, in *path operations* and dependencies), that code won't have access to the database state variables, even while it's part of the same request and it should be able to get access to the same database state. - -### Context variables - -Python 3.7 has `contextvars` that can create a local variable very similar to `threading.local`, but also supporting these async features. - -There are several things to keep in mind. - -The `ContextVar` has to be created at the top of the module, like: - -```Python -some_var = ContextVar("some_var", default="default value") -``` - -To set a value used in the current "context" (e.g. for the current request) use: - -```Python -some_var.set("new value") -``` - -To get a value anywhere inside of the context (e.g. in any part handling the current request) use: - -```Python -some_var.get() -``` - -### Set context variables in the `async` dependency `reset_db_state()` - -If some part of the async code sets the value with `some_var.set("updated in function")` (e.g. like the `async` dependency), the rest of the code in it and the code that goes after (including code inside of `async` functions called with `await`) will see that new value. - -So, in our case, if we set the Peewee state variable (with a default `dict`) in the `async` dependency, all the rest of the internal code in our app will see this value and will be able to reuse it for the whole request. - -And the context variable would be set again for the next request, even if they are concurrent. - -### Set database state in the dependency `get_db()` - -As `get_db()` is a normal `def` function, **FastAPI** will make it run in a threadpool, with a *copy* of the "context", holding the same value for the context variable (the `dict` with the reset database state). Then it can add database state to that `dict`, like the connection, etc. - -But if the value of the context variable (the default `dict`) was set in that normal `def` function, it would create a new value that would stay only in that thread of the threadpool, and the rest of the code (like the *path operation functions*) wouldn't have access to it. In `get_db()` we can only set values in the `dict`, but not the entire `dict` itself. - -So, we need to have the `async` dependency `reset_db_state()` to set the `dict` in the context variable. That way, all the code has access to the same `dict` for the database state for a single request. - -### Connect and disconnect in the dependency `get_db()` - -Then the next question would be, why not just connect and disconnect the database in the `async` dependency itself, instead of in `get_db()`? - -The `async` dependency has to be `async` for the context variable to be preserved for the rest of the request, but creating and closing the database connection is potentially blocking, so it could degrade performance if it was there. - -So we also need the normal `def` dependency `get_db()`. diff --git a/docs/en/docs/how-to/testing-database.md b/docs/en/docs/how-to/testing-database.md new file mode 100644 index 000000000..d0ed15bca --- /dev/null +++ b/docs/en/docs/how-to/testing-database.md @@ -0,0 +1,7 @@ +# Testing a Database + +You can study about databases, SQL, and SQLModel in the SQLModel docs. đŸ€“ + +There's a mini tutorial on using SQLModel with FastAPI. ✹ + +That tutorial includes a section about testing SQL databases. 😎 diff --git a/docs/en/docs/img/tutorial/sql-databases/image01.png b/docs/en/docs/img/tutorial/sql-databases/image01.png index 8e575abd65aaf37a33fed5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2`jxuPRF(yWx*X%eKgSWS2zItX=ytRcV>R+T^HF)z&AZh{-jc%C2c22gUh2)*x zSq46-Be!cwDfU?6KipibLz{NnY&=rpiD3imQn4iCU}6(A5C{KAMZt5}+kTDwrrSV> zES|Ssv>0i;5jh}bnxFnh1sLoV^Kn}t50y?ldi3e{+v*%FRc1iSb=LR303R2qyty26 z30Dal8;5b4bxUi@r#eNkw`Kqx>$b;&XsW2&h>0e4?wo2~Rj+!88UTgVs4Xg34_mf# zR&&gMeyF>mt`K-sV(>w-64Px@Fe>W*bki|W0W~Q?2s*W8QZlzA2~fK%gx>t9TFN+f zLi=)^oUB;L6M_2XzD&rovkQ?M+OVRK^~Jr4S{&5jYwrJ&Fwdj$^k&r<2{*4{Kc_a( zmRC{9evC?8CYb;LfVC+A*Z0Qa@%vg^<0K+PfqV&5mb5k2l-)=bF>3!w8uv%2XaZ8a zEFZz_U#RfdGCy1tz=JUieQ}XRU;d$wd`=!sJ${rkpV~kO4qT_JA~@gGAIY~=s| diff --git a/docs/en/docs/img/tutorial/sql-databases/image02.png b/docs/en/docs/img/tutorial/sql-databases/image02.png index ee59fc9398a4607872d7aae1d439fdb71c0a706c..7bcad83783af805276cb25bde4d3a4b384f92600 100644 GIT binary patch literal 69197 zcmeFZRaD%;(;d)-*?WQ-M#1DhduXYcV2#0-Cf;PUDj0-^jTgK7yC6f8X6j|v=mqg4GsMd8rl=S zr;kx@q(^}~sLLYI=b|d73bmakwVhGMyc%CJ>o?!UKNv4Q zenm_e_k*TcM8in67~}D^H|XTFr}1LWVJNKsq=Daazm^=XCWFEP4b7%BBO@b+ccW@e z>fiGM*VEyDH_UHD(I0Mp`=a4KT>m_N%=K_Zd;VVlPV4LIcjvP=Ioj2aT|Xx;(DR^{$S@!Zp9Q;X6-4{fn_4NIQ_0m&YI=Q1_0- z;|$@CcBdxjzViKwsSlV<}UwmUFi-~Z5gKB*U zDa9Vn`{wPj%?KhKf!DJ`2K}3}KFlf%flnKlS2gcQ3s5EqL2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-$ pip install sqlalchemy - +$ pip install sqlmodel ---> 100% ```
-## Create the SQLAlchemy parts - -Let's refer to the file `sql_app/database.py`. +## Create the App with a Single Model -### Import the SQLAlchemy parts +We'll create the simplest first version of the app with a single **SQLModel** model first. -```Python hl_lines="1-3" -{!../../docs_src/sql_databases/sql_app/database.py!} -``` - -### Create a database URL for SQLAlchemy - -```Python hl_lines="5-6" -{!../../docs_src/sql_databases/sql_app/database.py!} -``` - -In this example, we are "connecting" to a SQLite database (opening a file with the SQLite database). - -The file will be located at the same directory in the file `sql_app.db`. - -That's why the last part is `./sql_app.db`. - -If you were using a **PostgreSQL** database instead, you would just have to uncomment the line: - -```Python -SQLALCHEMY_DATABASE_URL = "postgresql://user:password@postgresserver/db" -``` +Later we'll improve it increasing security and versatility with **multiple models** below. đŸ€“ -...and adapt it with your database data and credentials (equivalently for MySQL, MariaDB or any other). +### Create Models -/// tip - -This is the main line that you would have to modify if you wanted to use a different database. - -/// - -### Create the SQLAlchemy `engine` +Import `SQLModel` and create a database model: -The first step is to create a SQLAlchemy "engine". +{* ../../docs_src/sql_databases/tutorial001_an_py310.py ln[1:11] hl[7:11] *} -We will later use this `engine` in other places. +The `Hero` class is very similar to a Pydantic model (in fact, underneath, it actually *is a Pydantic model*). -```Python hl_lines="8-10" -{!../../docs_src/sql_databases/sql_app/database.py!} -``` +There are a few differences: -#### Note +* `table=True` tells SQLModel that this is a *table model*, it should represent a **table** in the SQL database, it's not just a *data model* (as would be any other regular Pydantic class). -The argument: +* `Field(primary_key=True)` tells SQLModel that the `id` is the **primary key** in the SQL database (you can learn more about SQL primary keys in the SQLModel docs). -```Python -connect_args={"check_same_thread": False} -``` + By having the type as `int | None`, SQLModel will know that this column should be an `INTEGER` in the SQL database and that it should be `NULLABLE`. -...is needed only for `SQLite`. It's not needed for other databases. +* `Field(index=True)` tells SQLModel that it should create a **SQL index** for this column, that would allow faster lookups in the database when reading data filtered by this column. -/// info | "Technical Details" + SQLModel will know that something declared as `str` will be a SQL column of type `TEXT` (or `VARCHAR`, depending on the database). -By default SQLite will only allow one thread to communicate with it, assuming that each thread would handle an independent request. +### Create an Engine -This is to prevent accidentally sharing the same connection for different things (for different requests). +A SQLModel `engine` (underneath it's actually a SQLAlchemy `engine`) is what **holds the connections** to the database. -But in FastAPI, using normal functions (`def`) more than one thread could interact with the database for the same request, so we need to make SQLite know that it should allow that with `connect_args={"check_same_thread": False}`. +You would have **one single `engine` object** for all your code to connect to the same database. -Also, we will make sure each request gets its own database connection session in a dependency, so there's no need for that default mechanism. +{* ../../docs_src/sql_databases/tutorial001_an_py310.py ln[14:18] hl[14:15,17:18] *} -/// +Using `check_same_thread=False` allows FastAPI to use the same SQLite database in different threads. This is necessary as **one single request** could use **more than one thread** (for example in dependencies). -### Create a `SessionLocal` class +Don't worry, with the way the code is structured, we'll make sure we use **a single SQLModel *session* per request** later, this is actually what the `check_same_thread` is trying to achieve. -Each instance of the `SessionLocal` class will be a database session. The class itself is not a database session yet. +### Create the Tables -But once we create an instance of the `SessionLocal` class, this instance will be the actual database session. +We then add a function that uses `SQLModel.metadata.create_all(engine)` to **create the tables** for all the *table models*. -We name it `SessionLocal` to distinguish it from the `Session` we are importing from SQLAlchemy. +{* ../../docs_src/sql_databases/tutorial001_an_py310.py ln[21:22] hl[21:22] *} -We will use `Session` (the one imported from SQLAlchemy) later. +### Create a Session Dependency -To create the `SessionLocal` class, use the function `sessionmaker`: - -```Python hl_lines="11" -{!../../docs_src/sql_databases/sql_app/database.py!} -``` +A **`Session`** is what stores the **objects in memory** and keeps track of any changes needed in the data, then it **uses the `engine`** to communicate with the database. -### Create a `Base` class +We will create a FastAPI **dependency** with `yield` that will provide a new `Session` for each request. This is what ensures that we use a single session per request. đŸ€“ -Now we will use the function `declarative_base()` that returns a class. +Then we create an `Annotated` dependency `SessionDep` to simplify the rest of the code that will use this dependency. -Later we will inherit from this class to create each of the database models or classes (the ORM models): +{* ../../docs_src/sql_databases/tutorial001_an_py310.py ln[25:30] hl[25:27,30] *} -```Python hl_lines="13" -{!../../docs_src/sql_databases/sql_app/database.py!} -``` +### Create Database Tables on Startup -## Create the database models +We will create the database tables when the application starts. -Let's now see the file `sql_app/models.py`. +{* ../../docs_src/sql_databases/tutorial001_an_py310.py ln[32:37] hl[35:37] *} -### Create SQLAlchemy models from the `Base` class +Here we create the tables on an application startup event. -We will use this `Base` class we created before to create the SQLAlchemy models. +For production you would probably use a migration script that runs before you start your app. đŸ€“ /// tip -SQLAlchemy uses the term "**model**" to refer to these classes and instances that interact with the database. - -But Pydantic also uses the term "**model**" to refer to something different, the data validation, conversion, and documentation classes and instances. +SQLModel will have migration utilities wrapping Alembic, but for now, you can use Alembic directly. /// -Import `Base` from `database` (the file `database.py` from above). - -Create classes that inherit from it. - -These classes are the SQLAlchemy models. - -```Python hl_lines="4 7-8 18-19" -{!../../docs_src/sql_databases/sql_app/models.py!} -``` - -The `__tablename__` attribute tells SQLAlchemy the name of the table to use in the database for each of these models. - -### Create model attributes/columns - -Now create all the model (class) attributes. - -Each of these attributes represents a column in its corresponding database table. +### Create a Hero -We use `Column` from SQLAlchemy as the default value. +Because each SQLModel model is also a Pydantic model, you can use it in the same **type annotations** that you could use Pydantic models. -And we pass a SQLAlchemy class "type", as `Integer`, `String`, and `Boolean`, that defines the type in the database, as an argument. +For example, if you declare a parameter of type `Hero`, it will be read from the **JSON body**. -```Python hl_lines="1 10-13 21-24" -{!../../docs_src/sql_databases/sql_app/models.py!} -``` - -### Create the relationships - -Now create the relationships. - -For this, we use `relationship` provided by SQLAlchemy ORM. - -This will become, more or less, a "magic" attribute that will contain the values from other tables related to this one. +The same way, you can declare it as the function's **return type**, and then the shape of the data will show up in the automatic API docs UI. -```Python hl_lines="2 15 26" -{!../../docs_src/sql_databases/sql_app/models.py!} -``` - -When accessing the attribute `items` in a `User`, as in `my_user.items`, it will have a list of `Item` SQLAlchemy models (from the `items` table) that have a foreign key pointing to this record in the `users` table. +{* ../../docs_src/sql_databases/tutorial001_an_py310.py ln[40:45] hl[40:45] *} -When you access `my_user.items`, SQLAlchemy will actually go and fetch the items from the database in the `items` table and populate them here. + -And when accessing the attribute `owner` in an `Item`, it will contain a `User` SQLAlchemy model from the `users` table. It will use the `owner_id` attribute/column with its foreign key to know which record to get from the `users` table. +Here we use the `SessionDep` dependency (a `Session`) to add the new `Hero` to the `Session` instance, commit the changes to the database, refresh the data in the `hero`, and then return it. -## Create the Pydantic models +### Read Heroes -Now let's check the file `sql_app/schemas.py`. +We can **read** `Hero`s from the database using a `select()`. We can include a `limit` and `offset` to paginate the results. -/// tip +{* ../../docs_src/sql_databases/tutorial001_an_py310.py ln[48:55] hl[51:52,54] *} -To avoid confusion between the SQLAlchemy *models* and the Pydantic *models*, we will have the file `models.py` with the SQLAlchemy models, and the file `schemas.py` with the Pydantic models. +### Read One Hero -These Pydantic models define more or less a "schema" (a valid data shape). +We can **read** a single `Hero`. -So this will help us avoiding confusion while using both. - -/// +{* ../../docs_src/sql_databases/tutorial001_an_py310.py ln[58:63] hl[60] *} -### Create initial Pydantic *models* / schemas +### Delete a Hero -Create an `ItemBase` and `UserBase` Pydantic *models* (or let's say "schemas") to have common attributes while creating or reading data. +We can also **delete** a `Hero`. -And create an `ItemCreate` and `UserCreate` that inherit from them (so they will have the same attributes), plus any additional data (attributes) needed for creation. +{* ../../docs_src/sql_databases/tutorial001_an_py310.py ln[66:73] hl[71] *} -So, the user will also have a `password` when creating it. +### Run the App -But for security, the `password` won't be in other Pydantic *models*, for example, it won't be sent from the API when reading a user. +You can run the app: -//// tab | Python 3.10+ - -```Python hl_lines="1 4-6 9-10 21-22 25-26" -{!> ../../docs_src/sql_databases/sql_app_py310/schemas.py!} -``` - -//// - -//// tab | Python 3.9+ - -```Python hl_lines="3 6-8 11-12 23-24 27-28" -{!> ../../docs_src/sql_databases/sql_app_py39/schemas.py!} -``` - -//// - -//// tab | Python 3.8+ - -```Python hl_lines="3 6-8 11-12 23-24 27-28" -{!> ../../docs_src/sql_databases/sql_app/schemas.py!} -``` - -//// - -#### SQLAlchemy style and Pydantic style - -Notice that SQLAlchemy *models* define attributes using `=`, and pass the type as a parameter to `Column`, like in: - -```Python -name = Column(String) -``` +
-while Pydantic *models* declare the types using `:`, the new type annotation syntax/type hints: +```console +$ fastapi dev main.py -```Python -name: str +INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) ``` -Keep these in mind, so you don't get confused when using `=` and `:` with them. - -### Create Pydantic *models* / schemas for reading / returning - -Now create Pydantic *models* (schemas) that will be used when reading data, when returning it from the API. - -For example, before creating an item, we don't know what will be the ID assigned to it, but when reading it (when returning it from the API) we will already know its ID. +
-The same way, when reading a user, we can now declare that `items` will contain the items that belong to this user. +Then go to the `/docs` UI, you will see that **FastAPI** is using these **models** to **document** the API, and it will use them to **serialize** and **validate** the data too. -Not only the IDs of those items, but all the data that we defined in the Pydantic *model* for reading items: `Item`. +
+ +
-//// tab | Python 3.10+ +## Update the App with Multiple Models -```Python hl_lines="13-15 29-32" -{!> ../../docs_src/sql_databases/sql_app_py310/schemas.py!} -``` +Now let's **refactor** this app a bit to increase **security** and **versatility**. -//// +If you check the previous app, in the UI you can see that, up to now, it lets the client decide the `id` of the `Hero` to create. đŸ˜± -//// tab | Python 3.9+ +We shouldn't let that happen, they could overwrite an `id` we already have assigned in the DB. Deciding the `id` should be done by the **backend** or the **database**, **not by the client**. -```Python hl_lines="15-17 31-34" -{!> ../../docs_src/sql_databases/sql_app_py39/schemas.py!} -``` +Additionally, we create a `secret_name` for the hero, but so far, we are returning it everywhere, that's not very **secret**... 😅 -//// +We'll fix these things by adding a few **extra models**. Here's where SQLModel will shine. ✹ -//// tab | Python 3.8+ +### Create Multiple Models -```Python hl_lines="15-17 31-34" -{!> ../../docs_src/sql_databases/sql_app/schemas.py!} -``` +In **SQLModel**, any model class that has `table=True` is a **table model**. -//// +And any model class that doesn't have `table=True` is a **data model**, these ones are actually just Pydantic models (with a couple of small extra features). đŸ€“ -/// tip +With SQLModel, we can use **inheritance** to **avoid duplicating** all the fields in all the cases. -Notice that the `User`, the Pydantic *model* that will be used when reading a user (returning it from the API) doesn't include the `password`. +#### `HeroBase` - the base class -/// +Let's start with a `HeroBase` model that has all the **fields that are shared** by all the models: -### Use Pydantic's `orm_mode` +* `name` +* `age` -Now, in the Pydantic *models* for reading, `Item` and `User`, add an internal `Config` class. +{* ../../docs_src/sql_databases/tutorial002_an_py310.py ln[7:9] hl[7:9] *} -This `Config` class is used to provide configurations to Pydantic. +#### `Hero` - the *table model* -In the `Config` class, set the attribute `orm_mode = True`. +Then let's create `Hero`, the actual *table model*, with the **extra fields** that are not always in the other models: -//// tab | Python 3.10+ +* `id` +* `secret_name` -```Python hl_lines="13 17-18 29 34-35" -{!> ../../docs_src/sql_databases/sql_app_py310/schemas.py!} -``` +Because `Hero` inherits form `HeroBase`, it **also** has the **fields** declared in `HeroBase`, so all the fields for `Hero` are: -//// +* `id` +* `name` +* `age` +* `secret_name` -//// tab | Python 3.9+ +{* ../../docs_src/sql_databases/tutorial002_an_py310.py ln[7:14] hl[12:14] *} -```Python hl_lines="15 19-20 31 36-37" -{!> ../../docs_src/sql_databases/sql_app_py39/schemas.py!} -``` +#### `HeroPublic` - the public *data model* -//// +Next, we create a `HeroPublic` model, this is the one that will be **returned** to the clients of the API. -//// tab | Python 3.8+ +It has the same fields as `HeroBase`, so it won't include `secret_name`. -```Python hl_lines="15 19-20 31 36-37" -{!> ../../docs_src/sql_databases/sql_app/schemas.py!} -``` +Finally, the identity of our heroes is protected! đŸ„· -//// +It also re-declares `id: int`. By doing this, we are making a **contract** with the API clients, so that they can always expect the `id` to be there and to be an `int` (it will never be `None`). /// tip -Notice it's assigning a value with `=`, like: - -`orm_mode = True` +Having the return model ensure that a value is always available and always `int` (not `None`) is very useful for the API clients, they can write much simpler code having this certainty. -It doesn't use `:` as for the type declarations before. - -This is setting a config value, not declaring a type. +Also, **automatically generated clients** will have simpler interfaces, so that the developers communicating with your API can have a much better time working with your API. 😎 /// -Pydantic's `orm_mode` will tell the Pydantic *model* to read the data even if it is not a `dict`, but an ORM model (or any other arbitrary object with attributes). - -This way, instead of only trying to get the `id` value from a `dict`, as in: - -```Python -id = data["id"] -``` - -it will also try to get it from an attribute, as in: - -```Python -id = data.id -``` +All the fields in `HeroPublic` are the same as in `HeroBase`, with `id` declared as `int` (not `None`): -And with this, the Pydantic *model* is compatible with ORMs, and you can just declare it in the `response_model` argument in your *path operations*. +* `id` +* `name` +* `age` +* `secret_name` -You will be able to return a database model and it will read the data from it. +{* ../../docs_src/sql_databases/tutorial002_an_py310.py ln[7:18] hl[17:18] *} -#### Technical Details about ORM mode +#### `HeroCreate` - the *data model* to create a hero -SQLAlchemy and many others are by default "lazy loading". +Now we create a `HeroCreate` model, this is the one that will **validate** the data from the clients. -That means, for example, that they don't fetch the data for relationships from the database unless you try to access the attribute that would contain that data. +It has the same fields as `HeroBase`, and it also has `secret_name`. -For example, accessing the attribute `items`: - -```Python -current_user.items -``` - -would make SQLAlchemy go to the `items` table and get the items for this user, but not before. - -Without `orm_mode`, if you returned a SQLAlchemy model from your *path operation*, it wouldn't include the relationship data. - -Even if you declared those relationships in your Pydantic models. - -But with ORM mode, as Pydantic itself will try to access the data it needs from attributes (instead of assuming a `dict`), you can declare the specific data you want to return and it will be able to go and get it, even from ORMs. - -## CRUD utils - -Now let's see the file `sql_app/crud.py`. - -In this file we will have reusable functions to interact with the data in the database. - -**CRUD** comes from: **C**reate, **R**ead, **U**pdate, and **D**elete. - -...although in this example we are only creating and reading. - -### Read data - -Import `Session` from `sqlalchemy.orm`, this will allow you to declare the type of the `db` parameters and have better type checks and completion in your functions. - -Import `models` (the SQLAlchemy models) and `schemas` (the Pydantic *models* / schemas). - -Create utility functions to: - -* Read a single user by ID and by email. -* Read multiple users. -* Read multiple items. - -```Python hl_lines="1 3 6-7 10-11 14-15 27-28" -{!../../docs_src/sql_databases/sql_app/crud.py!} -``` +Now, when the clients **create a new hero**, they will send the `secret_name`, it will be stored in the database, but those secret names won't be returned in the API to the clients. /// tip -By creating functions that are only dedicated to interacting with the database (get a user or an item) independent of your *path operation function*, you can more easily reuse them in multiple parts and also add unit tests for them. - -/// +This is how you would handle **passwords**. Receive them, but don't return them in the API. -### Create data - -Now create utility functions to create data. - -The steps are: - -* Create a SQLAlchemy model *instance* with your data. -* `add` that instance object to your database session. -* `commit` the changes to the database (so that they are saved). -* `refresh` your instance (so that it contains any new data from the database, like the generated ID). - -```Python hl_lines="18-24 31-36" -{!../../docs_src/sql_databases/sql_app/crud.py!} -``` - -/// info - -In Pydantic v1 the method was called `.dict()`, it was deprecated (but still supported) in Pydantic v2, and renamed to `.model_dump()`. - -The examples here use `.dict()` for compatibility with Pydantic v1, but you should use `.model_dump()` instead if you can use Pydantic v2. +You would also **hash** the values of the passwords before storing them, **never store them in plain text**. /// -/// tip +The fields of `HeroCreate` are: -The SQLAlchemy model for `User` contains a `hashed_password` that should contain a secure hashed version of the password. +* `name` +* `age` +* `secret_name` -But as what the API client provides is the original password, you need to extract it and generate the hashed password in your application. +{* ../../docs_src/sql_databases/tutorial002_an_py310.py ln[7:22] hl[21:22] *} -And then pass the `hashed_password` argument with the value to save. +#### `HeroUpdate` - the *data model* to update a hero -/// +We didn't have a way to **update a hero** in the previous version of the app, but now with **multiple models**, we can do it. 🎉 -/// warning +The `HeroUpdate` *data model* is somewhat special, it has **all the same fields** that would be needed to create a new hero, but all the fields are **optional** (they all have a default value). This way, when you update a hero, you can send just the fields that you want to update. -This example is not secure, the password is not hashed. +Because all the **fields actually change** (the type now includes `None` and they now have a default value of `None`), we need to **re-declare** them. -In a real life application you would need to hash the password and never save them in plaintext. +We don't really need to inherit from `HeroBase` because we are re-declaring all the fields. I'll leave it inheriting just for consistency, but this is not necessary. It's more a matter of personal taste. đŸ€· -For more details, go back to the Security section in the tutorial. +The fields of `HeroUpdate` are: -Here we are focusing only on the tools and mechanics of databases. +* `name` +* `age` +* `secret_name` -/// - -/// tip - -Instead of passing each of the keyword arguments to `Item` and reading each one of them from the Pydantic *model*, we are generating a `dict` with the Pydantic *model*'s data with: - -`item.dict()` +{* ../../docs_src/sql_databases/tutorial002_an_py310.py ln[7:28] hl[25:28] *} -and then we are passing the `dict`'s key-value pairs as the keyword arguments to the SQLAlchemy `Item`, with: +### Create with `HeroCreate` and return a `HeroPublic` -`Item(**item.dict())` - -And then we pass the extra keyword argument `owner_id` that is not provided by the Pydantic *model*, with: - -`Item(**item.dict(), owner_id=user_id)` - -/// +Now that we have **multiple models**, we can update the parts of the app that use them. -## Main **FastAPI** app +We receive in the request a `HeroCreate` *data model*, and from it, we create a `Hero` *table model*. -And now in the file `sql_app/main.py` let's integrate and use all the other parts we created before. +This new *table model* `Hero` will have the fields sent by the client, and will also have an `id` generated by the database. -### Create the database tables +Then we return the same *table model* `Hero` as is from the function. But as we declare the `response_model` with the `HeroPublic` *data model*, **FastAPI** will use `HeroPublic` to validate and serialize the data. -In a very simplistic way create the database tables: - -//// tab | Python 3.9+ - -```Python hl_lines="7" -{!> ../../docs_src/sql_databases/sql_app_py39/main.py!} -``` - -//// - -//// tab | Python 3.8+ - -```Python hl_lines="9" -{!> ../../docs_src/sql_databases/sql_app/main.py!} -``` - -//// - -#### Alembic Note - -Normally you would probably initialize your database (create tables, etc) with Alembic. - -And you would also use Alembic for "migrations" (that's its main job). - -A "migration" is the set of steps needed whenever you change the structure of your SQLAlchemy models, add a new attribute, etc. to replicate those changes in the database, add a new column, a new table, etc. - -You can find an example of Alembic in a FastAPI project in the [Full Stack FastAPI Template](../project-generation.md){.internal-link target=_blank}. Specifically in the `alembic` directory in the source code. - -### Create a dependency - -Now use the `SessionLocal` class we created in the `sql_app/database.py` file to create a dependency. - -We need to have an independent database session/connection (`SessionLocal`) per request, use the same session through all the request and then close it after the request is finished. - -And then a new session will be created for the next request. - -For that, we will create a new dependency with `yield`, as explained before in the section about [Dependencies with `yield`](dependencies/dependencies-with-yield.md){.internal-link target=_blank}. - -Our dependency will create a new SQLAlchemy `SessionLocal` that will be used in a single request, and then close it once the request is finished. - -//// tab | Python 3.9+ - -```Python hl_lines="13-18" -{!> ../../docs_src/sql_databases/sql_app_py39/main.py!} -``` - -//// - -//// tab | Python 3.8+ - -```Python hl_lines="15-20" -{!> ../../docs_src/sql_databases/sql_app/main.py!} -``` - -//// - -/// info - -We put the creation of the `SessionLocal()` and handling of the requests in a `try` block. - -And then we close it in the `finally` block. - -This way we make sure the database session is always closed after the request. Even if there was an exception while processing the request. - -But you can't raise another exception from the exit code (after `yield`). See more in [Dependencies with `yield` and `HTTPException`](dependencies/dependencies-with-yield.md#dependencies-with-yield-and-httpexception){.internal-link target=_blank} - -/// - -And then, when using the dependency in a *path operation function*, we declare it with the type `Session` we imported directly from SQLAlchemy. - -This will then give us better editor support inside the *path operation function*, because the editor will know that the `db` parameter is of type `Session`: - -//// tab | Python 3.9+ - -```Python hl_lines="22 30 36 45 51" -{!> ../../docs_src/sql_databases/sql_app_py39/main.py!} -``` - -//// - -//// tab | Python 3.8+ - -```Python hl_lines="24 32 38 47 53" -{!> ../../docs_src/sql_databases/sql_app/main.py!} -``` - -//// - -/// info | "Technical Details" - -The parameter `db` is actually of type `SessionLocal`, but this class (created with `sessionmaker()`) is a "proxy" of a SQLAlchemy `Session`, so, the editor doesn't really know what methods are provided. - -But by declaring the type as `Session`, the editor now can know the available methods (`.add()`, `.query()`, `.commit()`, etc) and can provide better support (like completion). The type declaration doesn't affect the actual object. - -/// - -### Create your **FastAPI** *path operations* - -Now, finally, here's the standard **FastAPI** *path operations* code. - -//// tab | Python 3.9+ - -```Python hl_lines="21-26 29-32 35-40 43-47 50-53" -{!> ../../docs_src/sql_databases/sql_app_py39/main.py!} -``` - -//// - -//// tab | Python 3.8+ - -```Python hl_lines="23-28 31-34 37-42 45-49 52-55" -{!> ../../docs_src/sql_databases/sql_app/main.py!} -``` - -//// - -We are creating the database session before each request in the dependency with `yield`, and then closing it afterwards. - -And then we can create the required dependency in the *path operation function*, to get that session directly. - -With that, we can just call `crud.get_user` directly from inside of the *path operation function* and use that session. - -/// tip - -Notice that the values you return are SQLAlchemy models, or lists of SQLAlchemy models. - -But as all the *path operations* have a `response_model` with Pydantic *models* / schemas using `orm_mode`, the data declared in your Pydantic models will be extracted from them and returned to the client, with all the normal filtering and validation. - -/// +{* ../../docs_src/sql_databases/tutorial002_an_py310.py ln[56:62] hl[56:58] *} /// tip -Also notice that there are `response_models` that have standard Python types like `List[schemas.Item]`. - -But as the content/parameter of that `List` is a Pydantic *model* with `orm_mode`, the data will be retrieved and returned to the client as normally, without problems. - -/// - -### About `def` vs `async def` - -Here we are using SQLAlchemy code inside of the *path operation function* and in the dependency, and, in turn, it will go and communicate with an external database. - -That could potentially require some "waiting". - -But as SQLAlchemy doesn't have compatibility for using `await` directly, as would be with something like: - -```Python -user = await db.query(User).first() -``` - -...and instead we are using: - -```Python -user = db.query(User).first() -``` - -Then we should declare the *path operation functions* and the dependency without `async def`, just with a normal `def`, as: - -```Python hl_lines="2" -@app.get("/users/{user_id}", response_model=schemas.User) -def read_user(user_id: int, db: Session = Depends(get_db)): - db_user = crud.get_user(db, user_id=user_id) - ... -``` - -/// info +Now we use `response_model=HeroPublic` instead of the **return type annotation** `-> HeroPublic` because the value that we are returning is actually *not* a `HeroPublic`. -If you need to connect to your relational database asynchronously, see [Async SQL (Relational) Databases](../how-to/async-sql-encode-databases.md){.internal-link target=_blank}. +If we had declared `-> HeroPublic`, your editor and linter would complain (rightfully so) that you are returning a `Hero` instead of a `HeroPublic`. -/// - -/// note | "Very Technical Details" - -If you are curious and have a deep technical knowledge, you can check the very technical details of how this `async def` vs `def` is handled in the [Async](../async.md#very-technical-details){.internal-link target=_blank} docs. +By declaring it in `response_model` we are telling **FastAPI** to do its thing, without interfering with the type annotations and the help from your editor and other tools. /// -## Migrations - -Because we are using SQLAlchemy directly and we don't require any kind of plug-in for it to work with **FastAPI**, we could integrate database migrations with Alembic directly. - -And as the code related to SQLAlchemy and the SQLAlchemy models lives in separate independent files, you would even be able to perform the migrations with Alembic without having to install FastAPI, Pydantic, or anything else. - -The same way, you would be able to use the same SQLAlchemy models and utilities in other parts of your code that are not related to **FastAPI**. - -For example, in a background task worker with Celery, RQ, or ARQ. - -## Review all the files - - Remember you should have a directory named `my_super_project` that contains a sub-directory called `sql_app`. - -`sql_app` should have the following files: - -* `sql_app/__init__.py`: is an empty file. - -* `sql_app/database.py`: - -```Python -{!../../docs_src/sql_databases/sql_app/database.py!} -``` - -* `sql_app/models.py`: +### Read Heroes with `HeroPublic` -```Python -{!../../docs_src/sql_databases/sql_app/models.py!} -``` - -* `sql_app/schemas.py`: - -//// tab | Python 3.10+ - -```Python -{!> ../../docs_src/sql_databases/sql_app_py310/schemas.py!} -``` - -//// - -//// tab | Python 3.9+ - -```Python -{!> ../../docs_src/sql_databases/sql_app_py39/schemas.py!} -``` - -//// +We can do the same as before to **read** `Hero`s, again, we use `response_model=list[HeroPublic]` to ensure that the data is validated and serialized correctly. -//// tab | Python 3.8+ +{* ../../docs_src/sql_databases/tutorial002_an_py310.py ln[65:72] hl[65] *} -```Python -{!> ../../docs_src/sql_databases/sql_app/schemas.py!} -``` - -//// - -* `sql_app/crud.py`: - -```Python -{!../../docs_src/sql_databases/sql_app/crud.py!} -``` +### Read One Hero with `HeroPublic` -* `sql_app/main.py`: +We can **read** a single hero: -//// tab | Python 3.9+ +{* ../../docs_src/sql_databases/tutorial002_an_py310.py ln[75:80] hl[77] *} -```Python -{!> ../../docs_src/sql_databases/sql_app_py39/main.py!} -``` +### Update a Hero with `HeroUpdate` -//// +We can **update a hero**. For this we use an HTTP `PATCH` operation. -//// tab | Python 3.8+ +And in the code, we get a `dict` with all the data sent by the client, **only the data sent by the client**, excluding any values that would be there just for being the default values. To do it we use `exclude_unset=True`. This is the main trick. đŸȘ„ -```Python -{!> ../../docs_src/sql_databases/sql_app/main.py!} -``` +Then we use `hero_db.sqlmodel_update(hero_data)` to update the `hero_db` with the data from `hero_data`. -//// +{* ../../docs_src/sql_databases/tutorial002_an_py310.py ln[83:93] hl[83:84,88:89] *} -## Check it +### Delete a Hero Again -You can copy this code and use it as is. +**Deleting** a hero stays pretty much the same. -/// info +We won't satisfy the desire to refactor everything in this one. 😅 -In fact, the code shown here is part of the tests. As most of the code in these docs. +{* ../../docs_src/sql_databases/tutorial002_an_py310.py ln[96:103] hl[101] *} -/// - -Then you can run it with Uvicorn: +### Run the App Again +You can run the app again:
```console -$ uvicorn sql_app.main:app --reload +$ fastapi dev main.py INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) ```
-And then, you can open your browser at http://127.0.0.1:8000/docs. - -And you will be able to interact with your **FastAPI** application, reading data from a real database: - - - -## Interact with the database directly - -If you want to explore the SQLite database (file) directly, independently of FastAPI, to debug its contents, add tables, columns, records, modify data, etc. you can use DB Browser for SQLite. - -It will look like this: +If you go to the `/docs` API UI, you will see that it is now updated, and it won't expect to receive the `id` from the client when creating a hero, etc. +
+
-You can also use an online SQLite browser like SQLite Viewer or ExtendsClass. - -## Alternative DB session with middleware - -If you can't use dependencies with `yield` -- for example, if you are not using **Python 3.7** and can't install the "backports" mentioned above for **Python 3.6** -- you can set up the session in a "middleware" in a similar way. - -A "middleware" is basically a function that is always executed for each request, with some code executed before, and some code executed after the endpoint function. - -### Create a middleware - -The middleware we'll add (just a function) will create a new SQLAlchemy `SessionLocal` for each request, add it to the request and then close it once the request is finished. - -//// tab | Python 3.9+ - -```Python hl_lines="12-20" -{!> ../../docs_src/sql_databases/sql_app_py39/alt_main.py!} -``` - -//// - -//// tab | Python 3.8+ - -```Python hl_lines="14-22" -{!> ../../docs_src/sql_databases/sql_app/alt_main.py!} -``` - -//// - -/// info - -We put the creation of the `SessionLocal()` and handling of the requests in a `try` block. - -And then we close it in the `finally` block. - -This way we make sure the database session is always closed after the request. Even if there was an exception while processing the request. - -/// - -### About `request.state` - -`request.state` is a property of each `Request` object. It is there to store arbitrary objects attached to the request itself, like the database session in this case. You can read more about it in Starlette's docs about `Request` state. - -For us in this case, it helps us ensure a single database session is used through all the request, and then closed afterwards (in the middleware). - -### Dependencies with `yield` or middleware - -Adding a **middleware** here is similar to what a dependency with `yield` does, with some differences: - -* It requires more code and is a bit more complex. -* The middleware has to be an `async` function. - * If there is code in it that has to "wait" for the network, it could "block" your application there and degrade performance a bit. - * Although it's probably not very problematic here with the way `SQLAlchemy` works. - * But if you added more code to the middleware that had a lot of I/O waiting, it could then be problematic. -* A middleware is run for *every* request. - * So, a connection will be created for every request. - * Even when the *path operation* that handles that request didn't need the DB. - -/// tip - -It's probably better to use dependencies with `yield` when they are enough for the use case. - -/// - -/// info - -Dependencies with `yield` were added recently to **FastAPI**. +## Recap -A previous version of this tutorial only had the examples with a middleware and there are probably several applications using the middleware for database session management. +You can use **SQLModel** to interact with a SQL database and simplify the code with *data models* and *table models*. -/// +You can learn a lot more at the **SQLModel** docs, there's a longer mini tutorial on using SQLModel with **FastAPI**. 🚀 diff --git a/docs/en/mkdocs.yml b/docs/en/mkdocs.yml index e55c6f176..8e0f6765d 100644 --- a/docs/en/mkdocs.yml +++ b/docs/en/mkdocs.yml @@ -71,13 +71,11 @@ plugins: redirects: redirect_maps: deployment/deta.md: deployment/cloud.md - advanced/sql-databases-peewee.md: how-to/sql-databases-peewee.md - advanced/async-sql-databases.md: how-to/async-sql-encode-databases.md - advanced/nosql-databases.md: how-to/nosql-databases-couchbase.md advanced/graphql.md: how-to/graphql.md advanced/custom-request-and-route.md: how-to/custom-request-and-route.md advanced/conditional-openapi.md: how-to/conditional-openapi.md advanced/extending-openapi.md: how-to/extending-openapi.md + advanced/testing-database.md: how-to/testing-database.md mkdocstrings: handlers: python: @@ -187,7 +185,6 @@ nav: - advanced/testing-websockets.md - advanced/testing-events.md - advanced/testing-dependencies.md - - advanced/testing-database.md - advanced/async-tests.md - advanced/settings.md - advanced/openapi-callbacks.md @@ -214,9 +211,7 @@ nav: - how-to/separate-openapi-schemas.md - how-to/custom-docs-ui-assets.md - how-to/configure-swagger-ui.md - - how-to/sql-databases-peewee.md - - how-to/async-sql-encode-databases.md - - how-to/nosql-databases-couchbase.md + - how-to/testing-database.md - Reference (Code API): - reference/index.md - reference/fastapi.md diff --git a/docs/zh/docs/advanced/testing-database.md b/docs/zh/docs/advanced/testing-database.md deleted file mode 100644 index ecab4f65b..000000000 --- a/docs/zh/docs/advanced/testing-database.md +++ /dev/null @@ -1,101 +0,0 @@ -# æ”‹èŻ•æ•°æźćș“ - -æ‚šèż˜ćŻä»„äœżç”š[æ”‹èŻ•äŸè”–éĄč](testing-dependencies.md){.internal-link target=_blank}䞭的芆盖䟝蔖éĄčæ–čæł•ć˜æ›Žæ”‹èŻ•çš„æ•°æźćș“。 - -ćźžçŽ°èźŸçœźć…¶ćźƒæ”‹èŻ•æ•°æźćș“ă€ćœšæ”‹èŻ•ćŽć›žæ»šæ•°æźă€æˆ–éą„ćĄ«æ”‹èŻ•æ•°æźç­‰æ“äœœă€‚ - -æœŹç« çš„äž»èŠæ€è·ŻäžŽäžŠäž€ç« ćźŒć…šç›žćŒă€‚ - -## äžș SQL ćș”ç”šæ·»ćŠ æ”‹èŻ• - -äžșäș†äœżç”šæ”‹èŻ•æ•°æźćș“ïŒŒæˆ‘ä»ŹèŠć‡çș§ [SQL ć…łçł»ćž‹æ•°æźćș“](../tutorial/sql-databases.md){.internal-link target=_blank} 䞀章䞭的ç€șäŸ‹ă€‚ - -ćș”ç”šçš„æ‰€æœ‰ä»Łç éƒœäž€æ ·ïŒŒç›ŽæŽ„æŸ„çœ‹é‚Łäž€ç« çš„ç€șäŸ‹ä»Łç ćłćŻă€‚ - -æœŹç« ćȘæ˜Żæ–°æ·»ćŠ äș†æ”‹èŻ•æ–‡ä»¶ă€‚ - -æ­Łćžžçš„äŸè”–éĄč `get_db()` èż”ć›žæ•°æźćș“äŒšèŻă€‚ - -æ”‹èŻ•æ—¶äœżç”šèŠ†ç›–äŸè”–éĄčèż”ć›žè‡Ș漚ä艿•°æźćș“äŒšèŻä»Łæ›żæ­Łćžžçš„äŸè”–éĄč。 - -æœŹäŸ‹äž­ïŒŒèŠćˆ›ć»ș仅甚äșŽæ”‹èŻ•çš„äžŽæ—¶æ•°æźćș“。 - -## 文件架构 - -戛ć»ș新文件 `sql_app/tests/test_sql_app.py`。 - -ć› æ­€ïŒŒæ–°çš„æ–‡ä»¶æž¶æž„ćŠ‚äž‹ïŒš - -``` hl_lines="9-11" -. -└── sql_app - ├── __init__.py - ├── crud.py - ├── database.py - ├── main.py - ├── models.py - ├── schemas.py - └── tests - ├── __init__.py - └── test_sql_app.py -``` - -## 戛ć»șæ–°çš„æ•°æźćș“äŒšèŻ - -éŠ–ć…ˆïŒŒäžș新ć»șæ•°æźćș“ćˆ›ć»șæ–°çš„æ•°æźćș“äŒšèŻă€‚ - -æ”‹èŻ•æ—¶ïŒŒäœżç”š `test.db` æ›żä»Ł `sql_app.db`。 - -äœ†ć…¶äœ™çš„äŒšèŻä»Łç ćŸșæœŹäžŠéƒœæ˜Żäž€æ ·çš„ïŒŒćȘèŠć€ćˆ¶ć°±ćŻä»„äș†ă€‚ - -```Python hl_lines="8-13" -{!../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} -``` - -/// tip | "提ç€ș" - -äžșć‡ć°‘ä»Łç é‡ć€ïŒŒæœ€ć„œæŠŠèż™æź”ä»Łç ć†™æˆć‡œæ•°ïŒŒćœš `database.py` 侎 `tests/test_sql_app.py`äž­äœżç”šă€‚ - -äžșäș†æŠŠæłšæ„ćŠ›é›†äž­ćœšæ”‹èŻ•ä»Łç äžŠïŒŒæœŹäŸ‹ćȘæ˜Żć€ćˆ¶äș†èż™æź”代码。 - -/// - -## 戛ć»șæ•°æźćș“ - -曠äžșçŽ°ćœšæ˜Żæƒłćœšæ–°æ–‡ä»¶äž­äœżç”šæ–°æ•°æźćș“ïŒŒæ‰€ä»„èŠäœżç”šä»„äž‹ä»Łç ćˆ›ć»șæ•°æźćș“ - -```Python -Base.metadata.create_all(bind=engine) -``` - -äž€èˆŹæ˜Żćœš `main.py` äž­è°ƒç”šèż™èĄŒä»Łç ïŒŒäœ†ćœš `main.py` é‡ŒïŒŒèż™èĄŒä»Łç ç”šäșŽćˆ›ć»ș `sql_app.db`ïŒŒäœ†æ˜ŻçŽ°ćœšèŠäžșæ”‹èŻ•ćˆ›ć»ș `test.db`。 - -ć› æ­€ïŒŒèŠćœšæ”‹èŻ•ä»Łç äž­æ·»ćŠ èż™èĄŒä»Łç ćˆ›ć»șæ–°çš„æ•°æźćș“æ–‡ä»¶ă€‚ - -```Python hl_lines="16" -{!../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} -``` - -## 芆盖䟝蔖éĄč - -æŽ„äž‹æ„ïŒŒćˆ›ć»ș芆盖䟝蔖éĄčćč¶äžșćș”ç”šæ·»ćŠ èŠ†ç›–ć†…ćźč。 - -```Python hl_lines="19-24 27" -{!../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} -``` - -/// tip | "提ç€ș" - -`overrider_get_db()` 侎 `get_db` 的代码懠äčŽćźŒć…šäž€æ ·ïŒŒćȘæ˜Ż `overrider_get_db` äž­äœżç”šæ”‹èŻ•æ•°æźćș“çš„ `TestingSessionLocal`。 - -/// - -## æ”‹èŻ•ćș”甚 - -ç„¶ćŽïŒŒć°±ćŻä»„æ­Łćžžæ”‹èŻ•äș†ă€‚ - -```Python hl_lines="32-47" -{!../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} -``` - -æ”‹èŻ•æœŸé—ŽïŒŒæ‰€æœ‰ćœšæ•°æźćș“äž­æ‰€ćšçš„äżźæ”čéƒœćœš `test.db` é‡ŒïŒŒäžäŒšćœ±ć“äž»ćș”甚的 `sql_app.db`。 diff --git a/docs_src/async_sql_databases/tutorial001.py b/docs_src/async_sql_databases/tutorial001.py deleted file mode 100644 index cbf43d790..000000000 --- a/docs_src/async_sql_databases/tutorial001.py +++ /dev/null @@ -1,65 +0,0 @@ -from typing import List - -import databases -import sqlalchemy -from fastapi import FastAPI -from pydantic import BaseModel - -# SQLAlchemy specific code, as with any other app -DATABASE_URL = "sqlite:///./test.db" -# DATABASE_URL = "postgresql://user:password@postgresserver/db" - -database = databases.Database(DATABASE_URL) - -metadata = sqlalchemy.MetaData() - -notes = sqlalchemy.Table( - "notes", - metadata, - sqlalchemy.Column("id", sqlalchemy.Integer, primary_key=True), - sqlalchemy.Column("text", sqlalchemy.String), - sqlalchemy.Column("completed", sqlalchemy.Boolean), -) - - -engine = sqlalchemy.create_engine( - DATABASE_URL, connect_args={"check_same_thread": False} -) -metadata.create_all(engine) - - -class NoteIn(BaseModel): - text: str - completed: bool - - -class Note(BaseModel): - id: int - text: str - completed: bool - - -app = FastAPI() - - -@app.on_event("startup") -async def startup(): - await database.connect() - - -@app.on_event("shutdown") -async def shutdown(): - await database.disconnect() - - -@app.get("/notes/", response_model=List[Note]) -async def read_notes(): - query = notes.select() - return await database.fetch_all(query) - - -@app.post("/notes/", response_model=Note) -async def create_note(note: NoteIn): - query = notes.insert().values(text=note.text, completed=note.completed) - last_record_id = await database.execute(query) - return {**note.dict(), "id": last_record_id} diff --git a/docs_src/nosql_databases/tutorial001.py b/docs_src/nosql_databases/tutorial001.py deleted file mode 100644 index 91893e528..000000000 --- a/docs_src/nosql_databases/tutorial001.py +++ /dev/null @@ -1,53 +0,0 @@ -from typing import Union - -from couchbase import LOCKMODE_WAIT -from couchbase.bucket import Bucket -from couchbase.cluster import Cluster, PasswordAuthenticator -from fastapi import FastAPI -from pydantic import BaseModel - -USERPROFILE_DOC_TYPE = "userprofile" - - -def get_bucket(): - cluster = Cluster( - "couchbase://couchbasehost:8091?fetch_mutation_tokens=1&operation_timeout=30&n1ql_timeout=300" - ) - authenticator = PasswordAuthenticator("username", "password") - cluster.authenticate(authenticator) - bucket: Bucket = cluster.open_bucket("bucket_name", lockmode=LOCKMODE_WAIT) - bucket.timeout = 30 - bucket.n1ql_timeout = 300 - return bucket - - -class User(BaseModel): - username: str - email: Union[str, None] = None - full_name: Union[str, None] = None - disabled: Union[bool, None] = None - - -class UserInDB(User): - type: str = USERPROFILE_DOC_TYPE - hashed_password: str - - -def get_user(bucket: Bucket, username: str): - doc_id = f"userprofile::{username}" - result = bucket.get(doc_id, quiet=True) - if not result.value: - return None - user = UserInDB(**result.value) - return user - - -# FastAPI specific code -app = FastAPI() - - -@app.get("/users/{username}", response_model=User) -def read_user(username: str): - bucket = get_bucket() - user = get_user(bucket=bucket, username=username) - return user diff --git a/docs_src/sql_databases/sql_app/__init__.py b/docs_src/sql_databases/sql_app/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/docs_src/sql_databases/sql_app/alt_main.py b/docs_src/sql_databases/sql_app/alt_main.py deleted file mode 100644 index f7206bcb4..000000000 --- a/docs_src/sql_databases/sql_app/alt_main.py +++ /dev/null @@ -1,62 +0,0 @@ -from typing import List - -from fastapi import Depends, FastAPI, HTTPException, Request, Response -from sqlalchemy.orm import Session - -from . import crud, models, schemas -from .database import SessionLocal, engine - -models.Base.metadata.create_all(bind=engine) - -app = FastAPI() - - -@app.middleware("http") -async def db_session_middleware(request: Request, call_next): - response = Response("Internal server error", status_code=500) - try: - request.state.db = SessionLocal() - response = await call_next(request) - finally: - request.state.db.close() - return response - - -# Dependency -def get_db(request: Request): - return request.state.db - - -@app.post("/users/", response_model=schemas.User) -def create_user(user: schemas.UserCreate, db: Session = Depends(get_db)): - db_user = crud.get_user_by_email(db, email=user.email) - if db_user: - raise HTTPException(status_code=400, detail="Email already registered") - return crud.create_user(db=db, user=user) - - -@app.get("/users/", response_model=List[schemas.User]) -def read_users(skip: int = 0, limit: int = 100, db: Session = Depends(get_db)): - users = crud.get_users(db, skip=skip, limit=limit) - return users - - -@app.get("/users/{user_id}", response_model=schemas.User) -def read_user(user_id: int, db: Session = Depends(get_db)): - db_user = crud.get_user(db, user_id=user_id) - if db_user is None: - raise HTTPException(status_code=404, detail="User not found") - return db_user - - -@app.post("/users/{user_id}/items/", response_model=schemas.Item) -def create_item_for_user( - user_id: int, item: schemas.ItemCreate, db: Session = Depends(get_db) -): - return crud.create_user_item(db=db, item=item, user_id=user_id) - - -@app.get("/items/", response_model=List[schemas.Item]) -def read_items(skip: int = 0, limit: int = 100, db: Session = Depends(get_db)): - items = crud.get_items(db, skip=skip, limit=limit) - return items diff --git a/docs_src/sql_databases/sql_app/crud.py b/docs_src/sql_databases/sql_app/crud.py deleted file mode 100644 index 679acdb5c..000000000 --- a/docs_src/sql_databases/sql_app/crud.py +++ /dev/null @@ -1,36 +0,0 @@ -from sqlalchemy.orm import Session - -from . import models, schemas - - -def get_user(db: Session, user_id: int): - return db.query(models.User).filter(models.User.id == user_id).first() - - -def get_user_by_email(db: Session, email: str): - return db.query(models.User).filter(models.User.email == email).first() - - -def get_users(db: Session, skip: int = 0, limit: int = 100): - return db.query(models.User).offset(skip).limit(limit).all() - - -def create_user(db: Session, user: schemas.UserCreate): - fake_hashed_password = user.password + "notreallyhashed" - db_user = models.User(email=user.email, hashed_password=fake_hashed_password) - db.add(db_user) - db.commit() - db.refresh(db_user) - return db_user - - -def get_items(db: Session, skip: int = 0, limit: int = 100): - return db.query(models.Item).offset(skip).limit(limit).all() - - -def create_user_item(db: Session, item: schemas.ItemCreate, user_id: int): - db_item = models.Item(**item.dict(), owner_id=user_id) - db.add(db_item) - db.commit() - db.refresh(db_item) - return db_item diff --git a/docs_src/sql_databases/sql_app/database.py b/docs_src/sql_databases/sql_app/database.py deleted file mode 100644 index 45a8b9f69..000000000 --- a/docs_src/sql_databases/sql_app/database.py +++ /dev/null @@ -1,13 +0,0 @@ -from sqlalchemy import create_engine -from sqlalchemy.ext.declarative import declarative_base -from sqlalchemy.orm import sessionmaker - -SQLALCHEMY_DATABASE_URL = "sqlite:///./sql_app.db" -# SQLALCHEMY_DATABASE_URL = "postgresql://user:password@postgresserver/db" - -engine = create_engine( - SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False} -) -SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) - -Base = declarative_base() diff --git a/docs_src/sql_databases/sql_app/main.py b/docs_src/sql_databases/sql_app/main.py deleted file mode 100644 index e7508c59d..000000000 --- a/docs_src/sql_databases/sql_app/main.py +++ /dev/null @@ -1,55 +0,0 @@ -from typing import List - -from fastapi import Depends, FastAPI, HTTPException -from sqlalchemy.orm import Session - -from . import crud, models, schemas -from .database import SessionLocal, engine - -models.Base.metadata.create_all(bind=engine) - -app = FastAPI() - - -# Dependency -def get_db(): - db = SessionLocal() - try: - yield db - finally: - db.close() - - -@app.post("/users/", response_model=schemas.User) -def create_user(user: schemas.UserCreate, db: Session = Depends(get_db)): - db_user = crud.get_user_by_email(db, email=user.email) - if db_user: - raise HTTPException(status_code=400, detail="Email already registered") - return crud.create_user(db=db, user=user) - - -@app.get("/users/", response_model=List[schemas.User]) -def read_users(skip: int = 0, limit: int = 100, db: Session = Depends(get_db)): - users = crud.get_users(db, skip=skip, limit=limit) - return users - - -@app.get("/users/{user_id}", response_model=schemas.User) -def read_user(user_id: int, db: Session = Depends(get_db)): - db_user = crud.get_user(db, user_id=user_id) - if db_user is None: - raise HTTPException(status_code=404, detail="User not found") - return db_user - - -@app.post("/users/{user_id}/items/", response_model=schemas.Item) -def create_item_for_user( - user_id: int, item: schemas.ItemCreate, db: Session = Depends(get_db) -): - return crud.create_user_item(db=db, item=item, user_id=user_id) - - -@app.get("/items/", response_model=List[schemas.Item]) -def read_items(skip: int = 0, limit: int = 100, db: Session = Depends(get_db)): - items = crud.get_items(db, skip=skip, limit=limit) - return items diff --git a/docs_src/sql_databases/sql_app/models.py b/docs_src/sql_databases/sql_app/models.py deleted file mode 100644 index 09ae2a807..000000000 --- a/docs_src/sql_databases/sql_app/models.py +++ /dev/null @@ -1,26 +0,0 @@ -from sqlalchemy import Boolean, Column, ForeignKey, Integer, String -from sqlalchemy.orm import relationship - -from .database import Base - - -class User(Base): - __tablename__ = "users" - - id = Column(Integer, primary_key=True) - email = Column(String, unique=True, index=True) - hashed_password = Column(String) - is_active = Column(Boolean, default=True) - - items = relationship("Item", back_populates="owner") - - -class Item(Base): - __tablename__ = "items" - - id = Column(Integer, primary_key=True) - title = Column(String, index=True) - description = Column(String, index=True) - owner_id = Column(Integer, ForeignKey("users.id")) - - owner = relationship("User", back_populates="items") diff --git a/docs_src/sql_databases/sql_app/schemas.py b/docs_src/sql_databases/sql_app/schemas.py deleted file mode 100644 index c49beba88..000000000 --- a/docs_src/sql_databases/sql_app/schemas.py +++ /dev/null @@ -1,37 +0,0 @@ -from typing import List, Union - -from pydantic import BaseModel - - -class ItemBase(BaseModel): - title: str - description: Union[str, None] = None - - -class ItemCreate(ItemBase): - pass - - -class Item(ItemBase): - id: int - owner_id: int - - class Config: - orm_mode = True - - -class UserBase(BaseModel): - email: str - - -class UserCreate(UserBase): - password: str - - -class User(UserBase): - id: int - is_active: bool - items: List[Item] = [] - - class Config: - orm_mode = True diff --git a/docs_src/sql_databases/sql_app/tests/__init__.py b/docs_src/sql_databases/sql_app/tests/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/docs_src/sql_databases/sql_app/tests/test_sql_app.py b/docs_src/sql_databases/sql_app/tests/test_sql_app.py deleted file mode 100644 index 5f55add0a..000000000 --- a/docs_src/sql_databases/sql_app/tests/test_sql_app.py +++ /dev/null @@ -1,50 +0,0 @@ -from fastapi.testclient import TestClient -from sqlalchemy import create_engine -from sqlalchemy.orm import sessionmaker -from sqlalchemy.pool import StaticPool - -from ..database import Base -from ..main import app, get_db - -SQLALCHEMY_DATABASE_URL = "sqlite://" - -engine = create_engine( - SQLALCHEMY_DATABASE_URL, - connect_args={"check_same_thread": False}, - poolclass=StaticPool, -) -TestingSessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) - - -Base.metadata.create_all(bind=engine) - - -def override_get_db(): - try: - db = TestingSessionLocal() - yield db - finally: - db.close() - - -app.dependency_overrides[get_db] = override_get_db - -client = TestClient(app) - - -def test_create_user(): - response = client.post( - "/users/", - json={"email": "deadpool@example.com", "password": "chimichangas4life"}, - ) - assert response.status_code == 200, response.text - data = response.json() - assert data["email"] == "deadpool@example.com" - assert "id" in data - user_id = data["id"] - - response = client.get(f"/users/{user_id}") - assert response.status_code == 200, response.text - data = response.json() - assert data["email"] == "deadpool@example.com" - assert data["id"] == user_id diff --git a/docs_src/sql_databases/sql_app_py310/__init__.py b/docs_src/sql_databases/sql_app_py310/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/docs_src/sql_databases/sql_app_py310/alt_main.py b/docs_src/sql_databases/sql_app_py310/alt_main.py deleted file mode 100644 index 5de88ec3a..000000000 --- a/docs_src/sql_databases/sql_app_py310/alt_main.py +++ /dev/null @@ -1,60 +0,0 @@ -from fastapi import Depends, FastAPI, HTTPException, Request, Response -from sqlalchemy.orm import Session - -from . import crud, models, schemas -from .database import SessionLocal, engine - -models.Base.metadata.create_all(bind=engine) - -app = FastAPI() - - -@app.middleware("http") -async def db_session_middleware(request: Request, call_next): - response = Response("Internal server error", status_code=500) - try: - request.state.db = SessionLocal() - response = await call_next(request) - finally: - request.state.db.close() - return response - - -# Dependency -def get_db(request: Request): - return request.state.db - - -@app.post("/users/", response_model=schemas.User) -def create_user(user: schemas.UserCreate, db: Session = Depends(get_db)): - db_user = crud.get_user_by_email(db, email=user.email) - if db_user: - raise HTTPException(status_code=400, detail="Email already registered") - return crud.create_user(db=db, user=user) - - -@app.get("/users/", response_model=list[schemas.User]) -def read_users(skip: int = 0, limit: int = 100, db: Session = Depends(get_db)): - users = crud.get_users(db, skip=skip, limit=limit) - return users - - -@app.get("/users/{user_id}", response_model=schemas.User) -def read_user(user_id: int, db: Session = Depends(get_db)): - db_user = crud.get_user(db, user_id=user_id) - if db_user is None: - raise HTTPException(status_code=404, detail="User not found") - return db_user - - -@app.post("/users/{user_id}/items/", response_model=schemas.Item) -def create_item_for_user( - user_id: int, item: schemas.ItemCreate, db: Session = Depends(get_db) -): - return crud.create_user_item(db=db, item=item, user_id=user_id) - - -@app.get("/items/", response_model=list[schemas.Item]) -def read_items(skip: int = 0, limit: int = 100, db: Session = Depends(get_db)): - items = crud.get_items(db, skip=skip, limit=limit) - return items diff --git a/docs_src/sql_databases/sql_app_py310/crud.py b/docs_src/sql_databases/sql_app_py310/crud.py deleted file mode 100644 index 679acdb5c..000000000 --- a/docs_src/sql_databases/sql_app_py310/crud.py +++ /dev/null @@ -1,36 +0,0 @@ -from sqlalchemy.orm import Session - -from . import models, schemas - - -def get_user(db: Session, user_id: int): - return db.query(models.User).filter(models.User.id == user_id).first() - - -def get_user_by_email(db: Session, email: str): - return db.query(models.User).filter(models.User.email == email).first() - - -def get_users(db: Session, skip: int = 0, limit: int = 100): - return db.query(models.User).offset(skip).limit(limit).all() - - -def create_user(db: Session, user: schemas.UserCreate): - fake_hashed_password = user.password + "notreallyhashed" - db_user = models.User(email=user.email, hashed_password=fake_hashed_password) - db.add(db_user) - db.commit() - db.refresh(db_user) - return db_user - - -def get_items(db: Session, skip: int = 0, limit: int = 100): - return db.query(models.Item).offset(skip).limit(limit).all() - - -def create_user_item(db: Session, item: schemas.ItemCreate, user_id: int): - db_item = models.Item(**item.dict(), owner_id=user_id) - db.add(db_item) - db.commit() - db.refresh(db_item) - return db_item diff --git a/docs_src/sql_databases/sql_app_py310/database.py b/docs_src/sql_databases/sql_app_py310/database.py deleted file mode 100644 index 45a8b9f69..000000000 --- a/docs_src/sql_databases/sql_app_py310/database.py +++ /dev/null @@ -1,13 +0,0 @@ -from sqlalchemy import create_engine -from sqlalchemy.ext.declarative import declarative_base -from sqlalchemy.orm import sessionmaker - -SQLALCHEMY_DATABASE_URL = "sqlite:///./sql_app.db" -# SQLALCHEMY_DATABASE_URL = "postgresql://user:password@postgresserver/db" - -engine = create_engine( - SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False} -) -SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) - -Base = declarative_base() diff --git a/docs_src/sql_databases/sql_app_py310/main.py b/docs_src/sql_databases/sql_app_py310/main.py deleted file mode 100644 index a9856d0b6..000000000 --- a/docs_src/sql_databases/sql_app_py310/main.py +++ /dev/null @@ -1,53 +0,0 @@ -from fastapi import Depends, FastAPI, HTTPException -from sqlalchemy.orm import Session - -from . import crud, models, schemas -from .database import SessionLocal, engine - -models.Base.metadata.create_all(bind=engine) - -app = FastAPI() - - -# Dependency -def get_db(): - db = SessionLocal() - try: - yield db - finally: - db.close() - - -@app.post("/users/", response_model=schemas.User) -def create_user(user: schemas.UserCreate, db: Session = Depends(get_db)): - db_user = crud.get_user_by_email(db, email=user.email) - if db_user: - raise HTTPException(status_code=400, detail="Email already registered") - return crud.create_user(db=db, user=user) - - -@app.get("/users/", response_model=list[schemas.User]) -def read_users(skip: int = 0, limit: int = 100, db: Session = Depends(get_db)): - users = crud.get_users(db, skip=skip, limit=limit) - return users - - -@app.get("/users/{user_id}", response_model=schemas.User) -def read_user(user_id: int, db: Session = Depends(get_db)): - db_user = crud.get_user(db, user_id=user_id) - if db_user is None: - raise HTTPException(status_code=404, detail="User not found") - return db_user - - -@app.post("/users/{user_id}/items/", response_model=schemas.Item) -def create_item_for_user( - user_id: int, item: schemas.ItemCreate, db: Session = Depends(get_db) -): - return crud.create_user_item(db=db, item=item, user_id=user_id) - - -@app.get("/items/", response_model=list[schemas.Item]) -def read_items(skip: int = 0, limit: int = 100, db: Session = Depends(get_db)): - items = crud.get_items(db, skip=skip, limit=limit) - return items diff --git a/docs_src/sql_databases/sql_app_py310/models.py b/docs_src/sql_databases/sql_app_py310/models.py deleted file mode 100644 index 09ae2a807..000000000 --- a/docs_src/sql_databases/sql_app_py310/models.py +++ /dev/null @@ -1,26 +0,0 @@ -from sqlalchemy import Boolean, Column, ForeignKey, Integer, String -from sqlalchemy.orm import relationship - -from .database import Base - - -class User(Base): - __tablename__ = "users" - - id = Column(Integer, primary_key=True) - email = Column(String, unique=True, index=True) - hashed_password = Column(String) - is_active = Column(Boolean, default=True) - - items = relationship("Item", back_populates="owner") - - -class Item(Base): - __tablename__ = "items" - - id = Column(Integer, primary_key=True) - title = Column(String, index=True) - description = Column(String, index=True) - owner_id = Column(Integer, ForeignKey("users.id")) - - owner = relationship("User", back_populates="items") diff --git a/docs_src/sql_databases/sql_app_py310/schemas.py b/docs_src/sql_databases/sql_app_py310/schemas.py deleted file mode 100644 index aea2e3f10..000000000 --- a/docs_src/sql_databases/sql_app_py310/schemas.py +++ /dev/null @@ -1,35 +0,0 @@ -from pydantic import BaseModel - - -class ItemBase(BaseModel): - title: str - description: str | None = None - - -class ItemCreate(ItemBase): - pass - - -class Item(ItemBase): - id: int - owner_id: int - - class Config: - orm_mode = True - - -class UserBase(BaseModel): - email: str - - -class UserCreate(UserBase): - password: str - - -class User(UserBase): - id: int - is_active: bool - items: list[Item] = [] - - class Config: - orm_mode = True diff --git a/docs_src/sql_databases/sql_app_py310/tests/__init__.py b/docs_src/sql_databases/sql_app_py310/tests/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/docs_src/sql_databases/sql_app_py310/tests/test_sql_app.py b/docs_src/sql_databases/sql_app_py310/tests/test_sql_app.py deleted file mode 100644 index c60c3356f..000000000 --- a/docs_src/sql_databases/sql_app_py310/tests/test_sql_app.py +++ /dev/null @@ -1,47 +0,0 @@ -from fastapi.testclient import TestClient -from sqlalchemy import create_engine -from sqlalchemy.orm import sessionmaker - -from ..database import Base -from ..main import app, get_db - -SQLALCHEMY_DATABASE_URL = "sqlite:///./test.db" - -engine = create_engine( - SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False} -) -TestingSessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) - - -Base.metadata.create_all(bind=engine) - - -def override_get_db(): - try: - db = TestingSessionLocal() - yield db - finally: - db.close() - - -app.dependency_overrides[get_db] = override_get_db - -client = TestClient(app) - - -def test_create_user(): - response = client.post( - "/users/", - json={"email": "deadpool@example.com", "password": "chimichangas4life"}, - ) - assert response.status_code == 200, response.text - data = response.json() - assert data["email"] == "deadpool@example.com" - assert "id" in data - user_id = data["id"] - - response = client.get(f"/users/{user_id}") - assert response.status_code == 200, response.text - data = response.json() - assert data["email"] == "deadpool@example.com" - assert data["id"] == user_id diff --git a/docs_src/sql_databases/sql_app_py39/__init__.py b/docs_src/sql_databases/sql_app_py39/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/docs_src/sql_databases/sql_app_py39/alt_main.py b/docs_src/sql_databases/sql_app_py39/alt_main.py deleted file mode 100644 index 5de88ec3a..000000000 --- a/docs_src/sql_databases/sql_app_py39/alt_main.py +++ /dev/null @@ -1,60 +0,0 @@ -from fastapi import Depends, FastAPI, HTTPException, Request, Response -from sqlalchemy.orm import Session - -from . import crud, models, schemas -from .database import SessionLocal, engine - -models.Base.metadata.create_all(bind=engine) - -app = FastAPI() - - -@app.middleware("http") -async def db_session_middleware(request: Request, call_next): - response = Response("Internal server error", status_code=500) - try: - request.state.db = SessionLocal() - response = await call_next(request) - finally: - request.state.db.close() - return response - - -# Dependency -def get_db(request: Request): - return request.state.db - - -@app.post("/users/", response_model=schemas.User) -def create_user(user: schemas.UserCreate, db: Session = Depends(get_db)): - db_user = crud.get_user_by_email(db, email=user.email) - if db_user: - raise HTTPException(status_code=400, detail="Email already registered") - return crud.create_user(db=db, user=user) - - -@app.get("/users/", response_model=list[schemas.User]) -def read_users(skip: int = 0, limit: int = 100, db: Session = Depends(get_db)): - users = crud.get_users(db, skip=skip, limit=limit) - return users - - -@app.get("/users/{user_id}", response_model=schemas.User) -def read_user(user_id: int, db: Session = Depends(get_db)): - db_user = crud.get_user(db, user_id=user_id) - if db_user is None: - raise HTTPException(status_code=404, detail="User not found") - return db_user - - -@app.post("/users/{user_id}/items/", response_model=schemas.Item) -def create_item_for_user( - user_id: int, item: schemas.ItemCreate, db: Session = Depends(get_db) -): - return crud.create_user_item(db=db, item=item, user_id=user_id) - - -@app.get("/items/", response_model=list[schemas.Item]) -def read_items(skip: int = 0, limit: int = 100, db: Session = Depends(get_db)): - items = crud.get_items(db, skip=skip, limit=limit) - return items diff --git a/docs_src/sql_databases/sql_app_py39/crud.py b/docs_src/sql_databases/sql_app_py39/crud.py deleted file mode 100644 index 679acdb5c..000000000 --- a/docs_src/sql_databases/sql_app_py39/crud.py +++ /dev/null @@ -1,36 +0,0 @@ -from sqlalchemy.orm import Session - -from . import models, schemas - - -def get_user(db: Session, user_id: int): - return db.query(models.User).filter(models.User.id == user_id).first() - - -def get_user_by_email(db: Session, email: str): - return db.query(models.User).filter(models.User.email == email).first() - - -def get_users(db: Session, skip: int = 0, limit: int = 100): - return db.query(models.User).offset(skip).limit(limit).all() - - -def create_user(db: Session, user: schemas.UserCreate): - fake_hashed_password = user.password + "notreallyhashed" - db_user = models.User(email=user.email, hashed_password=fake_hashed_password) - db.add(db_user) - db.commit() - db.refresh(db_user) - return db_user - - -def get_items(db: Session, skip: int = 0, limit: int = 100): - return db.query(models.Item).offset(skip).limit(limit).all() - - -def create_user_item(db: Session, item: schemas.ItemCreate, user_id: int): - db_item = models.Item(**item.dict(), owner_id=user_id) - db.add(db_item) - db.commit() - db.refresh(db_item) - return db_item diff --git a/docs_src/sql_databases/sql_app_py39/database.py b/docs_src/sql_databases/sql_app_py39/database.py deleted file mode 100644 index 45a8b9f69..000000000 --- a/docs_src/sql_databases/sql_app_py39/database.py +++ /dev/null @@ -1,13 +0,0 @@ -from sqlalchemy import create_engine -from sqlalchemy.ext.declarative import declarative_base -from sqlalchemy.orm import sessionmaker - -SQLALCHEMY_DATABASE_URL = "sqlite:///./sql_app.db" -# SQLALCHEMY_DATABASE_URL = "postgresql://user:password@postgresserver/db" - -engine = create_engine( - SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False} -) -SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) - -Base = declarative_base() diff --git a/docs_src/sql_databases/sql_app_py39/main.py b/docs_src/sql_databases/sql_app_py39/main.py deleted file mode 100644 index a9856d0b6..000000000 --- a/docs_src/sql_databases/sql_app_py39/main.py +++ /dev/null @@ -1,53 +0,0 @@ -from fastapi import Depends, FastAPI, HTTPException -from sqlalchemy.orm import Session - -from . import crud, models, schemas -from .database import SessionLocal, engine - -models.Base.metadata.create_all(bind=engine) - -app = FastAPI() - - -# Dependency -def get_db(): - db = SessionLocal() - try: - yield db - finally: - db.close() - - -@app.post("/users/", response_model=schemas.User) -def create_user(user: schemas.UserCreate, db: Session = Depends(get_db)): - db_user = crud.get_user_by_email(db, email=user.email) - if db_user: - raise HTTPException(status_code=400, detail="Email already registered") - return crud.create_user(db=db, user=user) - - -@app.get("/users/", response_model=list[schemas.User]) -def read_users(skip: int = 0, limit: int = 100, db: Session = Depends(get_db)): - users = crud.get_users(db, skip=skip, limit=limit) - return users - - -@app.get("/users/{user_id}", response_model=schemas.User) -def read_user(user_id: int, db: Session = Depends(get_db)): - db_user = crud.get_user(db, user_id=user_id) - if db_user is None: - raise HTTPException(status_code=404, detail="User not found") - return db_user - - -@app.post("/users/{user_id}/items/", response_model=schemas.Item) -def create_item_for_user( - user_id: int, item: schemas.ItemCreate, db: Session = Depends(get_db) -): - return crud.create_user_item(db=db, item=item, user_id=user_id) - - -@app.get("/items/", response_model=list[schemas.Item]) -def read_items(skip: int = 0, limit: int = 100, db: Session = Depends(get_db)): - items = crud.get_items(db, skip=skip, limit=limit) - return items diff --git a/docs_src/sql_databases/sql_app_py39/models.py b/docs_src/sql_databases/sql_app_py39/models.py deleted file mode 100644 index 09ae2a807..000000000 --- a/docs_src/sql_databases/sql_app_py39/models.py +++ /dev/null @@ -1,26 +0,0 @@ -from sqlalchemy import Boolean, Column, ForeignKey, Integer, String -from sqlalchemy.orm import relationship - -from .database import Base - - -class User(Base): - __tablename__ = "users" - - id = Column(Integer, primary_key=True) - email = Column(String, unique=True, index=True) - hashed_password = Column(String) - is_active = Column(Boolean, default=True) - - items = relationship("Item", back_populates="owner") - - -class Item(Base): - __tablename__ = "items" - - id = Column(Integer, primary_key=True) - title = Column(String, index=True) - description = Column(String, index=True) - owner_id = Column(Integer, ForeignKey("users.id")) - - owner = relationship("User", back_populates="items") diff --git a/docs_src/sql_databases/sql_app_py39/schemas.py b/docs_src/sql_databases/sql_app_py39/schemas.py deleted file mode 100644 index dadc403d9..000000000 --- a/docs_src/sql_databases/sql_app_py39/schemas.py +++ /dev/null @@ -1,37 +0,0 @@ -from typing import Union - -from pydantic import BaseModel - - -class ItemBase(BaseModel): - title: str - description: Union[str, None] = None - - -class ItemCreate(ItemBase): - pass - - -class Item(ItemBase): - id: int - owner_id: int - - class Config: - orm_mode = True - - -class UserBase(BaseModel): - email: str - - -class UserCreate(UserBase): - password: str - - -class User(UserBase): - id: int - is_active: bool - items: list[Item] = [] - - class Config: - orm_mode = True diff --git a/docs_src/sql_databases/sql_app_py39/tests/__init__.py b/docs_src/sql_databases/sql_app_py39/tests/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/docs_src/sql_databases/sql_app_py39/tests/test_sql_app.py b/docs_src/sql_databases/sql_app_py39/tests/test_sql_app.py deleted file mode 100644 index c60c3356f..000000000 --- a/docs_src/sql_databases/sql_app_py39/tests/test_sql_app.py +++ /dev/null @@ -1,47 +0,0 @@ -from fastapi.testclient import TestClient -from sqlalchemy import create_engine -from sqlalchemy.orm import sessionmaker - -from ..database import Base -from ..main import app, get_db - -SQLALCHEMY_DATABASE_URL = "sqlite:///./test.db" - -engine = create_engine( - SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False} -) -TestingSessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) - - -Base.metadata.create_all(bind=engine) - - -def override_get_db(): - try: - db = TestingSessionLocal() - yield db - finally: - db.close() - - -app.dependency_overrides[get_db] = override_get_db - -client = TestClient(app) - - -def test_create_user(): - response = client.post( - "/users/", - json={"email": "deadpool@example.com", "password": "chimichangas4life"}, - ) - assert response.status_code == 200, response.text - data = response.json() - assert data["email"] == "deadpool@example.com" - assert "id" in data - user_id = data["id"] - - response = client.get(f"/users/{user_id}") - assert response.status_code == 200, response.text - data = response.json() - assert data["email"] == "deadpool@example.com" - assert data["id"] == user_id diff --git a/docs_src/sql_databases/tutorial001.py b/docs_src/sql_databases/tutorial001.py new file mode 100644 index 000000000..be86ec0ee --- /dev/null +++ b/docs_src/sql_databases/tutorial001.py @@ -0,0 +1,71 @@ +from typing import List, Union + +from fastapi import Depends, FastAPI, HTTPException, Query +from sqlmodel import Field, Session, SQLModel, create_engine, select + + +class Hero(SQLModel, table=True): + id: Union[int, None] = Field(default=None, primary_key=True) + name: str = Field(index=True) + age: Union[int, None] = Field(default=None, index=True) + secret_name: str + + +sqlite_file_name = "database.db" +sqlite_url = f"sqlite:///{sqlite_file_name}" + +connect_args = {"check_same_thread": False} +engine = create_engine(sqlite_url, connect_args=connect_args) + + +def create_db_and_tables(): + SQLModel.metadata.create_all(engine) + + +def get_session(): + with Session(engine) as session: + yield session + + +app = FastAPI() + + +@app.on_event("startup") +def on_startup(): + create_db_and_tables() + + +@app.post("/heroes/") +def create_hero(hero: Hero, session: Session = Depends(get_session)) -> Hero: + session.add(hero) + session.commit() + session.refresh(hero) + return hero + + +@app.get("/heroes/") +def read_heroes( + session: Session = Depends(get_session), + offset: int = 0, + limit: int = Query(default=100, le=100), +) -> List[Hero]: + heroes = session.exec(select(Hero).offset(offset).limit(limit)).all() + return heroes + + +@app.get("/heroes/{hero_id}") +def read_hero(hero_id: int, session: Session = Depends(get_session)) -> Hero: + hero = session.get(Hero, hero_id) + if not hero: + raise HTTPException(status_code=404, detail="Hero not found") + return hero + + +@app.delete("/heroes/{hero_id}") +def delete_hero(hero_id: int, session: Session = Depends(get_session)): + hero = session.get(Hero, hero_id) + if not hero: + raise HTTPException(status_code=404, detail="Hero not found") + session.delete(hero) + session.commit() + return {"ok": True} diff --git a/docs_src/sql_databases/tutorial001_an.py b/docs_src/sql_databases/tutorial001_an.py new file mode 100644 index 000000000..8c000d31c --- /dev/null +++ b/docs_src/sql_databases/tutorial001_an.py @@ -0,0 +1,74 @@ +from typing import List, Union + +from fastapi import Depends, FastAPI, HTTPException, Query +from sqlmodel import Field, Session, SQLModel, create_engine, select +from typing_extensions import Annotated + + +class Hero(SQLModel, table=True): + id: Union[int, None] = Field(default=None, primary_key=True) + name: str = Field(index=True) + age: Union[int, None] = Field(default=None, index=True) + secret_name: str + + +sqlite_file_name = "database.db" +sqlite_url = f"sqlite:///{sqlite_file_name}" + +connect_args = {"check_same_thread": False} +engine = create_engine(sqlite_url, connect_args=connect_args) + + +def create_db_and_tables(): + SQLModel.metadata.create_all(engine) + + +def get_session(): + with Session(engine) as session: + yield session + + +SessionDep = Annotated[Session, Depends(get_session)] + +app = FastAPI() + + +@app.on_event("startup") +def on_startup(): + create_db_and_tables() + + +@app.post("/heroes/") +def create_hero(hero: Hero, session: SessionDep) -> Hero: + session.add(hero) + session.commit() + session.refresh(hero) + return hero + + +@app.get("/heroes/") +def read_heroes( + session: SessionDep, + offset: int = 0, + limit: Annotated[int, Query(le=100)] = 100, +) -> List[Hero]: + heroes = session.exec(select(Hero).offset(offset).limit(limit)).all() + return heroes + + +@app.get("/heroes/{hero_id}") +def read_hero(hero_id: int, session: SessionDep) -> Hero: + hero = session.get(Hero, hero_id) + if not hero: + raise HTTPException(status_code=404, detail="Hero not found") + return hero + + +@app.delete("/heroes/{hero_id}") +def delete_hero(hero_id: int, session: SessionDep): + hero = session.get(Hero, hero_id) + if not hero: + raise HTTPException(status_code=404, detail="Hero not found") + session.delete(hero) + session.commit() + return {"ok": True} diff --git a/docs_src/sql_databases/tutorial001_an_py310.py b/docs_src/sql_databases/tutorial001_an_py310.py new file mode 100644 index 000000000..de1fb81fa --- /dev/null +++ b/docs_src/sql_databases/tutorial001_an_py310.py @@ -0,0 +1,73 @@ +from typing import Annotated + +from fastapi import Depends, FastAPI, HTTPException, Query +from sqlmodel import Field, Session, SQLModel, create_engine, select + + +class Hero(SQLModel, table=True): + id: int | None = Field(default=None, primary_key=True) + name: str = Field(index=True) + age: int | None = Field(default=None, index=True) + secret_name: str + + +sqlite_file_name = "database.db" +sqlite_url = f"sqlite:///{sqlite_file_name}" + +connect_args = {"check_same_thread": False} +engine = create_engine(sqlite_url, connect_args=connect_args) + + +def create_db_and_tables(): + SQLModel.metadata.create_all(engine) + + +def get_session(): + with Session(engine) as session: + yield session + + +SessionDep = Annotated[Session, Depends(get_session)] + +app = FastAPI() + + +@app.on_event("startup") +def on_startup(): + create_db_and_tables() + + +@app.post("/heroes/") +def create_hero(hero: Hero, session: SessionDep) -> Hero: + session.add(hero) + session.commit() + session.refresh(hero) + return hero + + +@app.get("/heroes/") +def read_heroes( + session: SessionDep, + offset: int = 0, + limit: Annotated[int, Query(le=100)] = 100, +) -> list[Hero]: + heroes = session.exec(select(Hero).offset(offset).limit(limit)).all() + return heroes + + +@app.get("/heroes/{hero_id}") +def read_hero(hero_id: int, session: SessionDep) -> Hero: + hero = session.get(Hero, hero_id) + if not hero: + raise HTTPException(status_code=404, detail="Hero not found") + return hero + + +@app.delete("/heroes/{hero_id}") +def delete_hero(hero_id: int, session: SessionDep): + hero = session.get(Hero, hero_id) + if not hero: + raise HTTPException(status_code=404, detail="Hero not found") + session.delete(hero) + session.commit() + return {"ok": True} diff --git a/docs_src/sql_databases/tutorial001_an_py39.py b/docs_src/sql_databases/tutorial001_an_py39.py new file mode 100644 index 000000000..595892746 --- /dev/null +++ b/docs_src/sql_databases/tutorial001_an_py39.py @@ -0,0 +1,73 @@ +from typing import Annotated, Union + +from fastapi import Depends, FastAPI, HTTPException, Query +from sqlmodel import Field, Session, SQLModel, create_engine, select + + +class Hero(SQLModel, table=True): + id: Union[int, None] = Field(default=None, primary_key=True) + name: str = Field(index=True) + age: Union[int, None] = Field(default=None, index=True) + secret_name: str + + +sqlite_file_name = "database.db" +sqlite_url = f"sqlite:///{sqlite_file_name}" + +connect_args = {"check_same_thread": False} +engine = create_engine(sqlite_url, connect_args=connect_args) + + +def create_db_and_tables(): + SQLModel.metadata.create_all(engine) + + +def get_session(): + with Session(engine) as session: + yield session + + +SessionDep = Annotated[Session, Depends(get_session)] + +app = FastAPI() + + +@app.on_event("startup") +def on_startup(): + create_db_and_tables() + + +@app.post("/heroes/") +def create_hero(hero: Hero, session: SessionDep) -> Hero: + session.add(hero) + session.commit() + session.refresh(hero) + return hero + + +@app.get("/heroes/") +def read_heroes( + session: SessionDep, + offset: int = 0, + limit: Annotated[int, Query(le=100)] = 100, +) -> list[Hero]: + heroes = session.exec(select(Hero).offset(offset).limit(limit)).all() + return heroes + + +@app.get("/heroes/{hero_id}") +def read_hero(hero_id: int, session: SessionDep) -> Hero: + hero = session.get(Hero, hero_id) + if not hero: + raise HTTPException(status_code=404, detail="Hero not found") + return hero + + +@app.delete("/heroes/{hero_id}") +def delete_hero(hero_id: int, session: SessionDep): + hero = session.get(Hero, hero_id) + if not hero: + raise HTTPException(status_code=404, detail="Hero not found") + session.delete(hero) + session.commit() + return {"ok": True} diff --git a/docs_src/sql_databases/tutorial001_py310.py b/docs_src/sql_databases/tutorial001_py310.py new file mode 100644 index 000000000..b58462e6a --- /dev/null +++ b/docs_src/sql_databases/tutorial001_py310.py @@ -0,0 +1,69 @@ +from fastapi import Depends, FastAPI, HTTPException, Query +from sqlmodel import Field, Session, SQLModel, create_engine, select + + +class Hero(SQLModel, table=True): + id: int | None = Field(default=None, primary_key=True) + name: str = Field(index=True) + age: int | None = Field(default=None, index=True) + secret_name: str + + +sqlite_file_name = "database.db" +sqlite_url = f"sqlite:///{sqlite_file_name}" + +connect_args = {"check_same_thread": False} +engine = create_engine(sqlite_url, connect_args=connect_args) + + +def create_db_and_tables(): + SQLModel.metadata.create_all(engine) + + +def get_session(): + with Session(engine) as session: + yield session + + +app = FastAPI() + + +@app.on_event("startup") +def on_startup(): + create_db_and_tables() + + +@app.post("/heroes/") +def create_hero(hero: Hero, session: Session = Depends(get_session)) -> Hero: + session.add(hero) + session.commit() + session.refresh(hero) + return hero + + +@app.get("/heroes/") +def read_heroes( + session: Session = Depends(get_session), + offset: int = 0, + limit: int = Query(default=100, le=100), +) -> list[Hero]: + heroes = session.exec(select(Hero).offset(offset).limit(limit)).all() + return heroes + + +@app.get("/heroes/{hero_id}") +def read_hero(hero_id: int, session: Session = Depends(get_session)) -> Hero: + hero = session.get(Hero, hero_id) + if not hero: + raise HTTPException(status_code=404, detail="Hero not found") + return hero + + +@app.delete("/heroes/{hero_id}") +def delete_hero(hero_id: int, session: Session = Depends(get_session)): + hero = session.get(Hero, hero_id) + if not hero: + raise HTTPException(status_code=404, detail="Hero not found") + session.delete(hero) + session.commit() + return {"ok": True} diff --git a/docs_src/sql_databases/tutorial001_py39.py b/docs_src/sql_databases/tutorial001_py39.py new file mode 100644 index 000000000..410a52d0c --- /dev/null +++ b/docs_src/sql_databases/tutorial001_py39.py @@ -0,0 +1,71 @@ +from typing import Union + +from fastapi import Depends, FastAPI, HTTPException, Query +from sqlmodel import Field, Session, SQLModel, create_engine, select + + +class Hero(SQLModel, table=True): + id: Union[int, None] = Field(default=None, primary_key=True) + name: str = Field(index=True) + age: Union[int, None] = Field(default=None, index=True) + secret_name: str + + +sqlite_file_name = "database.db" +sqlite_url = f"sqlite:///{sqlite_file_name}" + +connect_args = {"check_same_thread": False} +engine = create_engine(sqlite_url, connect_args=connect_args) + + +def create_db_and_tables(): + SQLModel.metadata.create_all(engine) + + +def get_session(): + with Session(engine) as session: + yield session + + +app = FastAPI() + + +@app.on_event("startup") +def on_startup(): + create_db_and_tables() + + +@app.post("/heroes/") +def create_hero(hero: Hero, session: Session = Depends(get_session)) -> Hero: + session.add(hero) + session.commit() + session.refresh(hero) + return hero + + +@app.get("/heroes/") +def read_heroes( + session: Session = Depends(get_session), + offset: int = 0, + limit: int = Query(default=100, le=100), +) -> list[Hero]: + heroes = session.exec(select(Hero).offset(offset).limit(limit)).all() + return heroes + + +@app.get("/heroes/{hero_id}") +def read_hero(hero_id: int, session: Session = Depends(get_session)) -> Hero: + hero = session.get(Hero, hero_id) + if not hero: + raise HTTPException(status_code=404, detail="Hero not found") + return hero + + +@app.delete("/heroes/{hero_id}") +def delete_hero(hero_id: int, session: Session = Depends(get_session)): + hero = session.get(Hero, hero_id) + if not hero: + raise HTTPException(status_code=404, detail="Hero not found") + session.delete(hero) + session.commit() + return {"ok": True} diff --git a/docs_src/sql_databases/tutorial002.py b/docs_src/sql_databases/tutorial002.py new file mode 100644 index 000000000..4350d19c6 --- /dev/null +++ b/docs_src/sql_databases/tutorial002.py @@ -0,0 +1,104 @@ +from typing import List, Union + +from fastapi import Depends, FastAPI, HTTPException, Query +from sqlmodel import Field, Session, SQLModel, create_engine, select + + +class HeroBase(SQLModel): + name: str = Field(index=True) + age: Union[int, None] = Field(default=None, index=True) + + +class Hero(HeroBase, table=True): + id: Union[int, None] = Field(default=None, primary_key=True) + secret_name: str + + +class HeroPublic(HeroBase): + id: int + + +class HeroCreate(HeroBase): + secret_name: str + + +class HeroUpdate(HeroBase): + name: Union[str, None] = None + age: Union[int, None] = None + secret_name: Union[str, None] = None + + +sqlite_file_name = "database.db" +sqlite_url = f"sqlite:///{sqlite_file_name}" + +connect_args = {"check_same_thread": False} +engine = create_engine(sqlite_url, connect_args=connect_args) + + +def create_db_and_tables(): + SQLModel.metadata.create_all(engine) + + +def get_session(): + with Session(engine) as session: + yield session + + +app = FastAPI() + + +@app.on_event("startup") +def on_startup(): + create_db_and_tables() + + +@app.post("/heroes/", response_model=HeroPublic) +def create_hero(hero: HeroCreate, session: Session = Depends(get_session)): + db_hero = Hero.model_validate(hero) + session.add(db_hero) + session.commit() + session.refresh(db_hero) + return db_hero + + +@app.get("/heroes/", response_model=List[HeroPublic]) +def read_heroes( + session: Session = Depends(get_session), + offset: int = 0, + limit: int = Query(default=100, le=100), +): + heroes = session.exec(select(Hero).offset(offset).limit(limit)).all() + return heroes + + +@app.get("/heroes/{hero_id}", response_model=HeroPublic) +def read_hero(hero_id: int, session: Session = Depends(get_session)): + hero = session.get(Hero, hero_id) + if not hero: + raise HTTPException(status_code=404, detail="Hero not found") + return hero + + +@app.patch("/heroes/{hero_id}", response_model=HeroPublic) +def update_hero( + hero_id: int, hero: HeroUpdate, session: Session = Depends(get_session) +): + hero_db = session.get(Hero, hero_id) + if not hero_db: + raise HTTPException(status_code=404, detail="Hero not found") + hero_data = hero.model_dump(exclude_unset=True) + hero_db.sqlmodel_update(hero_data) + session.add(hero_db) + session.commit() + session.refresh(hero_db) + return hero_db + + +@app.delete("/heroes/{hero_id}") +def delete_hero(hero_id: int, session: Session = Depends(get_session)): + hero = session.get(Hero, hero_id) + if not hero: + raise HTTPException(status_code=404, detail="Hero not found") + session.delete(hero) + session.commit() + return {"ok": True} diff --git a/docs_src/sql_databases/tutorial002_an.py b/docs_src/sql_databases/tutorial002_an.py new file mode 100644 index 000000000..15e3d7c3a --- /dev/null +++ b/docs_src/sql_databases/tutorial002_an.py @@ -0,0 +1,104 @@ +from typing import List, Union + +from fastapi import Depends, FastAPI, HTTPException, Query +from sqlmodel import Field, Session, SQLModel, create_engine, select +from typing_extensions import Annotated + + +class HeroBase(SQLModel): + name: str = Field(index=True) + age: Union[int, None] = Field(default=None, index=True) + + +class Hero(HeroBase, table=True): + id: Union[int, None] = Field(default=None, primary_key=True) + secret_name: str + + +class HeroPublic(HeroBase): + id: int + + +class HeroCreate(HeroBase): + secret_name: str + + +class HeroUpdate(HeroBase): + name: Union[str, None] = None + age: Union[int, None] = None + secret_name: Union[str, None] = None + + +sqlite_file_name = "database.db" +sqlite_url = f"sqlite:///{sqlite_file_name}" + +connect_args = {"check_same_thread": False} +engine = create_engine(sqlite_url, connect_args=connect_args) + + +def create_db_and_tables(): + SQLModel.metadata.create_all(engine) + + +def get_session(): + with Session(engine) as session: + yield session + + +SessionDep = Annotated[Session, Depends(get_session)] +app = FastAPI() + + +@app.on_event("startup") +def on_startup(): + create_db_and_tables() + + +@app.post("/heroes/", response_model=HeroPublic) +def create_hero(hero: HeroCreate, session: SessionDep): + db_hero = Hero.model_validate(hero) + session.add(db_hero) + session.commit() + session.refresh(db_hero) + return db_hero + + +@app.get("/heroes/", response_model=List[HeroPublic]) +def read_heroes( + session: SessionDep, + offset: int = 0, + limit: Annotated[int, Query(le=100)] = 100, +): + heroes = session.exec(select(Hero).offset(offset).limit(limit)).all() + return heroes + + +@app.get("/heroes/{hero_id}", response_model=HeroPublic) +def read_hero(hero_id: int, session: SessionDep): + hero = session.get(Hero, hero_id) + if not hero: + raise HTTPException(status_code=404, detail="Hero not found") + return hero + + +@app.patch("/heroes/{hero_id}", response_model=HeroPublic) +def update_hero(hero_id: int, hero: HeroUpdate, session: SessionDep): + hero_db = session.get(Hero, hero_id) + if not hero_db: + raise HTTPException(status_code=404, detail="Hero not found") + hero_data = hero.model_dump(exclude_unset=True) + hero_db.sqlmodel_update(hero_data) + session.add(hero_db) + session.commit() + session.refresh(hero_db) + return hero_db + + +@app.delete("/heroes/{hero_id}") +def delete_hero(hero_id: int, session: SessionDep): + hero = session.get(Hero, hero_id) + if not hero: + raise HTTPException(status_code=404, detail="Hero not found") + session.delete(hero) + session.commit() + return {"ok": True} diff --git a/docs_src/sql_databases/tutorial002_an_py310.py b/docs_src/sql_databases/tutorial002_an_py310.py new file mode 100644 index 000000000..64c554b8a --- /dev/null +++ b/docs_src/sql_databases/tutorial002_an_py310.py @@ -0,0 +1,103 @@ +from typing import Annotated + +from fastapi import Depends, FastAPI, HTTPException, Query +from sqlmodel import Field, Session, SQLModel, create_engine, select + + +class HeroBase(SQLModel): + name: str = Field(index=True) + age: int | None = Field(default=None, index=True) + + +class Hero(HeroBase, table=True): + id: int | None = Field(default=None, primary_key=True) + secret_name: str + + +class HeroPublic(HeroBase): + id: int + + +class HeroCreate(HeroBase): + secret_name: str + + +class HeroUpdate(HeroBase): + name: str | None = None + age: int | None = None + secret_name: str | None = None + + +sqlite_file_name = "database.db" +sqlite_url = f"sqlite:///{sqlite_file_name}" + +connect_args = {"check_same_thread": False} +engine = create_engine(sqlite_url, connect_args=connect_args) + + +def create_db_and_tables(): + SQLModel.metadata.create_all(engine) + + +def get_session(): + with Session(engine) as session: + yield session + + +SessionDep = Annotated[Session, Depends(get_session)] +app = FastAPI() + + +@app.on_event("startup") +def on_startup(): + create_db_and_tables() + + +@app.post("/heroes/", response_model=HeroPublic) +def create_hero(hero: HeroCreate, session: SessionDep): + db_hero = Hero.model_validate(hero) + session.add(db_hero) + session.commit() + session.refresh(db_hero) + return db_hero + + +@app.get("/heroes/", response_model=list[HeroPublic]) +def read_heroes( + session: SessionDep, + offset: int = 0, + limit: Annotated[int, Query(le=100)] = 100, +): + heroes = session.exec(select(Hero).offset(offset).limit(limit)).all() + return heroes + + +@app.get("/heroes/{hero_id}", response_model=HeroPublic) +def read_hero(hero_id: int, session: SessionDep): + hero = session.get(Hero, hero_id) + if not hero: + raise HTTPException(status_code=404, detail="Hero not found") + return hero + + +@app.patch("/heroes/{hero_id}", response_model=HeroPublic) +def update_hero(hero_id: int, hero: HeroUpdate, session: SessionDep): + hero_db = session.get(Hero, hero_id) + if not hero_db: + raise HTTPException(status_code=404, detail="Hero not found") + hero_data = hero.model_dump(exclude_unset=True) + hero_db.sqlmodel_update(hero_data) + session.add(hero_db) + session.commit() + session.refresh(hero_db) + return hero_db + + +@app.delete("/heroes/{hero_id}") +def delete_hero(hero_id: int, session: SessionDep): + hero = session.get(Hero, hero_id) + if not hero: + raise HTTPException(status_code=404, detail="Hero not found") + session.delete(hero) + session.commit() + return {"ok": True} diff --git a/docs_src/sql_databases/tutorial002_an_py39.py b/docs_src/sql_databases/tutorial002_an_py39.py new file mode 100644 index 000000000..a8a0721ff --- /dev/null +++ b/docs_src/sql_databases/tutorial002_an_py39.py @@ -0,0 +1,103 @@ +from typing import Annotated, Union + +from fastapi import Depends, FastAPI, HTTPException, Query +from sqlmodel import Field, Session, SQLModel, create_engine, select + + +class HeroBase(SQLModel): + name: str = Field(index=True) + age: Union[int, None] = Field(default=None, index=True) + + +class Hero(HeroBase, table=True): + id: Union[int, None] = Field(default=None, primary_key=True) + secret_name: str + + +class HeroPublic(HeroBase): + id: int + + +class HeroCreate(HeroBase): + secret_name: str + + +class HeroUpdate(HeroBase): + name: Union[str, None] = None + age: Union[int, None] = None + secret_name: Union[str, None] = None + + +sqlite_file_name = "database.db" +sqlite_url = f"sqlite:///{sqlite_file_name}" + +connect_args = {"check_same_thread": False} +engine = create_engine(sqlite_url, connect_args=connect_args) + + +def create_db_and_tables(): + SQLModel.metadata.create_all(engine) + + +def get_session(): + with Session(engine) as session: + yield session + + +SessionDep = Annotated[Session, Depends(get_session)] +app = FastAPI() + + +@app.on_event("startup") +def on_startup(): + create_db_and_tables() + + +@app.post("/heroes/", response_model=HeroPublic) +def create_hero(hero: HeroCreate, session: SessionDep): + db_hero = Hero.model_validate(hero) + session.add(db_hero) + session.commit() + session.refresh(db_hero) + return db_hero + + +@app.get("/heroes/", response_model=list[HeroPublic]) +def read_heroes( + session: SessionDep, + offset: int = 0, + limit: Annotated[int, Query(le=100)] = 100, +): + heroes = session.exec(select(Hero).offset(offset).limit(limit)).all() + return heroes + + +@app.get("/heroes/{hero_id}", response_model=HeroPublic) +def read_hero(hero_id: int, session: SessionDep): + hero = session.get(Hero, hero_id) + if not hero: + raise HTTPException(status_code=404, detail="Hero not found") + return hero + + +@app.patch("/heroes/{hero_id}", response_model=HeroPublic) +def update_hero(hero_id: int, hero: HeroUpdate, session: SessionDep): + hero_db = session.get(Hero, hero_id) + if not hero_db: + raise HTTPException(status_code=404, detail="Hero not found") + hero_data = hero.model_dump(exclude_unset=True) + hero_db.sqlmodel_update(hero_data) + session.add(hero_db) + session.commit() + session.refresh(hero_db) + return hero_db + + +@app.delete("/heroes/{hero_id}") +def delete_hero(hero_id: int, session: SessionDep): + hero = session.get(Hero, hero_id) + if not hero: + raise HTTPException(status_code=404, detail="Hero not found") + session.delete(hero) + session.commit() + return {"ok": True} diff --git a/docs_src/sql_databases/tutorial002_py310.py b/docs_src/sql_databases/tutorial002_py310.py new file mode 100644 index 000000000..ec3d68db5 --- /dev/null +++ b/docs_src/sql_databases/tutorial002_py310.py @@ -0,0 +1,102 @@ +from fastapi import Depends, FastAPI, HTTPException, Query +from sqlmodel import Field, Session, SQLModel, create_engine, select + + +class HeroBase(SQLModel): + name: str = Field(index=True) + age: int | None = Field(default=None, index=True) + + +class Hero(HeroBase, table=True): + id: int | None = Field(default=None, primary_key=True) + secret_name: str + + +class HeroPublic(HeroBase): + id: int + + +class HeroCreate(HeroBase): + secret_name: str + + +class HeroUpdate(HeroBase): + name: str | None = None + age: int | None = None + secret_name: str | None = None + + +sqlite_file_name = "database.db" +sqlite_url = f"sqlite:///{sqlite_file_name}" + +connect_args = {"check_same_thread": False} +engine = create_engine(sqlite_url, connect_args=connect_args) + + +def create_db_and_tables(): + SQLModel.metadata.create_all(engine) + + +def get_session(): + with Session(engine) as session: + yield session + + +app = FastAPI() + + +@app.on_event("startup") +def on_startup(): + create_db_and_tables() + + +@app.post("/heroes/", response_model=HeroPublic) +def create_hero(hero: HeroCreate, session: Session = Depends(get_session)): + db_hero = Hero.model_validate(hero) + session.add(db_hero) + session.commit() + session.refresh(db_hero) + return db_hero + + +@app.get("/heroes/", response_model=list[HeroPublic]) +def read_heroes( + session: Session = Depends(get_session), + offset: int = 0, + limit: int = Query(default=100, le=100), +): + heroes = session.exec(select(Hero).offset(offset).limit(limit)).all() + return heroes + + +@app.get("/heroes/{hero_id}", response_model=HeroPublic) +def read_hero(hero_id: int, session: Session = Depends(get_session)): + hero = session.get(Hero, hero_id) + if not hero: + raise HTTPException(status_code=404, detail="Hero not found") + return hero + + +@app.patch("/heroes/{hero_id}", response_model=HeroPublic) +def update_hero( + hero_id: int, hero: HeroUpdate, session: Session = Depends(get_session) +): + hero_db = session.get(Hero, hero_id) + if not hero_db: + raise HTTPException(status_code=404, detail="Hero not found") + hero_data = hero.model_dump(exclude_unset=True) + hero_db.sqlmodel_update(hero_data) + session.add(hero_db) + session.commit() + session.refresh(hero_db) + return hero_db + + +@app.delete("/heroes/{hero_id}") +def delete_hero(hero_id: int, session: Session = Depends(get_session)): + hero = session.get(Hero, hero_id) + if not hero: + raise HTTPException(status_code=404, detail="Hero not found") + session.delete(hero) + session.commit() + return {"ok": True} diff --git a/docs_src/sql_databases/tutorial002_py39.py b/docs_src/sql_databases/tutorial002_py39.py new file mode 100644 index 000000000..d8f5dd090 --- /dev/null +++ b/docs_src/sql_databases/tutorial002_py39.py @@ -0,0 +1,104 @@ +from typing import Union + +from fastapi import Depends, FastAPI, HTTPException, Query +from sqlmodel import Field, Session, SQLModel, create_engine, select + + +class HeroBase(SQLModel): + name: str = Field(index=True) + age: Union[int, None] = Field(default=None, index=True) + + +class Hero(HeroBase, table=True): + id: Union[int, None] = Field(default=None, primary_key=True) + secret_name: str + + +class HeroPublic(HeroBase): + id: int + + +class HeroCreate(HeroBase): + secret_name: str + + +class HeroUpdate(HeroBase): + name: Union[str, None] = None + age: Union[int, None] = None + secret_name: Union[str, None] = None + + +sqlite_file_name = "database.db" +sqlite_url = f"sqlite:///{sqlite_file_name}" + +connect_args = {"check_same_thread": False} +engine = create_engine(sqlite_url, connect_args=connect_args) + + +def create_db_and_tables(): + SQLModel.metadata.create_all(engine) + + +def get_session(): + with Session(engine) as session: + yield session + + +app = FastAPI() + + +@app.on_event("startup") +def on_startup(): + create_db_and_tables() + + +@app.post("/heroes/", response_model=HeroPublic) +def create_hero(hero: HeroCreate, session: Session = Depends(get_session)): + db_hero = Hero.model_validate(hero) + session.add(db_hero) + session.commit() + session.refresh(db_hero) + return db_hero + + +@app.get("/heroes/", response_model=list[HeroPublic]) +def read_heroes( + session: Session = Depends(get_session), + offset: int = 0, + limit: int = Query(default=100, le=100), +): + heroes = session.exec(select(Hero).offset(offset).limit(limit)).all() + return heroes + + +@app.get("/heroes/{hero_id}", response_model=HeroPublic) +def read_hero(hero_id: int, session: Session = Depends(get_session)): + hero = session.get(Hero, hero_id) + if not hero: + raise HTTPException(status_code=404, detail="Hero not found") + return hero + + +@app.patch("/heroes/{hero_id}", response_model=HeroPublic) +def update_hero( + hero_id: int, hero: HeroUpdate, session: Session = Depends(get_session) +): + hero_db = session.get(Hero, hero_id) + if not hero_db: + raise HTTPException(status_code=404, detail="Hero not found") + hero_data = hero.model_dump(exclude_unset=True) + hero_db.sqlmodel_update(hero_data) + session.add(hero_db) + session.commit() + session.refresh(hero_db) + return hero_db + + +@app.delete("/heroes/{hero_id}") +def delete_hero(hero_id: int, session: Session = Depends(get_session)): + hero = session.get(Hero, hero_id) + if not hero: + raise HTTPException(status_code=404, detail="Hero not found") + session.delete(hero) + session.commit() + return {"ok": True} diff --git a/requirements-docs.txt b/requirements-docs.txt index c05bd51e3..1639159af 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -16,4 +16,4 @@ griffe-typingdoc==0.2.7 # For griffe, it formats with black black==24.3.0 mkdocs-macros-plugin==1.0.5 -markdown-include-variants==0.0.1 +markdown-include-variants==0.0.3 diff --git a/requirements-tests.txt b/requirements-tests.txt index 7b1f7ea1a..189fcaf7e 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -4,10 +4,7 @@ pytest >=7.1.3,<8.0.0 coverage[toml] >= 6.5.0,< 8.0 mypy ==1.8.0 dirty-equals ==0.6.0 -# TODO: once removing databases from tutorial, upgrade SQLAlchemy -# probably when including SQLModel -sqlalchemy >=1.3.18,<2.0.33 -databases[sqlite] >=0.3.2,<0.7.0 +sqlmodel==0.0.22 flask >=1.1.2,<3.0.0 anyio[trio] >=3.2.1,<4.0.0 PyJWT==2.8.0 diff --git a/scripts/playwright/sql_databases/image01.py b/scripts/playwright/sql_databases/image01.py new file mode 100644 index 000000000..0dd6f2514 --- /dev/null +++ b/scripts/playwright/sql_databases/image01.py @@ -0,0 +1,37 @@ +import subprocess +import time + +import httpx +from playwright.sync_api import Playwright, sync_playwright + + +# Run playwright codegen to generate the code below, copy paste the sections in run() +def run(playwright: Playwright) -> None: + browser = playwright.chromium.launch(headless=False) + # Update the viewport manually + context = browser.new_context(viewport={"width": 960, "height": 1080}) + page = context.new_page() + page.goto("http://localhost:8000/docs") + page.get_by_label("post /heroes/").click() + # Manually add the screenshot + page.screenshot(path="docs/en/docs/img/tutorial/sql-databases/image01.png") + + # --------------------- + context.close() + browser.close() + + +process = subprocess.Popen( + ["fastapi", "run", "docs_src/sql_databases/tutorial001.py"], +) +try: + for _ in range(3): + try: + response = httpx.get("http://localhost:8000/docs") + except httpx.ConnectError: + time.sleep(1) + break + with sync_playwright() as playwright: + run(playwright) +finally: + process.terminate() diff --git a/scripts/playwright/sql_databases/image02.py b/scripts/playwright/sql_databases/image02.py new file mode 100644 index 000000000..6c4f685e8 --- /dev/null +++ b/scripts/playwright/sql_databases/image02.py @@ -0,0 +1,37 @@ +import subprocess +import time + +import httpx +from playwright.sync_api import Playwright, sync_playwright + + +# Run playwright codegen to generate the code below, copy paste the sections in run() +def run(playwright: Playwright) -> None: + browser = playwright.chromium.launch(headless=False) + # Update the viewport manually + context = browser.new_context(viewport={"width": 960, "height": 1080}) + page = context.new_page() + page.goto("http://localhost:8000/docs") + page.get_by_label("post /heroes/").click() + # Manually add the screenshot + page.screenshot(path="docs/en/docs/img/tutorial/sql-databases/image02.png") + + # --------------------- + context.close() + browser.close() + + +process = subprocess.Popen( + ["fastapi", "run", "docs_src/sql_databases/tutorial002.py"], +) +try: + for _ in range(3): + try: + response = httpx.get("http://localhost:8000/docs") + except httpx.ConnectError: + time.sleep(1) + break + with sync_playwright() as playwright: + run(playwright) +finally: + process.terminate() diff --git a/tests/test_tutorial/test_async_sql_databases/__init__.py b/tests/test_tutorial/test_async_sql_databases/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/test_tutorial/test_async_sql_databases/test_tutorial001.py b/tests/test_tutorial/test_async_sql_databases/test_tutorial001.py deleted file mode 100644 index 13568a532..000000000 --- a/tests/test_tutorial/test_async_sql_databases/test_tutorial001.py +++ /dev/null @@ -1,146 +0,0 @@ -import pytest -from fastapi import FastAPI -from fastapi.testclient import TestClient - -from ...utils import needs_pydanticv1 - - -@pytest.fixture(name="app", scope="module") -def get_app(): - with pytest.warns(DeprecationWarning): - from docs_src.async_sql_databases.tutorial001 import app - yield app - - -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_create_read(app: FastAPI): - with TestClient(app) as client: - note = {"text": "Foo bar", "completed": False} - response = client.post("/notes/", json=note) - assert response.status_code == 200, response.text - data = response.json() - assert data["text"] == note["text"] - assert data["completed"] == note["completed"] - assert "id" in data - response = client.get("/notes/") - assert response.status_code == 200, response.text - assert data in response.json() - - -def test_openapi_schema(app: FastAPI): - with TestClient(app) as client: - response = client.get("/openapi.json") - assert response.status_code == 200, response.text - assert response.json() == { - "openapi": "3.1.0", - "info": {"title": "FastAPI", "version": "0.1.0"}, - "paths": { - "/notes/": { - "get": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Read Notes Notes Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/Note" - }, - } - } - }, - } - }, - "summary": "Read Notes", - "operationId": "read_notes_notes__get", - }, - "post": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/Note"} - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Create Note", - "operationId": "create_note_notes__post", - "requestBody": { - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/NoteIn"} - } - }, - "required": True, - }, - }, - } - }, - "components": { - "schemas": { - "NoteIn": { - "title": "NoteIn", - "required": ["text", "completed"], - "type": "object", - "properties": { - "text": {"title": "Text", "type": "string"}, - "completed": {"title": "Completed", "type": "boolean"}, - }, - }, - "Note": { - "title": "Note", - "required": ["id", "text", "completed"], - "type": "object", - "properties": { - "id": {"title": "Id", "type": "integer"}, - "text": {"title": "Text", "type": "string"}, - "completed": {"title": "Completed", "type": "boolean"}, - }, - }, - "ValidationError": { - "title": "ValidationError", - "required": ["loc", "msg", "type"], - "type": "object", - "properties": { - "loc": { - "title": "Location", - "type": "array", - "items": { - "anyOf": [{"type": "string"}, {"type": "integer"}] - }, - }, - "msg": {"title": "Message", "type": "string"}, - "type": {"title": "Error Type", "type": "string"}, - }, - }, - "HTTPValidationError": { - "title": "HTTPValidationError", - "type": "object", - "properties": { - "detail": { - "title": "Detail", - "type": "array", - "items": { - "$ref": "#/components/schemas/ValidationError" - }, - } - }, - }, - } - }, - } diff --git a/tests/test_tutorial/test_sql_databases/test_sql_databases.py b/tests/test_tutorial/test_sql_databases/test_sql_databases.py deleted file mode 100644 index e3e2b36a8..000000000 --- a/tests/test_tutorial/test_sql_databases/test_sql_databases.py +++ /dev/null @@ -1,419 +0,0 @@ -import importlib -import os -from pathlib import Path - -import pytest -from dirty_equals import IsDict -from fastapi.testclient import TestClient - -from ...utils import needs_pydanticv1 - - -@pytest.fixture(scope="module") -def client(tmp_path_factory: pytest.TempPathFactory): - tmp_path = tmp_path_factory.mktemp("data") - cwd = os.getcwd() - os.chdir(tmp_path) - test_db = Path("./sql_app.db") - if test_db.is_file(): # pragma: nocover - test_db.unlink() - # Import while creating the client to create the DB after starting the test session - from docs_src.sql_databases.sql_app import main - - # Ensure import side effects are re-executed - importlib.reload(main) - with TestClient(main.app) as c: - yield c - if test_db.is_file(): # pragma: nocover - test_db.unlink() - os.chdir(cwd) - - -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_create_user(client): - test_user = {"email": "johndoe@example.com", "password": "secret"} - response = client.post("/users/", json=test_user) - assert response.status_code == 200, response.text - data = response.json() - assert test_user["email"] == data["email"] - assert "id" in data - response = client.post("/users/", json=test_user) - assert response.status_code == 400, response.text - - -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_get_user(client): - response = client.get("/users/1") - assert response.status_code == 200, response.text - data = response.json() - assert "email" in data - assert "id" in data - - -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_nonexistent_user(client): - response = client.get("/users/999") - assert response.status_code == 404, response.text - - -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_get_users(client): - response = client.get("/users/") - assert response.status_code == 200, response.text - data = response.json() - assert "email" in data[0] - assert "id" in data[0] - - -# TODO: pv2 add Pydantic v2 version -@needs_pydanticv1 -def test_create_item(client): - item = {"title": "Foo", "description": "Something that fights"} - response = client.post("/users/1/items/", json=item) - assert response.status_code == 200, response.text - item_data = response.json() - assert item["title"] == item_data["title"] - assert item["description"] == item_data["description"] - assert "id" in item_data - assert "owner_id" in item_data - response = client.get("/users/1") - assert response.status_code == 200, response.text - user_data = response.json() - item_to_check = [it for it in user_data["items"] if it["id"] == item_data["id"]][0] - assert item_to_check["title"] == item["title"] - assert item_to_check["description"] == item["description"] - - -# TODO: pv2 add Pydantic v2 version -@needs_pydanticv1 -def test_read_items(client): - response = client.get("/items/") - assert response.status_code == 200, response.text - data = response.json() - assert data - first_item = data[0] - assert "title" in first_item - assert "description" in first_item - - -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_openapi_schema(client: TestClient): - response = client.get("/openapi.json") - assert response.status_code == 200, response.text - assert response.json() == { - "openapi": "3.1.0", - "info": {"title": "FastAPI", "version": "0.1.0"}, - "paths": { - "/users/": { - "get": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Read Users Users Get", - "type": "array", - "items": {"$ref": "#/components/schemas/User"}, - } - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Read Users", - "operationId": "read_users_users__get", - "parameters": [ - { - "required": False, - "schema": { - "title": "Skip", - "type": "integer", - "default": 0, - }, - "name": "skip", - "in": "query", - }, - { - "required": False, - "schema": { - "title": "Limit", - "type": "integer", - "default": 100, - }, - "name": "limit", - "in": "query", - }, - ], - }, - "post": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/User"} - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Create User", - "operationId": "create_user_users__post", - "requestBody": { - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/UserCreate"} - } - }, - "required": True, - }, - }, - }, - "/users/{user_id}": { - "get": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/User"} - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Read User", - "operationId": "read_user_users__user_id__get", - "parameters": [ - { - "required": True, - "schema": {"title": "User Id", "type": "integer"}, - "name": "user_id", - "in": "path", - } - ], - } - }, - "/users/{user_id}/items/": { - "post": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/Item"} - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Create Item For User", - "operationId": "create_item_for_user_users__user_id__items__post", - "parameters": [ - { - "required": True, - "schema": {"title": "User Id", "type": "integer"}, - "name": "user_id", - "in": "path", - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/ItemCreate"} - } - }, - "required": True, - }, - } - }, - "/items/": { - "get": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Read Items Items Get", - "type": "array", - "items": {"$ref": "#/components/schemas/Item"}, - } - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Read Items", - "operationId": "read_items_items__get", - "parameters": [ - { - "required": False, - "schema": { - "title": "Skip", - "type": "integer", - "default": 0, - }, - "name": "skip", - "in": "query", - }, - { - "required": False, - "schema": { - "title": "Limit", - "type": "integer", - "default": 100, - }, - "name": "limit", - "in": "query", - }, - ], - } - }, - }, - "components": { - "schemas": { - "ItemCreate": { - "title": "ItemCreate", - "required": ["title"], - "type": "object", - "properties": { - "title": {"title": "Title", "type": "string"}, - "description": IsDict( - { - "title": "Description", - "anyOf": [{"type": "string"}, {"type": "null"}], - } - ) - | IsDict( - # TODO: remove when deprecating Pydantic v1 - {"title": "Description", "type": "string"} - ), - }, - }, - "Item": { - "title": "Item", - "required": ["title", "id", "owner_id"], - "type": "object", - "properties": { - "title": {"title": "Title", "type": "string"}, - "description": IsDict( - { - "title": "Description", - "anyOf": [{"type": "string"}, {"type": "null"}], - } - ) - | IsDict( - # TODO: remove when deprecating Pydantic v1 - {"title": "Description", "type": "string"}, - ), - "id": {"title": "Id", "type": "integer"}, - "owner_id": {"title": "Owner Id", "type": "integer"}, - }, - }, - "User": { - "title": "User", - "required": ["email", "id", "is_active"], - "type": "object", - "properties": { - "email": {"title": "Email", "type": "string"}, - "id": {"title": "Id", "type": "integer"}, - "is_active": {"title": "Is Active", "type": "boolean"}, - "items": { - "title": "Items", - "type": "array", - "items": {"$ref": "#/components/schemas/Item"}, - "default": [], - }, - }, - }, - "UserCreate": { - "title": "UserCreate", - "required": ["email", "password"], - "type": "object", - "properties": { - "email": {"title": "Email", "type": "string"}, - "password": {"title": "Password", "type": "string"}, - }, - }, - "ValidationError": { - "title": "ValidationError", - "required": ["loc", "msg", "type"], - "type": "object", - "properties": { - "loc": { - "title": "Location", - "type": "array", - "items": { - "anyOf": [{"type": "string"}, {"type": "integer"}] - }, - }, - "msg": {"title": "Message", "type": "string"}, - "type": {"title": "Error Type", "type": "string"}, - }, - }, - "HTTPValidationError": { - "title": "HTTPValidationError", - "type": "object", - "properties": { - "detail": { - "title": "Detail", - "type": "array", - "items": {"$ref": "#/components/schemas/ValidationError"}, - } - }, - }, - } - }, - } diff --git a/tests/test_tutorial/test_sql_databases/test_sql_databases_middleware.py b/tests/test_tutorial/test_sql_databases/test_sql_databases_middleware.py deleted file mode 100644 index 73b97e09d..000000000 --- a/tests/test_tutorial/test_sql_databases/test_sql_databases_middleware.py +++ /dev/null @@ -1,421 +0,0 @@ -import importlib -from pathlib import Path - -import pytest -from dirty_equals import IsDict -from fastapi.testclient import TestClient - -from ...utils import needs_pydanticv1 - - -@pytest.fixture(scope="module") -def client(): - test_db = Path("./sql_app.db") - if test_db.is_file(): # pragma: nocover - test_db.unlink() - # Import while creating the client to create the DB after starting the test session - from docs_src.sql_databases.sql_app import alt_main - - # Ensure import side effects are re-executed - importlib.reload(alt_main) - - with TestClient(alt_main.app) as c: - yield c - if test_db.is_file(): # pragma: nocover - test_db.unlink() - - -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_create_user(client): - test_user = {"email": "johndoe@example.com", "password": "secret"} - response = client.post("/users/", json=test_user) - assert response.status_code == 200, response.text - data = response.json() - assert test_user["email"] == data["email"] - assert "id" in data - response = client.post("/users/", json=test_user) - assert response.status_code == 400, response.text - - -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_get_user(client): - response = client.get("/users/1") - assert response.status_code == 200, response.text - data = response.json() - assert "email" in data - assert "id" in data - - -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_nonexistent_user(client): - response = client.get("/users/999") - assert response.status_code == 404, response.text - - -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_get_users(client): - response = client.get("/users/") - assert response.status_code == 200, response.text - data = response.json() - assert "email" in data[0] - assert "id" in data[0] - - -# TODO: pv2 add Pydantic v2 version -@needs_pydanticv1 -def test_create_item(client): - item = {"title": "Foo", "description": "Something that fights"} - response = client.post("/users/1/items/", json=item) - assert response.status_code == 200, response.text - item_data = response.json() - assert item["title"] == item_data["title"] - assert item["description"] == item_data["description"] - assert "id" in item_data - assert "owner_id" in item_data - response = client.get("/users/1") - assert response.status_code == 200, response.text - user_data = response.json() - item_to_check = [it for it in user_data["items"] if it["id"] == item_data["id"]][0] - assert item_to_check["title"] == item["title"] - assert item_to_check["description"] == item["description"] - response = client.get("/users/1") - assert response.status_code == 200, response.text - user_data = response.json() - item_to_check = [it for it in user_data["items"] if it["id"] == item_data["id"]][0] - assert item_to_check["title"] == item["title"] - assert item_to_check["description"] == item["description"] - - -# TODO: pv2 add Pydantic v2 version -@needs_pydanticv1 -def test_read_items(client): - response = client.get("/items/") - assert response.status_code == 200, response.text - data = response.json() - assert data - first_item = data[0] - assert "title" in first_item - assert "description" in first_item - - -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_openapi_schema(client: TestClient): - response = client.get("/openapi.json") - assert response.status_code == 200, response.text - assert response.json() == { - "openapi": "3.1.0", - "info": {"title": "FastAPI", "version": "0.1.0"}, - "paths": { - "/users/": { - "get": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Read Users Users Get", - "type": "array", - "items": {"$ref": "#/components/schemas/User"}, - } - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Read Users", - "operationId": "read_users_users__get", - "parameters": [ - { - "required": False, - "schema": { - "title": "Skip", - "type": "integer", - "default": 0, - }, - "name": "skip", - "in": "query", - }, - { - "required": False, - "schema": { - "title": "Limit", - "type": "integer", - "default": 100, - }, - "name": "limit", - "in": "query", - }, - ], - }, - "post": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/User"} - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Create User", - "operationId": "create_user_users__post", - "requestBody": { - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/UserCreate"} - } - }, - "required": True, - }, - }, - }, - "/users/{user_id}": { - "get": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/User"} - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Read User", - "operationId": "read_user_users__user_id__get", - "parameters": [ - { - "required": True, - "schema": {"title": "User Id", "type": "integer"}, - "name": "user_id", - "in": "path", - } - ], - } - }, - "/users/{user_id}/items/": { - "post": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/Item"} - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Create Item For User", - "operationId": "create_item_for_user_users__user_id__items__post", - "parameters": [ - { - "required": True, - "schema": {"title": "User Id", "type": "integer"}, - "name": "user_id", - "in": "path", - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/ItemCreate"} - } - }, - "required": True, - }, - } - }, - "/items/": { - "get": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Read Items Items Get", - "type": "array", - "items": {"$ref": "#/components/schemas/Item"}, - } - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Read Items", - "operationId": "read_items_items__get", - "parameters": [ - { - "required": False, - "schema": { - "title": "Skip", - "type": "integer", - "default": 0, - }, - "name": "skip", - "in": "query", - }, - { - "required": False, - "schema": { - "title": "Limit", - "type": "integer", - "default": 100, - }, - "name": "limit", - "in": "query", - }, - ], - } - }, - }, - "components": { - "schemas": { - "ItemCreate": { - "title": "ItemCreate", - "required": ["title"], - "type": "object", - "properties": { - "title": {"title": "Title", "type": "string"}, - "description": IsDict( - { - "title": "Description", - "anyOf": [{"type": "string"}, {"type": "null"}], - } - ) - | IsDict( - # TODO: remove when deprecating Pydantic v1 - {"title": "Description", "type": "string"} - ), - }, - }, - "Item": { - "title": "Item", - "required": ["title", "id", "owner_id"], - "type": "object", - "properties": { - "title": {"title": "Title", "type": "string"}, - "description": IsDict( - { - "title": "Description", - "anyOf": [{"type": "string"}, {"type": "null"}], - } - ) - | IsDict( - # TODO: remove when deprecating Pydantic v1 - {"title": "Description", "type": "string"}, - ), - "id": {"title": "Id", "type": "integer"}, - "owner_id": {"title": "Owner Id", "type": "integer"}, - }, - }, - "User": { - "title": "User", - "required": ["email", "id", "is_active"], - "type": "object", - "properties": { - "email": {"title": "Email", "type": "string"}, - "id": {"title": "Id", "type": "integer"}, - "is_active": {"title": "Is Active", "type": "boolean"}, - "items": { - "title": "Items", - "type": "array", - "items": {"$ref": "#/components/schemas/Item"}, - "default": [], - }, - }, - }, - "UserCreate": { - "title": "UserCreate", - "required": ["email", "password"], - "type": "object", - "properties": { - "email": {"title": "Email", "type": "string"}, - "password": {"title": "Password", "type": "string"}, - }, - }, - "ValidationError": { - "title": "ValidationError", - "required": ["loc", "msg", "type"], - "type": "object", - "properties": { - "loc": { - "title": "Location", - "type": "array", - "items": { - "anyOf": [{"type": "string"}, {"type": "integer"}] - }, - }, - "msg": {"title": "Message", "type": "string"}, - "type": {"title": "Error Type", "type": "string"}, - }, - }, - "HTTPValidationError": { - "title": "HTTPValidationError", - "type": "object", - "properties": { - "detail": { - "title": "Detail", - "type": "array", - "items": {"$ref": "#/components/schemas/ValidationError"}, - } - }, - }, - } - }, - } diff --git a/tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py310.py b/tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py310.py deleted file mode 100644 index a078f012a..000000000 --- a/tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py310.py +++ /dev/null @@ -1,433 +0,0 @@ -import importlib -import os -from pathlib import Path - -import pytest -from dirty_equals import IsDict -from fastapi.testclient import TestClient - -from ...utils import needs_py310, needs_pydanticv1 - - -@pytest.fixture(scope="module") -def client(tmp_path_factory: pytest.TempPathFactory): - tmp_path = tmp_path_factory.mktemp("data") - cwd = os.getcwd() - os.chdir(tmp_path) - test_db = Path("./sql_app.db") - if test_db.is_file(): # pragma: nocover - test_db.unlink() - # Import while creating the client to create the DB after starting the test session - from docs_src.sql_databases.sql_app_py310 import alt_main - - # Ensure import side effects are re-executed - importlib.reload(alt_main) - - with TestClient(alt_main.app) as c: - yield c - if test_db.is_file(): # pragma: nocover - test_db.unlink() - os.chdir(cwd) - - -@needs_py310 -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_create_user(client): - test_user = {"email": "johndoe@example.com", "password": "secret"} - response = client.post("/users/", json=test_user) - assert response.status_code == 200, response.text - data = response.json() - assert test_user["email"] == data["email"] - assert "id" in data - response = client.post("/users/", json=test_user) - assert response.status_code == 400, response.text - - -@needs_py310 -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_get_user(client): - response = client.get("/users/1") - assert response.status_code == 200, response.text - data = response.json() - assert "email" in data - assert "id" in data - - -@needs_py310 -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_nonexistent_user(client): - response = client.get("/users/999") - assert response.status_code == 404, response.text - - -@needs_py310 -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_get_users(client): - response = client.get("/users/") - assert response.status_code == 200, response.text - data = response.json() - assert "email" in data[0] - assert "id" in data[0] - - -@needs_py310 -# TODO: pv2 add Pydantic v2 version -@needs_pydanticv1 -def test_create_item(client): - item = {"title": "Foo", "description": "Something that fights"} - response = client.post("/users/1/items/", json=item) - assert response.status_code == 200, response.text - item_data = response.json() - assert item["title"] == item_data["title"] - assert item["description"] == item_data["description"] - assert "id" in item_data - assert "owner_id" in item_data - response = client.get("/users/1") - assert response.status_code == 200, response.text - user_data = response.json() - item_to_check = [it for it in user_data["items"] if it["id"] == item_data["id"]][0] - assert item_to_check["title"] == item["title"] - assert item_to_check["description"] == item["description"] - response = client.get("/users/1") - assert response.status_code == 200, response.text - user_data = response.json() - item_to_check = [it for it in user_data["items"] if it["id"] == item_data["id"]][0] - assert item_to_check["title"] == item["title"] - assert item_to_check["description"] == item["description"] - - -@needs_py310 -# TODO: pv2 add Pydantic v2 version -@needs_pydanticv1 -def test_read_items(client): - response = client.get("/items/") - assert response.status_code == 200, response.text - data = response.json() - assert data - first_item = data[0] - assert "title" in first_item - assert "description" in first_item - - -@needs_py310 -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_openapi_schema(client: TestClient): - response = client.get("/openapi.json") - assert response.status_code == 200, response.text - assert response.json() == { - "openapi": "3.1.0", - "info": {"title": "FastAPI", "version": "0.1.0"}, - "paths": { - "/users/": { - "get": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Read Users Users Get", - "type": "array", - "items": {"$ref": "#/components/schemas/User"}, - } - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Read Users", - "operationId": "read_users_users__get", - "parameters": [ - { - "required": False, - "schema": { - "title": "Skip", - "type": "integer", - "default": 0, - }, - "name": "skip", - "in": "query", - }, - { - "required": False, - "schema": { - "title": "Limit", - "type": "integer", - "default": 100, - }, - "name": "limit", - "in": "query", - }, - ], - }, - "post": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/User"} - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Create User", - "operationId": "create_user_users__post", - "requestBody": { - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/UserCreate"} - } - }, - "required": True, - }, - }, - }, - "/users/{user_id}": { - "get": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/User"} - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Read User", - "operationId": "read_user_users__user_id__get", - "parameters": [ - { - "required": True, - "schema": {"title": "User Id", "type": "integer"}, - "name": "user_id", - "in": "path", - } - ], - } - }, - "/users/{user_id}/items/": { - "post": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/Item"} - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Create Item For User", - "operationId": "create_item_for_user_users__user_id__items__post", - "parameters": [ - { - "required": True, - "schema": {"title": "User Id", "type": "integer"}, - "name": "user_id", - "in": "path", - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/ItemCreate"} - } - }, - "required": True, - }, - } - }, - "/items/": { - "get": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Read Items Items Get", - "type": "array", - "items": {"$ref": "#/components/schemas/Item"}, - } - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Read Items", - "operationId": "read_items_items__get", - "parameters": [ - { - "required": False, - "schema": { - "title": "Skip", - "type": "integer", - "default": 0, - }, - "name": "skip", - "in": "query", - }, - { - "required": False, - "schema": { - "title": "Limit", - "type": "integer", - "default": 100, - }, - "name": "limit", - "in": "query", - }, - ], - } - }, - }, - "components": { - "schemas": { - "ItemCreate": { - "title": "ItemCreate", - "required": ["title"], - "type": "object", - "properties": { - "title": {"title": "Title", "type": "string"}, - "description": IsDict( - { - "title": "Description", - "anyOf": [{"type": "string"}, {"type": "null"}], - } - ) - | IsDict( - # TODO: remove when deprecating Pydantic v1 - {"title": "Description", "type": "string"} - ), - }, - }, - "Item": { - "title": "Item", - "required": ["title", "id", "owner_id"], - "type": "object", - "properties": { - "title": {"title": "Title", "type": "string"}, - "description": IsDict( - { - "title": "Description", - "anyOf": [{"type": "string"}, {"type": "null"}], - } - ) - | IsDict( - # TODO: remove when deprecating Pydantic v1 - {"title": "Description", "type": "string"}, - ), - "id": {"title": "Id", "type": "integer"}, - "owner_id": {"title": "Owner Id", "type": "integer"}, - }, - }, - "User": { - "title": "User", - "required": ["email", "id", "is_active"], - "type": "object", - "properties": { - "email": {"title": "Email", "type": "string"}, - "id": {"title": "Id", "type": "integer"}, - "is_active": {"title": "Is Active", "type": "boolean"}, - "items": { - "title": "Items", - "type": "array", - "items": {"$ref": "#/components/schemas/Item"}, - "default": [], - }, - }, - }, - "UserCreate": { - "title": "UserCreate", - "required": ["email", "password"], - "type": "object", - "properties": { - "email": {"title": "Email", "type": "string"}, - "password": {"title": "Password", "type": "string"}, - }, - }, - "ValidationError": { - "title": "ValidationError", - "required": ["loc", "msg", "type"], - "type": "object", - "properties": { - "loc": { - "title": "Location", - "type": "array", - "items": { - "anyOf": [{"type": "string"}, {"type": "integer"}] - }, - }, - "msg": {"title": "Message", "type": "string"}, - "type": {"title": "Error Type", "type": "string"}, - }, - }, - "HTTPValidationError": { - "title": "HTTPValidationError", - "type": "object", - "properties": { - "detail": { - "title": "Detail", - "type": "array", - "items": {"$ref": "#/components/schemas/ValidationError"}, - } - }, - }, - } - }, - } diff --git a/tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py39.py b/tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py39.py deleted file mode 100644 index a5da07ac6..000000000 --- a/tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py39.py +++ /dev/null @@ -1,433 +0,0 @@ -import importlib -import os -from pathlib import Path - -import pytest -from dirty_equals import IsDict -from fastapi.testclient import TestClient - -from ...utils import needs_py39, needs_pydanticv1 - - -@pytest.fixture(scope="module") -def client(tmp_path_factory: pytest.TempPathFactory): - tmp_path = tmp_path_factory.mktemp("data") - cwd = os.getcwd() - os.chdir(tmp_path) - test_db = Path("./sql_app.db") - if test_db.is_file(): # pragma: nocover - test_db.unlink() - # Import while creating the client to create the DB after starting the test session - from docs_src.sql_databases.sql_app_py39 import alt_main - - # Ensure import side effects are re-executed - importlib.reload(alt_main) - - with TestClient(alt_main.app) as c: - yield c - if test_db.is_file(): # pragma: nocover - test_db.unlink() - os.chdir(cwd) - - -@needs_py39 -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_create_user(client): - test_user = {"email": "johndoe@example.com", "password": "secret"} - response = client.post("/users/", json=test_user) - assert response.status_code == 200, response.text - data = response.json() - assert test_user["email"] == data["email"] - assert "id" in data - response = client.post("/users/", json=test_user) - assert response.status_code == 400, response.text - - -@needs_py39 -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_get_user(client): - response = client.get("/users/1") - assert response.status_code == 200, response.text - data = response.json() - assert "email" in data - assert "id" in data - - -@needs_py39 -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_nonexistent_user(client): - response = client.get("/users/999") - assert response.status_code == 404, response.text - - -@needs_py39 -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_get_users(client): - response = client.get("/users/") - assert response.status_code == 200, response.text - data = response.json() - assert "email" in data[0] - assert "id" in data[0] - - -@needs_py39 -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_create_item(client): - item = {"title": "Foo", "description": "Something that fights"} - response = client.post("/users/1/items/", json=item) - assert response.status_code == 200, response.text - item_data = response.json() - assert item["title"] == item_data["title"] - assert item["description"] == item_data["description"] - assert "id" in item_data - assert "owner_id" in item_data - response = client.get("/users/1") - assert response.status_code == 200, response.text - user_data = response.json() - item_to_check = [it for it in user_data["items"] if it["id"] == item_data["id"]][0] - assert item_to_check["title"] == item["title"] - assert item_to_check["description"] == item["description"] - response = client.get("/users/1") - assert response.status_code == 200, response.text - user_data = response.json() - item_to_check = [it for it in user_data["items"] if it["id"] == item_data["id"]][0] - assert item_to_check["title"] == item["title"] - assert item_to_check["description"] == item["description"] - - -@needs_py39 -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_read_items(client): - response = client.get("/items/") - assert response.status_code == 200, response.text - data = response.json() - assert data - first_item = data[0] - assert "title" in first_item - assert "description" in first_item - - -@needs_py39 -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_openapi_schema(client: TestClient): - response = client.get("/openapi.json") - assert response.status_code == 200, response.text - assert response.json() == { - "openapi": "3.1.0", - "info": {"title": "FastAPI", "version": "0.1.0"}, - "paths": { - "/users/": { - "get": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Read Users Users Get", - "type": "array", - "items": {"$ref": "#/components/schemas/User"}, - } - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Read Users", - "operationId": "read_users_users__get", - "parameters": [ - { - "required": False, - "schema": { - "title": "Skip", - "type": "integer", - "default": 0, - }, - "name": "skip", - "in": "query", - }, - { - "required": False, - "schema": { - "title": "Limit", - "type": "integer", - "default": 100, - }, - "name": "limit", - "in": "query", - }, - ], - }, - "post": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/User"} - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Create User", - "operationId": "create_user_users__post", - "requestBody": { - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/UserCreate"} - } - }, - "required": True, - }, - }, - }, - "/users/{user_id}": { - "get": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/User"} - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Read User", - "operationId": "read_user_users__user_id__get", - "parameters": [ - { - "required": True, - "schema": {"title": "User Id", "type": "integer"}, - "name": "user_id", - "in": "path", - } - ], - } - }, - "/users/{user_id}/items/": { - "post": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/Item"} - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Create Item For User", - "operationId": "create_item_for_user_users__user_id__items__post", - "parameters": [ - { - "required": True, - "schema": {"title": "User Id", "type": "integer"}, - "name": "user_id", - "in": "path", - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/ItemCreate"} - } - }, - "required": True, - }, - } - }, - "/items/": { - "get": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Read Items Items Get", - "type": "array", - "items": {"$ref": "#/components/schemas/Item"}, - } - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Read Items", - "operationId": "read_items_items__get", - "parameters": [ - { - "required": False, - "schema": { - "title": "Skip", - "type": "integer", - "default": 0, - }, - "name": "skip", - "in": "query", - }, - { - "required": False, - "schema": { - "title": "Limit", - "type": "integer", - "default": 100, - }, - "name": "limit", - "in": "query", - }, - ], - } - }, - }, - "components": { - "schemas": { - "ItemCreate": { - "title": "ItemCreate", - "required": ["title"], - "type": "object", - "properties": { - "title": {"title": "Title", "type": "string"}, - "description": IsDict( - { - "title": "Description", - "anyOf": [{"type": "string"}, {"type": "null"}], - } - ) - | IsDict( - # TODO: remove when deprecating Pydantic v1 - {"title": "Description", "type": "string"} - ), - }, - }, - "Item": { - "title": "Item", - "required": ["title", "id", "owner_id"], - "type": "object", - "properties": { - "title": {"title": "Title", "type": "string"}, - "description": IsDict( - { - "title": "Description", - "anyOf": [{"type": "string"}, {"type": "null"}], - } - ) - | IsDict( - # TODO: remove when deprecating Pydantic v1 - {"title": "Description", "type": "string"}, - ), - "id": {"title": "Id", "type": "integer"}, - "owner_id": {"title": "Owner Id", "type": "integer"}, - }, - }, - "User": { - "title": "User", - "required": ["email", "id", "is_active"], - "type": "object", - "properties": { - "email": {"title": "Email", "type": "string"}, - "id": {"title": "Id", "type": "integer"}, - "is_active": {"title": "Is Active", "type": "boolean"}, - "items": { - "title": "Items", - "type": "array", - "items": {"$ref": "#/components/schemas/Item"}, - "default": [], - }, - }, - }, - "UserCreate": { - "title": "UserCreate", - "required": ["email", "password"], - "type": "object", - "properties": { - "email": {"title": "Email", "type": "string"}, - "password": {"title": "Password", "type": "string"}, - }, - }, - "ValidationError": { - "title": "ValidationError", - "required": ["loc", "msg", "type"], - "type": "object", - "properties": { - "loc": { - "title": "Location", - "type": "array", - "items": { - "anyOf": [{"type": "string"}, {"type": "integer"}] - }, - }, - "msg": {"title": "Message", "type": "string"}, - "type": {"title": "Error Type", "type": "string"}, - }, - }, - "HTTPValidationError": { - "title": "HTTPValidationError", - "type": "object", - "properties": { - "detail": { - "title": "Detail", - "type": "array", - "items": {"$ref": "#/components/schemas/ValidationError"}, - } - }, - }, - } - }, - } diff --git a/tests/test_tutorial/test_sql_databases/test_sql_databases_py310.py b/tests/test_tutorial/test_sql_databases/test_sql_databases_py310.py deleted file mode 100644 index 5a9106598..000000000 --- a/tests/test_tutorial/test_sql_databases/test_sql_databases_py310.py +++ /dev/null @@ -1,432 +0,0 @@ -import importlib -import os -from pathlib import Path - -import pytest -from dirty_equals import IsDict -from fastapi.testclient import TestClient - -from ...utils import needs_py310, needs_pydanticv1 - - -@pytest.fixture(scope="module", name="client") -def get_client(tmp_path_factory: pytest.TempPathFactory): - tmp_path = tmp_path_factory.mktemp("data") - cwd = os.getcwd() - os.chdir(tmp_path) - test_db = Path("./sql_app.db") - if test_db.is_file(): # pragma: nocover - test_db.unlink() - # Import while creating the client to create the DB after starting the test session - from docs_src.sql_databases.sql_app_py310 import main - - # Ensure import side effects are re-executed - importlib.reload(main) - with TestClient(main.app) as c: - yield c - if test_db.is_file(): # pragma: nocover - test_db.unlink() - os.chdir(cwd) - - -@needs_py310 -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_create_user(client): - test_user = {"email": "johndoe@example.com", "password": "secret"} - response = client.post("/users/", json=test_user) - assert response.status_code == 200, response.text - data = response.json() - assert test_user["email"] == data["email"] - assert "id" in data - response = client.post("/users/", json=test_user) - assert response.status_code == 400, response.text - - -@needs_py310 -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_get_user(client): - response = client.get("/users/1") - assert response.status_code == 200, response.text - data = response.json() - assert "email" in data - assert "id" in data - - -@needs_py310 -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_nonexistent_user(client): - response = client.get("/users/999") - assert response.status_code == 404, response.text - - -@needs_py310 -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_get_users(client): - response = client.get("/users/") - assert response.status_code == 200, response.text - data = response.json() - assert "email" in data[0] - assert "id" in data[0] - - -@needs_py310 -# TODO: pv2 add Pydantic v2 version -@needs_pydanticv1 -def test_create_item(client): - item = {"title": "Foo", "description": "Something that fights"} - response = client.post("/users/1/items/", json=item) - assert response.status_code == 200, response.text - item_data = response.json() - assert item["title"] == item_data["title"] - assert item["description"] == item_data["description"] - assert "id" in item_data - assert "owner_id" in item_data - response = client.get("/users/1") - assert response.status_code == 200, response.text - user_data = response.json() - item_to_check = [it for it in user_data["items"] if it["id"] == item_data["id"]][0] - assert item_to_check["title"] == item["title"] - assert item_to_check["description"] == item["description"] - response = client.get("/users/1") - assert response.status_code == 200, response.text - user_data = response.json() - item_to_check = [it for it in user_data["items"] if it["id"] == item_data["id"]][0] - assert item_to_check["title"] == item["title"] - assert item_to_check["description"] == item["description"] - - -@needs_py310 -# TODO: pv2 add Pydantic v2 version -@needs_pydanticv1 -def test_read_items(client): - response = client.get("/items/") - assert response.status_code == 200, response.text - data = response.json() - assert data - first_item = data[0] - assert "title" in first_item - assert "description" in first_item - - -@needs_py310 -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_openapi_schema(client: TestClient): - response = client.get("/openapi.json") - assert response.status_code == 200, response.text - assert response.json() == { - "openapi": "3.1.0", - "info": {"title": "FastAPI", "version": "0.1.0"}, - "paths": { - "/users/": { - "get": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Read Users Users Get", - "type": "array", - "items": {"$ref": "#/components/schemas/User"}, - } - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Read Users", - "operationId": "read_users_users__get", - "parameters": [ - { - "required": False, - "schema": { - "title": "Skip", - "type": "integer", - "default": 0, - }, - "name": "skip", - "in": "query", - }, - { - "required": False, - "schema": { - "title": "Limit", - "type": "integer", - "default": 100, - }, - "name": "limit", - "in": "query", - }, - ], - }, - "post": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/User"} - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Create User", - "operationId": "create_user_users__post", - "requestBody": { - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/UserCreate"} - } - }, - "required": True, - }, - }, - }, - "/users/{user_id}": { - "get": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/User"} - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Read User", - "operationId": "read_user_users__user_id__get", - "parameters": [ - { - "required": True, - "schema": {"title": "User Id", "type": "integer"}, - "name": "user_id", - "in": "path", - } - ], - } - }, - "/users/{user_id}/items/": { - "post": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/Item"} - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Create Item For User", - "operationId": "create_item_for_user_users__user_id__items__post", - "parameters": [ - { - "required": True, - "schema": {"title": "User Id", "type": "integer"}, - "name": "user_id", - "in": "path", - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/ItemCreate"} - } - }, - "required": True, - }, - } - }, - "/items/": { - "get": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Read Items Items Get", - "type": "array", - "items": {"$ref": "#/components/schemas/Item"}, - } - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Read Items", - "operationId": "read_items_items__get", - "parameters": [ - { - "required": False, - "schema": { - "title": "Skip", - "type": "integer", - "default": 0, - }, - "name": "skip", - "in": "query", - }, - { - "required": False, - "schema": { - "title": "Limit", - "type": "integer", - "default": 100, - }, - "name": "limit", - "in": "query", - }, - ], - } - }, - }, - "components": { - "schemas": { - "ItemCreate": { - "title": "ItemCreate", - "required": ["title"], - "type": "object", - "properties": { - "title": {"title": "Title", "type": "string"}, - "description": IsDict( - { - "title": "Description", - "anyOf": [{"type": "string"}, {"type": "null"}], - } - ) - | IsDict( - # TODO: remove when deprecating Pydantic v1 - {"title": "Description", "type": "string"} - ), - }, - }, - "Item": { - "title": "Item", - "required": ["title", "id", "owner_id"], - "type": "object", - "properties": { - "title": {"title": "Title", "type": "string"}, - "description": IsDict( - { - "title": "Description", - "anyOf": [{"type": "string"}, {"type": "null"}], - } - ) - | IsDict( - # TODO: remove when deprecating Pydantic v1 - {"title": "Description", "type": "string"}, - ), - "id": {"title": "Id", "type": "integer"}, - "owner_id": {"title": "Owner Id", "type": "integer"}, - }, - }, - "User": { - "title": "User", - "required": ["email", "id", "is_active"], - "type": "object", - "properties": { - "email": {"title": "Email", "type": "string"}, - "id": {"title": "Id", "type": "integer"}, - "is_active": {"title": "Is Active", "type": "boolean"}, - "items": { - "title": "Items", - "type": "array", - "items": {"$ref": "#/components/schemas/Item"}, - "default": [], - }, - }, - }, - "UserCreate": { - "title": "UserCreate", - "required": ["email", "password"], - "type": "object", - "properties": { - "email": {"title": "Email", "type": "string"}, - "password": {"title": "Password", "type": "string"}, - }, - }, - "ValidationError": { - "title": "ValidationError", - "required": ["loc", "msg", "type"], - "type": "object", - "properties": { - "loc": { - "title": "Location", - "type": "array", - "items": { - "anyOf": [{"type": "string"}, {"type": "integer"}] - }, - }, - "msg": {"title": "Message", "type": "string"}, - "type": {"title": "Error Type", "type": "string"}, - }, - }, - "HTTPValidationError": { - "title": "HTTPValidationError", - "type": "object", - "properties": { - "detail": { - "title": "Detail", - "type": "array", - "items": {"$ref": "#/components/schemas/ValidationError"}, - } - }, - }, - } - }, - } diff --git a/tests/test_tutorial/test_sql_databases/test_sql_databases_py39.py b/tests/test_tutorial/test_sql_databases/test_sql_databases_py39.py deleted file mode 100644 index a354ba905..000000000 --- a/tests/test_tutorial/test_sql_databases/test_sql_databases_py39.py +++ /dev/null @@ -1,432 +0,0 @@ -import importlib -import os -from pathlib import Path - -import pytest -from dirty_equals import IsDict -from fastapi.testclient import TestClient - -from ...utils import needs_py39, needs_pydanticv1 - - -@pytest.fixture(scope="module", name="client") -def get_client(tmp_path_factory: pytest.TempPathFactory): - tmp_path = tmp_path_factory.mktemp("data") - cwd = os.getcwd() - os.chdir(tmp_path) - test_db = Path("./sql_app.db") - if test_db.is_file(): # pragma: nocover - test_db.unlink() - # Import while creating the client to create the DB after starting the test session - from docs_src.sql_databases.sql_app_py39 import main - - # Ensure import side effects are re-executed - importlib.reload(main) - with TestClient(main.app) as c: - yield c - if test_db.is_file(): # pragma: nocover - test_db.unlink() - os.chdir(cwd) - - -@needs_py39 -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_create_user(client): - test_user = {"email": "johndoe@example.com", "password": "secret"} - response = client.post("/users/", json=test_user) - assert response.status_code == 200, response.text - data = response.json() - assert test_user["email"] == data["email"] - assert "id" in data - response = client.post("/users/", json=test_user) - assert response.status_code == 400, response.text - - -@needs_py39 -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_get_user(client): - response = client.get("/users/1") - assert response.status_code == 200, response.text - data = response.json() - assert "email" in data - assert "id" in data - - -@needs_py39 -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_nonexistent_user(client): - response = client.get("/users/999") - assert response.status_code == 404, response.text - - -@needs_py39 -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_get_users(client): - response = client.get("/users/") - assert response.status_code == 200, response.text - data = response.json() - assert "email" in data[0] - assert "id" in data[0] - - -@needs_py39 -# TODO: pv2 add Pydantic v2 version -@needs_pydanticv1 -def test_create_item(client): - item = {"title": "Foo", "description": "Something that fights"} - response = client.post("/users/1/items/", json=item) - assert response.status_code == 200, response.text - item_data = response.json() - assert item["title"] == item_data["title"] - assert item["description"] == item_data["description"] - assert "id" in item_data - assert "owner_id" in item_data - response = client.get("/users/1") - assert response.status_code == 200, response.text - user_data = response.json() - item_to_check = [it for it in user_data["items"] if it["id"] == item_data["id"]][0] - assert item_to_check["title"] == item["title"] - assert item_to_check["description"] == item["description"] - response = client.get("/users/1") - assert response.status_code == 200, response.text - user_data = response.json() - item_to_check = [it for it in user_data["items"] if it["id"] == item_data["id"]][0] - assert item_to_check["title"] == item["title"] - assert item_to_check["description"] == item["description"] - - -@needs_py39 -# TODO: pv2 add Pydantic v2 version -@needs_pydanticv1 -def test_read_items(client): - response = client.get("/items/") - assert response.status_code == 200, response.text - data = response.json() - assert data - first_item = data[0] - assert "title" in first_item - assert "description" in first_item - - -@needs_py39 -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_openapi_schema(client: TestClient): - response = client.get("/openapi.json") - assert response.status_code == 200, response.text - assert response.json() == { - "openapi": "3.1.0", - "info": {"title": "FastAPI", "version": "0.1.0"}, - "paths": { - "/users/": { - "get": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Read Users Users Get", - "type": "array", - "items": {"$ref": "#/components/schemas/User"}, - } - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Read Users", - "operationId": "read_users_users__get", - "parameters": [ - { - "required": False, - "schema": { - "title": "Skip", - "type": "integer", - "default": 0, - }, - "name": "skip", - "in": "query", - }, - { - "required": False, - "schema": { - "title": "Limit", - "type": "integer", - "default": 100, - }, - "name": "limit", - "in": "query", - }, - ], - }, - "post": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/User"} - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Create User", - "operationId": "create_user_users__post", - "requestBody": { - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/UserCreate"} - } - }, - "required": True, - }, - }, - }, - "/users/{user_id}": { - "get": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/User"} - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Read User", - "operationId": "read_user_users__user_id__get", - "parameters": [ - { - "required": True, - "schema": {"title": "User Id", "type": "integer"}, - "name": "user_id", - "in": "path", - } - ], - } - }, - "/users/{user_id}/items/": { - "post": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/Item"} - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Create Item For User", - "operationId": "create_item_for_user_users__user_id__items__post", - "parameters": [ - { - "required": True, - "schema": {"title": "User Id", "type": "integer"}, - "name": "user_id", - "in": "path", - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/ItemCreate"} - } - }, - "required": True, - }, - } - }, - "/items/": { - "get": { - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Read Items Items Get", - "type": "array", - "items": {"$ref": "#/components/schemas/Item"}, - } - } - }, - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - }, - }, - "summary": "Read Items", - "operationId": "read_items_items__get", - "parameters": [ - { - "required": False, - "schema": { - "title": "Skip", - "type": "integer", - "default": 0, - }, - "name": "skip", - "in": "query", - }, - { - "required": False, - "schema": { - "title": "Limit", - "type": "integer", - "default": 100, - }, - "name": "limit", - "in": "query", - }, - ], - } - }, - }, - "components": { - "schemas": { - "ItemCreate": { - "title": "ItemCreate", - "required": ["title"], - "type": "object", - "properties": { - "title": {"title": "Title", "type": "string"}, - "description": IsDict( - { - "title": "Description", - "anyOf": [{"type": "string"}, {"type": "null"}], - } - ) - | IsDict( - # TODO: remove when deprecating Pydantic v1 - {"title": "Description", "type": "string"} - ), - }, - }, - "Item": { - "title": "Item", - "required": ["title", "id", "owner_id"], - "type": "object", - "properties": { - "title": {"title": "Title", "type": "string"}, - "description": IsDict( - { - "title": "Description", - "anyOf": [{"type": "string"}, {"type": "null"}], - } - ) - | IsDict( - # TODO: remove when deprecating Pydantic v1 - {"title": "Description", "type": "string"}, - ), - "id": {"title": "Id", "type": "integer"}, - "owner_id": {"title": "Owner Id", "type": "integer"}, - }, - }, - "User": { - "title": "User", - "required": ["email", "id", "is_active"], - "type": "object", - "properties": { - "email": {"title": "Email", "type": "string"}, - "id": {"title": "Id", "type": "integer"}, - "is_active": {"title": "Is Active", "type": "boolean"}, - "items": { - "title": "Items", - "type": "array", - "items": {"$ref": "#/components/schemas/Item"}, - "default": [], - }, - }, - }, - "UserCreate": { - "title": "UserCreate", - "required": ["email", "password"], - "type": "object", - "properties": { - "email": {"title": "Email", "type": "string"}, - "password": {"title": "Password", "type": "string"}, - }, - }, - "ValidationError": { - "title": "ValidationError", - "required": ["loc", "msg", "type"], - "type": "object", - "properties": { - "loc": { - "title": "Location", - "type": "array", - "items": { - "anyOf": [{"type": "string"}, {"type": "integer"}] - }, - }, - "msg": {"title": "Message", "type": "string"}, - "type": {"title": "Error Type", "type": "string"}, - }, - }, - "HTTPValidationError": { - "title": "HTTPValidationError", - "type": "object", - "properties": { - "detail": { - "title": "Detail", - "type": "array", - "items": {"$ref": "#/components/schemas/ValidationError"}, - } - }, - }, - } - }, - } diff --git a/tests/test_tutorial/test_sql_databases/test_testing_databases.py b/tests/test_tutorial/test_sql_databases/test_testing_databases.py deleted file mode 100644 index ce6ce230c..000000000 --- a/tests/test_tutorial/test_sql_databases/test_testing_databases.py +++ /dev/null @@ -1,27 +0,0 @@ -import importlib -import os -from pathlib import Path - -import pytest - -from ...utils import needs_pydanticv1 - - -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_testing_dbs(tmp_path_factory: pytest.TempPathFactory): - tmp_path = tmp_path_factory.mktemp("data") - cwd = os.getcwd() - os.chdir(tmp_path) - test_db = Path("./test.db") - if test_db.is_file(): # pragma: nocover - test_db.unlink() - # Import while creating the client to create the DB after starting the test session - from docs_src.sql_databases.sql_app.tests import test_sql_app - - # Ensure import side effects are re-executed - importlib.reload(test_sql_app) - test_sql_app.test_create_user() - if test_db.is_file(): # pragma: nocover - test_db.unlink() - os.chdir(cwd) diff --git a/tests/test_tutorial/test_sql_databases/test_testing_databases_py310.py b/tests/test_tutorial/test_sql_databases/test_testing_databases_py310.py deleted file mode 100644 index 545d63c2a..000000000 --- a/tests/test_tutorial/test_sql_databases/test_testing_databases_py310.py +++ /dev/null @@ -1,28 +0,0 @@ -import importlib -import os -from pathlib import Path - -import pytest - -from ...utils import needs_py310, needs_pydanticv1 - - -@needs_py310 -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_testing_dbs_py39(tmp_path_factory: pytest.TempPathFactory): - tmp_path = tmp_path_factory.mktemp("data") - cwd = os.getcwd() - os.chdir(tmp_path) - test_db = Path("./test.db") - if test_db.is_file(): # pragma: nocover - test_db.unlink() - # Import while creating the client to create the DB after starting the test session - from docs_src.sql_databases.sql_app_py310.tests import test_sql_app - - # Ensure import side effects are re-executed - importlib.reload(test_sql_app) - test_sql_app.test_create_user() - if test_db.is_file(): # pragma: nocover - test_db.unlink() - os.chdir(cwd) diff --git a/tests/test_tutorial/test_sql_databases/test_testing_databases_py39.py b/tests/test_tutorial/test_sql_databases/test_testing_databases_py39.py deleted file mode 100644 index 99bfd3fa8..000000000 --- a/tests/test_tutorial/test_sql_databases/test_testing_databases_py39.py +++ /dev/null @@ -1,28 +0,0 @@ -import importlib -import os -from pathlib import Path - -import pytest - -from ...utils import needs_py39, needs_pydanticv1 - - -@needs_py39 -# TODO: pv2 add version with Pydantic v2 -@needs_pydanticv1 -def test_testing_dbs_py39(tmp_path_factory: pytest.TempPathFactory): - tmp_path = tmp_path_factory.mktemp("data") - cwd = os.getcwd() - os.chdir(tmp_path) - test_db = Path("./test.db") - if test_db.is_file(): # pragma: nocover - test_db.unlink() - # Import while creating the client to create the DB after starting the test session - from docs_src.sql_databases.sql_app_py39.tests import test_sql_app - - # Ensure import side effects are re-executed - importlib.reload(test_sql_app) - test_sql_app.test_create_user() - if test_db.is_file(): # pragma: nocover - test_db.unlink() - os.chdir(cwd) diff --git a/tests/test_tutorial/test_sql_databases/test_tutorial001.py b/tests/test_tutorial/test_sql_databases/test_tutorial001.py new file mode 100644 index 000000000..cc7e590df --- /dev/null +++ b/tests/test_tutorial/test_sql_databases/test_tutorial001.py @@ -0,0 +1,373 @@ +import importlib +import warnings + +import pytest +from dirty_equals import IsDict, IsInt +from fastapi.testclient import TestClient +from inline_snapshot import snapshot +from sqlalchemy import StaticPool +from sqlmodel import SQLModel, create_engine +from sqlmodel.main import default_registry + +from tests.utils import needs_py39, needs_py310 + + +def clear_sqlmodel(): + # Clear the tables in the metadata for the default base model + SQLModel.metadata.clear() + # Clear the Models associated with the registry, to avoid warnings + default_registry.dispose() + + +@pytest.fixture( + name="client", + params=[ + "tutorial001", + pytest.param("tutorial001_py39", marks=needs_py39), + pytest.param("tutorial001_py310", marks=needs_py310), + "tutorial001_an", + pytest.param("tutorial001_an_py39", marks=needs_py39), + pytest.param("tutorial001_an_py310", marks=needs_py310), + ], +) +def get_client(request: pytest.FixtureRequest): + clear_sqlmodel() + # TODO: remove when updating SQL tutorial to use new lifespan API + with warnings.catch_warnings(record=True): + warnings.simplefilter("always") + mod = importlib.import_module(f"docs_src.sql_databases.{request.param}") + clear_sqlmodel() + importlib.reload(mod) + mod.sqlite_url = "sqlite://" + mod.engine = create_engine( + mod.sqlite_url, connect_args={"check_same_thread": False}, poolclass=StaticPool + ) + + with TestClient(mod.app) as c: + yield c + + +def test_crud_app(client: TestClient): + # TODO: this warns that SQLModel.from_orm is deprecated in Pydantic v1, refactor + # this if using obj.model_validate becomes independent of Pydantic v2 + with warnings.catch_warnings(record=True): + warnings.simplefilter("always") + # No heroes before creating + response = client.get("heroes/") + assert response.status_code == 200, response.text + assert response.json() == [] + + # Create a hero + response = client.post( + "/heroes/", + json={ + "id": 999, + "name": "Dead Pond", + "age": 30, + "secret_name": "Dive Wilson", + }, + ) + assert response.status_code == 200, response.text + assert response.json() == snapshot( + {"age": 30, "secret_name": "Dive Wilson", "id": 999, "name": "Dead Pond"} + ) + + # Read a hero + hero_id = response.json()["id"] + response = client.get(f"/heroes/{hero_id}") + assert response.status_code == 200, response.text + assert response.json() == snapshot( + {"name": "Dead Pond", "age": 30, "id": 999, "secret_name": "Dive Wilson"} + ) + + # Read all heroes + # Create more heroes first + response = client.post( + "/heroes/", + json={"name": "Spider-Boy", "age": 18, "secret_name": "Pedro Parqueador"}, + ) + assert response.status_code == 200, response.text + response = client.post( + "/heroes/", json={"name": "Rusty-Man", "secret_name": "Tommy Sharp"} + ) + assert response.status_code == 200, response.text + + response = client.get("/heroes/") + assert response.status_code == 200, response.text + assert response.json() == snapshot( + [ + { + "name": "Dead Pond", + "age": 30, + "id": IsInt(), + "secret_name": "Dive Wilson", + }, + { + "name": "Spider-Boy", + "age": 18, + "id": IsInt(), + "secret_name": "Pedro Parqueador", + }, + { + "name": "Rusty-Man", + "age": None, + "id": IsInt(), + "secret_name": "Tommy Sharp", + }, + ] + ) + + response = client.get("/heroes/?offset=1&limit=1") + assert response.status_code == 200, response.text + assert response.json() == snapshot( + [ + { + "name": "Spider-Boy", + "age": 18, + "id": IsInt(), + "secret_name": "Pedro Parqueador", + } + ] + ) + + # Delete a hero + response = client.delete(f"/heroes/{hero_id}") + assert response.status_code == 200, response.text + assert response.json() == snapshot({"ok": True}) + + response = client.get(f"/heroes/{hero_id}") + assert response.status_code == 404, response.text + + response = client.delete(f"/heroes/{hero_id}") + assert response.status_code == 404, response.text + assert response.json() == snapshot({"detail": "Hero not found"}) + + +def test_openapi_schema(client: TestClient): + response = client.get("/openapi.json") + assert response.status_code == 200, response.text + assert response.json() == snapshot( + { + "openapi": "3.1.0", + "info": {"title": "FastAPI", "version": "0.1.0"}, + "paths": { + "/heroes/": { + "post": { + "summary": "Create Hero", + "operationId": "create_hero_heroes__post", + "requestBody": { + "required": True, + "content": { + "application/json": { + "schema": {"$ref": "#/components/schemas/Hero"} + } + }, + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {"$ref": "#/components/schemas/Hero"} + } + }, + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + }, + }, + }, + "get": { + "summary": "Read Heroes", + "operationId": "read_heroes_heroes__get", + "parameters": [ + { + "name": "offset", + "in": "query", + "required": False, + "schema": { + "type": "integer", + "default": 0, + "title": "Offset", + }, + }, + { + "name": "limit", + "in": "query", + "required": False, + "schema": { + "type": "integer", + "maximum": 100, + "default": 100, + "title": "Limit", + }, + }, + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Hero" + }, + "title": "Response Read Heroes Heroes Get", + } + } + }, + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + }, + }, + }, + }, + "/heroes/{hero_id}": { + "get": { + "summary": "Read Hero", + "operationId": "read_hero_heroes__hero_id__get", + "parameters": [ + { + "name": "hero_id", + "in": "path", + "required": True, + "schema": {"type": "integer", "title": "Hero Id"}, + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {"$ref": "#/components/schemas/Hero"} + } + }, + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + }, + }, + }, + "delete": { + "summary": "Delete Hero", + "operationId": "delete_hero_heroes__hero_id__delete", + "parameters": [ + { + "name": "hero_id", + "in": "path", + "required": True, + "schema": {"type": "integer", "title": "Hero Id"}, + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": {"application/json": {"schema": {}}}, + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + }, + }, + }, + }, + }, + "components": { + "schemas": { + "HTTPValidationError": { + "properties": { + "detail": { + "items": { + "$ref": "#/components/schemas/ValidationError" + }, + "type": "array", + "title": "Detail", + } + }, + "type": "object", + "title": "HTTPValidationError", + }, + "Hero": { + "properties": { + "id": IsDict( + { + "anyOf": [{"type": "integer"}, {"type": "null"}], + "title": "Id", + } + ) + | IsDict( + # TODO: remove when deprecating Pydantic v1 + { + "type": "integer", + "title": "Id", + } + ), + "name": {"type": "string", "title": "Name"}, + "age": IsDict( + { + "anyOf": [{"type": "integer"}, {"type": "null"}], + "title": "Age", + } + ) + | IsDict( + # TODO: remove when deprecating Pydantic v1 + { + "type": "integer", + "title": "Age", + } + ), + "secret_name": {"type": "string", "title": "Secret Name"}, + }, + "type": "object", + "required": ["name", "secret_name"], + "title": "Hero", + }, + "ValidationError": { + "properties": { + "loc": { + "items": { + "anyOf": [{"type": "string"}, {"type": "integer"}] + }, + "type": "array", + "title": "Location", + }, + "msg": {"type": "string", "title": "Message"}, + "type": {"type": "string", "title": "Error Type"}, + }, + "type": "object", + "required": ["loc", "msg", "type"], + "title": "ValidationError", + }, + } + }, + } + ) diff --git a/tests/test_tutorial/test_sql_databases/test_tutorial002.py b/tests/test_tutorial/test_sql_databases/test_tutorial002.py new file mode 100644 index 000000000..68c1966f5 --- /dev/null +++ b/tests/test_tutorial/test_sql_databases/test_tutorial002.py @@ -0,0 +1,481 @@ +import importlib +import warnings + +import pytest +from dirty_equals import IsDict, IsInt +from fastapi.testclient import TestClient +from inline_snapshot import snapshot +from sqlalchemy import StaticPool +from sqlmodel import SQLModel, create_engine +from sqlmodel.main import default_registry + +from tests.utils import needs_py39, needs_py310 + + +def clear_sqlmodel(): + # Clear the tables in the metadata for the default base model + SQLModel.metadata.clear() + # Clear the Models associated with the registry, to avoid warnings + default_registry.dispose() + + +@pytest.fixture( + name="client", + params=[ + "tutorial002", + pytest.param("tutorial002_py39", marks=needs_py39), + pytest.param("tutorial002_py310", marks=needs_py310), + "tutorial002_an", + pytest.param("tutorial002_an_py39", marks=needs_py39), + pytest.param("tutorial002_an_py310", marks=needs_py310), + ], +) +def get_client(request: pytest.FixtureRequest): + clear_sqlmodel() + # TODO: remove when updating SQL tutorial to use new lifespan API + with warnings.catch_warnings(record=True): + warnings.simplefilter("always") + mod = importlib.import_module(f"docs_src.sql_databases.{request.param}") + clear_sqlmodel() + importlib.reload(mod) + mod.sqlite_url = "sqlite://" + mod.engine = create_engine( + mod.sqlite_url, connect_args={"check_same_thread": False}, poolclass=StaticPool + ) + + with TestClient(mod.app) as c: + yield c + + +def test_crud_app(client: TestClient): + # TODO: this warns that SQLModel.from_orm is deprecated in Pydantic v1, refactor + # this if using obj.model_validate becomes independent of Pydantic v2 + with warnings.catch_warnings(record=True): + warnings.simplefilter("always") + # No heroes before creating + response = client.get("heroes/") + assert response.status_code == 200, response.text + assert response.json() == [] + + # Create a hero + response = client.post( + "/heroes/", + json={ + "id": 9000, + "name": "Dead Pond", + "age": 30, + "secret_name": "Dive Wilson", + }, + ) + assert response.status_code == 200, response.text + assert response.json() == snapshot( + {"age": 30, "id": IsInt(), "name": "Dead Pond"} + ) + assert ( + response.json()["id"] != 9000 + ), "The ID should be generated by the database" + + # Read a hero + hero_id = response.json()["id"] + response = client.get(f"/heroes/{hero_id}") + assert response.status_code == 200, response.text + assert response.json() == snapshot( + {"name": "Dead Pond", "age": 30, "id": IsInt()} + ) + + # Read all heroes + # Create more heroes first + response = client.post( + "/heroes/", + json={"name": "Spider-Boy", "age": 18, "secret_name": "Pedro Parqueador"}, + ) + assert response.status_code == 200, response.text + response = client.post( + "/heroes/", json={"name": "Rusty-Man", "secret_name": "Tommy Sharp"} + ) + assert response.status_code == 200, response.text + + response = client.get("/heroes/") + assert response.status_code == 200, response.text + assert response.json() == snapshot( + [ + {"name": "Dead Pond", "age": 30, "id": IsInt()}, + {"name": "Spider-Boy", "age": 18, "id": IsInt()}, + {"name": "Rusty-Man", "age": None, "id": IsInt()}, + ] + ) + + response = client.get("/heroes/?offset=1&limit=1") + assert response.status_code == 200, response.text + assert response.json() == snapshot( + [{"name": "Spider-Boy", "age": 18, "id": IsInt()}] + ) + + # Update a hero + response = client.patch( + f"/heroes/{hero_id}", json={"name": "Dog Pond", "age": None} + ) + assert response.status_code == 200, response.text + assert response.json() == snapshot( + {"name": "Dog Pond", "age": None, "id": hero_id} + ) + + # Get updated hero + response = client.get(f"/heroes/{hero_id}") + assert response.status_code == 200, response.text + assert response.json() == snapshot( + {"name": "Dog Pond", "age": None, "id": hero_id} + ) + + # Delete a hero + response = client.delete(f"/heroes/{hero_id}") + assert response.status_code == 200, response.text + assert response.json() == snapshot({"ok": True}) + + # The hero is no longer found + response = client.get(f"/heroes/{hero_id}") + assert response.status_code == 404, response.text + + # Delete a hero that does not exist + response = client.delete(f"/heroes/{hero_id}") + assert response.status_code == 404, response.text + assert response.json() == snapshot({"detail": "Hero not found"}) + + # Update a hero that does not exist + response = client.patch(f"/heroes/{hero_id}", json={"name": "Dog Pond"}) + assert response.status_code == 404, response.text + assert response.json() == snapshot({"detail": "Hero not found"}) + + +def test_openapi_schema(client: TestClient): + response = client.get("/openapi.json") + assert response.status_code == 200, response.text + assert response.json() == snapshot( + { + "openapi": "3.1.0", + "info": {"title": "FastAPI", "version": "0.1.0"}, + "paths": { + "/heroes/": { + "post": { + "summary": "Create Hero", + "operationId": "create_hero_heroes__post", + "requestBody": { + "required": True, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HeroCreate" + } + } + }, + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HeroPublic" + } + } + }, + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + }, + }, + }, + "get": { + "summary": "Read Heroes", + "operationId": "read_heroes_heroes__get", + "parameters": [ + { + "name": "offset", + "in": "query", + "required": False, + "schema": { + "type": "integer", + "default": 0, + "title": "Offset", + }, + }, + { + "name": "limit", + "in": "query", + "required": False, + "schema": { + "type": "integer", + "maximum": 100, + "default": 100, + "title": "Limit", + }, + }, + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HeroPublic" + }, + "title": "Response Read Heroes Heroes Get", + } + } + }, + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + }, + }, + }, + }, + "/heroes/{hero_id}": { + "get": { + "summary": "Read Hero", + "operationId": "read_hero_heroes__hero_id__get", + "parameters": [ + { + "name": "hero_id", + "in": "path", + "required": True, + "schema": {"type": "integer", "title": "Hero Id"}, + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HeroPublic" + } + } + }, + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + }, + }, + }, + "patch": { + "summary": "Update Hero", + "operationId": "update_hero_heroes__hero_id__patch", + "parameters": [ + { + "name": "hero_id", + "in": "path", + "required": True, + "schema": {"type": "integer", "title": "Hero Id"}, + } + ], + "requestBody": { + "required": True, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HeroUpdate" + } + } + }, + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HeroPublic" + } + } + }, + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + }, + }, + }, + "delete": { + "summary": "Delete Hero", + "operationId": "delete_hero_heroes__hero_id__delete", + "parameters": [ + { + "name": "hero_id", + "in": "path", + "required": True, + "schema": {"type": "integer", "title": "Hero Id"}, + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": {"application/json": {"schema": {}}}, + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + }, + }, + }, + }, + }, + "components": { + "schemas": { + "HTTPValidationError": { + "properties": { + "detail": { + "items": { + "$ref": "#/components/schemas/ValidationError" + }, + "type": "array", + "title": "Detail", + } + }, + "type": "object", + "title": "HTTPValidationError", + }, + "HeroCreate": { + "properties": { + "name": {"type": "string", "title": "Name"}, + "age": IsDict( + { + "anyOf": [{"type": "integer"}, {"type": "null"}], + "title": "Age", + } + ) + | IsDict( + # TODO: remove when deprecating Pydantic v1 + { + "type": "integer", + "title": "Age", + } + ), + "secret_name": {"type": "string", "title": "Secret Name"}, + }, + "type": "object", + "required": ["name", "secret_name"], + "title": "HeroCreate", + }, + "HeroPublic": { + "properties": { + "name": {"type": "string", "title": "Name"}, + "age": IsDict( + { + "anyOf": [{"type": "integer"}, {"type": "null"}], + "title": "Age", + } + ) + | IsDict( + # TODO: remove when deprecating Pydantic v1 + { + "type": "integer", + "title": "Age", + } + ), + "id": {"type": "integer", "title": "Id"}, + }, + "type": "object", + "required": ["name", "id"], + "title": "HeroPublic", + }, + "HeroUpdate": { + "properties": { + "name": IsDict( + { + "anyOf": [{"type": "string"}, {"type": "null"}], + "title": "Name", + } + ) + | IsDict( + # TODO: remove when deprecating Pydantic v1 + { + "type": "string", + "title": "Name", + } + ), + "age": IsDict( + { + "anyOf": [{"type": "integer"}, {"type": "null"}], + "title": "Age", + } + ) + | IsDict( + # TODO: remove when deprecating Pydantic v1 + { + "type": "integer", + "title": "Age", + } + ), + "secret_name": IsDict( + { + "anyOf": [{"type": "string"}, {"type": "null"}], + "title": "Secret Name", + } + ) + | IsDict( + # TODO: remove when deprecating Pydantic v1 + { + "type": "string", + "title": "Secret Name", + } + ), + }, + "type": "object", + "title": "HeroUpdate", + }, + "ValidationError": { + "properties": { + "loc": { + "items": { + "anyOf": [{"type": "string"}, {"type": "integer"}] + }, + "type": "array", + "title": "Location", + }, + "msg": {"type": "string", "title": "Message"}, + "type": {"type": "string", "title": "Error Type"}, + }, + "type": "object", + "required": ["loc", "msg", "type"], + "title": "ValidationError", + }, + } + }, + } + ) From dbb4a91e121317da6e53e1c06aa02170c40cf78c Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 9 Oct 2024 19:45:08 +0000 Subject: [PATCH 72/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index e34fd0df9..819d4b327 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -13,6 +13,7 @@ hide: ### Docs +* ✹ Add new tutorial for SQL databases with SQLModel. PR [#12285](https://github.com/fastapi/fastapi/pull/12285) by [@tiangolo](https://github.com/tiangolo). * 📝 Add External Link: How to profile a FastAPI asynchronous request. PR [#12389](https://github.com/fastapi/fastapi/pull/12389) by [@brouberol](https://github.com/brouberol). * 🔧 Remove `base_path` for `mdx_include` Markdown extension in MkDocs. PR [#12391](https://github.com/fastapi/fastapi/pull/12391) by [@tiangolo](https://github.com/tiangolo). * 📝 Update link to Swagger UI configuration docs. PR [#12264](https://github.com/fastapi/fastapi/pull/12264) by [@makisukurisu](https://github.com/makisukurisu). From 104dc0b8d86cb57165da919bc8cec2e225f6b61c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 22:11:46 +0200 Subject: [PATCH 73/90] =?UTF-8?q?=E2=AC=86=20[pre-commit.ci]=20pre-commit?= =?UTF-8?q?=20autoupdate=20(#12396)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0) - [github.com/astral-sh/ruff-pre-commit: v0.6.8 → v0.6.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.8...v0.6.9) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 48a7d495c..a62acccfe 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ default_language_version: python: python3.10 repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: check-toml @@ -14,7 +14,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.8 + rev: v0.6.9 hooks: - id: ruff args: From 529155e72e196f82e0289f173a185e8ddb2888ce Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 9 Oct 2024 20:12:15 +0000 Subject: [PATCH 74/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 819d4b327..4fe600ed4 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -40,6 +40,7 @@ hide: ### Internal +* ⬆ [pre-commit.ci] pre-commit autoupdate. PR [#12396](https://github.com/fastapi/fastapi/pull/12396) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci). * 🔹 Add script to generate variants of files. PR [#12405](https://github.com/fastapi/fastapi/pull/12405) by [@tiangolo](https://github.com/tiangolo). * 🔧 Add speakeasy-api to `sponsors_badge.yml`. PR [#12404](https://github.com/fastapi/fastapi/pull/12404) by [@tiangolo](https://github.com/tiangolo). * ➕ Add docs dependency: markdown-include-variants. PR [#12399](https://github.com/fastapi/fastapi/pull/12399) by [@tiangolo](https://github.com/tiangolo). From 8ae4603d680f86ae1e5f96e58546dee4f543171f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Pacheco?= Date: Sat, 12 Oct 2024 05:36:32 -0400 Subject: [PATCH 75/90] =?UTF-8?q?=F0=9F=90=9B=20Remove=20`Required`=20shad?= =?UTF-8?q?owing=20from=20fastapi=20using=20Pydantic=20v2=20(#12197)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Sofie Van Landeghem --- .../query_params_str_validations/tutorial006d.py | 3 +-- .../tutorial006d_an.py | 3 +-- .../tutorial006d_an_py39.py | 3 +-- fastapi/_compat.py | 9 +++++---- fastapi/dependencies/utils.py | 14 ++++++++------ 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs_src/query_params_str_validations/tutorial006d.py b/docs_src/query_params_str_validations/tutorial006d.py index 42c5bf4eb..a8d69c889 100644 --- a/docs_src/query_params_str_validations/tutorial006d.py +++ b/docs_src/query_params_str_validations/tutorial006d.py @@ -1,11 +1,10 @@ from fastapi import FastAPI, Query -from pydantic import Required app = FastAPI() @app.get("/items/") -async def read_items(q: str = Query(default=Required, min_length=3)): +async def read_items(q: str = Query(default=..., min_length=3)): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q}) diff --git a/docs_src/query_params_str_validations/tutorial006d_an.py b/docs_src/query_params_str_validations/tutorial006d_an.py index bc8283e15..ea3b02583 100644 --- a/docs_src/query_params_str_validations/tutorial006d_an.py +++ b/docs_src/query_params_str_validations/tutorial006d_an.py @@ -1,12 +1,11 @@ from fastapi import FastAPI, Query -from pydantic import Required from typing_extensions import Annotated app = FastAPI() @app.get("/items/") -async def read_items(q: Annotated[str, Query(min_length=3)] = Required): +async def read_items(q: Annotated[str, Query(min_length=3)] = ...): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q}) diff --git a/docs_src/query_params_str_validations/tutorial006d_an_py39.py b/docs_src/query_params_str_validations/tutorial006d_an_py39.py index 035d9e3bd..687a9f544 100644 --- a/docs_src/query_params_str_validations/tutorial006d_an_py39.py +++ b/docs_src/query_params_str_validations/tutorial006d_an_py39.py @@ -1,13 +1,12 @@ from typing import Annotated from fastapi import FastAPI, Query -from pydantic import Required app = FastAPI() @app.get("/items/") -async def read_items(q: Annotated[str, Query(min_length=3)] = Required): +async def read_items(q: Annotated[str, Query(min_length=3)] = ...): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q}) diff --git a/fastapi/_compat.py b/fastapi/_compat.py index 4b07b44fa..56c5d744e 100644 --- a/fastapi/_compat.py +++ b/fastapi/_compat.py @@ -71,7 +71,7 @@ if PYDANTIC_V2: general_plain_validator_function as with_info_plain_validator_function, # noqa: F401 ) - Required = PydanticUndefined + RequiredParam = PydanticUndefined Undefined = PydanticUndefined UndefinedType = PydanticUndefinedType evaluate_forwardref = eval_type_lenient @@ -313,9 +313,10 @@ else: from pydantic.fields import ( # type: ignore[no-redef,attr-defined] ModelField as ModelField, # noqa: F401 ) - from pydantic.fields import ( # type: ignore[no-redef,attr-defined] - Required as Required, # noqa: F401 - ) + + # Keeping old "Required" functionality from Pydantic V1, without + # shadowing typing.Required. + RequiredParam: Any = Ellipsis # type: ignore[no-redef] from pydantic.fields import ( # type: ignore[no-redef,attr-defined] Undefined as Undefined, ) diff --git a/fastapi/dependencies/utils.py b/fastapi/dependencies/utils.py index 813c74620..87653c80d 100644 --- a/fastapi/dependencies/utils.py +++ b/fastapi/dependencies/utils.py @@ -24,7 +24,7 @@ from fastapi._compat import ( PYDANTIC_V2, ErrorWrapper, ModelField, - Required, + RequiredParam, Undefined, _regenerate_error_with_loc, copy_field_info, @@ -377,7 +377,9 @@ def analyze_param( field_info = copy_field_info( field_info=fastapi_annotation, annotation=use_annotation ) - assert field_info.default is Undefined or field_info.default is Required, ( + assert ( + field_info.default is Undefined or field_info.default is RequiredParam + ), ( f"`{field_info.__class__.__name__}` default value cannot be set in" f" `Annotated` for {param_name!r}. Set the default value with `=` instead." ) @@ -385,7 +387,7 @@ def analyze_param( assert not is_path_param, "Path parameters cannot have default values" field_info.default = value else: - field_info.default = Required + field_info.default = RequiredParam # Get Annotated Depends elif isinstance(fastapi_annotation, params.Depends): depends = fastapi_annotation @@ -434,9 +436,9 @@ def analyze_param( ), f"Cannot specify FastAPI annotation for type {type_annotation!r}" # Handle default assignations, neither field_info nor depends was not found in Annotated nor default value elif field_info is None and depends is None: - default_value = value if value is not inspect.Signature.empty else Required + default_value = value if value is not inspect.Signature.empty else RequiredParam if is_path_param: - # We might check here that `default_value is Required`, but the fact is that the same + # We might check here that `default_value is RequiredParam`, but the fact is that the same # parameter might sometimes be a path parameter and sometimes not. See # `tests/test_infer_param_optionality.py` for an example. field_info = params.Path(annotation=use_annotation) @@ -480,7 +482,7 @@ def analyze_param( type_=use_annotation_from_field_info, default=field_info.default, alias=alias, - required=field_info.default in (Required, Undefined), + required=field_info.default in (RequiredParam, Undefined), field_info=field_info, ) if is_path_param: From b29cf1621a9b9046ff68cf21c67f96953bc8feeb Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 12 Oct 2024 09:36:55 +0000 Subject: [PATCH 76/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 4fe600ed4..d070a84a3 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -7,6 +7,10 @@ hide: ## Latest Changes +### Fixes + +* 🐛 Remove `Required` shadowing from fastapi using Pydantic v2. PR [#12197](https://github.com/fastapi/fastapi/pull/12197) by [@pachewise](https://github.com/pachewise). + ### Refactors * ♻ Update type annotations for improved `python-multipart`. PR [#12407](https://github.com/fastapi/fastapi/pull/12407) by [@tiangolo](https://github.com/tiangolo). From e049fc4ea15a7b844326efa545a7e370713f6612 Mon Sep 17 00:00:00 2001 From: Felix Fanghaenel <35657654+flxdot@users.noreply.github.com> Date: Sat, 12 Oct 2024 11:44:57 +0200 Subject: [PATCH 77/90] =?UTF-8?q?=F0=9F=90=9B=20Fix=20openapi=20generation?= =?UTF-8?q?=20with=20responses=20kwarg=20(#10895)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: flxdot Co-authored-by: Sofie Van Landeghem Co-authored-by: SƂawek Ehlert --- fastapi/routing.py | 4 ++- tests/test_computed_fields.py | 27 ++++++++++++-- ...t_openapi_separate_input_output_schemas.py | 36 ++++++++++++++++--- 3 files changed, 59 insertions(+), 8 deletions(-) diff --git a/fastapi/routing.py b/fastapi/routing.py index 86e303602..8ea4bb219 100644 --- a/fastapi/routing.py +++ b/fastapi/routing.py @@ -541,7 +541,9 @@ class APIRoute(routing.Route): additional_status_code ), f"Status code {additional_status_code} must not have a response body" response_name = f"Response_{additional_status_code}_{self.unique_id}" - response_field = create_model_field(name=response_name, type_=model) + response_field = create_model_field( + name=response_name, type_=model, mode="serialization" + ) response_fields[additional_status_code] = response_field if response_fields: self.response_fields: Dict[Union[int, str], ModelField] = response_fields diff --git a/tests/test_computed_fields.py b/tests/test_computed_fields.py index 5286507b2..a1b412168 100644 --- a/tests/test_computed_fields.py +++ b/tests/test_computed_fields.py @@ -24,13 +24,18 @@ def get_client(): def read_root() -> Rectangle: return Rectangle(width=3, length=4) + @app.get("/responses", responses={200: {"model": Rectangle}}) + def read_responses() -> Rectangle: + return Rectangle(width=3, length=4) + client = TestClient(app) return client +@pytest.mark.parametrize("path", ["/", "/responses"]) @needs_pydanticv2 -def test_get(client: TestClient): - response = client.get("/") +def test_get(client: TestClient, path: str): + response = client.get(path) assert response.status_code == 200, response.text assert response.json() == {"width": 3, "length": 4, "area": 12} @@ -58,7 +63,23 @@ def test_openapi_schema(client: TestClient): } }, } - } + }, + "/responses": { + "get": { + "summary": "Read Responses", + "operationId": "read_responses_responses_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {"$ref": "#/components/schemas/Rectangle"} + } + }, + } + }, + } + }, }, "components": { "schemas": { diff --git a/tests/test_openapi_separate_input_output_schemas.py b/tests/test_openapi_separate_input_output_schemas.py index aeb85f735..f7e045259 100644 --- a/tests/test_openapi_separate_input_output_schemas.py +++ b/tests/test_openapi_separate_input_output_schemas.py @@ -26,8 +26,8 @@ class Item(BaseModel): def get_app_client(separate_input_output_schemas: bool = True) -> TestClient: app = FastAPI(separate_input_output_schemas=separate_input_output_schemas) - @app.post("/items/") - def create_item(item: Item): + @app.post("/items/", responses={402: {"model": Item}}) + def create_item(item: Item) -> Item: return item @app.post("/items-list/") @@ -174,7 +174,23 @@ def test_openapi_schema(): "responses": { "200": { "description": "Successful Response", - "content": {"application/json": {"schema": {}}}, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Item-Output" + } + } + }, + }, + "402": { + "description": "Payment Required", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Item-Output" + } + } + }, }, "422": { "description": "Validation Error", @@ -374,7 +390,19 @@ def test_openapi_schema_no_separate(): "responses": { "200": { "description": "Successful Response", - "content": {"application/json": {"schema": {}}}, + "content": { + "application/json": { + "schema": {"$ref": "#/components/schemas/Item"} + } + }, + }, + "402": { + "description": "Payment Required", + "content": { + "application/json": { + "schema": {"$ref": "#/components/schemas/Item"} + } + }, }, "422": { "description": "Validation Error", From f0be7686468229a7c9aa49c0c2cfff754c81dbdc Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 12 Oct 2024 09:45:17 +0000 Subject: [PATCH 78/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index d070a84a3..07035bf94 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -9,6 +9,7 @@ hide: ### Fixes +* 🐛 Fix openapi generation with responses kwarg. PR [#10895](https://github.com/fastapi/fastapi/pull/10895) by [@flxdot](https://github.com/flxdot). * 🐛 Remove `Required` shadowing from fastapi using Pydantic v2. PR [#12197](https://github.com/fastapi/fastapi/pull/12197) by [@pachewise](https://github.com/pachewise). ### Refactors From 113da5b0a7f33be300b7fea8dddbe51ee7b96157 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sat, 12 Oct 2024 11:51:09 +0200 Subject: [PATCH 79/90] =?UTF-8?q?=F0=9F=94=96=20Release=20version=200.115.?= =?UTF-8?q?1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 2 ++ fastapi/__init__.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 07035bf94..4843370e7 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -7,6 +7,8 @@ hide: ## Latest Changes +## 0.115.1 + ### Fixes * 🐛 Fix openapi generation with responses kwarg. PR [#10895](https://github.com/fastapi/fastapi/pull/10895) by [@flxdot](https://github.com/flxdot). diff --git a/fastapi/__init__.py b/fastapi/__init__.py index 7dd74c28f..09c8074ed 100644 --- a/fastapi/__init__.py +++ b/fastapi/__init__.py @@ -1,6 +1,6 @@ """FastAPI framework, high performance, easy to learn, fast to code, ready for production""" -__version__ = "0.115.0" +__version__ = "0.115.1" from starlette import status as status From b77f2351d1561c0e9599205c3faaaed7b52c24fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sat, 12 Oct 2024 11:59:01 +0200 Subject: [PATCH 80/90] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Upgrade=20Starlette?= =?UTF-8?q?=20to=20`>=3D0.37.2,<0.41.0`=20(#12431)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1be2817a1..c934356d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ classifiers = [ "Topic :: Internet :: WWW/HTTP", ] dependencies = [ - "starlette>=0.37.2,<0.39.0", + "starlette>=0.37.2,<0.41.0", "pydantic>=1.7.4,!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0", "typing-extensions>=4.8.0", ] From 63c428fbf9363aaad0e967d30f8b199f5dc23e39 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 12 Oct 2024 09:59:23 +0000 Subject: [PATCH 81/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 4843370e7..780f41ed3 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -7,6 +7,10 @@ hide: ## Latest Changes +### Upgrades + +* âŹ†ïž Upgrade Starlette to `>=0.37.2,<0.41.0`. PR [#12431](https://github.com/fastapi/fastapi/pull/12431) by [@tiangolo](https://github.com/tiangolo). + ## 0.115.1 ### Fixes From 07684aea793d042fb5a12dde46dfe6d1e2196725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sat, 12 Oct 2024 12:00:47 +0200 Subject: [PATCH 82/90] =?UTF-8?q?=F0=9F=94=96=20Release=20version=200.115.?= =?UTF-8?q?2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 2 ++ fastapi/__init__.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 780f41ed3..3ba765b08 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -7,6 +7,8 @@ hide: ## Latest Changes +## 0.115.2 + ### Upgrades * âŹ†ïž Upgrade Starlette to `>=0.37.2,<0.41.0`. PR [#12431](https://github.com/fastapi/fastapi/pull/12431) by [@tiangolo](https://github.com/tiangolo). diff --git a/fastapi/__init__.py b/fastapi/__init__.py index 09c8074ed..77b52f35b 100644 --- a/fastapi/__init__.py +++ b/fastapi/__init__.py @@ -1,6 +1,6 @@ """FastAPI framework, high performance, easy to learn, fast to code, ready for production""" -__version__ = "0.115.1" +__version__ = "0.115.2" from starlette import status as status From 91672fb9edf4a504a0106b5396f9be16ffbf40b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 12 Oct 2024 12:29:31 +0200 Subject: [PATCH 83/90] =?UTF-8?q?=E2=AC=86=20Update=20httpx=20requirement?= =?UTF-8?q?=20from=20<0.25.0,>=3D0.23.0=20to=20>=3D0.23.0,<0.28.0=20(#1150?= =?UTF-8?q?9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updates the requirements on [httpx](https://github.com/encode/httpx) to permit the latest version. - [Release notes](https://github.com/encode/httpx/releases) - [Changelog](https://github.com/encode/httpx/blob/master/CHANGELOG.md) - [Commits](https://github.com/encode/httpx/compare/0.23.0...0.27.0) --- updated-dependencies: - dependency-name: httpx dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-docs-tests.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-docs-tests.txt b/requirements-docs-tests.txt index 40b956e51..331d2a5b3 100644 --- a/requirements-docs-tests.txt +++ b/requirements-docs-tests.txt @@ -1,4 +1,4 @@ # For mkdocstrings and tests -httpx >=0.23.0,<0.25.0 +httpx >=0.23.0,<0.28.0 # For linting and generating docs versions ruff ==0.6.4 From 3347f0dde58899e9d934b9f25fcd4f0120a002da Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 12 Oct 2024 10:29:52 +0000 Subject: [PATCH 84/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 3ba765b08..90e45367b 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -7,6 +7,10 @@ hide: ## Latest Changes +### Internal + +* ⬆ Update httpx requirement from <0.25.0,>=0.23.0 to >=0.23.0,<0.28.0. PR [#11509](https://github.com/fastapi/fastapi/pull/11509) by [@dependabot[bot]](https://github.com/apps/dependabot). + ## 0.115.2 ### Upgrades From a30eb6f5179974f8e6a809a94094f04a787d5aa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sat, 12 Oct 2024 14:27:19 +0200 Subject: [PATCH 85/90] =?UTF-8?q?=F0=9F=91=B7=20Use=20uv=20in=20CI=20(#122?= =?UTF-8?q?81)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-docs.yml | 40 +++++++++------- .github/workflows/deploy-docs.yml | 18 ++++--- .github/workflows/label-approved.yml | 21 ++++++++- .github/workflows/notify-translations.yml | 16 +++++++ .github/workflows/smokeshow.yml | 16 +++++-- .github/workflows/test.yml | 57 +++++++++++++---------- requirements-github-actions.txt | 1 + 7 files changed, 115 insertions(+), 54 deletions(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 52c34a49e..dd11727c7 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -7,6 +7,10 @@ on: types: - opened - synchronize + +env: + UV_SYSTEM_PYTHON: 1 + jobs: changes: runs-on: ubuntu-latest @@ -48,18 +52,20 @@ jobs: uses: actions/setup-python@v5 with: python-version: "3.11" - - uses: actions/cache@v4 - id: cache + - name: Setup uv + uses: astral-sh/setup-uv@v3 with: - path: ${{ env.pythonLocation }} - key: ${{ runner.os }}-python-docs-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-docs.txt', 'requirements-docs-insiders.txt', 'requirements-docs-tests.txt') }}-v08 + version: "0.4.15" + enable-cache: true + cache-dependency-glob: | + requirements**.txt + pyproject.toml - name: Install docs extras - if: steps.cache.outputs.cache-hit != 'true' - run: pip install -r requirements-docs.txt + run: uv pip install -r requirements-docs.txt # Install MkDocs Material Insiders here just to put it in the cache for the rest of the steps - name: Install Material for MkDocs Insiders - if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' ) && steps.cache.outputs.cache-hit != 'true' - run: pip install -r requirements-docs-insiders.txt + if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' ) + run: uv pip install -r requirements-docs-insiders.txt env: TOKEN: ${{ secrets.FASTAPI_MKDOCS_MATERIAL_INSIDERS }} - name: Verify Docs @@ -88,17 +94,19 @@ jobs: uses: actions/setup-python@v5 with: python-version: "3.11" - - uses: actions/cache@v4 - id: cache + - name: Setup uv + uses: astral-sh/setup-uv@v3 with: - path: ${{ env.pythonLocation }} - key: ${{ runner.os }}-python-docs-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-docs.txt', 'requirements-docs-insiders.txt', 'requirements-docs-tests.txt') }}-v08 + version: "0.4.15" + enable-cache: true + cache-dependency-glob: | + requirements**.txt + pyproject.toml - name: Install docs extras - if: steps.cache.outputs.cache-hit != 'true' - run: pip install -r requirements-docs.txt + run: uv pip install -r requirements-docs.txt - name: Install Material for MkDocs Insiders - if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' ) && steps.cache.outputs.cache-hit != 'true' - run: pip install -r requirements-docs-insiders.txt + if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' ) + run: uv pip install -r requirements-docs-insiders.txt env: TOKEN: ${{ secrets.FASTAPI_MKDOCS_MATERIAL_INSIDERS }} - name: Update Languages diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 22dc89dff..2fd46df6b 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -12,6 +12,9 @@ permissions: pull-requests: write statuses: write +env: + UV_SYSTEM_PYTHON: 1 + jobs: deploy-docs: runs-on: ubuntu-latest @@ -25,21 +28,22 @@ jobs: uses: actions/setup-python@v5 with: python-version: "3.11" - - uses: actions/cache@v4 - id: cache + - name: Setup uv + uses: astral-sh/setup-uv@v3 with: - path: ${{ env.pythonLocation }} - key: ${{ runner.os }}-python-github-actions-${{ env.pythonLocation }}-${{ hashFiles('requirements-github-actions.txt') }}-v01 + version: "0.4.15" + enable-cache: true + cache-dependency-glob: | + requirements**.txt + pyproject.toml - name: Install GitHub Actions dependencies - if: steps.cache.outputs.cache-hit != 'true' - run: pip install -r requirements-github-actions.txt + run: uv pip install -r requirements-github-actions.txt - name: Deploy Docs Status Pending run: python ./scripts/deploy_docs_status.py env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COMMIT_SHA: ${{ github.event.workflow_run.head_sha }} RUN_ID: ${{ github.run_id }} - - name: Clean site run: | rm -rf ./site diff --git a/.github/workflows/label-approved.yml b/.github/workflows/label-approved.yml index 0470fb606..e44584cf1 100644 --- a/.github/workflows/label-approved.yml +++ b/.github/workflows/label-approved.yml @@ -8,6 +8,9 @@ on: permissions: pull-requests: write +env: + UV_SYSTEM_PYTHON: 1 + jobs: label-approved: if: github.repository_owner == 'fastapi' @@ -19,8 +22,22 @@ jobs: run: echo "$GITHUB_CONTEXT" - uses: docker://tiangolo/label-approved:0.0.4 with: - token: ${{ secrets.GITHUB_TOKEN }} - config: > + python-version: "3.11" + - name: Setup uv + uses: astral-sh/setup-uv@v3 + with: + version: "0.4.15" + enable-cache: true + cache-dependency-glob: | + requirements**.txt + pyproject.toml + - name: Install GitHub Actions dependencies + run: uv pip install -r requirements-github-actions.txt + - name: Label Approved + run: python ./scripts/label_approved.py + env: + TOKEN: ${{ secrets.GITHUB_TOKEN }} + CONFIG: > { "approved-1": { diff --git a/.github/workflows/notify-translations.yml b/.github/workflows/notify-translations.yml index 4787f3ddd..98aa41e5a 100644 --- a/.github/workflows/notify-translations.yml +++ b/.github/workflows/notify-translations.yml @@ -18,6 +18,9 @@ on: permissions: discussions: write +env: + UV_SYSTEM_PYTHON: 1 + jobs: notify-translations: runs-on: ubuntu-latest @@ -27,6 +30,19 @@ jobs: GITHUB_CONTEXT: ${{ toJson(github) }} run: echo "$GITHUB_CONTEXT" - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: Setup uv + uses: astral-sh/setup-uv@v3 + with: + version: "0.4.15" + enable-cache: true + cache-dependency-glob: | + requirements**.txt + pyproject.toml # Allow debugging with tmate - name: Setup tmate session uses: mxschmitt/action-tmate@v3 diff --git a/.github/workflows/smokeshow.yml b/.github/workflows/smokeshow.yml index d3a975df5..e9aa1093f 100644 --- a/.github/workflows/smokeshow.yml +++ b/.github/workflows/smokeshow.yml @@ -8,6 +8,9 @@ on: permissions: statuses: write +env: + UV_SYSTEM_PYTHON: 1 + jobs: smokeshow: if: ${{ github.event.workflow_run.conclusion == 'success' }} @@ -21,16 +24,21 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3.9' - - - run: pip install smokeshow - + - name: Setup uv + uses: astral-sh/setup-uv@v3 + with: + version: "0.4.15" + enable-cache: true + cache-dependency-glob: | + requirements**.txt + pyproject.toml + - run: uv pip install -r requirements-github-actions.txt - uses: actions/download-artifact@v4 with: name: coverage-html path: htmlcov github-token: ${{ secrets.GITHUB_TOKEN }} run-id: ${{ github.event.workflow_run.id }} - - run: smokeshow upload htmlcov env: SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fb4b083c4..643037a12 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,6 +12,9 @@ on: # cron every week on monday - cron: "0 0 * * 1" +env: + UV_SYSTEM_PYTHON: 1 + jobs: lint: runs-on: ubuntu-latest @@ -25,19 +28,18 @@ jobs: uses: actions/setup-python@v5 with: python-version: "3.11" - # Issue ref: https://github.com/actions/setup-python/issues/436 - # cache: "pip" - # cache-dependency-path: pyproject.toml - - uses: actions/cache@v4 - id: cache + - name: Setup uv + uses: astral-sh/setup-uv@v3 with: - path: ${{ env.pythonLocation }} - key: ${{ runner.os }}-python-${{ env.pythonLocation }}-pydantic-v2-${{ hashFiles('pyproject.toml', 'requirements-tests.txt', 'requirements-docs-tests.txt') }}-test-v08 + version: "0.4.15" + enable-cache: true + cache-dependency-glob: | + requirements**.txt + pyproject.toml - name: Install Dependencies - if: steps.cache.outputs.cache-hit != 'true' - run: pip install -r requirements-tests.txt + run: uv pip install -r requirements-tests.txt - name: Install Pydantic v2 - run: pip install --upgrade "pydantic>=2.0.2,<3.0.0" + run: uv pip install --upgrade "pydantic>=2.0.2,<3.0.0" - name: Lint run: bash scripts/lint.sh @@ -63,23 +65,22 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - # Issue ref: https://github.com/actions/setup-python/issues/436 - # cache: "pip" - # cache-dependency-path: pyproject.toml - - uses: actions/cache@v4 - id: cache + - name: Setup uv + uses: astral-sh/setup-uv@v3 with: - path: ${{ env.pythonLocation }} - key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ matrix.pydantic-version }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt', 'requirements-docs-tests.txt') }}-test-v08 + version: "0.4.15" + enable-cache: true + cache-dependency-glob: | + requirements**.txt + pyproject.toml - name: Install Dependencies - if: steps.cache.outputs.cache-hit != 'true' - run: pip install -r requirements-tests.txt + run: uv pip install -r requirements-tests.txt - name: Install Pydantic v1 if: matrix.pydantic-version == 'pydantic-v1' - run: pip install "pydantic>=1.10.0,<2.0.0" + run: uv pip install "pydantic>=1.10.0,<2.0.0" - name: Install Pydantic v2 if: matrix.pydantic-version == 'pydantic-v2' - run: pip install --upgrade "pydantic>=2.0.2,<3.0.0" + run: uv pip install --upgrade "pydantic>=2.0.2,<3.0.0" - run: mkdir coverage - name: Test run: bash scripts/test.sh @@ -105,16 +106,22 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3.8' - # Issue ref: https://github.com/actions/setup-python/issues/436 - # cache: "pip" - # cache-dependency-path: pyproject.toml + - name: Setup uv + uses: astral-sh/setup-uv@v3 + with: + version: "0.4.15" + enable-cache: true + cache-dependency-glob: | + requirements**.txt + pyproject.toml + - name: Install Dependencies + run: uv pip install -r requirements-tests.txt - name: Get coverage files uses: actions/download-artifact@v4 with: pattern: coverage-* path: coverage merge-multiple: true - - run: pip install coverage[toml] - run: ls -la coverage - run: coverage combine coverage - run: coverage report diff --git a/requirements-github-actions.txt b/requirements-github-actions.txt index 559dc06fb..a6dace544 100644 --- a/requirements-github-actions.txt +++ b/requirements-github-actions.txt @@ -2,3 +2,4 @@ PyGithub>=2.3.0,<3.0.0 pydantic>=2.5.3,<3.0.0 pydantic-settings>=2.1.0,<3.0.0 httpx>=0.27.0,<0.28.0 +smokeshow From ac6c08c71f816cfa60502bd410deca75f0b580ae Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 12 Oct 2024 12:28:10 +0000 Subject: [PATCH 86/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 90e45367b..30f98970a 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -9,6 +9,7 @@ hide: ### Internal +* đŸ‘· Use uv in CI. PR [#12281](https://github.com/fastapi/fastapi/pull/12281) by [@tiangolo](https://github.com/tiangolo). * ⬆ Update httpx requirement from <0.25.0,>=0.23.0 to >=0.23.0,<0.28.0. PR [#11509](https://github.com/fastapi/fastapi/pull/11509) by [@dependabot[bot]](https://github.com/apps/dependabot). ## 0.115.2 From 495d90161bae81d7e037b6c7998a9ab6e89d58a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sat, 12 Oct 2024 15:47:46 +0200 Subject: [PATCH 87/90] =?UTF-8?q?=F0=9F=91=B7=20Fix=20smokeshow,=20checkou?= =?UTF-8?q?t=20files=20on=20CI=20(#12434)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/smokeshow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/smokeshow.yml b/.github/workflows/smokeshow.yml index e9aa1093f..daff8e244 100644 --- a/.github/workflows/smokeshow.yml +++ b/.github/workflows/smokeshow.yml @@ -21,6 +21,7 @@ jobs: env: GITHUB_CONTEXT: ${{ toJson(github) }} run: echo "$GITHUB_CONTEXT" + - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: '3.9' From 84ef149f838ab932f4ade3f1adbe566cece1b4fb Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 12 Oct 2024 13:49:27 +0000 Subject: [PATCH 88/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 30f98970a..e0988f461 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -9,6 +9,7 @@ hide: ### Internal +* đŸ‘· Fix smokeshow, checkout files on CI. PR [#12434](https://github.com/fastapi/fastapi/pull/12434) by [@tiangolo](https://github.com/tiangolo). * đŸ‘· Use uv in CI. PR [#12281](https://github.com/fastapi/fastapi/pull/12281) by [@tiangolo](https://github.com/tiangolo). * ⬆ Update httpx requirement from <0.25.0,>=0.23.0 to >=0.23.0,<0.28.0. PR [#11509](https://github.com/fastapi/fastapi/pull/11509) by [@dependabot[bot]](https://github.com/apps/dependabot). From 6384f730f7e672d4cea8c951dfa9c9e8bb3481f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sat, 12 Oct 2024 15:58:30 +0200 Subject: [PATCH 89/90] =?UTF-8?q?=F0=9F=91=B7=20Refactor=20label-approved,?= =?UTF-8?q?=20make=20it=20an=20internal=20script=20instead=20of=20an=20ext?= =?UTF-8?q?ernal=20GitHub=20Action=20(#12280)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/label-approved.yml | 4 +- scripts/label_approved.py | 60 ++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 scripts/label_approved.py diff --git a/.github/workflows/label-approved.yml b/.github/workflows/label-approved.yml index e44584cf1..11176bed8 100644 --- a/.github/workflows/label-approved.yml +++ b/.github/workflows/label-approved.yml @@ -20,7 +20,9 @@ jobs: env: GITHUB_CONTEXT: ${{ toJson(github) }} run: echo "$GITHUB_CONTEXT" - - uses: docker://tiangolo/label-approved:0.0.4 + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 with: python-version: "3.11" - name: Setup uv diff --git a/scripts/label_approved.py b/scripts/label_approved.py new file mode 100644 index 000000000..271444504 --- /dev/null +++ b/scripts/label_approved.py @@ -0,0 +1,60 @@ +import logging +from typing import Literal + +from github import Github +from github.PullRequestReview import PullRequestReview +from pydantic import BaseModel, SecretStr +from pydantic_settings import BaseSettings + + +class LabelSettings(BaseModel): + await_label: str | None = None + number: int + + +default_config = {"approved-2": LabelSettings(await_label="awaiting-review", number=2)} + + +class Settings(BaseSettings): + github_repository: str + token: SecretStr + debug: bool | None = False + config: dict[str, LabelSettings] | Literal[""] = default_config + + +settings = Settings() +if settings.debug: + logging.basicConfig(level=logging.DEBUG) +else: + logging.basicConfig(level=logging.INFO) +logging.debug(f"Using config: {settings.json()}") +g = Github(settings.token.get_secret_value()) +repo = g.get_repo(settings.github_repository) +for pr in repo.get_pulls(state="open"): + logging.info(f"Checking PR: #{pr.number}") + pr_labels = list(pr.get_labels()) + pr_label_by_name = {label.name: label for label in pr_labels} + reviews = list(pr.get_reviews()) + review_by_user: dict[str, PullRequestReview] = {} + for review in reviews: + if review.user.login in review_by_user: + stored_review = review_by_user[review.user.login] + if review.submitted_at >= stored_review.submitted_at: + review_by_user[review.user.login] = review + else: + review_by_user[review.user.login] = review + approved_reviews = [ + review for review in review_by_user.values() if review.state == "APPROVED" + ] + config = settings.config or default_config + for approved_label, conf in config.items(): + logging.debug(f"Processing config: {conf.json()}") + if conf.await_label is None or (conf.await_label in pr_label_by_name): + logging.debug(f"Processable PR: {pr.number}") + if len(approved_reviews) >= conf.number: + logging.info(f"Adding label to PR: {pr.number}") + pr.add_to_labels(approved_label) + if conf.await_label: + logging.info(f"Removing label from PR: {pr.number}") + pr.remove_from_labels(conf.await_label) +logging.info("Finished") From 766a14ddff6d710d483ba8cd06c3e7d05bd459f0 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 12 Oct 2024 13:59:03 +0000 Subject: [PATCH 90/90] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index e0988f461..f94faf4b7 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -9,6 +9,7 @@ hide: ### Internal +* đŸ‘· Refactor label-approved, make it an internal script instead of an external GitHub Action. PR [#12280](https://github.com/fastapi/fastapi/pull/12280) by [@tiangolo](https://github.com/tiangolo). * đŸ‘· Fix smokeshow, checkout files on CI. PR [#12434](https://github.com/fastapi/fastapi/pull/12434) by [@tiangolo](https://github.com/tiangolo). * đŸ‘· Use uv in CI. PR [#12281](https://github.com/fastapi/fastapi/pull/12281) by [@tiangolo](https://github.com/tiangolo). * ⬆ Update httpx requirement from <0.25.0,>=0.23.0 to >=0.23.0,<0.28.0. PR [#11509](https://github.com/fastapi/fastapi/pull/11509) by [@dependabot[bot]](https://github.com/apps/dependabot).

$5q*9#iM5)%>&v0gd! zyZF&jUgHLy<$t{|B@!rcCYlN(<8<711<7BNqtlstc+6$|ApFg$(EFe2n>#ZQ^6NTA zV?L3(%3r>UQz_P(y+1mW1C5^@tToj$OF${on>^DdzqnP!F?(zY1NsZ%RoJ{2`ySEJ zs8^8xu4HCGW(0x3&e>;!-qzd~8jF~`iADBMe@nd0sGec<7_8vjyv92G!-`@oJ(bVf z;}GscvNk5QqW4L@y4>S?iod#Aq4cygAQh&GUfM()M%>?-)>(ss1Cx`|e0(QEbB%I& zzvS7lbI}{Ms8gornB3pnI}L}QV=lh#?S&PqWl&O6lkZo^|Ai{4UabUxIh*Uqap<%a z942kMmK{6JKjl6Q&vBQ@a1=e#{PipAt&YQN{TBzLkv_+mSuZ!;s^&RY-zkx8rGXQ=F>fUD!J6n;ce34}ZTO*uP3g>D&8S-Jnu z&rtgJtzsXAgd}!Of0TwhQx4m(zTE^8UMXJ`_-Bd(e zzF=$?3;i-(5dyrX6MIBD!VYkKq|WkqEr$VXfi5iv4}oo|sHycJ=Dg^nV;a#8f`_PI z9qms0 zBCQ#YMP#w=xs1@nkN$(mk^cYiDQoBXkexFaywmFJ>)Y=dFlYoUL_|hj)XbMcp}VVw z_g_BUGc{2$DQ6WH6#k21IsVlGdWEcPS~q7LKZ8LvHQ43> z@s07I{6u%-7S3Iczl`4h@-_Xt{KFXjU!T+J%Iq->$6cHcyGB_1YQP1I7HTsKBZa)io&SCsAuR>FwgZs4OFPeIi`*2Mu>GU*fK3qO8~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databases.md @@ -1,22 +1,18 @@ # SQL (Relational) Databases -/// info +**FastAPI** doesn't require you to use a SQL (relational) database. But you can use **any database** that you want. -These docs are about to be updated. 🎉 +Here we'll see an example using SQLModel. -The current version assumes Pydantic v1, and SQLAlchemy versions less than 2.0. +**SQLModel** is built on top of SQLAlchemy and Pydantic. It was made by the same author of **FastAPI** to be the perfect match for FastAPI applications that need to use **SQL databases**. -The new docs will include Pydantic v2 and will use SQLModel (which is also based on SQLAlchemy) once it is updated to use Pydantic v2 as well. - -/// - -**FastAPI** doesn't require you to use a SQL (relational) database. +/// tip -But you can use any relational database that you want. +You could use any other SQL or NoSQL database library you want (in some cases called "ORMs"), FastAPI doesn't force you to use anything. 😎 -Here we'll see an example using SQLAlchemy. +/// -You can easily adapt it to any database supported by SQLAlchemy, like: +As SQLModel is based on SQLAlchemy, you can easily use **any database supported** by SQLAlchemy (which makes them also supported by SQLModel), like: * PostgreSQL * MySQL @@ -30,891 +26,335 @@ Later, for your production application, you might want to use a database server /// tip -There is an official project generator with **FastAPI** and **PostgreSQL**, all based on **Docker**, including a frontend and more tools: https://github.com/tiangolo/full-stack-fastapi-postgresql - -/// - -/// note - -Notice that most of the code is the standard `SQLAlchemy` code you would use with any framework. - -The **FastAPI** specific code is as small as always. - -/// - -## ORMs - -**FastAPI** works with any database and any style of library to talk to the database. - -A common pattern is to use an "ORM": an "object-relational mapping" library. - -An ORM has tools to convert ("*map*") between *objects* in code and database tables ("*relations*"). - -With an ORM, you normally create a class that represents a table in a SQL database, each attribute of the class represents a column, with a name and a type. - -For example a class `Pet` could represent a SQL table `pets`. - -And each *instance* object of that class represents a row in the database. - -For example an object `orion_cat` (an instance of `Pet`) could have an attribute `orion_cat.type`, for the column `type`. And the value of that attribute could be, e.g. `"cat"`. - -These ORMs also have tools to make the connections or relations between tables or entities. - -This way, you could also have an attribute `orion_cat.owner` and the owner would contain the data for this pet's owner, taken from the table *owners*. - -So, `orion_cat.owner.name` could be the name (from the `name` column in the `owners` table) of this pet's owner. - -It could have a value like `"Arquilian"`. - -And the ORM will do all the work to get the information from the corresponding table *owners* when you try to access it from your pet object. - -Common ORMs are for example: Django-ORM (part of the Django framework), SQLAlchemy ORM (part of SQLAlchemy, independent of framework) and Peewee (independent of framework), among others. - -Here we will see how to work with **SQLAlchemy ORM**. - -In a similar way you could use any other ORM. - -/// tip - -There's an equivalent article using Peewee here in the docs. +There is an official project generator with **FastAPI** and **PostgreSQL** including a frontend and more tools: https://github.com/fastapi/full-stack-fastapi-template /// -## File structure - -For these examples, let's say you have a directory named `my_super_project` that contains a sub-directory called `sql_app` with a structure like this: - -``` -. -└── sql_app - ├── __init__.py - ├── crud.py - ├── database.py - ├── main.py - ├── models.py - └── schemas.py -``` - -The file `__init__.py` is just an empty file, but it tells Python that `sql_app` with all its modules (Python files) is a package. - -Now let's see what each file/module does. - -## Install `SQLAlchemy` +This is a very simple and short tutorial, if you want to learn about databases in general, about SQL, or more advanced features, go to the SQLModel docs. -First you need to install `SQLAlchemy`. +## Install `SQLModel` -Make sure you create a [virtual environment](../virtual-environments.md){.internal-link target=_blank}, activate it, and then install it, for example: +First, make sure you create your [virtual environment](../virtual-environments.md){.internal-link target=_blank}, activate it, and then install `sqlmodel`: