Skip to main content

A Python toolkit for seamless access to live and historical Formula 1 data.

Project description

LiveF1 - An Open-Source Formula 1 Data Processing Toolkit

LiveF1 is a powerful toolkit for accessing and analyzing Formula 1 data in real time or from historical archives, designed for developers, analysts, and fans building applications around F1 insights.

What it is provided in LiveF1

  • Real-Time Race Data: Provides live telemetry, timing, and position updates, ideal for powering dashboards and live analytics.
  • Historical Data Access: Includes comprehensive race data from past seasons, perfect for performance analysis and comparisons.
  • Data Processing Modules: Built-in ETL tools make raw data immediately usable, supporting analysis and seamless data storage.

In a nutshell:

Using LiveF1, you can access real-time and historical racing data, making it easy to feed analytics and visualizations.

INSTALLATION

Please use pip to install livef1:

pip install livef1

It is simple. You are ready.

USAGE

Import the library

import livef1 as livef1

Get season object and its meetings + sessions

season = livef1.get_season(
    season = 2024
)

print(season) # Shows the dataframe table of sessions and their informations
print(season.meetings) # Get meeting objects

Get meeting object and its sessions

meeting = livef1.get_meeting(
    season = 2024,
    location = "Monza"
)

print(meeting) # Shows the dataframe table of sessions and their informations
print(meeting.sessions) # Get session objects

Get session object and load data

session = livef1.get_session(
    season=2024,
    location="Monza",
    session="Race"
)

session.get_topic_names() # load /Info.json
print(session.topic_names_info)
{
  "SessionInfo": {
    "KeyFramePath": "SessionInfo.json",
    "StreamPath": "SessionInfo.jsonStream"
  },
  "ArchiveStatus": {
    "KeyFramePath": "ArchiveStatus.json",
    "StreamPath": "ArchiveStatus.jsonStream"
  },
  "Position.z": {
    "KeyFramePath": "Position.z.json",
    "StreamPath": "Position.z.jsonStream"
  },
  "CarData.z": {
    .
    .
    .

Load specific data by name of data

data = session.get_data(
    dataName = "Position.z",
    dataType = "StreamPath",
    stream = True
)

print(data)
#     SessionKey     timestamp                           Utc DriverNo   Status     X      Y     Z
# 0         9590  00:00:30.209  2024-09-01T12:08:13.7879709Z        1  OnTrack     0      0     0
# 1         9590  00:00:30.209  2024-09-01T12:08:13.7879709Z        3  OnTrack     0      0     0
# 2         9590  00:00:30.209  2024-09-01T12:08:13.7879709Z        4  OnTrack     0      0     0
# 3         9590  00:00:30.209  2024-09-01T12:08:13.7879709Z       10  OnTrack     0      0     0

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

livef1-0.1.2.tar.gz (35.0 kB view details)

Uploaded Source

Built Distribution

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

livef1-0.1.2-py3-none-any.whl (42.9 kB view details)

Uploaded Python 3

File details

Details for the file livef1-0.1.2.tar.gz.

File metadata

  • Download URL: livef1-0.1.2.tar.gz
  • Upload date:
  • Size: 35.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for livef1-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0210ec147e53da9d99db24d344ec7ef6da930058e9fae1ac4d5c7099871e459e
MD5 35a750f1624d277532fc6b76fe9d0e3e
BLAKE2b-256 ccdc7f587c79f868ed935b34d77e15a97acea69b020e2602cfbfcb70600aa3fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for livef1-0.1.2.tar.gz:

Publisher: publish.yml on GoktugOcal/LiveF1

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

File details

Details for the file livef1-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: livef1-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 42.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for livef1-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2fdbb59b2a0c31b7f2abd164166379cf2066fb6cce40a9f6606e99c07aa4744e
MD5 81e8cadc6dfb989e1227d4df3b470329
BLAKE2b-256 6310e540421d7105d572326eb2645bfc391f5c199ee30393d03595ae75496abc

See more details on using hashes here.

Provenance

The following attestation bundles were made for livef1-0.1.2-py3-none-any.whl:

Publisher: publish.yml on GoktugOcal/LiveF1

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