Skip to main content

Aggregated injury reports for NBA, MLB, and Soccer with player status tracking

Project description

injury-report-monitor

Never get blindsided by a late scratch again.

A real-time injury aggregation tool that pulls from multiple public sources, tracks status changes, and tells you which injuries actually matter for tonight's games.

The Problem

Injury news is scattered across dozens of sources. By the time you check ESPN, the official NBA injury report, team Twitter accounts, and beat reporters, the game has already started and your fantasy lineup is locked with a player who was ruled out 20 minutes ago.

The Solution

injury-report-monitor continuously aggregates injury data from:

  • ESPN injury pages (NBA, MLB, Soccer)
  • CBS Sports injury reports
  • Official NBA injury report filings
  • MLB transaction wire (IL placements and activations)
  • Soccer injury reports from public league sources

All sources are combined into a single feed. When a player's status changes -- Questionable to Out, IL to Active, Injured to Available -- you see it immediately with full context about whether their game is today.

Who This Is For

  • Fantasy managers who need lineup-lock alerts
  • Sports bettors who need to know about late scratches before lines adjust
  • Fans who want to know if their favorite player is suiting up tonight
  • Analysts tracking team health trends over a season

Setup

1. API Key for Game Schedules

You need an API key for game schedule context (knowing which games are today so the tool can flag relevant injuries):

export SHIPP_API_KEY="your-api-key-here"

Get one at platform.shipp.ai.

2. Install Dependencies

pip install requests beautifulsoup4

No additional API keys are required. All injury sources are scraped from publicly available pages.

3. (Optional) State Persistence

By default, the monitor stores last-known injury states in a local JSON file (~/.injury_monitor_state.json). This enables change detection between runs. To customize the location:

export INJURY_STATE_PATH="/your/preferred/path/state.json"

Usage

Full Report (All Sports)

from scripts.injury_monitor import InjuryMonitor

monitor = InjuryMonitor()
report = monitor.get_full_report()

# Structured JSON output
print(report.to_json())

# Human-readable summary
print(report.summary())

Single Sport

report = monitor.get_report(sport="nba")

Changes Only

changes = monitor.get_status_changes()
for change in changes:
    print(f"{change['player']} ({change['team']}): "
          f"{change['old_status']} -> {change['new_status']} "
          f"{'** GAME TODAY **' if change['game_today'] else ''}")

Today's Games Impact

# Only injuries for players whose teams play today
today_injuries = monitor.get_today_impact()

Output Format

JSON Structure

{
  "generated_at": "2026-02-18T14:30:00Z",
  "sports": {
    "nba": {
      "injuries": [
        {
          "player": "Anthony Davis",
          "team": "Los Angeles Lakers",
          "status": "Questionable",
          "injury": "Left knee soreness",
          "updated": "2026-02-18T10:00:00Z",
          "source": "espn",
          "game_today": {
            "opponent": "Golden State Warriors",
            "time": "19:30 ET",
            "game_id": "nba-20260218-lal-gsw"
          },
          "status_changed": true,
          "previous_status": "Probable"
        }
      ],
      "total_injuries": 47,
      "games_today": 8,
      "affected_games": 6
    }
  }
}

Human-Readable Summary

=== INJURY REPORT — February 18, 2026 ===

--- NBA (47 injuries, 6 of 8 games affected) ---

** STATUS CHANGES **
  Anthony Davis (LAL) — Probable -> Questionable — Left knee soreness
    GAME TODAY: vs GSW at 7:30 PM ET

  Ja Morant (MEM) — Questionable -> Out — Right ankle sprain
    GAME TODAY: vs PHX at 9:00 PM ET

** ALL INJURIES (Teams Playing Today) **
  ...

Architecture

injury_monitor.py          Main orchestrator
    |
    +---> injury_sources.py    Individual source parsers (ESPN, CBS, etc.)
    |
    +---> shipp_wrapper.py     Game schedule context
    |
    +---> state.json           Last-known injury states for change detection

Error Handling

Each source is fetched independently. If ESPN is down, CBS Sports data still comes through. The report always tells you which sources succeeded and which failed, so you know the completeness of your data.

Rate Limiting

All sources are public HTML pages scraped with polite intervals:

  • Minimum 2 seconds between requests to the same domain
  • Requests timeout after 15 seconds
  • Failed sources are retried once after a 5-second delay

License

MIT


Powered by Shipp.ai real-time data

Project details


Download files

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

Source Distribution

injury_report_monitor-0.1.0.tar.gz (39.1 kB view details)

Uploaded Source

Built Distribution

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

injury_report_monitor-0.1.0-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file injury_report_monitor-0.1.0.tar.gz.

File metadata

  • Download URL: injury_report_monitor-0.1.0.tar.gz
  • Upload date:
  • Size: 39.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for injury_report_monitor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a00649324d0d09d116508b0ec20714960843ea8bd275a445b28c3855ccc1fb5d
MD5 73ce085ae2dba4be4b3e9d154fe9fd85
BLAKE2b-256 1fb9a44a3cc1cc40ecd10884e3734930f0cbb2ea1c6cbc78c2979fe1f17a3914

See more details on using hashes here.

File details

Details for the file injury_report_monitor-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for injury_report_monitor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0624cd9f21d69efb18d57f178f708f945afe318b718479ed6c693eceafb349f3
MD5 1ee5c3fbdf95f2427d2a69c8deb88a99
BLAKE2b-256 aeb7dc268f8531d295f05066972d238fb20da40ba6c6c8fe970e8084cb735a01

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page