$npx skillfedfor your agent

django-clickhouse-backend

Django clickHouse database backend

With conditionsPyPI Front-EndsReleased Aug 2026152.4K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — django_clickhouse_backend-2.0-py3-none-any.whl
v2.0 · released 2026-08-09 · Python <4,>=3.7 · 2 runtime deps: django, clickhouse-driver

Yes, if you need to integrate ClickHouse into a Django project and want to avoid writing raw SQL or managing a separate driver. The low install friction, active maintenance, and MIT license make it a practical choice. However, carefully evaluate the limitations: no transaction support, missing constraint enforcement, and non-standard NULL semantics in joins and aggregations. Test migrations thoroughly in a staging environment before production use, and confirm that your query patterns fit within the supported ORM subset.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Django >= 3.2 and Python >= 3.7; ClickHouse server 22.x.y.z or later is suggested.
  • No transaction support—migrations must be fully tested before production deployment.
  • Low friction install with only two runtime dependencies (django and clickhouse-driver).

License · maintenance · safety

MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

last release 2026-08-09 (5 days) · last repo commit 2026-08-09 · 198 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 152,401 downloads/mo, #10,902 on PyPI

Verify before relying

pip install django-clickhouse-backend

# In settings.py
INSTALLED_APPS = ["django_clickhouse_backend"]
DATABASES = {
    "clickhouse": {
        "ENGINE": "django_clickhouse_backend.backend",
        "HOST": "localhost",
        "NAME": "default"
    }
}

# In models.py
from django_clickhouse_backend import models
class Event(models.ClickhouseModel):
    timestamp = models.DateTime64Field()
    content = models.StringField()
  • Extent of ORM feature parity with standard Django backends (which ORM operations are fully supported vs. partially or not supported)
  • Performance characteristics and query optimization guidance for large event tables
  • Compatibility matrix details for specific ClickHouse server versions beyond the 22.x.y.z suggestion
Same gist for agents: .md · .json

What it is and what it does

Django ClickHouse Backend is a Django database backend that bridges Django's ORM to ClickHouse, a columnar analytics database. It lets you define ClickHouse tables using Django models and query them through the familiar ORM API, eliminating the need for intermediate storage or manual data synchronization. The backend uses clickhouse-driver for native TCP protocol connections and includes connection pooling.

The package supports most Django ORM operations, ClickHouse-specific features like table engines and skipping indexes, schema migrations, test database creation, and numpy/pandas result deserialization. However, it has important limitations: ClickHouse lacks transaction and constraint support, so foreign keys and unique constraints are not enforced at the database level; outer joins behave differently (missing columns become zero/empty rather than NULL); and aggregation functions return 0 or NaN instead of NULL on empty datasets. Multi-database routing is typically used to keep ClickHouse models separate from relational tables in the same Django project.

Use it for

  • Store and query high-volume event logs (network traffic, application metrics, security events) using Django models without building a separate pipeline.
  • Build analytics dashboards that read from ClickHouse while keeping transactional data in PostgreSQL or MySQL via Django's multi-database router.
  • Run time-series aggregations and sampling queries on large datasets using ClickHouse-specific clauses through Django ORM.
  • Migrate an existing Django application to use ClickHouse for analytical tables without rewriting query code or losing ORM familiarity.
  • Test ClickHouse table schemas and migrations in a Django TestCase or pytest-django environment before deploying to production.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to integrate ClickHouse into a Django project and want to avoid writing raw SQL or managing a separate driver.

The low install friction, active maintenance, and MIT license make it a practical choice. However, carefully evaluate the limitations: no transaction support, missing constraint enforcement, and non-standard NULL semantics in joins and aggregations. Test migrations thoroughly in a staging environment before production use, and confirm that your query patterns fit within the supported ORM subset.

Install

django-clickhouse-backend on PyPI

Before you install

Low friction install with only two runtime dependencies (django and clickhouse-driver). Actively maintained with a recent release and steady repository activity.

Requires Django >= 3.2 and Python >= 3.7; ClickHouse server 22.x.y.z or later is suggested. No transaction support—migrations must be fully tested before production deployment.

