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 awpy command.

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