steamid¶
-
class
steam.steamid.
SteamID
(*args, **kwargs)¶ Bases:
int
Object for converting steamID to its’ various representations
SteamID() # invalid steamid SteamID(12345) # accountid SteamID('12345') SteamID(id=12345, type='Invalid', universe='Invalid', instance=0) SteamID(103582791429521412) # steam64 SteamID('103582791429521412') SteamID('STEAM_1:0:2') # steam2 SteamID('[g:1:4]') # steam3
-
class
EType
¶ Bases:
steam.enums.base.SteamIntEnum
reference to EType
-
AnonGameServer
= <EType.AnonGameServer: 4>¶
-
AnonUser
= <EType.AnonUser: 10>¶
-
Chat
= <EType.Chat: 8>¶
-
Clan
= <EType.Clan: 7>¶
-
ConsoleUser
= <EType.ConsoleUser: 9>¶
-
ContentServer
= <EType.ContentServer: 6>¶
-
GameServer
= <EType.GameServer: 3>¶
-
Individual
= <EType.Individual: 1>¶
-
Invalid
= <EType.Invalid: 0>¶
-
Max
= <EType.Max: 11>¶
-
Multiseat
= <EType.Multiseat: 2>¶
-
Pending
= <EType.Pending: 5>¶
-
-
class
SteamID.
EUniverse
¶ Bases:
steam.enums.base.SteamIntEnum
reference to EUniverse
-
Beta
= <EUniverse.Beta: 2>¶
-
Dev
= <EUniverse.Dev: 4>¶
-
Internal
= <EUniverse.Internal: 3>¶
-
Invalid
= <EUniverse.Invalid: 0>¶
-
Max
= <EUniverse.Max: 5>¶
-
Public
= <EUniverse.Public: 1>¶
-
-
class
SteamID.
EInstanceFlag
¶ Bases:
steam.enums.base.SteamIntEnum
reference to EInstanceFlag
-
Clan
= <EInstanceFlag.Clan: 524288>¶
-
Lobby
= <EInstanceFlag.Lobby: 262144>¶
-
MMSLobby
= <EInstanceFlag.MMSLobby: 131072>¶
-
-
SteamID.
type
¶ Return type: steam.enum.EType
-
SteamID.
universe
¶ Return type: steam.enum.EUniverse
-
SteamID.
as_steam2
¶ Returns: steam2 format (e.g STEAM_1:0:1234
)Return type: str
Note
STEAM_X:Y:Z
. The value ofX
should represent the universe, or1
forPublic
. However, there was a bug in GoldSrc and Orange Box games andX
was0
. If you need that format useSteamID.as_steam2_zero
-
SteamID.
as_steam2_zero
¶ For GoldSrc and Orange Box games. See
SteamID.as_steam2
Returns: steam2 format (e.g STEAM_0:0:1234
)Return type: str
-
SteamID.
community_url
¶ Returns: e.g https://steamcommunity.com/profiles/123456789 Return type: str
-
static
SteamID.
from_url
(url, http_timeout=30)¶ Takes Steam community url and returns a SteamID instance or
None
See
steam64_from_url()
for detailsParameters: Returns: SteamID instance
Return type: steam.SteamID
orNone
-
class
-
steam.steamid.
steam2_to_tuple
(value)¶ Parameters: value ( str
) – steam2 (e.g.STEAM_1:0:1234
)Returns: (accountid, type, universe, instance) Return type: tuple
orNone
Note
The universe will be always set to
1
. SeeSteamID.as_steam2
-
steam.steamid.
steam3_to_tuple
(value)¶ Parameters: value ( str
) – steam3 (e.g.[U:1:1234]
)Returns: (accountid, type, universe, instance) Return type: tuple
orNone
-
steam.steamid.
steam64_from_url
(url, http_timeout=30)¶ Takes a Steam Community url and returns steam64 or None
Note
Each call makes a http request to
steamcommunity.com
Note
For a reliable resolving of vanity urls use
ISteamUser.ResolveVanityURL
web apiParameters: Returns: steam64, or
None
ifsteamcommunity.com
is downReturn type: int
orNone
Example URLs:
https://steamcommunity.com/gid/[g:1:4] https://steamcommunity.com/gid/103582791429521412 https://steamcommunity.com/groups/Valve https://steamcommunity.com/profiles/[U:1:12] https://steamcommunity.com/profiles/76561197960265740 https://steamcommunity.com/id/johnc
-
steam.steamid.
from_url
(url, http_timeout=30)¶ Takes Steam community url and returns a SteamID instance or
None
See
steam64_from_url()
for detailsParameters: Returns: SteamID instance
Return type: steam.SteamID
orNone