infi.clickhouse-orm
A Python library for working with the ClickHouse database
Decision gist · record as of 2026-08-14
Yes, if you are actively using ClickHouse and prefer a Python ORM interface over raw SQL or another client library. The low install friction and permissive license are advantages. However, dormant maintenance since 2022-11-29 is a real concern—verify that it works with your ClickHouse server version and Python release before committing to it in production.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with no runtime dependencies.
- Maintenance is dormant—last release was 2022-11-29, over 1354 days ago, though the repository remains active with a recent commit on 2024-06-03.
License · maintenance · safety
BSD (permissive) — BSD license is permissive, allowing commercial and private use with minimal restrictions.
last release 2022-11-29 (1354 days) · last repo commit 2024-06-03 · 420 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 260,404 downloads/mo, #8,396 on PyPI
Alternatives
Verify before relying
from infi.clickhouse_orm import Database, Model, DateTimeField, UInt16Field, Float32Field, Memory
class CPUStats(Model):
timestamp = DateTimeField()
cpu_id = UInt16Field()
cpu_percent = Float32Field()
engine = Memory()
db = Database('demo')
db.create_table(CPUStats)
queryset = CPUStats.objects_in(db)
print(queryset.count())- Whether the package works with current ClickHouse server versions and modern Python releases.
- Whether dormant maintenance means bug fixes or security patches are unlikely if issues arise.
- Compatibility with ClickHouse protocol changes since the last release in 2022-11-29.
What it is and what it does
infi.clickhouse_orm is a lightweight Python ORM for ClickHouse, a columnar analytics database. It provides a declarative model system where you define table schemas as Python classes with typed fields (DateTimeField, UInt16Field, Float32Field, etc.), then insert and query data through a Python API. The package handles the connection to ClickHouse, table creation, bulk inserts, and result mapping back to model instances.
You can query using a fluent query builder (filter, aggregate, count) or drop into raw SQL when needed. The example in the documentation shows defining a CPU statistics model, collecting data in a loop, and then analyzing it with both query-builder and aggregation patterns. It has no external runtime dependencies, making installation straightforward, but the project has been dormant since 2022-11-29, so compatibility with recent ClickHouse versions or Python releases is not guaranteed.
Use it for
- Define ClickHouse table schemas as Python classes and create tables programmatically without raw DDL.
- Bulk insert time-series or event data into ClickHouse from Python applications.
- Query ClickHouse tables using a Python query builder instead of writing SQL strings directly.
- Map ClickHouse query results back to typed Python model instances for easier data handling.
- Prototype or migrate analytics workloads that use ClickHouse as the backend.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are actively using ClickHouse and prefer a Python ORM interface over raw SQL or another client library.
The low install friction and permissive license are advantages. However, dormant maintenance since 2022-11-29 is a real concern—verify that it works with your ClickHouse server version and Python release before committing to it in production.
Install
infi-clickhouse-orm on PyPI
Before you install
Low install friction with no runtime dependencies. Maintenance is dormant—last release was 2022-11-29, over 1354 days ago, though the repository remains active with a recent commit on 2024-06-03.
License in practice
BSD license is permissive, allowing commercial and private use with minimal restrictions.
Quickstart
from infi.clickhouse_orm import Database, Model, DateTimeField, UInt16Field, Float32Field, Memory
class CPUStats(Model):
timestamp = DateTimeField()
cpu_id = UInt16Field()
cpu_percent = Float32Field()
engine = Memory()
db = Database('demo')
db.create_table(CPUStats)
queryset = CPUStats.objects_in(db)
print(queryset.count())
Verify before relying
- Whether the package works with current ClickHouse server versions and modern Python releases.
- Whether dormant maintenance means bug fixes or security patches are unlikely if issues arise.
- Compatibility with ClickHouse protocol changes since the last release in 2022-11-29.
Package facts
| License | BSD permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Dormant 1,354 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 260,404 / month, #8,396 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.4Topic :: DatabaseTopic :: Software Development :: Libraries :: Python Modules |
Evidence: infi.clickhouse_orm-2.1.3-py3-none-any.whl
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 orm python”
- infi.clickhouse-ormAn ORM for ClickHouse that lets you define model classes, insert…
- clickhouse-sqlalchemySQLAlchemy dialect for ClickHouse that enables ORM-style database…
- django-clickhouse-backendA Django database backend that lets you use Django ORM to query and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also django-clickhouse-backend · django-clickhouse · clickhouse-driver · aiochclient · clickhouse-sqlalchemy · clickhouse-connect · clickhouse-migrations · SQLAlchemy · chdb · sqlalchemy-solr