You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When integrating with FastAPI, you can use `AsyncSession` as a dependency.
50
+
When integrating with FastAPI, you can use `AsyncSession` as a dependency. Note that you should explicitly handle rollbacks when performing write operations.
47
51
48
52
```python
49
-
from fastapi import FastAPI, Depends
53
+
from fastapi import FastAPI, Depends, HTTPException
50
54
from sqlmodel.ext.asyncio.session import AsyncSession
55
+
from sqlmodel import SQLModel, Field, select
56
+
from sqlalchemy.ext.asyncio import create_async_engine
0 commit comments