zbaseball-client
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
- Create a free account @ zBaseballData & confirm your email
- Install the Python Client
pip install zbaseballdata
- Initialize a client
from zbaseballdata.client import ZBaseballDataClient
# Supply the credentials you used during the sign-up process
client = ZBaseballDataClient(username="USERNAME", password="PASSWORD")
- 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'}]
"""