SQLAlchemy 2.0 dialect for dqlite.
pip install sqlalchemy-dqlitefrom sqlalchemy import create_engine, text
# Sync
engine = create_engine("dqlite://localhost:9001/mydb")
with engine.connect() as conn:
result = conn.execute(text("SELECT 1"))
print(result.fetchone())
# Async
from sqlalchemy.ext.asyncio import create_async_engine
async_engine = create_async_engine("dqlite+aio://localhost:9001/mydb")
async with async_engine.connect() as conn:
result = await conn.execute(text("SELECT 1"))
print(result.fetchone())dqlite://host:port/database
dqlite+aio://host:port/database
See DEVELOPMENT.md for setup and contribution guidelines.
MIT