LapViz for Python
The official Python client of the LapViz API: lap timing sessions, telemetry, file imports, the change feed of a library, webhooks and circuits. Standard library only, Python 3.10+, MIT licensed.
pip install lapviz
Quickstart
Create a personal API key in Account › API keys and put it in
the LAPVIZ_API_KEY environment variable (never in your code).
from lapviz import LapViz
lapviz = LapViz() # reads LAPVIZ_API_KEY; or LapViz(api_key="lvz_...")
print(lapviz.me()["username"])
for session in lapviz.sessions.iterate(mine=True):
print(session["shareId"], session["start"], session["best"])
Responses are the JSON of the API, as dicts with the camelCase names of the reference: new fields appear without a new version of this package.
Telemetry
session = lapviz.sessions.get("7e2b5e")
speed = lapviz.sessions.channel("7e2b5e", lap=3, channel="GPS Speed") # [{"s": seconds, "d": value}, ...]
everything = lapviz.sessions.telemetry("7e2b5e", lap=3) # laps and every channel
lapviz.sessions.export("7e2b5e", "csv", "session.csv")
lapviz.sessions.download("7e2b5e", "session.lvz") # LapViz format, every sample
Reading public sessions (like the demo sessions of the guides) works without a key; exports need one.
Import a file
job = lapviz.imports.upload("run.xrk") # AiM, Alfano, Unipro, RaceBox, RaceChrono, MyChron...
status = lapviz.imports.wait(job["jobId"]) # polls until Success or Failed
print(status["state"], status.get("shareIds"))
Keep a copy of a library
changed, deleted, cursor = lapviz.sessions.sync(saved_cursor) # None the first time: the whole library
save(cursor)
Webhooks
hook = lapviz.webhooks.create("https://example.com/lapviz", events=["session.created"])
secret = hook["secret"] # shown once: store it
In your receiver, check the signature on the raw body before parsing it:
from lapviz import verify_signature, SIGNATURE_HEADER
if not verify_signature(secret, request.headers.get(SIGNATURE_HEADER), request.get_data()):
abort(400)
Errors and limits
Errors raise LapVizError (with status, title, detail and the problem details), or one of its subclasses
AuthenticationError (401), PermissionDeniedError (403), NotFoundError (404) and RateLimitError (429, with
retry_after). The client waits and retries twice on 429 and 503; lapviz.rate_limit holds the RateLimit headers of
the last response.
Anything else
Every operation of the reference is one call away:
lapviz.request("PUT", f"api/teams/{key}/share", json_body={"share": True})
OAuth applications pass LapViz(access_token="lvzat_...") instead of a key. Guides:
lapviz.com/developers/docs.
Metadata
Release files for lapviz 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| lapviz-1.0.0.tar.gz | 12.8 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lapviz-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.6 kB
Release files / lapviz-1.0.0.tar.gz
| Download URL | lapviz-1.0.0.tar.gz |
|---|---|
| Size | 12.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3683e57dad0b65854329e48a726afd638c01f48d03649c95ed14da6eab5083cd
|
|
BLAKE2b-256 checksum How to use checksums |
73371a788a9e9ad57a906056cd74cdf0885d9f6b6958f540443788595c7226e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.
Transparency logRelease files / lapviz-1.0.0-py3-none-any.whl
| Download URL | lapviz-1.0.0-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ff16784fdd6bec9759d1363ec39902e95426e394d6b160c364be04cc81e58944
|
|
BLAKE2b-256 checksum How to use checksums |
2a3497938cca509a1bc86e889de186c61599a5d22572ef458ad690b32525e2d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.
Transparency logSecurity for lapviz 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for lapviz-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.