Skip to main content

Django Integration of the Riot Games Developer API Wrapper 'cassiopeia'

Project description

MIT Licensed

Django Cassiopeia

Django Cassiopeia has finished beta test, Django Cassiopeia 2 has backward incompatible changes, please check them out here.

An Integration of Cassiopeia to the Django Framework (Compatible with DRF) with enhanced new features.

Cassiopeia is a Python adaptation of the Riot Games League of Legends API ( For instance it is also 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.


Django Cassiopeia has detailed documentation. For functions and methods of Cassiopeia is found in this documentation.

Installation and Requirements


pip install django-cassiopeia

Quick Start

In your

    # ...

CASSIOPEIA_RIOT_API_KEY = os.environ["RIOT_API_KEY"]  # api key in env var
CASSIOPEIA_DEFAULT_REGION = "NA"   # default region
CASSIOPEIA_PIPELINE = {   # small pipeine to get started
    "Omnistone": {},
    "DDragon": {},
    "RiotAPI": {},

In your that you wish to use cassiopeia functions:

from django_cassiopeia import cassiopeia as cass
from django.http import JsonResponse
from django.views import View

class SummonerView(View): # Django CBV with json response
    def get(self, request):
        summoner = cass.Summoner(name="Kalturi")
        return JsonResponse({"name":, "level": summoner.level})

Reminder: it can be used anywhere as long as you do the correct import:

from django_cassiopeia import cassiopeia 
# You can add "as cass" for shorter module name ^.

Integrated Features

  • Bypass the limitation of cassiopeia caching: No more worries about memory issues! Now you have the ability to use Django's cache framework for your caching, compatible with any cache backends that Django supports (Filebased, Database, Redis, MemCached, LocalMem, more).

  • Same performance (New in 2.0): You still get the same fast performance as cassiopeia's Cache, here you have its fine tuned version called Omnistone and safe to use (I am looking at you memory hunter).

  • Prevent infinite instances: Weird things will happen if you don't import correctly cassiopeia in your Django project (happens to Flask too), now you add to INSTALLED_APPS and import it from there, no more infinite intances crashing around.

  • Adapted settings syntax: Keep all settings in one place, the standard place ->, with adapted syntax that fits into the Django trend.


  • For Django Cassiopeia: Feel free to send pull requests or to contact us via this github or our general discord. More information can be found in our documentation.
  • For Cassiopeia: feel free to send pull requests or to contact cassiopeia devs via cassiopeia's github or the same discord server. More information about main cassiopeia is found in this documentation.

Supporting Cassiopeia and Django Cassiopeia

  • If you want to support this specific project (django-cassiopeia), consider supporting me through Patreon too.
  • If you've loved using Cassiopeia, consider supporting the former developers of the main framework through PayPal or Patreon.


Django Cassiopeia existence is acknowleged by cassiopeia's former developers. Both package/framework/library is updated in parallel with some exceptions due to the fact of different use cases.

Cassiopeia/Django-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

Download files

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

Source Distribution

django-cassiopeia-2.0.0.tar.gz (119.9 kB view hashes)

Uploaded source

Built Distribution

django_cassiopeia-2.0.0-py3-none-any.whl (162.3 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page