Skip to main content

A Python framework for accessing League of Legends esports data

Project description

Hextech

A Python framework for accessing League of Legends esports data. This package uses data from Leaguepedia and Riot's Data Dragon API. It does not require the use of a Riot API key.

Installation

With pip:

pip install hextech

Usage

Here is a basic example of using hextech to print all game results in LCK 2020 Summer split.

import hextech

tournament = hextech.getTournaments()["LKC 2020 Summer"]
matches = tournament.getMatches()
for match in matches:
	games = match.getGames()
	for game in games:
		print(game)

Tournament Class

A league specific collection of matches within a specified time frame (e.g. LCK 2020 Summer).

Variables

name: str
startDate: str
league: str

Functions

getMatches() -> Dict[str -> Match]

Match Class

A series of games between two teams. There could be one or multiple games in a match.

Variables

_uniqueMatch: str # for internal use
_uniqueGames: List[str] # for internal use

dateTime: str
teams: Tuple(str, str)
scores: Tuple(int, int)

Functions

getGames() -> List[Game]

Game Class

Variables

The scoreboard variable contains Scoreline variables for each role on each team. The list is indexed such that scoreboard[0] and scoreboard[1] correspond to team 1 and 2 respectively; and scoreboard[i][0] -> top ... scoreboard[i][4] -> support.

_uniqueGame: str # for internal use

gameName: str
dateTime: str
duration: str
matchHistory: str # link to Riot's match history page for this game

winner: int # corresponding with the index (zero-based) of the winning team
teams: Tuple(str, str)
bans: Tuple(str, str)
scoreboard: [ 
	List[Scoreline],
	List[Scoreline]
] 

Scoreline Class

Represents the stats for a given player for a specific game.

Variables

_uniqueGame: str # for internal use
player: Player

role: str
champion: str

kills: int
deaths: int
assists: int
gold: int
cs: int

summonerSpells: str
items: str
runes: str

Player Class

Variables

name: str
team: str
thumbnail: str # url to the player's thumbnail image

Issue Reporting

If you find a bug, please open a new issue.

Disclaimer

Hextech 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hextech-1.0.1.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

hextech-1.0.1-py3-none-any.whl (5.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page