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
>>> 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
Close
Hashes for steamclient-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d438717da0999e76a1f39c9afb2b6a2fb678fe7dca2daaa9f1396291a7437ef6 |
|
MD5 | 47dd6d2b0a999561b7dafa9e87394abb |
|
BLAKE2b-256 | 105cc59499b629600c58e0fabfa9504167a282ba593c066e8ea27d9fc2a91004 |