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.FeatureBaseParameters: 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¶ Truewhen we have a session with GC
-
account_id¶ Account ID of the logged-in user in the steam client
-
steam_id¶ steam.steamid.SteamIDof 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 (
ECsgoGCMsgor job id) – event id - timeout (
int) – seconds to wait before timeout - raises (
bool) – On timeout whenFalsereturnsNone, else raisegevent.Timeout
Returns: returns a message or
NoneReturn type: None, or proto messageRaises: - event (
-
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
readyevent will fire when the session is ready. If the session is lostnotreadyevent will fire. Alternatively,connection_statusevent can be monitored for changes.
-
exit()¶ Close connection to CSGO’s game coordinator
-