This is the PoC for SaaS Realtime notifications concept, written in async Python (3.6+).
SaaS: Pusher Channels
API: FastAPI
- Create the Channels application in Pusher
- Create and activate virtual environment
- Set credentials in
crm/index.html
const pusherKey = "__PUSHER_KEY__"; // smth like 08fae1e0be54746e9270
const pusherCluster = "eu";cd events- Install requirements
requirements.txt - Create
.envbased on.env.tplwith credentials from your Pusher application,PUSHER_MASTER_KEYmust be manually generated (f.e.openssl rand -base64 32) - Start HTTP server:
uvicorn api:app --reload - Open
crm/index.htmlin your favorite browser - Run events generator
python event.py - Enjoy received messages in the tab of your browser!