Skip to main content

sports-skills

https://sports-skills.sh

A lightweight, zero-config Python SDK and CLI for live sports data and prediction markets.

Built natively for AI agents, but works perfectly as a standalone Python library for developers. Wraps publicly available sports data sources and APIs into unified, deterministic commands.

Zero API keys. Zero signup. Just works.


📦 Installation

Install as a global CLI tool (recommended for agents):

uv tool install sports-skills
# or
pip install sports-skills

Base install includes all sports modules.

Install as a Python library:

uv add sports-skills
# or
pip install sports-skills

Optional extras:

pip install "sports-skills[all]"
pip install "sports-skills[dev]"

⚡ What's Included

  • Football (Soccer): ESPN, Understat, FPL, Transfermarkt, football-data.co.uk, ClubElo — 25 commands across 30 leagues
  • US Sports: NFL, NBA, WNBA, NHL, MLB, College Football (CFB), College Basketball (CBB) — live scores, standings, depth charts, injuries, and leaders
  • Analytics backends (same modules, second source): nflverse for NFL (EPA, weekly tables, 1999+), NBA Stats for NBA (shot charts, advanced ratings, 1946+), the official MLB Stats API (pitch-level velocity/spin/exit-velocity, 1901+), the official NHL API (coordinate play-by-play, 1917+), and the NCAA's own endpoints for college (FCS/D2/D3 scoreboards, March Madness bracket)
  • Tennis: ATP and WTA tournament scores, rankings, calendars, and player profiles
  • Golf: PGA, LPGA, and DP World tour scorecards and leaderboards
  • College XC/TF: NCAA cross country and track & field — athlete profiles, personal records, meet results, and news via The Stride Report
  • Volleyball: Nevobo — Dutch volleyball (Eredivisie, Topdivisie, Superdivisie) standings, schedules, results, clubs
  • Racing: Formula 1 (via FastF1) — lap times, telemetry, and race results
  • Esports: Dota 2 (OpenDota) and League of Legends esports (Leaguepedia) — pro matches, leagues, teams, and tournaments
  • Prediction Markets: Polymarket & Kalshi live odds and order books, including esports implied-probability odds (CS2/LoL/Dota2)
  • News: Multi-sport news aggregators

💻 CLI Usage

The package exposes a sports-skills binary.

List all supported sports:

sports-skills --help

List commands for a specific sport:

sports-skills nfl

Execute a command:

sports-skills nfl get_scoreboard --date 2026-02-24
sports-skills football get_current_season --competition_id premier-league
sports-skills polymarket search_markets --query "super bowl"
sports-skills news fetch_items --query "Lando Norris" --limit 5
sports-skills xctf get_news --limit 5
sports-skills xctf search_athlete --name "Jane Hedengren" --school "UT_college_f_BYU"

All CLI output is printed as strict JSON, making it perfect for AI agents (Claude, GPT, Gemini) to parse and reason over.


🐍 Python SDK Usage

You can use the exact same commands directly in your Python code:

from sports_skills import nfl, football, polymarket, xctf

# Get live NFL scores
scores = nfl.get_scoreboard(date="2026-02-24")
print(scores["data"]["events"])

# Get Premier League standings
table = football.get_season_standings(season_id="premier-league-2025")
print(table["data"]["standings"])

# Fetch live odds from Polymarket
markets = polymarket.search_markets(query="super bowl")
print(markets["data"]["markets"])

# Get latest NCAA XC/TF news from The Stride Report
news = xctf.get_news(limit=5)
print(news["data"]["articles"])

# Look up an athlete's PRs
profile = xctf.get_athlete_profile(athlete_id="9230145", school="BYU", name="Jane_Hedengren")
print(profile["data"]["prs"])

🏗️ AI Agent Integration

sports-skills is built on the Anthropic Level-3 Agent capability spec. Every command is deterministic and automatically generates its own JSON Schema.

To extract the OpenAI/Anthropic compatible tool schema for any module:

sports-skills nfl schema

Prints {sport, version, tools}tools is one Anthropic/OpenAI-shaped tool definition per command.


Machina Sports Schema (canonical output)

Football event commands can emit the Machina Sports Schema envelope instead of the native payload: one provider's observation of one event, serialized as JSON-LD against the IPTC Sport Schema 1.1 profile, with a provider-id crosswalk, a capability report, and a provenance block naming the pinned upstream commit.

# One event → one envelope, printed directly
sports-skills football get_event_summary --event_id=740000 \
  --format=machina-canonical --observed-at=2026-03-01T22:05:00+00:00

