from fastapi import FastAPI,Depends,HTTPException
from sqlmodel import SQLModel,Field,Session,select
app=FastAPI()
class Post(SQLModel,table=True):
id:int|None=Field(default=None,primary_key=True)
title:str=Field(min_length=3,max_length=200)
body:str
@app.get('/posts/{post_id}')...