jldbc / pybaseball

Pull current and historical baseball statistics using Python (Statcast, Baseball Reference, FanGraphs)
MIT License
1.23k stars 330 forks source link

Make parallel statcast requests optional #207

Closed reddigari closed 3 years ago

reddigari commented 3 years ago

Adds a parallel parameter to pybaseball.statcast(). If False, requests will be made sequentially rather than through a ProcessPoolExecutor.

The motivation for this is that I was trying to call the function in an AWS lambda function, where all multiprocessing is disabled. This might be a somewhat niche use case, so no worries if you don't want it. I didn't look into covering it in the tests, but I'm happy to.

schorrm commented 3 years ago

Seems fair enough

schorrm commented 3 years ago

Looks good, can you just update the docs to match?

schorrm commented 3 years ago

LGTM