Skip to content

A demo for running a background job with an aiohttp server and pushing updates over websocket

Notifications You must be signed in to change notification settings

elliotaplant/aiohttp-ws-background

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aiohttp Background Job With WebSocket Updates Demo

This repo is an example of how to:

  • Start an http server with aiohttp
  • Create a route on that server to serve WebSockets
  • Start a background job with that server
  • Send updates from the background job to all open WebSocket connections
  • Receive and parse those updates in JavaScript
  • Update the HTML of a page with JavaScript based on received updates

Getting started

To run this app:

  • Clone the project and cd into the directory
  • Install the dependencies (just aiohttp) with pipenv install
  • Start the application with pipenv run main.py

About

A demo for running a background job with an aiohttp server and pushing updates over websocket

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published