py-mlb

An abstraction layer for the MLB.com “API”. Note: It’s an unofficial API! Calling it an API is probably a stretch, but it certainly works like one. You can use the library to retrieve detailed information on teams, players, including their game logs and yearly totals.

The project is hosted at github.

Current release.

Requirements

  • python 2.6 (2.5 will not work)
  • MySQLdb
  • libxml2

Installation (replace FILE.zip and DIRECTORY with the appropriate values):

  • unzip FILE.zip
  • cd DIRECTORY
  • python setup.py install

Examples

Some examples can be found on the project’s github Wiki.


py-gameday

A script to retrieve and parse Gameday XML data from MLB.com servers, saving it to a MySQL database. Can used to pull for an entire year or by month/day. Also supports ‘delta’ mode where it picks from where it last left off. From this original post.

The project is hosted at github.

Current release.

Requirements

Installation/Usage

Consult the github wiki.


py-retrosheet

Python script to retrieve and parse Retrosheet play-by-play files and create a MySQL database. From this original blog post.

The project is hosted at github.

Current release.

Requirements

Installation/Usage

Consult the github README.

Leave a comment

RSS feed for comments on this post