Skip to main content

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

Release files for pupu-sqlalchemy-clickhouse 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pupu-sqlalchemy-clickhouse 0.1.5
File Size Uploaded
pupu-sqlalchemy-clickhouse-0.1.5.tar.gz 13.2 kB Details

Release files / pupu-sqlalchemy-clickhouse-0.1.5.tar.gz

Download URL pupu-sqlalchemy-clickhouse-0.1.5.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
cf770df6b9d614b45080429fef0145eb13ef7ae95c2304de6f07e9755bf6e916
BLAKE2b-256 checksum
How to use checksums
4d4f3978d7284b5a22630db7772aa5a1cfde436c8c2ebd3a3e3587344ad9a156
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0.post20201207 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.7.9

Release history Release notifications | RSS feed

This release

0.1.5 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page