Skip to main content

dribble — Python client for the Dribble football data API

Query Opta-sourced football data (matches, xG, player/team stats, transfers and more) from Python in a few lines. Built for analysts, bettors-modelers, and developers building on dribble360.com.

Install

pip install dribble

With optional pandas support (for fetch_df):

pip install "dribble[pandas]"

Quickstart

from dribble import Client

client = Client()  # reads DRIBBLE360_API_KEY from the environment

# Premier League 2026/27 matches
matches = client.matches(season="2026/2027")

# Per-player match stats (season is required here)
pm = client.player_matches(season="2026/2027")

# ... or as a DataFrame
df = client.fetch_df("team_matches", season="2026/2027")

Auth

Generate a key at dribble360.com/api-subscribers (shown once — store it somewhere safe), then either:

export DRIBBLE360_API_KEY="drb_..."

or pass it explicitly:

client = Client(api_key="drb_...")

The client sends the key only as an Authorization: Bearer header and never logs, prints, or persists it.

Plans and limits: dribble360.com/pricing. Rate limits reset at midnight UTC; responses carry X-RateLimit-* headers (available on the client as client.last_response_headers).

Datasets

One method per dataset; extra keyword arguments are passed through as query params (season, limit, offset, ...). All fetches auto-paginate.

Method Dataset Notes
client.players() 90,582 players id, name/slug, nationality
client.teams() 8,054 teams id, name
client.matches() 41,017 matches id, date, week, status, scores, season_id
client.transfers() 179,554 transfers
client.managers() 72,299 managers
client.referees() 180,774 referees
client.player_matches(season) ~210K rows/season season required, e.g. "2025/2026"; per-player stats incl. expected_goals, expected_assists
client.team_matches(season) ~12K rows/season season required; per-team stats incl. expected_goals, side (HOME/AWAY)

xG lives on the *_matches rows (expected_goals), keyed by match_id — see examples/matchweek_xg.py for the join. Competitions are selected via season_id on match rows (no verified competition= query param exists, so filter client-side).

# one page at a time
page = client.fetch_page("matches", page=2, page_size=500, season="2026/2027")

# everything, with a cap
rows = client.fetch("transfers", max_rows=10_000)

Errors raise typed exceptions: AuthenticationError (401/403), BadRequestError (400), NotFoundError (404), RateLimitError (429), ServerError (5xx). The client retries 429/5xx with backoff automatically.

Examples

In examples/:

  1. matchweek_xg.py — latest completed Premier League matchweek with xG
  2. top_scorers_xg.py — top 10 scorers by xG for a team and season
  3. save_to_csv.py — download any dataset to CSV (python save_to_csv.py teams teams.csv)

Honest scope notes

  • Post-match data on a daily refresh — not a live feed. No live scores, no pre-kickoff lineups.
  • No odds data. There is no odds dataset and no bookmaker fields anywhere in the API.
  • Nulls: in count fields (goals, shots, fouls) null means zero where the metric is covered for that competition/season; null xG/xA means no qualifying action was recorded.
  • Licence: personal & research use is permitted on all plans; commercial use (apps, dashboards, models, published research) needs API Elite/Flite. Raw-data redistribution is never included by default — it needs a separately signed order form / data-licence addendum (Terms §6, §8). See pricing for plan details.

License

MIT — see LICENSE.

Metadata

Release files for dribble 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dribble 0.1.0
File Size Uploaded
dribble-0.1.0.tar.gz 11.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dribble 0.1.0
File Interpreter ABI Platform
dribble-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.0 kB

Release files / dribble-0.1.0.tar.gz

Download URL dribble-0.1.0.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
fbabe7395c4955ec4cb9e1425bf32f5de4dfb347216a9d278b50ab4072180b07
BLAKE2b-256 checksum
How to use checksums
e8ecee0f8a7e9a61f7dae7baebdc9b5453dffcef8221dc8fef678b3d5b779e24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release files / dribble-0.1.0-py3-none-any.whl

Download URL dribble-0.1.0-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5af62be9d79be3272f7d0672d6c8fb8046f1e9cec09db6103595f8d4b33d950e
BLAKE2b-256 checksum
How to use checksums
fa3a48ba4a039052388348a857738e6e95ace29054d1e598c791d115ca37328a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page