mihomo
A simple Python Pydantic model for Honkai: Star Rail parsed data from the Mihomo API.
mihomo: a typed Python wrapper for Star Rail data
mihomo is a small Python Pydantic model for the parsed data the Mihomo API returns about Honkai: Star Rail players. It exists mainly to give that data type hints and autocompletion.
Why it exists
A simple Pydantic model over Honkai: Star Rail data from the Mihomo API. The payoff is type hints and autocompletion in your editor, so you are not guessing at field names every time. It is a thin layer, intentionally so, just enough structure to make the API output easier to work with. For a niche like game data, a typed model saves the recurring cost of looking things up, and the library is small enough to read in one sitting. Python, MIT license, with a homepage pointing into the broader wiki.
Two data formats
The API exposes two parsed formats, and the library models both. V1 uses a versioned URL, a dedicated fetch method on the client, and keeps its models in a v1 directory. V2 uses the plain URL and the main models directory. Each format has its own data model class, so code written against one stays distinct from the other. Both formats return the same kind of player information, but the library keeps them separate so callers do not mix them up by accident.
A convenience option
If you do not want to call an icon URL getter every single time, a fetch option replaces icon names with full asset URLs in the returned data. It is a small nicety that keeps image handling from turning into busywork, and it fits the library's overall goal of removing friction from the common path. There is also the icon URL getter itself on the client for when you want just one image URL at a time.
Community notes