Important Announcement:
The enka-api
package has been deprecated and is now replaced by the new package named enka
.
- New Package: Please install the new package using the following command:
pip install enka
- Deprecation Details: The
enka-api
package will continue to be available for a limited time, but we encourage you to transition to the new package as soon as possible.
enka.py is an async API wrapper for enka.network written in Python.
You can find the API docs for Enka Network here.
Developing something for Hoyoverse games? You might be interested in other API wrappers written by me.
- Fully typed.
- Fully asynchronous by using
aiofiles
,aiohttp
, andasyncio
, suitable for Discord bots. - Provides direct icon URLs.
- Supports Python 3.10+.
- 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.
- Seamlessly integrates with GenshinData and StarRailData.
pip install enka
import enka
import asyncio
async def main() -> None:
async with enka.GenshinClient(enka.gi.Language.ENGLISH) as client:
response = await client.fetch_showcase(901211014)
print(response.player.nickname)
print(response.characters[0].name)
asyncio.run(main())
Read the wiki to learn more about on how to use this wrapper.
Whether you want to make any bug reports, feature requests, or contribute to the wrapper, simply open an issue or pull request in this repository.
If GitHub is not your type, you can find me on Discord, my username is @seria_ati.