Skip to main content

Steam Client API

Project description

Steam Client API

A Python 3.8 library for Steam shortcuts. Get app IDs, manage custom artwork, and more!

Installation

The package is available on PyPi and can be installed with pip.

pip install steamclient

Usage

Documentation

>>> import steamclient

>>> # Get a shortcut from the user that last logged in
>>> users = steamclient.get_users()
>>> shortcut = users[0].shortcuts[23]

>>> # Print shortcut info
>>> shortcut.info()

Shortcut 23
    id: 2361552855
    name: The Outer Worlds
    exe: "C:\\Games\\The Outer Worlds\\TheOuterWorlds.exe"
    start_dir: "C:\\Games\\The Outer Worlds\\"
    icon: ""
    shortcut_path: ""
    launch_options: ""
    hidden: False
    allow_desktop_config: True
    allow_overlay: True
    openvr: False
    devkit: False
    devkit_game_id:
    last_play_time: b'\x02\x96\xbf]'
    tags: []

>>> # Get the paths to custom artwork
>>> shortcut.logo
'C:\\Program Files (x86)\\Steam\\userdata\\82279028\\config\\grid\\2361552855_logo.png'
>>> shortcut.hero
'C:\\Program Files (x86)\\Steam\\userdata\\82279028\\config\\grid\\2361552855_hero.png'
>>> shortcut.grid
'C:\\Program Files (x86)\\Steam\\userdata\\82279028\\config\\grid\\2361552855p.png'

>>> # Set artwork for a game or shortcut with a file or a url
>>> shortcut.set_logo(filepath='C:\\Games\\Steam Grid\\logo.png')
>>> shortcut.set_grid(url='https://gitlab.com/avalonparton/grid-beautification/raw/master/Games/Untitled%20Goose%20Game/Lake.png')

>>> # Get the paths to local Steam libraries
>>> libraries = steamclient.get_libraries() 
['C:\\Program Files (x86)\\Steam', 'D:\\Games\\Steam Library', 'G:\\Steam Library']

>>> # Get all installed Steam Games in one library
>>> user.games(libraries[:1])
[<Game Brawlhalla (291550)>, <Game Castle Crashers (204360)>, <Game Destiny 2 (1085660)>, <Game Dota 2 (570)>, <Game Generation Zero (704270)>, <Game Rocket League (252950)>, <Game SteamVR (250820)>, <Game Steamworks Common Redistributables (228980)>, <Game Team Fortress 2 (440)>, <Game The Binding of Isaac (113200)>]

To Do

  • Add a function to create new shortcuts (can automate adding non-steam games!)

Changelog

0.2

  • Added set_logo(), set_hero(), and set_grid() functions to Games and Shortcuts

0.1

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

steamclient-0.2-py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page