wnba-data

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

WNBA Data

WNBA数据

Setup

安装配置

Before first use, check if the CLI is available:
bash
which sports-skills || pip install sports-skills
If
pip install
fails with a Python version error, the package requires Python 3.10+. Find a compatible Python:
bash
python3 --version  # check version
首次使用前,请检查CLI是否可用:
bash
which sports-skills || pip install sports-skills
如果
pip install
因Python版本错误失败,说明该包需要Python 3.10及以上版本。请找到兼容的Python版本:
bash
python3 --version  # 检查版本

If < 3.10, try: python3.12 -m pip install sports-skills

若版本低于3.10,尝试:python3.12 -m pip install sports-skills

On macOS with Homebrew: /opt/homebrew/bin/python3.12 -m pip install sports-skills

在使用Homebrew的macOS上:/opt/homebrew/bin/python3.12 -m pip install sports-skills

No API keys required.
无需API密钥。

Quick Start

快速开始

Prefer the CLI — it avoids Python import path issues:
bash
sports-skills wnba get_scoreboard
sports-skills wnba get_standings --season=2025
sports-skills wnba get_teams
推荐使用CLI——可避免Python导入路径问题:
bash
sports-skills wnba get_scoreboard
sports-skills wnba get_standings --season=2025
sports-skills wnba get_teams

Choosing the Season

赛季选择规则

Derive the current year from the system prompt's date (e.g.,
currentDate: 2026-02-18
→ current year is 2026).
  • If the user specifies a season, use it as-is.
  • If the user says "current", "this season", or doesn't specify: The WNBA season runs May–October. If the current month is May–October, use
    season = current_year
    . If November–April (offseason), use
    season = current_year - 1
    (most recently completed season).
  • Never hardcode a season. Always derive it from the system date.
从系统提示的日期中提取当前年份(例如:
currentDate: 2026-02-18
→ 当前年份为2026)。
  • 若用户指定赛季:直接使用用户指定的赛季。
  • 若用户提到“当前”、“本赛季”或未指定赛季:WNBA赛季为5月至10月。若当前月份在5-10月之间,使用
    season = 当前年份
    ;若在11月至次年4月(休赛期),使用
    season = 当前年份 - 1
    (最近结束的赛季)。
  • 请勿硬编码赛季:始终从系统日期推导赛季。

Commands

可用命令

get_scoreboard

get_scoreboard

Get live/recent WNBA scores.
  • date
    (str, optional): Date in YYYY-MM-DD format. Defaults to today.
Returns
events[]
with game info, scores, status, and competitors.
获取WNBA实时/近期比分。
  • date
    (字符串,可选):日期格式为YYYY-MM-DD,默认为今日。
返回包含赛事信息、比分、状态和参赛队伍的
events[]
数组。

get_standings

get_standings

Get WNBA standings by conference.
  • season
    (int, optional): Season year
Returns
groups[]
with Eastern/Western conferences and team standings including W-L, PCT, GB, and streak.
获取WNBA各赛区排名。
  • season
    (整数,可选):赛季年份
返回包含东西部赛区及球队排名的
groups[]
数组,排名信息包括胜负场数、胜率、胜场差和连胜/连败情况。

get_teams

get_teams

Get all WNBA teams. No parameters.
Returns
teams[]
with id, name, abbreviation, logo, and location.
获取所有WNBA球队信息,无参数。
返回包含球队ID、名称、缩写、队徽和所在地的
teams[]
数组。

get_team_roster

get_team_roster

Get full roster for a team.
  • team_id
    (str, required): ESPN team ID (e.g., "5" for Las Vegas Aces)
Returns
athletes[]
with name, position, jersey number, height, weight, experience.
获取指定球队的完整球员名单。
  • team_id
    (字符串,必填):ESPN球队ID(例如:拉斯维加斯王牌队的ID为"9")
返回包含球员姓名、位置、球衣号码、身高、体重和球龄的
athletes[]
数组。

get_team_schedule

get_team_schedule

Get schedule for a specific team.
  • team_id
    (str, required): ESPN team ID
  • season
    (int, optional): Season year
Returns
events[]
with opponent, date, score (if played), and venue.
获取指定球队的赛程。
  • team_id
    (字符串,必填):ESPN球队ID
  • season
    (整数,可选):赛季年份
返回包含对手、日期、比分(若赛事已完成)和比赛场馆的
events[]
数组。

