Install & Compatibility
Where this runs
tested against v2.1.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.650s · 24.9MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 2.5s · import 0.534s · 25MB
26MB installed
● package 26MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Database
✓ from infi.clickhouse_orm import Database
✗ from infi.clickhouse_orm import Database
Basic usage: define a model, create table, insert and query data.
from infi.clickhouse_orm import Database, Model, StringField, Int32Field
class Person(Model):
name = StringField()
age = Int32Field()
tablename = 'persons'
# Connect to ClickHouse (adjust host/port as needed)
db = Database('default', db_url='http://localhost:8123/')
db.create_table(Person)
# Insert a record
person = Person(name='Alice', age=30)
db.insert([person])
# Query
results = db.select('SELECT * FROM persons')
for row in results:
print(row.name, row.age)
Upgrade
Version history
2.1.3latest on PyPI · released Nov 29, 2022
Audit
Dependencies
clickhouse-driverrequiredUsed internally for database connection
python-dateutilrequiredDate parsing utilities
pytzrequiredTimezone support