Awpy#
Awpy parses Counter-Strike 2 demo files in Rust. Its Python API returns Polars DataFrames.
Why Awpy?#
Read match events, rounds, player state, and statistics.
Select datasets and sample player state at specified ticks.
Check lines of sight and navigation paths.
Calculate map control and plot results on radar images.
Inspect demos and download map assets with the
awpycommand.
Get started#
Awpy requires Python 3.11 or later and Polars 2.x.
Install with uv add awpy or pip install awpy. See Getting started and Examples. Report problems in GitHub issues.
from awpy import Demo
demo = Demo("match.dem")
print(demo.header["map_name"])
rounds = demo.rounds # round_num, winner_side, reason_name, ...
kills = demo.kills # every player_death, all fields
Useful links#
Counter-Strike 2 — official home page
Polars — the DataFrame library Awpy returns data in
pbdems2 — the shared Source 2 demo-format core and its format guide
Boon — a Deadlock demo parser
deadlock.nyc — a Deadlock demo viewer for the browser