Compare commits

..

1 Commits

Author SHA1 Message Date
github-actions[bot]
f20d71b692 🌐 Update translations for es (update-outdated) 2026-06-15 06:57:28 +00:00
20 changed files with 41 additions and 41 deletions

View File

@@ -192,7 +192,7 @@ $ pip install "fastapi[standard]"
</div>
**Hinweis**: Stellen Sie sicher, dass Sie fastapi[standard] in Anführungszeichen setzen, damit es in allen Terminals funktioniert.
**Hinweis**: Stellen Sie sicher, dass Sie `"fastapi[standard]"` in Anführungszeichen setzen, damit es in allen Terminals funktioniert.
## Beispiel { #example }
@@ -492,7 +492,9 @@ Für ein vollständigeres Beispiel, mit weiteren Funktionen, siehe das <a href="
### Ihre App deployen (optional) { #deploy-your-app-optional }
Optional können Sie Ihre FastAPI-App mit einem einzigen Befehl in die [FastAPI Cloud](https://fastapicloud.com) deployen. 🚀
Optional können Sie Ihre FastAPI-App in die [FastAPI Cloud](https://fastapicloud.com) deployen, gehen Sie und treten Sie der Warteliste bei, falls noch nicht geschehen. 🚀
Wenn Sie bereits ein **FastAPI Cloud**-Konto haben (wir haben Sie von der Warteliste eingeladen 😉), können Sie Ihre Anwendung mit einem einzigen Befehl deployen.
<div class="termy">
@@ -508,8 +510,6 @@ Deploying to FastAPI Cloud...
</div>
Das CLI erkennt Ihre FastAPI-Anwendung automatisch und deployt sie in die Cloud. Wenn Sie nicht eingeloggt sind, wird Ihr Browser geöffnet, um den Authentifizierungsprozess abzuschließen.
Das wars! Jetzt können Sie unter dieser URL auf Ihre App zugreifen. ✨
#### Über FastAPI Cloud { #about-fastapi-cloud }

View File

@@ -108,7 +108,7 @@ Zum Beispiel:
{* ../../docs_src/body_multiple_params/tutorial004_an_py310.py hl[28] *}
/// note | Hinweis
/// info | Info
`Body` hat die gleichen zusätzlichen Validierungs- und Metadaten-Parameter wie `Query`, `Path` und andere, die Sie später kennenlernen werden.
@@ -123,7 +123,7 @@ Standardmäßig wird **FastAPI** dann seinen Body direkt erwarten.
Aber wenn Sie möchten, dass es einen JSON-Body mit einem Schlüssel `item` erwartet, und darin den Inhalt des Modells, so wie es das tut, wenn Sie mehrere Body-Parameter deklarieren, dann können Sie den speziellen `Body`-Parameter `embed` setzen:
```Python
item: Annotated[Item, Body(embed=True)]
item: Item = Body(embed=True)
```
so wie in:

View File

@@ -8,7 +8,7 @@ Ihre API muss fast immer einen **Response**body senden. Aber Clients müssen nic
Um einen **Request**body zu deklarieren, verwenden Sie [Pydantic](https://docs.pydantic.dev/)-Modelle mit all deren Fähigkeiten und Vorzügen.
/// note | Hinweis
/// info | Info
Um Daten zu senden, sollten Sie eines von: `POST` (meistverwendet), `PUT`, `DELETE` oder `PATCH` verwenden.

View File

@@ -24,13 +24,13 @@ Aber denken Sie daran, dass, wenn Sie `Query`, `Path`, `Cookie` und andere von `
///
/// note | Hinweis
/// info | Info
Um Cookies zu deklarieren, müssen Sie `Cookie` verwenden, da die Parameter sonst als Query-Parameter interpretiert würden.
///
/// note | Hinweis
/// info | Info
Beachten Sie, dass **Browser Cookies auf besondere Weise und hinter den Kulissen handhaben** und **JavaScript** **nicht** ohne Weiteres erlauben, auf sie zuzugreifen.

View File

@@ -72,13 +72,13 @@ Sie können die Response mit dem Parameter `response_description` beschreiben:
{* ../../docs_src/path_operation_configuration/tutorial005_py310.py hl[18] *}
/// note | Hinweis
/// info | Info
Beachten Sie, dass sich `response_description` speziell auf die Response bezieht, während `description` sich generell auf die *Pfadoperation* bezieht.
///
/// tip | Tipp
/// check | Testen
OpenAPI verlangt, dass jede *Pfadoperation* über eine Beschreibung der Response verfügt.

View File

@@ -8,7 +8,7 @@ Importieren Sie zuerst `Path` von `fastapi`, und importieren Sie `Annotated`:
{* ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py hl[1,3] *}
/// note | Hinweis
/// info | Info
FastAPI hat in Version 0.95.0 Unterstützung für `Annotated` hinzugefügt und es zur Verwendung empfohlen.
@@ -131,7 +131,7 @@ Und Sie können auch Zahlenvalidierungen deklarieren:
* `lt`: `l`ess `t`han (kleiner als)
* `le`: `l`ess than or `e`qual (kleiner oder gleich)
/// note | Hinweis
/// info | Info
`Query`, `Path`, und andere Klassen, die Sie später sehen werden, sind Unterklassen einer gemeinsamen `Param`-Klasse.

View File

@@ -2,7 +2,7 @@
Sie können Dateien, die vom Client hochgeladen werden, mithilfe von `File` definieren.
/// note | Hinweis
/// info | Info
Um hochgeladene Dateien zu empfangen, installieren Sie zuerst [`python-multipart`](https://github.com/Kludex/python-multipart).
@@ -28,7 +28,7 @@ Erstellen Sie Datei-Parameter, so wie Sie es auch mit `Body` und `Form` machen w
{* ../../docs_src/request_files/tutorial001_an_py310.py hl[9] *}
/// note | Hinweis
/// info | Info
`File` ist eine Klasse, die direkt von `Form` erbt.

View File

@@ -2,7 +2,7 @@
Sie können gleichzeitig Dateien und Formulardaten mit `File` und `Form` definieren.
/// note | Hinweis
/// info | Info
Um hochgeladene Dateien und/oder Formulardaten zu empfangen, installieren Sie zuerst [`python-multipart`](https://github.com/Kludex/python-multipart).

View File

@@ -18,7 +18,7 @@ Beachten Sie, dass `status_code` ein Parameter der „Dekorator“-Methode ist (
Dem `status_code`-Parameter wird eine Zahl mit dem HTTP-Statuscode übergeben.
/// note | Hinweis
/// info | Info
Alternativ kann `status_code` auch ein `IntEnum` erhalten, wie etwa Pythons [`http.HTTPStatus`](https://docs.python.org/3/library/http.html#http.HTTPStatus).

View File

@@ -8,7 +8,7 @@ Damit können Sie [pytest](https://docs.pytest.org/) direkt mit **FastAPI** verw
## `TestClient` verwenden { #using-testclient }
/// note | Hinweis
/// info | Info
Um `TestClient` zu verwenden, installieren Sie zunächst [`httpx`](https://www.python-httpx.org).
@@ -145,7 +145,7 @@ Z. B.:
Weitere Informationen zum Übergeben von Daten an das Backend (mithilfe von `httpx` oder dem `TestClient`) finden Sie in der [HTTPX-Dokumentation](https://www.python-httpx.org).
/// note | Hinweis
/// info | Info
Beachten Sie, dass der `TestClient` Daten empfängt, die nach JSON konvertiert werden können, keine Pydantic-Modelle.

View File

@@ -45,7 +45,7 @@ Las funcionalidades clave son:
* **Rápido**: Muy alto rendimiento, a la par con **NodeJS** y **Go** (gracias a Starlette y Pydantic). [Uno de los frameworks Python más rápidos disponibles](#performance).
* **Rápido de programar**: Aumenta la velocidad para desarrollar funcionalidades en aproximadamente un 200% a 300%. *
* **Menos bugs**: Reduce en aproximadamente un 40% los errores inducidos por humanos (desarrolladores). *
* **Intuitivo**: Gran soporte para editores. <dfn title="también conocido como: auto-complete, autocompletado, IntelliSense">Autocompletado</dfn> en todas partes. Menos tiempo depurando.
* **Intuitivo**: Gran soporte para editores. <dfn title="también conocido como: autocompletado, IntelliSense">Autocompletado</dfn> en todas partes. Menos tiempo depurando.
* **Fácil**: Diseñado para ser fácil de usar y aprender. Menos tiempo leyendo documentación.
* **Corto**: Minimiza la duplicación de código. Múltiples funcionalidades desde cada declaración de parámetro. Menos bugs.
* **Robusto**: Obtén código listo para producción. Con documentación interactiva automática.
@@ -492,9 +492,7 @@ Para un ejemplo más completo incluyendo más funcionalidades, ve al <a href="ht
### Despliega tu app (opcional) { #deploy-your-app-optional }
Opcionalmente puedes desplegar tu app de FastAPI en [FastAPI Cloud](https://fastapicloud.com), ve y únete a la lista de espera si no lo has hecho. 🚀
Si ya tienes una cuenta de **FastAPI Cloud** (te invitamos desde la lista de espera 😉), puedes desplegar tu aplicación con un solo comando.
Opcionalmente puedes desplegar tu app de FastAPI en [FastAPI Cloud](https://fastapicloud.com) con un solo comando. 🚀
<div class="termy">
@@ -510,6 +508,8 @@ Deploying to FastAPI Cloud...
</div>
La CLI detectará automáticamente tu aplicación de FastAPI y la desplegará en la nube. Si no has iniciado sesión, se abrirá tu navegador para completar el proceso de autenticación.
¡Eso es todo! Ahora puedes acceder a tu app en esa URL. ✨
#### Acerca de FastAPI Cloud { #about-fastapi-cloud }

View File

@@ -108,7 +108,7 @@ Por ejemplo:
{* ../../docs_src/body_multiple_params/tutorial004_an_py310.py hl[28] *}
/// info | Información
/// note | Nota
`Body` también tiene todos los mismos parámetros de validación y metadatos extras que `Query`, `Path` y otros que verás luego.
@@ -123,7 +123,7 @@ Por defecto, **FastAPI** esperará su cuerpo directamente.
Pero si deseas que espere un JSON con una clave `item` y dentro de ella los contenidos del modelo, como lo hace cuando declaras parámetros de cuerpo extra, puedes usar el parámetro especial `Body` `embed`:
```Python
item: Item = Body(embed=True)
item: Annotated[Item, Body(embed=True)]
```
como en:

View File

@@ -24,13 +24,13 @@ Pero recuerda que cuando importas `Query`, `Path`, `Cookie` y otros desde `fasta
///
/// info | Información
/// note | Nota
Para declarar cookies, necesitas usar `Cookie`, porque de lo contrario los parámetros serían interpretados como parámetros de query.
///
/// info | Información
/// note | Nota
Ten en cuenta que, como **los navegadores manejan las cookies** de formas especiales y por detrás, **no** permiten fácilmente que **JavaScript** las toque.

View File

@@ -62,7 +62,7 @@ from myapp import app
# Algún código adicional
```
en ese caso, la variable creada automáticamente dentro de `myapp.py` no tendrá la variable `__name__` con un valor de `"__main__"`.
en ese caso, la variable creada automáticamente `__name__` dentro de `myapp.py` no tendrá el valor `"__main__"`.
Así que, la línea:
@@ -72,7 +72,7 @@ Así que, la línea:
no se ejecutará.
/// info | Información
/// note | Nota
Para más información, revisa [la documentación oficial de Python](https://docs.python.org/3/library/__main__.html).
@@ -88,7 +88,7 @@ Por ejemplo, en Visual Studio Code, puedes:
* Ir al panel de "Debug".
* "Add configuration...".
* Seleccionar "Python".
* Seleccionar "Python"
* Ejecutar el depurador con la opción "`Python: Current File (Integrated Terminal)`".
Luego, iniciará el servidor con tu código **FastAPI**, deteniéndose en tus puntos de interrupción, etc.

View File

@@ -72,13 +72,13 @@ Puedes especificar la descripción del response con el parámetro `response_desc
{* ../../docs_src/path_operation_configuration/tutorial005_py310.py hl[18] *}
/// info | Información
/// note | Nota
Ten en cuenta que `response_description` se refiere específicamente al response, mientras que `description` se refiere a la *path operation* en general.
///
/// check | Revisa
/// tip | Consejo
OpenAPI especifica que cada *path operation* requiere una descripción de response.

View File

@@ -8,7 +8,7 @@ Primero, importa `Path` de `fastapi`, e importa `Annotated`:
{* ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py hl[1,3] *}
/// info | Información
/// note | Nota
FastAPI agregó soporte para `Annotated` (y comenzó a recomendar su uso) en la versión 0.95.0.
@@ -131,7 +131,7 @@ Y también puedes declarar validaciones numéricas:
* `lt`: `l`ess `t`han
* `le`: `l`ess than or `e`qual
/// info | Información
/// note | Nota
`Query`, `Path` y otras clases que verás más adelante son subclases de una clase común `Param`.

View File

@@ -2,7 +2,7 @@
Puedes definir archivos que serán subidos por el cliente utilizando `File`.
/// info | Información
/// note | Nota
Para recibir archivos subidos, primero instala [`python-multipart`](https://github.com/Kludex/python-multipart).
@@ -28,7 +28,7 @@ Crea parámetros de archivo de la misma manera que lo harías para `Body` o `For
{* ../../docs_src/request_files/tutorial001_an_py310.py hl[9] *}
/// info | Información
/// note | Nota
`File` es una clase que hereda directamente de `Form`.

View File

@@ -2,7 +2,7 @@
Puedes definir archivos y campos de formulario al mismo tiempo usando `File` y `Form`.
/// info | Información
/// note | Nota
Para recibir archivos subidos y/o form data, primero instala [`python-multipart`](https://github.com/Kludex/python-multipart).

View File

@@ -18,7 +18,7 @@ Observa que `status_code` es un parámetro del método "decorador" (`get`, `post
El parámetro `status_code` recibe un número con el código de estado HTTP.
/// info | Información
/// note | Nota
`status_code` también puede recibir un `IntEnum`, como por ejemplo el [`http.HTTPStatus`](https://docs.python.org/3/library/http.html#http.HTTPStatus) de Python.

View File

@@ -1,4 +1,4 @@
# Testing { #testing }
# Pruebas { #testing }
Gracias a [Starlette](https://www.starlette.dev/testclient/), escribir pruebas para aplicaciones de **FastAPI** es fácil y agradable.
@@ -8,7 +8,7 @@ Con él, puedes usar [pytest](https://docs.pytest.org/) directamente con **FastA
## Usando `TestClient` { #using-testclient }
/// info | Información
/// note | Nota
Para usar `TestClient`, primero instala [`httpx`](https://www.python-httpx.org).
@@ -142,7 +142,7 @@ Por ejemplo:
Para más información sobre cómo pasar datos al backend (usando `httpx` o el `TestClient`) revisa la [documentación de HTTPX](https://www.python-httpx.org).
/// info | Información
/// note | Nota
Ten en cuenta que el `TestClient` recibe datos que pueden ser convertidos a JSON, no modelos de Pydantic.