Skip to main content

Python wrapper library providing LoL ddragon data asynchronously

Project description

pyddragon

Python wrapper library providing LoL ddragon data asynchronously (On dev)

Installation

pip install pyddragon

Example Code

import asyncio

from pyddragon.ddragon import Ddragon


async def main():
    async with Ddragon() as dd:
        ch_by_name = await dd.get_champion("Aurelion Sol", "name")
        ch_by_id = await dd.get_champion("AurelionSol")
        ch_by_key = await dd.get_champion(136)

        print(f"{ch_by_name.name} - {ch_by_name.id} - {ch_by_name.key}")
        print(f"{ch_by_id.name} - {ch_by_id.id} - {ch_by_id.key}")
        print(f"{ch_by_key.name} - {ch_by_key.id} - {ch_by_key.key}")
        print(f"\n{ch_by_name.blurb}\n")

        it_by_name = await dd.get_item("Sorcerer's Shoes")
        it_by_id = await dd.get_item(3020)

        print(f"{it_by_name.name} - {it_by_name.id}")
        print(f"{it_by_id.name} - {it_by_id.id}")
        print(f"\n{it_by_name.plaintext}\n")

        ru_by_name = await dd.get_rune("Prototype: Omnistone", "name")
        ru_by_id = await dd.get_rune("MasterKey")
        ru_by_key = await dd.get_rune(8358)

        print(f"{ru_by_name.name} - {ru_by_name.id} - {ru_by_name.key}")
        print(f"{ru_by_id.name} - {ru_by_id.id} - {ru_by_id.key}")
        print(f"{ru_by_key.name} - {ru_by_key.id} - {ru_by_key.key}")
        print(f"\n{ru_by_name.short_desc}\n")

        su_by_name = await dd.get_summoner("Barrier", "name")
        su_by_id = await dd.get_summoner("SummonerBarrier")
        su_by_key = await dd.get_summoner(21)

        print(f"{su_by_name.name} - {su_by_name.id} - {su_by_name.key}")
        print(f"{su_by_id.name} - {su_by_id.id} - {su_by_id.key}")
        print(f"{su_by_key.name} - {su_by_key.id} - {su_by_key.key}")
        print(f"\n{su_by_name.image}\n")


asyncio.run(main())

Output:

Aurelion Sol - AurelionSol - 136
Aurelion Sol - AurelionSol - 136
Aurelion Sol - AurelionSol - 136

Aurelion Sol once graced the vast emptiness of the cosmos with celestial wonders of his own devising. Now, he is forced to wield his awesome power at the behest of a space-faring empire that tricked him into servitude. Desiring a return to his...

Sorcerer's Shoes - 3020
Sorcerer's Shoes - 3020

Enhances Movement Speed and magic damage

Prototype: Omnistone - MasterKey - 8358
Prototype: Omnistone - MasterKey - 8358
Prototype: Omnistone - MasterKey - 8358

Periodically grants a single use of another random keystone.

Barrier - SummonerBarrier - 21
Barrier - SummonerBarrier - 21
Barrier - SummonerBarrier - 21

SummonerBarrier.png

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

pyddragon-0.1.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyddragon-0.1.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file pyddragon-0.1.0.tar.gz.

File metadata

  • Download URL: pyddragon-0.1.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for pyddragon-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f9b5774bd6527cb387b5ec78a1c20476b5eedc4f4d6a9a672fd3de6fb5a63dc0
MD5 23216f3b62e1a87d91ce1222bafee6b8
BLAKE2b-256 295166c45c049b45231e62c893d0926b000115c72da011529fd5afcd47a9408a

See more details on using hashes here.

File details

Details for the file pyddragon-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyddragon-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for pyddragon-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ffd8c4c63827061c66e2549947d8adebe546c392bf9abbf1cb681a95cad2e66
MD5 d5afe0fb16a30e5bac4f8e0e4f06c105
BLAKE2b-256 f93e1593f5ff5ba7cf1c102f57b93b61afaa89222cc5d525c312d5dcbc1b8c28

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page