Docs
Connecting

Drivers

Connect to Silos from psql, node-postgres, psycopg2, and SQLAlchemy — the standard Postgres way.

Because Silos speaks the standard PostgreSQL wire protocol, standard Postgres drivers connect to it the same way they connect to any Postgres server. There's no Silos-specific driver to install — point your existing driver at your connection string and require SSL.

All examples assume DATABASE_URL is set to your connection string, including ?sslmode=require. Keep it in an environment variable, not in source.

Connect

psql
psql "postgres://user:password@db-xxxx.silos.sh/main?sslmode=require"

psql is the official PostgreSQL command-line client. Once connected you have a full interactive SQL shell — run queries, inspect schemas with \d, and use any standard psql meta-command.

node-postgres (pg)
import { Client } from 'pg'

const client = new Client({
  connectionString: process.env.DATABASE_URL,
  ssl: { rejectUnauthorized: true },
})

await client.connect()
const { rows } = await client.query('SELECT version()')
console.log(rows[0])
await client.end()

pg (node-postgres) is the most widely used PostgreSQL driver for Node.js. A Pool works the same way if you want pooled connections.

psycopg2
import os
import psycopg2

conn = psycopg2.connect(os.environ["DATABASE_URL"])
with conn.cursor() as cur:
    cur.execute("SELECT version()")
    print(cur.fetchone())
conn.close()

psycopg2 is the standard PostgreSQL adapter for Python. The connection string already carries sslmode=require, so no extra TLS configuration is needed.

SQLAlchemy
import os
from sqlalchemy import create_engine, text

engine = create_engine(os.environ["DATABASE_URL"])

with engine.connect() as conn:
    result = conn.execute(text("SELECT version()"))
    print(result.scalar())

SQLAlchemy uses a Postgres driver (such as psycopg2) under the hood. If your URL starts with postgres://, SQLAlchemy expects the postgresql:// scheme — both point at the same database.

What to expect

These are ordinary PostgreSQL connections. Anything the driver supports against Postgres — prepared statements, transactions, COPY, LISTEN/NOTIFY, parameter binding — is part of the wire protocol Silos implements (simple and extended query, including Parse/Bind/Execute).

Silos is in active development. Standard drivers connect over the Postgres wire protocol as shown above; we haven't published per-driver conformance benchmarks. If you hit a wire-protocol edge case, tell us — see the FAQ.

Next steps

On this page