The game-runners package provides the transport layer between the game UI and the game logic core. It implements client and server runner interfaces defined in game-framework-contracts, handling HTTP communication, HMAC message signing, metadata management, and retry logic.
Two deployment targets are provided: local (polling against a FastAPI app-server at localhost:8000) and cloud (stub implementations, not yet complete).
src/runners/
├── local/
│ ├── client_runner.py # LocalRunnerClient — UI-side HTTP transport
│ ├── server_runner.py # LocalRunnerServer — logic-side HTTP transport
│ └── metadata_runner.py # GameMetadataHandler — local game/player metadata
├── cloud/
│ ├── client_runner.py # CloudRunnerClient — stub (not yet implemented)
│ ├── server_runner.py # CloudRunnerServer — stub (not yet implemented)
│ └── metadata_runner.py # GameMetadataHandler — stub (not yet implemented)
└── utils/
├── hmacsigner.py # HMAC-SHA256 message signing and verification
└── retries.py # Retry decorator and safe_get/safe_post helpers
- Python 3.12+
- Pipenv
- Built
game-contractspackage (seegame-framework-contractsrepo)
# Build the contracts package first (from game-framework-contracts repo)
make build
# Install dependencies
pipenv install
# Activate the virtual environment
pipenv shellSee docs/LOCAL_DEVELOPMENT.md for full setup and usage instructions.
Import the runner for your deployment target:
from runners.local.client_runner import LocalRunnerClient
from runners.local.server_runner import LocalRunnerServerBoth classes implement the RunnerClientABC / RunnerServerABC interfaces from game-framework-contracts.
