https://github.com/ravener/python-chat
A simple chat application implemented in Python using TCP Sockets and Urwid
https://github.com/ravener/python-chat
chat chat-application chatroom python python-socket sockets tcp urwid
Last synced: 3 months ago
JSON representation
A simple chat application implemented in Python using TCP Sockets and Urwid
- Host: GitHub
- URL: https://github.com/ravener/python-chat
- Owner: ravener
- License: mit
- Created: 2022-05-19T15:28:51.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-19T15:31:43.000Z (over 3 years ago)
- Last Synced: 2025-04-09T11:49:59.219Z (6 months ago)
- Topics: chat, chat-application, chatroom, python, python-socket, sockets, tcp, urwid
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 13
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Python Chat
A simple chat application written in Python using TCP Sockets and [urwid](https://urwid.org)
## Usage
Clone or download this repository however you like.
```sh
$ git clone https://github.com/ravener/python-chat
```
Make sure Python3 is installed and install urwid:
```sh
$ pip install urwid
```
On a terminal session start the server:
```sh
$ python server.py
```
You can stop the server with `CTRL + C`Now start the client
```sh
$ python client.py
```
You can type `/quit` or `/q` to exit the client.## TODO
The project is simple and could work well as a private chat server among some friends but there are a few more changes I'd like to have for it to be more practical:
- [ ] Resuming/Reconnecting
- [ ] Ability to type server address (currently it assumes localhost)
- [ ] Message history (without database, just store like last X messages in memory)
- [ ] Useful Slash Commands
- [ ] Some more code clean up and various little things.
- [ ] Demonstrate creating bots. (You can already do this by leveraging the client connection code from `client.py` but I mean demonstrate it and find some practical uses for it)Who knows maybe I could eventually turn this into a named project?
# License
Released under [MIT License](LICENSE)Also credits to [nigiri](https://github.com/sushi-irc/nigiri) from which the client side UI is based off, more specifically from [this gist](https://gist.github.com/MarcelWaldvogel/0226812a2213dc8f67ea4cc361836de1)