Skip to main content

akasha-py

Introduction

akasha-py is an async API wrapper for akasha.cv written in Python.
akasha.cv is a Genshin Impact leaderboard website.
Developing something for Hoyoverse games? You might be interested in other API wrappers written by me.

Note: I am not the developer of akasha.cv.

Important Notes

A couple things I want to address:

  • This wrapper is currently in-progress, some features may not work as expected, many features are also missing.
  • The developer of akasha.cv mentioned to me that they change their API very frequently (and without notice), so this wrapper may break at any time.
  • This wrapper was made because I wanted to integrate akasha into my Discord bot, but I eventually stopped working on it. Therefore, this wrapper is not my current priority, but I will fix issues if you submit them.

Installation

# poetry
poetry add akasha-py

# pip
pip install akasha-py

Usage

Interact with the API using the akasha.AkashaAPI class.
You can find all available methods that AkashaAPI provides in the client.py file.
A quick example is provided below:

import asyncio

import akasha


async def main() -> None:
    uid = 901211014
    async with akasha.AkashaAPI(akasha.Language.CHINESE_SIMPLIFIED) as api:
        # await api.refresh_user(uid)

        characters = await api.get_calculations_for_user(uid)
        for character in characters:
            calc = character.calculations[0]

            print(f"Character: {character.name}")
            print(f"Weapon: {calc.weapon.name}")
            print(f"Top {calc.top_percent:.2f}% ({calc.ranking}/{calc.out_of})")
            print(f"Damage: {round(calc.result)}")
            print()

            print("Leaderboard top 3:")
            async for board in api.get_leaderboards(calc.id, max_page=1, page_size=3):
                print(
                    f"{board.rank}. {board.owner.nickname} | Damage: {round(board.calculation.result)}"
                )
            print(f"Leadboard URL: https://akasha.cv/leaderboards/{calc.id}")

            print("=" * 50)


asyncio.run(main())

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 akasha-py 0.3.0

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

Source distribution (sdist)

Source distribution for akasha-py 0.3.0
File Size Uploaded
akasha_py-0.3.0.tar.gz 35.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for akasha-py 0.3.0
File Interpreter ABI Platform
akasha_py-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 62.6 kB

Release files / akasha_py-0.3.0.tar.gz

Download URL akasha_py-0.3.0.tar.gz
Size 35.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8523b9c76073d893ace351333bad830a4c844f3627df767ceb6a216fdfbe6668
BLAKE2b-256 checksum
How to use checksums
ff0470b332d4d0f92f0231f19bfb1f842d283081220eebbb3132a2c7fe3b36b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.17

Release files / akasha_py-0.3.0-py3-none-any.whl

Download URL akasha_py-0.3.0-py3-none-any.whl
Size 27.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8cf1356e43cd9bc6c2dd65fbbaec6ef25a0018c44caeed26ce6c9d53d5628c9
BLAKE2b-256 checksum
How to use checksums
33ca412d0c70de5fe320ddafe774822a987ebe1d06cf336ebe81bf2bb762a48f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.17

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.11

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

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