Pythonaibrain-Client
Secure Encrypted Socket Client powered by Pythonaibrain v1.1.9
pythonaibrain-client
is a Python terminal chat client that enables secure, encrypted, multi-client communication using XOR encryption. It works seamlessly with Pythonaibrain v1.1.9 server, supporting AI-enabled or regular chat.
π Features
- Secure messaging with XOR cipher encryption
- Supports multiple clients (2, 3, or more) on the same server
- Multi-threaded send/receive for real-time chatting
- Cross-platform terminal commands (
clear
/cls
) - Easy CLI usage via
client-server
- Optional GUI integration using Tkinter, PySide6, or CustomTkinter
- Emoji reactions, private messages, typing indicators
- Daily chat logs for persistent storage
π Project Structure
pythonaibrain-client/
βββ pyaibrain/
β βββ client/
β βββ **init**.py # Main client code
β βββ .env # Encryption key, host, and port
βββ pyproject.toml # Project metadata & dependencies
βββ README.md # This file
βββ LICENSE # MIT License
β‘ Getting Started
Prerequisites
- Python 3.8 or higher
-
pip
installed
Installation
pip install pythonaibrain-client
Connecting to the Server
- Install pythonaibrain v1.1.9 which contains the AI server.
- Start the server:
pyaibrain-server # For normal chat
- Run the client:
client-server
- Enter your alias and start chatting securely.
π Usage Example
from pyaibrain.client import ClientServer
cServer = ClientServer()
cServer.serve()
π οΈ Commands
Command | Description |
---|---|
clear / cls
|
Clear terminal screen |
/pm <alias> <msg> |
Send private message |
/list |
Show connected clients |
/about |
Show client info |
/quit |
Disconnect from server |
/react <alias> <emoji> |
React to last message |
π Encryption Details
- Messages are XOR-encrypted using the key from
.env
. - Note: XOR is for demonstration; use stronger encryption for production.
π Preview
βοΈ Author
Divyanshu Sinha
Email: divyanshu.sinha136@gmail.com
π License
GNU LESSER GENERAL PUBLIC LICENSE β see License
for details.
This version emphasizes:
- Compatibility with pythonaibrain v1.1.9.
- Multi-client encrypted chat.
- AI server optional usage.
Top comments (0)