ClickHouse SQLAlchemy Dialect
Project description
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")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pupu-sqlalchemy-clickhouse-0.1.5.tar.gz
.
File metadata
- Download URL: pupu-sqlalchemy-clickhouse-0.1.5.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf770df6b9d614b45080429fef0145eb13ef7ae95c2304de6f07e9755bf6e916 |
|
MD5 | cea2e9b87714891e92e1885d2d4e0b58 |
|
BLAKE2b-256 | 4d4f3978d7284b5a22630db7772aa5a1cfde436c8c2ebd3a3e3587344ad9a156 |