A Python framework that translates Python code into ClickHouse operations for big data computing
Project description
aaiclick
aaiclick is a data orchestration framework built to make distributed computing easy, with three principles in mind:
- Simplicity — Python-native syntax and dynamic task execution.
- Performance — Utilizes ClickHouse's powerful distributed engine. Data lives in ClickHouse as columnar tables; Python code orchestrates operations — arithmetic, filtering, aggregation, joins — that execute as ClickHouse queries.
- AI Lineage Superpower — Query your data flow. How did this value get here? Why don't we see that value there? Trace lineage across operations and debug pipelines with AI-powered agents.
Local (in-process, zero setup) and distributed (Docker Compose provided) deployments. Runs locally with embedded chdb + SQLite, or scales out with remote ClickHouse + PostgreSQL.
Early stage — looking for early adopters to join the ride and provide feedback.
Installation
The base install includes embedded chdb and SQLite — no external servers needed:
pip install aaiclick
python -m aaiclick setup
For a distributed deployment (remote ClickHouse server + PostgreSQL):
pip install "aaiclick[distributed]"
For AI features (lineage tracing, debug agents):
pip install "aaiclick[ai]"
# or all extras:
pip install "aaiclick[all]"
Orchestration
Define tasks and jobs with decorators — all data operations execute as ClickHouse queries:
from aaiclick import create_object_from_value
from aaiclick.orchestration import job, task
@task
async def load_sales():
return await create_object_from_value({
"region": ["US", "EU", "US", "EU", "US"],
"amount": [500, 300, 150, 200, 80],
})
@task
async def analyze(sales) -> dict:
# GROUP BY + SUM runs as a single ClickHouse query; return a plain dict
by_region = await sales.group_by("region").sum("amount")
return await by_region.data() # → {'region': ['US', 'EU'], 'amount': [730, 500]}
@task
async def report(summary: dict):
# receives the plain Python dict returned by analyze()
print(f"Regions: {summary['region']}") # → Regions: ['US', 'EU']
print(f"Amounts: {summary['amount']}") # → Amounts: [730, 500]
print(f"Total: {sum(summary['amount'])}") # → Total: 1230
@job("sales_pipeline")
def sales_pipeline():
sales = load_sales()
# dependencies resolved from arguments
summary = analyze(sales=sales) # returns a Python dict
return report(summary=summary) # the dict flows to report()
if __name__ == "__main__":
from aaiclick.orchestration import job_test
job_test(sales_pipeline) # runs all tasks locally for debugging
python sales_pipeline.py
Data Operation Only Mode
Use data_context() directly for interactive work without orchestration.
Decorate an async function to wrap its whole body in a context:
import asyncio
from aaiclick import create_object_from_value
from aaiclick.data.data_context import data_context
@data_context()
async def main():
prices = await create_object_from_value([10.0, 20.0, 30.0])
total = prices * 1.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())
data_context() also works as an async with block when you only need part of
a function inside the context.
Documentation
License
MIT License - see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aaiclick-0.0.18.tar.gz.
File metadata
- Download URL: aaiclick-0.0.18.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c88106095829f3d411c463236a0e8f7921deb9512bc17907aa7f44025ae30d79
|
|
| MD5 |
029674fda63c35d7326db5a3cf81a9dd
|
|
| BLAKE2b-256 |
b24d0f9ab66131ae6a429d62d8e5fbf5cf9f37cd00dd44cc3e0128a47a452624
|
Provenance
The following attestation bundles were made for aaiclick-0.0.18.tar.gz:
Publisher:
publish.yaml on kolodkin/aaiclick
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aaiclick-0.0.18.tar.gz -
Subject digest:
c88106095829f3d411c463236a0e8f7921deb9512bc17907aa7f44025ae30d79 - Sigstore transparency entry: 2079631515
- Sigstore integration time:
-
Permalink:
kolodkin/aaiclick@97ee8884beb46806f7268bf9f2235d8f2504986c -
Branch / Tag:
refs/heads/claude/scaffold-dockerfile-lii344 - Owner: https://github.com/kolodkin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@97ee8884beb46806f7268bf9f2235d8f2504986c -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file aaiclick-0.0.18-py3-none-any.whl.
File metadata
- Download URL: aaiclick-0.0.18-py3-none-any.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5900b728bf97f753879b80c0494cfee29b8bb64d5831cd7e5678a63322488d2
|
|
| MD5 |
fe86445019eac611012909b6ec8a47bc
|
|
| BLAKE2b-256 |
bfaecc09f546bc9a8e43fa08e6924d71a7d91da536e23e64d94de1e0085fb4b2
|
Provenance
The following attestation bundles were made for aaiclick-0.0.18-py3-none-any.whl:
Publisher:
publish.yaml on kolodkin/aaiclick
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aaiclick-0.0.18-py3-none-any.whl -
Subject digest:
e5900b728bf97f753879b80c0494cfee29b8bb64d5831cd7e5678a63322488d2 - Sigstore transparency entry: 2079631654
- Sigstore integration time:
-
Permalink:
kolodkin/aaiclick@97ee8884beb46806f7268bf9f2235d8f2504986c -
Branch / Tag:
refs/heads/claude/scaffold-dockerfile-lii344 - Owner: https://github.com/kolodkin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@97ee8884beb46806f7268bf9f2235d8f2504986c -
Trigger Event:
workflow_dispatch
-
Statement type: