GitPedia
toddrob99

toddrob99/MLB-StatsAPI

Python wrapper for MLB Stats API

30 Releases
Latest: 1y ago
v1.9.0Latest
toddrob99toddrob99·1y ago·April 4, 2025
GitHub

📋 Changes

  • New uniform endpoints `game_uniforms` and `team_uniforms` (#154)
  • `schedule()` supports the `season` argument to get an entire season's games at once (#149)
  • `player_stats()` and `player_stats_data()` support the `season` argument to get previous seasons of stats (#161)
  • `get()` now accepts a `requests_kwargs` dict which are passed as extra arguments to `requests.get()` (#159)
  • Fixed the offseason behavior of the `latest_season()` function to return the upcoming season, not just whatever the most recent in MLB's data is (#157)
  • `schedule()` supports passing `include_series_status=False` to not request the series status from the endpoint, which can fail when requesting schedules covering large periods of time (#158)
v1.8.1
toddrob99toddrob99·1y ago·November 1, 2024
GitHub

enh: stats endpoint supports startDate and endDate parameters #148 **Full Changelog**: https://github.com/toddrob99/MLB-StatsAPI/compare/v1.8...v1.8.1

v1.8
toddrob99toddrob99·1y ago·October 26, 2024
GitHub

📋 What's Changed

  • Split search input by word by @ap-ack in https://github.com/toddrob99/MLB-StatsAPI/pull/143
  • v1.8 by @toddrob99 in https://github.com/toddrob99/MLB-StatsAPI/pull/147
  • enh: add season to schedule endpoint config #146
  • enh: add season parameter to divisions endpoint #141
  • enh: add default value to get() params parameter #145

New Contributors

  • @ap-ack made their first contribution in https://github.com/toddrob99/MLB-StatsAPI/pull/143
  • Full Changelog: https://github.com/toddrob99/MLB-StatsAPI/compare/v1.7.2...v1.8
v1.7.2
toddrob99toddrob99·2y ago·April 29, 2024
GitHub

📋 Changes

  • Enhance lookup_player() to support using regular ascii characters when searching for players with accented and diacritical characters in their names (e.g. search for Acuna and get Acuña in the results)
  • Version: 1.7.2
  • Code formatting
v1.7.1
toddrob99toddrob99·2y ago·December 18, 2023
GitHub

📋 Changes

  • fix: boxscore_data incorrect batting notes #131
  • enh: add support for leagueId to schedule function #132
  • ver: 1.7.1
v1.7
toddrob99toddrob99·2y ago·October 10, 2023
GitHub

enh: latest_season should ret current season https://github.com/toddrob99/MLB-StatsAPI/issues/127 fix: draft url missing slash https://github.com/toddrob99/MLB-StatsAPI/pull/126 fix: default draft to current year https://github.com/toddrob99/MLB-StatsAPI/pull/126 ver: 1.7

v1.6.2
toddrob99toddrob99·2y ago·July 29, 2023
GitHub

enh: support division id in standings() and standings_data() https://github.com/toddrob99/MLB-StatsAPI/issues/115 ver: 1.6.2

v1.6.1
toddrob99toddrob99·3y ago·March 6, 2023
GitHub

fix: handle missing highlights in schedule method fix: handle missing eliminationNumber and ranks in standings data ver: 1.6.1

v1.6
toddrob99toddrob99·3y ago·November 12, 2022
GitHub

Enh: Add series_status to schedule https://github.com/toddrob99/MLB-StatsAPI/pull/95 (thanks @WardBrian) Fix: Error in schedule method when team score or name are missing https://github.com/toddrob99/MLB-StatsAPI/issues/96

v1.5.1
toddrob99toddrob99·3y ago·August 13, 2022
GitHub

fix: Attribute Error - Function: lookup_team #91

v1.5
toddrob99toddrob99·3y ago·August 10, 2022
GitHub

📋 Changes

  • Add national broadcasts to schedule() result; thanks @WardBrian #71
  • Add support for sportId to player_stat_data() #87
  • Add latest_season() method to look up the latest season for a given sportId
  • Default to latest season instead of current calendar year for lookup_player() and lookup_team() #33
v1.4.2
toddrob99toddrob99·4y ago·April 8, 2022
GitHub

📦 v1.4.2

  • fix: MLB changed pitchesThrown to numberOfPitches

📦 v1.4.1

  • fix: box data error if pitcher has 0 pitches

📦 v1.4

  • fix(endpoints): missing sportId param on teams
  • new(endpoints): added transactions
v1.3
toddrob99toddrob99·4y ago·July 9, 2021
GitHub

FIX: last_game() and next_game() should actually work now FIX: typo in homeRunDerby endpoint URL ENH: added note to stats endpoint about default limit

v1.2
toddrob99toddrob99·5y ago·May 9, 2021
GitHub

NEW: Added support for team_stats endpoint … ENH: Added *.ipynb to .gitignore VER: 1.2

v1.1
toddrob99toddrob99·5y ago·April 3, 2021
GitHub

ENH: Python 2 support has been removed ENH: Added leagueRank and sportRank to `standings_data()` VER: 1.1

v1.0.1
toddrob99toddrob99·5y ago·August 28, 2020
GitHub

FIX: Error in player_stats_data on missing MLB Debut Date #49 REM: Remove Python 2.7 from setup.py in prep for dropped support

v1.0.0
toddrob99toddrob99·5y ago·August 13, 2020
GitHub

ENH: Raise HTTPError instead of ValueError when API requests fail ENH: Test improvements VER: 1.0.0

v0.1.9
toddrob99toddrob99·5y ago·July 26, 2020
GitHub

FIX: game_scoring_plays() and game_scoring_play_data() broken due to MLB data change #44

v0.1.8
toddrob99toddrob99·5y ago·July 19, 2020
GitHub

VER: v0.1.8 FIX: Add missing startDate and endDate params to teams_stats endpoint config ENH: Include venue id and name in the schedule return data NEW: Support warning for Python 2 - Support will be dropped on/after Jan 1, 2021

v0.1.7
toddrob99toddrob99·6y ago·May 9, 2020
GitHub
v0.1.6
toddrob99toddrob99·6y ago·May 9, 2020
GitHub
v0.1.5
toddrob99toddrob99·6y ago·November 9, 2019
GitHub

📋 Changes

  • Update required params for team_roster endpoint #29
  • Leading & trailing slashes not honored in endpoint config #28
  • Testing #22
  • Add requirements.txt files
  • Clean up code formatting
v0.1.4
toddrob99toddrob99·6y ago·October 25, 2019
GitHub

Standardize code formatting using black, and add flake8 linter config.

v0.1.3
toddrob99toddrob99·6y ago·October 18, 2019
GitHub

📋 Changes

  • #18 Definition for seasons endpoint is missing season parameter
  • #20 Update endpoint requirements for stats_streaks
  • #19 Use logging module instead of print for debug info
  • Added more fields to boxscore and standings data functions
v0.1.2
toddrob99toddrob99·6y ago·September 3, 2019
GitHub

FIX: Missing new data fields in header row records of boxscore_data() #16

v0.1.1
toddrob99toddrob99·6y ago·September 2, 2019
GitHub

Include more data in boxscore_data(). For pitchers, include p:pitchesThrown and s:strikes. For batters, include: obp, slg, name, position, note, substitution (true/false), battingOrder, and personId.

v0.1.0
toddrob99toddrob99·6y ago·September 2, 2019
GitHub

📋 Changes

  • Added some functions to return data instead of only formatted text
  • Fixed league_leaders() and example code that stopped working due to MLB removing support for the statsSingleSeason statType (now using career leaders instead of single season leaders) #12
v0.0.9
toddrob99toddrob99·7y ago·June 28, 2019
GitHub

FIX: season param should not be required for standings endpoint FIX: protect against missing decisions data in schedule()

v0.0.8
toddrob99toddrob99·7y ago·May 8, 2019
GitHub

📋 Changes

  • FIX: Error in schedule() when probable pitcher is missing #6
  • FIX: Error in schedule() when linescore is missing (postponed games) #7
v0.0.7
toddrob99toddrob99·7y ago·May 4, 2019
GitHub

📦 v0.0.7

  • Added MLB copyright notice to README
  • Added ability to call schedule() for specific game_id(s) (comma separated string)
  • Added current inning to summary for schedule() when game is in progress, and status will now always be included
  • Added ability to get standings for a given division, and to exclude wildcard standings