pupu-sqlalchemy-clickhouse

ClickHouse SQLAlchemy Dialect

Showing:

Popularity

Downloads/wk

0

GitHub Stars

265

Maintenance

Last Commit

1yr ago

Contributors

21

Package

Dependencies

0

License

Apache License, Version 2.0

Categories

Readme

sqlalchemy-clickhouse

ClickHouse dialect for SQLAlchemy.

Installation

The package is installable through PIP::

pip install sqlalchemy-clickhouse

Usage

The DSN format is similar to that of regular Postgres::

>>> import sqlalchemy as sa
>>> sa.create_engine('clickhouse://username:password@hostname:port/database')
Engine('clickhouse://username:password@hostname:port/database')

For SSL add ssl parameter to URL::

>>> import sqlalchemy as sa
>>> sa.create_engine('clickhouse://username:password@hostname:port/database?ssl=True')
Engine('clickhouse://username:password@hostname:port/database')

It implements a dialect, so there's no user-facing API.

Testing

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")

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100