All Projects → thesadru → genshin.py

thesadru / genshin.py

Licence: MIT license
Modern API wrapper for Genshin Impact & Honkai Impact 3rd built on asyncio and pydantic. 原神 崩坏3

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to genshin.py

genshin-kit-node
原神玩家信息查询封装库 / An API wrapper for fetching player data of Genshin Impact from any servers.
Stars: ✭ 83 (-58.29%)
Mutual labels:  mihoyo, genshin-impact, hoyolab
genshinstats
A dead python library that can get the stats of Genshin Impact players using Mihoyo's API.
Stars: ✭ 217 (+9.05%)
Mutual labels:  mihoyo, genshin, genshin-impact
GenshinPlayerQuery
根据原神uid查询玩家信息(基础数据、角色&装备、深境螺旋战绩等)
Stars: ✭ 261 (+31.16%)
Mutual labels:  mihoyo, genshin, genshin-impact
GenShin-LauncherDIY
[原神启动器Plus] lightweight globalized Genshin Impact launcher. Support arbitrarily resolution ratio, account switching, client convertion, FPS unlocking and more!
Stars: ✭ 758 (+280.9%)
Mutual labels:  mihoyo, genshin, genshin-impact
GenshinImpact-AHK-flex
AHK script for Genshin Impact
Stars: ✭ 80 (-59.8%)
Mutual labels:  genshin, genshin-impact
DoMiSo-genshin
Genshin impact Lyre Automatic player
Stars: ✭ 76 (-61.81%)
Mutual labels:  genshin, genshin-impact
Teyvat.moe
A flexible, community-driven interactive website for Genshin Impact.
Stars: ✭ 137 (-31.16%)
Mutual labels:  genshin, genshin-impact
Inventory Kamera
Scans Genshin Impact characters, artifacts, and weapons from the game window into a JSON file.
Stars: ✭ 348 (+74.87%)
Mutual labels:  genshin, genshin-impact
web
The source code for the genshin.dev frontend.
Stars: ✭ 55 (-72.36%)
Mutual labels:  mihoyo, genshin
Snap.Genshin
你想要的原神全家桶
Stars: ✭ 1,924 (+866.83%)
Mutual labels:  genshin, genshin-impact
Adachi-BOT
一个在 QQ 中运行的原神助手
Stars: ✭ 185 (-7.04%)
Mutual labels:  genshin, genshin-impact
AutoMihoyoBBS
米游社自动签到,支持:崩坏二、崩坏三、原神,米游币自动获取
Stars: ✭ 528 (+165.33%)
Mutual labels:  genshin, genshin-impact
genshin-schedule
🕑 Genshin farming scheduler
Stars: ✭ 74 (-62.81%)
Mutual labels:  genshin, genshin-impact
genshin-db
npm package with searching API for Genshin Impact data of all in-game languages. Data parsed/organized directly from GenshinData repo.
Stars: ✭ 150 (-24.62%)
Mutual labels:  genshin, genshin-impact
Genshin-fishing
Genshin auto fishing
Stars: ✭ 237 (+19.1%)
Mutual labels:  genshin, genshin-impact
cocogoat
A toolbox for Genshin Impact 100% running in browser. 纯网页端的原神工具箱,保证每一行代码都是熬夜加班打造。
Stars: ✭ 571 (+186.93%)
Mutual labels:  genshin, genshin-impact
genshin-audio-exporter
Export audio files from Genshin Impact game data into different audio formats.
Stars: ✭ 83 (-58.29%)
Mutual labels:  genshin, genshin-impact
Hilipedia
丘丘语语料库与词典 Hilichurlian Corpus and Dictionary
Stars: ✭ 33 (-83.42%)
Mutual labels:  genshin, genshin-impact
GenshinImpact
This repo contains a script meant to ease and help intel players with setting up their machine to be able to play this game.
Stars: ✭ 27 (-86.43%)
Mutual labels:  genshin, genshin-impact
yas
Superfast Genshin Impact artifacts scanner
Stars: ✭ 681 (+242.21%)
Mutual labels:  genshin-impact

genshin.py

Downloads PyPI package Last Commit Coverage Discord

Modern API wrapper for Genshin Impact & Honkai Impact 3rd built on asyncio and pydantic.


Documentation: https://thesadru.github.io/genshin.py

Source Code: https://github.com/thesadru/genshin.py


The primary focus of genshin.py is convenience. The entire project is fully type-hinted and abstracts a large amount of the api to be easier to use.

Key features:

  • All data is in the form of Pydantic Models which means full autocompletion and linter support.
  • Requests are significantly faster thanks to proper usage of asyncio.
  • Chinese and Engrish names returned by the API are renamed to simpler English fields.
  • Supports the majority of the popular endpoints.
  • Cleanly integrates with frameworks like FastAPI out of the box.

Note: This library is a successor to genshinstats - an unofficial wrapper for the Genshin Impact api.

Requirements

  • Python 3.8+
  • aiohttp
  • Pydantic
pip install genshin

Example

A very simple example of how genshin.py would be used:

import asyncio
import genshin

async def main():
    cookies = {"ltuid": 119480035, "ltoken": "cnF7TiZqHAAvYqgCBoSPx5EjwezOh1ZHoqSHf7dT"}
    client = genshin.Client(cookies)

    data = await client.get_genshin_user(710785423)
    print(f"User has a total of {data.stats.characters} characters")

asyncio.run(main())

Contributing

Any kind of contribution is welcome. Please read CONTRIBUTING.md to see what you need to do to make a contribution.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].