Getting Started¶
Installation¶
No external servers needed — embedded ClickHouse and SQLite included:
For a remote ClickHouse server and PostgreSQL:
Quick Example¶
import asyncio
from aaiclick import create_object_from_value
from aaiclick.data.data_context import data_context
async def main():
async with data_context():
prices = await create_object_from_value([10.0, 20.0, 30.0])
total = prices + prices * 0.1 # LazyOperator — no DB call yet
print(await total.data()) # [11.0, 22.0, 33.0]
print(await total.mean().data()) # 22.0
asyncio.run(main())
Always await operation results
Forgetting await causes confusing errors downstream, not at the forgotten line.
Environment Variables¶
| Variable | Default | Description |
|---|---|---|
AAICLICK_CH_URL |
chdb:///~/.aaiclick/chdb_data |
ClickHouse connection — chdb:// for embedded, clickhouse:// for remote |
AAICLICK_SQL_URL |
sqlite+aiosqlite:///~/.aaiclick/local.db |
Orchestration DB — SQLite (local) or PostgreSQL (distributed) |
AAICLICK_LOG_DIR |
~/.aaiclick/logs / /var/log/aaiclick |
Log directory override (macOS default / Linux default) |
Next Steps¶
- Object API — operators, aggregations, views, group by
- DataContext — lifecycle management, persistent objects
- Orchestration —
@taskand@jobdecorators, workers - Examples — runnable scripts for every feature