Skip to content

max-4-3/command-runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Demo

Command Runner

Command Runner is a small Python web application and a practice project focused on Server-Sent Events (SSE).
It's intended as a learning playground to explore realtime one-way event streams.

Quick Start

Clone this repo and cd into it:

git clone 'https://github.com/max-4-3/command-runner.git'
cd command-runner/

Run with uv:

uv run main.py

Visit:
localhost

Layout

  • src/:
    Contains the server logic
  • static/:
    Contains the client logic

Contributing

Educational only not for real world application

Aims:

  • Experimentation with Server-Sent Events (SSE) in Python
  • Learn to structure an ASGI app that emits events and a minimal frontend that consumes them.

Notes & Tips

  • The client subscribes to a text/event-stream endpoint exposed by the server (EventSource in the browser).
  • SSE provides a simple, reliable way to stream server events to browsers (one-way from server to client). It's well-suited for notifications, logs, progress updates, and other use cases where the client only needs to receive updates.
  • Pay attention to reconnection behavior: EventSource automatically reconnects; you can control retry intervals on the server with the "retry" field if needed.
  • If you later need two-way comms, consider adding websockets; for many use cases SSE is simpler and lighter.

Security and safety

  • Treat it with extreme caution. It can run command on the server (though it is used for local development but still keep in mind)

About

Uses SSE to track progress of commands

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published