Important Notice
UPDATE (2026-03-09): hakushin-py has been unarchived because there is a revived version of it under nankoa.cc, the codebase will be updated to support the new site. However, maintenance might not be as active as before since I have dropped the reliance on hakushin API in Hoyo Buddy.
hakushin-py
Introduction
hakushin-py is an async API wrapper for hakush.in written in Python.
hakush.in is a website that displays Genshin Impact, Honkai Star Rail, Zenless Zone Zero, and Wuthering Waves game data.
Developing something for Hoyoverse games? You might be interested in other API wrappers written by me.
Note: I am not the developer of hakush.in
Important Note
This wrapper does not support all endpoints from hakush.in, it is mainly focused on fetching the beta game data. This means I selectively chose the endpoints and API fields that I personally think are useful for theorycrafting. If you want a more complete wrapper for game data, use ambry.py and yatta.py instead.
However, there is an exception for ZZZ, since Project Ambr and Yatta has no equivalent for ZZZ, this wrapper supports all endpoints for the ZZZ Hakushin API.
Wuthering Waves support is currently not planned.
Features
- Fully typed.
- Fully asynchronous by using
aiohttp, andasyncio, suitable for Discord bots. - Provides direct icon URLs.
- Supports Python 3.11+.
- Supports all game languages.
- Supports persistent caching using SQLite.
- Supports Pydantic V2, this also means full autocomplete support.
Installation
# pypi
pip install hakushin-py
# git
pip install git+https://github.com/seriaati/hakushin-py.git
Note: This wrapper changes very rapidly since the Hakushin API also changes very rapidly to keep up with the latest game data changes, so I recommend installing the git version, which has more update to date fixes.
Quick Example
import hakushin
import asyncio
async def main() -> None:
async with hakushin.HakushinAPI(hakushin.Game.GI, hakushin.Language.EN) as client:
await client.fetch_characters()
async with hakushin.HakushinAPI(hakushin.Game.HSR, hakushin.Language.JA) as client:
await client.fetch_light_cones()
async with hakushin.HakushinAPI(hakushin.Game.ZZZ, hakushin.Language.KO) as client:
await client.fetch_weapons()
asyncio.run(main())
Getting Started
Read the documentation to learn more about on how to use this wrapper.
Questions, Issues, Feedback, Contributions
Whether you want to make any bug reports, feature requests, or contribute to the project, simply open an issue or pull request in this repository.
If GitHub is not your type, you can find my contact information on my GitHub profile.
Metadata
Release files for hakushin-py 0.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hakushin_py-0.6.1.tar.gz | 61.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hakushin_py-0.6.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 128.7 kB
Release files / hakushin_py-0.6.1.tar.gz
| Download URL | hakushin_py-0.6.1.tar.gz |
|---|---|
| Size | 61.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf698f2e50bede1f4d783c3d602ef3329e8960931c201a128d864e035a748b3e
|
|
BLAKE2b-256 checksum How to use checksums |
f058277e195649622779e63584637f6d612d1cc4cfe888df80fc061aa2079096
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / hakushin_py-0.6.1-py3-none-any.whl
| Download URL | hakushin_py-0.6.1-py3-none-any.whl |
|---|---|
| Size | 67.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
205c4ad689077610e937321f3ff8dbe200fbf4e7c0fecb9891245406550688f8
|
|
BLAKE2b-256 checksum How to use checksums |
9161ae27765821334ac238eee53f8a7f343337b65dddfab13e999fd82c7f6dc0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|