Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9d293b7

Browse files
authored
🌐 Update Portuguese translations (#13156)
1 parent3d2ef23 commit9d293b7

File tree

4 files changed

+130
-157
lines changed

4 files changed

+130
-157
lines changed

‎docs/pt/docs/deployment/manually.md‎

Lines changed: 27 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -7,45 +7,33 @@ Em resumo, utilize o comando `fastapi run` para inicializar sua aplicação Fast
77
<divclass="termy">
88

99
```console
10-
$<font color="#4E9A06">fastapi</font> run<u style="text-decoration-style:single">main.py</u>
11-
<font color="#3465A4">INFO </font> Using path <font color="#3465A4">main.py</font>
12-
<font color="#3465A4">INFO </font> Resolved absolute path <font color="#75507B">/home/user/code/awesomeapp/</font><font color="#AD7FA8">main.py</font>
13-
<font color="#3465A4">INFO </font> Searching for package file structure from directories with <font color="#3465A4">__init__.py</font> files
14-
<font color="#3465A4">INFO </font> Importing from <font color="#75507B">/home/user/code/</font><font color="#AD7FA8">awesomeapp</font>
15-
16-
╭─ <font color="#8AE234"><b>Python module file</b></font> ─╮
17-
│ │
18-
│ 🐍 main.py │
19-
│ │
20-
╰──────────────────────╯
21-
22-
<font color="#3465A4">INFO </font> Importing module <font color="#4E9A06">main</font>
23-
<font color="#3465A4">INFO </font> Found importable FastAPI app
24-
25-
╭─ <font color="#8AE234"><b>Importable FastAPI app</b></font> ─╮
26-
│ │
27-
│ <span style="background-color:#272822"><font color="#FF4689">from</font></span><span style="background-color:#272822"><font color="#F8F8F2"> main </font></span><span style="background-color:#272822"><font color="#FF4689">import</font></span><span style="background-color:#272822"><font color="#F8F8F2"> app</font></span><span style="background-color:#272822"> </span> │
28-
│ │
29-
╰──────────────────────────╯
30-
31-
<font color="#3465A4">INFO </font> Using import string <font color="#8AE234"><b>main:app</b></font>
32-
33-
<font color="#4E9A06">╭─────────── FastAPI CLI - Production mode ───────────╮</font>
34-
<font color="#4E9A06">│ │</font>
35-
<font color="#4E9A06">│ Serving at: http://0.0.0.0:8000 │</font>
36-
<font color="#4E9A06">│ │</font>
37-
<font color="#4E9A06">│ API docs: http://0.0.0.0:8000/docs │</font>
38-
<font color="#4E9A06">│ │</font>
39-
<font color="#4E9A06">│ Running in production mode, for development use: │</font>
40-
<font color="#4E9A06">│ │</font>
41-
<font color="#4E9A06">│ </font><font color="#8AE234"><b>fastapi dev</b></font><font color="#4E9A06"> │</font>
42-
<font color="#4E9A06">│ │</font>
43-
<font color="#4E9A06">╰─────────────────────────────────────────────────────╯</font>
44-
45-
<font color="#4E9A06">INFO</font>: Started server process [<font color="#06989A">2306215</font>]
46-
<font color="#4E9A06">INFO</font>: Waiting for application startup.
47-
<font color="#4E9A06">INFO</font>: Application startup complete.
48-
<font color="#4E9A06">INFO</font>: Uvicorn running on <b>http://0.0.0.0:8000</b> (Press CTRL+C to quit)
10+
$<font color="#4E9A06">fastapi</font> run<u style="text-decoration-style:solid">main.py</u>
11+
12+
<span style="background-color:#009485"><font color="#D3D7CF"> FastAPI </font></span> Starting production server 🚀
13+
14+
Searching for package file structure from directories
15+
with <font color="#3465A4">__init__.py</font> files
16+
Importing from <font color="#75507B">/home/user/code/</font><font color="#AD7FA8">awesomeapp</font>
17+
18+
<span style="background-color:#007166"><font color="#D3D7CF"> module </font></span> 🐍 main.py
19+
20+
<span style="background-color:#007166"><font color="#D3D7CF"> code </font></span> Importing the FastAPI app object from the module with
21+
the following code:
22+
23+
<u style="text-decoration-style:solid">from </u><u style="text-decoration-style:solid"><b>main</b></u><u style="text-decoration-style:solid"> import </u><u style="text-decoration-style:solid"><b>app</b></u>
24+
25+
<span style="background-color:#007166"><font color="#D3D7CF"> app </font></span> Using import string: <font color="#3465A4">main:app</font>
26+
27+
<span style="background-color:#007166"><font color="#D3D7CF"> server </font></span> Server started at <font color="#729FCF"><u style="text-decoration-style:solid">http://0.0.0.0:8000</u></font>
28+
<span style="background-color:#007166"><font color="#D3D7CF"> server </font></span> Documentation at <font color="#729FCF"><u style="text-decoration-style:solid">http://0.0.0.0:8000/docs</u></font>
29+
30+
Logs:
31+
32+
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Started server process <b>[</b><font color="#34E2E2"><b>2306215</b></font><b>]</b>
33+
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Waiting for application startup.
34+
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Application startup complete.
35+
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Uvicorn running on <font color="#729FCF"><u style="text-decoration-style:solid">http://0.0.0.0:8000</u></font> <b>(</b>Press CTRL+C
36+
to quit<b>)</b>
4937
```
5038

5139
</div>

‎docs/pt/docs/deployment/server-workers.md‎

Lines changed: 37 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -36,56 +36,43 @@ Se você usar o comando `fastapi`:
3636
<divclass="termy">
3737

3838
```console
39-
$<pre><font color="#4E9A06">fastapi</font> run --workers 4<u style="text-decoration-style:single">main.py</u>
40-
<font color="#3465A4">INFO </font> Using path <font color="#3465A4">main.py</font>
41-
<font color="#3465A4">INFO </font> Resolved absolute path <font color="#75507B">/home/user/code/awesomeapp/</font><font color="#AD7FA8">main.py</font>
42-
<font color="#3465A4">INFO </font> Searching for package file structure from directories with <font color="#3465A4">__init__.py</font> files
43-
<font color="#3465A4">INFO </font> Importing from <font color="#75507B">/home/user/code/</font><font color="#AD7FA8">awesomeapp</font>
44-
45-
╭─ <font color="#8AE234"><b>Python module file</b></font> ─╮
46-
│ │
47-
│ 🐍 main.py │
48-
│ │
49-
╰──────────────────────╯
50-
51-
<font color="#3465A4">INFO </font> Importing module <font color="#4E9A06">main</font>
52-
<font color="#3465A4">INFO </font> Found importable FastAPI app
53-
54-
╭─ <font color="#8AE234"><b>Importable FastAPI app</b></font> ─╮
55-
│ │
56-
│ <span style="background-color:#272822"><font color="#FF4689">from</font></span><span style="background-color:#272822"><font color="#F8F8F2"> main </font></span><span style="background-color:#272822"><font color="#FF4689">import</font></span><span style="background-color:#272822"><font color="#F8F8F2"> app</font></span><span style="background-color:#272822"> </span> │
57-
│ │
58-
╰──────────────────────────╯
59-
60-
<font color="#3465A4">INFO </font> Using import string <font color="#8AE234"><b>main:app</b></font>
61-
62-
<font color="#4E9A06">╭─────────── FastAPI CLI - Production mode ───────────╮</font>
63-
<font color="#4E9A06">│ │</font>
64-
<font color="#4E9A06">│ Serving at: http://0.0.0.0:8000 │</font>
65-
<font color="#4E9A06">│ │</font>
66-
<font color="#4E9A06">│ API docs: http://0.0.0.0:8000/docs │</font>
67-
<font color="#4E9A06">│ │</font>
68-
<font color="#4E9A06">│ Running in production mode, for development use: │</font>
69-
<font color="#4E9A06">│ │</font>
70-
<font color="#4E9A06">│ </font><font color="#8AE234"><b>fastapi dev</b></font><font color="#4E9A06"> │</font>
71-
<font color="#4E9A06">│ │</font>
72-
<font color="#4E9A06">╰─────────────────────────────────────────────────────╯</font>
73-
74-
<font color="#4E9A06">INFO</font>: Uvicorn running on <b>http://0.0.0.0:8000</b> (Press CTRL+C to quit)
75-
<font color="#4E9A06">INFO</font>: Started parent process [<font color="#34E2E2"><b>27365</b></font>]
76-
<font color="#4E9A06">INFO</font>: Started server process [<font color="#06989A">27368</font>]
77-
<font color="#4E9A06">INFO</font>: Waiting for application startup.
78-
<font color="#4E9A06">INFO</font>: Application startup complete.
79-
<font color="#4E9A06">INFO</font>: Started server process [<font color="#06989A">27369</font>]
80-
<font color="#4E9A06">INFO</font>: Waiting for application startup.
81-
<font color="#4E9A06">INFO</font>: Application startup complete.
82-
<font color="#4E9A06">INFO</font>: Started server process [<font color="#06989A">27370</font>]
83-
<font color="#4E9A06">INFO</font>: Waiting for application startup.
84-
<font color="#4E9A06">INFO</font>: Application startup complete.
85-
<font color="#4E9A06">INFO</font>: Started server process [<font color="#06989A">27367</font>]
86-
<font color="#4E9A06">INFO</font>: Waiting for application startup.
87-
<font color="#4E9A06">INFO</font>: Application startup complete.
88-
</pre>
39+
$<font color="#4E9A06">fastapi</font> run --workers 4<u style="text-decoration-style:solid">main.py</u>
40+
41+
<span style="background-color:#009485"><font color="#D3D7CF"> FastAPI </font></span> Starting production server 🚀
42+
43+
Searching for package file structure from directories with
44+
<font color="#3465A4">__init__.py</font> files
45+
Importing from <font color="#75507B">/home/user/code/</font><font color="#AD7FA8">awesomeapp</font>
46+
47+
<span style="background-color:#007166"><font color="#D3D7CF"> module </font></span> 🐍 main.py
48+
49+
<span style="background-color:#007166"><font color="#D3D7CF"> code </font></span> Importing the FastAPI app object from the module with the
50+
following code:
51+
52+
<u style="text-decoration-style:solid">from </u><u style="text-decoration-style:solid"><b>main</b></u><u style="text-decoration-style:solid"> import </u><u style="text-decoration-style:solid"><b>app</b></u>
53+
54+
<span style="background-color:#007166"><font color="#D3D7CF"> app </font></span> Using import string: <font color="#3465A4">main:app</font>
55+
56+
<span style="background-color:#007166"><font color="#D3D7CF"> server </font></span> Server started at <font color="#729FCF"><u style="text-decoration-style:solid">http://0.0.0.0:8000</u></font>
57+
<span style="background-color:#007166"><font color="#D3D7CF"> server </font></span> Documentation at <font color="#729FCF"><u style="text-decoration-style:solid">http://0.0.0.0:8000/docs</u></font>
58+
59+
Logs:
60+
61+
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Uvicorn running on <font color="#729FCF"><u style="text-decoration-style:solid">http://0.0.0.0:8000</u></font> <b>(</b>Press CTRL+C to
62+
quit<b>)</b>
63+
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Started parent process <b>[</b><font color="#34E2E2"><b>27365</b></font><b>]</b>
64+
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Started server process <b>[</b><font color="#34E2E2"><b>27368</b></font><b>]</b>
65+
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Started server process <b>[</b><font color="#34E2E2"><b>27369</b></font><b>]</b>
66+
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Started server process <b>[</b><font color="#34E2E2"><b>27370</b></font><b>]</b>
67+
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Started server process <b>[</b><font color="#34E2E2"><b>27367</b></font><b>]</b>
68+
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Waiting for application startup.
69+
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Waiting for application startup.
70+
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Waiting for application startup.
71+
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Waiting for application startup.
72+
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Application startup complete.
73+
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Application startup complete.
74+
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Application startup complete.
75+
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Application startup complete.
8976
```
9077

9178
</div>

‎docs/pt/docs/tutorial/first-steps.md‎

Lines changed: 30 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,42 @@ Execute o servidor:
1111
<divclass="termy">
1212

1313
```console
14-
$uvicorn main:app --reload
14+
$<font color="#4E9A06">fastapi</font> dev<u style="text-decoration-style:solid">main.py</u>
1515

16-
<span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
17-
<span style="color: green;">INFO</span>: Started reloader process [28720]
18-
<span style="color: green;">INFO</span>: Started server process [28722]
19-
<span style="color: green;">INFO</span>: Waiting for application startup.
20-
<span style="color: green;">INFO</span>: Application startup complete.
21-
```
16+
<span style="background-color:#009485"><font color="#D3D7CF"> FastAPI </font></span> Starting development server 🚀
2217

23-
</div>
18+
Searching for package file structure from directories
19+
with <font color="#3465A4">__init__.py</font> files
20+
Importing from <font color="#75507B">/home/user/code/</font><font color="#AD7FA8">awesomeapp</font>
2421

25-
/// note | Nota
22+
<span><font color="#D3D7CF"> module </font></span> 🐍 main.py
2623

27-
O comando`uvicorn main:app` se refere a:
24+
<span style="background-color:#007166"><font color="#D3D7CF"> code </font></span> Importing the FastAPI app object from the module with
25+
the following code:
2826

29-
*`main`: o arquivo`main.py` (o "módulo" Python).
30-
*`app`: o objeto criado no arquivo`main.py` com a linha`app = FastAPI()`.
31-
*`--reload`: faz o servidor reiniciar após mudanças de código. Use apenas para desenvolvimento.
27+
<u style="text-decoration-style:solid">from </u><u style="text-decoration-style:solid"><b>main</b></u><u style="text-decoration-style:solid"> import </u><u style="text-decoration-style:solid"><b>app</b></u>
3228

33-
///
29+
<span style="background-color:#007166"><font color="#D3D7CF"> app </font></span> Using import string: <font color="#3465A4">main:app</font>
30+
31+
<span style="background-color:#007166"><font color="#D3D7CF"> server </font></span> Server started at <font color="#729FCF"><u style="text-decoration-style:solid">http://127.0.0.1:8000</u></font>
32+
<span style="background-color:#007166"><font color="#D3D7CF"> server </font></span> Documentation at <font color="#729FCF"><u style="text-decoration-style:solid">http://127.0.0.1:8000/docs</u></font>
33+
34+
<span style="background-color:#007166"><font color="#D3D7CF"> tip </font></span> Running in development mode, for production use:
35+
<b>fastapi run</b>
36+
37+
Logs:
38+
39+
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Will watch for changes in these directories:
40+
<b>[</b><font color="#4E9A06">&apos;/home/user/code/awesomeapp&apos;</font><b>]</b>
41+
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Uvicorn running on <font color="#729FCF"><u style="text-decoration-style:solid">http://127.0.0.1:8000</u></font> <b>(</b>Press CTRL+C
42+
to quit<b>)</b>
43+
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Started reloader process <b>[</b><font color="#34E2E2"><b>383138</b></font><b>]</b> using WatchFiles
44+
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Started server process <b>[</b><font color="#34E2E2"><b>383153</b></font><b>]</b>
45+
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Waiting for application startup.
46+
<span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Application startup complete.
47+
```
48+
49+
</div>
3450

3551
Na saída, temos:
3652

@@ -151,34 +167,6 @@ Aqui, a variável `app` será uma "instância" da classe `FastAPI`.
151167

152168
Este será o principal ponto de interação para criar toda a sua API.
153169

154-
Este `app` é o mesmo referenciado por `uvicorn` no comando:
155-
156-
<div class="termy">
157-
158-
```console
159-
$ uvicorn main:app --reload
160-
161-
<span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
162-
```
163-
164-
</div>
165-
166-
Se você criar a sua aplicação como:
167-
168-
{* ../../docs_src/first_steps/tutorial002.py hl[3] *}
169-
170-
E colocar em um arquivo `main.py`, você iria chamar o `uvicorn` assim:
171-
172-
<div class="termy">
173-
174-
```console
175-
$ uvicorn main:my_awesome_api --reload
176-
177-
<span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
178-
```
179-
180-
</div>
181-
182170
### Passo 3: crie uma *rota*
183171

184172
#### Rota

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp