Tournament API
How to use the API to interact with the website.
Endpoints
Python Client
Usage
Features
Authentication
Token Type
Header
Query Parameter
Error
Last updated
Was this helpful?
How to use the API to interact with the website.
Last updated
Was this helpful?
Was this helpful?
import crunch
client = crunch.api.Client.from_env()
competition = client.competitions.get("structural-break")
round_ = competition.rounds.get(1)
phase = round_.phases.submission
for crunch_ in phase.crunches:
if not crunch_.published:
continue
df = competition.leaderboards.get_default(crunch=crunch_).as_dataframe()
df.to_csv(f"{crunch_.number}.csv", index=False){
// A unique code, always in UPPER AND SNAKE_CASE
"code": "SUBMISSION_NOT_FOUND",
// A message, that often, contains more details
"message": "submission not found",
// More properties that provide additional context
"submissionNumber": 123,
"projectName": "my-model"
}