Repository navigation
Quick Start
Alex Kaper edited this page Oct 5, 2026
·
4 revisions
This example uses the V2 Python API and invented competitors. Install the
V2 library first, save the following as example.py, then run
python example.py.
from datetime import date
from strathmark import HandicapCalculator
from strathmark.predictor import (
CompetitorRecord,
HistoricalResult,
PredictionContext,
WoodProfile,
)
field = [
CompetitorRecord(
name="Alice",
competitor_id="example-alice",
gender="F",
history=[HistoricalResult("SB", 29.4, "S01", 300, 5, date(2025, 5, 1))],
),
CompetitorRecord(
name="Bob",
competitor_id="example-bob",
gender="M",
history=[HistoricalResult("SB", 35.0, "S01", 300, 5, date(2025, 4, 20))],
),
]
results = HandicapCalculator().calculate(
field,
WoodProfile(species="S01", diameter_mm=300, quality=5),
event_code="SB",
context=PredictionContext(prediction_as_of=date(2026, 9, 30)),
)
for row in results:
print(row.name, row.predicted_time, row.mark, row.interval)-
predicted_timeis raw cutting time in seconds. -
markis the starter's count at which the competitor begins. -
intervaldescribes uncertainty in the predicted cutting time.
Results are ordered slowest to fastest. Faster expected competitors normally have larger marks and start later. The handicap guide explains why.
The cutoff is exclusive: only dated results before 30 September 2026 are used.
quality=5 is accepted for compatibility but does not change a V2 prediction.
Keep stable competitor IDs when connecting real data; names can change or collide.
For an event application with review, results and saves, use STRATHEX. For Linux V3, use the competition setup guide.
Home · Quick start · FAQ · Repository
Start here
Understand the predictions
- How handicaps work
- V2
- V3
- Accuracy Preview
- Wood and diameter
- Recency
- Uncertainty and simulation
- Fairness
- LLM integration
- Rulebooks
- Legacy prediction keys
Operate and develop