Adapters#

SQLSpec ships adapter packages for each supported database or driver. Each adapter exports a typed config class and a driver implementation.

AsyncPG

Async PostgreSQL via asyncpg.

AsyncPG
Psycopg

Sync + Async PostgreSQL via psycopg.

Psycopg
PsqlPy

Async PostgreSQL via psqlpy (Rust).

PsqlPy
SQLite

Sync SQLite via stdlib sqlite3.

SQLite
aiosqlite

Async SQLite via aiosqlite.

aiosqlite
DuckDB

Sync DuckDB with Arrow support.

DuckDB
Oracle

Sync + Async Oracle via oracledb.

OracleDB
mysql-connector-python

Sync + Async MySQL via mysql-connector-python.

mysql-connector-python
PyMySQL

Sync MySQL via PyMySQL.

PyMySQL
asyncmy

Async MySQL via asyncmy.

asyncmy
aiomysql

Async MySQL via aiomysql.

aiomysql
BigQuery

Google BigQuery.

BigQuery
Spanner

Google Cloud Spanner.

Spanner
CockroachDB + AsyncPG

Async CockroachDB via asyncpg.

CockroachDB + AsyncPG
CockroachDB + Psycopg

Sync + Async CockroachDB via psycopg.

CockroachDB + Psycopg
ADBC

Arrow Database Connectivity.

ADBC
arrow-odbc

Sync Arrow-over-ODBC for any ODBC-compliant database.

arrow-odbc
mssql-python

Sync SQL Server via Microsoft's official mssql-python driver with Arrow loading and BulkCopy.

mssql-python
pymssql

Sync SQL Server via pymssql / FreeTDS.

pymssql
Db2

Sync + Async IBM Db2 LUW via ibm_db with a built-in SQLGlot dialect.

Db2

Feature Comparison#

Read config.supports_reliable_rowcount from the configuration used to create the session when deciding whether to verify a modifying statement with a follow-up query. The flag describes affected-row reporting for individual DML statements; SELECT, scripts, and batch operations retain their adapter-specific count semantics.

Type coercion capabilities describe the default adapter parameter and result paths. Custom statement coercions, driver feature overrides, and database column types can change these behaviors. Timestamp precision describes the adapter binding path; a lower-precision database column can still truncate the value. native binding means the parameter pipeline preserves the Python value for the driver.

Adapter

Sync

Async

Connection Pool

Arrow Support

Native Pipelines

Reliable rowcount

Datetime Binding

Timestamp Precision

JSON Decoded

UUID Binding

asyncpg

Yes

Yes

Yes

Yes

Yes

Native

Microsecond

Yes

Native

psycopg

Yes

Yes

Yes

Yes

Yes

Yes

Native

Microsecond

Yes

Native

psqlpy

Yes

Yes

Yes

Yes

Native

Microsecond

Yes

Native

sqlite

Yes

Yes

Yes

ISO Text

Microsecond

Text

aiosqlite

Yes

Yes

Yes

ISO Text

Microsecond

Text

duckdb

Yes

Yes

Yes

Yes

ISO Text

Microsecond

Text

oracledb

Yes

Yes

Yes

Yes

Yes

Native

Microsecond

Yes

Native

mysql-connector

Yes

Yes

Yes

Yes

Native

Microsecond

Text

pymysql

Yes

Yes

Yes

Native

Microsecond

Text

asyncmy

Yes

Yes

Yes

Native

Microsecond

Text

aiomysql

Yes

Yes

Yes

Native

Microsecond

Text

bigquery

Yes

Yes

Yes

Native

Microsecond

Yes

Text

spanner

Yes

Yes

Yes

Native

Microsecond

Yes

Text

cockroach (asyncpg)

Yes

Yes

Yes

Yes

Yes

Native

Microsecond

Yes

Native

cockroach (psycopg)

Yes

Yes

Yes

Yes

Yes

Yes

Native

Microsecond

Yes

Native

adbc

Yes

Yes

No

Native

Microsecond

Native

arrow_odbc

Yes

Yes

No

ISO Text

Microsecond

Text

mssql_python

Yes

Yes

Yes

Yes

Native

Microsecond

Native

pymssql

Yes

Yes

Yes

Native

Microsecond

Text

db2

Yes

Yes

Yes

Yes

Native

Microsecond

Text