Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- localization
- 현지화
- AI
- andrew ng
- gettext_windows
- docker
- gettext
- internationalization
- 국제화
- coursera
- Python
- I18N
- deeplearning.ai
Archives
- Today
- Total
JMANI
FastAPI 본문
doc: https://fastapi.tiangolo.com/
pip install fastapi
pip install uvicorn
ASGI: Asynchronous Server Gateway Interface
uvicorn: 비동기 방식의 http server > ASGI
# main.py
from fastapi import FastAPI
app = FastAPI() # 인스턴스 생성
@app.get("/") # get method로 '/'에 해당하는 생성
def root():
return {'Hello':'World!'}
uvicorn main:app --reload
- main: module name, main.py
- app: app = FastAPI()
- --reload: make the server restart after code changes. Only usse for development.
Swagger UI
link: localhost:8000/docs
- Try it out
- 실행가능
Redoc UI
link: localhost:8000/redoc
- openapi.json 다운 가능
- 실행은 안됨
Comments