mirror of
https://github.com/fastapi/fastapi.git
synced 2026-01-01 02:29:46 -05:00
Compare commits
30 Commits
translate-
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
53d2453d1a | ||
|
|
d9b7b65b81 | ||
|
|
9ed5f246ed | ||
|
|
edf7995775 | ||
|
|
47391ea8fb | ||
|
|
3b1b4f034b | ||
|
|
f362fdc234 | ||
|
|
4ce34686d9 | ||
|
|
dbe83f3919 | ||
|
|
13743e115a | ||
|
|
52842fb8d3 | ||
|
|
4d4fb28f9f | ||
|
|
a1735d6d11 | ||
|
|
1b42639296 | ||
|
|
ded035a421 | ||
|
|
44c849c4fc | ||
|
|
8322a4445a | ||
|
|
4b2cfcfd34 | ||
|
|
e300630551 | ||
|
|
1b3bea8b6b | ||
|
|
34e884156f | ||
|
|
cd90c78391 | ||
|
|
93f4dfd88b | ||
|
|
535b5daa31 | ||
|
|
6b53786f62 | ||
|
|
d98f4eb56e | ||
|
|
8cefc4b7cc | ||
|
|
3063ada72f | ||
|
|
5eb8d6ed8a | ||
|
|
7c751a2e1c |
4
.github/workflows/translate.yml
vendored
4
.github/workflows/translate.yml
vendored
@@ -1,8 +1,8 @@
|
||||
name: Translate
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 5 15 * *" # Run at 05:00 on the 15 of every month
|
||||
# schedule:
|
||||
# - cron: "0 5 15 * *" # Run at 05:00 on the 15 of every month
|
||||
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
|
||||
@@ -12,15 +12,23 @@ repos:
|
||||
- --unsafe
|
||||
- id: end-of-file-fixer
|
||||
- id: trailing-whitespace
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.14.3
|
||||
hooks:
|
||||
- id: ruff
|
||||
args:
|
||||
- --fix
|
||||
- id: ruff-format
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: local-ruff-check
|
||||
name: ruff check
|
||||
entry: uv run ruff check --force-exclude --fix --exit-non-zero-on-fix
|
||||
require_serial: true
|
||||
language: unsupported
|
||||
types: [python]
|
||||
|
||||
- id: local-ruff-format
|
||||
name: ruff format
|
||||
entry: uv run ruff format --force-exclude --exit-non-zero-on-format
|
||||
require_serial: true
|
||||
language: unsupported
|
||||
types: [python]
|
||||
|
||||
- id: add-permalinks-pages
|
||||
language: unsupported
|
||||
name: add-permalinks-pages
|
||||
@@ -28,18 +36,21 @@ repos:
|
||||
args:
|
||||
- --update-existing
|
||||
files: ^docs/en/docs/.*\.md$
|
||||
|
||||
- id: generate-readme
|
||||
language: unsupported
|
||||
name: generate README.md from index.md
|
||||
entry: uv run ./scripts/docs.py generate-readme
|
||||
files: ^docs/en/docs/index\.md|docs/en/data/sponsors\.yml|scripts/docs\.py$
|
||||
pass_filenames: false
|
||||
|
||||
- id: update-languages
|
||||
language: unsupported
|
||||
name: update languages
|
||||
entry: uv run ./scripts/docs.py update-languages
|
||||
files: ^docs/.*|scripts/docs\.py$
|
||||
pass_filenames: false
|
||||
|
||||
- id: ensure-non-translated
|
||||
language: unsupported
|
||||
name: ensure non-translated files are not modified
|
||||
|
||||
@@ -4,7 +4,7 @@ FastAPI basiert auf **Pydantic**, und ich habe Ihnen gezeigt, wie Sie Pydantic-M
|
||||
|
||||
Aber FastAPI unterstützt auf die gleiche Weise auch die Verwendung von <a href="https://docs.python.org/3/library/dataclasses.html" class="external-link" target="_blank">`dataclasses`</a>:
|
||||
|
||||
{* ../../docs_src/dataclasses/tutorial001_py310.py hl[1,6:11,18:19] *}
|
||||
{* ../../docs_src/dataclasses_/tutorial001_py310.py hl[1,6:11,18:19] *}
|
||||
|
||||
Das ist dank **Pydantic** ebenfalls möglich, da es <a href="https://docs.pydantic.dev/latest/concepts/dataclasses/#use-of-stdlib-dataclasses-with-basemodel" class="external-link" target="_blank">`dataclasses` intern unterstützt</a>.
|
||||
|
||||
@@ -32,7 +32,7 @@ Wenn Sie jedoch eine Menge Datenklassen herumliegen haben, ist dies ein guter Tr
|
||||
|
||||
Sie können `dataclasses` auch im Parameter `response_model` verwenden:
|
||||
|
||||
{* ../../docs_src/dataclasses/tutorial002_py310.py hl[1,6:12,18] *}
|
||||
{* ../../docs_src/dataclasses_/tutorial002_py310.py hl[1,6:12,18] *}
|
||||
|
||||
Die Datenklasse wird automatisch in eine Pydantic-Datenklasse konvertiert.
|
||||
|
||||
@@ -48,7 +48,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:
|
||||
|
||||
{* ../../docs_src/dataclasses/tutorial003_py310.py hl[1,4,7:10,13:16,22:24,27] *}
|
||||
{* ../../docs_src/dataclasses_/tutorial003_py310.py hl[1,4,7:10,13:16,22:24,27] *}
|
||||
|
||||
1. Wir importieren `field` weiterhin von Standard-`dataclasses`.
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ Abhängig von Ihrem Anwendungsfall könnten Sie eine andere Bibliothek vorziehen
|
||||
|
||||
Hier ist eine kleine Vorschau, wie Sie Strawberry mit FastAPI integrieren können:
|
||||
|
||||
{* ../../docs_src/graphql/tutorial001_py39.py hl[3,22,25] *}
|
||||
{* ../../docs_src/graphql_/tutorial001_py39.py hl[3,22,25] *}
|
||||
|
||||
Weitere Informationen zu Strawberry finden Sie in der <a href="https://strawberry.rocks/" class="external-link" target="_blank">Strawberry-Dokumentation</a>.
|
||||
|
||||
|
||||
@@ -117,6 +117,12 @@ Seine Schlüssel-Merkmale sind:
|
||||
|
||||
---
|
||||
|
||||
## FastAPI Mini-Dokumentarfilm { #fastapi-mini-documentary }
|
||||
|
||||
Es gibt einen <a href="https://www.youtube.com/watch?v=mpR8ngthqiE" class="external-link" target="_blank">FastAPI-Mini-Dokumentarfilm</a>, veröffentlicht Ende 2025, Sie können ihn online ansehen:
|
||||
|
||||
<a href="https://www.youtube.com/watch?v=mpR8ngthqiE" target="_blank"><img src="https://fastapi.tiangolo.com/img/fastapi-documentary.jpg" alt="FastAPI Mini-Dokumentarfilm"></a>
|
||||
|
||||
## **Typer**, das FastAPI der CLIs { #typer-the-fastapi-of-clis }
|
||||
|
||||
<a href="https://typer.tiangolo.com" target="_blank"><img src="https://typer.tiangolo.com/img/logo-margin/logo-margin-vector.svg" style="width: 20%;"></a>
|
||||
@@ -233,7 +239,7 @@ INFO: Application startup complete.
|
||||
</div>
|
||||
|
||||
<details markdown="1">
|
||||
<summary>Was der Befehl <code>fastapi dev main.py</code> macht ...</summary>
|
||||
<summary>Über den Befehl <code>fastapi dev main.py</code> ...</summary>
|
||||
|
||||
Der Befehl `fastapi dev` liest Ihre `main.py`-Datei, erkennt die **FastAPI**-App darin und startet einen Server mit <a href="https://www.uvicorn.dev" class="external-link" target="_blank">Uvicorn</a>.
|
||||
|
||||
@@ -276,7 +282,7 @@ Sie sehen die alternative automatische Dokumentation (bereitgestellt von <a href
|
||||
|
||||

|
||||
|
||||
## Beispiel Aktualisierung { #example-upgrade }
|
||||
## Beispielaktualisierung { #example-upgrade }
|
||||
|
||||
Ändern Sie jetzt die Datei `main.py`, um den <abbr title="Body – Körper, Inhalt: Der eigentliche Inhalt einer Nachricht, nicht die Metadaten">Body</abbr> eines `PUT`-Requests zu empfangen.
|
||||
|
||||
@@ -326,7 +332,7 @@ Gehen Sie jetzt auf <a href="http://127.0.0.1:8000/docs" class="external-link" t
|
||||
|
||||

|
||||
|
||||
* Klicken Sie dann auf den Button „Execute“, die Benutzeroberfläche wird mit Ihrer API kommunizieren, sendet die Parameter, holt die Ergebnisse und zeigt sie auf dem Bildschirm an:
|
||||
* Klicken Sie dann auf den Button „Execute“, die Benutzeroberfläche wird mit Ihrer API kommunizieren, die Parameter senden, die Ergebnisse erhalten und sie auf dem Bildschirm anzeigen:
|
||||
|
||||

|
||||
|
||||
@@ -439,7 +445,7 @@ Für ein vollständigeres Beispiel, mit weiteren Funktionen, siehe das <a href="
|
||||
|
||||
* Deklaration von **Parametern** von anderen verschiedenen Stellen wie: **Header**, **Cookies**, **Formularfelder** und **Dateien**.
|
||||
* Wie man **Validierungs-Constraints** wie `maximum_length` oder `regex` setzt.
|
||||
* Ein sehr leistungsfähiges und einfach zu bedienendes System für **<abbr title="Dependency Injection – Einbringen von Abhängigkeiten: Auch bekannt als Komponenten, Ressourcen, Provider, Services, Injectables">Dependency Injection</abbr>**.
|
||||
* Ein sehr leistungsfähiges und einfach zu bedienendes System für **<abbr title="auch bekannt als Komponenten, Ressourcen, Provider, Services, Injectables">Dependency Injection</abbr>**.
|
||||
* Sicherheit und Authentifizierung, einschließlich Unterstützung für **OAuth2** mit **JWT-Tokens** und **HTTP Basic** Authentifizierung.
|
||||
* Fortgeschrittenere (aber ebenso einfache) Techniken zur Deklaration **tief verschachtelter JSON-Modelle** (dank Pydantic).
|
||||
* **GraphQL**-Integration mit <a href="https://strawberry.rocks" class="external-link" target="_blank">Strawberry</a> und anderen Bibliotheken.
|
||||
@@ -452,7 +458,7 @@ 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 in die <a href="https://fastapicloud.com" class="external-link" target="_blank">FastAPI Cloud</a> deployen, treten Sie der Warteliste bei, falls noch nicht geschehen. 🚀
|
||||
Optional können Sie Ihre FastAPI-App in die <a href="https://fastapicloud.com" class="external-link" target="_blank">FastAPI Cloud</a> 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.
|
||||
|
||||
@@ -494,7 +500,7 @@ Es vereinfacht den Prozess des **Erstellens**, **Deployens** und **Zugreifens**
|
||||
|
||||
Es bringt die gleiche **Developer-Experience** beim Erstellen von Apps mit FastAPI auch zum **Deployment** in der Cloud. 🎉
|
||||
|
||||
FastAPI Cloud ist der Hauptsponsor und Finanzierer der „FastAPI and friends“ Open-Source-Projekte. ✨
|
||||
FastAPI Cloud ist der Hauptsponsor und Finanzierer der *FastAPI and friends* Open-Source-Projekte. ✨
|
||||
|
||||
#### Bei anderen Cloudanbietern deployen { #deploy-to-other-cloud-providers }
|
||||
|
||||
|
||||
@@ -4,213 +4,197 @@ Translate to German (Deutsch).
|
||||
|
||||
Language code: de.
|
||||
|
||||
|
||||
### Definitions
|
||||
|
||||
"hyphen"
|
||||
The character «-»
|
||||
Unicode U+002D (HYPHEN-MINUS)
|
||||
Alternative names: hyphen, dash, minus sign
|
||||
|
||||
"dash"
|
||||
The character «–»
|
||||
Unicode U+2013 (EN DASH)
|
||||
German name: Halbgeviertstrich
|
||||
|
||||
|
||||
### Grammar to use when talking to the reader
|
||||
|
||||
Use the formal grammar (use «Sie» instead of «Du»).
|
||||
|
||||
Use the formal grammar (use `Sie` instead of `Du`).
|
||||
|
||||
### Quotes
|
||||
|
||||
1) Convert neutral double quotes («"») and English double typographic quotes («“» and «”») to German double typographic quotes («„» and «“»). Convert neutral single quotes («'») and English single typographic quotes («‘» and «’») to German single typographic quotes («‚» and «‘»). Do NOT convert «`"» to «„», do NOT convert «"`» to «“».
|
||||
1) Convert neutral double quotes (`"`) to German double typographic quotes (`„` and `“`). Convert neutral single quotes (`'`) to German single typographic quotes (`‚` and `‘`).
|
||||
|
||||
Do NOT convert quotes in code snippets and code blocks to their German typographic equivalents.
|
||||
|
||||
Examples:
|
||||
|
||||
Source (English):
|
||||
Source (English):
|
||||
|
||||
«««
|
||||
"Hello world"
|
||||
“Hello Universe”
|
||||
"He said: 'Hello'"
|
||||
“my name is ‘Nils’”
|
||||
`"__main__"`
|
||||
`"items"`
|
||||
»»»
|
||||
```
|
||||
"Hello world"
|
||||
“Hello Universe”
|
||||
"He said: 'Hello'"
|
||||
“my name is ‘Nils’”
|
||||
`"__main__"`
|
||||
`"items"`
|
||||
```
|
||||
|
||||
Result (German):
|
||||
|
||||
«««
|
||||
„Hallo Welt“
|
||||
„Hallo Universum“
|
||||
„Er sagte: ‚Hallo‘“
|
||||
„Mein Name ist ‚Nils‘“
|
||||
`"__main__"`
|
||||
`"items"`
|
||||
»»»
|
||||
Result (German):
|
||||
|
||||
```
|
||||
„Hallo Welt“
|
||||
„Hallo Universum“
|
||||
„Er sagte: ‚Hallo‘“
|
||||
„Mein Name ist ‚Nils‘“
|
||||
`"__main__"`
|
||||
`"items"`
|
||||
```
|
||||
|
||||
### Ellipsis
|
||||
|
||||
1) Make sure there is a space between an ellipsis and a word following or preceding the ellipsis.
|
||||
- Make sure there is a space between an ellipsis and a word following or preceding the ellipsis.
|
||||
|
||||
Examples:
|
||||
|
||||
Source (English):
|
||||
Source (English):
|
||||
|
||||
«««
|
||||
...as we intended.
|
||||
...this would work:
|
||||
...etc.
|
||||
others...
|
||||
More to come...
|
||||
»»»
|
||||
```
|
||||
...as we intended.
|
||||
...this would work:
|
||||
...etc.
|
||||
others...
|
||||
More to come...
|
||||
```
|
||||
|
||||
Result (German):
|
||||
Result (German):
|
||||
|
||||
«««
|
||||
... wie wir es beabsichtigt hatten.
|
||||
... das würde funktionieren:
|
||||
... usw.
|
||||
Andere ...
|
||||
Später mehr ...
|
||||
»»»
|
||||
|
||||
2) This does not apply in URLs, code blocks, and code snippets. Do not remove or add spaces there.
|
||||
```
|
||||
... wie wir es beabsichtigt hatten.
|
||||
... das würde funktionieren:
|
||||
... usw.
|
||||
Andere ...
|
||||
Später mehr ...
|
||||
```
|
||||
|
||||
- This does not apply in URLs, code blocks, and code snippets. Do not remove or add spaces there.
|
||||
|
||||
### Headings
|
||||
|
||||
1) Translate headings using the infinite form.
|
||||
- Translate headings using the infinite form.
|
||||
|
||||
Examples:
|
||||
|
||||
Source (English):
|
||||
Source (English):
|
||||
|
||||
«««
|
||||
## Create a Project { #create-a-project }
|
||||
»»»
|
||||
```
|
||||
## Create a Project { #create-a-project }
|
||||
```
|
||||
|
||||
Translate with (German):
|
||||
Result (German):
|
||||
|
||||
«««
|
||||
## Ein Projekt erstellen { #create-a-project }
|
||||
»»»
|
||||
```
|
||||
## Ein Projekt erstellen { #create-a-project }
|
||||
```
|
||||
|
||||
Do NOT translate with (German):
|
||||
Do NOT translate with (German):
|
||||
|
||||
«««
|
||||
## Erstellen Sie ein Projekt { #create-a-project }
|
||||
»»»
|
||||
```
|
||||
## Erstellen Sie ein Projekt { #create-a-project }
|
||||
```
|
||||
|
||||
Source (English):
|
||||
Source (English):
|
||||
|
||||
«««
|
||||
# Install Packages { #install-packages }
|
||||
»»»
|
||||
```
|
||||
# Install Packages { #install-packages }
|
||||
```
|
||||
|
||||
Translate with (German):
|
||||
Translate with (German):
|
||||
|
||||
«««
|
||||
# Pakete installieren { #install-packages }
|
||||
»»»
|
||||
```
|
||||
# Pakete installieren { #install-packages }
|
||||
```
|
||||
|
||||
Do NOT translate with (German):
|
||||
Do NOT translate with (German):
|
||||
|
||||
«««
|
||||
# Installieren Sie Pakete { #install-packages }
|
||||
»»»
|
||||
```
|
||||
# Installieren Sie Pakete { #install-packages }
|
||||
```
|
||||
|
||||
Source (English):
|
||||
Source (English):
|
||||
|
||||
«««
|
||||
### Run Your Program { #run-your-program }
|
||||
»»»
|
||||
```
|
||||
### Run Your Program { #run-your-program }
|
||||
```
|
||||
|
||||
Translate with (German):
|
||||
Translate with (German):
|
||||
|
||||
«««
|
||||
### Ihr Programm ausführen { #run-your-program }
|
||||
»»»
|
||||
```
|
||||
### Ihr Programm ausführen { #run-your-program }
|
||||
```
|
||||
|
||||
Do NOT translate with (German):
|
||||
Do NOT translate with (German):
|
||||
|
||||
«««
|
||||
### Führen Sie Ihr Programm aus { #run-your-program }
|
||||
»»»
|
||||
```
|
||||
### Führen Sie Ihr Programm aus { #run-your-program }
|
||||
```
|
||||
|
||||
2) Make sure that the translated part of the heading does not end with a period.
|
||||
- Make sure that the translated part of the heading does not end with a period.
|
||||
|
||||
Example:
|
||||
|
||||
Source (English):
|
||||
Source (English):
|
||||
|
||||
«««
|
||||
## Another module with `APIRouter` { #another-module-with-apirouter }
|
||||
»»»
|
||||
```
|
||||
## Another module with `APIRouter` { #another-module-with-apirouter }
|
||||
```
|
||||
|
||||
Translate with (German):
|
||||
Translate with (German):
|
||||
|
||||
«««
|
||||
## Ein weiteres Modul mit `APIRouter` { #another-module-with-apirouter }
|
||||
»»»
|
||||
```
|
||||
## Ein weiteres Modul mit `APIRouter` { #another-module-with-apirouter }
|
||||
```
|
||||
|
||||
Do NOT translate with (German) – notice the added period:
|
||||
Do NOT translate with (German) – notice the added period:
|
||||
|
||||
«««
|
||||
## Ein weiteres Modul mit `APIRouter`. { #another-module-with-apirouter }
|
||||
»»»
|
||||
```
|
||||
## Ein weiteres Modul mit `APIRouter`. { #another-module-with-apirouter }
|
||||
```
|
||||
|
||||
3) Replace occurrences of literal « - » (a space followed by a hyphen followed by a space) with « – » (a space followed by a dash followed by a space) in the translated part of the heading.
|
||||
- Replace occurrences of literal ` - ` (a space followed by a hyphen followed by a space) with ` – ` (a space followed by a dash followed by a space) in the translated part of the heading.
|
||||
|
||||
Example:
|
||||
|
||||
Source (English):
|
||||
Source (English):
|
||||
|
||||
«««
|
||||
# FastAPI in Containers - Docker { #fastapi-in-containers-docker }
|
||||
»»»
|
||||
```
|
||||
# FastAPI in Containers - Docker { #fastapi-in-containers-docker }
|
||||
```
|
||||
|
||||
Translate with (German) – notice the dash:
|
||||
Translate with (German) – notice the dash:
|
||||
|
||||
«««
|
||||
# FastAPI in Containern – Docker { #fastapi-in-containers-docker }
|
||||
»»»
|
||||
```
|
||||
# FastAPI in Containern – Docker { #fastapi-in-containers-docker }
|
||||
```
|
||||
|
||||
Do NOT translate with (German) – notice the hyphen:
|
||||
Do NOT translate with (German) – notice the hyphen:
|
||||
|
||||
«««
|
||||
# FastAPI in Containern - Docker { #fastapi-in-containers-docker }
|
||||
»»»
|
||||
```
|
||||
# FastAPI in Containern - Docker { #fastapi-in-containers-docker }
|
||||
```
|
||||
|
||||
3.1) Do not apply rule 3 when there is no space before or no space after the hyphen.
|
||||
- Do not apply rule 3 when there is no space before or no space after the hyphen.
|
||||
|
||||
Example:
|
||||
|
||||
Source (English):
|
||||
Source (English):
|
||||
|
||||
«««
|
||||
## Type hints and annotations { #type-hints-and-annotations }
|
||||
»»»
|
||||
```
|
||||
## Type hints and annotations { #type-hints-and-annotations }
|
||||
```
|
||||
|
||||
Translate with (German) – notice the hyphen:
|
||||
Translate with (German) - notice the hyphen:
|
||||
|
||||
«««
|
||||
## Typhinweise und -annotationen { #type-hints-and-annotations }
|
||||
»»»
|
||||
```
|
||||
## Typhinweise und -annotationen { #type-hints-and-annotations }
|
||||
```
|
||||
|
||||
Do NOT translate with (German) – notice the dash:
|
||||
Do NOT translate with (German) - notice the dash:
|
||||
|
||||
«««
|
||||
## Typhinweise und –annotationen { #type-hints-and-annotations }
|
||||
»»»
|
||||
```
|
||||
## Typhinweise und –annotationen { #type-hints-and-annotations }
|
||||
```
|
||||
|
||||
3.2) Do not apply rule 3 to the untranslated part of the heading inside curly brackets, which you shall not translate.
|
||||
- Do not modify the hyphens in the content in headers inside of curly braces, which you shall not translate.
|
||||
|
||||
|
||||
### German instructions, when to use and when not to use hyphens in words (written in first person, which is you)
|
||||
### German instructions, when to use and when not to use hyphens in words (written in first person, which is you).
|
||||
|
||||
In der Regel versuche ich so weit wie möglich Worte zusammenzuschreiben, also ohne Bindestrich, es sei denn, es ist Konkretesding-Klassevondingen, etwa «Pydantic-Modell» (aber: «Datenbankmodell»), «Python-Modul» (aber: «Standardmodul»). Ich setze auch einen Bindestrich, wenn er die gleichen Buchstaben verbindet, etwa «Enum-Member», «Cloud-Dienst», «Template-Engine». Oder wenn das Wort sonst einfach zu lang wird, etwa, «Performance-Optimierung». Oder um etwas visuell besser zu dokumentieren, etwa «Pfadoperation-Dekorator», «Pfadoperation-Funktion».
|
||||
|
||||
@@ -219,122 +203,122 @@ In der Regel versuche ich so weit wie möglich Worte zusammenzuschreiben, also o
|
||||
|
||||
Ich versuche nicht, alles einzudeutschen. Das bezieht sich besonders auf Begriffe aus dem Bereich der Programmierung. Ich wandele zwar korrekt in Großschreibung um und setze Bindestriche, wo notwendig, aber ansonsten lasse ich solch ein Wort unverändert. Beispielsweise wird aus dem englischen Wort «string» in der deutschen Übersetzung «String», aber nicht «Zeichenkette». Oder aus dem englischen Wort «request body» wird in der deutschen Übersetzung «Requestbody», aber nicht «Anfragekörper». Oder aus dem englischen «response» wird im Deutschen «Response», aber nicht «Antwort».
|
||||
|
||||
|
||||
### List of English terms and their preferred German translations
|
||||
|
||||
Below is a list of English terms and their preferred German translations, separated by a colon («:»). Use these translations, do not use your own. If an existing translation does not use these terms, update it to use them. In the below list, a term or a translation may be followed by an explanation in brackets, which explains when to translate the term this way. If a translation is preceded by «NOT», then that means: do NOT use this translation for this term. English nouns, starting with the word «the», have the German genus – «der», «die», «das» – prepended to their German translation, to help you to grammatically decline them in the translation. They are given in singular case, unless they have «(plural)» attached, which means they are given in plural case. Verbs are given in the full infinitive – starting with the word «to».
|
||||
Below is a list of English terms and their preferred German translations, separated by a colon (:). Use these translations, do not use your own. If an existing translation does not use these terms, update it to use them. In the below list, a term or a translation may be followed by an explanation in brackets, which explains when to translate the term this way. If a translation is preceded by `NOT`, then that means: do NOT use this translation for this term. English nouns, starting with the word `the`, have the German genus – `der`, `die`, `das` – prepended to their German translation, to help you to grammatically decline them in the translation. They are given in singular case, unless they have `(plural)` attached, which means they are given in plural case. Verbs are given in the full infinitive – starting with the word `to`.
|
||||
|
||||
* «/// check»: «/// check | Testen»
|
||||
* «/// danger»: «/// danger | Gefahr»
|
||||
* «/// info»: «/// info | Info»
|
||||
* «/// note | Technical Details»: «/// note | Technische Details»
|
||||
* «/// note»: «/// note | Hinweis»
|
||||
* «/// tip»: «/// tip | Tipp»
|
||||
* «/// warning»: «/// warning | Achtung»
|
||||
* «you»: «Sie»
|
||||
* «your»: «Ihr»
|
||||
* «e.g»: «z. B.»
|
||||
* «etc.»: «usw.»
|
||||
* «ref»: «Ref.»
|
||||
* «the Tutorial - User guide»: «das Tutorial – Benutzerhandbuch»
|
||||
* «the Advanced User Guide»: «das Handbuch für fortgeschrittene Benutzer»
|
||||
* «the SQLModel docs»: «die SQLModel-Dokumentation»
|
||||
* «the docs»: «die Dokumentation» (use singular case)
|
||||
* «the env var»: «die Umgebungsvariable»
|
||||
* «the `PATH` environment variable»: «die `PATH`-Umgebungsvariable»
|
||||
* «the `PATH`»: «der `PATH`»
|
||||
* «the `requirements.txt`»: «die `requirements.txt`»
|
||||
* «the API Router»: «der API-Router»
|
||||
* «the Authorization-Header»: «der Autorisierungsheader»
|
||||
* «the `Authorization`-Header»: «der `Authorization`-Header»
|
||||
* «the background task»: «der Hintergrundtask»
|
||||
* «the button»: «der Button»
|
||||
* «the cloud provider»: «der Cloudanbieter»
|
||||
* «the CLI»: «Das CLI»
|
||||
* «the command line interface»: «Das Kommandozeileninterface»
|
||||
* «the default value»: «der Defaultwert»
|
||||
* «the default value»: NOT «der Standardwert»
|
||||
* «the default declaration»: «die Default-Deklaration»
|
||||
* «the deployment»: «das Deployment»
|
||||
* «the dict»: «das Dict»
|
||||
* «the dictionary»: «das Dictionary»
|
||||
* «the enumeration»: «die Enumeration»
|
||||
* «the enum»: «das Enum»
|
||||
* «the engine»: «die Engine»
|
||||
* «the error response»: «die Error-Response»
|
||||
* «the event»: «das Event»
|
||||
* «the exception»: «die Exception»
|
||||
* «the exception handler»: «der Exceptionhandler»
|
||||
* «the form model»: «das Formularmodell»
|
||||
* «the form body»: «der Formularbody»
|
||||
* «the header»: «der Header»
|
||||
* «the headers» (plural): «die Header»
|
||||
* «in headers» (plural): «in Headern»
|
||||
* «the forwarded header»: «der Forwarded-Header»
|
||||
* «the lifespan event»: «das Lifespan-Event»
|
||||
* «the lock»: «der Lock»
|
||||
* «the locking»: «das Locking»
|
||||
* «the mobile application»: «die Mobile-Anwendung»
|
||||
* «the model object»: «das Modellobjekt»
|
||||
* «the mounting»: «das Mounten»
|
||||
* «mounted»: «gemountet»
|
||||
* «the origin»: «das Origin»
|
||||
* «the override»: «Die Überschreibung»
|
||||
* «the parameter»: «der Parameter»
|
||||
* «the parameters» (plural): «die Parameter»
|
||||
* «the function parameter»: «der Funktionsparameter»
|
||||
* «the default parameter»: «der Defaultparameter»
|
||||
* «the body parameter»: «der Body-Parameter»
|
||||
* «the request body parameter»: «der Requestbody-Parameter»
|
||||
* «the path parameter»: «der Pfad-Parameter»
|
||||
* «the query parameter»: «der Query-Parameter»
|
||||
* «the cookie parameter»: «der Cookie-Parameter»
|
||||
* «the header parameter»: «der Header-Parameter»
|
||||
* «the form parameter»: «der Formular-Parameter»
|
||||
* «the payload»: «die Payload»
|
||||
* «the performance»: NOT «die Performance»
|
||||
* «the query»: «die Query»
|
||||
* «the recap»: «die Zusammenfassung»
|
||||
* «the request» (what the client sends to the server): «der Request»
|
||||
* «the request body»: «der Requestbody»
|
||||
* «the request bodies» (plural): «die Requestbodys»
|
||||
* «the response» (what the server sends back to the client): «die Response»
|
||||
* «the return type»: «der Rückgabetyp»
|
||||
* «the return value»: «der Rückgabewert»
|
||||
* «the startup» (the event of the app): «der Startup»
|
||||
* «the shutdown» (the event of the app): «der Shutdown»
|
||||
* «the startup event»: «das Startup-Event»
|
||||
* «the shutdown event»: «das Shutdown-Event»
|
||||
* «the startup» (of the server): «das Hochfahren»
|
||||
* «the startup» (the company): «das Startup»
|
||||
* «the SDK»: «das SDK»
|
||||
* «the tag»: «der Tag»
|
||||
* «the type annotation»: «die Typannotation»
|
||||
* «the type hint»: «der Typhinweis»
|
||||
* «the wildcard»: «die Wildcard»
|
||||
* «the worker class»: «die Workerklasse»
|
||||
* «the worker class»: NOT «die Arbeiterklasse»
|
||||
* «the worker process»: «der Workerprozess»
|
||||
* «the worker process»: NOT «der Arbeiterprozess»
|
||||
* «to commit»: «committen»
|
||||
* «to deploy» (in the cloud): «deployen»
|
||||
* «to modify»: «ändern»
|
||||
* «to serve» (an application): «bereitstellen»
|
||||
* «to serve» (a response): «ausliefern»
|
||||
* «to serve»: NOT «bedienen»
|
||||
* «to upgrade»: «aktualisieren»
|
||||
* «to wrap»: «wrappen»
|
||||
* «to wrap»: NOT «hüllen»
|
||||
* «`foo` as a `type`»: «`foo` vom Typ `type`»
|
||||
* «`foo` as a `type`»: «`foo`, ein `type`»
|
||||
* «FastAPI's X»: «FastAPIs X»
|
||||
* «Starlette's Y»: «Starlettes Y»
|
||||
* «X is case-sensitive»: «Groß-/Kleinschreibung ist relevant in X»
|
||||
* «X is case-insensitive»: «Groß-/Kleinschreibung ist nicht relevant in X»
|
||||
* «standard Python»: «Standard-Python»
|
||||
* «deprecated»: «deprecatet»
|
||||
* /// check: /// check | Testen
|
||||
* /// danger: /// danger | Gefahr
|
||||
* /// info: /// info | Info
|
||||
* /// note | Technical Details: /// note | Technische Details
|
||||
* /// note: /// note | Hinweis
|
||||
* /// tip: /// tip | Tipp
|
||||
* /// warning: /// warning | Achtung
|
||||
* you: Sie
|
||||
* your: Ihr
|
||||
* e.g: z. B.
|
||||
* etc.: usw.
|
||||
* ref: Ref.
|
||||
* the Tutorial - User guide: das Tutorial – Benutzerhandbuch
|
||||
* the Advanced User Guide: das Handbuch für fortgeschrittene Benutzer
|
||||
* the SQLModel docs: die SQLModel-Dokumentation
|
||||
* the docs: die Dokumentation (use singular case)
|
||||
* the env var: die Umgebungsvariable
|
||||
* the `PATH` environment variable: die `PATH`-Umgebungsvariable
|
||||
* the `PATH`: der `PATH`
|
||||
* the `requirements.txt`: die `requirements.txt`
|
||||
* the API Router: der API-Router
|
||||
* the Authorization-Header: der Autorisierungsheader
|
||||
* the `Authorization`-Header: der `Authorization`-Header
|
||||
* the background task: der Hintergrundtask
|
||||
* the button: der Button
|
||||
* the cloud provider: der Cloudanbieter
|
||||
* the CLI: Das CLI
|
||||
* the coverage: Die Testabdeckung
|
||||
* the command line interface: Das Kommandozeileninterface
|
||||
* the default value: der Defaultwert
|
||||
* the default value: NOT der Standardwert
|
||||
* the default declaration: die Default-Deklaration
|
||||
* the deployment: das Deployment
|
||||
* the dict: das Dict
|
||||
* the dictionary: das Dictionary
|
||||
* the enumeration: die Enumeration
|
||||
* the enum: das Enum
|
||||
* the engine: die Engine
|
||||
* the error response: die Error-Response
|
||||
* the event: das Event
|
||||
* the exception: die Exception
|
||||
* the exception handler: der Exceptionhandler
|
||||
* the form model: das Formularmodell
|
||||
* the form body: der Formularbody
|
||||
* the header: der Header
|
||||
* the headers (plural): die Header
|
||||
* in headers (plural): in Headern
|
||||
* the forwarded header: der Forwarded-Header
|
||||
* the lifespan event: das Lifespan-Event
|
||||
* the lock: der Lock
|
||||
* the locking: das Locking
|
||||
* the mobile application: die Mobile-Anwendung
|
||||
* the model object: das Modellobjekt
|
||||
* the mounting: das Mounten
|
||||
* mounted: gemountet
|
||||
* the origin: das Origin
|
||||
* the override: Die Überschreibung
|
||||
* the parameter: der Parameter
|
||||
* the parameters (plural): die Parameter
|
||||
* the function parameter: der Funktionsparameter
|
||||
* the default parameter: der Defaultparameter
|
||||
* the body parameter: der Body-Parameter
|
||||
* the request body parameter: der Requestbody-Parameter
|
||||
* the path parameter: der Pfad-Parameter
|
||||
* the query parameter: der Query-Parameter
|
||||
* the cookie parameter: der Cookie-Parameter
|
||||
* the header parameter: der Header-Parameter
|
||||
* the form parameter: der Formular-Parameter
|
||||
* the payload: die Payload
|
||||
* the performance: NOT die Performance
|
||||
* the query: die Query
|
||||
* the recap: die Zusammenfassung
|
||||
* the request (what the client sends to the server): der Request
|
||||
* the request body: der Requestbody
|
||||
* the request bodies (plural): die Requestbodys
|
||||
* the response (what the server sends back to the client): die Response
|
||||
* the return type: der Rückgabetyp
|
||||
* the return value: der Rückgabewert
|
||||
* the startup (the event of the app): der Startup
|
||||
* the shutdown (the event of the app): der Shutdown
|
||||
* the startup event: das Startup-Event
|
||||
* the shutdown event: das Shutdown-Event
|
||||
* the startup (of the server): das Hochfahren
|
||||
* the startup (the company): das Startup
|
||||
* the SDK: das SDK
|
||||
* the tag: der Tag
|
||||
* the type annotation: die Typannotation
|
||||
* the type hint: der Typhinweis
|
||||
* the wildcard: die Wildcard
|
||||
* the worker class: die Workerklasse
|
||||
* the worker class: NOT die Arbeiterklasse
|
||||
* the worker process: der Workerprozess
|
||||
* the worker process: NOT der Arbeiterprozess
|
||||
* to commit: committen
|
||||
* to deploy (in the cloud): deployen
|
||||
* to modify: ändern
|
||||
* to serve (an application): bereitstellen
|
||||
* to serve (a response): ausliefern
|
||||
* to serve: NOT bedienen
|
||||
* to upgrade: aktualisieren
|
||||
* to wrap: wrappen
|
||||
* to wrap: NOT hüllen
|
||||
* `foo` as a `type`: `foo` vom Typ `type`
|
||||
* `foo` as a `type`: `foo`, ein `type`
|
||||
* FastAPI's X: FastAPIs X
|
||||
* Starlette's Y: Starlettes Y
|
||||
* X is case-sensitive: Groß-/Kleinschreibung ist relevant in X
|
||||
* X is case-insensitive: Groß-/Kleinschreibung ist nicht relevant in X
|
||||
* standard Python: Standard-Python
|
||||
* deprecated: deprecatet
|
||||
|
||||
|
||||
### Other rules
|
||||
|
||||
Preserve indentation. Keep emoticons. Encode in utf-8. Use Linux line breaks (LF).
|
||||
Preserve indentation. Keep emojis. Encode in utf-8. Use Linux line breaks (LF).
|
||||
|
||||
@@ -6,7 +6,7 @@ Tests added here will be seen by all designers of language specific prompts.
|
||||
|
||||
Use as follows:
|
||||
|
||||
* Have a language specific prompt – `docs/{language code}/llm-prompt.md`.
|
||||
* Have a language specific prompt - `docs/{language code}/llm-prompt.md`.
|
||||
* Do a fresh translation of this document into your desired target language (see e.g. the `translate-page` command of the `translate.py`). This will create the translation under `docs/{language code}/docs/_llm-test.md`.
|
||||
* Check if things are okay in the translation.
|
||||
* If necessary, improve your language specific prompt, the general prompt, or the English document.
|
||||
|
||||
@@ -4,7 +4,7 @@ FastAPI is built on top of **Pydantic**, and I have been showing you how to use
|
||||
|
||||
But FastAPI also supports using <a href="https://docs.python.org/3/library/dataclasses.html" class="external-link" target="_blank">`dataclasses`</a> the same way:
|
||||
|
||||
{* ../../docs_src/dataclasses/tutorial001_py310.py hl[1,6:11,18:19] *}
|
||||
{* ../../docs_src/dataclasses_/tutorial001_py310.py hl[1,6:11,18:19] *}
|
||||
|
||||
This is still supported thanks to **Pydantic**, as it has <a href="https://docs.pydantic.dev/latest/concepts/dataclasses/#use-of-stdlib-dataclasses-with-basemodel" class="external-link" target="_blank">internal support for `dataclasses`</a>.
|
||||
|
||||
@@ -32,7 +32,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:
|
||||
|
||||
{* ../../docs_src/dataclasses/tutorial002_py310.py hl[1,6:12,18] *}
|
||||
{* ../../docs_src/dataclasses_/tutorial002_py310.py hl[1,6:12,18] *}
|
||||
|
||||
The dataclass will be automatically converted to a Pydantic dataclass.
|
||||
|
||||
@@ -48,7 +48,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:
|
||||
|
||||
{* ../../docs_src/dataclasses/tutorial003_py310.py hl[1,4,7:10,13:16,22:24,27] *}
|
||||
{* ../../docs_src/dataclasses_/tutorial003_py310.py hl[1,4,7:10,13:16,22:24,27] *}
|
||||
|
||||
1. We still import `field` from standard `dataclasses`.
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ Depending on your use case, you might prefer to use a different library, but if
|
||||
|
||||
Here's a small preview of how you could integrate Strawberry with FastAPI:
|
||||
|
||||
{* ../../docs_src/graphql/tutorial001_py39.py hl[3,22,25] *}
|
||||
{* ../../docs_src/graphql_/tutorial001_py39.py hl[3,22,25] *}
|
||||
|
||||
You can learn more about Strawberry in the <a href="https://strawberry.rocks/" class="external-link" target="_blank">Strawberry documentation</a>.
|
||||
|
||||
|
||||
@@ -7,16 +7,49 @@ hide:
|
||||
|
||||
## Latest Changes
|
||||
|
||||
### Translations
|
||||
|
||||
* 🔧 Add LLM prompt file for Turkish, generated from the existing translations. PR [#14547](https://github.com/fastapi/fastapi/pull/14547) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 🔧 Add LLM prompt file for Traditional Chinese, generated from the existing translations. PR [#14550](https://github.com/fastapi/fastapi/pull/14550) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 🔧 Add LLM prompt file for Simplified Chinese, generated from the existing translations. PR [#14549](https://github.com/fastapi/fastapi/pull/14549) by [@tiangolo](https://github.com/tiangolo).
|
||||
|
||||
### Internal
|
||||
|
||||
* 🌐 Update translation prompts. PR [#14619](https://github.com/fastapi/fastapi/pull/14619) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 🔨 Update LLM translation script to guide reviewers to change the prompt. PR [#14614](https://github.com/fastapi/fastapi/pull/14614) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 👷 Do not run translations on cron while finishing updating existing languages. PR [#14613](https://github.com/fastapi/fastapi/pull/14613) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 🔥 Remove test variants for Pydantic v1 in test_request_params. PR [#14612](https://github.com/fastapi/fastapi/pull/14612) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 🔥 Remove Pydantic v1 specific test variants. PR [#14611](https://github.com/fastapi/fastapi/pull/14611) by [@tiangolo](https://github.com/tiangolo).
|
||||
|
||||
## 0.128.0
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
* ➖ Drop support for `pydantic.v1`. PR [#14609](https://github.com/fastapi/fastapi/pull/14609) by [@tiangolo](https://github.com/tiangolo).
|
||||
|
||||
### Internal
|
||||
|
||||
* ✅ Run performance tests only on Pydantic v2. PR [#14608](https://github.com/fastapi/fastapi/pull/14608) by [@tiangolo](https://github.com/tiangolo).
|
||||
|
||||
## 0.127.1
|
||||
|
||||
### Refactors
|
||||
|
||||
* 🔊 Add a custom `FastAPIDeprecationWarning`. PR [#14605](https://github.com/fastapi/fastapi/pull/14605) by [@tiangolo](https://github.com/tiangolo).
|
||||
|
||||
### Docs
|
||||
|
||||
* 📝 Add documentary to website. PR [#14600](https://github.com/fastapi/fastapi/pull/14600) by [@tiangolo](https://github.com/tiangolo).
|
||||
|
||||
### Translations
|
||||
|
||||
* 🌐 Update translations for de (update-outdated). PR [#14602](https://github.com/fastapi/fastapi/pull/14602) by [@nilslindemann](https://github.com/nilslindemann).
|
||||
* 🌐 Update translations for de (update-outdated). PR [#14581](https://github.com/fastapi/fastapi/pull/14581) by [@nilslindemann](https://github.com/nilslindemann).
|
||||
|
||||
### Internal
|
||||
|
||||
* 🔧 Update pre-commit to use local Ruff instead of hook. PR [#14604](https://github.com/fastapi/fastapi/pull/14604) by [@tiangolo](https://github.com/tiangolo).
|
||||
* ✅ Add missing tests for code examples. PR [#14569](https://github.com/fastapi/fastapi/pull/14569) by [@YuriiMotov](https://github.com/YuriiMotov).
|
||||
* 👷 Remove `lint` job from `test` CI workflow. PR [#14593](https://github.com/fastapi/fastapi/pull/14593) by [@YuriiMotov](https://github.com/YuriiMotov).
|
||||
* 👷 Update secrets check. PR [#14592](https://github.com/fastapi/fastapi/pull/14592) by [@tiangolo](https://github.com/tiangolo).
|
||||
* 👷 Run CodSpeed tests in parallel to other tests to speed up CI. PR [#14586](https://github.com/fastapi/fastapi/pull/14586) by [@tiangolo](https://github.com/tiangolo).
|
||||
|
||||
@@ -4,7 +4,7 @@ FastAPI está construido sobre **Pydantic**, y te he estado mostrando cómo usar
|
||||
|
||||
Pero FastAPI también soporta el uso de <a href="https://docs.python.org/3/library/dataclasses.html" class="external-link" target="_blank">`dataclasses`</a> de la misma manera:
|
||||
|
||||
{* ../../docs_src/dataclasses/tutorial001_py310.py hl[1,6:11,18:19] *}
|
||||
{* ../../docs_src/dataclasses_/tutorial001_py310.py hl[1,6:11,18:19] *}
|
||||
|
||||
Esto sigue siendo soportado gracias a **Pydantic**, ya que tiene <a href="https://docs.pydantic.dev/latest/concepts/dataclasses/#use-of-stdlib-dataclasses-with-basemodel" class="external-link" target="_blank">soporte interno para `dataclasses`</a>.
|
||||
|
||||
@@ -32,7 +32,7 @@ Pero si tienes un montón de dataclasses por ahí, este es un buen truco para us
|
||||
|
||||
También puedes usar `dataclasses` en el parámetro `response_model`:
|
||||
|
||||
{* ../../docs_src/dataclasses/tutorial002_py310.py hl[1,6:12,18] *}
|
||||
{* ../../docs_src/dataclasses_/tutorial002_py310.py hl[1,6:12,18] *}
|
||||
|
||||
El dataclass será automáticamente convertido a un dataclass de Pydantic.
|
||||
|
||||
@@ -48,7 +48,7 @@ En algunos casos, todavía podrías tener que usar la versión de `dataclasses`
|
||||
|
||||
En ese caso, simplemente puedes intercambiar los `dataclasses` estándar con `pydantic.dataclasses`, que es un reemplazo directo:
|
||||
|
||||
{* ../../docs_src/dataclasses/tutorial003_py310.py hl[1,4,7:10,13:16,22:24,27] *}
|
||||
{* ../../docs_src/dataclasses_/tutorial003_py310.py hl[1,4,7:10,13:16,22:24,27] *}
|
||||
|
||||
1. Todavía importamos `field` de los `dataclasses` estándar.
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ Dependiendo de tu caso de uso, podrías preferir usar un paquete diferente, pero
|
||||
|
||||
Aquí tienes una pequeña vista previa de cómo podrías integrar Strawberry con FastAPI:
|
||||
|
||||
{* ../../docs_src/graphql/tutorial001_py39.py hl[3,22,25] *}
|
||||
{* ../../docs_src/graphql_/tutorial001_py39.py hl[3,22,25] *}
|
||||
|
||||
Puedes aprender más sobre Strawberry en la <a href="https://strawberry.rocks/" class="external-link" target="_blank">documentación de Strawberry</a>.
|
||||
|
||||
|
||||
@@ -6,23 +6,23 @@ Language code: ja.
|
||||
|
||||
### Grammar and tone
|
||||
|
||||
1) Use polite, instructional Japanese (です/ます調).
|
||||
2) Keep the tone concise and technical (match existing Japanese FastAPI docs).
|
||||
- Use polite, instructional Japanese (です/ます調).
|
||||
- Keep the tone concise and technical (match existing Japanese FastAPI docs).
|
||||
|
||||
### Headings
|
||||
|
||||
1) Follow the existing Japanese style: short, descriptive headings (often noun phrases), e.g. 「チェック」.
|
||||
2) Do not add a trailing period at the end of headings.
|
||||
- Follow the existing Japanese style: short, descriptive headings (often noun phrases), e.g. 「チェック」.
|
||||
- Do not add a trailing period at the end of headings.
|
||||
|
||||
### Quotes
|
||||
|
||||
1) Prefer Japanese corner brackets 「」 in normal prose when quoting a term.
|
||||
2) Do not change quotes inside inline code, code blocks, URLs, or file paths.
|
||||
- Prefer Japanese corner brackets 「」 in normal prose when quoting a term.
|
||||
- Do not change quotes inside inline code, code blocks, URLs, or file paths.
|
||||
|
||||
### Ellipsis
|
||||
|
||||
1) Keep ellipsis style consistent with existing Japanese docs (commonly `...`).
|
||||
2) Never change `...` in code, URLs, or CLI examples.
|
||||
- Keep ellipsis style consistent with existing Japanese docs (commonly `...`).
|
||||
- Never change `...` in code, URLs, or CLI examples.
|
||||
|
||||
### Preferred translations / glossary
|
||||
|
||||
|
||||
@@ -6,23 +6,23 @@ Language code: ko.
|
||||
|
||||
### Grammar and tone
|
||||
|
||||
1) Use polite, instructional Korean (e.g. 합니다/하세요 style).
|
||||
2) Keep the tone consistent with the existing Korean FastAPI docs.
|
||||
- Use polite, instructional Korean (e.g. 합니다/하세요 style).
|
||||
- Keep the tone consistent with the existing Korean FastAPI docs.
|
||||
|
||||
### Headings
|
||||
|
||||
1) Follow existing Korean heading style (short, action-oriented headings like “확인하기”).
|
||||
2) Do not add trailing punctuation to headings.
|
||||
- Follow existing Korean heading style (short, action-oriented headings like “확인하기”).
|
||||
- Do not add trailing punctuation to headings.
|
||||
|
||||
### Quotes
|
||||
|
||||
1) Keep quote style consistent with the existing Korean docs.
|
||||
2) Never change quotes inside inline code, code blocks, URLs, or file paths.
|
||||
- Keep quote style consistent with the existing Korean docs.
|
||||
- Never change quotes inside inline code, code blocks, URLs, or file paths.
|
||||
|
||||
### Ellipsis
|
||||
|
||||
1) Keep ellipsis style consistent with existing Korean docs (often `...`).
|
||||
2) Never change `...` in code, URLs, or CLI examples.
|
||||
- Keep ellipsis style consistent with existing Korean docs (often `...`).
|
||||
- Never change `...` in code, URLs, or CLI examples.
|
||||
|
||||
### Preferred translations / glossary
|
||||
|
||||
|
||||
@@ -4,6 +4,6 @@ This page hasn’t been translated into your language yet. 🌍
|
||||
|
||||
We’re currently switching to an automated translation system 🤖, which will help keep all translations complete and up to date.
|
||||
|
||||
Learn more: [Contributing – Translations](https://fastapi.tiangolo.com/contributing/#translations){.internal-link target=_blank}
|
||||
Learn more: [Contributing - Translations](https://fastapi.tiangolo.com/contributing/#translations){.internal-link target=_blank}
|
||||
|
||||
///
|
||||
|
||||
@@ -4,7 +4,7 @@ FastAPI é construído em cima do **Pydantic**, e eu tenho mostrado como usar mo
|
||||
|
||||
Mas o FastAPI também suporta o uso de <a href="https://docs.python.org/3/library/dataclasses.html" class="external-link" target="_blank">`dataclasses`</a> da mesma forma:
|
||||
|
||||
{* ../../docs_src/dataclasses/tutorial001_py310.py hl[1,6:11,18:19] *}
|
||||
{* ../../docs_src/dataclasses_/tutorial001_py310.py hl[1,6:11,18:19] *}
|
||||
|
||||
Isso ainda é suportado graças ao **Pydantic**, pois ele tem <a href="https://docs.pydantic.dev/latest/concepts/dataclasses/#use-of-stdlib-dataclasses-with-basemodel" class="external-link" target="_blank">suporte interno para `dataclasses`</a>.
|
||||
|
||||
@@ -32,7 +32,7 @@ Mas se você tem um monte de dataclasses por aí, este é um truque legal para u
|
||||
|
||||
Você também pode usar `dataclasses` no parâmetro `response_model`:
|
||||
|
||||
{* ../../docs_src/dataclasses/tutorial002_py310.py hl[1,6:12,18] *}
|
||||
{* ../../docs_src/dataclasses_/tutorial002_py310.py hl[1,6:12,18] *}
|
||||
|
||||
A dataclass será automaticamente convertida para uma dataclass Pydantic.
|
||||
|
||||
@@ -48,7 +48,7 @@ Em alguns casos, você ainda pode ter que usar a versão do Pydantic das `datacl
|
||||
|
||||
Nesse caso, você pode simplesmente trocar as `dataclasses` padrão por `pydantic.dataclasses`, que é um substituto direto:
|
||||
|
||||
{* ../../docs_src/dataclasses/tutorial003_py310.py hl[1,4,7:10,13:16,22:24,27] *}
|
||||
{* ../../docs_src/dataclasses_/tutorial003_py310.py hl[1,4,7:10,13:16,22:24,27] *}
|
||||
|
||||
1. Ainda importamos `field` das `dataclasses` padrão.
|
||||
|
||||
|
||||
@@ -35,7 +35,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:
|
||||
|
||||
{* ../../docs_src/graphql/tutorial001_py39.py hl[3,22,25] *}
|
||||
{* ../../docs_src/graphql_/tutorial001_py39.py hl[3,22,25] *}
|
||||
|
||||
Você pode aprender mais sobre Strawberry na <a href="https://strawberry.rocks/" class="external-link" target="_blank">documentação do Strawberry</a>.
|
||||
|
||||
|
||||
@@ -14,15 +14,15 @@ When translating documentation into Portuguese, use neutral and widely understan
|
||||
|
||||
For the next terms, use the following translations:
|
||||
|
||||
* «/// check»: «/// check | Verifique»
|
||||
* «/// danger»: «/// danger | Cuidado»
|
||||
* «/// info»: «/// info | Informação»
|
||||
* «/// note | Technical Details»: «/// note | Detalhes Técnicos»
|
||||
* «/// info | Very Technical Details»: «/// note | Detalhes Técnicos Avançados»
|
||||
* «/// note»: «/// note | Nota»
|
||||
* «/// tip»: «/// tip | Dica»
|
||||
* «/// warning»: «/// warning | Atenção»
|
||||
* «(you should)»: «(você deveria)»
|
||||
* /// check: /// check | Verifique
|
||||
* /// danger: /// danger | Cuidado
|
||||
* /// info: /// info | Informação
|
||||
* /// note | Technical Details: /// note | Detalhes Técnicos
|
||||
* /// info | Very Technical Details: /// note | Detalhes Técnicos Avançados
|
||||
* /// note: /// note | Nota
|
||||
* /// tip: /// tip | Dica
|
||||
* /// warning: /// warning | Atenção
|
||||
* (you should): (você deveria)
|
||||
* async context manager: gerenciador de contexto assíncrono
|
||||
* autocomplete: autocompletar
|
||||
* autocompletion: preenchimento automático
|
||||
|
||||
@@ -4,7 +4,7 @@ FastAPI построен поверх **Pydantic**, и я показывал в
|
||||
|
||||
Но FastAPI также поддерживает использование <a href="https://docs.python.org/3/library/dataclasses.html" class="external-link" target="_blank">`dataclasses`</a> тем же способом:
|
||||
|
||||
{* ../../docs_src/dataclasses/tutorial001_py310.py hl[1,6:11,18:19] *}
|
||||
{* ../../docs_src/dataclasses_/tutorial001_py310.py hl[1,6:11,18:19] *}
|
||||
|
||||
Это по-прежнему поддерживается благодаря **Pydantic**, так как в нём есть <a href="https://docs.pydantic.dev/latest/concepts/dataclasses/#use-of-stdlib-dataclasses-with-basemodel" class="external-link" target="_blank">встроенная поддержка `dataclasses`</a>.
|
||||
|
||||
@@ -32,7 +32,7 @@ FastAPI построен поверх **Pydantic**, и я показывал в
|
||||
|
||||
Вы также можете использовать `dataclasses` в параметре `response_model`:
|
||||
|
||||
{* ../../docs_src/dataclasses/tutorial002_py310.py hl[1,6:12,18] *}
|
||||
{* ../../docs_src/dataclasses_/tutorial002_py310.py hl[1,6:12,18] *}
|
||||
|
||||
Этот dataclass будет автоматически преобразован в Pydantic dataclass.
|
||||
|
||||
@@ -48,7 +48,7 @@ FastAPI построен поверх **Pydantic**, и я показывал в
|
||||
|
||||
В таком случае вы можете просто заменить стандартные `dataclasses` на `pydantic.dataclasses`, которая является полностью совместимой заменой (drop-in replacement):
|
||||
|
||||
{* ../../docs_src/dataclasses/tutorial003_py310.py hl[1,4,7:10,13:16,22:24,27] *}
|
||||
{* ../../docs_src/dataclasses_/tutorial003_py310.py hl[1,4,7:10,13:16,22:24,27] *}
|
||||
|
||||
1. Мы по-прежнему импортируем `field` из стандартных `dataclasses`.
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
Вот небольшой пример того, как можно интегрировать Strawberry с FastAPI:
|
||||
|
||||
{* ../../docs_src/graphql/tutorial001_py39.py hl[3,22,25] *}
|
||||
{* ../../docs_src/graphql_/tutorial001_py39.py hl[3,22,25] *}
|
||||
|
||||
Подробнее о Strawberry можно узнать в <a href="https://strawberry.rocks/" class="external-link" target="_blank">документации Strawberry</a>.
|
||||
|
||||
|
||||
52
docs/tr/llm-prompt.md
Normal file
52
docs/tr/llm-prompt.md
Normal file
@@ -0,0 +1,52 @@
|
||||
### Target language
|
||||
|
||||
Translate to Turkish (Türkçe).
|
||||
|
||||
Language code: tr.
|
||||
|
||||
### Grammar and tone
|
||||
|
||||
- Use instructional Turkish, consistent with existing Turkish docs.
|
||||
- Use imperative/guide language when appropriate (e.g. “açalım”, “gidin”, “kopyalayalım”).
|
||||
|
||||
### Headings
|
||||
|
||||
- Follow existing Turkish heading style (Title Case where used; no trailing period).
|
||||
|
||||
### Quotes
|
||||
|
||||
- Alıntı stili mevcut Türkçe dokümanlarla tutarlı tutun (genellikle metin içinde ASCII tırnak işaretleri kullanılır).
|
||||
- Satır içi kod, kod blokları, URL'ler veya dosya yolları içindeki tırnak işaretlerini asla değiştirmeyin.
|
||||
|
||||
### Ellipsis
|
||||
|
||||
- Üç nokta (...) stili mevcut Türkçe dokümanlarla tutarlı tutun.
|
||||
- Kod, URL veya CLI örneklerindeki `...` ifadesini asla değiştirmeyin.
|
||||
|
||||
### Preferred translations / glossary
|
||||
|
||||
Do not translate technical terms like path, route, request, response, query, body, cookie, and header, keep them as is.
|
||||
|
||||
- Suffixing is very important, when adding Turkish suffixes to the English words, do that based on the pronunciation of the word and with an apostrophe.
|
||||
|
||||
- Suffixes also changes based on what word comes next in Turkish too, here is an example:
|
||||
|
||||
"Server'a gelen request'leri intercept... " or this could have been "request'e", "request'i" etc.
|
||||
|
||||
- Some words are tricky like "path'e" can't be used like "path'a" but it could have been "path'i" "path'leri" etc.
|
||||
|
||||
- You can use a more instructional style, that is consistent with the document, you can add the Turkish version of the term in parenthesis if it is not something very obvious, or an advanced concept, but do not over do it, do it only the first time it is mentioned, but keep the English term as the primary word.
|
||||
|
||||
### `///` admonitions
|
||||
|
||||
- Keep the admonition keyword in English (do not translate `note`, `tip`, etc.).
|
||||
- If a title is present, prefer these canonical titles:
|
||||
|
||||
- `/// note | Not`
|
||||
- `/// note | Teknik Detaylar`
|
||||
- `/// tip | İpucu`
|
||||
- `/// warning | Uyarı`
|
||||
- `/// info | Bilgi`
|
||||
- `/// check | Ek bilgi`
|
||||
|
||||
Prefer `İpucu` over `Ipucu`.
|
||||
@@ -6,23 +6,23 @@ Language code: uk.
|
||||
|
||||
### Grammar and tone
|
||||
|
||||
1) Use polite/formal address consistent with existing Ukrainian docs (use “ви/ваш”).
|
||||
2) Keep the tone concise and technical.
|
||||
- Use polite/formal address consistent with existing Ukrainian docs (use “ви/ваш”).
|
||||
- Keep the tone concise and technical.
|
||||
|
||||
### Headings
|
||||
|
||||
1) Follow existing Ukrainian heading style; keep headings short and instructional.
|
||||
2) Do not add trailing punctuation to headings.
|
||||
- Follow existing Ukrainian heading style; keep headings short and instructional.
|
||||
- Do not add trailing punctuation to headings.
|
||||
|
||||
### Quotes
|
||||
|
||||
1) Prefer Ukrainian guillemets «…» for quoted terms in prose, matching existing Ukrainian docs.
|
||||
2) Never change quotes inside inline code, code blocks, URLs, or file paths.
|
||||
- Prefer Ukrainian guillemets «…» for quoted terms in prose, matching existing Ukrainian docs.
|
||||
- Never change quotes inside inline code, code blocks, URLs, or file paths.
|
||||
|
||||
### Ellipsis
|
||||
|
||||
1) Keep ellipsis style consistent with existing Ukrainian docs.
|
||||
2) Never change `...` in code, URLs, or CLI examples.
|
||||
- Keep ellipsis style consistent with existing Ukrainian docs.
|
||||
- Never change `...` in code, URLs, or CLI examples.
|
||||
|
||||
### Preferred translations / glossary
|
||||
|
||||
@@ -35,8 +35,8 @@ Use the following preferred translations when they apply in documentation prose:
|
||||
|
||||
### `///` admonitions
|
||||
|
||||
1) Keep the admonition keyword in English (do not translate `note`, `tip`, etc.).
|
||||
2) If a title is present, prefer these canonical titles (choose one canonical form where variants exist):
|
||||
- Keep the admonition keyword in English (do not translate `note`, `tip`, etc.).
|
||||
- If a title is present, prefer these canonical titles (choose one canonical form where variants exist):
|
||||
|
||||
- `/// note | Примітка`
|
||||
- `/// note | Технічні деталі`
|
||||
|
||||
60
docs/zh-hant/llm-prompt.md
Normal file
60
docs/zh-hant/llm-prompt.md
Normal file
@@ -0,0 +1,60 @@
|
||||
### Target language
|
||||
|
||||
Translate to Traditional Chinese (繁體中文).
|
||||
|
||||
Language code: zh-hant.
|
||||
|
||||
### Grammar and tone
|
||||
|
||||
- Use clear, concise technical Traditional Chinese consistent with existing docs.
|
||||
- Address the reader naturally (commonly using “你/你的”).
|
||||
|
||||
### Headings
|
||||
|
||||
- Follow existing Traditional Chinese heading style (short and descriptive).
|
||||
- Do not add trailing punctuation to headings.
|
||||
|
||||
### Quotes and punctuation
|
||||
|
||||
- Keep punctuation style consistent with existing Traditional Chinese docs (they often mix English terms like “FastAPI” with Chinese text).
|
||||
- Never change punctuation inside inline code, code blocks, URLs, or file paths.
|
||||
- For more details, please follow the [Chinese Copywriting Guidelines](https://github.com/sparanoid/chinese-copywriting-guidelines).
|
||||
|
||||
### Ellipsis
|
||||
|
||||
- Keep ellipsis style consistent within each document, prefer `...` over `……`.
|
||||
- Never change ellipsis in code, URLs, or CLI examples.
|
||||
|
||||
### Preferred translations / glossary
|
||||
|
||||
- Should avoid using simplified Chinese characters and terms. Always examine if the translation can be easily comprehended by the Traditional Chinese readers.
|
||||
- For some Python-specific terms like "pickle", "list", "dict" etc, we don't have to translate them.
|
||||
- Use the following preferred translations when they apply in documentation prose:
|
||||
|
||||
- request (HTTP): 請求
|
||||
- response (HTTP): 回應
|
||||
- path operation: 路徑操作
|
||||
- path operation function: 路徑操作函式
|
||||
|
||||
The translation can optionally include the original English text only in the first occurrence of each page (e.g. "路徑操作 (path operation)") if the translation is hard to be comprehended by most of the Chinese readers.
|
||||
|
||||
### `///` admonitions
|
||||
|
||||
1) Keep the admonition keyword in English (do not translate `note`, `tip`, etc.).
|
||||
2) Many Traditional Chinese docs currently omit titles in `///` blocks; that is OK.
|
||||
3) If a generic title is present, prefer these canonical titles:
|
||||
|
||||
- `/// note | 注意`
|
||||
|
||||
Notes:
|
||||
|
||||
- `details` blocks exist; keep `/// details` as-is and translate only the title after `|`.
|
||||
- Example canonical titles used in existing docs:
|
||||
|
||||
```
|
||||
/// details | 上述指令的含義
|
||||
```
|
||||
|
||||
```
|
||||
/// details | 關於 `requirements.txt`
|
||||
```
|
||||
@@ -4,7 +4,7 @@ FastAPI 基于 **Pydantic** 构建,前文已经介绍过如何使用 Pydantic
|
||||
|
||||
但 FastAPI 还可以使用数据类(<a href="https://docs.python.org/3/library/dataclasses.html" class="external-link" target="_blank">`dataclasses`</a>):
|
||||
|
||||
{* ../../docs_src/dataclasses/tutorial001.py hl[1,7:12,19:20] *}
|
||||
{* ../../docs_src/dataclasses_/tutorial001.py hl[1,7:12,19:20] *}
|
||||
|
||||
这还是借助于 **Pydantic** 及其<a href="https://pydantic-docs.helpmanual.io/usage/dataclasses/#use-of-stdlib-dataclasses-with-basemodel" class="external-link" target="_blank">内置的 `dataclasses`</a>。
|
||||
|
||||
@@ -32,7 +32,7 @@ FastAPI 基于 **Pydantic** 构建,前文已经介绍过如何使用 Pydantic
|
||||
|
||||
在 `response_model` 参数中使用 `dataclasses`:
|
||||
|
||||
{* ../../docs_src/dataclasses/tutorial002.py hl[1,7:13,19] *}
|
||||
{* ../../docs_src/dataclasses_/tutorial002.py hl[1,7:13,19] *}
|
||||
|
||||
本例把数据类自动转换为 Pydantic 数据类。
|
||||
|
||||
@@ -49,7 +49,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`;
|
||||
|
||||
46
docs/zh/llm-prompt.md
Normal file
46
docs/zh/llm-prompt.md
Normal file
@@ -0,0 +1,46 @@
|
||||
### Target language
|
||||
|
||||
Translate to Simplified Chinese (简体中文).
|
||||
|
||||
Language code: zh.
|
||||
|
||||
### Grammar and tone
|
||||
|
||||
- Use clear, concise technical Chinese consistent with existing docs.
|
||||
- Address the reader naturally (commonly using “你/你的”).
|
||||
|
||||
### Headings
|
||||
|
||||
- Follow existing Simplified Chinese heading style (short and descriptive).
|
||||
- Do not add trailing punctuation to headings.
|
||||
- If a heading contains only the name of a FastAPI feature, do not translate it.
|
||||
|
||||
### Quotes and punctuation
|
||||
|
||||
- Keep punctuation style consistent with existing Simplified Chinese docs (they often mix English terms like “FastAPI” with Chinese text).
|
||||
- Never change punctuation inside inline code, code blocks, URLs, or file paths.
|
||||
|
||||
### Ellipsis
|
||||
|
||||
- Keep ellipsis style consistent within each document, prefer `...` over `……`.
|
||||
- Never change ellipsis in code, URLs, or CLI examples.
|
||||
|
||||
### Preferred translations / glossary
|
||||
|
||||
Use the following preferred translations when they apply in documentation prose:
|
||||
|
||||
- request (HTTP): 请求
|
||||
- response (HTTP): 响应
|
||||
- path operation: 路径操作
|
||||
- path operation function: 路径操作函数
|
||||
|
||||
### `///` admonitions
|
||||
|
||||
- Keep the admonition keyword in English (do not translate `note`, `tip`, etc.).
|
||||
- If a title is present, prefer these canonical titles:
|
||||
|
||||
- `/// tip | 提示`
|
||||
- `/// note | 注意`
|
||||
- `/// warning | 警告`
|
||||
- `/// info | 信息`
|
||||
- `/// danger | 危险`
|
||||
0
docs_src/background_tasks/__init__.py
Normal file
0
docs_src/background_tasks/__init__.py
Normal file
0
docs_src/behind_a_proxy/__init__.py
Normal file
0
docs_src/behind_a_proxy/__init__.py
Normal file
0
docs_src/body/__init__.py
Normal file
0
docs_src/body/__init__.py
Normal file
0
docs_src/body_fields/__init__.py
Normal file
0
docs_src/body_fields/__init__.py
Normal file
0
docs_src/body_multiple_params/__init__.py
Normal file
0
docs_src/body_multiple_params/__init__.py
Normal file
0
docs_src/body_nested_models/__init__.py
Normal file
0
docs_src/body_nested_models/__init__.py
Normal file
0
docs_src/body_updates/__init__.py
Normal file
0
docs_src/body_updates/__init__.py
Normal file
0
docs_src/conditional_openapi/__init__.py
Normal file
0
docs_src/conditional_openapi/__init__.py
Normal file
0
docs_src/configure_swagger_ui/__init__.py
Normal file
0
docs_src/configure_swagger_ui/__init__.py
Normal file
0
docs_src/cookie_param_models/__init__.py
Normal file
0
docs_src/cookie_param_models/__init__.py
Normal file
0
docs_src/cookie_params/__init__.py
Normal file
0
docs_src/cookie_params/__init__.py
Normal file
0
docs_src/cors/__init__.py
Normal file
0
docs_src/cors/__init__.py
Normal file
0
docs_src/custom_docs_ui/__init__.py
Normal file
0
docs_src/custom_docs_ui/__init__.py
Normal file
0
docs_src/custom_request_and_route/__init__.py
Normal file
0
docs_src/custom_request_and_route/__init__.py
Normal file
0
docs_src/custom_response/__init__.py
Normal file
0
docs_src/custom_response/__init__.py
Normal file
0
docs_src/dataclasses_/__init__.py
Normal file
0
docs_src/dataclasses_/__init__.py
Normal file
0
docs_src/debugging/__init__.py
Normal file
0
docs_src/debugging/__init__.py
Normal file
0
docs_src/dependencies/__init__.py
Normal file
0
docs_src/dependencies/__init__.py
Normal file
0
docs_src/dependency_testing/__init__.py
Normal file
0
docs_src/dependency_testing/__init__.py
Normal file
0
docs_src/encoder/__init__.py
Normal file
0
docs_src/encoder/__init__.py
Normal file
0
docs_src/events/__init__.py
Normal file
0
docs_src/events/__init__.py
Normal file
0
docs_src/extending_openapi/__init__.py
Normal file
0
docs_src/extending_openapi/__init__.py
Normal file
0
docs_src/extra_data_types/__init__.py
Normal file
0
docs_src/extra_data_types/__init__.py
Normal file
0
docs_src/extra_models/__init__.py
Normal file
0
docs_src/extra_models/__init__.py
Normal file
0
docs_src/first_steps/__init__.py
Normal file
0
docs_src/first_steps/__init__.py
Normal file
0
docs_src/generate_clients/__init__.py
Normal file
0
docs_src/generate_clients/__init__.py
Normal file
0
docs_src/graphql_/__init__.py
Normal file
0
docs_src/graphql_/__init__.py
Normal file
0
docs_src/handling_errors/__init__.py
Normal file
0
docs_src/handling_errors/__init__.py
Normal file
0
docs_src/header_param_models/__init__.py
Normal file
0
docs_src/header_param_models/__init__.py
Normal file
0
docs_src/header_params/__init__.py
Normal file
0
docs_src/header_params/__init__.py
Normal file
0
docs_src/metadata/__init__.py
Normal file
0
docs_src/metadata/__init__.py
Normal file
0
docs_src/middleware/__init__.py
Normal file
0
docs_src/middleware/__init__.py
Normal file
0
docs_src/openapi_callbacks/__init__.py
Normal file
0
docs_src/openapi_callbacks/__init__.py
Normal file
0
docs_src/openapi_webhooks/__init__.py
Normal file
0
docs_src/openapi_webhooks/__init__.py
Normal file
0
docs_src/path_operation_configuration/__init__.py
Normal file
0
docs_src/path_operation_configuration/__init__.py
Normal file
0
docs_src/path_params/__init__.py
Normal file
0
docs_src/path_params/__init__.py
Normal file
0
docs_src/pydantic_v1_in_v2/__init__.py
Normal file
0
docs_src/pydantic_v1_in_v2/__init__.py
Normal file
0
docs_src/python_types/__init__.py
Normal file
0
docs_src/python_types/__init__.py
Normal file
0
docs_src/query_param_models/__init__.py
Normal file
0
docs_src/query_param_models/__init__.py
Normal file
0
docs_src/query_params/__init__.py
Normal file
0
docs_src/query_params/__init__.py
Normal file
0
docs_src/query_params_str_validations/__init__.py
Normal file
0
docs_src/query_params_str_validations/__init__.py
Normal file
0
docs_src/request_files/__init__.py
Normal file
0
docs_src/request_files/__init__.py
Normal file
0
docs_src/request_form_models/__init__.py
Normal file
0
docs_src/request_form_models/__init__.py
Normal file
@@ -1,20 +0,0 @@
|
||||
from typing import Annotated
|
||||
|
||||
from fastapi import FastAPI
|
||||
from fastapi.temp_pydantic_v1_params import Form
|
||||
from pydantic.v1 import BaseModel
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
|
||||
class FormData(BaseModel):
|
||||
username: str
|
||||
password: str
|
||||
|
||||
class Config:
|
||||
extra = "forbid"
|
||||
|
||||
|
||||
@app.post("/login/")
|
||||
async def login(data: Annotated[FormData, Form()]):
|
||||
return data
|
||||
@@ -1,18 +0,0 @@
|
||||
from fastapi import FastAPI
|
||||
from fastapi.temp_pydantic_v1_params import Form
|
||||
from pydantic.v1 import BaseModel
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
|
||||
class FormData(BaseModel):
|
||||
username: str
|
||||
password: str
|
||||
|
||||
class Config:
|
||||
extra = "forbid"
|
||||
|
||||
|
||||
@app.post("/login/")
|
||||
async def login(data: FormData = Form()):
|
||||
return data
|
||||
0
docs_src/request_forms/__init__.py
Normal file
0
docs_src/request_forms/__init__.py
Normal file
0
docs_src/request_forms_and_files/__init__.py
Normal file
0
docs_src/request_forms_and_files/__init__.py
Normal file
0
docs_src/response_change_status_code/__init__.py
Normal file
0
docs_src/response_change_status_code/__init__.py
Normal file
0
docs_src/response_cookies/__init__.py
Normal file
0
docs_src/response_cookies/__init__.py
Normal file
0
docs_src/response_directly/__init__.py
Normal file
0
docs_src/response_directly/__init__.py
Normal file
0
docs_src/response_headers/__init__.py
Normal file
0
docs_src/response_headers/__init__.py
Normal file
0
docs_src/response_model/__init__.py
Normal file
0
docs_src/response_model/__init__.py
Normal file
0
docs_src/response_status_code/__init__.py
Normal file
0
docs_src/response_status_code/__init__.py
Normal file
0
docs_src/schema_extra_example/__init__.py
Normal file
0
docs_src/schema_extra_example/__init__.py
Normal file
0
docs_src/security/__init__.py
Normal file
0
docs_src/security/__init__.py
Normal file
0
docs_src/separate_openapi_schemas/__init__.py
Normal file
0
docs_src/separate_openapi_schemas/__init__.py
Normal file
0
docs_src/settings/__init__.py
Normal file
0
docs_src/settings/__init__.py
Normal file
0
docs_src/static_files/__init__.py
Normal file
0
docs_src/static_files/__init__.py
Normal file
0
docs_src/sub_applications/__init__.py
Normal file
0
docs_src/sub_applications/__init__.py
Normal file
0
docs_src/templates/__init__.py
Normal file
0
docs_src/templates/__init__.py
Normal file
0
docs_src/templates/static/__init__.py
Normal file
0
docs_src/templates/static/__init__.py
Normal file
0
docs_src/templates/templates/__init__.py
Normal file
0
docs_src/templates/templates/__init__.py
Normal file
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user