Awpy#

from awpy import Demo

demo = Demo("match.dem")
demo.load("kills", "damages", "shots")
print(demo.header["map_name"])
print(demo.stats.select("name", "kills", "deaths", "assists", "adr", "kast"))
print(demo.snapshots(seconds=1.0))

Awpy parses Counter-Strike 2 demo files in Rust. Its Python API returns typed Polars DataFrames. Use Polars for filters, joins, and Apache Parquet output. Use matplotlib for radar plots and replay animations.

Use Awpy with Python, Polars, and Rust#

  • 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.

Install Awpy for CS2 replay analysis#

Awpy requires Python 3.11 or later and Polars 2.x.

Install with uv add awpy or pip install awpy. See Get started with Awpy and Examples. Report problems in GitHub issues.