-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
steam is a Poetry-managed Python package that targets Python 3.13.11+.
-
Python 3.13.11+ — pinned via
pyproject.toml. Any newer 3.13.x line is fine; older Pythons are not supported. - Poetry — python-poetry.org for dependency management.
-
protocon PATH — only required if you plan to regenerate the_pb2files. Install withbrew install protobufon macOS, or the equivalent from your distro. Skip if you're only consuming the library.
Clone the repo, then run poetry install:
git clone https://github.com/H47R15/steam.git
cd steam
poetry install --with dev --extras clientBreakdown:
-
--with dev— pulls inpytest,vcrpy,mock,coverage,deptry,types-protobuf,mypy-protobuf. Required if you plan to run the test suite or regenerate protobuf stubs. -
--extras client— pulls ingevent,protobuf, andgevent-eventemitter, which are only needed by SteamClient and CDNClient. Without them, only therequests-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.
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.
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.
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.xOnce installed, poetry run pb-update will pick it up automatically. See Regenerating Protobufs for the full flow.
-
ModuleNotFoundError: No module named 'gevent'— you skipped--extras client. Re-run withpoetry 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.
H47R15/steam — maintained fork of ValvePython/steam. MIT licensed.