Solari
Stats module for League of Legends
This library aims to manage stats from League of Legends match data in bulk in a very easy way from the user's point of view.
- Call the stats needed
- Give match data (straight from Riot API)
- ...?
- Profit
How to use it
To install it :
pip3 install solari
This library revolves around a Manager, here the Leona class, and a library of stats, that can sometime be configured.
First things first, you need to import the stats you need :
from solari.stats import ChampionPickrate, ChampionBanrate, ChampionWinrate, ChampionPresenceRate, ChampionPickCount
Then you need to instanciate Leona and pass the wanted stats :
from solari import Leona
l = Leona([
ChampionPickrate(),
ChampionBanrate(),
ChampionWinrate(),
ChampionPresenceRate(),
ChampionPickCount()
])
Push a match data, this data being a parsed json from the match data straight from the Riot API :
l.push_match(match_data)
Note : this is for one match, push as many matches as you want by repeating the command.
Last step, getting the stats :
l.get_stats()
This will output a DataFrame of the stats grouped by championId. If the picked stats have multiple keys, understand if you have also stats regarding items, they will appear in another DataFrame.
Stats configuration happens during instantiation :
from solari.stats import ItemPickrate
l = Leona([
ItemPickrate(by_champion=True)
])
What this library does NOT do
- Request match data : the role of this library only starts when you have the data
- Change ID to name : this would require ddragon/cdragon and can easily be done afterward
More examples : https://github.com/Canisback/solari/blob/master/advanced_docs.md
TODO
By order of priority :
Implementing the "per_league" key, allowing stats to be grouped by players rank as well- Add more documentation on how to add Stats
Add verification for DerivedStats required stats- Implementing more stats for champion and items
Implementing stats by player
Metadata
Release files for solari 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| solari-0.2.0.tar.gz | 12.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| solari-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.3 kB
Release files / solari-0.2.0.tar.gz
| Download URL | solari-0.2.0.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1f6b8fc6f184d982d363e18a5497478cab2a9a791a9577cc037e66509a13536
|
|
BLAKE2b-256 checksum How to use checksums |
b300a2238c4113d9f52dadce9b0cc5a223e8176877dba7bacdb08ab8370282e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.1
|
Release files / solari-0.2.0-py3-none-any.whl
| Download URL | solari-0.2.0-py3-none-any.whl |
|---|---|
| Size | 15.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e32816604648989b763c466b37bb86f75c1e966181a940128865c0556575d57a
|
|
BLAKE2b-256 checksum How to use checksums |
94df31fb3b9c39bc94978d1e3f6e57cc8033c044ac2d7c3a804ff1d33fc6c706
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.1
|
Security for solari 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.