Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seriaati/enka-py
An async API wrapper for enka.network written in Python.
https://github.com/seriaati/enka-py
api-wrapper asyncio enka-network enkanetwork genshin-impact python
Last synced: 9 days ago
JSON representation
An async API wrapper for enka.network written in Python.
- Host: GitHub
- URL: https://github.com/seriaati/enka-py
- Owner: seriaati
- License: gpl-3.0
- Created: 2024-01-07T14:04:17.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-04-22T23:46:36.000Z (7 months ago)
- Last Synced: 2024-04-23T13:41:03.169Z (7 months ago)
- Topics: api-wrapper, asyncio, enka-network, enkanetwork, genshin-impact, python
- Language: Python
- Homepage:
- Size: 408 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# enka.py
## Introduction
enka.py is an async API wrapper for [enka.network](https://enka.network/) written in Python.
You can find the API docs for Enka Network [here](http://api.enka.network/).
Developing something for Hoyoverse games? You might be interested in [other API wrappers](https://github.com/seriaati#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](https://github.com/pydantic/pydantic), this also means full autocomplete support.
- Seamlessly integrates with [GenshinData](https://gitlab.com/Dimbreath/AnimeGameData) and [StarRailData](https://github.com/Dimbreath/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.
```bash
# poetry
poetry add enka-api# pip
pip install enka-api
```## Quick Example
```py
import enka
import asyncioasync 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](https://github.com/seriaati/enka-py/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](https://discord.com/invite/b22kMKuwbS), my username is @seria_ati.