I Cassiopeia
What is Cassiopeia?¶
Updates (April 16, 2020) We now introduce FitchCount algorithm in Cassiopeia's Analysis module. Briefly, FitchCount is an efficient algorithm for aggreagating the number of state transitions across all optimal evolutionary histories (under the maximum parsimony criterion) given the states of the leaves are known. Embrace innovation & communicate more effectively. We specialise in reputation, influence and storytelling The Future of Money Cryptocurrencies and Decentralised Finance (DeFi) Find out more We’re Trusted By We work with our clients to target and engage with multiple audiences and communities through deep analysis, insight and expert storytelling with creative delivery. Our work drives. Cassiopeia November 27, 2020 Bakit ngayon lang ako nag visit sa page na to!!!! Shiaa mas nakakakilig pa sa mga wattpad stories na nabasa ko at mga romantic movies na napanood ko ang convo ng best friend ko at suitor niya whaaaa supporter niyo po talaga ako 🥺 kayo na lang kasi 🥺 🙇. A Survey of Channeling Abortion, Psychopaths and Mother Love Abovetopsecret: Ethics and Google Bombs Abovetopsecret.com, Project Serpo Psy-ops, and the Pentagon's Flying Fish. Cassiopeia synonyms, Cassiopeia pronunciation, Cassiopeia translation, English dictionary definition of Cassiopeia. A W-shaped constellation in the Northern Hemisphere between Andromeda and Cepheus.
Cassiopeia (which we fondly call Cass) is a framework for pulling and working with data from the Riot API. Cass differentiates itself from other API wrappers by taking a page from one of Cassiopeia’s quotes, “I’ll take care of everything.” Our main goal is to make your life (and ours) as developers easy.
Cass is composed of three key pieces:
An interface for pulling data from the Riot API.
A type system of classes for holding and working with the data pulled from Riot.
Caches and databases to temporarily and permanently store that data.
Restaurant Cassiopeia I Planetariet
Together, these three pieces provide the user experience we desire. Scroll down for a quick example of how Cass works, what Cass does for you as a user, and information about contributing.
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.
An Example¶
We will quickly and efficiently look up the champion masteries for the summoner “Kalturi” (one of the developers) and print the champions he is best at. If you just want a quick look at how the interface looks, feel free to just read these three lines and skip the explanation. The explanation explains how the three bullet points above fit together and allow this code to be run.
The above three lines are relatively concise code, and if you know what lambdas and list comprehensions are then it will likely be readable. However, there is a deceptive amount of logic in these three lines, so let’s break it down. (If you don’t understand everything immediately, don’t worry, that’s why you’re using Cass. You don’t have to understand how everything works behinds the scenes, you just get to write good code.)
First, we create a summoner with a name
and id
. Note that creating kalturi
doesn’t trigger a call to the Riot API – it merely instantiates a Summoner
object with a name and id.
Next we ask for the champion masteries for kalturi
by running kalturi.champion_masteries
. This creates an un-instantiated list which will contain champion masteries if any item in it is accessed.
Third, the .filter
method is called on the list of champion masteries. filter
is a python built-in that operates on a list and filters the items in it based on some criteria. That criteria is defined py the lambda
function we pass in.
A lambda is a quick way of defining functions in-line without using the def
statement. In this case, lambdacm:
takes in an object and assigns it to the variable cm
, then it returns cm.level>6
. So this lambda
will return True
for any champion mastery whose mastery level is greater than or equal to 6
.
The .filter(lambdacm:cm.level>6)
therefore operates on the list of champion masteries. When the list is iterated over, the champion masteries are queried. This requires a summoner id, which is pulled from kalturi.id
, and the Riot API is queried for Kalturi’s champion masteries. With the champion mastery data pulled, .filter
then filters the list looking for all champion masteries with mastery level 6 or higher.
Finally, the third line prints a list of the champion names for those champions.
Together these three lines illustrate the concise user interface that Cass provides, the way in which the data can be used, when the data is pulled (queried).
There is an integration of cassiopeia to the popular python web framework Django made by Mori(Paaksing), this integration is aimed to fix most issues/conflicts related to co-ocurrence of cassiopeia and Django. In this integration will give you better tools for building your Django/DRF based app, you will have the ability to use any production tested cache backends that Django’s cache framework supports.
New in v2.0: A new datastore called Omnistone is introduced in response to issue #1 of this repo, this is a refined version of Cache that automatically deletes expired objects when MAX_ENTRIES is hit, then culls the datastore according to the CULL_FRECUENCY given. The culling strategy used is the same as Django Cache Framework, which is LRU culling (Least Recently Used).
Link to django-cassiopeia [repository](https://github.com/paaksing/django-cassiopeia) (If you love using it, make sure to star!).
Link to django-cassiopeia [documentations](https://paaksing.github.io/django-cassiopeia/) (Production Release v2.0).
If you have any issues or feature requests with django-cassiopeia, tag Mori in our discord server, or fire an issue in the repository.
Unfortunately, we currently don’t have an integration to Flask and any contribution is welcome.
Contributing¶
Contributions are welcome and we have an entire page devoted to ways in which you can help us with Cass.
Cassiopeia Myth
Overview¶
- Using Cassiopeia
- Setup
- Settings
- How Cass Works
- Data Pipeline
- Plugins
- Contributing