# A day's fixtures → {provider, format, events}, every event a full envelope
sports-skills football get_daily_schedule --date=2026-03-01 \
  --canonical --observed-at=2026-03-01T22:05:00+00:00

--canonical is an alias for --format=machina-canonical. It is supported on football get_event_summary and football get_daily_schedule (also reachable as scores); every other command refuses the flag by name rather than wrapping data the schema does not describe.

--observed-at is required and must carry a UTC offset. It is never read from the clock: it is the one input that makes the document reproducible, and the reference fixtures this output is tested byte-for-byte against depend on it being stated rather than guessed.

Rights: prototype only. Every envelope carries rights: {"data_class": "open-public", "prototype_only": true, "commercial_use": false}. Gate a consumer against them with --consumer-tier:

sports-skills football get_event_summary --event_id=740000 --canonical \
  --observed-at=2026-03-01T22:05:00+00:00 --consumer-tier=production
# → refused: rights-prototype-only, exit status 1

prototype (the default) is served. production refuses every envelope this package can produce, with one actionable finding and a nonzero exit status — including a query that returns nothing, which is refused before the provider is called, because the licence answer is the adapter's and not the result set's. For licensed data cleared for commercial use, see machina.gg.

The default output of every command is unchanged: no module on the native path imports the canonical package, and the CLI reaches it only when you ask for it by name.


License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sports_skills-0.33.0.tar.gz (437.3 kB view details)

Uploaded Source

Built Distribution

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

sports_skills-0.33.0-py3-none-any.whl (569.0 kB view details)

Uploaded Python 3

File details

Details for the file sports_skills-0.33.0.tar.gz.

File metadata

  • Download URL: sports_skills-0.33.0.tar.gz
  • Upload date:
  • Size: 437.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sports_skills-0.33.0.tar.gz
Algorithm Hash digest
SHA256 5044529af6e92d119a8b98f911cf86463dc18d362606bc2b81ecdbdab90f7bb6
MD5 069209e716880dbb04d3af6200b9e48e
BLAKE2b-256 6923f0f1d9b2269b4e8d86d0e2643fa6b06927179148a04cc38261cbdb45a5a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for sports_skills-0.33.0.tar.gz:

Publisher: publish.yml on machina-sports/sports-skills

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

File details

Details for the file sports_skills-0.33.0-py3-none-any.whl.

File metadata

  • Download URL: sports_skills-0.33.0-py3-none-any.whl
  • Upload date:
  • Size: 569.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sports_skills-0.33.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d9ce4048c0c4768c96569affe35ce124fe22d64f5cbbff3f8c130bc91ee6763f
MD5 edbb95a0cd13b87d64237a6bbcba6312
BLAKE2b-256 d0f7c0ce997e778aa65c7763a24b189982def9d944ac41052c34b36418aca508

See more details on using hashes here.

Provenance

The following attestation bundles were made for sports_skills-0.33.0-py3-none-any.whl:

Publisher: publish.yml on machina-sports/sports-skills

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

Release history Release notifications | RSS feed

This release

0.33.0 This release

2 files

0.32.0

2 files

0.31.0

2 files

0.30.1

2 files

0.30.0

2 files

0.29.0

2 files

0.28.1

2 files

0.28.0

2 files

0.27.1

2 files

0.27.0

2 files

0.26.5

2 files

0.26.4

2 files

0.26.3

2 files

0.26.2

2 files

0.26.1

2 files

0.26.0

2 files

0.25.3

2 files

0.25.2

2 files

0.25.1

2 files

0.25.0

2 files

0.24.4

2 files

0.24.3

2 files

0.24.2

2 files

0.23.0

2 files

0.22.0

2 files

0.21.0

2 files

0.20.1

2 files

0.20.0

2 files

0.19.0

2 files

0.18.2

2 files

0.18.1

2 files

0.18.0

2 files

0.17.0

2 files

0.16.5

2 files

0.16.4

2 files

0.16.3

2 files

0.16.1

2 files

0.15.3

2 files

0.15.2

2 files

0.15.1

2 files

0.15.0

2 files

0.14.1

2 files

0.14.0

2 files

0.13.0

2 files

0.12.0

2 files

0.11.3

2 files

0.11.2

2 files

0.11.1

2 files

0.11.0

2 files

0.10.1

2 files

0.10.0

2 files

0.9.9

2 files

0.9.8

2 files

0.9.6

2 files

0.9.5

2 files

0.9.4

2 files

0.9.3

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.4.0

2 files

0.3.0

2 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