steam-engine
Call a running Steam client’s internal JavaScript API from Python.
steam-engine connects to Steam’s CEF renderer over Chrome DevTools Protocol. It exposes SteamClient.* methods and window.* stores through a Python proxy, so operations run through Steam itself.
For a higher-level collections API, see the sibling project steam-collections.
Get started
Install from the repository, then enable debugging in Steam:
pip install -e .
steam-engine enable --restart
steam-engine status
enable is Linux-only. It patches ubuntu12_64/steamwebhelper_sniper_wrap.sh and backs up the original to .sh.bak. Steam updates can replace this wrapper; run enable again if the connection stops working.
On Windows or macOS, launch Steam with -cef-enable-debugging or add --remote-debugging-port to the webhelper command line.
The default port is 1337. Set STEAM_CDP_PORT to use another port.
Use from Python
Steam must be running with debugging enabled.
from steam_engine import SteamEngine
with SteamEngine.connect() as se:
# Call Steam's native bridge.
se.client.Apps.SetAppLaunchOptions(292030, "-fullscreen")
# Snake_case works too.
se.client.Apps.specify_compat_tool(105600, "proton_experimental")
# Read a JavaScript property.
apps = se.window.appStore.allApps.get()
# Run JavaScript directly.
count = se.eval("collectionStore.userCollections.length")
The proxy supports:
| Syntax | Behavior |
|---|---|
proxy.method(*args) |
Call a method with JSON-serialized arguments; await promises |
proxy.prop.get() |
Read a JSON-serializable property |
proxy.prop.keys() |
List own property names |
proxy.prop[index] |
Access an indexed value |
Method names ignore case and underscores. Results are JSON-decoded; undefined and unserializable results become None.
Use from the terminal
steam-engine status # Check the connection
steam-engine targets # List debuggable targets
steam-engine enable --restart # Enable debugging and restart Steam (Linux)
steam-engine eval 'collectionStore.userCollections.length'
API reference
The generated reference in docs/ lists the discovered methods and stores. To refresh and browse it:
python scripts/dump_api_surface.py
mkdocs serve
Raw data is available at docs/data/api_surface.json.
Steam’s internal API is undocumented. Method names and arguments can change between client builds.
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_engine-0.1.0.tar.gz.
File metadata
- Download URL: steam_engine-0.1.0.tar.gz
- Upload date:
- Size: 92.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f84a2a22962225a924d959b23923e56cede5415a81f987d465da62cdde1dfffc
|
|
| MD5 |
33f76cb0b74dc17721ae57ce8538c7d2
|
|
| BLAKE2b-256 |
ccc2cbd5d78287b78ccf1fbd831b068d8a55f2cb5bf073f599438d17a1c910df
|
Provenance
The following attestation bundles were made for steam_engine-0.1.0.tar.gz:
Publisher:
release.yml on 6E6B/steam-engine
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
steam_engine-0.1.0.tar.gz -
Subject digest:
f84a2a22962225a924d959b23923e56cede5415a81f987d465da62cdde1dfffc - Sigstore transparency entry: 2852410047
- Sigstore integration time:
-
Permalink:
6E6B/steam-engine@71b2a3e732673f06f0b681b119024de0c0ff1378 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/6E6B
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@71b2a3e732673f06f0b681b119024de0c0ff1378 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file steam_engine-0.1.0-py3-none-any.whl.
File metadata
- Download URL: steam_engine-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b318d35856972a29eb80ddfb812edd7472571f4cbfe3a085c4839ae16ae8e73a
|
|
| MD5 |
b6db7e7a619039fcaf92423a82451b04
|
|
| BLAKE2b-256 |
ba4239be31ff3c8033fa60af8382f3883ed067c11f015dafaa7f3f759eb6cddb
|
Provenance
The following attestation bundles were made for steam_engine-0.1.0-py3-none-any.whl:
Publisher:
release.yml on 6E6B/steam-engine
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
steam_engine-0.1.0-py3-none-any.whl -
Subject digest:
b318d35856972a29eb80ddfb812edd7472571f4cbfe3a085c4839ae16ae8e73a - Sigstore transparency entry: 2852410108
- Sigstore integration time:
-
Permalink:
6E6B/steam-engine@71b2a3e732673f06f0b681b119024de0c0ff1378 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/6E6B
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@71b2a3e732673f06f0b681b119024de0c0ff1378 -
Trigger Event:
workflow_dispatch
-
Statement type: