Fast API 프로젝트 생성 및 실행

Junha Kim·2021년 1월 3일
0

FastAPI

목록 보기
2/16
post-custom-banner
$ pip install fastapi
$ pip install uvicorn[standard]

Create App

from typing import Optional

from fastapi import FastAPI

app = FastAPI()

@app.get("/")
def read_root():
    return {"Hello": "World"}

Run

$ uvicorn main:app --reload

INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: Started reloader process [28720]
INFO: Started server process [28722]
INFO: Waiting for application startup.
INFO: Application startup complete.
post-custom-banner

0개의 댓글