betbetter 1.0.0__tar.gz
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.
- betbetter-1.0.0/LICENSE +21 -0
- betbetter-1.0.0/PKG-INFO +67 -0
- betbetter-1.0.0/README.md +47 -0
- betbetter-1.0.0/pyproject.toml +28 -0
- betbetter-1.0.0/setup.cfg +4 -0
- betbetter-1.0.0/src/betbetter/__init__.py +75 -0
- betbetter-1.0.0/src/betbetter.egg-info/PKG-INFO +67 -0
- betbetter-1.0.0/src/betbetter.egg-info/SOURCES.txt +8 -0
- betbetter-1.0.0/src/betbetter.egg-info/dependency_links.txt +1 -0
- betbetter-1.0.0/src/betbetter.egg-info/top_level.txt +1 -0
betbetter-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Bet Better Pty Ltd
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
betbetter-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: betbetter
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Zero-dependency Python client for the free Bet Better sports model API — win probabilities, fair odds and plain-English verdicts across 12 sports. No API key required.
|
|
5
|
+
Author-email: Bet Better <edward@betbetter.world>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://betbetter.world
|
|
8
|
+
Project-URL: Documentation, https://betbetter.world/api/
|
|
9
|
+
Project-URL: Repository, https://github.com/betbetterworld/betbetter-python
|
|
10
|
+
Project-URL: Open datasets, https://betbetter.world/studies/
|
|
11
|
+
Keywords: sports,betting,odds,sports-analytics,api-client,predictions,probabilities
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Requires-Python: >=3.8
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Dynamic: license-file
|
|
20
|
+
|
|
21
|
+
# betbetter
|
|
22
|
+
|
|
23
|
+
Zero-dependency Python client for the **free [Bet Better](https://betbetter.world) sports model API** — win probabilities, fair odds and plain-English verdicts for every selection the models publish, across 12 sports. **No API key required.**
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install betbetter
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
```python
|
|
30
|
+
import betbetter
|
|
31
|
+
|
|
32
|
+
feed = betbetter.get_picks("mlb")
|
|
33
|
+
for p in feed["picks"][:3]:
|
|
34
|
+
print(p["game"], "—", p["selection"], f'({p["confidence"]}, fair odds {p["fairOdds"]})')
|
|
35
|
+
|
|
36
|
+
props = betbetter.get_prop_bets("nfl") # player props only
|
|
37
|
+
record = betbetter.get_results() # the public settled record — wins AND losses
|
|
38
|
+
scorecard = betbetter.get_scorecard() # per-market hit rate, ROI, closing-line value
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## What you get
|
|
42
|
+
|
|
43
|
+
Every selection carries the model's own numbers — no bookmaker prices are republished:
|
|
44
|
+
|
|
45
|
+
| Field | Meaning |
|
|
46
|
+
|---|---|
|
|
47
|
+
| `game`, `gameTimeUtc` | Fixture and UTC start time |
|
|
48
|
+
| `market`, `selection`, `line` | What the bet is, in plain words |
|
|
49
|
+
| `modelProbabilityPct` | The model's win probability (%) |
|
|
50
|
+
| `fairOdds` | Decimal odds implied by that probability |
|
|
51
|
+
| `confidence` | `HIGH` / `LEAN` / `LONG-SHOT` |
|
|
52
|
+
| `verdict` | A dated plain-English read |
|
|
53
|
+
|
|
54
|
+
Leagues: `betbetter.LEAGUES` — AFL, MLB, NBA, NFL, NHL, NCAAF, NRL, UFC, WNBA, cricket, ATP/WTA tennis, and six soccer competitions.
|
|
55
|
+
|
|
56
|
+
## More from Bet Better
|
|
57
|
+
|
|
58
|
+
- **API docs**: https://betbetter.world/api/ (OpenAPI 3.0 spec: [/api/openapi.json](https://betbetter.world/api/openapi.json))
|
|
59
|
+
- **MCP server** (for AI agents): [`npx betbetter-mcp`](https://www.npmjs.com/package/betbetter-mcp)
|
|
60
|
+
- **Open datasets & working papers** (CC BY 4.0, DOI-backed): https://betbetter.world/studies/
|
|
61
|
+
- **The public record** — every pick graded, wins and losses: https://betbetter.world/results
|
|
62
|
+
|
|
63
|
+
## Licence
|
|
64
|
+
|
|
65
|
+
Client code: MIT. The data feed is **CC BY 4.0** — free to use, including commercially, with attribution to *Bet Better (https://betbetter.world)*.
|
|
66
|
+
|
|
67
|
+
Model estimates for research. Not betting advice. 18+. Gamble responsibly.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# betbetter
|
|
2
|
+
|
|
3
|
+
Zero-dependency Python client for the **free [Bet Better](https://betbetter.world) sports model API** — win probabilities, fair odds and plain-English verdicts for every selection the models publish, across 12 sports. **No API key required.**
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pip install betbetter
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```python
|
|
10
|
+
import betbetter
|
|
11
|
+
|
|
12
|
+
feed = betbetter.get_picks("mlb")
|
|
13
|
+
for p in feed["picks"][:3]:
|
|
14
|
+
print(p["game"], "—", p["selection"], f'({p["confidence"]}, fair odds {p["fairOdds"]})')
|
|
15
|
+
|
|
16
|
+
props = betbetter.get_prop_bets("nfl") # player props only
|
|
17
|
+
record = betbetter.get_results() # the public settled record — wins AND losses
|
|
18
|
+
scorecard = betbetter.get_scorecard() # per-market hit rate, ROI, closing-line value
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## What you get
|
|
22
|
+
|
|
23
|
+
Every selection carries the model's own numbers — no bookmaker prices are republished:
|
|
24
|
+
|
|
25
|
+
| Field | Meaning |
|
|
26
|
+
|---|---|
|
|
27
|
+
| `game`, `gameTimeUtc` | Fixture and UTC start time |
|
|
28
|
+
| `market`, `selection`, `line` | What the bet is, in plain words |
|
|
29
|
+
| `modelProbabilityPct` | The model's win probability (%) |
|
|
30
|
+
| `fairOdds` | Decimal odds implied by that probability |
|
|
31
|
+
| `confidence` | `HIGH` / `LEAN` / `LONG-SHOT` |
|
|
32
|
+
| `verdict` | A dated plain-English read |
|
|
33
|
+
|
|
34
|
+
Leagues: `betbetter.LEAGUES` — AFL, MLB, NBA, NFL, NHL, NCAAF, NRL, UFC, WNBA, cricket, ATP/WTA tennis, and six soccer competitions.
|
|
35
|
+
|
|
36
|
+
## More from Bet Better
|
|
37
|
+
|
|
38
|
+
- **API docs**: https://betbetter.world/api/ (OpenAPI 3.0 spec: [/api/openapi.json](https://betbetter.world/api/openapi.json))
|
|
39
|
+
- **MCP server** (for AI agents): [`npx betbetter-mcp`](https://www.npmjs.com/package/betbetter-mcp)
|
|
40
|
+
- **Open datasets & working papers** (CC BY 4.0, DOI-backed): https://betbetter.world/studies/
|
|
41
|
+
- **The public record** — every pick graded, wins and losses: https://betbetter.world/results
|
|
42
|
+
|
|
43
|
+
## Licence
|
|
44
|
+
|
|
45
|
+
Client code: MIT. The data feed is **CC BY 4.0** — free to use, including commercially, with attribution to *Bet Better (https://betbetter.world)*.
|
|
46
|
+
|
|
47
|
+
Model estimates for research. Not betting advice. 18+. Gamble responsibly.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "betbetter"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "Zero-dependency Python client for the free Bet Better sports model API — win probabilities, fair odds and plain-English verdicts across 12 sports. No API key required."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
authors = [{ name = "Bet Better", email = "edward@betbetter.world" }]
|
|
13
|
+
keywords = ["sports", "betting", "odds", "sports-analytics", "api-client", "predictions", "probabilities"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"License :: OSI Approved :: MIT License",
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Topic :: Scientific/Engineering :: Information Analysis",
|
|
18
|
+
"Intended Audience :: Science/Research",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
[project.urls]
|
|
22
|
+
Homepage = "https://betbetter.world"
|
|
23
|
+
Documentation = "https://betbetter.world/api/"
|
|
24
|
+
Repository = "https://github.com/betbetterworld/betbetter-python"
|
|
25
|
+
"Open datasets" = "https://betbetter.world/studies/"
|
|
26
|
+
|
|
27
|
+
[tool.setuptools.packages.find]
|
|
28
|
+
where = ["src"]
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"""betbetter — zero-dependency Python client for the free Bet Better sports model API.
|
|
2
|
+
|
|
3
|
+
Win probabilities, fair odds and plain-English verdicts for every selection the
|
|
4
|
+
Bet Better models publish, across 12 sports. No API key required.
|
|
5
|
+
|
|
6
|
+
Data licence: CC BY 4.0 — free to use with attribution to Bet Better
|
|
7
|
+
(https://betbetter.world). Model estimates for research. Not betting advice.
|
|
8
|
+
18+. Gamble responsibly.
|
|
9
|
+
|
|
10
|
+
Example:
|
|
11
|
+
>>> import betbetter
|
|
12
|
+
>>> feed = betbetter.get_picks("mlb")
|
|
13
|
+
>>> for p in feed["picks"][:3]:
|
|
14
|
+
... print(p["game"], "-", p["selection"], p["confidence"])
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from __future__ import annotations
|
|
18
|
+
|
|
19
|
+
import json
|
|
20
|
+
import urllib.request
|
|
21
|
+
from typing import Any, Dict, List
|
|
22
|
+
|
|
23
|
+
__version__ = "1.0.0"
|
|
24
|
+
__all__ = ["LEAGUES", "get_picks", "get_prop_bets", "get_results", "get_scorecard"]
|
|
25
|
+
|
|
26
|
+
BASE_URL = "https://betbetter.world"
|
|
27
|
+
USER_AGENT = f"betbetter-python/{__version__} (+https://github.com/betbetterworld/betbetter-python)"
|
|
28
|
+
|
|
29
|
+
#: League path segments accepted by the API. Soccer and tennis use two segments.
|
|
30
|
+
LEAGUES: List[str] = [
|
|
31
|
+
"afl", "mlb", "nba", "nfl", "nhl", "ncaaf", "nrl", "ufc", "wnba", "cricket",
|
|
32
|
+
"tennis/atp", "tennis/wta",
|
|
33
|
+
"soccer/epl", "soccer/la-liga", "soccer/serie-a", "soccer/bundesliga",
|
|
34
|
+
"soccer/ligue-1", "soccer/world-cup",
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def _get(path: str) -> Dict[str, Any]:
|
|
39
|
+
req = urllib.request.Request(
|
|
40
|
+
f"{BASE_URL}{path}?format=json", headers={"User-Agent": USER_AGENT}
|
|
41
|
+
)
|
|
42
|
+
with urllib.request.urlopen(req, timeout=30) as resp:
|
|
43
|
+
return json.loads(resp.read().decode("utf-8"))
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def _check_league(league: str) -> str:
|
|
47
|
+
league = league.strip().strip("/").lower()
|
|
48
|
+
if league not in LEAGUES:
|
|
49
|
+
raise ValueError(f"Unknown league {league!r}. Valid options: {', '.join(LEAGUES)}")
|
|
50
|
+
return league
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def get_picks(league: str) -> Dict[str, Any]:
|
|
54
|
+
"""Current model selections (game lines + player props) for a league.
|
|
55
|
+
|
|
56
|
+
Returns the feed object; the selections are under the ``picks`` key, each
|
|
57
|
+
with game, gameTimeUtc, market, selection, line, modelProbabilityPct,
|
|
58
|
+
fairOdds, confidence (HIGH / LEAN / LONG-SHOT) and a dated verdict.
|
|
59
|
+
"""
|
|
60
|
+
return _get(f"/{_check_league(league)}/picks")
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def get_prop_bets(league: str) -> Dict[str, Any]:
|
|
64
|
+
"""Current player-prop selections only, for a league."""
|
|
65
|
+
return _get(f"/{_check_league(league)}/prop-bets")
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def get_results() -> Dict[str, Any]:
|
|
69
|
+
"""The verified settled record — wins and losses, hit rate and ROI by sport."""
|
|
70
|
+
return _get("/results")
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def get_scorecard() -> Dict[str, Any]:
|
|
74
|
+
"""Settled model performance by sport and market (hit rate, ROI, closing-line value)."""
|
|
75
|
+
return _get("/scorecard")
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: betbetter
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Zero-dependency Python client for the free Bet Better sports model API — win probabilities, fair odds and plain-English verdicts across 12 sports. No API key required.
|
|
5
|
+
Author-email: Bet Better <edward@betbetter.world>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://betbetter.world
|
|
8
|
+
Project-URL: Documentation, https://betbetter.world/api/
|
|
9
|
+
Project-URL: Repository, https://github.com/betbetterworld/betbetter-python
|
|
10
|
+
Project-URL: Open datasets, https://betbetter.world/studies/
|
|
11
|
+
Keywords: sports,betting,odds,sports-analytics,api-client,predictions,probabilities
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Requires-Python: >=3.8
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Dynamic: license-file
|
|
20
|
+
|
|
21
|
+
# betbetter
|
|
22
|
+
|
|
23
|
+
Zero-dependency Python client for the **free [Bet Better](https://betbetter.world) sports model API** — win probabilities, fair odds and plain-English verdicts for every selection the models publish, across 12 sports. **No API key required.**
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install betbetter
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
```python
|
|
30
|
+
import betbetter
|
|
31
|
+
|
|
32
|
+
feed = betbetter.get_picks("mlb")
|
|
33
|
+
for p in feed["picks"][:3]:
|
|
34
|
+
print(p["game"], "—", p["selection"], f'({p["confidence"]}, fair odds {p["fairOdds"]})')
|
|
35
|
+
|
|
36
|
+
props = betbetter.get_prop_bets("nfl") # player props only
|
|
37
|
+
record = betbetter.get_results() # the public settled record — wins AND losses
|
|
38
|
+
scorecard = betbetter.get_scorecard() # per-market hit rate, ROI, closing-line value
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## What you get
|
|
42
|
+
|
|
43
|
+
Every selection carries the model's own numbers — no bookmaker prices are republished:
|
|
44
|
+
|
|
45
|
+
| Field | Meaning |
|
|
46
|
+
|---|---|
|
|
47
|
+
| `game`, `gameTimeUtc` | Fixture and UTC start time |
|
|
48
|
+
| `market`, `selection`, `line` | What the bet is, in plain words |
|
|
49
|
+
| `modelProbabilityPct` | The model's win probability (%) |
|
|
50
|
+
| `fairOdds` | Decimal odds implied by that probability |
|
|
51
|
+
| `confidence` | `HIGH` / `LEAN` / `LONG-SHOT` |
|
|
52
|
+
| `verdict` | A dated plain-English read |
|
|
53
|
+
|
|
54
|
+
Leagues: `betbetter.LEAGUES` — AFL, MLB, NBA, NFL, NHL, NCAAF, NRL, UFC, WNBA, cricket, ATP/WTA tennis, and six soccer competitions.
|
|
55
|
+
|
|
56
|
+
## More from Bet Better
|
|
57
|
+
|
|
58
|
+
- **API docs**: https://betbetter.world/api/ (OpenAPI 3.0 spec: [/api/openapi.json](https://betbetter.world/api/openapi.json))
|
|
59
|
+
- **MCP server** (for AI agents): [`npx betbetter-mcp`](https://www.npmjs.com/package/betbetter-mcp)
|
|
60
|
+
- **Open datasets & working papers** (CC BY 4.0, DOI-backed): https://betbetter.world/studies/
|
|
61
|
+
- **The public record** — every pick graded, wins and losses: https://betbetter.world/results
|
|
62
|
+
|
|
63
|
+
## Licence
|
|
64
|
+
|
|
65
|
+
Client code: MIT. The data feed is **CC BY 4.0** — free to use, including commercially, with attribution to *Bet Better (https://betbetter.world)*.
|
|
66
|
+
|
|
67
|
+
Model estimates for research. Not betting advice. 18+. Gamble responsibly.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
betbetter
|