Creates async SQLAlchemy engine with per-connection PRAGMA handling.
# Source: https://github.com/EverMind-AI/EverOS | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works # Provided via justclaw.it.com; keep this notice with the code. """Async SQLAlchemy engine factory + per-connection PRAGMA listener. The engine connects through ``aiosqlite`` (SA URL ``sqlite+aiosqlite://``). PRAGMAs are *per-connection* — they must be re-applied every time the SA pool opens a new connection. We attach a ``connect`` event listener on the engine's underlying sync engine for that purpose. """ from __future__ import annotations from pathlib import Path from sqlalchemy import event from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine from everos.config import SqliteSettings from everos.core.observability.logging impor ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key