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.1.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.1.0.tar.gz (6.6 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.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for easygamechat-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0ae41946aea5656d9f3f238d3e0416473ceb646f8dee9307bb6a7862efe245c7
MD5 0a8a6d184030f56bbd3f0d4ed4745771
BLAKE2b-256 c19e5833240788e1bf0002ce52d11aa19430051c57553ef6a8f9d59318f7ff7d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: easygamechat-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eaae5921318d5a580ef6740c26ae704cd39e0f759186c77a25b47d4bd8fef570
MD5 0b15e94e13441d825af6c6e08a7d00d5
BLAKE2b-256 3076121209f89e77b26d11950cb3779158ada5a059bd3f392b9d4302e4aad86a

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