Official Python SDK for SportsDatabase.io
Project description
SportsDatabase Python SDK
Official Python client for SportsDatabase.io. Mirrors the TypeScript SDK design with typed endpoints for leagues, teams, events, schedules, and scores.
Installation
pip install sportsdatabase
Quick Start
from sportsdatabase import SportsDatabaseClient
client = SportsDatabaseClient(
api_key="YOUR_API_KEY",
base_url="https://api.sportsdatabase.io/v1"
)
games = client.events.get_by_date(sport="soccer", date="2025-05-01")
for event in games["data"]:
print(event["homeTeamId"], "vs", event["awayTeamId"])
Structure
python-sdk/
├── sportsdatabase/
│ ├── client.py
│ ├── config.py
│ ├── errors.py
│ ├── http.py
│ ├── endpoints/
│ │ ├── events.py
│ │ ├── leagues.py
│ │ ├── teams.py
│ │ ├── schedules.py
│ │ └── scores.py
│ ├── types.py
│ └── errors.py
├── examples/
│ ├── get_today_events.py
│ └── smoke_test.py
└── pyproject.toml
Endpoints
| Endpoint | Methods |
|---|---|
client.leagues |
list, get_by_id |
client.teams |
list, get_by_id |
client.events |
list, get_by_id, get_by_date |
client.schedules |
team_next, team_previous, league_season |
client.scores |
get_by_event |
All responses include data and meta with rate-limit headers. Error types mirror the TS SDK (ApiError, RateLimitError, NetworkError).
Development
pip install -e .[dev]
hatch run lint
hatch run typecheck
hatch run test
Refer to ../docs/release-checklist.md for the full publish flow (build wheels via python -m build, upload with Twine).
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 sportsdatabase-0.0.2.tar.gz.
File metadata
- Download URL: sportsdatabase-0.0.2.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
506b608859cdb66f150f33812c8bc71861753f66548fe7411beb3ce851f3f15c
|
|
| MD5 |
535e62488a25f7139274f7d53f0783b4
|
|
| BLAKE2b-256 |
3943a3c3eeb63bafd96229eceaa416b19cc5398bced3b8d9ee4763ba3306f1ac
|
File details
Details for the file sportsdatabase-0.0.2-py3-none-any.whl.
File metadata
- Download URL: sportsdatabase-0.0.2-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6396fdeb3106546b0e1a2d42b115fd01371399388ec6701730d72db0619fc9ef
|
|
| MD5 |
df48845c3d680239663e9d1ad1912d36
|
|
| BLAKE2b-256 |
a75ef347ada70ead96418f9337455838d4599f01535e36b8cf0eb0471047c55b
|