Skip to main content

race-monitor-py

A Python library for Race Monitor

Python Tests

Requirements

  • Python 3.11 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"]

Contributing

Contributions are welcome. A few areas where help is especially useful:

  • Live streamingclient.live.get_streaming_connection() returns connection credentials (socket host, WebSocket URLs, and a timing token), but the actual socket/WebSocket connection and streaming protocol handling are not implemented in this library. Testing requires an active Race Monitor relay account. If you have relay access and want to validate or extend the streaming support, please open an issue or PR.
  • Media endpoints — The /v2/Media controller (HLS video stream management) is not yet implemented. See docs/api-coverage.md for the full list of missing endpoints.

Documentation

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-1.0.0.tar.gz (16.2 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-1.0.0-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for race_monitor-1.0.0.tar.gz
Algorithm Hash digest
SHA256 758461c3e0ee968433258a36f83dec15f90862bc90091d2386a17ee088a90709
MD5 99a92f5ba87a02ec9d88582369e857ab
BLAKE2b-256 cda4b098d127e899d58a13551a2a3049ca1ffa838f47ee1d8ea7cc02b381f245

See more details on using hashes here.

Provenance

The following attestation bundles were made for race_monitor-1.0.0.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-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: race_monitor-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 22.7 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-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4718c48ac588409ace7823861735c3d82b3034596bcae15d224e822dd9b77366
MD5 387d96fb13e8687ac9e44f48d2a5256e
BLAKE2b-256 48a0bdfab611fca76775f085649f78259acd21d0f5f704d1fa03c52190660e3e

See more details on using hashes here.

Provenance

The following attestation bundles were made for race_monitor-1.0.0-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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

0.7.0

2 files

0.6.1

2 files

0.6.0

2 files

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

0.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page