Package: django-cassiopeia
Django CassiopeiaDjango Cassiopeia has finished beta test, Django Cassiopeia 2 hasbackward incompatible changes, please check them outhere.An Integration ofCassiopeiato the Django Framework (Compatible with DRF) with enhanced new features.Cassiopeia is a Python adaptation of the Riot Games League of Legends API (https://developer.riotgames.com/). For instance it is also the sister library toOrianna(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.DocumentationDjango Cassiopeia has detaileddocumentation.
For functions and methods of Cassiopeia is found in thisdocumentation.Installation and RequirementsDjango>=3.0.1Python>=3.6pipinstalldjango-cassiopeiav2.1Starting version 2.1, django-cassiopeia will no longer contain cassiopeia in its modules, instead it will wrap you original cassiopeia framework with the necessary changes in place. This makes easy to get ahead of fixes of the main library without the need of me doing pararel updates, when cassiopeia updates a new version, you can get going by only upgrading cassiopeia withpip install cassiopeia --upgrade.Quick StartIn yoursettings.py:INSTALLED_APPS=[# ...'django_cassiopeia',]CASSIOPEIA_RIOT_API_KEY=os.environ["RIOT_API_KEY"]# api key in env varCASSIOPEIA_DEFAULT_REGION="NA"# default regionCASSIOPEIA_PIPELINE={# small pipeine to get started"Omnistone":{},"DDragon":{},"RiotAPI":{},}In yourviews.pythat you wish to use cassiopeia functions:fromdjango_cassiopeiaimportcassiopeiaascassfromdjango.httpimportJsonResponsefromdjango.viewsimportViewclassSummonerView(View):# Django CBV with json responsedefget(self,request):summoner=cass.Summoner(name="Kalturi")returnJsonResponse({"name":summoner.name,"level":summoner.level})Reminder: it can be used anywhere as long as you do the correct import:fromdjango_cassiopeiaimportcassiopeia# You can add "as cass" for shorter module name ^.Integrated FeaturesBypass 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'sCache, here you have its fine tuned version calledOmnistoneand 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 toINSTALLED_APPSand import it from there, no more infinite intances crashing around.Adapted settings syntax:Keep all settings in one place, the standard place ->settings.py, with adapted syntax that fits into the Django trend.High Concurrency and AsyncIOCurrently Cassiopeia is 98% thread safe with some exception on the patch number files that complains about a generator in extreme cases. So you can feel 98% safe to multithread Cassiopeia in your environments.If you need higher concurrency and wants to work with AsyncIO then consider using my AsyncIO based frameworkPyot. It works like magic, benchmarks of 60 to 90 calls per second on a CPU optimized machine at extreme cases. It has extremely similar syntax to Cassiopeia, supports Django out of the box, wide range of Caches (Django, Redis, Disk, MongoDB), access to CDragon and MerakiCDN.Questions/Contributions/BugsFor Django Cassiopeia: Feel free to send pull requests or to contact us via this github or our generaldiscord. More information can be found in ourdocumentation.For Cassiopeia: feel free to send pull requests or to contact cassiopeia devs viacassiopeia's githubor the same discord server. More information about main cassiopeia is found in thisdocumentation.DisclaimerDjango 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.