Skip to main content

Multiplayer library

Project description

PyReverb Banner

PyReverb

Version License

A lightweight Python networking framework for real-time client-server synchronization of objects, designed for multiplayer game development and interactive simulations.


Table of Contents

  1. What the Project Does
  2. Why the Project Is Useful
  3. Getting Started
  4. Usage Example
  5. Support
  6. Contributing
  7. License
  8. 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 ReverbObject instances
  • 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!

  1. Open an Issue to discuss the idea
  2. Fork the repo & create a branch (feature/my-feature)
  3. Submit a Pull Request
  4. Add tests and documentation if possible
  5. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyreverb-1.5.0.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyreverb-1.5.0-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

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

Hashes for pyreverb-1.5.0.tar.gz
Algorithm Hash digest
SHA256 bb8e08dde8f61f30923ef54b958f2207c97061764a28115b2e687d5b630041b4
MD5 9f08ae5127d748aa9a4f11c973789b96
BLAKE2b-256 9e64ce58ac1d9b0fffc9b05df2ec116c897ad193045b9a19d3b43a235cb968bb

See more details on using hashes here.

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

Hashes for pyreverb-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 89fd3fe93c399e19cb11065b769f44a9da7e63872bfd92875b92b8c400b2374d
MD5 1bba4da6a056fa9c625f373a0eaeaf43
BLAKE2b-256 b3a2cb95cd383b22354459cd31c14c4057ae7bea27651a9bafa110bba3e456a3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page