Skip to main content
Airhouse speaks the Postgres wire protocol, so you use the Postgres driver you already know. There’s no Airhouse-specific client library to install. Every example below connects to the database demo as user alice on localhost:5445. Replace these with your own connection parameters from Connect with psql.
Airhouse fully supports the simple query protocol. Its support for the extended query protocol (prepared statements with bound parameters) covers common use, but complex prepared-statement flows can fail. The per-driver tips below keep you on the well-supported path.
Use psycopg2 (or psycopg2-binary) and enable autocommit:
conn.set_session(autocommit=True) stops psycopg2 from wrapping every statement in an implicit transaction. Without it, a connection can appear to hang.

Connection strings

Most tools accept a Postgres URL:
Add ?sslmode=require when the server has TLS enabled. URL-encode special characters in the password.

Next steps