Skip to content
An all-inclusive Python framework for the Riot Games League of Legends API. We focus on making the data easy and fun to work with, while providing all the tools necessary to create a website or do data analysis.
Python
Branch: master
Clone or download
Latest commit a68c258 Oct 14, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cassiopeia Ensure Kernel pipeline is compatible with all HTTPClients Oct 13, 2019
doc Mention ujson & requests as alternatives in the docs Oct 14, 2019
examples
test removed league entry properties, added test for no extra api calls Aug 28, 2019
.gitignore fixing something weird w/the gitignore Jul 26, 2018
CONTRIBUTORS.txt added setup.py file Aug 8, 2017
DISCLAIMER.txt Add readme, disclaimer, and change ratelimit interface Aug 16, 2015
LICENSE.txt add dev branch of v3 Jun 25, 2017
MANIFEST.in removed perks.json Nov 24, 2017
README.md Update README.md Aug 11, 2018
environment.yml
readthedocs.yml trying conda again with pip inside it Jan 19, 2019
requirements-rtd.txt
requirements.txt updated requirements to merakicommons 1.0.7 Mar 6, 2019
requirements36.txt readthedocs is failing to build due to pycurl; this may fix the issue Aug 16, 2017
setup.cfg added setup.cfg Aug 8, 2017
setup.py version increment Jul 26, 2019

README.md

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.

Documentation and Examples

Cassiopeia has detailed documentation and examples.

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 and (coming) the ability to easily hook into a database for offline storage of data.

  • 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. Cass already supports Data Dragon and the champion.gg API in addition to the Riot API.

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

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.
cass.set_default_region("NA")

summoner = cass.get_summoner(name="Kalturi")
print("{name} is a level {level} summoner on the {region} server.".format(name=summoner.name,
                                                                          level=summoner.level,
                                                                          region=summoner.region))

champions = cass.get_champions()
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)
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.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.

You can’t perform that action at this time.