What is this?
It is a Python library built on Pydantic that models and parses the data returned by the Mihomo API for Honkai: Star Rail, giving you typed, autocomplete-friendly access to a player's parsed character and showcase info.
Is this a standalone app or a library I import into my code?
It is a pure Python library you import and call directly, not an app or server; you create a client and call methods like fetchuser or fetchuserv1 to get parsed Pydantic model objects.
How do I fetch a player's Honkai: Star Rail data with this?
After installing, call client.fetchuser(800333171) for the V2 schema or client.fetchuserv1(800333171) for the older V1 schema, passing the player's in-game UID.
Do I need to fetch asset icon URLs separately myself?
No, you can skip that step by calling client.fetchuser(800333171, replaceiconnamewithurl=True), which fills in the asset URLs automatically instead of requiring a separate client.geticonurl call.
What's the difference between the V1 and V2 data formats?
V1 and V2 are two separate parsed schemas from the Mihomo API with their own models (StarrailInfoParsedV1 vs StarrailInfoParsed) and fetch methods, defined under separate directories inside mihomo/models.
What utility tools does the library ship with besides fetching data?
The mihomo.tools module includes helper functions to remove duplicate characters and to merge character data from multiple fetches.
Can I save fetched player data locally?
Yes, the README shows a data persistence example using Python's pickle and json modules to store and reload parsed data.
What are similar projects?
django-rest-framework, retrofit, pydantic, ItChat, Telethon, paper-docx, sheetjs, notebooklm-py