Getting started¶
This page walks through installing liquipedia-editing-toolkit, configuring credentials, and
making your first start.gg query.
Installation¶
# With uv (recommended)
uv add liquipedia-editing-toolkit
# With pip
pip install liquipedia-editing-toolkit
lptk requires Python 3.12+.
Credentials¶
Two API tokens are involved:
start.gg — get yours from start.gg Developer Settings.
Liquipedia DB (optional) — request an API key at liquipedia.net/api. The Liquipedia DB key is consumed by the external
liquipydialibrary, not bylptkdirectly.
Store credentials under .tokens/ (gitignored) as JSON files grouped by scope:
.tokens/
├── local_keys.json # runtime keys loaded by lptk
└── repo_keys.json # local-tooling keys (not loaded by lptk)
.tokens/local_keys.json:
{
"startgg": "<start.gg api token>",
"lpdb": "<liquipedia db api key>"
}
startgg is required. lpdb is optional and only read when your code calls
lptk.get_lpdb_token() (typically to pass through to
liquipydia.LiquipediaClient).
Override the keys file path via the LPTK_LOCAL_KEYS_PATH environment variable if you want it
elsewhere.
Environment variables¶
All settings are prefixed with LPTK_:
Variable |
Default |
Description |
|---|---|---|
|
|
Path to the local JSON keys file |
|
|
Logging level (DEBUG, INFO, WARNING, ERROR) |
|
|
start.gg GraphQL endpoint |
|
|
Delay between start.gg API calls (seconds) |
|
(unset) |
Optional User-Agent for API requests |
First query¶
from lptk import StartGGClient
with StartGGClient() as client:
event_id, event_name = client.get_event_id("tournament/rlcs-2026/event/main")
print(event_id, event_name)
teams = client.get_event_standings(event_id, top_n=8)
for team in teams:
print(f"{team.placement}. {team.team_name}")
for player in team.members:
print(f" - {player}")
Pairing with liquipydia¶
Liquipedia DB queries are delegated to the liquipydia
library. Pass the lpdb field from your .tokens/local_keys.json directly:
from lptk import get_lpdb_token
from liquipydia import LiquipediaClient
with LiquipediaClient("lptk", api_key=get_lpdb_token()) as lp:
response = lp.players.list("rocketleague", pagename="Zen")
for record in response.result:
print(record)
Next steps¶
See Examples for end-to-end recipes (tournament participants generation, prize pool filling, stream link insertion).
See the API reference for the full surface of
StartGGClient, models and exceptions.