Skip to main content

Python SDK for endurance racing data — WEC, ELMS, ALMS, Le Mans Cup, IMSA

Project description

openwec

Python SDK for endurance racing data — WEC, ELMS, ALMS, Le Mans Cup, IMSA.

Inspired by FastF1, OpenWEC gives you lap-by-lap timing data, stint analytics, and race results from endurance racing as pandas DataFrames — in one line.

openwec.com — Live dashboard
api.openwec.com/docs — API reference
github.com/palomacdev/openwec — Source


Installation

pip install openwec

# With plotting support
pip install openwec[plotting]

Quick start

import openwec

# Configure — public endpoints work without a key
# Request a free key at https://openwec.com/api-keys
openwec.configure(
    base_url="https://api.openwec.com/api/v1",
    api_key="your-key-here"  # required for laps and analytics
)

# Load any session
session = openwec.Session("WEC", 2026, "Le Mans", "Race")
print(session)
# Session(WEC 2026 LE MANS — Race, id=6556)

# Results as a DataFrame (no key needed)
results = session.results()
print(results[["position", "car_number", "car_class", "team", "drivers"]].head(10))

# Lap-by-lap data (key required)
laps = session.laps(car="7")
print(laps[["lap_number", "lap_time_s", "s1_s", "s2_s", "s3_s"]].head())

# Stints and pace (key required)
stints = session.stints(car_class="HYPERCAR")
pace   = session.pace(car_class="HYPERCAR")

# Pit window estimate
pit_window = session.pit_window(car="7")

# Plots (requires matplotlib)
session.plot_lap_evolution(car="7")
session.plot_stint_chart(car_class="HYPERCAR")
session.plot_gap_to_leader(car_class="HYPERCAR")

Coverage

Series Seasons
FIA WEC 2012–2026
ELMS 2012–2026
ALMS (Asian) 2022–2026
Le Mans Cup 2017–2026
IMSA 2014–2026

1.77M+ laps across all series.


API key

Public endpoints (results, driver profiles, team profiles) require no key.
Lap-by-lap data and analytics endpoints require a free API key.

Request a key at openwec.com/api-keys


Session methods

Method Returns Key required
.results() DataFrame No
.laps(car=None) DataFrame Yes
.stints(car_class=None) DataFrame Yes
.pace(car_class=None) DataFrame Yes
.gaps(car_class=None) DataFrame Yes
.pit_window(car=None) DataFrame Yes
.plot_lap_evolution(car) Figure Yes
.plot_stint_chart() Figure Yes
.plot_gap_to_leader() Figure Yes

License

MIT — data sourced from Al Kamel Systems public timing exports.
Not affiliated with ACO, FIA, or any racing organization.

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

openwec-0.1.0.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

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

openwec-0.1.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file openwec-0.1.0.tar.gz.

File metadata

  • Download URL: openwec-0.1.0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for openwec-0.1.0.tar.gz
Algorithm Hash digest
SHA256 064bdda9c2df1504704e3fa74e9dd9e3af398840f93cc1b110a7aae34f096d0f
MD5 f8bfa71797d14947e947f10ac155b6fb
BLAKE2b-256 ee3ae66a7a31612104c96beb8d1d5ee9de251b48b1aa6b891f3363aab16ef4fd

See more details on using hashes here.

File details

Details for the file openwec-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: openwec-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for openwec-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b73a5a1f2038c0b614dcfb07ca9ffccd0ba9923cfe59c0f70008d3e0c7b1f49a
MD5 0bbb8387f9a9b6da42b62e42fd7b6c0f
BLAKE2b-256 066852856827b71a3db4bf5cb0010a6d2ed2ba4913b92380ff9e39843252e2e4

See more details on using hashes here.

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