# ๐ ๏ธ
๐ ๐ช ๐ ๐น ๐ ๐จโ๐จ, ๐ผ โฎ๏ธ ๐ ๐ ๐ โ๏ธ ๐.
## ๐ค `uvicorn`
๐ FastAPI ๐ธ, ๐ & ๐ `uvicorn` ๐:
```Python hl_lines="1 15"
{!../../../docs_src/debugging/tutorial001.py!}
```
### ๐ `__name__ == "__main__"`
๐ ๐ฏ `__name__ == "__main__"` โ๏ธ ๐ ๐ ๐ ๏ธ ๐โ ๐ ๐ ๐ค โฎ๏ธ:
```console
$ python myapp.py
```
โ๏ธ ๐ซ ๐ค ๐โ โ1๏ธโฃ ๐ ๐ โซ๏ธ, ๐:
```Python
from myapp import app
```
#### ๐
โน
โก๏ธ ๐ฌ ๐ ๐ ๐ `myapp.py`.
๐ฅ ๐ ๐ โซ๏ธ โฎ๏ธ:
```console
$ python myapp.py
```
โคด๏ธ ๐ ๐ข `__name__` ๐ ๐, โ ๐ ๐, ๐ โ๏ธ ๐ฒ ๐ป `"__main__"`.
, ๐:
```Python
uvicorn.run(app, host="0.0.0.0", port=8000)
```
๐ ๐.
---
๐ ๐ ๐ซ ๐จ ๐ฅ ๐ ๐ ๐ ๐น (๐).
, ๐ฅ ๐ โ๏ธ โ1๏ธโฃ ๐ `importer.py` โฎ๏ธ:
```Python
from myapp import app
# Some more code
```
๐ ๐ผ, ๐ง ๐ข ๐ `myapp.py` ๐ ๐ซ โ๏ธ ๐ข `__name__` โฎ๏ธ ๐ฒ `"__main__"`.
, โธ:
```Python
uvicorn.run(app, host="0.0.0.0", port=8000)
```
๐ ๐ซ ๐ ๏ธ.
!!! info
๐
โน, โ
๐ ๐ ๐ฉบ.
## ๐ ๐ ๐ โฎ๏ธ ๐ ๐น
โฉ๏ธ ๐ ๐ Uvicorn ๐ฝ ๐ โช๏ธโก๏ธ ๐ ๐, ๐ ๐ช ๐ค ๐ ๐ ๐ (๐ FastAPI ๐ธ) ๐ โช๏ธโก๏ธ ๐น.
---
๐ผ, ๐ ๐ ๐, ๐ ๐ช:
* ๐ถ "โน" ๐.
* "๐ฎ ๐ณ...".
* ๐ "๐"
* ๐ ๐น โฎ๏ธ ๐ "`Python: Current File (Integrated Terminal)`".
โซ๏ธ ๐ โคด๏ธ โถ๏ธ ๐ฝ โฎ๏ธ ๐ **FastAPI** ๐, โ๏ธ ๐ 0๏ธโฃ, โ๏ธ.
๐ฅ โ โซ๏ธ ๐ช ๐:
---
๐ฅ ๐ โ๏ธ ๐, ๐ ๐ช:
* ๐ "๐" ๐ฃ.
* ๐ ๐ "โน...".
* โคด๏ธ ๐ ๐ฃ ๐ฆ ๐.
* ๐ ๐ โน (๐ ๐ผ, `main.py`).
โซ๏ธ ๐ โคด๏ธ โถ๏ธ ๐ฝ โฎ๏ธ ๐ **FastAPI** ๐, โ๏ธ ๐ 0๏ธโฃ, โ๏ธ.
๐ฅ โ โซ๏ธ ๐ช ๐: