Metadata-Version: 2.4
Name: vlrdevapi
Version: 2.3.0
Summary: A Python library to scrape data from vlr.gg
Project-URL: Homepage, https://vlrdevapi.pages.dev/
Project-URL: Repository, https://github.com/Vanshbordia/vlrdevapi
Project-URL: Documentation, https://vlrdevapi.pages.dev/docs
License: MIT License
        
        Copyright (c) 2026 Vansh Bordia
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENCE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Games/Entertainment
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Python: >=3.11
Requires-Dist: httpx>=0.28.1
Requires-Dist: pydantic>=2.12.5
Requires-Dist: selectolax>=0.4.7
Provides-Extra: test
Requires-Dist: pytest-cov>=7.1.0; extra == 'test'
Requires-Dist: pytest>=8.0; extra == 'test'
Requires-Dist: respx>=0.23.1; extra == 'test'
Description-Content-Type: text/markdown

<div align="center">

<img src="official-docs/public/logo.svg" width="120" alt="vlrdevapi logo">

# vlrdevapi

**Python library for VLR.gg Valorant esports data**

[![Python Version](https://img.shields.io/pypi/pyversions/vlrdevapi.svg)](https://pypi.org/project/vlrdevapi/)
[![PyPI](https://img.shields.io/pypi/v/vlrdevapi.svg)](https://pypi.org/project/vlrdevapi/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

[Documentation](https://vlrdevapi.pages.dev/docs) · [ReadTheDocs](https://vlrdevapi.readthedocs.io/) · [PyPI](https://pypi.org/project/vlrdevapi/) · [GitHub](https://github.com/Vanshbordia/vlrdevapi)

</div>

---

Access Valorant esports data from VLR.gg with a clean, type-safe Python API. Get tournament info, match schedules, player stats, team data, and series/match-level details.

## Features

- **Complete Data Access** - Events, matches, players, teams, series, and news
- **Type-Safe** - Pydantic models with rich type hints and field descriptions
- **Production-Ready** - Retry logic, rate limiting, and LRU-cached enrichment
- **Curried Access** - Bind a player/team/series ID once, then call sub-methods without re-passing
- **Managed with [uv](https://docs.astral.sh/uv/)** - Fast dependency resolution and virtual environment management

## Installation

```bash
# Using uv (recommended)
uv add vlrdevapi

# Using pip
pip install vlrdevapi
```

Requires Python 3.11+

## Quick Start

### Module-level (no client needed)

```python
import vlrdevapi

# Single-shot fetches via module-level access
info = vlrdevapi.player.info(player_id=11225)
print(f"{info.name} - {info.country}")

series = vlrdevapi.series.info(series_id=542272)
print(f"{series.team1.name} vs {series.team2.name}")

event = vlrdevapi.event.info(event_id=2863)
print(f"{event.name} - {event.subtitle}")
```

### Sync client

```python
from vlrdevapi import VLRClient

with VLRClient() as client:
    # Curried access - bind a player once
    player = client.player(11225)
    print(player.info().name)
    print(player.teams().current_teams)
    print(player.agents(timespan="all").agents[:3])

    # Team data
    team = client.team(1034)
    roster = team.roster()
    placements = team.placements()

    # Event data
    event = client.event(2863)
    stages = event.stages()
    matches = event.matches()
```

## API Modules

### Matches

```python
matches = client.matches.upcoming(page=1)
live = client.matches.live()
completed = client.matches.completed(page=1)
```

### Players

```python
p = client.player(11225)
info = p.info()                           # Basic info
teams = p.teams()                         # Current / past teams
agents = p.agents(timespan="60d")         # Agent stats
matches = p.matches(limit=20)             # Match history
profile = p.profile()                     # Consolidated profile
```

### Teams

```python
t = client.team(1034)
info = t.info()                           # Name, tag, socials
roster = t.roster()                       # Players + staff
placements = t.placements()               # Event placements + winnings
transactions = t.transactions()            # Join / leave history
completed = t.completed_matches()          # Completed match results
upcoming = t.upcoming_matches()            # Upcoming match schedule
```

### Events

```python
e = client.event(2863)
info = e.info()                          # Event details
matches = e.matches()                    # Match list
standings = e.standings()                # Standings / prize distribution
```

### Series

```python
s = client.series(542272)
info = s.info()                          # Series overview
vods = s.vods()                          # VOD links
players = s.players(game_id=1)           # Per-game player stats
rounds = s.rounds(game_id=1)             # Round-by-round data
performance = s.performance()            # Advanced performance stats
economy = s.economy(game_id=1)           # Economy data
```

### News

```python
page = client.news(page=1)               # Browse the news listing
for item in page.news[:5]:
    print(item.title)

article = client.news.article(734100)    # Fetch a full article
print(article.content_md)                # Article body as Markdown
```

## Documentation

- **Official Docs** - [vlrdevapi.pages.dev/docs](https://vlrdevapi.pages.dev/docs)
- **ReadTheDocs** - [vlrdevapi.readthedocs.io](https://vlrdevapi.readthedocs.io/)

## Development

This project uses [uv](https://docs.astral.sh/uv/) for dependency management.

```bash
# Clone and set up
git clone https://github.com/Vanshbordia/vlrdevapi
cd vlrdevapi
uv sync --group dev

# Lint & type check
ruff check src/ tests/
ty check src/vlrdevapi/

# Run tests
uv run pytest tests/ -v
```

See [CONTRIBUTING.md](CONTRIBUTING.md) for the full contribution guide.

## License

MIT License - see the [LICENCE](LICENCE) file.

---

**Disclaimer:** Not affiliated with VLR.gg or Riot Games. Use responsibly.
