Python SDK for Premier Padel data APIs.
Access live scores, player rankings, tournament calendars, match statistics, news, media, and broadcaster data from the Premier Padel APIs making them easily accessible.
Table of Contents
- Installation
- Quick Start
- Services
- Pagination
- Error Handling
- Configuration
- Architecture
- Examples
- Contributing
- License
Installation
pip install pypadel
Or with uv:
uv add pypadel
Requires Python 3.10+. The only runtime dependency is httpx.
Quick Start
from pypadel import PremierPadelClient, Gender, ResultsDrawType
with PremierPadelClient() as client:
# Top-ranked male players
rankings = client.players.list(Gender.MALE)
print(rankings[0].full_name)
# Full player profile
profile = client.players.get(rankings[0].slug)
# Tournament calendar
tournaments = client.tournaments.list("March", 2026)
# Live match scores
live = client.matches.live("cancun-p2-2")
for match in live:
print(f"{match.team_1.player.name} vs {match.team_2.player.name}")
# Tournament results
results = client.tournaments.results(
"cancun-p2-2", "2026-03-22", ResultsDrawType.WOMEN
)
Services
The client exposes seven resource-oriented services. Each one has its own detailed documentation:
| Service | Access | Description | Docs |
|---|---|---|---|
| Players | client.players |
Rankings, search, profiles, moments | docs/players.md |
| Tournaments | client.tournaments |
Calendar, draws, entrants, results | docs/tournaments.md |
| Matches | client.matches |
Live scores, upcoming, match detail | docs/matches.md |
| News | client.news |
Article listing and detail | docs/news.md |
| Media | client.media |
Videos, reels, video page | docs/media.md |
| Watch | client.watch |
Broadcasters, where-to-watch info | docs/watch.md |
| Rankings | client.rankings |
Convenience alias over player rankings | docs/players.md |
Every method that accepts a tournament, player, or match identifier is flexible: pass a model instance, an
intID, or astrslug — the SDK resolves it automatically.
Pagination
Paginated endpoints return a Page[T] object:
page = client.players.list(Gender.FEMALE)
# Iterate current page
for player in page:
print(player.full_name)
# Check metadata
print(page.current_page, page.total_pages, page.has_next_page)
# Fetch next page
next_page = page.next_page()
# Lazy iteration across ALL pages
for player in page.iter_all():
print(player.full_name)
See docs/pagination.md for the full API.
Error Handling
All exceptions inherit from PremierPadelError:
PremierPadelError
├── NetworkError
│ └── TimeoutError
├── HTTPStatusError
│ └── RateLimitError
├── ApiResponseError
│ └── NotFoundError
└── ValidationError
from pypadel import (
PremierPadelClient,
NotFoundError,
RateLimitError,
NetworkError,
PremierPadelError,
)
with PremierPadelClient() as client:
try:
player = client.players.get("non-existent-slug")
except NotFoundError:
print("Player not found")
except RateLimitError:
print("Rate limited — back off and retry")
except NetworkError:
print("Could not reach the API")
except PremierPadelError:
print("Something else went wrong")
See docs/errors.md for details on each exception type.
Configuration
from pypadel import PremierPadelClient
client = PremierPadelClient(
lang="es", # Response language (default: "en")
timeout=15.0, # Request timeout in seconds (default: 10.0)
retries=3, # Retry count for 5xx / timeout (default: 2)
)
| Parameter | Type | Default | Description |
|---|---|---|---|
lang |
str |
"en" |
Language code for localized responses |
timeout |
float |
10.0 |
HTTP request timeout in seconds |
retries |
int |
2 |
Number of retries on transient failures |
base_url |
str |
Premier Padel API | Override the API base URL |
user_agent |
str |
pypadel-python/{version} |
Custom User-Agent header |
transport |
httpx.BaseTransport |
None |
Inject a custom httpx transport (useful for testing) |
Architecture
src/pypadel/
├── client.py # PremierPadelClient — public entrypoint
├── config.py # ClientConfig dataclass
├── enums.py # Gender, RankingScope, BracketDrawType, ...
├── exceptions.py # Exception hierarchy
├── pagination.py # Page[T] generic container
├── transport.py # HTTP transport, retry logic, envelope parsing
├── models/ # Frozen dataclasses for every API resource
│ ├── common.py # Competitor, Statistic, StatisticValue
│ ├── matches.py # MatchCard, MatchDetail, LiveMatchDetail, ...
│ ├── players.py # PlayerSummary, PlayerDetail, PlayerMoment
│ ├── tournaments.py # Tournament, TournamentDraw, TournamentResults, ...
│ ├── news.py # NewsArticleSummary, NewsArticle
│ ├── media.py # Video, ShortReel, VideoPage, ...
│ └── watch.py # Broadcaster, CountryBroadcasters, WatchInfo, ...
├── parsers/ # Defensive JSON → model normalization
│ ├── common.py # Shared helpers (optional_str, optional_int, ...)
│ ├── matches.py
│ ├── players.py
│ ├── tournaments.py
│ ├── news.py
│ ├── media.py
│ └── watch.py
└── services/ # Resource-oriented service layer
├── base.py # BaseService with resolver helpers
├── matches.py
├── players.py
├── tournaments.py
├── news.py
├── media.py
├── rankings.py
└── watch.py
The design follows a strict layered pattern:
- Transport — Handles HTTP, retries, rate-limit detection, and envelope parsing
- Parsers — Normalize raw JSON into typed dataclasses defensively
- Services — Orchestrate transport calls, argument resolution, and caching
- Client — Wires services together and manages the in-memory cache
Examples
See the examples/ directory for runnable scripts:
| File | Description |
|---|---|
live_scores.py |
Stream live match scores for a tournament |
player_search.py |
Search and display player profiles |
tournament_results.py |
Fetch and print tournament results |
License
MIT — see LICENSE for details.
Disclaimer
This is an unofficial, community-maintained SDK.
Metadata
Release files for pypadel 0.1.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 | |
|---|---|---|---|
| pypadel-0.1.0.tar.gz | 22.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pypadel-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 58.0 kB
Release files / pypadel-0.1.0.tar.gz
| Download URL | pypadel-0.1.0.tar.gz |
|---|---|
| Size | 22.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb693263da3f0318a3052ad0d8c2af482b720dbd45fec983e0a49d7482f77978
|
|
BLAKE2b-256 checksum How to use checksums |
8bab22c004c64de0ff7079c5e4464c90b525b3cfdab69ebe7f083b072e069ee9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / pypadel-0.1.0-py3-none-any.whl
| Download URL | pypadel-0.1.0-py3-none-any.whl |
|---|---|
| Size | 35.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9997d132789b5a43f062540192a6594d7ddc0242db069721e8e190cbb6328c87
|
|
BLAKE2b-256 checksum How to use checksums |
3128abe80d17b99812c96a11e47f75ae786d2b5a3e0ca9aebf371c5e98d9c88e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|