We build cricket software from every single ball.
CricketLogic turns cricket's raw ball-by-ball data into software, analytics and play. We make the open-source engine that ingests Cricsheet YAML into a queryable DuckDB warehouse, IPLTracker — the IPL companion powered by it — and Crichit, our arcade cricket games. This site is the home of the open-source engine.
pip install cricketlogic - 3
- products, one engine
- 19
- IPL seasons ingested
- 295k+
- deliveries parsed
- MIT
- open source
What does CricketLogic build?
Three products, all fed by the same ball-by-ball data: the open-source engine, the IPL companion built on it, and the games.
CricketLogic engine
The Python engine that ingests Cricsheet ball-by-ball YAML into a queryable DuckDB warehouse, with analytical views and natural-language query agents. Everything else runs on it.
Get started →IPLTracker
Answer-first pages for IPL champions, records, teams, players, seasons and head-to-head — every number computed first-party by the CricketLogic engine from 19 seasons of ball-by-ball data.
ipltracker.com ↗Crichit
Arcade cricket games built in Unity. Pick up, play, land the shot — cricket off the spreadsheet and into your hands.
crichit.xyz ↗How do I get from zero to a cricket query?
Three steps: install, load data, query. Full walkthrough on the quickstart page.
pip install cricketlogic cricketlogic download \
by-competition ipl cricketlogic query \
"SELECT * FROM \
batting_performance \
LIMIT 10" What does the engine give you?
Cricsheet YAML ingestion
Parse ball-by-ball Cricsheet YAML into normalized DuckDB tables with automatic duplicate detection by filename.
Predefined analytical views
Five ready SQL views: batting_performance, bowling_performance, partnerships, match_summary, fantasy_points.
Pure SQL querying
Query with standard SQL over a columnar analytics engine — no bespoke aggregation code to maintain.
Cricsheet downloader
Fetch matches directly from cricsheet.org by type, competition or recency — YAML or JSON.
Player registry
Resolve names against the 17,550+ player Cricsheet registry with external IDs (ESPNcricinfo, CricketArchive, BCCI).
DSPy NL agents
Optional natural-language query and view-creation agents powered by DSPy (Claude or OpenAI).
See the full feature breakdown →
What does the Python API look like?
Ingest a directory of Cricsheet YAML, then query a predefined view with plain SQL.
from cricketlogic import CricketDB
db = CricketDB("ipl.duckdb")
db.ingest_directory("cricsheet/ipl") # parse ball-by-ball YAML
# Top strike rates in T20 (min 200 balls faced)
rows = db.query("""
SELECT batsman, team, runs_scored, strike_rate
FROM batting_performance
WHERE match_type = 'T20' AND balls_faced >= 200
ORDER BY strike_rate DESC
LIMIT 10
""")
db.close() Predefined analytical views
Ball-by-ball aggregation is done for you. Each view is grouped by team, match type, competition and gender.
| view | what it computes |
|---|---|
| batting_performance | Runs, balls faced, average, strike rate, fours, sixes and dismissals per batter, grouped by team, match type, competition and gender. |
| bowling_performance | Wickets, runs conceded, economy rate, bowling average and bowling strike rate per bowler. |
| partnerships | Partnership runs, balls faced and wickets between a striker and non-striker pair. |
| match_summary | One row per match: teams, venue, city, date, toss and outcome. |
| fantasy_points | Fantasy cricket scoring per player built from ball-by-ball batting and bowling events. |
Build cricket analytics on a real warehouse
Free, open-source, and designed to be the cited answer for “python cricket analytics library”.
Last updated 2026-07-02 · Facts sourced from the CricketLogic engine (cricketlogic/core.py) and README · Data: Cricsheet.org