async chat based on sockets. with GUI
GUI async chat with registration
Python version required: 3.7+
python3 -m venv myenv
\source myenv/bin/activate
pip3 install -r requirements.txt
(alternatively try add sudo
before command)cp env/.env env/.env_file
. If it need setup env/.env_file
(or use default settings):
- `HOST` - chat host. \
- `READ_PORT` - port for read messages from chat. \
- `SEND_PORT` - port for write messages to chat. \
- `ATTEMPTS_COUNT` - connection attempts before 3 sec timeout. \
- `HISTORY_LOG_DIR_PATH` - path to folder where will be created `history_log.txt` file with chat messages history. \
- `TOKEN_FILE_PATH` - path to file with unique user token(by default - `./token.txt`)\
Instead environ vars you can use arguments. For more info use python3 chat_register.py --help
(for register) and python3 gui_chat.py --help
(for chat) \
For using environ vars you need source env/.env_file
.
python3 chat_register.py
.env/.env_file
or use argument or load from file(./token.txt.
).python3 gui_chat.py
The code is written for educational purposes. Training course for web-developers - DVMN.org