statcast-bigquery
Idempotent Statcast → BigQuery ingestion, with first-class documentation for SQL/LLM agents and round-trip validation against Baseball Savant.
Install
pip install statcast-bigquery
Quickstart
gcloud auth application-default login
statcast-bigquery sync \
--start 2024-04-01 --end 2024-10-31 \
--table myproject.mydataset.statcast_pitches
Backfill
Backfill historical seasons in resumable chunks:
statcast-bigquery sync \
--start 2015-04-01 --end 2026-05-11 \
--chunk-by year --resume \
--table myproject.mydataset.statcast_pitches
--resume skips chunks already recorded as success in
<dataset>._statcast_ingest_runs. Override with --runs-table if you
want the run log in a sidecar dataset. Re-running with the same
--chunk-by is safe; switching --chunk-by year → month between
runs will re-process (chunks must match exactly to skip).
Documentation
statcast-bigquery docs --format llm > STATCAST_FOR_LLMS.md
Seed your data dictionary
If you maintain a data_dictionary table (one row per column with
business definitions, tags, lineage), you can seed it directly:
statcast-bigquery docs --format dictionary --apply \
--dataset mydataset --table myproject.mydataset.statcast_pitches \
--dictionary-table myproject.shared_ops.data_dictionary
Atomically replaces rows for (dataset, table) only; other entries in
the dictionary table are untouched. Required target schema:
dataset, table, column, dtype, description, business_definition,
owner, tags ARRAY<STRING>, source_system, upstream_lineage_json,
created_at TIMESTAMP, updated_at TIMESTAMP
Verification
statcast-bigquery verify \
--source baseball-savant \
--aggregation player-season \
--metric all --season 2024 \
--table myproject.mydataset.statcast_pitches
Standings verify
End-to-end integrity check: reconstruct each team's season standings from the pitch data and compare against MLB statsapi:
statcast-bigquery verify \
--source baseball-savant \
--aggregation team-season \
--metric all --season 2024 \
--table myproject.mydataset.statcast_pitches
Three metrics are checked per team: wins, losses, run_diff.
Default tolerances are ±1 game and ±5 runs. A passing run gives high
confidence that no games are missing from the pitch ingest.
MIT licensed. This software does not include or distribute MLB data.
Metadata
Release files for statcast-bigquery 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| statcast_bigquery-0.5.0.tar.gz | 856.3 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| statcast_bigquery-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 922.3 kB
Release files / statcast_bigquery-0.5.0.tar.gz
| Download URL | statcast_bigquery-0.5.0.tar.gz |
|---|---|
| Size | 856.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c25418fcf874dd809ecdf5092480586336b2e1378f76dc4b7140a07ff9bac626
|
|
BLAKE2b-256 checksum How to use checksums |
0fc7403373f93e04860bda90fd85fb8314dddc5bad669d69dc82b376f3b2bef0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.
Transparency logRelease files / statcast_bigquery-0.5.0-py3-none-any.whl
| Download URL | statcast_bigquery-0.5.0-py3-none-any.whl |
|---|---|
| Size | 66.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c35f8c27c22c9f88c73ce18312d23f97aa1d20f1ba5189ddcbd7295ac9446c2
|
|
BLAKE2b-256 checksum How to use checksums |
a61c28ec1be982f0335065cab9f82377ea79fa1a04a4dfb062b51f8b14e21010
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.
Transparency logSecurity for statcast-bigquery 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for statcast_bigquery-0.5.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.