Closed dhmistry3 closed 1 year ago
I don't know if this is the way we want the API to work. I would think playerid_lookup
should be concerned with looking up players only and not have to know anything about saving the intermediate data structures. I think because get_client
caches the client the download would happen at most once per session which at least makes the impact less tha if it downloaded every time. You can also call cahdwick_register
yourself with argument save=True
and it'll get saved and then the saved version will be used by playerid_lookup
, even though playerid_lookup
wasnt the function that did the saving.
I dunno @schorrm @TheCleric @tjburch any other thoughts?
As an environmental variable or something there should be a way to pass a parameter of True here so that the register can be saved.
https://github.com/jldbc/pybaseball/blob/master/pybaseball/playerid_lookup.py#L79