Python client library for the Liquipedia API (LPDB v3).
Project description
LIQUIPYDIA | Python client library for Liquipedia API (LPDB v3)
About
liquipydia aims to be a modern, typed Python wrapper for the Liquipedia Database (LPDB) REST API v3, covering all
16 data types (matches, tournaments, teams, players, transfers, and more).
Built with httpx and pydantic.
Status: Beta — see the Roadmap for progress.
Project Structure
liquipydia/
├── __init__.py # Package exports, version
├── _client.py # Core HTTP client (LiquipediaClient)
├── _models.py # Pydantic models (one per LPDB data type)
├── _resources.py # Resource classes (one per LPDB data type)
├── _exceptions.py # Exception hierarchy
├── _response.py # API response wrapper
└── py.typed # PEP 561 type marker
API Access
Using this library requires an API key from Liquipedia. Access is not self-service — you must request it through their contact form.
Free access is available for educational, non-commercial open-source, and community projects. Paid plans (Basic, Premium, Enterprise) are available for commercial use.
Installation
# With uv (recommended)
uv add liquipydia
# With pip
pip install liquipydia
Or install from source:
# With uv
uv add git+https://github.com/Dyl-M/liquipydia.git
# With pip
pip install git+https://github.com/Dyl-M/liquipydia.git
Quick Start
from liquipydia import LiquipediaClient, Player, Match
with LiquipediaClient("my-app", api_key="your-api-key") as client:
# Query players from a specific wiki
response = client.players.list("dota2", conditions="[[name::Miracle-]]")
for record in response.result:
player = Player.model_validate(record)
print(player.name, player.nationality, player.birthdate)
# Automatic pagination across multiple pages
for record in client.matches.paginate("counterstrike", page_size=100, max_results=500):
match = Match.model_validate(record)
print(match.match2id, match.date, match.winner)
# Keyword filters — no need to write raw LPDB conditions.
# Operator prefixes (`!`, `<`, `>`) pass through, so `earnings=">10000"` becomes `[[earnings::>10000]]`.
response = client.players.list("rocketleague", pagename="Zen")
# Match-specific parameters (stream data)
response = client.matches.list("rocketleague", rawstreams=True, streamurls=True)
# Team template lookup
response = client.team_templates.get("dota2", "teamliquid")
Miracle- Jordan 1997-06-20
0042_R01-M001 2025-06-15 14:00:00 1
...
Available Resources
All 16 LPDB v3 data types are accessible as client attributes:
| Attribute | Endpoint | Notes |
|---|---|---|
client.broadcasters |
/broadcasters |
|
client.companies |
/company |
|
client.datapoints |
/datapoint |
|
client.external_media_links |
/externalmedialink |
|
client.matches |
/match |
Extra: rawstreams, streamurls |
client.placements |
/placement |
|
client.players |
/player |
|
client.series |
/series |
|
client.squad_players |
/squadplayer |
|
client.standings_entries |
/standingsentry |
|
client.standings_tables |
/standingstable |
|
client.teams |
/team |
|
client.tournaments |
/tournament |
|
client.transfers |
/transfer |
|
client.team_templates |
/teamtemplate |
Uses get() instead of list() |
client.team_template_list |
/teamtemplatelist |
Different params (pagination) |
The API key can also be set via the
LIQUIPEDIA_API_KEYenvironment variable.
Typed Models
Each data type has a corresponding Pydantic model for typed access and IDE autocompletion:
Broadcaster, Company, Datapoint, ExternalMediaLink, Match, Placement, Player, Series, SquadPlayer,
StandingsEntry, StandingsTable, Team, TeamTemplate, TeamTemplateList, Tournament, Transfer
from liquipydia import Player
player = Player.model_validate(record)
print(player.name) # str | None — with autocompletion
print(player.birthdate) # date | None — null sentinels auto-converted
print(player.links) # dict | None — empty API lists auto-converted
Miracle-
1997-06-20
{'twitter': 'https://twitter.com/Aborss', ...}
Models handle LPDB quirks automatically:
- Null date sentinels (
"0000-01-01","") →None - Empty dict placeholders (
[]) →None - Unknown/future API fields are preserved (
extra="allow")
Documentation
Full documentation (getting started, examples, API reference) is available at dyl-m.github.io/liquipydia.
Development
# Clone the repository
git clone https://github.com/Dyl-M/liquipydia.git
cd liquipydia
# Install dependencies (requires uv)
uv sync --group dev
# Run linting
uv run ruff check .
uv run ruff format --check .
# Run type checking
uv run mypy liquipydia
# Run tests
uv run pytest
License
Code is licensed under the MIT License.
Data License
Data returned by the Liquipedia API is subject to CC-BY-SA 3.0 as required by Liquipedia's API Terms of Use. If you redistribute or display data obtained through this library, you must comply with the CC-BY-SA 3.0 attribution requirements.
Contributing
See CONTRIBUTING.md for guidelines.
Security
See SECURITY.md for reporting vulnerabilities.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file liquipydia-0.1.2.tar.gz.
File metadata
- Download URL: liquipydia-0.1.2.tar.gz
- Upload date:
- Size: 46.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
213229dfb5ddce01a232b5bf34558d040749f2b54f618cdf8d4684938de64853
|
|
| MD5 |
b6488cf73c65a302ae22da8439d1ad51
|
|
| BLAKE2b-256 |
24ee1091d9d301194fd57bc5d56ebe5b46747d4e4bf46fdd5fe81aeaa52f2967
|
Provenance
The following attestation bundles were made for liquipydia-0.1.2.tar.gz:
Publisher:
publish.yml on Dyl-M/liquipydia
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
liquipydia-0.1.2.tar.gz -
Subject digest:
213229dfb5ddce01a232b5bf34558d040749f2b54f618cdf8d4684938de64853 - Sigstore transparency entry: 1438145540
- Sigstore integration time:
-
Permalink:
Dyl-M/liquipydia@34909b69d1d3d870015f322f8de250d8880a7691 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Dyl-M
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@34909b69d1d3d870015f322f8de250d8880a7691 -
Trigger Event:
release
-
Statement type:
File details
Details for the file liquipydia-0.1.2-py3-none-any.whl.
File metadata
- Download URL: liquipydia-0.1.2-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af8afab1a6661f877952ecd4c4ba3d49186cad42bd3dc7fc2743f76b883810f5
|
|
| MD5 |
54cdb4ab8c3b5c81f8363bc0f2c5e0c6
|
|
| BLAKE2b-256 |
5dcd74418d21785df91096f3951a31fa14f4eb2cb83cf953ff939e650e3500e2
|
Provenance
The following attestation bundles were made for liquipydia-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on Dyl-M/liquipydia
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
liquipydia-0.1.2-py3-none-any.whl -
Subject digest:
af8afab1a6661f877952ecd4c4ba3d49186cad42bd3dc7fc2743f76b883810f5 - Sigstore transparency entry: 1438145561
- Sigstore integration time:
-
Permalink:
Dyl-M/liquipydia@34909b69d1d3d870015f322f8de250d8880a7691 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Dyl-M
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@34909b69d1d3d870015f322f8de250d8880a7691 -
Trigger Event:
release
-
Statement type: