@ -11,25 +11,25 @@
< em > FastAPI ํ๋ ์์ํฌ, ๊ณ ์ฑ๋ฅ, ๊ฐํธํ ํ์ต, ๋น ๋ฅธ ์ฝ๋ ์์ฑ, ์ค๋น๋ ํ๋ก๋์
< / em >
< / p >
< p align = "center" >
< a href = "https://github.com/fastapi/fastapi/actions?query=workflow%3ATest+event%3Apush+branch%3Amaster" target = "_blank" >
< a href = "https://github.com/fastapi/fastapi/actions?query=workflow%3ATest+event%3Apush+branch%3Amaster" >
< img src = "https://github.com/fastapi/fastapi/actions/workflows/test.yml/badge.svg?event=push&branch=master" alt = "Test" >
< / a >
< a href = "https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/fastapi" target = "_blank" >
< a href = "https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/fastapi" >
< img src = "https://coverage-badge.samuelcolvin.workers.dev/fastapi/fastapi.svg" alt = "Coverage" >
< / a >
< a href = "https://pypi.org/project/fastapi" target = "_blank" >
< a href = "https://pypi.org/project/fastapi" >
< img src = "https://img.shields.io/pypi/v/fastapi?color=%2334D058&label=pypi%20package" alt = "Package version" >
< / a >
< a href = "https://pypi.org/project/fastapi" target = "_blank" >
< a href = "https://pypi.org/project/fastapi" >
< img src = "https://img.shields.io/pypi/pyversions/fastapi.svg?color=%2334D058" alt = "Supported Python versions" >
< / a >
< / p >
---
**๋ฌธ์**: < a href = "https://fastapi.tiangolo.com/ko" target = "_blank" > https://fastapi.tiangolo.com< / a >
**๋ฌธ์**: [https://fastapi.tiangolo.com/ko ](https://fastapi.tiangolo.com/ko )
**์์ค ์ฝ๋**: < a href = "https://github.com/fastapi/fastapi" target = "_blank" > https://github.com/fastapi/fastapi< / a >
**์์ค ์ฝ๋**: [https://github.com/fastapi/fastapi ](https://github.com/fastapi/fastapi )
---
@ -44,7 +44,7 @@ FastAPI๋ ํ๋์ ์ด๊ณ , ๋น ๋ฅด๋ฉฐ(๊ณ ์ฑ๋ฅ), ํ์ด์ฌ ํ์ค ํ์
ํํธ
* **์ฌ์** : ์ฝ๊ฒ ์ฌ์ฉํ๊ณ ๋ฐฐ์ฐ๋๋ก ์ค๊ณ. ์ ์ ๋ฌธ์ ์ฝ๊ธฐ ์๊ฐ.
* **์งง์** : ์ฝ๋ ์ค๋ณต ์ต์ํ. ๊ฐ ๋งค๊ฐ๋ณ์ ์ ์ธ์ ์ฌ๋ฌ ๊ธฐ๋ฅ. ์ ์ ๋ฒ๊ทธ.
* **๊ฒฌ๊ณ ํจ** : ์ค๋น๋ ํ๋ก๋์
์ฉ ์ฝ๋๋ฅผ ์ป์ผ์ญ์์ค. ์๋ ๋ํํ ๋ฌธ์์ ํจ๊ป.
* **ํ์ค ๊ธฐ๋ฐ** : API์ ๋ํ (์์ ํ ํธํ๋๋) ๊ฐ๋ฐฉํ ํ์ค ๊ธฐ๋ฐ: < a href = "https://github.com/OAI/OpenAPI-Specification" class = "external-link" target = "_blank" > OpenAPI</ a > (์ด์ ์ Swagger๋ก ์๋ ค์ก๋) ๋ฐ < a href = "https://json-schema.org/" class = "external-link" target = "_blank" > JSON Schema</ a > .
* **ํ์ค ๊ธฐ๋ฐ** : API์ ๋ํ (์์ ํ ํธํ๋๋) ๊ฐ๋ฐฉํ ํ์ค ๊ธฐ๋ฐ: [OpenAPI ](https://github.com/OAI/OpenAPI-Specification ) (์ด์ ์ Swagger๋ก ์๋ ค์ก๋) ๋ฐ [JSON Schema ](https://json-schema.org/ ) .
< small > * ๋ด๋ถ ๊ฐ๋ฐํ์ ํ๋ก๋์
์ ํ๋ฆฌ์ผ์ด์
์ ๋น๋ํ ํ
์คํธ์ ๊ทผ๊ฑฐํ ์ธก์ < / small >
@ -55,51 +55,51 @@ FastAPI๋ ํ๋์ ์ด๊ณ , ๋น ๋ฅด๋ฉฐ(๊ณ ์ฑ๋ฅ), ํ์ด์ฌ ํ์ค ํ์
ํํธ
### ํค์คํค ์คํฐ์ { #keystone -sponsor }
{% for sponsor in sponsors.keystone -%}
< a href = "{{ sponsor.url }}" target = "_blank" t itle = "{{ sponsor.title }}" > < img src = "{{ sponsor.img }}" style = "border-radius:15px" > < / a >
< a href = "{{ sponsor.url }}" title = "{{ sponsor.title }}" > < img src = "{{ sponsor.img }}" style = "border-radius:15px" > < / a >
{% endfor -%}
### ๊ณจ๋ ๋ฐ ์ค๋ฒ ์คํฐ์ { #gold -and-silver-sponsors }
{% for sponsor in sponsors.gold -%}
< a href = "{{ sponsor.url }}" target = "_blank" t itle = "{{ sponsor.title }}" > < img src = "{{ sponsor.img }}" style = "border-radius:15px" > < / a >
< a href = "{{ sponsor.url }}" title = "{{ sponsor.title }}" > < img src = "{{ sponsor.img }}" style = "border-radius:15px" > < / a >
{% endfor -%}
{%- for sponsor in sponsors.silver -%}
< a href = "{{ sponsor.url }}" target = "_blank" t itle = "{{ sponsor.title }}" > < img src = "{{ sponsor.img }}" style = "border-radius:15px" > < / a >
< a href = "{{ sponsor.url }}" title = "{{ sponsor.title }}" > < img src = "{{ sponsor.img }}" style = "border-radius:15px" > < / a >
{% endfor %}
<!-- /sponsors -->
< a href = "https://fastapi.tiangolo.com/ko/fastapi-people/#sponsors" class = "external-link" target = "_blank" > ๋ค๋ฅธ ์คํฐ์< / a >
[๋ค๋ฅธ ์คํฐ์ ](https://fastapi.tiangolo.com/ko/fastapi-people/#sponsors )
## ์๊ฒฌ๋ค { #opinions }
"_[...] ์ ๋ ์์ฆ **FastAPI**๋ฅผ ๋ง์ด ์ฌ์ฉํ๊ณ ์์ต๋๋ค. [...] ์ฌ์ค ์ฐ๋ฆฌ ํ์ **๋ง์ดํฌ๋ก์ํํธ ML ์๋น์ค** ์ ๋ถ๋ฅผ ๋ฐ๊ฟ ๊ณํ์
๋๋ค. ๊ทธ์ค ์ผ๋ถ๋ ํต์ฌ **Windows**์ ๋ช๋ช์ **Office** ์ ํ๋ค์ด ํตํฉ๋๊ณ ์์ต๋๋ค._"
< div style = "text-align: right; margin-right: 10%;" > Kabir Khan - < strong > ๋ง์ดํฌ๋ก์ํํธ< / strong > < a href = "https://github.com/fastapi/fastapi/pull/26" target = "_blank" > < small > (ref)< / small > < / a > < / div >
< div style = "text-align: right; margin-right: 10%;" > Kabir Khan - < strong > ๋ง์ดํฌ๋ก์ํํธ< / strong > < a href = "https://github.com/fastapi/fastapi/pull/26" > < small > (ref)< / small > < / a > < / div >
---
"_**FastAPI** ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ฑํํ์ฌ **์์ธก**์ ์ป๊ธฐ ์ํด ์ฟผ๋ฆฌ๋ฅผ ์คํ ํ ์ ์๋ **REST** ์๋ฒ๋ฅผ ์์ฑํ์ต๋๋ค. [Ludwig์ ์ํด]_"
< div style = "text-align: right; margin-right: 10%;" > Piero Molino, Yaroslav Dudin ๊ทธ๋ฆฌ๊ณ Sai Sumanth Miryala - < strong > ์ฐ๋ฒ< / strong > < a href = "https://eng.uber.com/ludwig-v0-2/" target = "_blank" > < small > (ref)< / small > < / a > < / div >
< div style = "text-align: right; margin-right: 10%;" > Piero Molino, Yaroslav Dudin ๊ทธ๋ฆฌ๊ณ Sai Sumanth Miryala - < strong > ์ฐ๋ฒ< / strong > < a href = "https://eng.uber.com/ludwig-v0-2/" > < small > (ref)< / small > < / a > < / div >
---
"_**Netflix**๋ ์ฐ๋ฆฌ์ ์คํ ์์ค ๋ฐฐํฌํ์ธ **์๊ธฐ ๊ด๋ฆฌ** ์ค์ผ์คํธ๋ ์ด์
ํ๋ ์์ํฌ๋ฅผ ๋ฐํํ ์ ์์ด ๊ธฐ์ฉ๋๋ค: ๋ฐ๋ก **Dispatch**์
๋๋ค! [**FastAPI**๋ก ๋น๋]_"
< div style = "text-align: right; margin-right: 10%;" > Kevin Glisson, Marc Vilanova, Forest Monsen - < strong > ๋ทํ๋ฆญ์ค< / strong > < a href = "https://netflixtechblog.com/introducing-dispatch-da4b8a2a8072" target = "_blank" > < small > (ref)< / small > < / a > < / div >
< div style = "text-align: right; margin-right: 10%;" > Kevin Glisson, Marc Vilanova, Forest Monsen - < strong > ๋ทํ๋ฆญ์ค< / strong > < a href = "https://netflixtechblog.com/introducing-dispatch-da4b8a2a8072" > < small > (ref)< / small > < / a > < / div >
---
"_**FastAPI**๊ฐ ๋๋ฌด ์ข์์ ๊ตฌ๋ฆ ์๋ฅผ ๊ฑท๋๋ฏ ํฉ๋๋ค. ์ ๋ง ์ฆ๊ฒ์ต๋๋ค!_"
< div style = "text-align: right; margin-right: 10%;" > Brian Okken - < strong > < a href = "https://pythonbytes.fm/episodes/show/123/time-to-right-the-py-wrongs?time_in_sec=855" target = "_blank" > Python Bytes< / a > ํ์บ์คํธ ํธ์คํธ< / strong > < a href = "https://x.com/brianokken/status/1112220079972728832" target = "_blank " > < small > (ref)< / small > < / a > < / div >
< div style = "text-align: right; margin-right: 10%;" > Brian Okken - < strong > [Python Bytes](https://pythonbytes.fm/episodes/show/123/time-to-right-the-py-wrongs?time_in_sec=855) podcast host < / strong > < a href = "https://x.com/brianokken/status/1112220079972728832" > < small > (ref)< / small > < / a > < / div >
---
"_์์งํ, ๋น์ ์ด ๋ง๋ ๊ฒ์ ๋งค์ฐ ๊ฒฌ๊ณ ํ๊ณ ์ธ๋ จ๋์ด ๋ณด์
๋๋ค. ์ฌ๋ฌ ๋ฉด์์ **Hug**๊ฐ ์ด๋ ๊ฒ ๋์์ผ๋ฉด ํฉ๋๋ค - ๊ทธ๊ฑธ ๋ง๋ ๋๊ตฐ๊ฐ๋ฅผ ๋ณด๋ ๊ฒ์ ๋ง์ ์๊ฐ์ ์ค๋๋ค._"
< div style = "text-align: right; margin-right: 10%;" > Timothy Crosley - < strong > < a href = "https://github.com/hugapi/hug" target = "_blank" > Hug< / a > ์ ์์< / strong > < a href = "https://news.ycombinator.com/item?id=19455465" target = "_blank " > < small > (ref)< / small > < / a > < / div >
< div style = "text-align: right; margin-right: 10%;" > Timothy Crosley - < strong > [Hug](https://github.com/hugapi/hug) ์ ์์< / strong > < a href = "https://news.ycombinator.com/item?id=19455465" > < small > (ref)< / small > < / a > < / div >
---
@ -107,27 +107,27 @@ FastAPI๋ ํ๋์ ์ด๊ณ , ๋น ๋ฅด๋ฉฐ(๊ณ ์ฑ๋ฅ), ํ์ด์ฌ ํ์ค ํ์
ํํธ
"_์ฐ๋ฆฌ **API**๋ฅผ **FastAPI**๋ก ๋ฐ๊ฟจ์ต๋๋ค [...] ์๋ง ์ฌ๋ฌ๋ถ๋ ์ข์ํ์ค ๊ฒ์
๋๋ค [...]_"
< div style = "text-align: right; margin-right: 10%;" > Ines Montani - Matthew Honnibal - < strong > < a href = "https://explosion.ai" target = "_blank" > Explosion AI< / a > ์ค๋ฆฝ์ - < a href = "https://spacy.io" target = "_blank" > spaCy< / a > ์ ์์< / strong > < a href = "https://x.com/_inesmontani/status/1144173225322143744" target = "_blank" > < small > (ref)< / small > < / a > - < a href = "https://x.com/honnibal/status/1144031421859655680" target = "_blank" > < small > (ref)< / small > < / a > < / div >
< div style = "text-align: right; margin-right: 10%;" > Ines Montani - Matthew Honnibal - < strong > [Explosion AI](https://explosion.ai) ์ค๋ฆฝ์ - [spaCy ](https://spacy.io ) ์ ์์< /strong > < a href = "https://x.com/_inesmontani/status/1144173225322143744" >< small > (ref)</ small ></ a > - < a href = "https://x.com/honnibal/status/1144031421859655680" >< small > (ref)</ small ></ a ></ div >
---
"_ํ๋ก๋์
Python API๋ฅผ ๋ง๋ค๊ณ ์ ํ๋ค๋ฉด, ์ ๋ **FastAPI**๋ฅผ ๊ฐ๋ ฅํ ์ถ์ฒํฉ๋๋ค. **์๋ฆ๋ต๊ฒ ์ค๊ณ**๋์๊ณ , **์ฌ์ฉ์ด ๊ฐ๋จ**ํ๋ฉฐ, **ํ์ฅ์ฑ์ด ๋งค์ฐ ๋ฐ์ด๋**๊ณ , ์ฐ๋ฆฌ์ API ์ฐ์ ๊ฐ๋ฐ ์ ๋ต์์ **ํต์ฌ ๊ตฌ์ฑ ์์**๊ฐ ๋์์ผ๋ฉฐ Virtual TAC Engineer ๊ฐ์ ๋ง์ ์๋ํ์ ์๋น์ค๋ฅผ ์ด๋๊ณ ์์ต๋๋ค._"
< div style = "text-align: right; margin-right: 10%;" > Deon Pillsbury - < strong > Cisco< / strong > < a href = "https://www.linkedin.com/posts/deonpillsbury_cisco-cx-python-activity-6963242628536487936-trAp/" target = "_blank" > < small > (ref)< / small > < / a > < / div >
< div style = "text-align: right; margin-right: 10%;" > Deon Pillsbury - < strong > Cisco< / strong > < a href = "https://www.linkedin.com/posts/deonpillsbury_cisco-cx-python-activity-6963242628536487936-trAp/" > < small > (ref)< / small > < / a > < / div >
---
## FastAPI ๋ฏธ๋ ๋คํ๋ฉํฐ๋ฆฌ { #fastapi -mini-documentary }
2025๋
๋ง์ ๊ณต๊ฐ๋ < a href = "https://www.youtube.com/watch?v=mpR8ngthqiE" class = "external-link" target = "_blank" > FastAPI ๋ฏธ๋ ๋คํ๋ฉํฐ๋ฆฌ< / a > ๊ฐ ์์ต๋๋ค. ์จ๋ผ์ธ์์ ์์ฒญํ ์ ์์ต๋๋ค:
2025๋
๋ง์ ๊ณต๊ฐ๋ [FastAPI ๋ฏธ๋ ๋คํ๋ฉํฐ๋ฆฌ ](https://www.youtube.com/watch?v=mpR8ngthqiE ) ๊ฐ ์์ต๋๋ค. ์จ๋ผ์ธ์์ ์์ฒญํ ์ ์์ต๋๋ค:
< a href = "https://www.youtube.com/watch?v=mpR8ngthqiE" target = "_blank" > < img src = "https://fastapi.tiangolo.com/img/fastapi-documentary.jpg" alt = "FastAPI Mini Documentary" > < / a >
< a href = "https://www.youtube.com/watch?v=mpR8ngthqiE" > < img src = "https://fastapi.tiangolo.com/img/fastapi-documentary.jpg" alt = "FastAPI Mini Documentary" > < / a >
## **Typer** , CLI๋ฅผ ์ํ FastAPI { #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 >
< a href = "https://typer.tiangolo.com" > < img src = "https://typer.tiangolo.com/img/logo-margin/logo-margin-vector.svg" style = "width: 20%;" > < / a >
์น API ๋์ ํฐ๋ฏธ๋์์ ์ฌ์ฉํ < abbr title = "Command Line Interface - ์ปค๋งจ๋ ๋ผ์ธ ์ธํฐํ์ด์ค" > CLI< / abbr > ์ฑ์ ๋ง๋ค๊ณ ์๋ค๋ฉด, < a href = "https://typer.tiangolo.com/" class = "external-link" target = "_blank" > **Typer**< / a > ๋ฅผ ํ์ธํด ๋ณด์ญ์์ค.
์น API ๋์ ํฐ๋ฏธ๋์์ ์ฌ์ฉํ < abbr title = "Command Line Interface - ์ปค๋งจ๋ ๋ผ์ธ ์ธํฐํ์ด์ค" > CLI</ abbr > ์ฑ์ ๋ง๋ค๊ณ ์๋ค๋ฉด, [**Typer** ](https://typer.tiangolo.com/ ) ๋ฅผ ํ์ธํด ๋ณด์ญ์์ค.
**Typer**๋ FastAPI์ ๋์์
๋๋ค. ๊ทธ๋ฆฌ๊ณ **CLI๋ฅผ ์ํ FastAPI**๊ฐ ๋๊ธฐ ์ํด ์๊ฒผ์ต๋๋ค. โจ๏ธ ๐
@ -135,12 +135,12 @@ FastAPI๋ ํ๋์ ์ด๊ณ , ๋น ๋ฅด๋ฉฐ(๊ณ ์ฑ๋ฅ), ํ์ด์ฌ ํ์ค ํ์
ํํธ
FastAPI๋ ๊ฑฐ์ธ๋ค์ ์ด๊นจ ์์ ์ ์์ต๋๋ค:
* ์น ๋ถ๋ถ์ ์ํ < a href = "https://www.starlette.dev/" class = "external-link" target = "_blank" > Starlette< / a > .
* ๋ฐ์ดํฐ ๋ถ๋ถ์ ์ํ < a href = "https://docs.pydantic.dev/" class = "external-link" target = "_blank" > Pydantic< / a > .
* [Starlette ](https://www.starlette.dev/ ) โ ์น ๋ถ๋ถ์ ๋ด๋นํฉ๋๋ค .
* [Pydantic ](https://docs.pydantic.dev/ ) โ ๋ฐ์ดํฐ ๋ถ๋ถ์ ๋ด๋นํฉ๋๋ค .
## ์ค์น { #installation }
< a href = "https://fastapi.tiangolo.com/ko/virtual-environments/" class = "external-link" target = "_blank" > ๊ฐ์ ํ๊ฒฝ< / a > ์ ์์ฑํ๊ณ ํ์ฑํํ ๋ค์ FastAPI๋ฅผ ์ค์นํ์ธ์:
[๊ฐ์ ํ๊ฒฝ ](https://fastapi.tiangolo.com/ko/virtual-environments/ ) ์ ์์ฑํ๊ณ ํ์ฑํํ ๋ค์ FastAPI๋ฅผ ์ค์นํ์ธ์:
< div class = "termy" >
@ -199,7 +199,7 @@ async def read_item(item_id: int, q: str | None = None):
**Note**:
์ ๋ชจ๋ฅด๊ฒ ๋ค๋ฉด, < a href = "https://fastapi.tiangolo.com/ko/async/#in-a-hurry" target = "_blank" > ๋ฌธ์์์ `async` ์ `await` </ a > ์ ๊ดํ _"๊ธํ์ธ์?"_ ์น์
์ ํ์ธํด ๋ณด์ญ์์ค.
์ ๋ชจ๋ฅด๊ฒ ๋ค๋ฉด, ["๊ธํ์ธ์?" ](https://fastapi.tiangolo.com/ko/async/#in-a-hurry ) ์น์
์ ํ์ธํด ๋ณด์ญ์์ค.
< / details >
@ -210,7 +210,7 @@ async def read_item(item_id: int, q: str | None = None):
< div class = "termy" >
```console
$ fastapi dev main.py
$ fastapi dev
โญโโโโโโโโโโ FastAPI CLI - Development mode โโโโโโโโโโโโฎ
โ โ
@ -235,19 +235,19 @@ INFO: Application startup complete.
< / div >
< details markdown = "1" >
< summary > < code > fastapi dev main.py < / code > ๋ช
๋ น์ ๊ดํ์ฌ...< / summary >
< summary > < code > fastapi dev< / code > ๋ช
๋ น์ ๊ดํ์ฌ...< / summary >
`fastapi dev` ๋ช
๋ น์ `main.py` ํ์ผ์ ์ฝ๊ณ , ๊ทธ ์์ **FastAPI** ์ฑ์ ๊ฐ์งํ ๋ค์, < a href = "https://www.uvicorn.dev" class = "external-link" target = "_blank" > Uvicorn</ a > ์ ์ฌ์ฉํด ์๋ฒ๋ฅผ ์์ํฉ๋๋ค.
`fastapi dev` ๋ช
๋ น์ ์ฌ๋ฌ๋ถ์ `main.py` ํ์ผ์ ์๋์ผ๋ก ์ฝ๊ณ , ๊ทธ ์์ **FastAPI** ์ฑ์ ๊ฐ์งํ ๋ค์, [Uvicorn ](https://www.uvicorn.dev ) ์ ์ฌ์ฉํด ์๋ฒ๋ฅผ ์์ํฉ๋๋ค.
๊ธฐ๋ณธ์ ์ผ๋ก `fastapi dev` ๋ ๋ก์ปฌ ๊ฐ๋ฐ์ ์ํด auto-reload๊ฐ ํ์ฑํ๋ ์ํ๋ก ์์๋ฉ๋๋ค.
์์ธํ ๋ด์ฉ์ < a href = "https://fastapi.tiangolo.com/ko/fastapi-cli/" target = "_blank" > FastAPI CLI ๋ฌธ์< / a > ์์ ํ์ธํ ์ ์์ต๋๋ค.
์์ธํ ๋ด์ฉ์ [FastAPI CLI ๋ฌธ์ ](https://fastapi.tiangolo.com/ko/fastapi-cli/ ) ์์ ํ์ธํ ์ ์์ต๋๋ค.
< / details >
### ํ์ธํ๊ธฐ { #check -it }
๋ธ๋ผ์ฐ์ ๋ก < a href = "http://127.0.0.1:8000/items/5?q=somequery" class = "external-link" target = "_blank" > http://127.0.0.1:8000/items/5?q=somequery< / a > ๋ฅผ ์ด์ด๋ณด์ญ์์ค.
๋ธ๋ผ์ฐ์ ๋ก [http://127.0.0.1:8000/items/5?q=somequery ](http://127.0.0.1:8000/items/5?q=somequery ) ๋ฅผ ์ด์ด๋ณด์ญ์์ค.
์๋์ JSON ์๋ต์ ๋ณผ ์ ์์ต๋๋ค:
@ -264,17 +264,17 @@ INFO: Application startup complete.
### ๋ํํ API ๋ฌธ์ { #interactive -api-docs }
์ด์ < a href = "http://127.0.0.1:8000/docs" class = "external-link" target = "_blank" > http://127.0.0.1:8000/docs< / a > ๋ก ๊ฐ๋ณด์ญ์์ค.
์ด์ [http://127.0.0.1:8000/docs ](http://127.0.0.1:8000/docs ) ๋ก ๊ฐ๋ณด์ญ์์ค.
์๋ ๋ํํ API ๋ฌธ์๋ฅผ ๋ณผ ์ ์์ต๋๋ค (< a href = "https://github.com/swagger-api/swagger-ui" class = "external-link" target = "_blank" > Swagger UI< / a > ์ ๊ณต):
์๋ ๋ํํ API ๋ฌธ์๋ฅผ ๋ณผ ์ ์์ต๋๋ค ([Swagger UI](https://github.com/swagger-api/swagger-ui) ์ ๊ณต):

### ๋์ API ๋ฌธ์ { #alternative -api-docs }
๊ทธ๋ฆฌ๊ณ ์ด์ < a href = "http://127.0.0.1:8000/redoc" class = "external-link" target = "_blank" > http://127.0.0.1:8000/redoc< / a > ๋ก ๊ฐ๋ด
์๋ค.
๊ทธ๋ฆฌ๊ณ ์ด์ [http://127.0.0.1:8000/redoc ](http://127.0.0.1:8000/redoc ) ๋ก ๊ฐ๋ด
์๋ค.
๋ค๋ฅธ ์๋ ๋ฌธ์๋ฅผ ๋ณผ ์ ์์ต๋๋ค(< a href = "https://github.com/Rebilly/ReDoc" class = "external-link" target = "_blank" > ReDoc< / a > ์ ๊ณต):
๋ค๋ฅธ ์๋ ๋ฌธ์๋ฅผ ๋ณผ ์ ์์ต๋๋ค([ReDoc](https://github.com/Rebilly/ReDoc) ์ ๊ณต):

@ -316,7 +316,7 @@ def update_item(item_id: int, item: Item):
### ๋ํํ API ๋ฌธ์ ์
๊ทธ๋ ์ด๋ { #interactive -api-docs-upgrade }
์ด์ < a href = "http://127.0.0.1:8000/docs" class = "external-link" target = "_blank" > http://127.0.0.1:8000/docs< / a > ๋ก ์ด๋ํฉ๋๋ค.
์ด์ [http://127.0.0.1:8000/docs ](http://127.0.0.1:8000/docs ) ๋ก ์ด๋ํฉ๋๋ค.
* ๋ํํ API ๋ฌธ์๋ ์ ๋ณธ๋ฌธ์ ํฌํจํด ์๋์ผ๋ก ์
๋ฐ์ดํธ๋ฉ๋๋ค:
@ -332,7 +332,7 @@ def update_item(item_id: int, item: Item):
### ๋์ API ๋ฌธ์ ์
๊ทธ๋ ์ด๋ { #alternative -api-docs-upgrade }
๊ทธ๋ฆฌ๊ณ ์ด์ , < a href = "http://127.0.0.1:8000/redoc" class = "external-link" target = "_blank" > http://127.0.0.1:8000/redoc< / a > ๋ก ์ด๋ํฉ๋๋ค.
๊ทธ๋ฆฌ๊ณ ์ด์ , [http://127.0.0.1:8000/redoc ](http://127.0.0.1:8000/redoc ) ๋ก ์ด๋ํฉ๋๋ค.
* ๋์ ๋ฌธ์ ์ญ์ ์ ์ฟผ๋ฆฌ ๋งค๊ฐ๋ณ์์ ๋ณธ๋ฌธ์ ๋ฐ์ํฉ๋๋ค:
@ -442,7 +442,7 @@ item: Item
* ๊ฐ๋ ฅํ๊ณ ์ฌ์ฉํ๊ธฐ ์ฌ์ด ** < dfn title = "๋ค๋ฅธ ๋ง๋ก๋: ์ปดํฌ๋ํธ, ๋ฆฌ์์ค, ํ๋ก๋ฐ์ด๋, ์๋น์ค, ์ธ์ ํฐ๋ธ" > ์์กด์ฑ ์ฃผ์
</ dfn > ** ์์คํ
.
* **OAuth2** ์ง์์ ํฌํจํ **JWT tokens** ๋ฐ **HTTP Basic**์ ๊ฐ๋ ๋ณด์๊ณผ ์ธ์ฆ.
* (Pydantic ๋๋ถ์) **๊น์ ์ค์ฒฉ JSON ๋ชจ๋ธ**์ ์ ์ธํ๋๋ฐ ๋ ์ง๋ณดํ (ํ์ง๋ง ๋ง์ฐฌ๊ฐ์ง๋ก ์ฌ์ด) ๊ธฐ์ .
* < a href = "https://strawberry.rocks" class = "external-link" target = "_blank" > Strawberry</ a > ๋ฐ ๊ธฐํ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์์ **GraphQL** ํตํฉ.
* [Strawberry ](https://strawberry.rocks ) ๋ฐ ๊ธฐํ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์์ **GraphQL** ํตํฉ.
* (Starlette ๋๋ถ์) ๋ง์ ์ถ๊ฐ ๊ธฐ๋ฅ:
* * *์น ์์ผ**
* HTTPX ๋ฐ `pytest` ์ ๊ธฐ๋ฐํ ๊ทนํ ์ฌ์ด ํ
์คํธ
@ -452,24 +452,10 @@ item: Item
### ์ฑ ๋ฐฐํฌํ๊ธฐ(์ ํ ์ฌํญ) { #deploy -your-app-optional }
์ ํ์ ์ผ๋ก FastAPI ์ฑ์ < a href = "https://fastapicloud.com" class = "external-link" target = "_blank" > FastAPI Cloud< / a > ์ ๋ฐฐํฌํ ์ ์์ต๋๋ค. ์์ง์ด๋ผ๋ฉด ๋๊ธฐ์ ๋ช
๋จ์ ๋ฑ๋กํด ๋ณด์ธ์. ๐
์ ํ์ ์ผ๋ก FastAPI ์ฑ์ [FastAPI Cloud ](https://fastapicloud.com ) ์ ๋ฐฐํฌํ ์ ์์ต๋๋ค. ์์ง์ด๋ผ๋ฉด ๋๊ธฐ์ ๋ช
๋จ์ ๋ฑ๋กํด ๋ณด์ธ์. ๐
์ด๋ฏธ **FastAPI Cloud** ๊ณ์ ์ด ์๋ค๋ฉด(๋๊ธฐ์ ๋ช
๋จ์์ ์ด๋ํด ๋๋ ธ์ต๋๋ค ๐), ํ ๋ฒ์ ๋ช
๋ น์ผ๋ก ์ ํ๋ฆฌ์ผ์ด์
์ ๋ฐฐํฌํ ์ ์์ต๋๋ค.
๋ฐฐํฌํ๊ธฐ ์ ์, ๋ก๊ทธ์ธ๋์ด ์๋์ง ํ์ธํ์ธ์:
< div class = "termy" >
```console
$ fastapi login
You are logged in to FastAPI Cloud ๐
```
< / div >
๊ทธ๋ฐ ๋ค์ ์ฑ์ ๋ฐฐํฌํ์ธ์:
< div class = "termy" >
```console
@ -488,7 +474,7 @@ Deploying to FastAPI Cloud...
#### FastAPI Cloud ์๊ฐ { #about -fastapi-cloud }
**< a href = "https://fastapicloud.com" class = "external-link" target = "_blank" > FastAPI Cloud</ a > **๋ **FastAPI** ๋ค์ ์๋ ๋์ผํ ์์ฑ์์ ํ์ด ๋ง๋ค์์ต๋๋ค.
**[FastAPI Cloud](https://fastapicloud.com) **๋ **FastAPI** ๋ค์ ์๋ ๋์ผํ ์์ฑ์์ ํ์ด ๋ง๋ค์์ต๋๋ค.
์ต์ํ์ ๋
ธ๋ ฅ์ผ๋ก API๋ฅผ **๋น๋** , **๋ฐฐํฌ** , **์ ๊ทผ**ํ๋ ๊ณผ์ ์ ๊ฐ์ํํฉ๋๋ค.
@ -504,9 +490,9 @@ FastAPI๋ ์คํ ์์ค์ด๋ฉฐ ํ์ค์ ๊ธฐ๋ฐ์ผ๋ก ํฉ๋๋ค. ์ ํํ ์ด
## ์ฑ๋ฅ { #performance }
๋
๋ฆฝ๋ TechEmpower ๋ฒค์น๋งํฌ์์ Uvicorn์์ ์๋ํ๋ FastAPI ์ ํ๋ฆฌ์ผ์ด์
์ด < a href = " https://www.techempower.com/benchmarks/#section=test&runid=7464e520-0dc2-473d-bd34-dbdfd7e85911&hw=ph&test=query&l=zijzen-7" class = "external-link" target = "_blank" > ์ฌ์ฉ ๊ฐ๋ฅํ ๊ฐ์ฅ ๋น ๋ฅธ Python ํ๋ ์์ํฌ ์ค ํ๋< / a > ๋ก Starlette์ Uvicorn(FastAPI์์ ๋ด๋ถ์ ์ผ๋ก ์ฌ์ฉ)์๋ง ๋ฐ๋๊ณ ์์ต๋๋ค. (*)
๋
๋ฆฝ๋ TechEmpower ๋ฒค์น๋งํฌ์์ Uvicorn์์ ์๋ํ๋ **FastAPI** ์ ํ๋ฆฌ์ผ์ด์
์ด [์ฌ์ฉ ๊ฐ๋ฅํ ๊ฐ์ฅ ๋น ๋ฅธ Python ํ๋ ์์ํฌ ์ค ํ๋ ](https://www.techempower.com/benchmarks/#section=test&runid=7464e520-0dc2-473d-bd34-dbdfd7e85911&hw=ph&test=query&l=zijzen-7 ) ๋ก Starlette์ Uvicorn(FastAPI์์ ๋ด๋ถ์ ์ผ๋ก ์ฌ์ฉ)์๋ง ๋ฐ๋๊ณ ์์ต๋๋ค. (*)
์์ธํ ๋ด์ฉ์ < a href = "https://fastapi.tiangolo.com/ko/benchmarks/" class = "internal-link" target = "_blank" > ๋ฒค์น๋งํฌ< / a > ์น์
์ ๋ณด์ญ์์ค.
์์ธํ ๋ด์ฉ์ [๋ฒค์น๋งํฌ ](https://fastapi.tiangolo.com/ko/benchmarks/ ) ์น์
์ ๋ณด์ญ์์ค.
## ์์กด์ฑ { #dependencies }
@ -514,23 +500,23 @@ FastAPI๋ Pydantic๊ณผ Starlette์ ์์กดํฉ๋๋ค.
### `standard` ์์กด์ฑ { #standard -dependencies }
FastAPI๋ฅผ `pip install "fastapi[standard]"` ๋ก ์ค์นํ๋ฉด `standard` ๊ทธ๋ฃน์ ์ ํ์ ์์กด์ฑ์ด ํจ๊ป ์ค์น๋ฉ๋๋ค.
`pip install "fastapi[standard]"` ๋ก FastAPI๋ฅผ ์ค์นํ๋ฉด `standard` ๊ทธ๋ฃน์ ์ ํ์ ์์กด์ฑ์ด ํจ๊ป ์ค์น๋ฉ๋๋ค.
Pydantic์ด ์ฌ์ฉํ๋:
* < a href = "https://github.com/JoshData/python-email-validator" target = "_blank" > < code > email-validator< / code > < / a > - ์ด๋ฉ์ผ ์ ํจ์ฑ ๊ฒ์ฌ.
* [`email-validator` ](https://github.com/JoshData/python-email-validator ) - ์ด๋ฉ์ผ ์ ํจ์ฑ ๊ฒ์ฌ.
Starlette์ด ์ฌ์ฉํ๋:
* < a href = "https://www.python-httpx.org" target = "_blank" >< code > httpx</ code ></ a > - `TestClient` ๋ฅผ ์ฌ์ฉํ๋ ค๋ฉด ํ์.
* < a href = "https://jinja.palletsprojects.com" target = "_blank" > < code > jinja2< / code > < / a > - ๊ธฐ๋ณธ ํ
ํ๋ฆฟ ์ค์ ์ ์ฌ์ฉํ๋ ค๋ฉด ํ์.
* < a href = "https://github.com/Kludex/python-multipart" target = "_blank" >< code > python-multipart</ code ></ a > - `request.form()` ๊ณผ ํจ๊ป form < dfn title = "HTTP ์์ฒญ์์ ์จ ๋ฌธ์์ด์ ํ์ด์ฌ ๋ฐ์ดํฐ๋ก ๋ณํ" > "ํ์ฑ"</ dfn > ์ง์์ ์ํ๋ฉด ํ์.
* [`httpx` ](https://www.python-httpx.org ) - `TestClient` ๋ฅผ ์ฌ์ฉํ๋ ค๋ฉด ํ์.
* [`jinja2` ](https://jinja.palletsprojects.com ) - ๊ธฐ๋ณธ ํ
ํ๋ฆฟ ์ค์ ์ ์ฌ์ฉํ๋ ค๋ฉด ํ์.
* [`python-multipart` ](https://github.com/Kludex/python-multipart ) - `request.form()` ๊ณผ ํจ๊ป form < dfn title = "HTTP ์์ฒญ์์ ์จ ๋ฌธ์์ด์ ํ์ด์ฌ ๋ฐ์ดํฐ๋ก ๋ณํ" > "ํ์ฑ"</ dfn > ์ง์์ ์ํ๋ฉด ํ์.
FastAPI๊ฐ ์ฌ์ฉํ๋:
* < a href = "https://www.uvicorn.dev" target = "_blank" >< code > uvicorn</ code ></ a > - ์ ํ๋ฆฌ์ผ์ด์
์ ๋ก๋ํ๊ณ ์ ๊ณตํ๋ ์๋ฒ๋ฅผ ์ํ ๊ฒ์
๋๋ค. ์ฌ๊ธฐ์๋ ๊ณ ์ฑ๋ฅ ์๋น์ ํ์ํ ์ผ๋ถ ์์กด์ฑ(์: `uvloop` )์ด ํฌํจ๋ `uvicorn[standard]` ๊ฐ ํฌํจ๋ฉ๋๋ค.
* [`uvicorn` ](https://www.uvicorn.dev ) - ์ ํ๋ฆฌ์ผ์ด์
์ ๋ก๋ํ๊ณ ์ ๊ณตํ๋ ์๋ฒ๋ฅผ ์ํ ๊ฒ์
๋๋ค. ์ฌ๊ธฐ์๋ ๊ณ ์ฑ๋ฅ ์๋น์ ํ์ํ ์ผ๋ถ ์์กด์ฑ(์: `uvloop` )์ด ํฌํจ๋ `uvicorn[standard]` ๊ฐ ํฌํจ๋ฉ๋๋ค.
* `fastapi-cli[standard]` - `fastapi` ๋ช
๋ น์ ์ ๊ณตํ๊ธฐ ์ํ ๊ฒ์
๋๋ค.
* ์ฌ๊ธฐ์๋ FastAPI ์ ํ๋ฆฌ์ผ์ด์
์ < a href = "https://fastapicloud.com" class = "external-link" target = "_blank" > FastAPI Cloud</ a > ์ ๋ฐฐํฌํ ์ ์๊ฒ ํด์ฃผ๋ `fastapi-cloud-cli` ๊ฐ ํฌํจ๋ฉ๋๋ค.
* ์ฌ๊ธฐ์๋ [FastAPI Cloud ](https://fastapicloud.com )์ FastAPI ์ ํ๋ฆฌ์ผ์ด์
์ ๋ฐฐํฌํ ์ ์๊ฒ ํด์ฃผ๋ `fastapi-cloud-cli` ๊ฐ ํฌํจ๋ฉ๋๋ค.
### `standard` ์์กด์ฑ ์์ด { #without -standard-dependencies }
@ -546,13 +532,13 @@ FastAPI๊ฐ ์ฌ์ฉํ๋:
์ถ๊ฐ ์ ํ์ Pydantic ์์กด์ฑ:
* < a href = "https://docs.pydantic.dev/latest/usage/pydantic_settings/" target = "_blank" > < code > pydantic-settings< / code > < / a > - ์ค์ ๊ด๋ฆฌ๋ฅผ ์ํ ๊ฒ์
๋๋ค.
* < a href = "https://docs.pydantic.dev/latest/usage/types/extra_types/extra_types/" target = "_blank" > < code > pydantic-extra-types< / code > < / a > - Pydantic์์ ์ฌ์ฉํ ์ถ๊ฐ ํ์
์ ์ํ ๊ฒ์
๋๋ค.
* [`pydantic-settings` ](https://docs.pydantic.dev/latest/usage/pydantic_settings/ ) - ์ค์ ๊ด๋ฆฌ๋ฅผ ์ํ ๊ฒ์
๋๋ค.
* [`pydantic-extra-types` ](https://docs.pydantic.dev/latest/usage/types/extra_types/extra_types/ ) - Pydantic์์ ์ฌ์ฉํ ์ถ๊ฐ ํ์
์ ์ํ ๊ฒ์
๋๋ค.
์ถ๊ฐ ์ ํ์ FastAPI ์์กด์ฑ:
* < a href = "https://github.com/ijl/orjson" target = "_blank" >< code > orjson</ code ></ a > - `ORJSONResponse` ๋ฅผ ์ฌ์ฉํ๋ ค๋ฉด ํ์.
* < a href = "https://github.com/esnme/ultrajson" target = "_blank" >< code > ujson</ code ></ a > - `UJSONResponse` ๋ฅผ ์ฌ์ฉํ๋ ค๋ฉด ํ์.
* [`orjson` ](https://github.com/ijl/orjson ) - `ORJSONResponse` ๋ฅผ ์ฌ์ฉํ๋ ค๋ฉด ํ์.
* [`ujson` ](https://github.com/esnme/ultrajson ) - `UJSONResponse` ๋ฅผ ์ฌ์ฉํ๋ ค๋ฉด ํ์.
## ๋ผ์ด์ผ์ค { #license }