Async API wrapper for Enka Network written in Python, supports GI, HSR, and ZZZ.
Project description
enka.py
⚠️ Notice: Package Renaming
The enka-api package has been deprecated and is now replaced by the new package named enka.
Please install the new package:
pip install enka
The enka-api package will continue to be available, but new updates will be released in the enka package, so I encourage you to transition to the new package as soon as possible.
Introduction
enka.py is an async API wrapper for Enka Network written in Python.
Developing something for Hoyoverse games? You might be interested in other API wrappers written by me.
Features
- 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 Genshin Impact, Honkai Star Rail, and Zenless Zone Zero.
- Supports persistent caching using SQLite and allows custom caching strategies.
- Implements stat calculations for HSR and ZZZ.
- Uses Pydantic v2, this also means full autocomplete support.
- Seamlessly integrates with GenshinData, StarRailData, and ZenlessData.
Installation
pip install enka
With optional dependencies:
# For SQLite caching
pip install enka[sqlite]
# For Redis caching
pip install enka[redis]
Quick Example
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())
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 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file enka-2.5.16.tar.gz.
File metadata
- Download URL: enka-2.5.16.tar.gz
- Upload date:
- Size: 59.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bace62d48fe451bcd33f736dd476d98f761afc31d15eaa994b37a37ceb307e40
|
|
| MD5 |
5c61cf01ab65efa10b39bbad509aa7fc
|
|
| BLAKE2b-256 |
2f19321b8b121c008ea4da0592439bf209ad08b38d9e11851fe1730fe2e8c007
|
File details
Details for the file enka-2.5.16-py3-none-any.whl.
File metadata
- Download URL: enka-2.5.16-py3-none-any.whl
- Upload date:
- Size: 69.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
722d5c8962de8a199bfc961e7e7d902708689159f542e81e09f1ca6d6371764b
|
|
| MD5 |
b8ca9cb0a5b8058b3eac575a9d4b3479
|
|
| BLAKE2b-256 |
9dcfd54e05ecf46afd66581074de69c3c744afff43b24d2b03541afa253df6d7
|