This script generates a rating for a LoL summoner based on recent solo queue performance.
All matches are scored based on individual and team data, focusing on key metrics.
Please note: Request failures due to rate limiting are not automatically retried.
Python 3.9 or higher
git clone https://github.com/jwtr/lol-summoner-rating.git
cd lol-summoner-rating
pipenv install
First you need to add your Riot API key, a summoner name and region to the config, for example:
config = {
"riot_api_key": "YOUR-API-KEY",
"summoner_region": "euw1",
"summoner_name": "Odoamne",
}
Then run:
python3 rate_summoner.py
You can use the following to spawn a shell for the virtualenv:
pipenv shell
Or prefix all python3 commands with:
pipenv run
Odoamne has a "Josh Rating" of 12921
The code can be tested by running the following:
python3 tests.py
A code coverage report can be generated by running:
coverage report -m
Lint the code using Flake8:
flake8 rate_summoner.py
Use Black to autoformat the code:
black --line-length 79 rate_summoner.py