Skip to main content

Async API wrapper for hakush.in written in Python.

Project description

hakushin-py

Quick links

Developing something for Hoyoverse games? Here's a collection of Python async API wrappers for Hoyoverse games made by me:

  • enka.py is an Enka Network API wrapper for fetching in-game showcase.
  • yatta.py is a Project Yatta API wrapper for fetching Honkai Star Rail game data.
  • ambr.py is a Project Ambr API wrapper for fetching Genshin Impact game data.
  • hakushin.py is a Hakushin API wrapper for fetching Genshin Impact and Honkai Star Rail beta game data.

Introduction

hakushin-py is an async API wrapper for hakush.in written in Python.
Hakush.in is a website that displays beta game data for Genshin Impact and Honkai Star Rail.

Note: I am not the developer of hakush.in

Features

  • Fully typed.
  • Fully asynchronous by using aiofiles, aiohttp, and asyncio, suitable for Discord bots.
  • Provides direct icon URLs.
  • Supports Python 3.11+.
  • Supports all game languages.
  • Supports both Genshin Impact and Honkai Star Rail.
  • Supports persistent caching using SQLite.
  • Supports Pydantic V2, this also means full autocomplete support.

Installation

# poetry
poetry add hakushin-py

# pip
pip install hakushin-py

Quick Example

import hakushin
import asyncio

async def main() -> None:
    async with hakushin.HakushinAPI(hakushin.Language.EN) as client:
        await client.fetch_new(hakushin.Game.GI)

asyncio.run(main())

Getting Started

Read the wiki to learn more about on how to use this wrapper.

Questions, Issues, Contributions

For questions, you can contact me on Discord or open an issue.
To report issues with this wrapper, open an issue.
To contribute, fork this repo and submit a pull request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hakushin_py-0.2.0.tar.gz (23.5 kB view details)

Uploaded Source

Built Distribution

hakushin_py-0.2.0-py3-none-any.whl (28.8 kB view details)

Uploaded Python 3

File details

Details for the file hakushin_py-0.2.0.tar.gz.

File metadata

  • Download URL: hakushin_py-0.2.0.tar.gz
  • Upload date:
  • Size: 23.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.11 Windows/10

File hashes

Hashes for hakushin_py-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0c194210af55ffe937777010293fd75c5b29ea8934f522fad225140aaeeee289
MD5 936e13332e71e4b11ff244a76ce82cb0
BLAKE2b-256 1e36cb3521ff3c06bb78980f806e4bc09c67b88d370a5b877f25ca0463ece9b3

See more details on using hashes here.

File details

Details for the file hakushin_py-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: hakushin_py-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 28.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.11 Windows/10

File hashes

Hashes for hakushin_py-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2315d473e8e1751b5eebbbfe5e91fb9083c86c5a4d1fae8b1278de5660a4564
MD5 50e99d02dde7717fd2dce21f32cfb36b
BLAKE2b-256 3c5b3a0c36608f39936f09dc0b5ffd47772ea03e6de1d5428646f23bfa106023

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page