ClickHouse dialect for SQLAlchemy.
The package is installable through PIP:
pip install sqlalchemy-clickhouse
The DSN format is similar to that of regular Postgres:
>>> import sqlalchemy as sa >>> sa.create_engine('clickhouse:https://username:password@hostname:port/database') Engine('clickhouse:https://username:password@hostname:port/database')
It implements a dialect, so there's no user-facing API.
The dialect can be registered on runtime if you don't want to install it as:
from sqlalchemy.dialects import registry registry.register("clickhouse", "base", "dialect")