Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sportsdatabase-0.0.2.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

sportsdatabase-0.0.2-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

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

Hashes for sportsdatabase-0.0.2.tar.gz
Algorithm Hash digest
SHA256 506b608859cdb66f150f33812c8bc71861753f66548fe7411beb3ce851f3f15c
MD5 535e62488a25f7139274f7d53f0783b4
BLAKE2b-256 3943a3c3eeb63bafd96229eceaa416b19cc5398bced3b8d9ee4763ba3306f1ac

See more details on using hashes here.

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

Hashes for sportsdatabase-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6396fdeb3106546b0e1a2d42b115fd01371399388ec6701730d72db0619fc9ef
MD5 df48845c3d680239663e9d1ad1912d36
BLAKE2b-256 a75ef347ada70ead96418f9337455838d4599f01535e36b8cf0eb0471047c55b

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