VlrDevApi

Configuration

Configure base URL, timeouts, user agent, retries, backoff, and rate limiting at runtime

Overview

The global configuration lets you control core runtime behavior across the library:

  • Base URL
  • Default timeout
  • Default User-Agent
  • Retries and backoff
  • Built-in rate limiting

Changes take effect immediately and apply across modules like fetcher, events, series, matches, players, teams, and search.

Types

Below are the core configuration fields and helper functions with their Python types.

Configuration fields

Prop

Type

Helper functions

Prop

Type

Quick Examples

Increase timeout and retries

import vlrdevapi as vlr

# Increase default timeout and retry behavior
vlr.configure(default_timeout=10.0, max_retries=5, backoff_factor=2.0)

# Calls now use the new defaults
events = vlr.events.list_events(limit=5)

Custom User-Agent

import vlrdevapi as vlr

vlr.configure(default_user_agent="MyApp/1.0 (+https://example.com)")

Change base URL (advanced)

import vlrdevapi as vlr

vlr.configure(vlr_base="https://my-proxy.example.com")

Rate Limiting

The client uses a lightweight token-bucket limiter. You can change whether it is enabled and what rate to use.

import vlrdevapi as vlr

# Disable
vlr.configure(default_rate_limit_enabled=False)

# Enable and set to 20 requests per second
vlr.configure(default_rate_limit=20, default_rate_limit_enabled=True)

# Temporarily override at runtime via fetcher helpers
vlr.configure_rate_limit(requests_per_second=5, enabled=True)

# Reset back to configured defaults
vlr.reset_rate_limit()

Reset to defaults

import vlrdevapi as vlr

vlr.reset_config()

Per-call overrides

You can still override settings per-call on fetcher functions.

from vlrdevapi.fetcher import fetch_html

# Override timeout just for this request
html = fetch_html("https://www.vlr.gg/matches", timeout=2.5)