Skip to main content

An easy and secure Python library for real-time game chat

Project description

EasyGameChat

PyPI version License

EasyGameChat is a minimal, secure, and cross-platform chat server and client library designed for real-time communication in games or applications. It aims to provide simple, fast integration across multiple languages with a JSON-based protocol and message validation system.

Features

  • Lightweight and efficient server implementation in Go
  • Secure and strict input validation
  • Modular server-client architecture
  • Cross-language support (C++, Python, and more to come)
  • JSON-based protocol for easy parsing
  • Thread-safe and rate-limited message broadcasting

Getting Started

Server (Go)

  1. Install Go 1.18 or later.
  2. Run the server:
go run main.go

Client (C++)

  1. Include EasyGameChat.h in your project.
  2. Install the required dependencies (only nlohmann/json for JSON parsing, for now) with your preferred package manager. On Windows, you can specify your preferred toolchain in the CMake build command with -DCMAKE_TOOLCHAIN_FILE=path/to/your/toolchain.cmake.
  3. Compile and run the example:
cd examples/c-cpp
cmake -B build -S .
# If using vcpkg, specify the toolchain file:
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=C:\path\to\vcpkg\scripts\buildsystems\vcpkg.cmake
cmake --build build
./build/chat-client

Client (Python)

cd clients/python
python -m build
python -m pip install .\dist\easy_game_chat-0.2.0-py3-none-any.whl
# or install directly from the source
pip install .
python examples/python/main.py

Protocol

Messages follow a simple JSON format:

{
  "from": "nickname",
  "text": "message content"
}

All input is sanitized and validated server-side to prevent injection, malformed data, or abuse.

License

This project is licensed under the MIT License.

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

easygamechat-0.2.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

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

easygamechat-0.2.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file easygamechat-0.2.0.tar.gz.

File metadata

  • Download URL: easygamechat-0.2.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for easygamechat-0.2.0.tar.gz
Algorithm Hash digest
SHA256 67261d00ef5b7314171dc11958ddfd2fa2811f09b71b399d82c765b07ffefc14
MD5 3233c75453e50f9a22353de5e6f9db05
BLAKE2b-256 287a3af7d9ba70e5585dfbebfd180274bb5f8b172283c309beab5064474e78ee

See more details on using hashes here.

File details

Details for the file easygamechat-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: easygamechat-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for easygamechat-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74b1b15476085cfa8c1621bb1bfb444ec559df1ee94ef08a62f58e979c006984
MD5 07515b45fec2f03ea68e09338ae85981
BLAKE2b-256 78c6f74ae069e9fe9392dd650a776736cf3e004d9c034b94621be26116d46025

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