python-mlb-statsapi 1.1.2¶
Version 1.1.2 fixes parsing of MLB data objects when the API omits an expected code value.
Data model fix¶
CodeDesc.code is now optional.
Some MLB Stats API responses contain a code-description object with a description but no code. For example, play-by-play data may contain a type with a description of "Unknown" while omitting the corresponding code entirely.
Previous versions treated code as required, causing Pydantic validation to reject the response. Version 1.1.2 accepts these payloads and represents the missing code as None.
Normal API usage is unchanged:
This is a backward-compatible model correction and requires no application changes.
The fix was introduced in #343.
Python support¶
python-mlb-statsapi requires Python >=3.10.
CI validates Python 3.10 through 3.14 (3.10, 3.11, 3.12, 3.13, and 3.14).