openmatchkit 0.2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,192 @@
1
+ Metadata-Version: 2.4
2
+ Name: openmatchkit
3
+ Version: 0.2.1
4
+ Summary: Unofficial open-source football match data toolkit using public sources.
5
+ Project-URL: Homepage, https://github.com/patilprashan246/openmatchkit
6
+ Project-URL: Repository, https://github.com/patilprashan246/openmatchkit
7
+ Project-URL: Issues, https://github.com/patilprashan246/openmatchkit/issues
8
+ Author: Prashant Patil
9
+ License: MIT License
10
+ Keywords: cli,fixtures,football,open-data,prediction,scores,soccer,world-cup
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Education
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Requires-Python: >=3.10
24
+ Requires-Dist: beautifulsoup4>=4.12
25
+ Requires-Dist: httpx>=0.27
26
+ Requires-Dist: lxml>=5.0
27
+ Requires-Dist: pydantic>=2.7
28
+ Requires-Dist: typer>=0.12
29
+ Provides-Extra: dev
30
+ Requires-Dist: build>=1.2; extra == 'dev'
31
+ Requires-Dist: pytest>=8.0; extra == 'dev'
32
+ Requires-Dist: ruff>=0.5; extra == 'dev'
33
+ Requires-Dist: twine>=5.1; extra == 'dev'
34
+ Description-Content-Type: text/markdown
35
+
36
+ # openmatchkit
37
+
38
+ [![CI](https://github.com/patilprashan246/openmatchkit/actions/workflows/ci.yml/badge.svg)](https://github.com/patilprashan246/openmatchkit/actions/workflows/ci.yml)
39
+ [![Release](https://img.shields.io/github/v/release/patilprashan246/openmatchkit)](https://github.com/patilprashan246/openmatchkit/releases)
40
+ [![Python](https://img.shields.io/badge/python-3.10%2B-blue)](pyproject.toml)
41
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
42
+
43
+ Unofficial open-source football match data toolkit for fixtures, results, best-effort live score adapters, standings, exports, and simple prediction models.
44
+
45
+ > This project is unofficial and not affiliated with FIFA, any league, club, broadcaster, federation, or data provider. It does not provide official FIFA data.
46
+
47
+ ## Why openmatchkit?
48
+
49
+ 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.
50
+
51
+ ## Install
52
+
53
+ ```bash
54
+ pip install git+https://github.com/patilprashan246/openmatchkit.git
55
+ ```
56
+
57
+ For a pinned release:
58
+
59
+ ```bash
60
+ pip install git+https://github.com/patilprashan246/openmatchkit.git@v0.2.1
61
+ ```
62
+
63
+ For local development:
64
+
65
+ ```bash
66
+ python -m venv .venv
67
+ .venv\Scripts\activate
68
+ python -m pip install --upgrade pip
69
+ python -m pip install -e ".[dev]"
70
+ pytest
71
+ ```
72
+
73
+ ## Quick Start
74
+
75
+ ```python
76
+ from openmatchkit import MatchClient
77
+
78
+ client = MatchClient()
79
+ next_match = client.next_match(competition="worldcup", season="2026")
80
+
81
+ print(next_match.model_dump(mode="json"))
82
+ ```
83
+
84
+ ```bash
85
+ openmatch next-match --competition worldcup --season 2026
86
+ ```
87
+
88
+ ## Python API
89
+
90
+ ```python
91
+ from openmatchkit import MatchClient
92
+
93
+ client = MatchClient()
94
+
95
+ fixtures = client.fixtures(competition="worldcup", season="2026")
96
+ results = client.results(competition="worldcup", season="2026")
97
+ live = client.live_scores()
98
+ next_match = client.next_match(competition="worldcup", season="2026")
99
+ prediction = client.predict(home="Mexico", away="South Africa", history=results)
100
+
101
+ client.export_json(fixtures, "fixtures.json")
102
+ client.export_csv(fixtures, "fixtures.csv")
103
+ ```
104
+
105
+ League datasets from OpenFootball can be fetched with codes such as:
106
+
107
+ ```python
108
+ matches = client.fixtures(competition="en.1", season="2015-16")
109
+ ```
110
+
111
+ ## CLI
112
+
113
+ ```bash
114
+ openmatch fixtures --competition worldcup --season 2026
115
+ openmatch results --competition en.1 --season 2015-16 --format csv --output results.csv
116
+ openmatch next-match --competition worldcup --season 2026
117
+ openmatch standings --competition worldcup --season 2026
118
+ openmatch predict --home Mexico --away "South Africa" --competition worldcup --season 2026
119
+ ```
120
+
121
+ Detailed JSON feeds can expose richer scoreboards and player history:
122
+
123
+ ```bash
124
+ openmatch scoreboards --data-file tests/fixtures/sample_detailed_source.json
125
+ openmatch scoreboard --match-id detail-1 --data-file tests/fixtures/sample_detailed_source.json
126
+ openmatch live-scoreboards --data-file tests/fixtures/sample_detailed_source.json
127
+ openmatch player-history --player "Alex Demo" --data-file tests/fixtures/sample_detailed_source.json
128
+ ```
129
+
130
+ ```python
131
+ from openmatchkit import MatchClient
132
+ from openmatchkit.sources.json_file import JsonFileSource
133
+
134
+ client = MatchClient(sources=[JsonFileSource("tests/fixtures/sample_detailed_source.json")])
135
+ scoreboard = client.scoreboard(match_id="detail-1")
136
+ history = client.player_history("Alex Demo")
137
+ print(scoreboard.model_dump(mode="json"))
138
+ print(history.model_dump(mode="json"))
139
+ ```
140
+
141
+ ## Example Output
142
+
143
+ ```json
144
+ {
145
+ "competition": "World Cup 2026",
146
+ "home": {"name": "Canada"},
147
+ "away": {"name": "Bosnia & Herzegovina"},
148
+ "status": "scheduled",
149
+ "source": "openfootball"
150
+ }
151
+ ```
152
+
153
+ ## Features
154
+
155
+ - Unified match, scoreboard, player history, standings, and prediction models
156
+ - OpenFootball JSON adapter
157
+ - Football-Data.co.uk CSV adapter
158
+ - Local detailed JSON adapter for authorized/public detailed feeds
159
+ - Generic optional public HTML adapter
160
+ - Safe HTTP client with robots.txt checks, caching, user agent, and per-origin delay
161
+ - Fixtures, results, next match, live score adapter interface, team info, standings
162
+ - Detailed scoreboards: clock, events, lineups, team stats, and player match stats when provided
163
+ - Player histories aggregated from player-level source data
164
+ - Simple Poisson prediction baseline and small Elo rating helper
165
+ - JSON and CSV export helpers
166
+ - Offline tests using local fixtures
167
+
168
+ ## Current Status
169
+
170
+ - Stable enough for demos, research, education, and early open-source feedback
171
+ - Not official live FIFA data
172
+ - True live/player-level data requires a lawful source adapter that provides those facts
173
+ - Public roadmap: [ROADMAP.md](ROADMAP.md)
174
+ - Release notes: [CHANGELOG.md](CHANGELOG.md)
175
+
176
+ ## Source and legal policy
177
+
178
+ 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.
179
+
180
+ See [DATA_SOURCES.md](DATA_SOURCES.md), [PRIVACY.md](PRIVACY.md), and [CONTRIBUTING.md](CONTRIBUTING.md).
181
+
182
+ ## Development
183
+
184
+ ```bash
185
+ python -m pip install -e ".[dev]"
186
+ ruff check .
187
+ ruff format .
188
+ pytest
189
+ python -m build
190
+ ```
191
+
192
+ The prediction output is an educational baseline only. It is not betting, financial, or professional advice.
@@ -0,0 +1,20 @@
1
+ openmatchkit/__init__.py,sha256=548JIovKcP7vt9NCEd78uKgsKtZfzj45ofEkzfRl_jg,704
2
+ openmatchkit/cli.py,sha256=7Sg5_r6ES2eA4fM4J5MSUfaraWYyayr0uxjB3cvlKwQ,6255
3
+ openmatchkit/client.py,sha256=ABGDaKJsGcXkwC3oK9zHwG5BPK4UNS_CbYFJK8R2EKQ,14168
4
+ openmatchkit/exceptions.py,sha256=Msw9qqW4_axMdYXu7Bzx3OfzV6l86jkdr6qzmqbfJaM,395
5
+ openmatchkit/export.py,sha256=yrtSwD1aSG1QphtvMm8wGMGo-C8q26C0xKevWucjZtA,2648
6
+ openmatchkit/http.py,sha256=CdTA4q1qFBnOszWqDjLqId0p1aM9__zoPIUq_eB-maw,5803
7
+ openmatchkit/models.py,sha256=-NmKnlUXFMNMwm0P926xs_ewC7IkXviHUZuMBcWKB6Q,5086
8
+ openmatchkit/prediction/__init__.py,sha256=gytkNYA0abdb7nVFEq_rerGUzFodv2nuXl4r184ORnQ,181
9
+ openmatchkit/prediction/elo.py,sha256=byZ_H4kY_yH1I9YH3DasbyxmN7ISVftW27Ctb4BNa-w,1560
10
+ openmatchkit/prediction/poisson.py,sha256=pHv-x-lZqIl8YTz96f6W9H1-n27Wprxaww5THPFapCI,3508
11
+ openmatchkit/sources/__init__.py,sha256=xkQ2Nuu24l-OcrEcL2jajE3OqhQ1yapjv6Pwc4kQu60,371
12
+ openmatchkit/sources/base.py,sha256=gqX5hYbF8OlA3_j1rk1rXj2J3zyw3MCqJNGPwoHU8rY,696
13
+ openmatchkit/sources/football_data_uk.py,sha256=7hr1vuj_5HMqvQg5-43xO2NHvMtldbdY-Ti3VzE7WCI,3810
14
+ openmatchkit/sources/json_file.py,sha256=ebiZmK9A6Ax6MKLL8D5LFHyyhhaTP9k-RvmoEisvKdQ,6001
15
+ openmatchkit/sources/openfootball.py,sha256=5akYHmcf6OuOh41nqrI3g8OMzXx2rihifRoXWtSgdLw,8040
16
+ openmatchkit/sources/public_html.py,sha256=AFbyO8rR13D-t2b38MtLxjTyJfRgAk4H1k8k_kPP4I0,1213
17
+ openmatchkit-0.2.1.dist-info/METADATA,sha256=K7ht4k_kcDYaYFac3dBt4i_w5fPFmeAcQhtf-1gbHQU,6948
18
+ openmatchkit-0.2.1.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
19
+ openmatchkit-0.2.1.dist-info/entry_points.txt,sha256=4I01UxjqOn_MMD4E-A4TzbacUgYWZjCnOLrts2FNv1U,51
20
+ openmatchkit-0.2.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.30.1
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ openmatch = openmatchkit.cli:app