Need help with sqlalchemy-clickhouse?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

269 Stars 100 Forks Apache License 2.0 53 Commits 45 Opened issues

Services available


Need anything else?

Contributors list


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://username:[email protected]:port/database')
Engine('clickhouse://username:[email protected]:port/database')

For SSL add ssl parameter to URL::

>>> import sqlalchemy as sa
>>> sa.create_engine('clickhouse://username:[email protected]:port/database?ssl=True')
Engine('clickhouse://username:[email protected]: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")

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.