An easy and secure Python library for real-time game chat
Project description
EasyGameChat
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)
- Install Go 1.18 or later.
- Run the server:
go run main.go
Client (C++)
- Include
EasyGameChat.hin your project. - Install the required dependencies (only
nlohmann/jsonfor 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. - 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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ae41946aea5656d9f3f238d3e0416473ceb646f8dee9307bb6a7862efe245c7
|
|
| MD5 |
0a8a6d184030f56bbd3f0d4ed4745771
|
|
| BLAKE2b-256 |
c19e5833240788e1bf0002ce52d11aa19430051c57553ef6a8f9d59318f7ff7d
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eaae5921318d5a580ef6740c26ae704cd39e0f759186c77a25b47d4bd8fef570
|
|
| MD5 |
0b15e94e13441d825af6c6e08a7d00d5
|
|
| BLAKE2b-256 |
3076121209f89e77b26d11950cb3779158ada5a059bd3f392b9d4302e4aad86a
|