Skip to main content

enka.py

⚠️ Notice: Package Renaming

Important Announcement:

The enka-api package has been deprecated and is now replaced by the new package named enka.

What You Need to Know

  • New Package: Please install the new package using the following command:
  • 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.

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

pip install enka

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.

Metadata

Release files for enka-api 2.4.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for enka-api 2.4.4
File Size Uploaded
enka_api-2.4.4.tar.gz 99.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for enka-api 2.4.4
File Interpreter ABI Platform
enka_api-2.4.4-py3-none-any.whl Python 3 none any Details

Total release size: 159.6 kB

Release files / enka_api-2.4.4.tar.gz

Download URL enka_api-2.4.4.tar.gz
Size 99.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8641a3878b4630c7b1f1f484efe4ff6286abc293d22a711effadb4524c726628
BLAKE2b-256 checksum
How to use checksums
acdda5011d04846dbb256a4e4e3fa793313c6357d99d990385805ca218abc2cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.11

Release files / enka_api-2.4.4-py3-none-any.whl

Download URL enka_api-2.4.4-py3-none-any.whl
Size 60.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
41d19679201c15aa02f92d8941aabdb523fd07f0e8497a1325a7714a33b49030
BLAKE2b-256 checksum
How to use checksums
a337b0c6633708023db069c89998167dbf2b60c31371f6470704ecf1bda90084
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.11

Release history Release notifications | RSS feed

This release

2.4.4 This release

2 release files

2.4.3

2 release files

2.4.2

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.0

2 release files

2.2.7

2 release files

2.2.6

2 release files

2.2.5

2 release files

2.2.4

2 release files

2.2.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page