Skip to main content

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

steam_engine-0.1.0.tar.gz (92.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

steam_engine-0.1.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

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

Hashes for steam_engine-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f84a2a22962225a924d959b23923e56cede5415a81f987d465da62cdde1dfffc
MD5 33f76cb0b74dc17721ae57ce8538c7d2
BLAKE2b-256 ccc2cbd5d78287b78ccf1fbd831b068d8a55f2cb5bf073f599438d17a1c910df

See more details on using hashes here.

Provenance

The following attestation bundles were made for steam_engine-0.1.0.tar.gz:

Publisher: release.yml on 6E6B/steam-engine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for steam_engine-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b318d35856972a29eb80ddfb812edd7472571f4cbfe3a085c4839ae16ae8e73a
MD5 b6db7e7a619039fcaf92423a82451b04
BLAKE2b-256 ba4239be31ff3c8033fa60af8382f3883ed067c11f015dafaa7f3f759eb6cddb

See more details on using hashes here.

Provenance

The following attestation bundles were made for steam_engine-0.1.0-py3-none-any.whl:

Publisher: release.yml on 6E6B/steam-engine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page