client

Only the most essential features to csgo.client.CSGOClient are found here. Every other feature is inherited from the csgo.features package and it’s submodules.

class csgo.client.CSGOClient(steam_client)

Bases: steam.client.gc.GameCoordinator, csgo.features.FeatureBase

Parameters:steam_client (steam.client.SteamClient) – Instance of the steam client
app_id = 730

enable pretty print of messages in debug logging

launcher = 0

main client app id

current_jobid = 0

launcher type (used for access to PW) See: csgo.enums.GCClientLauncherType

connection_status = 2

True when we have a session with GC

account_id

Account ID of the logged-in user in the steam client

steam_id

steam.steamid.SteamID of the logged-in user in the steam client

wait_msg(event, timeout=None, raises=None)

Wait for a message, similiar to wait_event()

Parameters:
  • event (ECsgoGCMsg or job id) – event id
  • timeout (int) – seconds to wait before timeout
  • raises (bool) – On timeout when False returns None, else raise gevent.Timeout
Returns:

returns a message or None

Return type:

None, or proto message

Raises:

gevent.Timeout

send_job(*args, **kwargs)

Send a message as a job

Exactly the same as send()

Returns:jobid event identifier
Return type:str
send(emsg, data={}, proto=None)

Send a message

Parameters:
  • emsg – Enum for the message
  • data (dict) – data for the proto message
  • proto – (optional) manually specify protobuf, other it’s detected based on emsg
launch()

Launch CSGO and establish connection with the game coordinator

ready event will fire when the session is ready. If the session is lost notready event will fire. Alternatively, connection_status event can be monitored for changes.

exit()

Close connection to CSGO’s game coordinator