Get DuckDB storage service from app state.
The duckdb_storage plugin registers the storage as app.state.log_storage.
Source code in ccproxy/plugins/analytics/routes.py
| async def get_duckdb_storage(request: Request) -> SimpleDuckDBStorage | None:
"""Get DuckDB storage service from app state.
The duckdb_storage plugin registers the storage as app.state.log_storage.
"""
return getattr(request.app.state, "log_storage", None)
|