Multiplayer library
Project description
PyReverb
A lightweight Python networking framework for real-time client-server synchronization of objects, designed for multiplayer game development and interactive simulations.
Table of Contents
- What the Project Does
- Why the Project Is Useful
- Getting Started
- Usage Example
- Support
- Contributing
- License
- About
What the Project Does
PyReverb enables you to create network-synchronized objects across server and clients in Python.
Key features:
- Event-driven networking with automatic packet handling
- Simple definition and synchronization of
ReverbObjectinstances - Remote function execution between server and clients
- Built-in registry for managing object types and instances efficiently
Ideal for:
- Multiplayer games
- Real-time simulations
- Collaborative interactive applications
Why the Project Is Useful
- Real-time synchronization of objects
- Event-driven architecture (connect, disconnect, custom events)
- Lightweight & extensible (minimal dependencies)
- Flexible client/server design
- Simplified networking (no need to manage sockets manually)
Getting Started
Prerequisites
- Python 3.x
- pip
- Dependencies in
requirements.txt
Installation
git clone https://github.com/LeLaboDuGame/PyReverb.git
cd PyReverb
pip install -r requirements.txt
Running the example
python Game.py
Usage Example
from pyreverb.reverb import ReverbManager, ReverbSide, ReverbObject, Client, Server
# On the server side:
ReverbManager.REVERB_SIDE = ReverbSide.SERVER
@ReverbManager.reverb_object_attribute
class Player(ReverbObject):
def __init__(self, pos=[0, 0], uid=None, add_on_init=True):
self.pos = pos
super().__init__(pos, uid=uid, add_on_init=add_on_init)
def on_init_from_client(self):
print("Player initialized on client")
def on_init_from_server(self):
print("Player initialized on server")
server = Server()
ReverbManager.REVERB_CONNECTION = server
server.start_server()
# On the client side:
ReverbManager.REVERB_SIDE = ReverbSide.CLIENT
client = Client()
ReverbManager.REVERB_CONNECTION = client
client.connect()
Support
- Open an Issue for bugs or feature requests
- Start a Discussion for questions
- Check the
docs/folder for documentation and API reference
Contributing
Contributions are welcome!
- Open an Issue to discuss the idea
- Fork the repo & create a branch (
feature/my-feature) - Submit a Pull Request
- Add tests and documentation if possible
- Keep coding style consistent
License
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
About
Just a simple repo to implement a server for games in Python. Created by LeLaboDuGame.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyreverb-1.5.0.tar.gz.
File metadata
- Download URL: pyreverb-1.5.0.tar.gz
- Upload date:
- Size: 18.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb8e08dde8f61f30923ef54b958f2207c97061764a28115b2e687d5b630041b4
|
|
| MD5 |
9f08ae5127d748aa9a4f11c973789b96
|
|
| BLAKE2b-256 |
9e64ce58ac1d9b0fffc9b05df2ec116c897ad193045b9a19d3b43a235cb968bb
|
File details
Details for the file pyreverb-1.5.0-py3-none-any.whl.
File metadata
- Download URL: pyreverb-1.5.0-py3-none-any.whl
- Upload date:
- Size: 18.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89fd3fe93c399e19cb11065b769f44a9da7e63872bfd92875b92b8c400b2374d
|
|
| MD5 |
1bba4da6a056fa9c625f373a0eaeaf43
|
|
| BLAKE2b-256 |
b3a2cb95cd383b22354459cd31c14c4057ae7bea27651a9bafa110bba3e456a3
|