wnba-data
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWNBA Data
WNBA数据
Setup
安装配置
Before first use, check if the CLI is available:
bash
which sports-skills || pip install sports-skillsIf fails with a Python version error, the package requires Python 3.10+. Find a compatible Python:
pip installbash
python3 --version # check version首次使用前,请检查CLI是否可用:
bash
which sports-skills || pip install sports-skills如果因Python版本错误失败,说明该包需要Python 3.10及以上版本。请找到兼容的Python版本:
pip installbash
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_teamsChoosing the Season
赛季选择规则
Derive the current year from the system prompt's date (e.g., → current year is 2026).
currentDate: 2026-02-18- 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 . If November–April (offseason), use
season = current_year(most recently completed season).season = current_year - 1 - Never hardcode a season. Always derive it from the system date.
从系统提示的日期中提取当前年份(例如: → 当前年份为2026)。
currentDate: 2026-02-18- 若用户指定赛季:直接使用用户指定的赛季。
- 若用户提到“当前”、“本赛季”或未指定赛季:WNBA赛季为5月至10月。若当前月份在5-10月之间,使用;若在11月至次年4月(休赛期),使用
season = 当前年份(最近结束的赛季)。season = 当前年份 - 1 - 请勿硬编码赛季:始终从系统日期推导赛季。
Commands
可用命令
get_scoreboard
get_scoreboard
Get live/recent WNBA scores.
- (str, optional): Date in YYYY-MM-DD format. Defaults to today.
date
Returns with game info, scores, status, and competitors.
events[]获取WNBA实时/近期比分。
- (字符串,可选):日期格式为YYYY-MM-DD,默认为今日。
date
返回包含赛事信息、比分、状态和参赛队伍的数组。
events[]get_standings
get_standings
Get WNBA standings by conference.
- (int, optional): Season year
season
Returns with Eastern/Western conferences and team standings including W-L, PCT, GB, and streak.
groups[]获取WNBA各赛区排名。
- (整数,可选):赛季年份
season
返回包含东西部赛区及球队排名的数组,排名信息包括胜负场数、胜率、胜场差和连胜/连败情况。
groups[]get_teams
get_teams
Get all WNBA teams. No parameters.
Returns with id, name, abbreviation, logo, and location.
teams[]获取所有WNBA球队信息,无参数。
返回包含球队ID、名称、缩写、队徽和所在地的数组。
teams[]get_team_roster
get_team_roster
Get full roster for a team.
- (str, required): ESPN team ID (e.g., "5" for Las Vegas Aces)
team_id
Returns with name, position, jersey number, height, weight, experience.
athletes[]获取指定球队的完整球员名单。
- (字符串,必填):ESPN球队ID(例如:拉斯维加斯王牌队的ID为"9")
team_id
返回包含球员姓名、位置、球衣号码、身高、体重和球龄的数组。
athletes[]get_team_schedule
get_team_schedule
Get schedule for a specific team.
- (str, required): ESPN team ID
team_id - (int, optional): Season year
season
Returns with opponent, date, score (if played), and venue.
events[]获取指定球队的赛程。
- (字符串,必填):ESPN球队ID
team_id - (整数,可选):赛季年份
season
返回包含对手、日期、比分(若赛事已完成)和比赛场馆的数组。
events[]get_game_summary
get_game_summary
Get detailed box score and scoring plays.
- (str, required): ESPN event ID
event_id
Returns , , (stats per player), , and .
game_infocompetitorsboxscorescoring_playsleaders获取赛事的详细技术统计和得分战况。
- (字符串,必填):ESPN赛事ID
event_id
返回、、(球员个人统计)、和。
game_infocompetitorsboxscorescoring_playsleadersget_leaders
get_leaders
Get WNBA statistical leaders (points, rebounds, assists, etc.).
- (int, optional): Season year. Defaults to most recently completed season.
season
Returns with leader rankings per stat category.
categories[]获取WNBA各项数据领跑者(得分、篮板、助攻等)。
- (整数,可选):赛季年份,默认为最近结束的赛季。
season
返回包含各数据类别排名的数组。
categories[]get_news
get_news
Get WNBA news articles.
- (str, optional): Filter by team
team_id
Returns with headline, description, published date, and link.
articles[]获取WNBA新闻资讯。
- (字符串,可选):按球队筛选
team_id
返回包含标题、摘要、发布日期和链接的数组。
articles[]get_play_by_play
get_play_by_play
Get full play-by-play data for a game.
- (str, required): ESPN event ID
event_id
Returns play-by-play detail including period, clock, team, play description, and scoring plays.
获取赛事的完整逐场战况数据。
- (字符串,必填):ESPN赛事ID
event_id
返回逐场战况详情,包括节次、时间、球队、战况描述和得分情况。
get_win_probability
get_win_probability
Get win probability chart data for a game.
- (str, required): ESPN event ID
event_id
Returns timestamped home/away win probability percentages throughout the game.
获取赛事的获胜概率变化数据。
- (字符串,必填):ESPN赛事ID
event_id
返回赛事全程中主队/客队获胜概率的时间戳数据。
get_schedule
get_schedule
Get WNBA schedule for a specific date or season.
- (str, optional): Date in YYYY-MM-DD format
date - (int, optional): Season year (used only if no date provided)
season
Returns for the specified date.
events[]获取指定日期或赛季的WNBA赛程。
- (字符串,可选):日期格式为YYYY-MM-DD
date - (整数,可选):赛季年份(仅在未指定日期时使用)
season
返回指定日期的数组。
events[]get_injuries
get_injuries
Get current WNBA injury reports across all teams. No parameters.
Returns with per-team injury lists including player name, position, status, injury type, and detail.
teams[]获取所有WNBA球队的当前伤病报告,无参数。
返回包含各球队伤病名单的数组,伤病信息包括球员姓名、位置、状态、伤病类型和详情。
teams[]get_transactions
get_transactions
Get recent WNBA transactions (trades, signings, waivers).
- (int, optional): Max transactions to return. Defaults to 50.
limit
Returns with date, team, and description.
transactions[]获取近期WNBA交易信息(转会、签约、裁员等)。
- (整数,可选):返回的最大交易数量,默认为50。
limit
返回包含日期、球队和交易描述的数组。
transactions[]get_futures
get_futures
Get WNBA futures/odds markets (Championship winner, MVP, etc.).
- (int, optional): Max entries per market. Defaults to 25.
limit - (int, optional): Season year. Defaults to current.
season_year
Returns with market name and entries (team/player name + odds value).
futures[]获取WNBA期货/赔率市场信息(总冠军、MVP等)。
- (整数,可选):每个市场返回的最大条目数,默认为25。
limit - (整数,可选):赛季年份,默认为当前赛季。
season_year
返回包含市场名称和条目(球队/球员名称+赔率)的数组。
futures[]get_team_stats
get_team_stats
Get full team statistical profile for a season.
- (str, required): ESPN team ID
team_id - (int, optional): Season year. Defaults to current.
season_year - (int, optional): 2=regular (default), 3=postseason.
season_type
Returns with detailed stats including value, rank, and per-game averages.
categories[]获取指定球队赛季的完整统计数据。
- (字符串,必填):ESPN球队ID
team_id - (整数,可选):赛季年份,默认为当前赛季。
season_year - (整数,可选):2=常规赛(默认),3=季后赛。
season_type
返回包含详细统计数据(数值、排名、场均数据)的数组。
categories[]get_player_stats
get_player_stats
Get full player statistical profile for a season.
- (str, required): ESPN athlete ID
player_id - (int, optional): Season year. Defaults to current.
season_year - (int, optional): 2=regular (default), 3=postseason.
season_type
Returns with detailed stats including value, rank, and per-game averages.
categories[]获取指定球员赛季的完整统计数据。
- (字符串,必填):ESPN球员ID
player_id - (整数,可选):赛季年份,默认为当前赛季。
season_year - (整数,可选):2=常规赛(默认),3=季后赛。
season_type
返回包含详细统计数据(数值、排名、场均数据)的数组。
categories[]Team IDs (Common)
常用球队ID
| Team | ID |
|---|---|
| Atlanta Dream | 3 |
| Chicago Sky | 4 |
| Connecticut Sun | 6 |
| Dallas Wings | 8 |
| Indiana Fever | 5 |
| Las Vegas Aces | 9 |
| Los Angeles Sparks | 14 |
| Minnesota Lynx | 16 |
| New York Liberty | 17 |
| Phoenix Mercury | 21 |
| Seattle Storm | 26 |
| Washington Mystics | 30 |
| 球队 | 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_scoreboardUser: "Show me the WNBA standings"
bash
sports-skills wnba get_standings --season=2025User: "Who's on the Indiana Fever roster?"
bash
sports-skills wnba get_team_roster --team_id=5User: "Show me WNBA statistical leaders"
bash
sports-skills wnba get_leaders --season=2025User: "Who's injured in the WNBA?"
bash
sports-skills wnba get_injuriesUser: "What are the WNBA championship odds?"
bash
sports-skills wnba get_futures --limit=10User: "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=3149391Error Handling
错误处理
When a command fails, do not surface raw errors to the user. Instead:
- Catch silently and try alternatives
- If team name given instead of ID, use to find the ID first
get_teams - Only report failure with a clean message after exhausting alternatives
当命令执行失败时,请勿向用户展示原始错误信息。请按以下步骤处理:
- 静默捕获错误并尝试替代方案
- 若用户提供的是球队名称而非ID,先使用命令查找对应ID
get_teams - 仅在尝试所有替代方案后,用简洁的消息告知用户操作失败
Troubleshooting
故障排除
- command not found: Run
sports-skillspip install sports-skills - Team not found: Use to list all teams and find the correct ID
get_teams - No data for future games: ESPN only returns data for completed or in-progress games
- Offseason (Nov–Apr): returns 0 events — expected. Use
get_scoreboardorget_standings --season=2025instead.get_news
- 命令未找到:执行
sports-skillspip install sports-skills - 未找到球队:使用命令列出所有球队并找到正确ID
get_teams - 未来赛事无数据:ESPN仅返回已完成或进行中赛事的数据
- 休赛期(11月-次年4月):会返回0条赛事——此为正常情况。请改用
get_scoreboard或get_standings --season=2025命令。get_news