FastAPI1 [FastAPI] FastAPI 코드 구조 확인 mainfrom fastapi import FastAPIapp = FastAPI()@app.get("/")async def root(): return {"message": "Hello World"} async def: FastAPI의 핵심. 입출력(I/O) 대기 시간 동안 다른 작업을 처리할 수 있게 해주는 비동기 문법.데코레이터(@): HTTP 메서드(GET, POST, PUT, DELETE)와 URL 경로를 함수와 연결 endpointsrouter = APIRouter()@router.get( "/users", response_model=UserListResponse, summary="[관리자] 사용자 목록 조회", description="관리자 권한으로 전체 사용자 목록.. 2026. 5. 4. 이전 1 다음