juli1 / flask-chat

A simple chat in flask

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build status Coverage Status

Flask Chat

A simple chat in flask. More a message board that looks like in the 80s than a full-featured chat with videos and unicorn.

Information about how to deploy using Docker on a raspberry pi on this blog post.

Why?

I wanted to have a simple chat with my friends and not use snapshot, hangouts or any other popular solutions that requires to be logged on a system you do not control.

What?

This is a simple application written in Python/Flask. It handles a single chat window. Users have to authenticate.

Requirements

  • Single chat window
  • Several users
  • Admin functions to add/change users
  • No plain password stored

and for later ...

This could be integrated as well

  • GIFs search
  • Support to check HTML safety

How to use it?

git clone https://github.com/juli1/flask-chat.git
cd flask-chat
# Replace the following line with virtualenv if necessary
python3.X -m venv venv # Replace X with your version of python
source venv/bin/activate
pip3 install -r requirements.txt
./db_create.py
./run-debug.py

And then, open your browser to http://127.0.0.1:5000/

Start with the user admin, password admin.

How to run tests?

python -m unittest discover tests

Dockerization

The docker image is available on Docker Hub: https://hub.docker.com/r/juli1/flask-chat/

Build the docker image

docker build -t flask-chat:latest .

Run the docker image

docker run -d -p 10000:5050 flask-chat

And then, open your browser to http://127.0.0.1:10000/

Resources

About

A simple chat in flask


Languages

Language:Python 74.1%Language:HTML 23.6%Language:CSS 2.2%