Python SDK
A Valorant API for Python
A typed Python client for Valorant esports data on VLR.gg. Install it from PyPI, call a namespace, and work with validated Pydantic models — no API key, no parser, no glue code.
VLRdevAPI is a Python SDK for VLR.gg. It installs with pip, needs no API key, and returns Pydantic models for matches, players, teams, events, series, and news.
Built forFastAPI servicesData notebooksDiscord botsCron jobsInternal toolsAnalytics pipelines
Capabilities
Why it feels Python-native
- Install
Two commands, no setup
uv add vlrdevapi or pip install vlrdevapi. There is no key to configure and no separate service to run.
- Types
Pydantic models everywhere
Every response is a typed model, so autocomplete, refactoring, and static analysis work in your editor.
- Errors
Typed exceptions
NotFoundError, RateLimitError, RequestError, ParsingError, and ValidationError cover the common failure modes.
- Pagination
Pages handled for you
List endpoints expose page, total pages, and items, and can fetch every page in one call.
- Networking
Rate limiting and caching
Built-in rate limiting and an LRU response cache reduce requests and keep you within reasonable volumes.
- Concurrency
Sync design, thread friendly
Call methods directly, run independent fetches in a thread pool, or use asyncio.to_thread from an async framework.
In practice
One client, three Python workflows.
The same typed response works in a script, a notebook, or an async service. These are the three patterns most projects start with.
Script or service
Typed calls, no parsing
from vlrdevapi import VLRClient |
|
with VLRClient() as client: |
team = client.team(1034) |
|
for member in team.roster().players: |
print(member.ign, member.roles) |
Use the client as a context manager. The underlying HTTP session closes when you leave the block.
Notebook
Models become rows
import pandas as pd |
import vlrdevapi |
|
agents = vlrdevapi.player(11225).agents(timespan="90d") |
rows = [agent.model_dump() for agent in agents.agents] |
|
df = pd.DataFrame(rows) |
df[["agent", "rounds", "rating", "acs"]].head() |
Pydantic models expose model_dump(), so pandas and Polars are one line away.
Async app
Offload the blocking call
import asyncio |
import vlrdevapi |
|
async def load_series(): |
return await asyncio.to_thread( |
vlrdevapi.series(542272).info |
) |
|
info = asyncio.run(load_series()) |
print(info.team1.name, info.score1) |
The SDK is synchronous by design. Move calls to a worker with asyncio.to_thread.
Quickstart
Your first typed response in a few lines.
Install the package and open a player profile. The curried player object keeps the ID attached, and every field is available in your editor.
- 01Install from PyPI.uv add vlrdevapi (or pip install vlrdevapi). Python 3.11+ and an internet connection.
- 02Open a player.vlrdevapi.player(11225) binds the player ID for related calls.
- 03Read typed fields.profile.name, profile.country, and agent.rating are validated values, not strings from HTML.
import vlrdevapi | |
| |
player = vlrdevapi.player(11225) | |
profile = player.profile() | |
agents = player.agents(timespan="90d") | |
| |
print(profile.name, "·", profile.country) | |
for agent in agents.agents[:3]: | |
print(agent.agent, agent.rating, agent.acs) |
Ethan · United States |
Kayo 1.11 199.4 |
Phoenix 0.89 186.9 |
Omen 0.89 151.9 |
Compare
Python options for Valorant data
| Feature | VLRdevAPI | requests + BeautifulSoup | Raw HTTP requests |
|---|---|---|---|
| Setup | uv add vlrdevapi (or pip install) | Install and write selectors | Install and write everything |
| Parsing | Included | You write CSS selectors | You parse by hand |
| Output | Typed Pydantic models | Raw HTML | Raw HTML |
| Rate limiting | Built in | Your responsibility | Your responsibility |
| Maintenance | Handled in the library | High | High |
| API key | Not required | Not required | Not required |
FAQ
Frequently asked questions
Installation, typing, async use, and the practical questions Python developers ask first.
Full FAQHow do I install VLRdevAPI?
Is there a Python wrapper for VLR.gg?
Does it work with type checkers?
Can I use it with pandas?
Can I use it in an async app?
Do I need an API key?
Related
- Installation
Install with pip, uv, or from source.
- Quickstart
A hands-on tour of the main namespaces.
- Getting started guide
From an empty project to your first request.
- Player analytics with pandas
Turn typed models into a DataFrame.
- Valorant stats API
Player, team, and match statistics in Python.
- VLR.gg API for Python
Why an unofficial client exists.
Start building
Install the SDK and query the data.
uv add vlrdevapi