Skip to main content

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"]

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-0.6.1.tar.gz (14.4 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.6.1-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: race_monitor-0.6.1.tar.gz
  • Upload date:
  • Size: 14.4 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.6.1.tar.gz
Algorithm Hash digest
SHA256 3ecd79287fc9beef3a69a2e28d2c9aee8a70052376ba09800d8499289568c2f9
MD5 c7e2cda5546e9f7a88276805334c4d70
BLAKE2b-256 87ae2d78c5c9672f433bb85fcddd1b563782986adee70405f89f587b5ad0dde3

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: race_monitor-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 20.3 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.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 33ee95fe41e4b88dffbcbd538566854e1cecd518ea6bd8b3ef0c5c39e3cf2440
MD5 59d5d0ab57e87d40b9e43ac950ea45c0
BLAKE2b-256 4e6a58c88bcf2ffbcadbaf2af18df6ee613b421e071eee9613ca42e6b9ee4112

See more details on using hashes here.

Provenance

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

Release history Release notifications | RSS feed

1.0.0

2 files

0.7.0

2 files

This release

0.6.1 This release

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