Skip to main content

Unofficial open-source football match data toolkit using public sources.

Project description

openmatchkit

CI PyPI Release Python License: MIT

Unofficial open-source football match data toolkit for fixtures, results, best-effort live score adapters, standings, exports, and simple prediction models.

This project is unofficial and not affiliated with FIFA, any league, club, broadcaster, federation, or data provider. It does not provide official FIFA data.

Why openmatchkit?

openmatchkit gives Python developers a clean, source-attributed way to work with public football match facts without paid API keys. It starts with open/public datasets, keeps scraping optional and conservative, and returns structured JSON-ready models.

Install

pip install openmatchkit

From GitHub:

pip install git+https://github.com/patilprashan246/openmatchkit.git@v0.2.2

For local development:

python -m venv .venv
.venv\Scripts\activate
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
pytest

Quick Start

from openmatchkit import MatchClient

client = MatchClient()
next_match = client.next_match(competition="worldcup", season="2026")

print(next_match.model_dump(mode="json"))
openmatch next-match --competition worldcup --season 2026

Python API

from openmatchkit import MatchClient

client = MatchClient()

fixtures = client.fixtures(competition="worldcup", season="2026")
results = client.results(competition="worldcup", season="2026")
live = client.live_scores()
next_match = client.next_match(competition="worldcup", season="2026")
prediction = client.predict(home="Mexico", away="South Africa", history=results)

client.export_json(fixtures, "fixtures.json")
client.export_csv(fixtures, "fixtures.csv")

League datasets from OpenFootball can be fetched with codes such as:

matches = client.fixtures(competition="en.1", season="2015-16")

CLI

openmatch fixtures --competition worldcup --season 2026
openmatch results --competition en.1 --season 2015-16 --format csv --output results.csv
openmatch next-match --competition worldcup --season 2026
openmatch standings --competition worldcup --season 2026
openmatch predict --home Mexico --away "South Africa" --competition worldcup --season 2026

Detailed JSON feeds can expose richer scoreboards and player history:

openmatch scoreboards --data-file tests/fixtures/sample_detailed_source.json
openmatch scoreboard --match-id detail-1 --data-file tests/fixtures/sample_detailed_source.json
openmatch live-scoreboards --data-file tests/fixtures/sample_detailed_source.json
openmatch player-history --player "Alex Demo" --data-file tests/fixtures/sample_detailed_source.json
from openmatchkit import MatchClient
from openmatchkit.sources.json_file import JsonFileSource

client = MatchClient(sources=[JsonFileSource("tests/fixtures/sample_detailed_source.json")])
scoreboard = client.scoreboard(match_id="detail-1")
history = client.player_history("Alex Demo")
print(scoreboard.model_dump(mode="json"))
print(history.model_dump(mode="json"))

Example Output

{
  "competition": "World Cup 2026",
  "home": {"name": "Canada"},
  "away": {"name": "Bosnia & Herzegovina"},
  "status": "scheduled",
  "source": "openfootball"
}

Features

  • Unified match, scoreboard, player history, standings, and prediction models
  • OpenFootball JSON adapter
  • Football-Data.co.uk CSV adapter
  • Local detailed JSON adapter for authorized/public detailed feeds
  • Generic optional public HTML adapter
  • Safe HTTP client with robots.txt checks, caching, user agent, and per-origin delay
  • Fixtures, results, next match, live score adapter interface, team info, standings
  • Detailed scoreboards: clock, events, lineups, team stats, and player match stats when provided
  • Player histories aggregated from player-level source data
  • Simple Poisson prediction baseline and small Elo rating helper
  • JSON and CSV export helpers
  • Offline tests using local fixtures

Current Status

  • Stable enough for demos, research, education, and early open-source feedback
  • Not official live FIFA data
  • True live/player-level data requires a lawful source adapter that provides those facts
  • Public roadmap: ROADMAP.md
  • Release notes: CHANGELOG.md

Source and legal policy

The package code is MIT licensed. Third-party data sources have their own licenses and terms. Optional scraping adapters must respect Terms of Service, robots.txt, caching, and rate limits. Player-level data should only come from public or authorized sources and should contain public sporting facts, not private or sensitive information.

See DATA_SOURCES.md, PRIVACY.md, and CONTRIBUTING.md.

Development

python -m pip install -e ".[dev]"
ruff check .
ruff format .
pytest
python -m build

The prediction output is an educational baseline only. It is not betting, financial, or professional advice.

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

openmatchkit-0.2.2.tar.gz (24.8 kB view details)

Uploaded Source

Built Distribution

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

openmatchkit-0.2.2-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file openmatchkit-0.2.2.tar.gz.

File metadata

  • Download URL: openmatchkit-0.2.2.tar.gz
  • Upload date:
  • Size: 24.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openmatchkit-0.2.2.tar.gz
Algorithm Hash digest
SHA256 b2dbec501e49eed93b11c55efcf269fc1b63088a4067558c9ffdfe1b2dd92210
MD5 033bb1b7b06fd9c3931017b836b80464
BLAKE2b-256 0a1c46cb005741a5fd1b369b667ec2767f841124aa7a6068369f590b05f96b1d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openmatchkit-0.2.2.tar.gz:

Publisher: publish.yml on patilprashan246/openmatchkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openmatchkit-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: openmatchkit-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 22.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openmatchkit-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0f0e5863fee7fa536f2fb04cf66ccd48b8b70ff65271b6c26c3ede9702913238
MD5 cc58abd8a7ff39eaf502658c9001873a
BLAKE2b-256 78e6192305b670e730e2c6f5afbde60883ba0ae5cc561c7e44dfff224f5af61d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openmatchkit-0.2.2-py3-none-any.whl:

Publisher: publish.yml on patilprashan246/openmatchkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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