Skip to content

RoBaertschi/chat-application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chat Application

This a small application written to learn FastAPI and Python. It uses FastAPI and Websockets to create a small Chat app.

Security

Your passwords are hashed using bcrypt and passlib. The key is currently public so please replace the key if you really want to host a server. Your Account is per Server. Do not trust any Server you do not know and DON'T use your NORMAL Password for servers that you don't own. Because the password is sent in plaintext over either HTTP or HTTPS, the password is encrypted server side, not on your client. So they could just steal it without you knowing. So be careful please.

Usage

Install all the dependencies with:

pip install -r requirements.txt

Start the backend with the following command:

uvicorn server.server:app

Then you should run the cli. On the first prompt, type "y" and press enter. Then create a user account. After that you can directly log into the new account. To test the chat, you can open a second terminal with the command from below, create a second account and log into that.

Then just start writing. When you press enter, the message will be send.

python3 cli.py --host localhost:8000

About

A Small Chat application with server and cli client. Written in Python using FastAPI and Typer.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages