user

class steam.client.user.SteamUser(steam_id, steam)

Bases: object

A data model for a Steam user. Holds user persona state, and related actions

Note

This is an internal object that can be obtained by SteamClient.get_user()

relationship = 0

friendship status

steam_id = SteamID(id=0, type='Invalid', universe='Invalid', instance=0)

steam id

get_ps(field_name, wait_pstate=True)

Get property from PersonaState

See full list of available fields_names

last_logon
Return type:datetime, None
last_logoff
Return type:datetime, None
name

Name of the steam user, or None if it’s not available

Return type:str, None
state

Personsa state (e.g. Online, Offline, Away, Busy, etc)

Return type:EPersonaState
rich_presence

Contains Rich Presence key-values

Return type:dict
get_avatar_url(size=2)

Get URL to avatar picture

Parameters:size (int) – possible values are 0, 1, or 2 corresponding to small, medium, large
Returns:url to avatar
Return type:str
send_message(message)

Send chat message to this steam user

Parameters:message (str) – message to send
block()

Block user

unblock()

Unblock user