- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 64 for Decorator (0.04 sec)
-
tests/test_dependency_overrides.py
response = client.get("/decorator-depends/?q=foo") assert response.status_code == 200 assert response.json() == {"in": "decorator-depends"} def test_decorator_depends_q_foo_skip_100_limit_200(): response = client.get("/decorator-depends/?q=foo&skip=100&limit=200") assert response.status_code == 200 assert response.json() == {"in": "decorator-depends"} def test_router_depends():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 11.2K bytes - Viewed (0) -
docs/en/docs/tutorial/first-steps.md
You put it on top of a function. Like a pretty decorative hat (I guess that's where the term came from). A "decorator" takes the function below and does something with it. In our case, this decorator tells **FastAPI** that the function below corresponds to the **path** `/` with an **operation** `get`. It is the "**path operation decorator**". /// You can also use the other operations:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 12.8K bytes - Viewed (0) -
docs/es/docs/tutorial/first-steps.md
/// info | Información sobre `@decorator` Esa sintaxis `@algo` en Python se llama un "decorador". Lo pones encima de una función. Como un bonito sombrero decorativo (supongo que de ahí viene el término). Un "decorador" toma la función de abajo y hace algo con ella.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 13.3K bytes - Viewed (0) -
docs/es/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md
El decorador de *path operation* recibe un argumento opcional `dependencies`. Debe ser una `list` de `Depends()`: {* ../../docs_src/dependencies/tutorial006_an_py39.py hl[19] *} Estas dependencias serán ejecutadas/resueltas de la misma manera que las dependencias normales. Pero su valor (si devuelven alguno) no será pasado a tu *path operation function*.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 16:33:45 UTC 2025 - 3.1K bytes - Viewed (0) -
docs/en/docs/tutorial/path-operation-configuration.md
# Path Operation Configuration { #path-operation-configuration } There are several parameters that you can pass to your *path operation decorator* to configure it. /// warning Notice that these parameters are passed directly to the *path operation decorator*, not to your *path operation function*. /// ## Response Status Code { #response-status-code } You can define the (HTTP) `status_code` to be used in the response of your *path operation*.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.1K bytes - Viewed (0) -
docs/es/docs/tutorial/path-operation-configuration.md
# Configuración de Path Operation { #path-operation-configuration } Hay varios parámetros que puedes pasar a tu *path operation decorator* para configurarlo. /// warning | Advertencia Ten en cuenta que estos parámetros se pasan directamente al *path operation decorator*, no a tu *path operation function*. /// ## Código de Estado del Response { #response-status-code }Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.3K bytes - Viewed (0) -
docs/en/docs/tutorial/middleware.md
/// ## Create a middleware { #create-a-middleware } To create a middleware you use the decorator `@app.middleware("http")` on top of a function. The middleware function receives: * The `request`. * A function `call_next` that will receive the `request` as a parameter.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.1K bytes - Viewed (0) -
docs/es/docs/advanced/custom-response.md
Pero también puedes declarar el `Response` que quieres usar (por ejemplo, cualquier subclase de `Response`), en el *path operation decorator* usando el parámetro `response_class`. Los contenidos que devuelvas desde tu *path operation function* se colocarán dentro de esa `Response`.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 13.2K bytes - Viewed (0) -
docs/en/docs/advanced/custom-response.md
But you can also declare the `Response` that you want to be used (e.g. any `Response` subclass), in the *path operation decorator* using the `response_class` parameter. The contents that you return from your *path operation function* will be put inside of that `Response`.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 12.4K bytes - Viewed (0) -
docs/en/docs/tutorial/response-model.md
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 15.5K bytes - Viewed (0)