
Python
파이썬 FastAPI 첫 시작
1. FastAPI 설치 FastAPI는 파이썬으로 빠르게 웹 개발을 할 수 있는 웹 프레임워크이다. pip install fastapi 2. Uvicorn 설치 웹 서버로는 Uvicorn을 사용합니다. pip install uvicorn 3. 파이썬 작성 from fastapi import FastAPI import uvicorn # FastAPI 인스턴스 생성 app = FastAPI() # 요청 시 응답을 해주는 함수들 @app.get("/") async def root(): return 'welcome!' @app.get("/hello") async def world(): return 'hello!' # 서버 실행 if __name__ == "__main__": uvicorn.run(app, ho..