Skip to main content

Riot Games Developer API Wrapper (3rd Party)

Project description

MIT Licensed Documentation Status DOI

Cassiopeia

A Python adaptation of the Riot Games League of Legends API (https://developer.riotgames.com/).

Cassiopeia is the sister library to Orianna (Java). It's been designed with usability in mind - making sure all the bookkeeping is done right so you can focus on getting the data you need and building your application.

Installation

pip install cassiopeia or see here for more information.

Why use Cass?

  • An excellent user interface that makes working with data from the Riot API easy and fun.

  • "Perfect" rate limiting.

  • Guaranteed optimal usage of your API key.

  • Built in caching.

  • Dynamic settings so you can configure Cass for your specific use case.

  • Extendability to non-Riot data. Because Cass is a framework and not just an API wrapper, you can integrate your own data sources into your project. In addition to the Riot API, Cass already supports Data Dragon, Meraki's CDN, and some CDragon data.

Documentation and Examples

Cassiopeia's documentation and examples may be a little out of date, but should be quite helpful when getting started. Please submit a PR for any changes.

Example

Here's an example of a basic use of the API. The full documentation can be found at http://cassiopeia.readthedocs.org/en/latest/.

import random

import cassiopeia as cass

cass.set_riot_api_key("YOUR_KEY")  # This overrides the value set in your configuration/settings.

account = cass.get_account(name="Kalturi", tagline="NA1", region="NA")
summoner = account.summoner
print("{name} is a level {level} summoner on the {region} server.".format(name=account.name_with_tagline,
                                                                          level=summoner.level,
                                                                          region=summoner.region))

champions = cass.get_champions(region="NA")
random_champion = random.choice(champions)
print("He enjoys playing champions such as {name}.".format(name=random_champion.name))

challenger_league = cass.get_challenger_league(queue=cass.Queue.ranked_solo_fives, region="NA")
best_na = challenger_league[0].summoner
print("He's not as good as {name} at League, but probably a better python programmer!".format(name=best_na.account.name))

Questions/Contributions

Feel free to send pull requests or to contact us via github or discord. More information can be found in our documentation.

Bugs

If you find bugs please let us know via an issue or pull request. If you would like to help maintain Cassiopeia, let us know and we will invite you to our discord server.

Citing Cassiopeia

If you used Cassiopeia for your research, please cite the project.

Support Us

If you've loved using Cassiopeia, consider supporting us through PayPal or Patreon.

Disclaimer

Cassiopeia isn't endorsed by Riot Games and doesn't reflect the views or opinions of Riot Games or anyone officially involved in producing or managing League of Legends. League of Legends and Riot Games are trademarks or registered trademarks of Riot Games, Inc. League of Legends © Riot Games, Inc.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

cassiopeia-5.2.0.tar.gz (133.5 kB view details)

Uploaded Source

Built Distribution

cassiopeia-5.2.0-py3-none-any.whl (173.6 kB view details)

Uploaded Python 3

File details

Details for the file cassiopeia-5.2.0.tar.gz.

File metadata

  • Download URL: cassiopeia-5.2.0.tar.gz
  • Upload date:
  • Size: 133.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for cassiopeia-5.2.0.tar.gz
Algorithm Hash digest
SHA256 44eb37ad097f7d5c9a12d5bc5da17fa0daca0cffe3fb5e05fe95512ce89ea10d
MD5 cf22c89cf3ab29371116e977775f1cea
BLAKE2b-256 e229540236ac1f45bca0f10a48b579493ad9dffee0b6bcb73c1d79c53d150e7c

See more details on using hashes here.

File details

Details for the file cassiopeia-5.2.0-py3-none-any.whl.

File metadata

  • Download URL: cassiopeia-5.2.0-py3-none-any.whl
  • Upload date:
  • Size: 173.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for cassiopeia-5.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 13ec6d46522733ea5849a5dcb5a88ddf95316c2b73c120f88d734a2d1e7acf58
MD5 469a5e0596b7a47bf454a3b536f9bdd5
BLAKE2b-256 38d1df6db443c155af42401b299b073ac4e22e990135c9437c1c7a7d718ac690

See more details on using hashes here.

Supported by

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