Skip to main content

LeagueUtils

LeagueUtils is a set of utilities for interacting with League of Legends data. Currently, it contains the League ISG (Item Set Generator) and an API for item gold efficiency.

version build coverage codacy landscape requirements

ISG

The Item Set Generator is designed to build recommended pages for every champion in every viable role. It does this by pulling date from Riot’s API and from some third party sites, determining which build paths work best, and updating your League config with the results.

Usage

The most common use case is to run

league-utils-isg

to install the item sets for every champion. The item sets will be installed beside the default Riot recommended pages, but if you have manually downloaded item sets into your config directory before, these may be overwritten. Make sure any such files have unique names before running this script! (eg. anything other than ${CHAMPION}_${ROLE}.json).

You can also run something like

league-utils-isg --champ Rumble

to load info on only one champion.

Gold Efficiency

The Gold Efficiency project automatically calculates the efficiency of all items by looking at the vallue of the stats they provide. This is a common form of theory crafting.

These stats are calculated in real-time, and thus will always be up-to-date when a new patch is released.

When using this data, keep in mind that some aspects of items such as unique abilities will not be taken into account in determining the worth of an item. The ignored stats or abilities will be returned in the result.

Usage

For now, this is available only as a REST API. You can access the results for any item by ID. For example, to get efficiency data on Overlord’s Bloodmail, run

curl https://league.thekev.in/item/3084/efficiency

Setup

Install from PyPI

Simply run

pip3 install league-utils

Install from Source

After cloning this repo or downloading and un{zip,tar}ing the most recent zipfile or tarball.

python3 setup.py install

Run without installing

This project can also be run without installation. After cloning this repo or downloading and un{zip,tar}ing the most recent zipfile or tarball, run

pip3 install -r requirements.txt

and use the league-utils.py script in the root of this folder. Working in a virtualenv is recommended!

Note that when using this method, the sub-project must be provided as an argument. For example:

league-utils-isg [options]  # becomes: ./league-utils.py isg [options]

From a binary

Pre-compiled binaries are provided for some Operating Systems. If yours is supported, you can grab the binary for the latest release and just run that without installing anything. Note that using this method does not allow you to easily update your installation.

If you use a binary to run league-utils, make sure you use the league-utils.py syntax described above.

Running Your Own Server

So you want to run your own API server, eh? Well, there’s a convenient docker file you can use for that, but it does require just a bit of setup.

You’ll need to get yourself API keys for both Riot’s API and champion.gg’s. Once you do, simply export them to your shell and use docker-compose to run the server. Roughly speaking, you’ll want to:

export CHAMPIONGG_TOKEN=foo-asdfasdfasdf
export LEAGUE_TOKEN=bar-fdsafdsafdsa
git clone git@github.com:thekevjames/league.git
cd league
docker-compose build
docker-compose up

You may also be interested in using the official docker image. If you are, the following might make your life easier:

curl https://raw.githubusercontent.com/TheKevJames/league/master/docker-compose.yml > docker-compose.yml
mkdir -p api  # docker-compose oddity
docker-compose pull
docker-compose up -d

Disclaimer

This project probably won’t make your computer explode, make your girlfriend leave you, or get you fired from your job, but I make no guarantees that blindly following its advice won’t drop your ELO. You’ve been warned.

Metadata

Release files for league-utils 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for league-utils 1.0.5
File Size Uploaded
league-utils-1.0.5.tar.gz 18.5 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for league-utils 1.0.5
File
league_utils-1.0.5-py3.6.egg Legacy Egg format - - Details
league_utils-1.0.5-py3.5.egg Legacy Egg format - - Details
league_utils-1.0.5-py2.py3-none-any.whl Python 3, Python 2 none any Details
league-utils-1.0.5.win32.exe Details

Total release size: 704.4 kB

Release files / league-utils-1.0.5.tar.gz

Download URL league-utils-1.0.5.tar.gz
Size 18.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ab5dde3d8b620fca8a920e8fe161ee5719886d0016cd96f717fdee4087d4bf98
BLAKE2b-256 checksum
How to use checksums
911c036c18ee6c6ce1d08a89ca4fe31e907f0cbabb6fd0e2e77881df53239e80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / league_utils-1.0.5-py3.6.egg

Download URL league_utils-1.0.5-py3.6.egg
Size 49.6 kB
Tags Egg
SHA-256 checksum
How to use checksums
913724f44db72ecdf1f371ae50e03f9b2b324c077e535a2dc5828aec419e1ef7
BLAKE2b-256 checksum
How to use checksums
0d5b5efaa4a177eded837e380b296cff7d2b82062dfef8848cba2652a83abd17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / league_utils-1.0.5-py3.5.egg

Download URL league_utils-1.0.5-py3.5.egg
Size 50.6 kB
Tags Egg
SHA-256 checksum
How to use checksums
a1aa634c170de20e7f0981809a065b1c08b39e7874a1746ad0591246d0b17277
BLAKE2b-256 checksum
How to use checksums
6ceca73d4a2adcf4b681a186f9a2c6c9d65351735f871128fd9134af6bc1a476
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / league_utils-1.0.5-py2.py3-none-any.whl

Download URL league_utils-1.0.5-py2.py3-none-any.whl
Size 25.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e70b23b90880b05ab80e3c1e4fc67d0af3ffeeb9f1744fb426e3f80b259e1a71
BLAKE2b-256 checksum
How to use checksums
c6dcf146981c7d085fe2f94cc68469370892bb6245f1a512b67edb1b75ed0b3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / league-utils-1.0.5.win32.exe

Download URL league-utils-1.0.5.win32.exe
Size 560.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6a0f28420f5a0a68bd16c9cf4fabbc93af54fd88675a7a82a0bc4f77af980e2f
BLAKE2b-256 checksum
How to use checksums
77fcaa9078fab547e43b3e449ed188023b9470d0c4412386b9b307f905a9432c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.5 This release

5 release files

1.0.4

2 release files

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

4 release files

0.3.2

5 release files

0.3.1

5 release files

0.3.0

5 release files

0.2.11

4 release files

0.2.10

4 release files

0.2.9

5 release files

0.2.8

4 release files

0.2.7

4 release files

0.2.6

4 release files

0.2.5

4 release files

0.2.4

4 release files

0.2.3

4 release files

0.2.2

4 release files

0.2.1

4 release files

0.2.0

4 release files

0.1.9

4 release files

0.1.8

4 release files

0.1.7

4 release files

0.1.6

4 release files

0.1.5

4 release files

0.1.4

4 release files

0.1.3

4 release files

0.1.2

4 release files

0.1.1

4 release files

0.1.0

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page