Chat In Terminal

Hello all. ?
Sockets and servers are vey important for connection and importantly chatting with others.??
I have thought of making a python script which will amek connection and eventually allow us to chat.

(DISCLAIMER – This python script runs only on localhost. If you want to make a connection with other devices then you should check the code of the file and use network library in the file)?


So, the thing that is done with this script is that, it starts a server and with the help of threading maintains many clients.
It is like chatting in the terminal. You can join the chat by starting the file.

Getting Started ??

Working with it is very simple.

  • There shouble be a host means the head of the chat
  • The host should run the file and note the password given by it.
  • The host need to start another terminal and start file and enter with name host ?‍??‍?
  • He/She needs to give the correct password as given by the server to start the chat. ?
  • Anyone cannot join the chat unless host has joined ?
  • After host has joined, anyone can join now ?‍?‍?‍??‍?‍?‍?
  • Clients need to join with their nickname
  • The message which will be send will be shown with their nickname in fron of the message

Commands to execute and things need to be installed

Python 3 need to be installed
You do not need to install anything because all teh libraries used here are built-in.

  • Sockets
  • Threading
    Commands –
    1. Run the file
    1. Open another terminal and run the and join as host and give the password

(This is the video of the live example) – link to youtube –



Feel free to contribute to this project


GNU Public License