
mihomo
Python models for parsing Honkai: Star Rail player data from the Mihomo API
- Stars
- 35.4k
- Forks
- 4.7k
- Licence
- MIT
- Language
- Python
- Last update
- 7 days ago
- Type
- Library
What it is
This Python package fetches Honkai: Star Rail player data from the Mihomo API and returns it as typed Pydantic models, so code editors can autocomplete fields. The README describes fetching a player by UID in two data formats, V1 and V2. The repository is named MetaCubeX/mihomo and its listed release files are Windows binaries, so the README and repo metadata do not clearly describe the same project.
- Fetch a player's name, level and character list by UID
- Convert icon names into asset URLs with replace_icon_name_with_url=True
- Remove duplicate characters from fetched data with tools.remove_duplicate_character
- Merge an older snapshot with a newer one using tools.merge_character_data
- Save fetched data to JSON or pickle and load it back
Great for
- Developers building Honkai: Star Rail fan tools or dashboards
- Python users who want typed, autocompleting player data
- People who want to save parsed player data as JSON or pickle
- Developers who need character icon or asset URLs
Not ideal for
- Non-programmers, because the package is used through Python code (the README gives no GUI or command-line use)
- People looking for a proxy or Clash-style kernel, because the release files and repo name point to a different kind of software and the README does not explain that link
- Users of games other than Honkai: Star Rail, because the README covers only that game
How to get it
- 1
Install with a package manager
You'll need: Python (version not stated in README) · pip
Install from the README (KT-Yeh fork)
pip install -U git+https://github.com/KT-Yeh/mihomo.git - 2
Run it
- Run the install command from the README.
- Create a client with MihomoAPI(language=Language.EN).
- Call await client.fetch_user(UID) with a player UID.
- Print fields such as data.player.name and data.characters.
- 3
Get the most out of it
- Use replace_icon_name_with_url=True to get asset URLs directly in the fetched data.
- Use tools.merge_character_data to compare snapshots taken before and after in-game changes.
- Save data with data.json(by_alias=True, ensure_ascii=False) and reload it with StarrailInfoParsed.parse_raw.
Downloads
Strengths
- Typed Pydantic models with type hints and autocompletion, as the README states
- Short, runnable example code in the README
- Includes helpers for saving, reloading and merging data
Trade-offs
- Identity is unclear: the repo name, description, and Windows release files point to a different project than the README
- The install command in the README points to a KT-Yeh fork, not the MetaCubeX repository
- Depends on the external Mihomo API, and the README does not describe its availability or rate limits
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| mihomo (this) | 35.4k | Library | intermediate | 7 days ago | Developers building Honkai: Star Rail fan tools or dashboards |
| clashctl | 15.1k | CLI | intermediate | 9 days ago | Linux users comfortable with the terminal who want a command-driven Clash setup |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.