v0.3.2 - Async Storage Engine Support
🚀 What's New
Async Storage Engine Support
Added support for async SQLAlchemy engines, enabling FastAPI Radar to work seamlessly with async database connections.
✨ Features
- Async Engine Support: FastAPI Radar now supports both synchronous and asynchronous SQLAlchemy engines for the
storage_engineparameter - Automatic Detection: Automatically detects whether an async or sync engine is provided and handles database operations accordingly
- Event Loop Handling: Properly handles active event loops in
create_tables()anddrop_tables()methods
🐛 Bug Fixes
- Fixed mypy type errors related to async engine session handling
- Resolved flake8 linting issues
- Improved async/sync context detection for database operations
🔧 Technical Improvements
- Enhanced type safety with proper
AsyncEngineandEnginetype handling - Better error handling for async database contexts
- Updated dashboard with latest build
📦 Installation
pip install fastapi-radar==0.3.2💡 Usage Example
from fastapi import FastAPI
from fastapi_radar import Radar
from sqlalchemy.ext.asyncio import create_async_engine
# Now works with async engines!
async_engine = create_async_engine("sqlite+aiosqlite:///radar.db")
app = FastAPI()
radar = Radar(
app=app,
storage_engine=async_engine # Async engine support!
)Full Changelog: v0.3.1...v0.3.2