Mihomo is a Python library designed to provide structured data models for Honkai: Star Rail parsed data from the Mihomo API. It simplifies integration with game-related applications by offering type hints and autocompletion support.
Key Features:
Support for two data formats (V1 and V2) with comprehensive parsing capabilities.
Multi-language compatibility, allowing users to retrieve data in various languages.
Tools for managing character data, such as removing duplicates and merging updates.
Data persistence options using pickle and JSON serialization for efficient storage.
Audience & Benefit:
Ideal for Python developers, game researchers, and enthusiasts working with Honkai: Star Rail data. Mihomo enables seamless integration of game statistics into applications, streamlining development workflows and enhancing productivity. It can be installed via pip.
README
mihomo
A simple python pydantic model (type hint and autocompletion support) for Honkai: Star Rail parsed data from the Mihomo API.
If you don't want to use client.get_icon_url to get the image url everytime, you can use client.fetch_user(800333171, replace_icon_name_with_url=True) to get the parsed data with asset urls.
data = await client.fetch_user(800333171)
data = tools.remove_duplicate_character(data)
Merge Character Data
old_data = await client.fetch_user(800333171)
# Change characters in game and wait for the API to refresh
# ...
new_data = await client.fetch_user(800333171)
data = tools.merge_character_data(new_data, old_data)