Mihomo is a Python Pydantic model designed to parse data from the Mihomo API for Honkai: Star Rail. It provides type hints and autocompletion support, facilitating efficient integration of game data into projects.
Key Features:
Two Parsed Data Formats: Offers both V1 and V2 formats for flexibility.
Type Hints & Autocompletion: Enhances developer efficiency with robust Python support.
Character Tools: Includes utilities like removing duplicates and merging datasets.
Data Persistence: Supports saving and reloading data using pickle and JSON.
Audience & Benefit:
Ideal for Python developers working with Honkai: Star Rail data, Mihomo streamlines data parsing and management. It enables efficient integration into projects, reducing development time and effort.
Installation: Available via winget for easy setup.
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)