π» Command-line toolΒΆ
Installing the Python package gives you an awpy command (also runnable as
python -m awpy) for quick demo inspection and map-data management without
writing any code:
pip install awpy
awpy --help
Demo inspectionΒΆ
Every command takes a demo path. Row-level commands accept --limit N, and
all of them accept --json for machine-readable output.
Command |
Description |
|---|---|
|
Check that a file parses as a valid CS2 demo (magic bytes + header). |
|
Print the file header and playback info. |
|
List event names; pass a name to dump that event, |
|
Per-round table (start / freeze-end / end / official-end, winner, reason). |
|
Kills from |
|
Damage from |
|
Bomb actions (pickup / drop / plant / defuse) with site. |
|
Shots from |
|
Grenade / inferno / smoke summaries. |
|
Flash events: who was blinded, by whom, and for how long. |
|
Weapon-item transactions: purchases, pickups, and drops. |
|
Per-player scoreboard (kills, KAST, ADR, openings, trades). |
awpy info match.dem
awpy rounds match.dem
awpy events match.dem --summary
awpy events match.dem player_ping --json
awpy kills match.dem --limit 20
awpy stats match.dem
Tables are rendered by Polars β the same DataFrames the Python API returns β
and --json emits the rows as a JSON array:
shape: (24, 9)
βββββββββββββ¬βββββββββββββ¬ββββββββββββββββββ¬βββββββββββ¬ββββ¬ββββββββββββββββββββ¬βββββββββββββββββ
β round_num β start_tick β freeze_end_tick β end_tick β β¦ β winner_side β reason_name β
βββββββββββββͺβββββββββββββͺββββββββββββββββββͺβββββββββββͺββββͺββββββββββββββββββββͺβββββββββββββββββ‘
β 1 β 1016 β 2712 β 6810 β β¦ β counter-terrorist β bomb_defused β
β 2 β 7258 β 11121 β 14649 β β¦ β counter-terrorist β ct_win β
βββββββββββββ΄βββββββββββββ΄ββββββββββββββββββ΄βββββββββββ΄ββββ΄ββββββββββββββββββββ΄βββββββββββββββββ
Map-data cacheΒΆ
The same command manages the awpy-data
asset cache under ~/.awpy (see Visibility & map data):
awpy get # download the latest release
awpy get 2000873 # ... or a specific one (--force to re-download)
awpy versions # cached releases, and whether a newer one exists
awpy maps # maps available in a release
awpy clear 2000873 # delete one cached release (--all for everything)
Parser internals: awpy-devΒΆ
The Rust workspace additionally ships a developer binary for debugging the parser itself β the demo message stream, entity snapshots, send-tables, string tables, and entity classes:
cargo install --path crates/awpy-dev # installs `awpy-dev`
awpy-dev messages match.dem --cmd Packet --limit 10
awpy-dev classes match.dem --filter Weapon
awpy-dev send-tables match.dem --filter CCSPlayerPawn
awpy-dev string-tables match.dem --table userinfo
awpy-dev entities match.dem --tick 100000 --class CCSPlayerPawn --fields
These surfaces arenβt exposed in the Python API; if youβre not hacking on the parser, you wonβt need them.