A small chat app made as a home task for a Python intensive course by Skillbox.
The app includes the following features:
- Allow multiple connections
- User authorization by login (should be unique), done by sending a message "login:YOUR_LOGIN"
- Retrieving last 10 messages for new successful authorizations
- Showing the list of already logged in users, so the user can see which names are already taken
- Disconnects in case of attempt to use a taken login (required by the task)
- And, of course, all the connected and logged in users can see the messages
This project actually won the competition of the course, but the winner just stole this repo... You can feel free to fork and modify, but please provide the link to this repo if you don't do any or only small changes. Otherwise modify it as you see fit.
Install dependencies
pip install -r requirements.txt
You might also need to install С++ build tools
MacOS:
brew install telnet
Ubuntu:
sudo apt-get install telnet
Windows: instructions
Go to server location
cd ./src
Run the server script
python server.py
Then you can connect with another (or many other) terminal
telnet 127.0.0.1 1234