Code Reference

Client

class steamfront.client.Client(apiKey: str=None)[source]

Provides a client for you to get apps, users, and other miscellania with.

Parameters:apiKey (Optional[str]) – The key used for API functions. This is not required for all methods, but a good few of them. Defaults to None if no key is passed on client creation.
getApp(*, name: str=None, appid: str=None, caseSensitive: bool=True) → steamfront.app.App[source]

Returns a steamfront.app.App of the name or app ID that was input to the function.

Parameters:
  • appid (str) – The ID of the app you’re getting the object of.
  • name (str) – The name of the app you’re getting the object of. May not be 100% accurate.
  • caseSensitive (bool) – Whether or not the name being searched for is case sensitive or not. Has no effect on appid.
Returns:

The object of relevant data on the app.

Return type:

steamfront.app.App

Raises:
getUser(*, name: str=None, id64: str=None) → steamfront.user.User[source]

Returns a steamfront.user.User of the name or ID64 that was input to the function.

Parameters:
  • id64 (str) – The ID64 of a user you want the object of.
  • name (str) – The Steam ID (name) of a user you want the object of. Names are case sensitive.
Returns:

The object of relevant data on the user.

Return type:

steamfront.user.User

Raises:

steamfront.errors.MissingArguments – Raised if there is neither a name or an ID64 passed.

Game

class steamfront.app.App(appid: str)[source]

The app object, providing information on apps on the Steam store.

Warning

It should be noted that not all of these attributes will be available for every app, but all will be present. Make sure that the attributes you want to use do not contain exceptions or None.

Parameters:

appid (str) – The ID of an app.

Variables:
  • raw – The raw return of values from Steam.
  • about_the_game – A str containing the ‘about the game’ section from the Steam store page.
  • appid – A str containing the ID of the app.
  • categories – A list of categories.
  • controller_support – A str stating what kind of controller support there is.
  • genres – A list of genres that the app is in.
  • developers – A list of developers for the app.
  • header_image – A str link to the header image of the app.
  • is_free – A bool on whether the app is free or not.
  • linux_requirements – A dict containing information on the Linux requirements for the app.
  • mac_requirements – A dict containing information on the Mac requirements for the app.
  • metacritic – A dict containing the URL and score of the Metacritic review of the app, with keys score and url.
  • name – A str of the app’s name.
  • pc_requirements – A dict containing information on the PC requirements for the app.
  • platforms – A dict of Linux, PC, and Mac, with boolean values on whether they’re available on there or not.
  • price_overview – A dict of the price of the app, with information including the current price, discount percentage, and initial price.
  • publishers – A list of publishers that the app has.
  • recommendations – An int of the amount of recommendations the app has.
  • release_date – A str of when the app was released.
  • released – A bool of whether it’s out yet or not.
  • required_age – An int of the required age. Is 0 if none.
  • reviews – A str of some of the acclaimed reviews linked on the store page.
  • screenshots – A list of links to the screenshots of the app linked on the store page.
  • short_description
  • support_info – A dict on the support info of the app.
  • supported_languages – A str of comma seperated languages.
  • type – A str pf the type of app that it is.
  • website – The linked website of the app as a str.
Raises:

steamfront.errors.AppNotFound – Raised if the app provided can’t be found.

User

class steamfront.user.User(id64: str, apiKey: str=None)[source]

The user object, representing a Steam user

Parameters:
  • id64 (str) – The user’s ID64.
  • apiKey (Optional[str]) – Your API key.
Variables:
  • raw – The raw dict that was retrieved from the API.
  • id64 – A str containing the user’s ID64 value.
  • name – A str of the user’s display name on Steam.
  • profile_urlstr linking to the user’s profile.
  • avatar – The str of the URL that links to the user’s avatar.
  • status – A str showing what status the user is displaying as.
  • private – A bool indicating whether or not this user’s profile is private.
  • last_online – An int of a Unix timestamp of when the user was last online.
  • raw_games – The raw dict of what was retrieved from the API.
  • game_count – An int showing how many games are on the user’s profile.
  • games – A list of str containing the app IDs of the user’s games.
Raises:

UserGame

class steamfront.userapp.UserApp(appdata: dict, user, lazy=True)[source]

An object based on the relationship between a user and an app. A subclass of steamfront.app.App. This will not contain any of the attributes for steamfront.app.App until :meth unlazify: has been called. Should not be called manually - will be automatically generated with a steamfront.user.User instance.

Parameters:
  • appdata (dict) – The app data that came from the API through the user.
  • user (steamfront.user.User) – The user to whom the app belongs.
Variables:
  • player_id – A str containing the player’s ID.
  • play_time – An int containing how many hours the user has in the app.
  • player – The steamfront.user.User to whom the app belongs.
  • lazy – A bool representing whether or not the object has all of its aspects from steamfront.app.App.
unlazify()[source]

To get all of the app attributes of an app, this must be called.

Exceptions

exception steamfront.errors.APIKeyRequired[source]

Doing this requires an API key.

exception steamfront.errors.AppNotFound[source]

The specified app was not found on Steam via the API.

exception steamfront.errors.MissingArguments[source]

You are missing required values from the function or method. Please consult the documentation.

exception steamfront.errors.UserNotFound[source]

The specified user was not found on Steam via the API.