Skip to main content

Utilities for MyLaps Event Results API.

Project description

speedhive-tools

CLI toolkit and Python library for the MyLaps Speedhive Event Results API.

Install

pip install speedhive-tools

For local development:

git clone https://github.com/ncrosty58/speedhive-tools.git
cd speedhive-tools
python -m venv .venv && source .venv/bin/activate
pip install -e .

Quick CLI Usage

speedhive export-full-dump --org 30476 --output ./output
speedhive refresh-org-cache --org 30476 --cache-root ./web_data/cache --mode incremental --recent-backfill-events 3
speedhive report-consistency --org 30476 --top 10
speedhive extract-driver-laps --org 30476 --driver "Firstname Lastname"
speedhive extract-track-records --org 30476

Run speedhive --help for the full command list.

Python Usage

from speedhive.wrapper import SpeedhiveClient

client = SpeedhiveClient.create(token="your-api-token")
events = client.get_events(org_id=30476, limit=5)

Offline Workflow

  1. Export a full dump:
speedhive export-full-dump --org 30476 --output ./output
  1. Run offline analysis/processing against exported NDJSON:
speedhive report-consistency --org 30476
speedhive extract-driver-laps --org 30476 --driver "Firstname Lastname"

Output Format

export-full-dump writes output/<org_id>/:

output/30476/
├── events.ndjson.gz
├── sessions.ndjson.gz
├── laps.ndjson.gz
├── announcements.ndjson.gz
├── results.ndjson.gz
└── .checkpoint.json

Project Structure

Canonical implementation lives in src/speedhive/:

src/speedhive/
├── client.py
├── wrapper.py
├── generated/      # generated API client
├── cli/            # CLI entry + auto-discovery
├── exporters/
├── analyzers/
└── processing/     # offline processors/helpers

Notes

  • Packaging is configured via pyproject.toml (PEP 621 + setuptools backend).
  • The generated API client uses attrs; no Pydantic dependency.

License

MIT © Nathan Crosty

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

speedhive_tools-0.3.0.tar.gz (81.8 kB view details)

Uploaded Source

Built Distribution

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

speedhive_tools-0.3.0-py3-none-any.whl (186.5 kB view details)

Uploaded Python 3

File details

Details for the file speedhive_tools-0.3.0.tar.gz.

File metadata

  • Download URL: speedhive_tools-0.3.0.tar.gz
  • Upload date:
  • Size: 81.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for speedhive_tools-0.3.0.tar.gz
Algorithm Hash digest
SHA256 baff7812894551ad17d7be063e85f871f2fc2d0a5578161cac18ccfab07f5ada
MD5 8284161b96ac934c7134c1265a4da318
BLAKE2b-256 8f7643e05a47765cf60f1dbd37c68abe84f73442369d4ede0a2472915d486bd1

See more details on using hashes here.

File details

Details for the file speedhive_tools-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for speedhive_tools-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d13fdcb380681ff70f5a1d68355e6c8eff0964fa427aa13afaa7856b8f2aad5b
MD5 fc3f9ec5bad23d63485be8232ffd878c
BLAKE2b-256 eb3606b4ebdb52ced11e3ac0d3bd6a2c134c975ee0f066271bfbdc0bb8db90c8

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