Skip to content

Home / Quickstart

Quickstart

Go from an empty environment to a queryable cricket warehouse in four steps and about five minutes. You need Python 3.11 or newer.

TL;DR: pip install cricketlogiccricketlogic download by-competition iplcricketlogic ingest ./data/ipl → query the batting_performance view.

  1. 1

    Install CricketLogic

    Install the library from PyPI into a Python 3.11+ environment.

    pip install cricketlogic
  2. 2

    Download sample data

    Fetch real ball-by-ball matches straight from cricsheet.org. Start with a single competition such as the IPL.

    cricketlogic download by-competition ipl
  3. 3

    Ingest the YAML into DuckDB

    Load the downloaded match files into a DuckDB warehouse. Duplicate matches are skipped automatically.

    cricketlogic ingest ./data/ipl --db-path ipl.duckdb
  4. 4

    Query a predefined view

    Run SQL against a ready analytical view — no aggregation code required.

    cricketlogic query "SELECT batsman, runs_scored, strike_rate
    FROM batting_performance
    WHERE match_type = 'T20'
    ORDER BY runs_scored DESC LIMIT 10" --db-path ipl.duckdb

Prefer the Python API?

from cricketlogic import CricketDB

db = CricketDB("ipl.duckdb")
db.ingest_directory("./data/ipl")

for row in db.query("SELECT * FROM match_summary LIMIT 5"):
    print(row)

db.close()

What next?

Last updated 2026-07-02 · Commands verified against the CricketLogic CLI · Source: https://github.com/cricketlogic/cricketlogic