Skip to content

livetennisapi 1.0.0

Choose a tag to compare

@bensynapse bensynapse released this 18 Jul 23:39
· 21 commits to main since this release

First release of the official Python client for the Live Tennis API.

Install

pip install livetennisapi

What's in it

  • LiveTennisAPI and AsyncLiveTennisAPI — all 12 REST endpoints, sync and async from one core.
  • LiveScoreStream — reconnecting WebSocket live-score feed (ULTRA).
  • livetennis CLIhealth, live, match, score, players, fixtures, history, watch.
  • Typed errorsUpgradeRequired carries .required_tier; RateLimited carries .retry_after.
  • Full type hints and a py.typed marker.

Two design rules, both taken from the API's own contract

Models never reject unknown fields. The API ships additive changes within v1, so a strict client would break the first time a field is added. Unknown keys stay in .raw and are readable as attributes — a new server-side field works without upgrading this package.

Only 429 and 5xx are retried. A bad key or an unentitled tier cannot start working, so retrying it only burns the caller's rate limit. Retry-After is honoured, with exponential backoff and jitter.

Note on the score shape

games is player-major: [[6,3,2],[4,6,1]] reads 6-4, 3-6, 2-1. Use score.games_for_set(i) rather than indexing by hand.


Tested on Python 3.9–3.13, macOS, Linux and Windows. Published from CI via PyPI Trusted Publishing (OIDC) — no API token exists for this package.

Docs: https://docs.livetennisapi.com