License in practice

MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

Quickstart

pip install django-clickhouse-backend

# In settings.py
INSTALLED_APPS = ["django_clickhouse_backend"]
DATABASES = {
    "clickhouse": {
        "ENGINE": "django_clickhouse_backend.backend",
        "HOST": "localhost",
        "NAME": "default"
    }
}

# In models.py
from django_clickhouse_backend import models
class Event(models.ClickhouseModel):
    timestamp = models.DateTime64Field()
    content = models.StringField()

Verify before relying

  • Extent of ORM feature parity with standard Django backends (which ORM operations are fully supported vs. partially or not supported)
  • Performance characteristics and query optimization guidance for large event tables
  • Compatibility matrix details for specific ClickHouse server versions beyond the 22.x.y.z suggestion

Package facts

LicenseMIT permissive
Python supportSupports the current Python release <4,>=3.7
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
djangoclickhouse-driver
MaintenanceActively maintained 5 days since the last release
Last repo commit
First released
Downloads152,401 / month, #10,902 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Framework :: DjangoFramework :: Django :: 3.2Framework :: Django :: 4Framework :: Django :: 4.0Framework :: Django :: 4.1Framework :: Django :: 4.2Framework :: Django :: 5Framework :: Django :: 5.0Framework :: Django :: 5.1Framework :: Django :: 5.2Framework :: Django :: 6Framework :: Django :: 6.0Framework :: Django :: 6.1Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Evidence: django_clickhouse_backend-2.0-py3-none-any.whl

Tags

Capabilities
django clickhouse backenddjango orm clickhouseclickhouse database adapterdjango clickhouse integrationclickhouse django driverdjango multi-database routingclickhouse table models
Topics
django-integrationcolumnar-analyticsmulti-database-routing
PyPI keywords
DjangoClickHousedatabasebackendenginedriver

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 › “django clickhouse backend”

Give your agent the search over MCP, or paste the wish link into any chat.

More Front-Ends packages

SQLAlchemy Worth it
PyPI · Front-Ends · released Aug 2026

SQLAlchemy is a Python SQL toolkit and Object Relational Mapper (ORM) that provides both a high-level ORM layer for declarative object persistence and a Core SQL construction system for direct database abstraction and query building.

permissive licensepure Python · 3.7+
422.7Mdownloads / mo
psycopg2-binary Worth it
PyPI · Software Development · released Apr 2026

psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.

copyleftcompiled wheel · 3.9+
271.6Mdownloads / mo
alembic Worth it
PyPI · Front-Ends · released Aug 2026

Alembic generates and manages database schema migrations for SQLAlchemy applications, handling version control of database structure changes with support for upgrades, downgrades, and auto-generation from model changes.

Install it if you use SQLAlchemy and need to version-control schema changes; skip it only if you manage migrations manually or use a different ORM entirely.

MITpure Python · 3.10+
215.2Mdownloads / mo
weaviate-client Worth it
PyPI · Front-Ends · released Aug 2026

A Python client library for connecting to and querying Weaviate, a vector database that enables semantic search and AI-powered data retrieval.

permissive licensepure Python · 3.10+
213.2Mdownloads / mo
databricks-sql-connector Worth it
PyPI · Front-Ends · released Jul 2026

A Python client library that connects to Databricks clusters and SQL warehouses using a Thrift-based protocol, conforming to the Python DB API 2.0 specification and supporting Arrow-based data exchange.

Install it if you need to query Databricks clusters or SQL warehouses from Python.

Apache-2.0pure Python
119.5Mdownloads / mo
psycopg Worth it
PyPI · Software Development · released May 2026

Psycopg 3 is a PostgreSQL database adapter for Python that enables applications to connect to, query, and manage PostgreSQL databases using Python code.

Install it if you need to connect Python to PostgreSQL.

LGPL-3.0-onlypure Python · 3.10+
117.0Mdownloads / mo

See also clickhouse-connect · infi.clickhouse-orm · django-clickhouse · clickhouse-pool · clickhouse-migrations · clickhouse-driver · clickhouse-sqlalchemy · django-snowflake · logtail-python · django-tasks-db