SQLite guide¶
Install the SQLite extra:
Or with uv:
Connection¶
SQLiteConfig supports file-backed and in-memory databases.
For a pool with more than one connection, use a file path. In-memory SQLite is shared across all connections in the pool — unlike DuckDB, where each connection gets its own isolated database.
File-backed¶
from adbc_poolhouse import SQLiteConfig, create_pool
config = SQLiteConfig(database="/tmp/warehouse.db")
pool = create_pool(config)
In-memory¶
pool_size must be 1 for in-memory databases. All connections in the pool share the same in-memory database — unlike DuckDB, where each connection gets its own isolated database. A pool with pool_size > 1 and :memory: raises ValidationError.
Loading from environment variables¶
SQLiteConfig reads all fields from environment variables with the SQLITE_ prefix:
See also¶
- Configuration reference — env_prefix, pool tuning
- Pool lifecycle — close_pool, pytest fixtures