clickhouse-sqlalchemy
Simple ClickHouse SQLAlchemy Dialect
Decision gist · record as of 2026-08-14
Yes, if you are already committed to SQLAlchemy and need ClickHouse support. The dialect is actively maintained, permissively licensed, and has no dependency bloat. However, you must manually install clickhouse-driver, asynch, or requests depending on your transport choice—verify this requirement before adding it to your project.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- You must separately install clickhouse-driver, asynch, or requests depending on your chosen transport (native, async native, or HTTP respectively).
- High install friction: the package declares no runtime dependencies, but the description indicates it requires one of clickhouse-driver, asynch, or requests to function—you must install the appropriate transport layer separately.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use this package in commercial and proprietary projects with minimal restrictions, provided you include the license notice.
last release 2024-06-12 (793 days) · last repo commit 2026-04-08 · 483 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,082,006 downloads/mo, #3,306 on PyPI
Alternatives
Verify before relying
pip install clickhouse-sqlalchemy
from sqlalchemy import create_engine
from clickhouse_sqlalchemy import make_session, get_declarative_base
uri = 'clickhouse+native://localhost/default'
engine = create_engine(uri)
session = make_session(engine)- Whether clickhouse-driver, asynch, or requests are truly optional or whether at least one is required at runtime
- Current state of async support via asynch and whether it is production-ready
- Whether the package works with ClickHouse versions released after the latest release date
What it is and what it does
ClickHouse SQLAlchemy is a SQLAlchemy dialect that bridges Python's SQLAlchemy ORM to ClickHouse, an open-source columnar database. It lets you define tables, insert data, and query ClickHouse using familiar SQLAlchemy patterns—Column definitions, declarative base classes, and session queries—rather than raw SQL or ClickHouse-specific clients. The dialect supports three transport mechanisms: native TCP (recommended), async TCP via asynch, and HTTP via requests, giving you flexibility in how your application connects to ClickHouse.
The package is in Beta status and has been actively maintained, with recent commits and a modest but stable user base. It supports Python 3.7 through 3.12 and declares no runtime dependencies, though you must separately install whichever transport library your application needs. This design keeps the package lightweight but places the burden of dependency management on you.
Use it for
- Build a Python web application that stores analytics events in ClickHouse using SQLAlchemy ORM patterns instead of raw SQL.
- Query ClickHouse tables from a data science notebook using declarative table definitions and session queries.
- Integrate ClickHouse as a backend for a Python application that already uses SQLAlchemy for other databases.
- Set up async queries to ClickHouse in a high-concurrency service using the asynch transport.
- Migrate from another SQLAlchemy-supported database to ClickHouse with minimal ORM code changes.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are already committed to SQLAlchemy and need ClickHouse support.
The dialect is actively maintained, permissively licensed, and has no dependency bloat. However, you must manually install clickhouse-driver, asynch, or requests depending on your transport choice—verify this requirement before adding it to your project.
Install
clickhouse-sqlalchemy on PyPI
Before you install
High install friction: the package declares no runtime dependencies, but the description indicates it requires one of clickhouse-driver, asynch, or requests to function—you must install the appropriate transport layer separately.
You must separately install clickhouse-driver, asynch, or requests depending on your chosen transport (native, async native, or HTTP respectively).
License in practice
MIT license is permissive; you can use this package in commercial and proprietary projects with minimal restrictions, provided you include the license notice.
Quickstart
pip install clickhouse-sqlalchemy
from sqlalchemy import create_engine
from clickhouse_sqlalchemy import make_session, get_declarative_base
uri = 'clickhouse+native://localhost/default'
engine = create_engine(uri)
session = make_session(engine)
Verify before relying
- Whether clickhouse-driver, asynch, or requests are truly optional or whether at least one is required at runtime
- Current state of async support via asynch and whether it is production-ready
- Whether the package works with ClickHouse versions released after the latest release date
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4,>=3.7 |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Actively maintained 793 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,082,006 / month, #3,306 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: Information TechnologyLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: SQLTopic :: DatabaseTopic :: Scientific/Engineering :: Information AnalysisTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Application FrameworksTopic :: Software Development :: Libraries :: Python Modules |
Evidence: clickhouse-sqlalchemy-0.3.2.tar.gz
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “clickhouse sqlalchemy dialect”
- clickhouse-sqlalchemySQLAlchemy dialect for ClickHouse that enables ORM-style database…
- clickhouse-connectA Python database driver for ClickHouse that supports DataFrames,…
- sqlalchemy-pgspiderProvides a SQLAlchemy dialect that enables connections to PGSpider…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also clickhouse-connect · clickhouse-migrations · django-clickhouse · clickhouse-driver · clickhouse-pool · sqlalchemy-cockroachdb · asynch · sqlalchemy-jdbcapi · sqlalchemy-solr · sqlalchemy-spanner