Five self-contained notebooks for learning the analysis code before connecting
an account. Open a notebook in Colab and choose Run all: the default offline
mode runs the local mathematical examples without API calls or key prompts.
Illustrative calculations are not current market observations.
| Notebook | Topic | Run in Colab |
|---|---|---|
| 01 Quickstart | Nested event data, a DataFrame, and an optional private CSV | Open |
| 02 No-vig and EV | Existing proportional and additive examples and their test cases | Open |
| 03 Line movement | Optional polling and a movement chart | Open |
| 04 Closing line value | Local grading examples and an optional account archive request | Open |
| 05 Parlay pricing | Existing independent-price math and correlation caveats | Open |
CSV identifier integrity: preserve leading zeros and long IDs, distinguish missing observations from empty text, and run an offline example with literal expected output.
UFC method-of-victory coverage: a standard-library Python client that checks FanDuel, DraftKings and Novig in one private request. Start with the synthetic demo, then use your own key to see counts and observation ages. KO/TKO and KO/TKO/DQ stay distinct.
Experimental Dify coverage tool: run a fictional example through the Dify SDK, then develop a private own-key coverage diagnostic. Local SDK tests only; Dify installation and Marketplace publication remain unverified.
Private Prefect coverage flow: a synthetic-first, one-shot UFC diagnostic with aggregate-only task results, no caching and an explicit own-key live option. Tested with the local Prefect runtime.
Private Mastra moneyline check: a two-step workflow that refuses incomplete soccer outcome sets before private analysis. Start with fictional presence metadata, then optionally make one own-key request. Tested with the local Mastra runtime.
PydanticAI sport metadata report: typed event-count observations that preserve missing and unknown data, with a validated agent tool and an explicit public MCP metadata option. No API or model calls by default.
Hamilton odds comparability dataflow: run the existing fictional comparison rules as an explicit Python dataflow. Missing outcomes, ambiguous matches, different settlement rules and stale source timestamps remain visible in the result. No account or network access is needed.
Use the Sports Data Project Brief to agree on required books and markets, model a polling workload, and export a private client scope with acceptance checks. It does not collect API keys or call the API. Requirements and workload assumptions are not proof of priced coverage or a subscription quote.
The configuration cell has three modes:
offline: the default. No network requests, account prompts, polling, or CSV export.demo: a limited anonymous sample. Environment keys are ignored. The odds demo returns at most five US moneyline events, with a shared limit of 60 requests per hour per IP. Availability varies; an empty response does not explain missing data.account: requests within your own account allowance. A hidden runtime prompt asks for your key when the first account request is made. Never paste a key into a code cell. Existing environment keys do not change the selected mode.
Use a private notebook copy before selecting account. Each reader supplies
their own account and key. Current endpoint
access, source coverage and allowances are described in the
API docs and pricing.
A free account does not promise every event, source, or market.
Additional actions have separate switches, all off by default:
RUN_EXTRA_API_CHECKS, RUN_POLLING, and SAVE_PRIVATE_CSV.
The line-movement lesson only polls after RUN_POLLING is enabled in a live mode.
The quickstart writes an optional CSV to a private temporary file outside the
repository. Its processed_at marks local flattening time; bookmaker_last_update
and market_last_update preserve source fields separately, including missing values.
These fields do not establish freshness. The request code uses the fixed HTTPS API origin, does not follow
redirects, bounds response size and time, and does not retry automatically.
Published notebooks have empty outputs and execution counts. Colab's output omission setting is enabled as an additional precaution. Other notebook hosts may handle this differently; it is not access control or a guarantee that a modified notebook cannot save output.
Keep executed account notebooks and CSVs private. Clear every output before sharing code or saving a notebook to GitHub. Do not upload API responses, keys, or private bet logs. Finish by restarting the runtime; the final cell also drops the notebook's stored key reference. Changing modes alone does not erase outputs from earlier cells.
The MIT license covers software. API access does not grant public redisplay or redistribution rights. Data use follows the applicable terms and any written agreement. These defaults do not amend existing customer contracts.
python -m pip install -r requirements.txt
jupyter labRun the offline tests after installing the dependencies:
MPLBACKEND=Agg python -m unittest -v test_notebook_privacy.pyThe tests execute every default notebook cell with network and key prompts blocked, then separately exercise explicit anonymous and account requests with mocked responses and a fake key. They do not contact ParlayAPI.
For the maintained one-request Python command and response validation, see the parlay-api SDK. The notebooks retain their existing educational analysis methods; those methods are assumptions and examples, not trading recommendations or profit forecasts.
Try the twelve-case evidence challenge: test whether a betting-data claim is supported, contradicted, or still unknown. Play in the browser or use the local scorer. Fictional records, explained answers and no account or model calls required. This educational challenge is not a commercial-model ranking or a production certification.
Read A valid schema can still describe the wrong comparison, a practical article on semantic matching, source timestamps and preserving unresolved candidates, with fictional examples and runnable code.
The odds comparability lab is a version-pinned lesson. Its synthetic cases explore comparison rules and polling budgets without API data or keys. Open the version-pinned lesson in marimo.