Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pupu-sqlalchemy-clickhouse-0.1.5.tar.gz (13.2 kB view details)

Uploaded Source

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

Hashes for pupu-sqlalchemy-clickhouse-0.1.5.tar.gz
Algorithm Hash digest
SHA256 cf770df6b9d614b45080429fef0145eb13ef7ae95c2304de6f07e9755bf6e916
MD5 cea2e9b87714891e92e1885d2d4e0b58
BLAKE2b-256 4d4f3978d7284b5a22630db7772aa5a1cfde436c8c2ebd3a3e3587344ad9a156

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page