Limitations
This page lists what pygsi doesn’t do. Some of it is CS2’s limit, because the game sends a player less than it sends an observer, and some is pygsi’s own.
What CS2 Doesn’t Send Players
Some GSI components only carry data for spectators and observers, such as casters and tournament tools:
allplayers,allplayers_state,allplayers_match_stats,allplayers_weapons, andallplayers_position, with data on every player in the matchbomb, with the bomb’s position and carrierallgrenades, with every grenade in the airphase_countdowns, with the timers for each phaseplayer_position, with the player’s position
During a match, a player’s own client sends nothing for these, so pygsi doesn’t model them. That also means pygsi can’t say who the player killed, who killed them, or who planted the bomb. The draft CS2 GSI spec lists every component and what CS2 sends for each.
What pygsi Doesn’t Do
- Handlers must be async. There’s no support for plain
defhandlers. run()owns the event loop. It callsuvicorn.run, which creates its own loop and blocks. To share a process with other async code, such as a Discord bot, you have to run pygsi in its own thread.- The config file’s
authblock is ignored. CS2 can send a token with each payload, but pygsi doesn’t check it. Anyone who can reach the server can send it payloads, which is one more reason to bind to127.0.0.1when you can. - Handler signatures aren’t type-checked. The decorators accept any async function, so a handler with the wrong signature only shows up at runtime, as an error in the log.
- Weapons aren’t modeled. CS2 sends a player’s weapons in the
player_weaponscomponent, but pygsi doesn’t read it. - Nothing is saved. State lives in memory and is gone when the process stops.