docs/ko/docs/index.md MARKDOWN 586 lines View on github.com → Search inside
1---2include_yaml:3  sponsors: data/sponsors.yml4---56# FastAPI { #fastapi }78<style>9.md-content .md-typeset h1 { display: none; }10</style>1112<p align="center">13  <a href="https://fastapi.tiangolo.com/ko"><img src="https://fastapi.tiangolo.com/img/logo-margin/logo-teal.png" alt="FastAPI"></a>14</p>15<p align="center">16    <em>FastAPI 프레임워크, 고성능, 간편한 학습, 빠른 코드 작성, 준비된 프로덕션</em>17</p>18<p align="center">19<a href="https://github.com/fastapi/fastapi/actions?query=workflow%3ATest+event%3Apush+branch%3Amaster">20    <img src="https://github.com/fastapi/fastapi/actions/workflows/test.yml/badge.svg?event=push&branch=master" alt="Test">21</a>22<a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/fastapi">23    <img src="https://coverage-badge.samuelcolvin.workers.dev/fastapi/fastapi.svg" alt="Coverage">24</a>25<a href="https://pypi.org/project/fastapi">26    <img src="https://img.shields.io/pypi/v/fastapi?color=%2334D058&label=pypi%20package" alt="Package version">27</a>28<a href="https://pypi.org/project/fastapi">29    <img src="https://img.shields.io/pypi/pyversions/fastapi.svg?color=%2334D058" alt="Supported Python versions">30</a>31</p>3233---3435**문서**: [https://fastapi.tiangolo.com/ko](https://fastapi.tiangolo.com/ko)3637**소스 코드**: [https://github.com/fastapi/fastapi](https://github.com/fastapi/fastapi)3839---4041FastAPI는 현대적이고, 빠르며(고성능), 파이썬 표준 타입 힌트에 기초한 Python의 API를 빌드하기 위한 웹 프레임워크입니다.4243주요 특징으로:4445* **빠름**: (Starlette과 Pydantic 덕분에) **NodeJS****Go**와 대등할 정도로 매우 높은 성능. [사용 가능한 가장 빠른 파이썬 프레임워크 중 하나](#performance).46* **빠른 코드 작성**:200%에서 300%까지 기능 개발 속도 증가. *47* **적은 버그**: 사람(개발자)에 의한 에러 약 40% 감소. *48* **직관적**: 훌륭한 편집기 지원. <dfn title="다른 말로는: 자동 완성, 자동완성, IntelliSense">자동완성</dfn>이 모든 곳에서 동작. 적은 디버깅 시간.49* **쉬움**: 쉽게 사용하고 배우도록 설계. 적은 문서 읽기 시간.50* **짧음**: 코드 중복 최소화. 각 매개변수 선언의 여러 기능. 적은 버그.51* **견고함**: 준비된 프로덕션 용 코드를 얻으십시오. 자동 대화형 문서와 함께.52* **표준 기반**: API에 대한 (완전히 호환되는) 개방형 표준 기반: [OpenAPI](https://github.com/OAI/OpenAPI-Specification) (이전에 Swagger로 알려졌던) 및 [JSON Schema](https://json-schema.org/).5354<small>* 내부 개발팀의 프로덕션 애플리케이션을 빌드한 테스트에 근거한 측정</small>5556## 스폰서 { #sponsors }5758<!-- sponsors -->5960### 키스톤 스폰서 { #keystone-sponsor }6162<div class="fastapi-sponsors fastapi-sponsors--keystone">63{% for sponsor in sponsors.keystone -%}64<a class="fastapi-sponsors__card fastapi-sponsors__card--keystone" href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img class="fastapi-sponsors__banner" src="{{ sponsor.img }}" alt="{{ sponsor.title }}"></a>65{% endfor -%}66</div>6768### 골드 스폰서 { #gold-sponsors }6970<div class="fastapi-sponsors fastapi-sponsors--gold">71{% for sponsor in sponsors.gold -%}72<a class="fastapi-sponsors__card fastapi-sponsors__card--gold" href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img class="fastapi-sponsors__banner" src="{{ sponsor.img }}" alt="{{ sponsor.title }}" loading="lazy"></a>73{% endfor -%}74</div>7576### 실버 스폰서 { #silver-sponsors }7778<div class="fastapi-sponsors fastapi-sponsors--silver">79{% for sponsor in sponsors.silver -%}80<a class="fastapi-sponsors__card fastapi-sponsors__card--silver" href="{{ sponsor.url }}" title="{{ sponsor.title }}"><img class="fastapi-sponsors__banner" src="{{ sponsor.img }}" alt="{{ sponsor.title }}" loading="lazy"></a>81{% endfor %}82</div>8384<!-- /sponsors -->8586[다른 스폰서](https://fastapi.tiangolo.com/ko/fastapi-people/#sponsors)8788## 의견들 { #opinions }8990<!-- only-mkdocs -->91<div class="fastapi-opinions" data-fastapi-opinions>92  <div class="fastapi-opinions__tabs" role="tablist" aria-label="Companies using FastAPI">93    <button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-microsoft" aria-controls="fo-panel-microsoft" aria-selected="true" tabindex="0">94      <span class="fastapi-opinions__mark"><img src="/img/logos/microsoft.svg" alt="Microsoft" loading="lazy"></span>95    </button>96    <button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-uber" aria-controls="fo-panel-uber" aria-selected="false" tabindex="-1">97      <span class="fastapi-opinions__mark"><img src="/img/logos/uber.svg" alt="Uber" loading="lazy"></span>98    </button>99    <button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-netflix" aria-controls="fo-panel-netflix" aria-selected="false" tabindex="-1">100      <span class="fastapi-opinions__mark"><img src="/img/logos/netflix.svg" alt="Netflix" loading="lazy"></span>101    </button>102    <button class="fastapi-opinions__tab" role="tab" type="button" id="fo-tab-cisco" aria-controls="fo-panel-cisco" aria-selected="false" tabindex="-1">103      <span class="fastapi-opinions__mark"><img src="/img/logos/cisco.svg" alt="Cisco" loading="lazy"></span>104    </button>105  </div>106107  <div class="fastapi-opinions__panel" id="fo-panel-microsoft" role="tabpanel" aria-labelledby="fo-tab-microsoft" tabindex="0">108    <blockquote class="fastapi-opinions__quote">"저는 요즘 <strong>FastAPI</strong>를 많이 사용하고 있습니다. 우리 팀의 모든 <strong>마이크로소프트 ML 서비스</strong>에 사용할 계획입니다. 그중 일부는 핵심 <strong>Windows</strong> 제품과 일부 <strong>Office</strong> 제품에 통합되고 있습니다."</blockquote>109    <div class="fastapi-opinions__attr">— Kabir Khan, <strong>Microsoft</strong> <a href="https://github.com/fastapi/fastapi/pull/26">(ref)</a></div>110  </div>111  <div class="fastapi-opinions__panel" id="fo-panel-uber" role="tabpanel" aria-labelledby="fo-tab-uber" tabindex="0" hidden>112    <blockquote class="fastapi-opinions__quote">"우리는 <strong>FastAPI</strong> 라이브러리를 채택해 <strong>예측</strong>을 얻기 위해 쿼리할 수 있는 <strong>REST</strong> 서버를 생성했습니다." <em>[Ludwig을 위해]</em></blockquote>113    <div class="fastapi-opinions__attr">— Piero Molino, Yaroslav Dudin, Sai Sumanth Miryala, <strong>Uber</strong> <a href="https://eng.uber.com/ludwig-v0-2/">(ref)</a></div>114  </div>115  <div class="fastapi-opinions__panel" id="fo-panel-netflix" role="tabpanel" aria-labelledby="fo-tab-netflix" tabindex="0" hidden>116    <blockquote class="fastapi-opinions__quote">"<strong>Netflix</strong>는 우리의 <strong>위기 관리</strong> 오케스트레이션 프레임워크인 <strong>Dispatch</strong>의 오픈 소스 공개를 발표하게 되어 기쁩니다!" <em>[FastAPI로 빌드]</em></blockquote>117    <div class="fastapi-opinions__attr">— Kevin Glisson, Marc Vilanova, Forest Monsen, <strong>Netflix</strong> <a href="https://netflixtechblog.com/introducing-dispatch-da4b8a2a8072">(ref)</a></div>118  </div>119  <div class="fastapi-opinions__panel" id="fo-panel-cisco" role="tabpanel" aria-labelledby="fo-tab-cisco" tabindex="0" hidden>120    <blockquote class="fastapi-opinions__quote">"프로덕션 Python API를 만들고자 한다면, 저는 <strong>FastAPI</strong>를 강력히 추천합니다. <strong>아름답게 설계</strong>되었고, <strong>사용이 간단</strong>하며, <strong>확장성이 매우 뛰어납니다</strong> — 우리의 API 우선 개발 전략에서 <strong>핵심 구성 요소</strong>가 되었습니다."</blockquote>121    <div class="fastapi-opinions__attr">— Deon Pillsbury, <strong>Cisco</strong> <a href="https://www.linkedin.com/posts/deonpillsbury_cisco-cx-python-activity-6963242628536487936-trAp/">(ref)</a></div>122  </div>123</div>124<!-- /only-mkdocs -->125126<div class="only-github" markdown="1">127128"_[...] 저는 요즘 **FastAPI**를 많이 사용하고 있습니다. [...] 사실 우리 팀의 **마이크로소프트 ML 서비스** 전부를 바꿀 계획입니다. 그중 일부는 핵심 **Windows**와 몇몇의 **Office** 제품들이 통합되고 있습니다._"129130<div style="text-align: right; margin-right: 10%;">Kabir Khan - <strong>Microsoft</strong> <a href="https://github.com/fastapi/fastapi/pull/26"><small>(ref)</small></a></div>131132---133134"_**FastAPI** 라이브러리를 채택하여 **예측**을 얻기 위해 쿼리를 실행할 수 있는 **REST** 서버를 생성했습니다. [Ludwig을 위해]_"135136<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/"><small>(ref)</small></a></div>137138---139140"_**Netflix**는 우리의 오픈 소스 배포판인 **위기 관리** 오케스트레이션 프레임워크를 발표할 수 있어 기쁩니다: 바로 **Dispatch**입니다! [**FastAPI**로 빌드]_"141142<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"><small>(ref)</small></a></div>143144---145146"_프로덕션 Python API를 만들고자 한다면, 저는 **FastAPI**를 강력히 추천합니다. **아름답게 설계**되었고, **사용이 간단**하며, **확장성이 매우 뛰어나** 우리의 API 우선 개발 전략에서 **핵심 구성 요소**가 되었습니다._"147148<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>149150---151152</div>153154## FastAPI Conf { #fastapi-conf }155156[**FastAPI Conf '26**](https://fastapiconf.com)은 **2026년 10월 28일**, **네덜란드 암스테르담**에서 열립니다. FastAPI에 관한 모든 것, 바로 출처에서. 🎤157158<a class="fastapi-feature-banner" href="https://fastapiconf.com"><img src="https://fastapi.tiangolo.com/img/fastapi-conf.jpeg" alt="FastAPI Conf '26 - October 28, 2026 - Amsterdam, NL"></a>159160## FastAPI 미니 다큐멘터리 { #fastapi-mini-documentary }1611622025년 말에 공개된 [FastAPI 미니 다큐멘터리](https://www.youtube.com/watch?v=mpR8ngthqiE)가 있습니다. 온라인에서 시청할 수 있습니다:163164<a class="fastapi-feature-banner" href="https://www.youtube.com/watch?v=mpR8ngthqiE"><img src="https://fastapi.tiangolo.com/img/fastapi-documentary.jpg" alt="FastAPI Mini Documentary"></a>165166## **Typer**, CLI를 위한 FastAPI { #typer-the-fastapi-of-clis }167168<a href="https://typer.tiangolo.com"><img src="https://typer.tiangolo.com/img/logo-margin/logo-margin-vector.svg" style="width: 20%;"></a>169170API 대신 터미널에서 사용할 <abbr title="Command Line Interface - 커맨드 라인 인터페이스">CLI</abbr> 앱을 만들고 있다면, [**Typer**](https://typer.tiangolo.com/)를 확인해 보십시오.171172**Typer**FastAPI의 동생입니다. 그리고 **CLI를 위한 FastAPI**가 되기 위해 생겼습니다. ⌨️ 🚀173174## 요구사항 { #requirements }175176FastAPI는 거인들의 어깨 위에 서 있습니다:177178* [Starlette](https://www.starlette.dev/) — 웹 부분을 담당합니다.179* [Pydantic](https://docs.pydantic.dev/) — 데이터 부분을 담당합니다.180181## 설치 { #installation }182183[가상 환경](https://fastapi.tiangolo.com/ko/virtual-environments/)을 생성하고 활성화한 다음 FastAPI를 설치하세요:184185<div class="termy">186187```console188$ pip install "fastapi[standard]"189190---> 100%191```192193</div>194195**Note**: 모든 터미널에서 동작하도록 `"fastapi[standard]"`를 따옴표로 감싸 넣었는지 확인하세요.196197## 예제 { #example }198199### 만들기 { #create-it }200201다음 내용으로 `main.py` 파일을 만드십시오:202203```Python204from fastapi import FastAPI205206app = FastAPI()207208209@app.get("/")210def read_root():211    return {"Hello": "World"}212213214@app.get("/items/{item_id}")215def read_item(item_id: int, q: str | None = None):216    return {"item_id": item_id, "q": q}217```218219<details markdown="1">220<summary>또는 <code>async def</code> 사용하기...</summary>221222여러분의 코드가 `async` / `await`을 사용한다면, `async def`를 사용하십시오:223224```Python hl_lines="7  12"225from fastapi import FastAPI226227app = FastAPI()228229230@app.get("/")231async def read_root():232    return {"Hello": "World"}233234235@app.get("/items/{item_id}")236async def read_item(item_id: int, q: str | None = None):237    return {"item_id": item_id, "q": q}238```239240**Note**:241242잘 모르겠다면, ["급하세요?"](https://fastapi.tiangolo.com/ko/async/#in-a-hurry) 섹션을 확인해 보십시오.243244</details>245246### 실행하기 { #run-it }247248다음 명령으로 서버를 실행하십시오:249250<div class="termy">251252```console253$ fastapi dev254255 ╭────────── FastAPI CLI - Development mode ───────────╮256                                                      257   Serving at: http://127.0.0.1:8000                  │258                                                      259   API docs: http://127.0.0.1:8000/docs               │260                                                      261   Running in development mode, for production use:   262                                                      263   fastapi run                                        264                                                      265 ╰─────────────────────────────────────────────────────╯266267INFO:     Will watch for changes in these directories: ['/home/user/code/awesomeapp']268INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)269INFO:     Started reloader process [2248755] using WatchFiles270INFO:     Started server process [2248757]271INFO:     Waiting for application startup.272INFO:     Application startup complete.273```274275</div>276277<details markdown="1">278<summary><code>fastapi dev</code> 명령에 관하여...</summary>279280`fastapi dev` 명령은 여러분의 `main.py` 파일을 자동으로 읽고, 그 안의 **FastAPI** 앱을 감지한 다음, [Uvicorn](https://www.uvicorn.dev)을 사용해 서버를 시작합니다.281282기본적으로 `fastapi dev`는 로컬 개발을 위해 auto-reload가 활성화된 상태로 시작됩니다.283284자세한 내용은 [FastAPI CLI 문서](https://fastapi.tiangolo.com/ko/fastapi-cli/)에서 확인할 수 있습니다.285286</details>287288### 확인하기 { #check-it }289290브라우저로 [http://127.0.0.1:8000/items/5?q=somequery](http://127.0.0.1:8000/items/5?q=somequery)를 열어보십시오.291292아래의 JSON 응답을 볼 수 있습니다:293294```JSON295{"item_id": 5, "q": "somequery"}296```297298여러분은 벌써 API를 만들었습니다:299300* _경로_ `/``/items/{item_id}`에서 HTTP 요청 받기.301* 두 _경로_ 모두 `GET` <em>연산</em>(HTTP _메소드_ 로 알려진)을 받습니다.302* _경로_ `/items/{item_id}``int`형 이어야 하는 _경로 매개변수_ `item_id`를 가지고 있습니다.303* _경로_ `/items/{item_id}`는 선택적인 `str`형 _쿼리 매개변수_ `q`를 가지고 있습니다.304305### 대화형 API 문서 { #interactive-api-docs }306307이제 [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs)로 가보십시오.308309자동 대화형 API 문서를 볼 수 있습니다 ([Swagger UI](https://github.com/swagger-api/swagger-ui) 제공):310311![Swagger UI](https://fastapi.tiangolo.com/img/index/index-01-swagger-ui-simple.png)312313### 대안 API 문서 { #alternative-api-docs }314315그리고 이제 [http://127.0.0.1:8000/redoc](http://127.0.0.1:8000/redoc)로 가봅시다.316317다른 자동 문서를 볼 수 있습니다([ReDoc](https://github.com/Rebilly/ReDoc) 제공):318319![ReDoc](https://fastapi.tiangolo.com/img/index/index-02-redoc-simple.png)320321## 예제 업그레이드 { #example-upgrade }322323이제 `PUT` 요청에서 본문을 받기 위해 `main.py` 파일을 수정해봅시다.324325Pydantic 덕분에 표준 Python 타입을 사용해 본문을 선언합니다.326327```Python hl_lines="2  7-10 23-25"328from fastapi import FastAPI329from pydantic import BaseModel330331app = FastAPI()332333334class Item(BaseModel):335    name: str336    price: float337    is_offer: bool | None = None338339340@app.get("/")341def read_root():342    return {"Hello": "World"}343344345@app.get("/items/{item_id}")346def read_item(item_id: int, q: str | None = None):347    return {"item_id": item_id, "q": q}348349350@app.put("/items/{item_id}")351def update_item(item_id: int, item: Item):352    return {"item_name": item.name, "item_id": item_id}353```354355`fastapi dev` 서버는 자동으로 리로딩되어야 합니다.356357### 대화형 API 문서 업그레이드 { #interactive-api-docs-upgrade }358359이제 [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs)로 이동합니다.360361* 대화형 API 문서는 새 본문을 포함해 자동으로 업데이트됩니다:362363![Swagger UI](https://fastapi.tiangolo.com/img/index/index-03-swagger-02.png)364365* "Try it out" 버튼을 클릭하면, 매개변수를 채우고 API와 직접 상호작용할 수 있습니다:366367![Swagger UI interaction](https://fastapi.tiangolo.com/img/index/index-04-swagger-03.png)368369* 그런 다음 "Execute" 버튼을 클릭하면, 사용자 인터페이스가 API와 통신하고 매개변수를 전송한 뒤 결과를 받아 화면에 표시합니다:370371![Swagger UI interaction](https://fastapi.tiangolo.com/img/index/index-05-swagger-04.png)372373### 대안 API 문서 업그레이드 { #alternative-api-docs-upgrade }374375그리고 이제, [http://127.0.0.1:8000/redoc](http://127.0.0.1:8000/redoc)로 이동합니다.376377* 대안 문서 역시 새 쿼리 매개변수와 본문을 반영합니다:378379![ReDoc](https://fastapi.tiangolo.com/img/index/index-06-redoc-02.png)380381### 요약 { #recap }382383요약하면, 여러분은 매개변수의 타입, 본문 등을 함수 매개변수로서 **한번에** 선언했습니다.384385여러분은 현대 표준 파이썬 타입으로 이를 행했습니다.386387새로운 문법, 특정 라이브러리의 메소드나 클래스 등을 배울 필요가 없습니다.388389그저 표준 **Python** 입니다.390391예를 들어, `int`에 대해선:392393```Python394item_id: int395```396397또는 좀 더 복잡한 `Item` 모델에 대해선:398399```Python400item: Item401```402403...그리고 단 하나의 선언으로 여러분이 얻는 것은:404405* 다음을 포함한 편집기 지원:406    * 자동완성.407    * 타입 검사.408* 데이터 검증:409    * 데이터가 유효하지 않을 때 자동으로 생성하는 명확한 에러.410    * 깊이 중첩된 JSON 객체에 대한 유효성 검사.411* 입력 데이터 <dfn title="다른 말로는: 직렬화, 파싱, 마샬링">변환</dfn>: 네트워크에서 파이썬 데이터 및 타입으로 전송. 읽을 수 있는 것들:412    * JSON.413    * 경로 매개변수.414    * 쿼리 매개변수.415    * 쿠키.416    * 헤더.417    *(Forms).418    * 파일.419* 출력 데이터 <dfn title="다른 말로는: 직렬화, 파싱, 마샬링">변환</dfn>: 파이썬 데이터 및 타입을 네트워크 데이터로 전환(JSON 형식으로):420    * 파이썬 타입 변환 (`str`, `int`, `float`, `bool`, `list`,).421    * `datetime` 객체.422    * `UUID` 객체.423    * 데이터베이스 모델.424    * ...더 많은 것들.425* 대안가능한 사용자 인터페이스를 2개 포함한 자동 대화형 API 문서:426    * Swagger UI.427    * ReDoc.428429---430431이전 코드 예제로 돌아가서, **FastAPI**는 다음처럼 처리합니다:432433* `GET``PUT` 요청에 `item_id`가 경로에 있는지 검증.434* `GET``PUT` 요청에 `item_id``int` 타입인지 검증.435    * 그렇지 않다면 클라이언트는 유용하고 명확한 에러를 볼 수 있습니다.436* `GET` 요청에 `q`라는 선택적인 쿼리 매개변수가 있는지 검사(`http://127.0.0.1:8000/items/foo?q=somequery`처럼).437    * `q` 매개변수는 `= None`으로 선언되었기 때문에 선택사항입니다.438    * `None`이 없다면 필수사항입니다(`PUT`의 경우와 마찬가지로).439* `/items/{item_id}`으로의 `PUT` 요청은 본문을 JSON으로 읽음:440    * `name`을 필수 속성으로 갖고 `str` 형인지 검사.441    * `price`를 필수 속성으로 갖고 `float` 형이어야 하는지 검사.442    * 만약 주어진다면, `is_offer`를 선택 속성으로 갖고 `bool` 형이어야 하는지 검사.443    * 이 모든 것은 깊이 중첩된 JSON 객체에도 적용됩니다.444* JSON을 변환하거나 JSON으로 변환하는 것을 자동화.445* 다음에서 사용할 수 있는 모든 것을 OpenAPI로 문서화:446    * 대화형 문서 시스템.447    * 여러 언어들에 대한 자동 클라이언트 코드 생성 시스템.448* 2개의 대화형 문서 웹 인터페이스를 직접 제공.449450---451452우리는 그저 수박 겉 핥기만 했을 뿐인데 여러분은 벌써 어떻게 작동하는지 알고 있습니다.453454다음 줄을 바꿔보십시오:455456```Python457    return {"item_name": item.name, "item_id": item_id}458```459460...에서:461462```Python463        ... "item_name": item.name ...464```465466...으로:467468```Python469        ... "item_price": item.price ...470```471472...그러고 나서 여러분의 편집기가 속성과 타입을 알고 자동 완성하는지 보십시오:473474![editor support](https://fastapi.tiangolo.com/img/vscode-completion.png)475476더 많은 기능을 포함한 보다 완전한 예제의 경우, <a href="https://fastapi.tiangolo.com/ko/tutorial/">튜토리얼 - 사용자 가이드</a>를 보십시오.477478**스포일러 주의**: 튜토리얼 - 사용자 가이드는:479480* 서로 다른 장소에서 **매개변수** 선언: **헤더**, **쿠키**, **폼 필드** 그리고 **파일**.481* `maximum_length` 또는 `regex`처럼 **유효성 제약**하는 방법.482* 강력하고 사용하기 쉬운 **<dfn title="다른 말로는: 컴포넌트, 리소스, 프로바이더, 서비스, 인젝터블">의존성 주입</dfn>** 시스템.483* **OAuth2** 지원을 포함한 **JWT tokens****HTTP Basic**을 갖는 보안과 인증.484* (Pydantic 덕분에) **깊은 중첩 JSON 모델**을 선언하는데 더 진보한 (하지만 마찬가지로 쉬운) 기술.485* [Strawberry](https://strawberry.rocks) 및 기타 라이브러리와의 **GraphQL** 통합.486* (Starlette 덕분에) 많은 추가 기능:487    * **웹 소켓**488    * HTTPX`pytest`에 기반한 극히 쉬운 테스트489    * **CORS**490    * **쿠키 세션**491    * ...기타 등등.492493### 앱 배포하기(선택 사항) { #deploy-your-app-optional }494495선택적으로 FastAPI 앱을 [FastAPI Cloud](https://fastapicloud.com)에 배포할 수 있습니다. 아직이라면 대기자 명단에 등록해 보세요. 🚀496497이미 **FastAPI Cloud** 계정이 있다면(대기자 명단에서 초대해 드렸습니다 😉), 한 번의 명령으로 애플리케이션을 배포할 수 있습니다.498499<div class="termy">500501```console502$ fastapi deploy503504Deploying to FastAPI Cloud...505506 Deployment successful!507508🐔 Ready the chicken! Your app is ready at https://myapp.fastapicloud.dev509```510511</div>512513이게 전부입니다! 이제 해당 URL에서 앱에 접근할 수 있습니다. 514515#### FastAPI Cloud 소개 { #about-fastapi-cloud }516517**[FastAPI Cloud](https://fastapicloud.com)**는 **FastAPI** 뒤에 있는 동일한 작성자와 팀이 만들었습니다.518519최소한의 노력으로 API를 **빌드**, **배포**, **접근**하는 과정을 간소화합니다.520521FastAPI로 앱을 빌드할 때의 동일한 **개발자 경험**을 클라우드에 **배포**하는 데까지 확장해 줍니다. 🎉522523FastAPI Cloud는 *FastAPI and friends* 오픈 소스 프로젝트의 주요 스폰서이자 자금 제공자입니다. 524525#### 다른 클라우드 제공자에 배포하기 { #deploy-to-other-cloud-providers }526527FastAPI는 오픈 소스이며 표준을 기반으로 합니다. 선택한 어떤 클라우드 제공자에도 FastAPI 앱을 배포할 수 있습니다.528529클라우드 제공자의 가이드를 따라 FastAPI 앱을 배포하세요. 🤓530531## 성능 { #performance }532533독립된 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에서 내부적으로 사용)에만 밑돌고 있습니다. (*)534535자세한 내용은 [벤치마크](https://fastapi.tiangolo.com/ko/benchmarks/) 섹션을 보십시오.536537## 의존성 { #dependencies }538539FastAPI는 Pydantic과 Starlette에 의존합니다.540541### `standard` 의존성 { #standard-dependencies }542543`pip install "fastapi[standard]"`FastAPI를 설치하면 `standard` 그룹의 선택적 의존성이 함께 설치됩니다.544545Pydantic이 사용하는:546547* [`email-validator`](https://github.com/JoshData/python-email-validator) - 이메일 유효성 검사.548549Starlette이 사용하는:550551* [`httpx`](https://www.python-httpx.org) - `TestClient`를 사용하려면 필요.552* [`jinja2`](https://jinja.palletsprojects.com) - 기본 템플릿 설정을 사용하려면 필요.553* [`python-multipart`](https://github.com/Kludex/python-multipart) - `request.form()`과 함께 form <dfn title="HTTP 요청에서 온 문자열을 파이썬 데이터로 변환">"파싱"</dfn> 지원을 원하면 필요.554555FastAPI가 사용하는:556557* [`uvicorn`](https://www.uvicorn.dev) - 애플리케이션을 로드하고 제공하는 서버를 위한 것입니다. 여기에는 고성능 서빙에 필요한 일부 의존성(예: `uvloop`)이 포함된 `uvicorn[standard]`가 포함됩니다.558* `fastapi-cli[standard]` - `fastapi` 명령을 제공하기 위한 것입니다.559    * 여기에는 [FastAPI Cloud](https://fastapicloud.com)에 FastAPI 애플리케이션을 배포할 수 있게 해주는 `fastapi-cloud-cli`가 포함됩니다.560561### `standard` 의존성 없이 { #without-standard-dependencies }562563`standard` 선택적 의존성을 포함하고 싶지 않다면, `pip install "fastapi[standard]"` 대신 `pip install fastapi`로 설치할 수 있습니다.564565### `fastapi-cloud-cli` 없이 { #without-fastapi-cloud-cli }566567표준 의존성과 함께 FastAPI를 설치하되 `fastapi-cloud-cli` 없이 설치하고 싶다면, `pip install "fastapi[standard-no-fastapi-cloud-cli]"`로 설치할 수 있습니다.568569### 추가 선택적 의존성 { #additional-optional-dependencies }570571추가로 설치하고 싶을 수 있는 의존성도 있습니다.572573추가 선택적 Pydantic 의존성:574575* [`pydantic-settings`](https://docs.pydantic.dev/latest/usage/pydantic_settings/) - 설정 관리를 위한 것입니다.576* [`pydantic-extra-types`](https://docs.pydantic.dev/latest/usage/types/extra_types/extra_types/) - Pydantic에서 사용할 추가 타입을 위한 것입니다.577578추가 선택적 FastAPI 의존성:579580* [`orjson`](https://github.com/ijl/orjson) - `ORJSONResponse`를 사용하려면 필요.581* [`ujson`](https://github.com/esnme/ultrajson) - `UJSONResponse`를 사용하려면 필요.582583## 라이센스 { #license }584585이 프로젝트는 MIT 라이센스 조약에 따라 라이센스가 부여됩니다.

Findings

✓ No findings reported for this file.

Get this view in your editor

Same data, no extra tab — call code_get_file + code_get_findings over MCP from Claude/Cursor/Copilot.