get_game_summary

get_game_summary

Get detailed box score and scoring plays.
  • event_id
    (str, required): ESPN event ID
Returns
game_info
,
competitors
,
boxscore
(stats per player),
scoring_plays
, and
leaders
.
获取赛事的详细技术统计和得分战况。
  • event_id
    (字符串,必填):ESPN赛事ID
返回
game_info
competitors
boxscore
(球员个人统计)、
scoring_plays
leaders

get_leaders

get_leaders

Get WNBA statistical leaders (points, rebounds, assists, etc.).
  • season
    (int, optional): Season year. Defaults to most recently completed season.
Returns
categories[]
with leader rankings per stat category.
获取WNBA各项数据领跑者(得分、篮板、助攻等)。
  • season
    (整数,可选):赛季年份,默认为最近结束的赛季。
返回包含各数据类别排名的
categories[]
数组。

get_news

get_news

Get WNBA news articles.
  • team_id
    (str, optional): Filter by team
Returns
articles[]
with headline, description, published date, and link.
获取WNBA新闻资讯。
  • team_id
    (字符串,可选):按球队筛选
返回包含标题、摘要、发布日期和链接的
articles[]
数组。

get_play_by_play

get_play_by_play

Get full play-by-play data for a game.
  • event_id
    (str, required): ESPN event ID
Returns play-by-play detail including period, clock, team, play description, and scoring plays.
获取赛事的完整逐场战况数据。
  • event_id
    (字符串,必填):ESPN赛事ID
返回逐场战况详情,包括节次、时间、球队、战况描述和得分情况。

get_win_probability

get_win_probability

Get win probability chart data for a game.
  • event_id
    (str, required): ESPN event ID
Returns timestamped home/away win probability percentages throughout the game.
获取赛事的获胜概率变化数据。
  • event_id
    (字符串,必填):ESPN赛事ID
返回赛事全程中主队/客队获胜概率的时间戳数据。

get_schedule

get_schedule

Get WNBA schedule for a specific date or season.
  • date
    (str, optional): Date in YYYY-MM-DD format
  • season
    (int, optional): Season year (used only if no date provided)
Returns
events[]
for the specified date.
获取指定日期或赛季的WNBA赛程。
  • date
    (字符串,可选):日期格式为YYYY-MM-DD
  • season
    (整数,可选):赛季年份(仅在未指定日期时使用)
返回指定日期的
events[]
数组。

get_injuries

get_injuries

Get current WNBA injury reports across all teams. No parameters.
Returns
teams[]
with per-team injury lists including player name, position, status, injury type, and detail.
获取所有WNBA球队的当前伤病报告,无参数。
返回包含各球队伤病名单的
teams[]
数组,伤病信息包括球员姓名、位置、状态、伤病类型和详情。

get_transactions

get_transactions

Get recent WNBA transactions (trades, signings, waivers).
  • limit
    (int, optional): Max transactions to return. Defaults to 50.
Returns
transactions[]
with date, team, and description.
获取近期WNBA交易信息(转会、签约、裁员等)。
  • limit
    (整数,可选):返回的最大交易数量,默认为50。
返回包含日期、球队和交易描述的
transactions[]
数组。

get_futures

get_futures

Get WNBA futures/odds markets (Championship winner, MVP, etc.).
  • limit
    (int, optional): Max entries per market. Defaults to 25.
  • season_year
    (int, optional): Season year. Defaults to current.
Returns
futures[]
with market name and entries (team/player name + odds value).
获取WNBA期货/赔率市场信息(总冠军、MVP等)。
  • limit
    (整数,可选):每个市场返回的最大条目数,默认为25。
  • season_year
    (整数,可选):赛季年份,默认为当前赛季。
返回包含市场名称和条目(球队/球员名称+赔率)的
futures[]
数组。

get_team_stats

get_team_stats

Get full team statistical profile for a season.
  • team_id
    (str, required): ESPN team ID
  • season_year
    (int, optional): Season year. Defaults to current.
  • season_type
    (int, optional): 2=regular (default), 3=postseason.
Returns
categories[]
with detailed stats including value, rank, and per-game averages.
获取指定球队赛季的完整统计数据。
  • team_id
    (字符串,必填):ESPN球队ID
  • season_year
    (整数,可选):赛季年份,默认为当前赛季。
  • season_type
    (整数,可选):2=常规赛(默认),3=季后赛。
