Steam, from modern Python.
An asyncio SDK and CLI for Steam authentication and content preservation.
pysteam-sdk installs as pysteam. It is an independent Steam SDK built on secure CM WebSockets and current protobuf messages. This first release is an alpha; APIs and archive formats may change.
| Area | Possibilities |
|---|---|
| Explore Steam | Inspect PICS app data, branches, depot manifests, and SteamIDs. |
| Sign in | Use anonymous, password, refresh-token, or QR login; handle Steam Guard codes and interactive challenges. |
| Manage accounts | Import a maFile, enroll an authenticator, and switch between encrypted saved profiles. |
| Preserve content | Archive raw depot manifests and encrypted chunks; verify and extract offline. Import or export Steam backups. |
| Explore updates | Snapshot app metadata, query Workshop, and archive Steam client packages. |
| Build integrations | Call Unified Messages and WebAPI endpoints, or exchange Game Coordinator messages. |
With uv installed, add the SDK to a Python project:
uv add pysteam-sdkTo use the standalone CLI:
uv tool install pysteam-sdk
pysteam app 220
pysteam doctorThe last two commands inspect public app data and test connectivity without an account.
uv run pysteam init
uv run pysteam account add YOUR_NAME --mafile "path/to/account.maFile"
# Or: uv run pysteam account add YOUR_NAME --enroll
uv run pysteam login
uv run pysteam guard code
uv run pysteam depot list 220 221
uv run pysteam archive app 220
uv run pysteam archive verify 221 MANIFEST_ID
uv run pysteam archive extract 221 MANIFEST_ID --output restoredinit creates a protected vault under ./.pysteam; account setup offers it automatically. Later commands ask for its password once per run. Set PYSTEAM_VAULT_PASSPHRASE through a secret manager for unattended use. Existing PYSTEAM_STORE_PASSPHRASE remains an alias. The maFile backup password is separate. Use vault change-password to rotate the vault and registered archive key capsules. See the account and archive guide.
import asyncio
from pysteam import SteamClient
async def main() -> None:
async with SteamClient() as steam:
await steam.login_anonymous()
app = await steam.get_app_info(220)
print(app["appid"])
asyncio.run(main())See the Python examples for authentication, WebAPI, CDN, and Game Coordinator usage.
- CLI and SDK examples · protobuf updater · issue audit
- Development and release checks · package layout · content references
Licensed under MIT. Independent of Valve and Steam.