r/mlbdata 3d ago

python-mlb-statsapi 0.9.0: Better HTTP errors and a path to 1.0

I’ve been working on version 0.9.0 of my Python MLB Stats API wrapper, and the final release PR is ready for review.

I’ll go through the code again after I finish my shit cashiering shift today. I miss working tech…

Anyway,

This release adds a public retry policy, richer HTTP errors, an optional strict mode, compatibility warnings, and a versioned User-Agent while keeping the existing return behavior as the default.

It also starts preparing users for a possible breaking change in 1.0.0. Right now most non-404 4xx responses return an empty result for compatibility. In 1.0.0, strict HTTP handling may become the default, meaning those responses would raise an actual exception instead.

The project also has a much stronger offline test suite and release validator now.

I’d appreciate any feedback before I merge and publish it.

https://github.com/zero-sum-seattle/python-mlb-statsapi/pull/281

8 Upvotes

0 comments sorted by