Unofficial open-source football match data toolkit using public sources.
Project description
openmatchkit
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 git+https://github.com/patilprashan246/openmatchkit.git
For a pinned release:
pip install git+https://github.com/patilprashan246/openmatchkit.git@v0.2.1
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
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 openmatchkit-0.2.1.tar.gz.
File metadata
- Download URL: openmatchkit-0.2.1.tar.gz
- Upload date:
- Size: 24.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c47b889af48f3ffe07ee7a2ec9c50078aee1be8bf3f2acf536cd09e685b36f8
|
|
| MD5 |
66d6a111abf40ae9a8198dd0f3434d82
|
|
| BLAKE2b-256 |
8c019d3b6087058838e3cd57da214759e883b82db4ebd28208b8ccaf2e43fa98
|
Provenance
The following attestation bundles were made for openmatchkit-0.2.1.tar.gz:
Publisher:
publish.yml on patilprashan246/openmatchkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openmatchkit-0.2.1.tar.gz -
Subject digest:
4c47b889af48f3ffe07ee7a2ec9c50078aee1be8bf3f2acf536cd09e685b36f8 - Sigstore transparency entry: 1802274006
- Sigstore integration time:
-
Permalink:
patilprashan246/openmatchkit@0fb3c059db55257c672730ffc319f11f0066ee9a -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/patilprashan246
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0fb3c059db55257c672730ffc319f11f0066ee9a -
Trigger Event:
release
-
Statement type:
File details
Details for the file openmatchkit-0.2.1-py3-none-any.whl.
File metadata
- Download URL: openmatchkit-0.2.1-py3-none-any.whl
- Upload date:
- Size: 21.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f367693e75317794ba719aaa447e32f9ae6576d7e662bedcd3425deb21e8d494
|
|
| MD5 |
5114b4c16057d327e875e21c0239cf0a
|
|
| BLAKE2b-256 |
ddff835bbd603bf942db77ae9be2825c94bc1eca1e6f5f089db4dc6bde8ebd53
|
Provenance
The following attestation bundles were made for openmatchkit-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on patilprashan246/openmatchkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openmatchkit-0.2.1-py3-none-any.whl -
Subject digest:
f367693e75317794ba719aaa447e32f9ae6576d7e662bedcd3425deb21e8d494 - Sigstore transparency entry: 1802274034
- Sigstore integration time:
-
Permalink:
patilprashan246/openmatchkit@0fb3c059db55257c672730ffc319f11f0066ee9a -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/patilprashan246
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0fb3c059db55257c672730ffc319f11f0066ee9a -
Trigger Event:
release
-
Statement type: