Steam Wrapper

  1. Steamworks.NET is a C# Wrapper for Valve’s Steamworks API and is completely free and open source under the permissive MIT license! You can use Steamworks.NET with Unity or non-Unity based.NET projects. A primary goal of Steamworks.NET is to be as easy to get started as possible.
  2. Returns the 64 bit Steam ID. Relationship¶ Returns relationship qualifier. Since¶ Returns date when relationship was created as a localtime time.structtime. Class steam.user.friendlist (sid, relationship='all',.kwargs) ¶ Creates an iterator of friend objects fetched from given user’s Steam ID.
Wrapper

Low level methods¶

Wrapping a program within Steam. August 08, 2021, 14:28:30. There was a 'steam wrapper' BlitzSteam - Steam wrapper for Blitz. GameEx MEDIA STEAM WRAPPERS. I'll start with my Zombie Driver wrapper. Update - I've attached some more that I created tonight. 12210 - Grand Thef Auto IV.rar. 19030 - Rocket Knight.rar. 21660 - Street Figther IV.rar. 31410 - Zombie Driver.rar. 35700 - Trine.rar. 35720 - Trine 2.rar. 50510 - Burn Zombie Burn.rar. 50820 - Magic Marker.rar.

You can call any method from any of Steam API interfaces usingsteam.api.interface class. Let’s start with a quick example where wefetch user’s game library.

Start by importing interface class:

Call method GetOwnedGames of interface IPlayerService. We aregoing to fetch games of user with id 76561198017493014 and include allapplication information:

Since all method calls are lazy by default, this doesn’t do anything at all.We’ll need to either iterate over games, print it or access anyof its dictionary keys:

Don’t worry, resource isn’t fetched each time you access results.

You can disable laziness of interface by passing aggressive=Trueto its method:

You can also pass since (which translates to HTTP header If-Modified-Since)and timeout to method. By default, version is set to 1.data can be passed to send POST data with requests. By default no data is assumed and request typesare GET. Any number of additional keyword arguments are supported depending on the given method (see documentation).

High level methods¶

Following classes are convenience wrappers around Low level methods. kwargsare always passed to appropriate interface methods, so you can use all argumentsfrom previous section.

Apps¶

class steam.apps.app_list(**kwargs)

Retrieves a list of all Steam apps with their ID and localized name.

Items¶

class steam.items.schema(app, lang=None, version=1, **kwargs)

Wrapper for item schema of certain games from Valve. Those are currentlyavailable (along with their ids):

  • 260 - Counter Strike: Source Beta
  • 440 - Team Fortress 2
  • 520 - Team Fortress 2 Public Beta
  • 570 - Dota 2
  • 620 - Portal 2
  • 710 - Counter-Strike: Global Offensive Beta Dev
  • 816 - Dota 2 internal test
  • 841 - Portal 2 Beta
  • 205790 - Dota 2 (beta) test

Fetching schema of Team Fortress 2 (id 440) would look like:

Schema class is an iterator of steam.items.item() objects. There arealso other properties available:

client_url

Client schema URL

language

The ISO code of the language the instanceis localized to

attributes

Returns all attributes in the schema

origins

Returns a map of all origins

qualities

Returns a dict of all possible qualities. The key(s) will be the ID,values are a tuple containing ID, name, localized name. To resolvea quality to a name intelligently use ‘_quality_definition’

particle_systems

Returns a dictionary of particle system dicts keyed by ID

kill_ranks

Returns a list of ranks for weapons with kill tracking

kill_types

Returns a dict with keys that are the value ofthe kill eater type attribute and values that are the namestring

class steam.items.item(item, schema=None)

Stores a single inventory item.

This is a simple wrapper around JSON representation of both schema andinventory items. It is composed mostly from item properties:

As convenience, item acts also as iterator of its attributes:

Following properties are available:

attributes

Returns a list of attributes

quality

Returns a tuple containing ID, name, and localized name of the quality

inventory_token
Wrapper

Returns the item’s inventory token (a bitfield),deprecated.

position

Returns a position in the inventory or -1 if there’s no positionavailable (i.e. an item hasn’t dropped yet or got displaced)

equipped

Returns a dict of classes that have the item equipped and in what slot

equipable_classes

Returns a list of classes that _can_ use the item.

schema_id

Returns the item’s ID in the schema.

name

Returns the item’s undecorated name

type

Returns the item’s type. e.g. “Kukri” for the Tribalman’s Shiv.If Valve failed to provide a translation the type will be the token withoutthe hash prefix.

icon

URL to a small thumbnail sized image of the item, suitable for display in groups

image

URL to a full sized image of the item, for displaying ‘zoomed-in’ previews

id

Returns the item’s unique serial number if it has one

original_id

Returns the item’s original ID if it has one. This is the last “version”of the item before it was customized or otherwise changed

level

Returns the item’s level (e.g. 10 for The Axtinguisher) if it has one

slot_name

Returns the item’s slot as a string, this includes “primary”,“secondary”, “melee”, and “head”. Note that this is the slotof the item as it appears in the schema, and not necessarilythe actual equipable slot. (see ‘equipped’)

cvar_class

Returns the item’s class(what you use in the game to equip it, not the craft class)

craft_class

Returns the item’s class in the crafting system if it has one.This includes hat, craft_bar, or craft_token.

craft_material_type
custom_name

Returns the item’s custom name if it has one.

custom_description

Returns the item’s custom description if it has one.

quantity

Returns the number of uses the item has,for example, a dueling mini-game has 5 uses by default

description

Returns the item’s default description if it has one

min_level

Returns the item’s minimum level(non-random levels will have the same min and max level)

contents

Returns the item in the container, if there is one.This will be a standard item object.

tradable

Somewhat of a WORKAROUND since this flag is theresometimes, “cannot trade” is there sometimesand then there’s “always tradable”. Opposed toonly occasionally tradable when it feels like it.Attr 153 = cannot trade

craftable

Returns not craftable if the cannot craft flag exists. True, otherwise.

full_name

The full name of the item, generated dependingon things such as its quality, rank, the schema language,and so on.

kill_eaters

Returns a list of tuples containing the proper localized kill eater type strings and their valuesaccording to set/type/value “order”

rank

Returns the item’s rank (if it has one)as a dict that includes required score, name, and level.

available_styles

Returns a list of all styles defined for the item

style

The current style the item is set to or None if the item has no styles

capabilities

Returns a list of capabilities, these are flags for what the item can do or be done with

tool_metadata

A dict containing item dependant metadata such as holiday restrictions, types, and properties used by the client. Do not assume a stable syntax.

origin

Returns the item’s localized origin name

class steam.items.item_attribute(attribute)

Wrapper around item attributes.

Following properties are available:

formatted_value

Returns a formatted value as a string

formatted_description

Returns a formatted description string (%s* tokens replaced) or None if unavailable

name

The attribute’s name

cvar_class

The attribute class, mostly non-useful except for console usage in some cases

id

The attribute ID, used for indexing the description blocks in the schema

type

Returns the attribute effect type (positive, negative, or neutral). This is not the same as the value type, see ‘value_type’

value

Tries to intelligently return the raw value based on schema data.See also: ‘value_int’ and ‘value_float’

value_int
value_float
description

Returns the attribute’s description string, ifit is intended to be printed with the value there willbe a “%s1” token somewhere in the string. Use‘formatted_description’ to build one automatically.

value_type

The attribute’s type, note that this is the type of the attribute’svalue and not its affect on the item (i.e. negative or positive). See‘type’ for that.

hidden

True if the attribute is “hidden”(not intended to be shown to the end user). Notethat hidden attributes also usually have no description string

account_info

Certain attributes have a user’s account informationassociated with it such as a gifted or crafted item.

A dict with two keys: ‘persona’ and ‘id64’.None if the attribute has no account information attached to it.

class steam.items.inventory(app, profile, schema=None, **kwargs)

Wrapper around player inventory.

Fetches inventory of player for given app id:

Since inventory endpoint returns just very basic structure, we have toprovide also schema if we want to work with fully populated steam.items.item()objects:

There is also single property:

cells_total

The total number of cells in the inventory.This can be used to determine if the user has bought anexpander. This is NOT the number of items in the inventory, buthow many items CAN be stored in it. The actual current inventory sizecan be obtained by calling len on an inventory object

class steam.items.assets(app, lang=None, **kwargs)

Class for building asset catalogs

Fetches store assets for app id. Assets class acts as an iterator ofsteam.items.asset_item() objects.

If you care only about single currency, currency keyword argument inISO 4217 format is also accepted.

All available tags of assets are available in following property:

tags

Returns a dict that is a map of the internal tag namesfor this catalog to the localized labels.

class steam.items.asset_item(asset, catalog)

Stores a single item from a steam asset catalog

tags

Returns a dict containing tags and their localized labels as values

base_price

The price the item normally goes for, not including discounts.

price

Returns the most current price available, which may include sales/discounts

name

The asset “name” which is in fact a schema id of item.

Localization¶

Steam_wrapper.dll

class steam.loc.language(code=None)

Steam API localization tools and reference

If language is not specified, it defaults to English:

If language isn’t supported, __init__ raises steam.loc.LanguageUnsupportedError()

Properties:

code
name
class steam.loc.LanguageUnsupportedError

Remote storage¶

Tools for probing Steam’s UGC file storage system. UGC itself means UserGenerated Content but in this context assume that such terms as “UGC ID” arespecific to Valve’s system. UGC IDs are found in various places in the API andSteam including decal attributes on TF2 items.

Practically speaking the purpose of ugc_file is similar to that ofsteam.user.vanity_url. Namely to convert an arbitrary ID intosomething useful like a direct URL.

class steam.remote_storage.ugc_file(appid, ugcid64, **kwargs)

Resolves a UGC file ID into usable metadata.

Fetches UGC file metadata for the given UGC and app ID.

Steam wrapper mac 2020

Properties:

size

Steam Wrapper Mac Catalina

Size in bytes

filename

Local filename is what the user named it, not the URL

url

UGC link

class steam.remote_storage.FileNotFoundError

User¶

class steam.user.vanity_url(vanity, **kwargs)

Class for holding a vanity URL and its id64

class steam.user.profile(sid, **kwargs)

Functions for reading user account data

id64

Returns the 64 bit steam ID (use with other API requests)

id32

Returns the 32 bit steam ID

persona

Returns the user’s persona (what you usually see in-game)

profile_url

Returns a URL to the user’s Community profile page

vanity

Returns the user’s vanity url if it exists, None otherwise

avatar_small
avatar_medium
avatar_large
status

Returns the user’s status.0: offline1: online2: busy3: away4: snooze5: looking to trade6: looking to playIf player’s profile is private, this will always be 0.

visibility

Returns the visibility setting of the profile.1: private2: friends only3: public

configured

Returns true if the user has created a Community profile

last_online

Returns the last time the user was online as a localtimetime.struct_time struct

comments_enabled

Returns true if the profile allows public comments

real_name

Returns the user’s real name if it’s set and public

Steam Wrapper For Winebottler

primary_group

Returns the user’s primary group ID if set.

creation_date

Steam Wrapper Mac 2020 Download

Returns the account creation date as a localtime time.struct_timestruct if public

current_game

Steam Wrapper

Returns a tuple of 3 elements (each of which may be None if not available):Current game app ID, server ip:port, misc. extra info (eg. game title)

location

Returns a tuple of 2 elements (each of which may be None if not available):State ISO code, country ISO code

lobbysteamid

Returns a lobbynumber as int from few Source games or 0 if not in lobby.

level

Returns the the user’s profile level, note that this runs a separaterequest because the profile level data isn’t in the standard player summaryoutput even though it should be. Which is also why it’s not implementedas a separate class. You won’t need this output and not the profile output

classmethod from_def(obj)

Builds a profile object from a raw player summary object

current_game

Returns a tuple of 3 elements (each of which may be None if not available):Current game app ID, server ip:port, misc. extra info (eg. game title)

class steam.user.profile_batch(sids)
class steam.user.bans(sid, **kwargs)
id64
community

Community banned

vac

User is currently VAC banned

vac_count

Number of VAC bans on record

days_unbanned

Number of days since the last ban.Note that users without a ban on record will havethis set to 0 so make sure to test bans.vac

economy

Economy ban status which is a string for whatever reason

game_count

Number of bans in games, this includes CS:GO Overwatch bans

classmethod from_def(obj)
class steam.user.bans_batch(sids)
class steam.user.friend(friend_dict)

Class used to store friend obtained from GetFriendList.

steamid

Returns the 64 bit Steam ID

relationship

Returns relationship qualifier

since

Returns date when relationship was created as a localtime time.struct_time

class steam.user.friend_list(sid, relationship='all', **kwargs)

Creates an iterator of friend objects fetched from given user’s Steam ID.Allows for filtering by specyfing relationship argument in constructor,but API seems to always return items with friend relationship.Possible filter values: all, friend.

count

Returns number of friends

Comments are closed.