django-clickhouse
Django extension to integrate with ClickHouse database
What it is and what it does
django-clickhouse bridges Django applications and ClickHouse, a high-performance columnar database optimized for analytics and time-series workloads. It provides an ORM-like interface to define models and query ClickHouse tables, integrating with Django's ecosystem through celery for async operations and statsd for monitoring.
The package is designed for teams building analytics pipelines or real-time dashboards within Django projects. It abstracts ClickHouse's native query language and connection handling, letting developers work with familiar Django patterns. With low install friction and a permissive license, it's suitable for both open-source and commercial projects, though its dormant maintenance status means it receives no active updates.
Use it for:
- Build analytics dashboards in Django that query ClickHouse for aggregated metrics and time-series data.
- Migrate event logging or metrics collection from a traditional database to ClickHouse for better compression and query speed.
- Define ClickHouse tables as Django models and use celery tasks to batch-insert analytics events asynchronously.
- Integrate ClickHouse reporting into existing Django admin or custom views without rewriting query logic.
- Prototype analytics features in Django before committing to a dedicated analytics platform.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Integrates Django applications with ClickHouse, a columnar database, providing ORM-like access and query tools for analytics and time-series data workloads.
Yes, if you are already committed to ClickHouse and need Django integration—the low install friction, permissive license, and absence of known vulnerabilities make it a reasonable choice. However, verify that infi.clickhouse-orm is still maintained and that the package's dormant status does not hide unresolved compatibility issues with your Django version. Not recommended if you need active development or frequent updates.
Install
django-clickhouse on PyPI
pip
pip install django-clickhouseuv
uv add django-clickhousepoetry
poetry add django-clickhouseInstalling django-clickhouse
Before you install
Low install friction with a pure-Python wheel. Maintenance is dormant—last commit was 2025-02-19 but no releases in 541 days, suggesting the package is stable but not actively developed. Depends on Django, celery, infi.clickhouse-orm, pytz, statsd, and typing.
License in practice
BSD 3-clause permissive license allows commercial and private use with minimal restrictions, requiring only license and copyright notice retention.
Quickstart
pip install django-clickhouse
from django_clickhouse import ClickHouseModel
class MyAnalyticsModel(ClickHouseModel):
pass
Requires a running ClickHouse server instance and infi.clickhouse-orm to be properly configured; Django project setup is also required.
Verify before relying
- Whether the package supports modern Django versions (3.2+, 4.x, 5.x) given no Python version constraint is specified.
- Current state of infi.clickhouse-orm dependency and whether it is actively maintained.
- Whether dormant status means the package is production-ready or has unresolved issues.
Package facts
| License | BSD 3-clause "New" or "Revised" License (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — celery, Django, infi.clickhouse-orm, pytz, statsd, typing |
| Maintenance | dormant — 541 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 185,062/month — #10,017 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_clickhouse-1.2.2-py2.py3-none-any.whl
Tags
More Front-Ends packages
SQLAlchemy is a Python SQL toolkit and Object…
permissive · top 100 on PyPI
psycopg2-binarypsycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
alembicAlembic generates and manages database schema…
permissive · top 1,000 on PyPI
weaviate-clientA Python client library for connecting to and…
permissive · top 1,000 on PyPI
databricks-sql-connectorA Python client library that connects to…
permissive · top 1,000 on PyPI
psycopgPsycopg 3 is a PostgreSQL database adapter for…
copyleft · top 1,000 on PyPI
dbt-clickhouseA dbt adapter that enables data transformation…
permissive · top 5,000 on PyPI
infi.clickhouse-ormAn ORM for ClickHouse that lets you define…
permissive · top 15,000 on PyPI
clickhouse-sqlalchemySQLAlchemy dialect for ClickHouse that enables…
permissive · top 5,000 on PyPI
clickhouse-connectA Python database driver for ClickHouse that…
permissive · top 1,000 on PyPI
django-clickhouse-backendA Django database backend that lets you use…
permissive · top 15,000 on PyPI
clickhouse-migrationsApplies versioned SQL migrations to ClickHouse…
permissive · top 15,000 on PyPI
clickhouse-driverA native TCP driver for ClickHouse that…
permissive · top 5,000 on PyPI
airflow-clickhouse-pluginProvides Apache Airflow operators and hooks to…
permissive · top 15,000 on PyPI
chdbchDB is an in-process SQL OLAP engine powered…
permissive · top 5,000 on PyPI
djongoDjongo translates Django ORM queries into…
permissive · top 15,000 on PyPI