steelkiwi / aiohttp_test_chat

Simple aiohttp test chat

Home Page:https://secure-escarpment-46948.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python aiohttp - testing with a simple chat

This repo contains examples from article in our blog.

For creating this chat I used aiohttp - asynchronous web framework, written by python core developers.

Also I used Mongodb with motor(asyncronous driver) as database, jinja2 for templates, envparse for working with secure environment variables

For beginning you can install requirements to virtualenv

pip install -r requirements.txt

You must add config .env file there will be your secure settings( database connection, secret salt etc.)

Short sample .env file

DEBUG='False'
MONGO_HOST='mongodb://user:pass@mongo_host:mongo_port/mongo_database'
MONGO_DB_NAME='mongo_database'
SECRET_KEY='some secure key'
HOST='127.0.0.1'
PORT=8000

To run server you need just type to console

./app.py

About

Simple aiohttp test chat

https://secure-escarpment-46948.herokuapp.com/


Languages

Language:Python 52.8%Language:HTML 20.8%Language:JavaScript 18.7%Language:CSS 7.8%