Async-first Python client for the Nürburgring Langstrecken-Serie livetiming service
Project description
aionlslivetiming
Async-first Python client for the Nürburgring Langstrecken-Serie livetiming service.
aionlslivetiming wraps the official NLS livetiming WebSocket feed at
livetiming.azurewebsites.net and exposes a clean async Python API. It works
equally well in two modes: live (connected to a running race) and
replay (driven from a recorded JSONL log). Downstream projects (Discord
bots, dashboards, Home Assistant integrations, analytics tools) consume NLS
race data without reverse-engineering the Azure WebSocket or the cryptic
short-code JSON the server actually emits.
Installation
uv add aionlslivetiming
# or:
pip install aionlslivetiming
Requires Python 3.12+. No Home Assistant-specific dependencies; safe to install anywhere.
60-Second Quickstart
Live (5 lines)
import asyncio
from aionlslivetiming import NLSClient
async def main():
async with NLSClient(event_id="20") as client:
async for msg in client.messages():
print(msg)
asyncio.run(main())
Replay (3 lines)
from aionlslivetiming import NLSClient
async with NLSClient.from_replay("recording.jsonl") as client:
async for msg in client.messages():
print(msg)
Filter (5 lines)
async with NLSClient.from_replay("recording.jsonl") as client:
async for _ in client.messages():
pass # populate state
top3 = client.state.filter().by_position(lo=1, hi=3).cars()
for car in top3:
print(car.starting_no, car.driver)
Recording
uv run nls-record 20 /tmp/event.jsonl
Captures a live race to JSONL for offline replay.
Documentation
Full documentation: docs/quickstart.md
- Quickstart — full walkthrough (live + replay + record + filter)
- Examples — three worked examples
- API Reference — auto-generated from docstrings
- Changelog
- Contributing
- License — MIT
License
MIT — see LICENSE.
Acknowledgements
Race data is published by the Nürburgring Langstrecken-Serie. This library is a community wrapper; it is not affiliated with or endorsed by the NLS organization.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aionlslivetiming-0.1.0.tar.gz.
File metadata
- Download URL: aionlslivetiming-0.1.0.tar.gz
- Upload date:
- Size: 499.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3914c3764a294636f204bbbb9aaebd759f81efcd14ec90ff21a7a230375a018
|
|
| MD5 |
e0ca97ab7d228a68c8b3b996a2c404e9
|
|
| BLAKE2b-256 |
da523eadfbac85061be68ac2c323211c787aacf3e37f284426e65d282ad990ab
|
File details
Details for the file aionlslivetiming-0.1.0-py3-none-any.whl.
File metadata
- Download URL: aionlslivetiming-0.1.0-py3-none-any.whl
- Upload date:
- Size: 70.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
181f8af94657812f0724848a4f94acf9535f2206ea354d013815be0094824630
|
|
| MD5 |
14a0a57f1c3f4c0a01637f92814b4223
|
|
| BLAKE2b-256 |
82f1cb7cfadd20513c667e541da2fd2ec98aaaeb217532aecf120e9c5beb03e7
|