FastAPI로 CRUD, ORM sqlalchemy 사용, 캐쉬 예시 예제
FastAPI로 CRUD, ORM sqlalchemy 사용, 캐쉬 예시 예제 FastAPI로 CRUD 모듈 설치 pip install fastapi pip install "uvicorn[standard]" pip install requests pip install pydantic 코드 작성 from fastapi import FastAPI, HTTPException from pydantic import BaseModel from typing import Optional import requests app = FastAPI() # this is list now, but it's gonna real database like mongoDB db = [] # class must be pydantic field ..
2023.03.28