Skip to main content

Async API wrapper for Enka Network written in Python, supports GI and HSR.

Project description

enka.py

Introduction

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.

Features

  • Fully typed.
  • Fully asynchronous by using aiofiles, aiohttp, and asyncio, 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.

Installation

I know it's annoying that the project is named enka-py but the package is named enka-api, but package name enka-py was already taken on PyPI.

# poetry
poetry add enka-api

# pip
pip install enka-api

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 wiki 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


Download files

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

Source Distribution

enka_api-2.2.7.tar.gz (77.5 kB view details)

Uploaded Source

Built Distribution

enka_api-2.2.7-py3-none-any.whl (58.4 kB view details)

Uploaded Python 3

File details

Details for the file enka_api-2.2.7.tar.gz.

File metadata

  • Download URL: enka_api-2.2.7.tar.gz
  • Upload date:
  • Size: 77.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.18

File hashes

Hashes for enka_api-2.2.7.tar.gz
Algorithm Hash digest
SHA256 25b57fe95146edff9ccb6f75831480c770835ed54384314d5be4acee63112948
MD5 2a2ce4ece379cb313882b5bc85cc0204
BLAKE2b-256 0f94c05945db521d1e97804f8aacedbfc0777f7a8577eea8d5f11c409ee89684

See more details on using hashes here.

Provenance

File details

Details for the file enka_api-2.2.7-py3-none-any.whl.

File metadata

File hashes

Hashes for enka_api-2.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 50ae41dd3e182be2d79f612e3b7e48816dd3f660213d53e575a4ee8b793c635c
MD5 45fb1a3f2c8031e0493862ee4e47b1c8
BLAKE2b-256 94861cd991c09bc9b6b0eba2d627b017cee8d8a8cdb7197843a971100a87d418

See more details on using hashes here.

Provenance

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