Engineered with formal verification principles, strict type validation, and native production readiness.
Define your ClickHouse tables as Pydantic models with full validation.
High-speed binary columnar data exchange via `insert_arrow()` and `query_arrow()`.
Automatic grouping of small inserts to protect server performance.
Process millions of rows with low memory footprint using lazy loading.
Automatically creates tables and syncs schema (adds missing columns).
Full support for both **Synchronous** and **Asynchronous** operations.
Designed to eliminate low-level plumbing and cognitive friction, allowing engineers to build reliable solutions in minutes.
from pydantic import BaseModel
from wclickhouse import WClickHouse
from datetime import datetime
from typing import List
# 1. Define your model
class AnalyticsEvent(BaseModel):
event_id: int
event_name: str
properties: List[str]
created_at: datetime = datetime.now()
# 2. Configure connection
db_config = {
"host": "localhost",
"port": 8124,
"username": "default",
"password": "test_pass",
"database": "default"
}
# 3. Initialize (Auto-creates table)
db = WClickHouse(AnalyticsEvent, db_config)
# 4. Bulk Insert (High performance)
events = [
AnalyticsEvent(event_id=1, event_name="login", properties=["web", "chrome"]),
AnalyticsEvent(event_id=2, event_name="purchase", properties=["mobile", "ios"])
]
db.insert_many(events)
# 5. Query
results = db.get_all()
print(f"Total events: {len(results)}")
wclickhouse is an integral component within the Wisrovi Binary Universe, engineered by William Steve Rodriguez Villamizar to unify high-throughput distributed systems, formal verification, and autonomous agent orchestration.