from fastapi import FastAPI
app = FastAPI()
BOOKS = {
'book_1' : {'title' : 'Title One', 'author' : 'Autor One'},
'book_2' : {'title' : 'Title Two', 'author': 'Autor Two'},
'book_3' : {'title' : 'Title Three', 'author': 'Autor Three'},
'book_4' : {'title' : 'Title Four', 'author': 'Autor Four'},
'book_5' : {'title' : 'Title Five', 'author': 'Autor Five'},
}
@app.get('/')
async def raad_all_books()
까지 하고 terminal에
uvicorn books:app --reload
친 후 엔터를 누르면
local URL에 뜬다. (127.0.0.1:8000)
들어가서
주소창에
라고 치고 엔터를 누르면
Fast API Swagger UI 가 나타난다!
이렇게 비슷하게 나타날 것임!