Python/FastAPI1 FastAPI 기초 1. FastAPI 기본 구조와 핵심 개념1-1. FastAPI는 어떤 구조인가요?FastAPI 애플리케이션은 기본적으로 다음과 같은 형태로 구성됩니다:from fastapi import FastAPIapp = FastAPI()@app.get("/")def read_root(): return {"message": "Hello, FastAPI"}여기서 FastAPI()는 애플리케이션 인스턴스를 생성하고, @app.get("/")는 HTTP GET 요청을 처리할 라우트를 정의하는 부분입니다.1-2. FastAPI의 핵심 기반 기술ASGI: Asynchronous Server Gateway Interface의 약자로, 비동기 처리를 지원하는 Python 서버 표준입니다. FastAPI는 이 구조를 기반으.. 2025. 4. 11. 이전 1 다음