Full coverage of players, rooms, matchmaking, leaderboards and realtime WebSocket rooms — with type hints, dataclass responses and typed errors.
A proper package with type hints, dataclass responses and full coverage of players, rooms, matchmaking and leaderboards.
Native asyncio + websockets client for the realtime relay at wss://realtime.michitai.com.
Works with Pygame, Godot-Python, Panda3D and any backend or tool that can make HTTP requests.
# Requires Python 3.9+ — install the dependencies, then run the example
pip install requests # core SDK
pip install websockets # optional, realtime rooms only
python Game.py
The + Steam variant adds STEAM.md (ticket-minting guide — Steam needs a native binding or engine plugin). Valve's proprietary Steamworks SDK is a separate download from partner.steamgames.com.
from multiplayer import Client
client = Client("YOUR_API_TOKEN", "YOUR_PRIVATE_TOKEN")
# Register & authenticate a player
reg = client.players.register("PlayerOne", {"level": 1, "class": "mage"})
player_token = reg.private_key
# Or sign in via a Steam auth ticket (project must have Steam enabled):
# reg = client.players.register_steam(ticket_hex, "michitai")
# Create and join a room
room = client.rooms.create(player_token, "Lobby 1", max_players=4)
client.rooms.heartbeat(player_token)
# Fetch the leaderboard
lb = client.leaderboard.get(["level", "score"], limit=10)
for entry in lb.leaderboard:
print(f"#{entry.rank} - {entry.player_name}")
Every response is a dataclass extending ApiResponse —
check response.success,
response.error,
response.error_type (typed enum) and
response.error_message.
Pick a topic — each area has its own page.