-
-{!../../../docs/missing-translation.md!}
-
-
<p align="center">
<a href="https://fastapi.tiangolo.com"><img src="https://fastapi.tiangolo.com/img/logo-margin/logo-teal.png" alt="FastAPI"></a>
</p>
<p align="center">
- <em>FastAPI framework, high performance, easy to learn, fast to code, ready for production</em>
+ <em>FastAPI νλ μμν¬, κ³ μ±λ₯, κ°νΈν νμ΅, λΉ λ₯Έ μ½λ μμ±, μ€λΉλ νλ‘λμ
</em>
</p>
<p align="center">
<a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3ATest" target="_blank">
---
-**Documentation**: <a href="https://fastapi.tiangolo.com" target="_blank">https://fastapi.tiangolo.com</a>
+**λ¬Έμ**: <a href="https://fastapi.tiangolo.com" target="_blank">https://fastapi.tiangolo.com</a>
-**Source Code**: <a href="https://github.com/tiangolo/fastapi" target="_blank">https://github.com/tiangolo/fastapi</a>
+**μμ€ μ½λ**: <a href="https://github.com/tiangolo/fastapi" target="_blank">https://github.com/tiangolo/fastapi</a>
---
-FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based on standard Python type hints.
+FastAPIλ νλμ μ΄κ³ , λΉ λ₯΄λ©°(κ³ μ±λ₯), νμ΄μ¬ νμ€ νμ
ννΈμ κΈ°μ΄ν Python3.6+μ APIλ₯Ό λΉλνκΈ° μν μΉ νλ μμν¬μ
λλ€.
-The key features are:
+μ£Όμ νΉμ§μΌλ‘:
-* **Fast**: Very high performance, on par with **NodeJS** and **Go** (thanks to Starlette and Pydantic). [One of the fastest Python frameworks available](#performance).
+* **λΉ λ¦**: (Starletteκ³Ό Pydantic λλΆμ) **NodeJS** λ° **Go**μ λλ±ν μ λλ‘ λ§€μ° λμ μ±λ₯. [μ¬μ© κ°λ₯ν κ°μ₯ λΉ λ₯Έ νμ΄μ¬ νλ μμν¬ μ€ νλ](#performance).
-* **Fast to code**: Increase the speed to develop features by about 200% to 300%. *
-* **Fewer bugs**: Reduce about 40% of human (developer) induced errors. *
-* **Intuitive**: Great editor support. <abbr title="also known as auto-complete, autocompletion, IntelliSense">Completion</abbr> everywhere. Less time debugging.
-* **Easy**: Designed to be easy to use and learn. Less time reading docs.
-* **Short**: Minimize code duplication. Multiple features from each parameter declaration. Fewer bugs.
-* **Robust**: Get production-ready code. With automatic interactive documentation.
-* **Standards-based**: Based on (and fully compatible with) the open standards for APIs: <a href="https://github.com/OAI/OpenAPI-Specification" class="external-link" target="_blank">OpenAPI</a> (previously known as Swagger) and <a href="http://json-schema.org/" class="external-link" target="_blank">JSON Schema</a>.
+* **λΉ λ₯Έ μ½λ μμ±**: μ½ 200%μμ 300%κΉμ§ κΈ°λ₯ κ°λ° μλ μ¦κ°. *
+* **μ μ λ²κ·Έ**: μ¬λ(κ°λ°μ)μ μν μλ¬ μ½ 40% κ°μ. *
+* **μ§κ΄μ **: νλ₯ν νΈμ§κΈ° μ§μ. λͺ¨λ κ³³μμ <abbr title="also known as auto-complete, autocompletion, IntelliSense">μλμμ±</abbr>. μ μ λλ²κΉ
μκ°.
+* **μ¬μ**: μ½κ² μ¬μ©νκ³ λ°°μ°λλ‘ μ€κ³. μ μ λ¬Έμ μ½κΈ° μκ°.
+* **μ§§μ**: μ½λ μ€λ³΅ μ΅μν. κ° λ§€κ°λ³μ μ μΈμ μ¬λ¬ κΈ°λ₯. μ μ λ²κ·Έ.
+* **κ²¬κ³ ν¨**: μ€λΉλ νλ‘λμ
μ© μ½λλ₯Ό μ»μΌμΈμ. μλ λνν λ¬Έμμ ν¨κ».
+* **νμ€ κΈ°λ°**: APIμ λν (μμ ν νΈνλλ) κ°λ°©ν νμ€ κΈ°λ°: <a href="https://github.com/OAI/OpenAPI-Specification" class="external-link" target="_blank">OpenAPI</a> (μ΄μ μ Swaggerλ‘ μλ €μ‘λ) λ° <a href="http://json-schema.org/" class="external-link" target="_blank">JSON μ€ν€λ§</a>.
-<small>* estimation based on tests on an internal development team, building production applications.</small>
+<small>* λ΄λΆ κ°λ°νμ νλ‘λμ
μ ν리μΌμ΄μ
μ λΉλν ν
μ€νΈμ κ·Όκ±°ν μΈ‘μ </small>
-## Gold Sponsors
+## 골λ μ€ν°μ
<!-- sponsors -->
<!-- /sponsors -->
-<a href="https://fastapi.tiangolo.com/fastapi-people/#sponsors" class="external-link" target="_blank">Other sponsors</a>
+<a href="https://fastapi.tiangolo.com/fastapi-people/#sponsors" class="external-link" target="_blank">λ€λ₯Έ μ€ν°μ</a>
-## Opinions
+## μ견λ€
-"_[...] I'm using **FastAPI** a ton these days. [...] I'm actually planning to use it for all of my team's **ML services at Microsoft**. Some of them are getting integrated into the core **Windows** product and some **Office** products._"
+"_[...] μ λ μμ¦ **FastAPI**λ₯Ό λ§μ΄ μ¬μ©νκ³ μμ΅λλ€. [...] μ¬μ€ μ°λ¦¬ νμ **λ§μ΄ν¬λ‘μννΈ ML μλΉμ€** μ λΆλ₯Ό λ°κΏ κ³νμ
λλ€. κ·Έμ€ μΌλΆλ ν΅μ¬ **Windows**μ λͺλͺμ **Office** μ νλ€μ΄ ν΅ν©λκ³ μμ΅λλ€._"
-<div style="text-align: right; margin-right: 10%;">Kabir Khan - <strong>Microsoft</strong> <a href="https://github.com/tiangolo/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/tiangolo/fastapi/pull/26" target="_blank"><small>(ref)</small></a></div>
---
-"_We adopted the **FastAPI** library to spawn a **REST** server that can be queried to obtain **predictions**. [for Ludwig]_"
+"_**FastAPI** λΌμ΄λΈλ¬λ¦¬λ₯Ό μ±ννμ¬ **μμΈ‘**μ μ»κΈ° μν΄ μΏΌλ¦¬λ₯Ό μ€ν ν μ μλ **REST** μλ²λ₯Ό μμ±νμ΅λλ€. [Ludwigμ μν΄]_"
-<div style="text-align: right; margin-right: 10%;">Piero Molino, Yaroslav Dudin, and Sai Sumanth Miryala - <strong>Uber</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/" target="_blank"><small>(ref)</small></a></div>
---
-"_**Netflix** is pleased to announce the open-source release of our **crisis management** orchestration framework: **Dispatch**! [built with **FastAPI**]_"
+"_**Netflix**λ μ°λ¦¬μ μ€ν μμ€ λ°°ν¬νμΈ **μκΈ° κ΄λ¦¬** μ€μΌμ€νΈλ μ΄μ
νλ μμν¬λ₯Ό λ°νν μ μμ΄ κΈ°μ©λλ€: λ°λ‘ **Dispatch**μ
λλ€! [**FastAPI**λ‘ λΉλ]_"
-<div style="text-align: right; margin-right: 10%;">Kevin Glisson, Marc Vilanova, Forest Monsen - <strong>Netflix</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" target="_blank"><small>(ref)</small></a></div>
---
-"_Iβm over the moon excited about **FastAPI**. Itβs so fun!_"
+"_**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> podcast host</strong> <a href="https://twitter.com/brianokken/status/1112220079972728832" target="_blank"><small>(ref)</small></a></div>
+<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://twitter.com/brianokken/status/1112220079972728832" target="_blank"><small>(ref)</small></a></div>
---
-"_Honestly, what you've built looks super solid and polished. In many ways, it's what I wanted **Hug** to be - it's really inspiring to see someone build that._"
+"_μμ§ν, λΉμ μ΄ λ§λ κ²μ λ§€μ° κ²¬κ³ νκ³ μΈλ ¨λμ΄ λ³΄μ
λλ€. μ¬λ¬ λ©΄μμ **Hug**κ° μ΄λ κ² λμμΌλ©΄ ν©λλ€ - κ·Έκ±Έ λ§λ λκ΅°κ°λ₯Ό 보λ κ²μ λ§μ μκ°μ μ€λλ€._"
-<div style="text-align: right; margin-right: 10%;">Timothy Crosley - <strong><a href="http://www.hug.rest/" target="_blank">Hug</a> creator</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><a href="http://www.hug.rest/" target="_blank">Hug</a> μ μμ</strong> <a href="https://news.ycombinator.com/item?id=19455465" target="_blank"><small>(ref)</small></a></div>
---
-"_If you're looking to learn one **modern framework** for building REST APIs, check out **FastAPI** [...] It's fast, easy to use and easy to learn [...]_"
+"_REST APIλ₯Ό λ§λ€κΈ° μν΄ **νλμ μΈ νλ μμν¬**λ₯Ό μ°Ύκ³ μλ€λ©΄ **FastAPI**λ₯Ό νμΈν΄ 보μΈμ. [...] λΉ λ₯΄κ³ , μ°κΈ° μ½κ³ , λ°°μ°κΈ°λ μ½μ΅λλ€ [...]_"
-"_We've switched over to **FastAPI** for our **APIs** [...] I think you'll like it [...]_"
+"_μ°λ¦¬ **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> founders - <a href="https://spacy.io" target="_blank">spaCy</a> creators</strong> <a href="https://twitter.com/_inesmontani/status/1144173225322143744" target="_blank"><small>(ref)</small></a> - <a href="https://twitter.com/honnibal/status/1144031421859655680" target="_blank"><small>(ref)</small></a></div>
+<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://twitter.com/_inesmontani/status/1144173225322143744" target="_blank"><small>(ref)</small></a> - <a href="https://twitter.com/honnibal/status/1144031421859655680" target="_blank"><small>(ref)</small></a></div>
---
-## **Typer**, the FastAPI of CLIs
+## **Typer**, FastAPIμ CLI
<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>
-If you are building a <abbr title="Command Line Interface">CLI</abbr> app to be used in the terminal instead of a web API, check out <a href="https://typer.tiangolo.com/" class="external-link" target="_blank">**Typer**</a>.
+μΉ API λμ ν°λ―Έλμμ μ¬μ©ν <abbr title="Command Line Interface">CLI</abbr> μ±μ λ§λ€κ³ μλ€λ©΄, <a href="https://typer.tiangolo.com/" class="external-link" target="_blank">**Typer**</a>λ₯Ό νμΈν΄ 보μΈμ.
-**Typer** is FastAPI's little sibling. And it's intended to be the **FastAPI of CLIs**. β¨οΈ π
+**Typer**λ FastAPIμ λμμ
λλ€. κ·Έλ¦¬κ³ **FastAPIμ CLI**κ° λκΈ° μν΄ μκ²Όμ΅λλ€. β¨οΈ π
-## Requirements
+## μꡬμ¬ν
Python 3.6+
-FastAPI stands on the shoulders of giants:
+FastAPIλ κ±°μΈλ€μ μ΄κΉ¨ μμ μ μμ΅λλ€:
-* <a href="https://www.starlette.io/" class="external-link" target="_blank">Starlette</a> for the web parts.
-* <a href="https://pydantic-docs.helpmanual.io/" class="external-link" target="_blank">Pydantic</a> for the data parts.
+* μΉ λΆλΆμ μν <a href="https://www.starlette.io/" class="external-link" target="_blank">Starlette</a>.
+* λ°μ΄ν° λΆλΆμ μν <a href="https://pydantic-docs.helpmanual.io/" class="external-link" target="_blank">Pydantic</a>.
-## Installation
+## μ€μΉ
<div class="termy">
</div>
-You will also need an ASGI server, for production such as <a href="http://www.uvicorn.org" class="external-link" target="_blank">Uvicorn</a> or <a href="https://gitlab.com/pgjones/hypercorn" class="external-link" target="_blank">Hypercorn</a>.
+νλ‘λμ
μ μν΄ <a href="http://www.uvicorn.org" class="external-link" target="_blank">Uvicorn</a> λλ <a href="https://gitlab.com/pgjones/hypercorn" class="external-link" target="_blank">Hypercorn</a>κ³Ό κ°μ ASGI μλ²λ νμν κ²λλ€.
<div class="termy">
</div>
-## Example
+## μμ
-### Create it
+### λ§λ€κΈ°
-* Create a file `main.py` with:
+* `main.py` νμΌμ λ§λμΈμ:
```Python
from typing import Optional
```
<details markdown="1">
-<summary>Or use <code>async def</code>...</summary>
+<summary>λλ <code>async def</code> μ¬μ©νκΈ°...</summary>
-If your code uses `async` / `await`, use `async def`:
+μ¬λ¬λΆμ μ½λκ° `async` / `await`μ μ¬μ©νλ€λ©΄, `async def`λ₯Ό μ¬μ©νμΈμ:
```Python hl_lines="9 14"
from typing import Optional
**Note**:
-If you don't know, check the _"In a hurry?"_ section about <a href="https://fastapi.tiangolo.com/async/#in-a-hurry" target="_blank">`async` and `await` in the docs</a>.
+μ λͺ¨λ₯΄κ² λ€λ©΄, <a href="https://fastapi.tiangolo.com/async/#in-a-hurry" target="_blank">λ¬Έμμμ `async`μ `await`</a>μ κ΄ν _"κΈνμΈμ?"_ μΉμ
μ νμΈν΄ 보μΈμ.
</details>
-### Run it
+### μ€ννκΈ°
-Run the server with:
+μλ²λ₯Ό μ€ννμΈμ:
<div class="termy">
</div>
<details markdown="1">
-<summary>About the command <code>uvicorn main:app --reload</code>...</summary>
+<summary><code>uvicorn main:app --reload</code> λͺ
λ Ήμ κ΄νμ¬...</summary>
-The command `uvicorn main:app` refers to:
+λͺ
λ Ή `uvicorn main:app`μ λ€μμ λνλ
λλ€:
-* `main`: the file `main.py` (the Python "module").
+* `main`: `main.py` νμΌ (νμ΄μ¬ "λͺ¨λ").
* `app`: the object created inside of `main.py` with the line `app = FastAPI()`.
-* `--reload`: make the server restart after code changes. Only do this for development.
+* `--reload`: μ½λκ° λ³κ²½λ ν μλ² μ¬μμνκΈ°. κ°λ°νκ²½μμλ§ μ¬μ©νμΈμ.
</details>
-### Check it
+### νμΈνκΈ°
-Open your browser at <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>.
+λΈλΌμ°μ λ‘ <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>λ₯Ό μ΄μ΄λ³΄μΈμ.
-You will see the JSON response as:
+μλμ JSON μλ΅μ λ³Ό μ μμ΅λλ€:
```JSON
{"item_id": 5, "q": "somequery"}
```
-You already created an API that:
+μ¬λ¬λΆμ λ²μ¨ APIλ₯Ό λ§λ€μμ΅λλ€:
-* Receives HTTP requests in the _paths_ `/` and `/items/{item_id}`.
-* Both _paths_ take `GET` <em>operations</em> (also known as HTTP _methods_).
-* The _path_ `/items/{item_id}` has a _path parameter_ `item_id` that should be an `int`.
-* The _path_ `/items/{item_id}` has an optional `str` _query parameter_ `q`.
+* _κ²½λ‘_ `/` λ° `/items/{item_id}`μμ HTTP μμ² λ°κΈ°.
+* λ _κ²½λ‘_ λͺ¨λ `GET` <em>μ°μ°</em>(HTTP _λ©μλ_ λ‘ μλ €μ§)μ λ°μ΅λλ€.
+* _κ²½λ‘_ `/items/{item_id}`λ _κ²½λ‘ λ§€κ°λ³μ_ `int`ν μ΄μ΄μΌ νλ `item_id`λ₯Ό κ°μ§κ³ μμ΅λλ€.
+* _κ²½λ‘_ `/items/{item_id}`λ μ νμ μΈ `str`ν μ΄μ΄μΌ νλ _κ²½λ‘ λ§€κ°λ³μ_ `q`λ₯Ό κ°μ§κ³ μμ΅λλ€.
-### Interactive API docs
+### λνν API λ¬Έμ
-Now go to <a href="http://127.0.0.1:8000/docs" class="external-link" target="_blank">http://127.0.0.1:8000/docs</a>.
+μ΄μ <a href="http://127.0.0.1:8000/docs" class="external-link" target="_blank">http://127.0.0.1:8000/docs</a>λ‘ κ°λ³΄μΈμ.
-You will see the automatic interactive API documentation (provided by <a href="https://github.com/swagger-api/swagger-ui" class="external-link" target="_blank">Swagger UI</a>):
+μλ λνν API λ¬Έμλ₯Ό λ³Ό μ μμ΅λλ€ (<a href="https://github.com/swagger-api/swagger-ui" class="external-link" target="_blank">Swagger UI</a> μ 곡):

-### Alternative API docs
+### λμ API λ¬Έμ
-And now, go to <a href="http://127.0.0.1:8000/redoc" class="external-link" target="_blank">http://127.0.0.1:8000/redoc</a>.
+κ·Έλ¦¬κ³ μ΄μ <a href="http://127.0.0.1:8000/redoc" class="external-link" target="_blank">http://127.0.0.1:8000/redoc</a>λ‘ κ°λ³΄μΈμ.
-You will see the alternative automatic documentation (provided by <a href="https://github.com/Rebilly/ReDoc" class="external-link" target="_blank">ReDoc</a>):
+λ€λ₯Έ μλ λ¬Έμλ₯Ό λ³Ό μ μμ΅λλ€(<a href="https://github.com/Rebilly/ReDoc" class="external-link" target="_blank">ReDoc</a> μ 곡):

-## Example upgrade
+## μμ κ°μ
-Now modify the file `main.py` to receive a body from a `PUT` request.
+μ΄μ `PUT` μμ²μ μλ λ³Έλ¬Έ(Body)μ λ°κΈ° μν΄ `main.py`λ₯Ό μμ ν΄λ΄
μλ€.
-Declare the body using standard Python types, thanks to Pydantic.
+Pydanticμ μ΄μ©ν΄ νμ΄μ¬ νμ€ νμ
μΌλ‘ λ³Έλ¬Έμ μ μΈν©λλ€.
```Python hl_lines="4 9 10 11 12 25 26 27"
from typing import Optional
return {"item_name": item.name, "item_id": item_id}
```
-The server should reload automatically (because you added `--reload` to the `uvicorn` command above).
+μλ²κ° μλμΌλ‘ 리λ‘λ© ν μ μμ΄μΌ ν©λλ€ (μμμ `uvicorn` λͺ
λ Ήμ `--reload`μ μΆκ° νκΈ° λλ¬Έμ
λλ€).
-### Interactive API docs upgrade
+### λνν API λ¬Έμ μ
κ·Έλ μ΄λ
-Now go to <a href="http://127.0.0.1:8000/docs" class="external-link" target="_blank">http://127.0.0.1:8000/docs</a>.
+μ΄μ <a href="http://127.0.0.1:8000/docs" class="external-link" target="_blank">http://127.0.0.1:8000/docs</a>λ‘ μ΄λν©λλ€.
-* The interactive API documentation will be automatically updated, including the new body:
+* λνν API λ¬Έμκ° μ λ³Έλ¬Έκ³Ό ν¨κ» μλμΌλ‘ μ
λ°μ΄νΈ ν©λλ€:

-* Click on the button "Try it out", it allows you to fill the parameters and directly interact with the API:
+* "Try it out" λ²νΌμ ν΄λ¦νλ©΄, λ§€κ°λ³μλ₯Ό μ±μΈ μ μκ² ν΄μ£Όκ³ μ§μ APIμ μνΈμμ© ν μ μμ΅λλ€:

-* Then click on the "Execute" button, the user interface will communicate with your API, send the parameters, get the results and show them on the screen:
+* κ·Έλ¬κ³ λμ "Execute" λ²νΌμ λλ₯΄λ©΄, μ¬μ©μ μΈν°νμ΄μ€λ APIμ ν΅μ νκ³ λ§€κ°λ³μλ₯Ό μ μ‘νλ©° κ·Έ κ²°κ³Όλ₯Ό κ°μ Έμμ νλ©΄μ νμν©λλ€:

-### Alternative API docs upgrade
+### λμ API λ¬Έμ μ
κ·Έλ μ΄λ
-And now, go to <a href="http://127.0.0.1:8000/redoc" class="external-link" target="_blank">http://127.0.0.1:8000/redoc</a>.
+κ·Έλ¦¬κ³ μ΄μ , <a href="http://127.0.0.1:8000/redoc" class="external-link" target="_blank">http://127.0.0.1:8000/redoc</a>λ‘ μ΄λν©λλ€.
-* The alternative documentation will also reflect the new query parameter and body:
+* λμ λ¬Έμ μμ μ 쿼리 λ§€κ°λ³μμ λ³Έλ¬Έμ λ°μν©λλ€:

-### Recap
+### μμ½
-In summary, you declare **once** the types of parameters, body, etc. as function parameters.
+μμ½νλ©΄, μ¬λ¬λΆμ λ§€κ°λ³μμ νμ
, λ³Έλ¬Έ λ±μ ν¨μ λ§€κ°λ³μλ‘μ¨ **νλ²μ** μ μΈνμ΅λλ€.
-You do that with standard modern Python types.
+μ¬λ¬λΆμ νλ νμ€ νμ΄μ¬ νμ
μΌλ‘ μ΄λ₯Ό ννμ΅λλ€.
-You don't have to learn a new syntax, the methods or classes of a specific library, etc.
+μλ‘μ΄ λ¬Έλ², νΉμ λΌμ΄λΈλ¬λ¦¬μ λ©μλλ ν΄λμ€ λ±μ λ°°μΈ νμκ° μμ΅λλ€.
-Just standard **Python 3.6+**.
+κ·Έμ νμ€ **Python 3.6+**μ
λλ€.
-For example, for an `int`:
+μλ₯Ό λ€μ΄, `int`μ λν΄μ :
```Python
item_id: int
```
-or for a more complex `Item` model:
+λλ μ’ λ 볡μ‘ν `Item` λͺ¨λΈμ λν΄μ :
```Python
item: Item
```
-...and with that single declaration you get:
+...κ·Έλ¦¬κ³ λ¨ νλμ μ μΈμΌλ‘ μ¬λ¬λΆμ΄ μ»λ κ²μ:
-* Editor support, including:
- * Completion.
- * Type checks.
-* Validation of data:
- * Automatic and clear errors when the data is invalid.
- * Validation even for deeply nested JSON objects.
-* <abbr title="also known as: serialization, parsing, marshalling">Conversion</abbr> of input data: coming from the network to Python data and types. Reading from:
+* λ€μμ ν¬ν¨ν νΈμ§κΈ° μ§μ:
+ * μλμμ±.
+ * νμ
κ²μ¬.
+* λ°μ΄ν° κ²μ¦:
+ * λ°μ΄ν°κ° μ ν¨νμ§ μμ λ μλμΌλ‘ μμ±νλ λͺ
νν μλ¬.
+ * μ€μ²©λ JSON κ°μ²΄μ λν μ ν¨μ± κ²μ¬.
+* μ
λ ₯ λ°μ΄ν° <abbr title="λ€μμΌλ‘ μλ €μ§: μ§λ ¬ν, νμ±, λ§μ¬λ§">λ³ν</abbr>: λ€νΈμν¬μμ νμ΄μ¬ λ°μ΄ν° λ° νμ
μΌλ‘ μ μ‘. μ½μ μ μλ κ²λ€:
* JSON.
- * Path parameters.
- * Query parameters.
- * Cookies.
- * Headers.
- * Forms.
- * Files.
-* <abbr title="also known as: serialization, parsing, marshalling">Conversion</abbr> of output data: converting from Python data and types to network data (as JSON):
- * Convert Python types (`str`, `int`, `float`, `bool`, `list`, etc).
- * `datetime` objects.
- * `UUID` objects.
- * Database models.
- * ...and many more.
-* Automatic interactive API documentation, including 2 alternative user interfaces:
+ * κ²½λ‘ λ§€κ°λ³μ.
+ * 쿼리 λ§€κ°λ³μ.
+ * μΏ ν€.
+ * ν€λ.
+ * νΌ(Forms).
+ * νμΌ.
+* μΆλ ₯ λ°μ΄ν° <abbr title="λ€μμΌλ‘ μλ €μ§: μ§λ ¬ν, νμ±, λ§μ¬λ§">λ³ν</abbr>: νμ΄μ¬ λ°μ΄ν° λ° νμ
μ λ€νΈμν¬ λ°μ΄ν°λ‘ μ ν(JSON νμμΌλ‘):
+ * νμ΄μ¬ νμ
λ³ν (`str`, `int`, `float`, `bool`, `list`, λ±).
+ * `datetime` κ°μ²΄.
+ * `UUID` κ°μ²΄.
+ * λ°μ΄ν°λ² μ΄μ€ λͺ¨λΈ.
+ * ...λ λ§μ κ²λ€.
+* λμκ°λ₯ν μ¬μ©μ μΈν°νμ΄μ€λ₯Ό 2κ° ν¬ν¨ν μλ λνν API λ¬Έμ:
* Swagger UI.
* ReDoc.
---
-Coming back to the previous code example, **FastAPI** will:
-
-* Validate that there is an `item_id` in the path for `GET` and `PUT` requests.
-* Validate that the `item_id` is of type `int` for `GET` and `PUT` requests.
- * If it is not, the client will see a useful, clear error.
-* Check if there is an optional query parameter named `q` (as in `http://127.0.0.1:8000/items/foo?q=somequery`) for `GET` requests.
- * As the `q` parameter is declared with `= None`, it is optional.
- * Without the `None` it would be required (as is the body in the case with `PUT`).
-* For `PUT` requests to `/items/{item_id}`, Read the body as JSON:
- * Check that it has a required attribute `name` that should be a `str`.
- * Check that it has a required attribute `price` that has to be a `float`.
- * Check that it has an optional attribute `is_offer`, that should be a `bool`, if present.
- * All this would also work for deeply nested JSON objects.
-* Convert from and to JSON automatically.
-* Document everything with OpenAPI, that can be used by:
- * Interactive documentation systems.
- * Automatic client code generation systems, for many languages.
-* Provide 2 interactive documentation web interfaces directly.
+μ΄μ μ½λ μμ λ‘ λμκ°μ, **FastAPI**λ λ€μμ²λΌ μ²λ¦¬ν©λλ€:
+
+* `GET` λ° `PUT` μμ²μ `item_id`κ° κ²½λ‘μ μλμ§ κ²μ¦.
+* `GET` λ° `PUT` μμ²μ `item_id`κ° `int` νμ
μΈμ§ κ²μ¦.
+ * κ·Έλ μ§ μλ€λ©΄ ν΄λΌμ΄μΈνΈλ μ μ©νκ³ λͺ
νν μλ¬λ₯Ό λ³Ό μ μμ΅λλ€.
+* `GET` μμ²μ `q`λΌλ μ νμ μΈ μΏΌλ¦¬ λ§€κ°λ³μκ° κ²μ¬(`http://127.0.0.1:8000/items/foo?q=somequery`μ²λΌ).
+ * `q` λ§€κ°λ³μλ `= None`μΌλ‘ μ μΈλμκΈ° λλ¬Έμ μ νμ¬νμ
λλ€.
+ * `None`μ΄ μλ€λ©΄ νμμ¬νμ
λλ€(`PUT`μ κ²½μ°μ λ§μ°¬κ°μ§λ‘).
+* `/items/{item_id}`μΌλ‘μ `PUT` μμ²μ λ³Έλ¬Έμ JSONμΌλ‘ μ½μ:
+ * `name`μ νμ μμ±μΌλ‘ κ°κ³ `str` νμΈμ§ κ²μ¬.
+ * `price`μ νμ μμ±μΌλ‘ κ°κ³ `float` νμΈμ§ κ²μ¬.
+ * λ§μ½ μ£Όμ΄μ§λ€λ©΄, `is_offer`λ₯Ό μ ν μμ±μΌλ‘ κ°κ³ `bool` νμΈμ§ κ²μ¬.
+ * μ΄ λͺ¨λ κ²μ κΉμ΄ μ€μ²©λ JSON κ°μ²΄μλ μ μ©λ©λλ€.
+* JSONμΌλ‘, κ·Έλ¦¬κ³ μμλΆν° μλ λ³ν.
+* λ€μμμ μ¬μ©ν μ μλ λͺ¨λ κ²μ OpenAPIλ‘ λ¬Έμν:
+ * λνν λ¬Έμ μμ€ν
.
+ * μ¬λ¬ μΈμ΄λ€μ λν μλ ν΄λΌμ΄μΈνΈ μ½λ μμ± μμ€ν
.
+* 2κ°μ λνν λ¬Έμ μΉ μΈν°νμ΄μ€λ₯Ό μ§μ μ 곡.
---
-We just scratched the surface, but you already get the idea of how it all works.
+μ°λ¦¬λ κ·Έμ μλ° κ²ν‘κΈ°λ§ νμ λΏμΈλ° μ¬λ¬λΆμ λ²μ¨ μ΄λ»κ² μλνλμ§ μκ³ μμ΅λλ€.
-Try changing the line with:
+λ€μ μ€μ λ°κΏλ³΄μΈμ:
```Python
return {"item_name": item.name, "item_id": item_id}
```
-...from:
+...μμ:
```Python
... "item_name": item.name ...
```
-...to:
+...μΌλ‘:
```Python
... "item_price": item.price ...
```
-...and see how your editor will auto-complete the attributes and know their types:
+...κ·Έλ¬κ³ λμ μ¬λ¬λΆμ νΈμ§κΈ°κ° μμ±κ³Ό νμ
μ μκ³ μλ μμ±νλμ§ λ³΄μΈμ:

-For a more complete example including more features, see the <a href="https://fastapi.tiangolo.com/tutorial/">Tutorial - User Guide</a>.
+λ λ§μ κΈ°λ₯μ ν¬ν¨ν λ³΄λ€ μμ ν μμ μ κ²½μ°, <a href="https://fastapi.tiangolo.com/tutorial/">νν λ¦¬μΌ - μ¬μ©μ κ°μ΄λ</a>λ₯Ό 보μΈμ.
-**Spoiler alert**: the tutorial - user guide includes:
+**μ€ν¬μΌλ¬ μ£Όμ**: νν λ¦¬μΌ - μ¬μ©μ κ°μ΄λλ:
-* Declaration of **parameters** from other different places as: **headers**, **cookies**, **form fields** and **files**.
-* How to set **validation constraints** as `maximum_length` or `regex`.
-* A very powerful and easy to use **<abbr title="also known as components, resources, providers, services, injectables">Dependency Injection</abbr>** system.
-* Security and authentication, including support for **OAuth2** with **JWT tokens** and **HTTP Basic** auth.
-* More advanced (but equally easy) techniques for declaring **deeply nested JSON models** (thanks to Pydantic).
-* Many extra features (thanks to Starlette) as:
- * **WebSockets**
+* μλ‘ λ€λ₯Έ μ₯μμμ **λ§€κ°λ³μ** μ μΈ: **ν€λ**, **μΏ ν€**, **νΌ νλ** κ·Έλ¦¬κ³ **νμΌ**.
+* `maximum_length` λλ `regex`μ²λΌ **μ ν¨μ± μ μ½**νλ λ°©λ².
+* κ°λ ₯νκ³ μ¬μ©νκΈ° μ¬μ΄ **<abbr title="μ»΄ν¬λνΈ, 리μμ€, μ 곡μ, μλΉμ€, injectablesλΌ μλ €μ§">μμ‘΄μ± μ£Όμ
</abbr>** μμ€ν
.
+* **OAuth2** μ§μμ ν¬ν¨ν **JWT tokens** λ° **HTTP Basic**μ κ°λ 보μκ³Ό μΈμ¦.
+* (Pydantic λλΆμ) **κΉμ μ€μ²© JSON λͺ¨λΈ**μ μ μΈνλλ° λ μ§λ³΄ν (νμ§λ§ λ§μ°¬κ°μ§λ‘ μ¬μ΄) κΈ°μ .
+* (Starlette λλΆμ) λ§μ μΆκ° κΈ°λ₯:
+ * **μΉ μμΌ**
* **GraphQL**
- * extremely easy tests based on `requests` and `pytest`
+ * `requests` λ° `pytest`μ κΈ°λ°ν κ·Ήν μ¬μ΄ ν
μ€νΈ
* **CORS**
- * **Cookie Sessions**
- * ...and more.
+ * **μΏ ν€ μΈμ
**
+ * ...κΈ°ν λ±λ±.
-## Performance
+## μ±λ₯
-Independent TechEmpower benchmarks show **FastAPI** applications running under Uvicorn as <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">one of the fastest Python frameworks available</a>, only below Starlette and Uvicorn themselves (used internally by FastAPI). (*)
+λ
립λ 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">μ¬μ© κ°λ₯ν κ°μ₯ λΉ λ₯Έ νλ μμν¬ μ€ νλ</a>λ‘ Starletteμ Uvicorn(FastAPIμμ λ΄λΆμ μΌλ‘ μ¬μ©)μλ§ λ°λκ³ μμ΅λλ€. (*)
-To understand more about it, see the section <a href="https://fastapi.tiangolo.com/benchmarks/" class="internal-link" target="_blank">Benchmarks</a>.
+μμΈν λ΄μ©μ <a href="https://fastapi.tiangolo.com/benchmarks/" class="internal-link" target="_blank">λ²€μΉλ§ν¬</a> μΉμ
μ 보μΈμ.
-## Optional Dependencies
+## μ νκ°λ₯ν μ’
μμ¬ν
-Used by Pydantic:
+Pydanticμ΄ μ¬μ©νλ:
-* <a href="https://github.com/esnme/ultrajson" target="_blank"><code>ujson</code></a> - for faster JSON <abbr title="converting the string that comes from an HTTP request into Python data">"parsing"</abbr>.
-* <a href="https://github.com/JoshData/python-email-validator" target="_blank"><code>email_validator</code></a> - for email validation.
+* <a href="https://github.com/esnme/ultrajson" target="_blank"><code>ujson</code></a> - λ λΉ λ₯Έ JSON <abbr title="HTTP μμ²μμ νμ΄μ¬ λ°μ΄ν°λ‘ κ°λ λ¬Έμμ΄ λ³ν">"νμ±"</abbr>.
+* <a href="https://github.com/JoshData/python-email-validator" target="_blank"><code>email_validator</code></a> - μ΄λ©μΌ μ ν¨μ± κ²μ¬.
-Used by Starlette:
+Starletteμ΄ μ¬μ©νλ:
-* <a href="http://docs.python-requests.org" target="_blank"><code>requests</code></a> - Required if you want to use the `TestClient`.
-* <a href="https://github.com/Tinche/aiofiles" target="_blank"><code>aiofiles</code></a> - Required if you want to use `FileResponse` or `StaticFiles`.
-* <a href="http://jinja.pocoo.org" target="_blank"><code>jinja2</code></a> - Required if you want to use the default template configuration.
-* <a href="https://andrew-d.github.io/python-multipart/" target="_blank"><code>python-multipart</code></a> - Required if you want to support form <abbr title="converting the string that comes from an HTTP request into Python data">"parsing"</abbr>, with `request.form()`.
-* <a href="https://pythonhosted.org/itsdangerous/" target="_blank"><code>itsdangerous</code></a> - Required for `SessionMiddleware` support.
-* <a href="https://pyyaml.org/wiki/PyYAMLDocumentation" target="_blank"><code>pyyaml</code></a> - Required for Starlette's `SchemaGenerator` support (you probably don't need it with FastAPI).
-* <a href="https://graphene-python.org/" target="_blank"><code>graphene</code></a> - Required for `GraphQLApp` support.
-* <a href="https://github.com/esnme/ultrajson" target="_blank"><code>ujson</code></a> - Required if you want to use `UJSONResponse`.
+* <a href="http://docs.python-requests.org" target="_blank"><code>requests</code></a> - `TestClient`λ₯Ό μ¬μ©νλ €λ©΄ νμ.
+* <a href="https://github.com/Tinche/aiofiles" target="_blank"><code>aiofiles</code></a> - `FileResponse` λλ `StaticFiles`λ₯Ό μ¬μ©νλ €λ©΄ νμ.
+* <a href="http://jinja.pocoo.org" target="_blank"><code>jinja2</code></a> - κΈ°λ³Έ ν
νλ¦Ώ μ€μ μ μ¬μ©νλ €λ©΄ νμ.
+* <a href="https://andrew-d.github.io/python-multipart/" target="_blank"><code>python-multipart</code></a> - `request.form()`κ³Ό ν¨κ» <abbr title="HTTP μμ²μμ νμ΄μ¬ λ°μ΄ν°λ‘ κ°λ λ¬Έμμ΄ λ³ν">"parsing"</abbr>μ μ§μμ μνλ©΄ νμ.
+* <a href="https://pythonhosted.org/itsdangerous/" target="_blank"><code>itsdangerous</code></a> - `SessionMiddleware` μ§μμ μν΄ νμ.
+* <a href="https://pyyaml.org/wiki/PyYAMLDocumentation" target="_blank"><code>pyyaml</code></a> - Starletteμ `SchemaGenerator` μ§μμ μν΄ νμ (FastAPIμ μΈλλ νμκ° μμ κ²λλ€).
+* <a href="https://graphene-python.org/" target="_blank"><code>graphene</code></a> - `GraphQLApp` μ§μμ μν΄ νμ.
+* <a href="https://github.com/esnme/ultrajson" target="_blank"><code>ujson</code></a> - `UJSONResponse`λ₯Ό μ¬μ©νλ €λ©΄ νμ.
-Used by FastAPI / Starlette:
+FastAPI / Starletteμ΄ μ¬μ©νλ:
-* <a href="http://www.uvicorn.org" target="_blank"><code>uvicorn</code></a> - for the server that loads and serves your application.
-* <a href="https://github.com/ijl/orjson" target="_blank"><code>orjson</code></a> - Required if you want to use `ORJSONResponse`.
+* <a href="http://www.uvicorn.org" target="_blank"><code>uvicorn</code></a> - μ ν리μΌμ΄μ
μ λ‘λνκ³ μ 곡νλ μλ².
+* <a href="https://github.com/ijl/orjson" target="_blank"><code>orjson</code></a> - `ORJSONResponse`μ μ¬μ©νλ €λ©΄ νμ.
-You can install all of these with `pip install fastapi[all]`.
+`pip install fastapi[all]`λ₯Ό ν΅ν΄ μ΄ λͺ¨λλ₯Ό μ€μΉ ν μ μμ΅λλ€.
-## License
+## λΌμ΄μΌμ€
-This project is licensed under the terms of the MIT license.
+μ΄ νλ‘μ νΈλ MIT λΌμ΄μΌμ€ μ‘°μ½μ λ°λΌ λΌμ΄μΌμ€κ° λΆμ¬λ©λλ€.