zbaseballdata

A python client for the zBaseballData API


Keywords
client, retrosheet, python, api, zbaseballdata, baseball, data, zbaseball
License
MIT
Install
pip install zbaseballdata==0.2.0

Documentation

zbaseball-client

PyPI version

A python client for the zBaseballData API.

"Retrosheet Data as a Service"

Data Disclaimer

 The information used here was obtained free of
 charge from and is copyrighted by Retrosheet.  Interested
 parties may contact Retrosheet at "www.retrosheet.org".

Note

This is a simple client and still being developed. It might have bugs, and we don't have a lot of tests. This will change.

Getting Started

  1. Create a free account @ zBaseballData & confirm your email
  2. Install the Python Client
pip install zbaseballdata
  1. Initialize a client
from zbaseballdata.client import ZBaseballDataClient

# Supply the credentials you used during the sign-up process
client = ZBaseballDataClient(username="USERNAME", password="PASSWORD")
  1. Begin Pulling Data
from pprint import pprint
players = list(client.get_players(search='jeter'))
pprint(players)

"""
[{'retro_id': 'jeted001',
  'first_name': 'Derek',
  'last_name': 'Jeter',
  'debut': datetime.date(1995, 5, 29),
  'throw': 'R',
  'bat': 'R'},
 {'retro_id': 'jetej101',
  'first_name': 'Johnny',
  'last_name': 'Jeter',
  'debut': datetime.date(1969, 6, 14),
  'throw': 'R',
  'bat': 'R'},
 {'retro_id': 'jetes001',
  'first_name': 'Shawn',
  'last_name': 'Jeter',
  'debut': datetime.date(1992, 6, 13),
  'throw': 'R',
  'bat': 'L'}]
"""