Build a Discord bot that displays a player's Honkai: Star Rail character roster and stats on demand.
Create a stats-tracking website that logs player progression over time and shows character level trends.
Make a profile viewer tool that fetches and displays formatted player account info and character details.
Mihomo is a Python library that makes it easy to retrieve and work with player data from Honkai: Star Rail, a video game, via an unofficial public API. The API returns information about a player's account and their in-game characters, things like character names, levels, rarities, and image URLs, in a structured format. The library wraps that API response in Python data models built with Pydantic, a tool that enforces data types and provides editor autocompletion. This means when you write Python code against the library, your editor knows exactly what fields are available on each object, which reduces errors. It supports two API response formats (V1 and V2) and handles asynchronous requests, meaning it can fetch data without blocking the rest of a program while waiting for the network response. It also includes small utility functions to clean up the data, for example, removing duplicate character entries or merging two snapshots of a player's character roster. The data can be saved and reloaded in formats like JSON or pickle (a Python-native binary format). Someone would use this library if they are building a bot, a stats-tracking website, or a display tool that shows Honkai: Star Rail player profiles.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.