- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for informal (0.18 sec)
-
docs/en/docs/tutorial/testing.md
```Python hl_lines="2 12 15-18" {!../../../docs_src/app_testing/tutorial001.py!} ``` !!! tip Notice that the testing functions are normal `def`, not `async def`. And the calls to the client are also normal calls, not using `await`. This allows you to use `pytest` directly without complications. !!! note "Technical Details"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 6.2K bytes - Viewed (0) -
docs/en/docs/advanced/behind-a-proxy.md
But if you go with your browser to <a href="http://127.0.0.1:8000" class="external-link" target="_blank">http://127.0.0.1:8000/app</a> you will see the normal response: ```JSON { "message": "Hello World", "root_path": "/api/v1" } ``` So, it won't expect to be accessed at `http://127.0.0.1:8000/api/v1/app`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 11.6K bytes - Viewed (2) -
docs/en/docs/tutorial/first-steps.md
It will be called by **FastAPI** whenever it receives a request to the URL "`/`" using a `GET` operation. In this case, it is an `async` function. --- You could also define it as a normal function instead of `async def`: ```Python hl_lines="7" {!../../../docs_src/first_steps/tutorial003.py!} ``` !!! note
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 12K bytes - Viewed (0) -
docs/pt/docs/async.md
Se você tem algum conhecimento técnico (corrotinas, threads, blocking etc) e está curioso sobre como o FastAPI controla o `async def` vs normal `def`, vá em frente. ### Funções de operação de rota Quando você declara uma *função de operação de rota* com `def` normal ao invés de `async def`, ela é rodada em uma threadpool externa que então é aguardada, ao invés de ser chamada diretamente (ela poderia bloquear o servidor).
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 22.2K bytes - Viewed (0) -
docs/pt/docs/advanced/events.md
Você pode definir manipuladores de eventos (funções) que precisam ser executadas antes da aplicação inicializar, ou quando a aplicação estiver encerrando. Essas funções podem ser declaradas com `async def` ou `def` normal. ### Evento `startup` 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!} ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 8.6K bytes - Viewed (0) -
docs/en/docs/tutorial/bigger-applications.md
* The router dependencies are executed first, then the [`dependencies` in the decorator](dependencies/dependencies-in-path-operation-decorators.md){.internal-link target=_blank}, and then the normal parameter dependencies. * You can also add [`Security` dependencies with `scopes`](../advanced/security/oauth2-scopes.md){.internal-link target=_blank}. !!! tip
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 18.6K bytes - Viewed (0) -
docs/en/docs/release-notes.md
* This allows adding extra code after a dependency is done. It can be used, for example, to close database connections. * Dependencies with `yield` can be normal or `async`, **FastAPI** will run normal dependencies in a threadpool. * They can be combined with normal dependencies. * It's possible to have arbitrary trees/levels of dependencies with `yield` and exit steps are handled in the correct order automatically.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri May 03 23:25:42 GMT 2024 - 388.1K bytes - Viewed (1) -
docs/pt/docs/tutorial/first-steps.md
Você o coloca em cima de uma função. Como um chapéu decorativo (acho que é daí que vem o termo). Um "decorador" pega a função abaixo e faz algo com ela. Em nosso caso, este decorador informa ao **FastAPI** que a função abaixo corresponde a **rota** `/` com uma **operação** `get`. É o "**decorador de rota**". Você também pode usar as outras operações: * `@app.post()` * `@app.put()`
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 9.6K bytes - Viewed (0) -
docs/tr/docs/async.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 21.9K bytes - Viewed (0) -
docs/en/docs/advanced/openapi-callbacks.md
## The normal **FastAPI** app Let's first see how the normal API app would look like before adding the callback. It will have a *path operation* that will receive an `Invoice` body, and a query parameter `callback_url` that will contain the URL for the callback. This part is pretty normal, most of the code is probably already familiar to you:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 7.7K bytes - Viewed (0)