Skip to content

Installation

cbyte edited this page Jul 19, 2026 · 1 revision

Installation

steam is a Poetry-managed Python package that targets Python 3.13.11+.

Requirements

  • Python 3.13.11+ — pinned via pyproject.toml. Any newer 3.13.x line is fine; older Pythons are not supported.
  • Poetrypython-poetry.org for dependency management.
  • protoc on PATH — only required if you plan to regenerate the _pb2 files. Install with brew install protobuf on macOS, or the equivalent from your distro. Skip if you're only consuming the library.

Install

Clone the repo, then run poetry install:

git clone https://github.com/H47R15/steam.git
cd steam
poetry install --with dev --extras client

Breakdown:

  • --with dev — pulls in pytest, vcrpy, mock, coverage, deptry, types-protobuf, mypy-protobuf. Required if you plan to run the test suite or regenerate protobuf stubs.
  • --extras client — pulls in gevent, protobuf, and gevent-eventemitter, which are only needed by SteamClient and CDNClient. Without them, only the requests-based subset (WebAPI, WebAuth, SteamID, Master Server Queries) is functional.

If you only need the WebAPI / WebAuth / SteamID surface, drop --extras client — the install is smaller and skips the gevent stack.

Install (as a dependency)

If you're consuming the fork from another project, install straight from the GitHub source with pip:

pip install "steam[client] @ git+https://github.com/H47R15/steam.git"

Or add it to your own project's pyproject.toml:

[tool.poetry.dependencies]
steam = { git = "https://github.com/H47R15/steam.git", extras = ["client"] }

Same choice — drop [client] / extras = ["client"] if you don't need the gevent-based client.

Verify

Confirm everything is wired up:

poetry run python -c "from steam.client import SteamClient; print(SteamClient())"

You should see <SteamClient(None) offline> printed.

For a real network smoke test, see First script.

protoc (only for regenerating)

Runtime doesn't need protoc — the checked-in steam/protobufs/*_pb2.{py,pyi} files are ready to go. You only need it when regenerating the wire format:

# macOS
brew install protobuf

# Debian / Ubuntu
sudo apt install protobuf-compiler

# verify
protoc --version   # expect libprotoc 3.19+, ideally 5.x or 6.x

Once installed, poetry run pb-update will pick it up automatically. See Regenerating Protobufs for the full flow.

Troubleshooting

  • ModuleNotFoundError: No module named 'gevent' — you skipped --extras client. Re-run with poetry install --extras client.
  • command not found: protoc — install the protobuf compiler (see above), or skip regeneration and use the checked-in generated files.
  • ERROR: Package requires a different Python: 3.11.x not in '>=3.13.11' — activate a Python 3.13.11+ environment before installing.

Clone this wiki locally