返回包含详细统计数据(数值、排名、场均数据)的
categories[]
数组。

get_player_stats

get_player_stats

Get full player statistical profile for a season.
  • player_id
    (str, required): ESPN athlete ID
  • season_year
    (int, optional): Season year. Defaults to current.
  • season_type
    (int, optional): 2=regular (default), 3=postseason.
Returns
categories[]
with detailed stats including value, rank, and per-game averages.
获取指定球员赛季的完整统计数据。
  • player_id
    (字符串,必填):ESPN球员ID
  • season_year
    (整数,可选):赛季年份,默认为当前赛季。
  • season_type
    (整数,可选):2=常规赛(默认),3=季后赛。
返回包含详细统计数据(数值、排名、场均数据)的
categories[]
数组。

Team IDs (Common)

常用球队ID

TeamID
Atlanta Dream3
Chicago Sky4
Connecticut Sun6
Dallas Wings8
Indiana Fever5
Las Vegas Aces9
Los Angeles Sparks14
Minnesota Lynx16
New York Liberty17
Phoenix Mercury21
Seattle Storm26
Washington Mystics30
球队ID
亚特兰大梦想队3
芝加哥天空队4
康涅狄格阳光队6
达拉斯飞翼队8
印第安纳狂热队5
拉斯维加斯王牌队9
洛杉矶火花队14
明尼苏达山猫队16
纽约自由人队17
菲尼克斯水星队21
西雅图风暴队26
华盛顿神秘人队30

Examples

使用示例

User: "What are today's WNBA scores?"
bash
sports-skills wnba get_scoreboard
User: "Show me the WNBA standings"
bash
sports-skills wnba get_standings --season=2025
User: "Who's on the Indiana Fever roster?"
bash
sports-skills wnba get_team_roster --team_id=5
User: "Show me WNBA statistical leaders"
bash
sports-skills wnba get_leaders --season=2025
User: "Who's injured in the WNBA?"
bash
sports-skills wnba get_injuries
User: "What are the WNBA championship odds?"
bash
sports-skills wnba get_futures --limit=10
User: "Show me A'ja Wilson's stats"
bash
sports-skills wnba get_player_stats --player_id=3149391
用户:“今天的WNBA比分是多少?”
bash
sports-skills wnba get_scoreboard
用户:“展示WNBA排名”
bash
sports-skills wnba get_standings --season=2025
用户:“印第安纳狂热队的球员名单有谁?”
bash
sports-skills wnba get_team_roster --team_id=5
用户:“展示WNBA各项数据领跑者”
bash
sports-skills wnba get_leaders --season=2025
用户:“WNBA有哪些球员受伤了?”
bash
sports-skills wnba get_injuries
用户:“WNBA总冠军赔率是多少?”
bash
sports-skills wnba get_futures --limit=10
用户:“展示A'ja Wilson的统计数据”
bash
sports-skills wnba get_player_stats --player_id=3149391

Error Handling

错误处理

When a command fails, do not surface raw errors to the user. Instead:
  1. Catch silently and try alternatives
  2. If team name given instead of ID, use
    get_teams
    to find the ID first
  3. Only report failure with a clean message after exhausting alternatives
当命令执行失败时,请勿向用户展示原始错误信息。请按以下步骤处理:
  1. 静默捕获错误并尝试替代方案
  2. 若用户提供的是球队名称而非ID,先使用
    get_teams
    命令查找对应ID
  3. 仅在尝试所有替代方案后,用简洁的消息告知用户操作失败

Troubleshooting

故障排除

  • sports-skills
    command not found
    : Run
    pip install sports-skills
  • Team not found: Use
    get_teams
    to list all teams and find the correct ID
  • No data for future games: ESPN only returns data for completed or in-progress games
  • Offseason (Nov–Apr):
    get_scoreboard
    returns 0 events — expected. Use
    get_standings --season=2025
    or
    get_news
    instead.
  • sports-skills
    命令未找到
    :执行
    pip install sports-skills
  • 未找到球队:使用
    get_teams
    命令列出所有球队并找到正确ID
  • 未来赛事无数据:ESPN仅返回已完成或进行中赛事的数据
  • 休赛期(11月-次年4月)
    get_scoreboard
    会返回0条赛事——此为正常情况。请改用
    get_standings --season=2025
    get_news
    命令。