Skip to main content

A Python library for Race Monitor

Project description

race-monitor-py

A Python library for Race Monitor

Python Tests

Requirements

  • Python 3.10 or later
  • A Race Monitor API token — obtainable from your account at race-monitor.com

Installation

pip install race-monitor

Or with uv:

uv add race-monitor

Quick Start

Sync

from race_monitor import RaceMonitorClient

with RaceMonitorClient(api_token="YOUR_TOKEN") as client:
    race = client.race.details(race_id=12345)
    print(race["Race"]["Name"])

    if client.race.is_live(race_id=12345)["IsLive"]:
        session = client.live.get_session(race_id=12345)
        for racer_id, competitor in session["Session"]["Competitors"].items():
            print(competitor["Position"], competitor["FirstName"], competitor["LastName"])

Async

import asyncio
from race_monitor import AsyncRaceMonitorClient

async def main():
    async with AsyncRaceMonitorClient(api_token="YOUR_TOKEN") as client:
        race = await client.race.details(race_id=12345)
        print(race["Race"]["Name"])

asyncio.run(main())

API Namespaces

All endpoints are grouped into namespaces, accessible as client.<namespace>:

Namespace Description
account Races associated with your relaying account
common Reference data: app sections, race types, series
live Real-time timing data: session, competitors, lap times
race Race details and live status
results Post-race results and competitor details

Type Annotations

All methods return typed dicts from race_monitor.types, enabling IDE autocompletion and static type checking:

from race_monitor import RaceMonitorClient
from race_monitor.types import GetSessionResponse, LiveCompetitor

with RaceMonitorClient(api_token="YOUR_TOKEN") as client:
    session: GetSessionResponse = client.live.get_session(race_id=12345)
    competitor: LiveCompetitor = session["Session"]["Competitors"]["42"]

Documentation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

race_monitor-0.5.1.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

race_monitor-0.5.1-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file race_monitor-0.5.1.tar.gz.

File metadata

  • Download URL: race_monitor-0.5.1.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for race_monitor-0.5.1.tar.gz
Algorithm Hash digest
SHA256 89faa62e2eb7ae66dc635156f64ed13dbc007a8ab22350374602aab00964e74a
MD5 8bb375ae9275e99391d1bba4c05b40cf
BLAKE2b-256 fef49a8c144fa040a1f499597fccde38082c6d140df63f3e0fe69bbe5fed0002

See more details on using hashes here.

Provenance

The following attestation bundles were made for race_monitor-0.5.1.tar.gz:

Publisher: release-please.yml on WOT-Lemons/race-monitor-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file race_monitor-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: race_monitor-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 16.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for race_monitor-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c5dbf91cd0d3f3c1e0eadb571a388e3f765a5cadb2904db39ce14072f9f58863
MD5 358ac1276321811888e76edf519133fd
BLAKE2b-256 61f85e4807b75a9f67d2b13b79bec1e4e559a514c123121ad1389279093372c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for race_monitor-0.5.1-py3-none-any.whl:

Publisher: release-please.yml on WOT-Lemons/race-monitor-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page