Steam client library for Python
Project description
Steam Client
A Python library for interacting with a locally installed Steam client — enumerate your game library/non-steam games, read game metadata and artwork paths, send Steam URI commands, and query the Steam Web API.
Installation
Requires Python 3.8+.
pip install steam-client
Or install from source:
pip install -e .
Quickstart
from steam_client.steam import Steam
steam = Steam() # Uses default path: C:\Program Files (x86)\Steam
# On Windows, auto-detect path from registry:
from steam_client.utils import steam_from_registry
steam = steam_from_registry()
Common Operations
List all installed games
for game in steam.library.games():
print(game.appid, game.name)
Find a game
game = steam.library.game_by_id("440") # by app ID
game = steam.library.game_by_name("Portal 2") # by name (case-insensitive)
Artwork paths
game.header # Path to header image (460×215 jpg)
game.grid # Path to grid image (600×900 jpg)
game.hero # Path to hero image
game.icon # Path to icon file, or None
Launch and manage games via Steam URI commands
from steam_client.commands import Commands, SteamWindows
commands = Commands()
commands.run_game_id("440") # Launch a game
commands.store("440") # Open store page
commands.install("440") # Prompt install
commands.uninstall("440") # Prompt uninstall
commands.open(SteamWindows.FRIENDS) # Open a Steam window
commands.open_url("https://store.steampowered.com")
Or launch a game directly from a SteamGame object:
game.run()
Users and shortcuts
for user in steam.users:
print(user.user.data.PersonaName)
for shortcut in steam.library.shortcuts():
print(shortcut.appname)
Steam Web API
from steam_client.web_api import WebAPI
api = WebAPI()
apps = api.get_app_list()
Platform Notes
| Platform | Default path | Registry helper |
|---|---|---|
| Windows | C:\Program Files (x86)\Steam |
steam_from_registry() |
| Linux | ~/.local/share/steam |
Not available |
Pass a custom path to override the default:
steam = Steam("/custom/steam/path")
Requires read access to local Steam config files (libraryfolders.vdf, shortcuts.vdf, appmanifest files).
Development
pytest # Run tests
flake8 steam_client # Lint
mypy steam_client # Type check
tox # Run all environments (lint, type, py311–314)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file steam_client-4.0.0.tar.gz.
File metadata
- Download URL: steam_client-4.0.0.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0ab2537ccc3420030b52b7e15703972ef77cad1c34a1f323f389bbc4ce8acc8
|
|
| MD5 |
4a4418c9b2e839ce58e6a3f7df6d86e3
|
|
| BLAKE2b-256 |
f28fb2e76626517d9470e0ee9b3ab594c49ec530e3d8819efdce1626e3170199
|
Provenance
The following attestation bundles were made for steam_client-4.0.0.tar.gz:
Publisher:
pypi.yaml on Garulf/Steam-Client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
steam_client-4.0.0.tar.gz -
Subject digest:
e0ab2537ccc3420030b52b7e15703972ef77cad1c34a1f323f389bbc4ce8acc8 - Sigstore transparency entry: 1447354367
- Sigstore integration time:
-
Permalink:
Garulf/Steam-Client@04beb79339a4854d88023d7e6909aef7c2ee3e7d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Garulf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yaml@04beb79339a4854d88023d7e6909aef7c2ee3e7d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file steam_client-4.0.0-py3-none-any.whl.
File metadata
- Download URL: steam_client-4.0.0-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
248c40c0160bc88bd3524ff455a5f668014cddc8a5162c231d750924f8496e3e
|
|
| MD5 |
ac8c50bd19ce7805e42ce1344c8c8558
|
|
| BLAKE2b-256 |
0d42e3babec289cf183a15b3b45e7bf2f8bb4b1678d562b28403b03d34fd2bc8
|
Provenance
The following attestation bundles were made for steam_client-4.0.0-py3-none-any.whl:
Publisher:
pypi.yaml on Garulf/Steam-Client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
steam_client-4.0.0-py3-none-any.whl -
Subject digest:
248c40c0160bc88bd3524ff455a5f668014cddc8a5162c231d750924f8496e3e - Sigstore transparency entry: 1447354772
- Sigstore integration time:
-
Permalink:
Garulf/Steam-Client@04beb79339a4854d88023d7e6909aef7c2ee3e7d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Garulf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yaml@04beb79339a4854d88023d7e6909aef7c2ee3e7d -
Trigger Event:
workflow_dispatch
-
Statement type: