Skip to main content

An API to retrieve and read MLB GameDay JSON and XML data

Project description

mlbgame

mlbgame is an API to read MLB GameDay XML and JSON data. mlbgame works with real time data, getting information as games are being played.

mlbgame uses the same data that MLB GameDay uses, and therefore is updated as soon as something happens in a game.

mlbgame currently comes pre-loaded with every game from 2012 to the end of the 2015 season, but will be updated regularly during the season. Therefore, accessing this data does not actually make a request to mlb.com

If you try to get data from a game that is not cached, mlbgame will download the data from mlb.com.

mlbgame documentation

mlbgame on Github (Source Code) (Leave a star!)

Updating the Game Database

Since games happen every day, new game data exists that is not stored on disk from the original install. The database can be updated by running the following command:

mlbgame-update-games

There are some optional arguments that will cache extra data that is not included with the original install. This extra data may take up a lot of disk space, so only cache if you really need it (it will make processes much faster). If this data is not cached, mlbgame will make a request to mlb.com every time you try to access the data.

usage: mlbgame-update-games <arguments>

Arguments:
-h (--help)             display this help menu
--hide                  hides output from update script
--box_score             caches the box scores from every game
--start_date <year>     year to start updating from (runs until current day)

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

mlbgame-0.2.2.tar.gz (1.2 MB view details)

Uploaded Source

File details

Details for the file mlbgame-0.2.2.tar.gz.

File metadata

  • Download URL: mlbgame-0.2.2.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mlbgame-0.2.2.tar.gz
Algorithm Hash digest
SHA256 c21619c2d0f585fba3e6478c8d26562f0c3ff8a9863f5383e3fa6d75f7282ac2
MD5 071e2b17971276807de0d72388787e92
BLAKE2b-256 ae44fa9fed3e8f007d4f5dde5b09f53adf6b99a74fb41354621646515ea4fc30

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