What is repod?
repod is a networking library designed to make it easy to write multiplayer games in Python. It usesasyncio and msgpack to asynchronously serialize network events and arbitrary data structures, and delivers them to your high-level classes through simple callback methods.
repod is a modernized fork of PodSixNet. Same ideas — channels, action-based message dispatch, synchronous pump loops — but rebuilt from scratch for Python 3.12+ with async I/O, binary msgpack serialization, and full type annotations.
Why use repod?
Repod simplifies multiplayer game networking by abstracting away the complexity of socket programming:Simple API
No manual buffer handling or socket polling. Just call
client.pump() once per game loop and implement Network_* callbacks.Framework Agnostic
Works with any game framework that has a main loop: pygame, raylib, arcade, pyglet, and more.
Modern Python
Built for Python 3.12+ with full type annotations, asyncio, and modern tooling support.
Battle-Tested Pattern
Based on PodSixNet’s proven architecture, used in countless multiplayer games.
Key features
- Asyncio-based networking with msgpack serialization — Fast, efficient binary protocol with length-prefix framing
- Simple action-based message dispatch with Network_ callbacks* — No complex event systems, just define methods
- Background thread support for synchronous game loops — Keep your main game loop simple and synchronous
- Type-safe with full Python 3.12+ annotations — Get autocomplete and type checking in your IDE
- Drop-in replacement for PodSixNet — Migrate existing projects with minimal changes
How it works
Each class within your game client which wants to receive network events subclassesConnectionListener and implements Network_* methods to catch specific events from the server. You don’t have to wait for buffers to fill, or check sockets for waiting data or anything like that — just call client.pump() once per game loop and the library handles everything else, passing off events to your listener.
client.send(mydata). On the server side, events are propagated to Network_* callbacks on your Channel subclass, and data is sent back to clients with channel.send(mydata).
Comparison with PodSixNet
PodSixNet was great for its time, but it has some significant limitations:Built on deprecated asyncore
Built on deprecated asyncore
PodSixNet is built on
asyncore, which was removed in Python 3.12. This makes it incompatible with modern Python versions.Fragile serialization
Fragile serialization
PodSixNet uses
rencode / custom delimiter-based framing (\0---\0), which is fragile with binary data and can break with certain payload patterns.No type annotations
No type annotations
PodSixNet has no type annotations, which means no autocomplete, no type checking, and no modern IDE support.
No longer maintained
No longer maintained
PodSixNet is no longer actively maintained (chr15m/PodSixNet#46), leaving users without bug fixes or improvements.
| Feature | PodSixNet | repod |
|---|---|---|
| Python version | 2.x - 3.11 | 3.12+ |
| I/O layer | asyncore (deprecated) | asyncio |
| Serialization | rencode + delimiter framing | msgpack + length-prefix |
| Type annotations | None | Full PEP 695 generics |
| Maintenance | Inactive | Active |
When to use repod
Perfect for:
- Turn-based multiplayer games
- Real-time action games with moderate player counts
- Co-op games and shared experiences
- Game lobbies and matchmaking systems
- Python-based game clients connecting to Python servers
Next steps
Installation
Install repod with pip or uv and verify your setup
Quick Start
Build your first client-server game in minutes