Skip to content

cpaggen/python-hotwire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is this?

A very simple Turbo-Flask Python example. Turbo-Flask uses the HotWIRE JS (turbo.js) library to update sections/divs using WebSockets. As I am not particularly good with JS or front-end frameworks, I looked for a Python-based alternative. Turbo-Flask does the job: no need for tons of front-end JS code on the page - inspect the code and see for yourself. This app dispatches a thread that generates a random person's name every 3 seconds using Faker. Turbo-Flask automatically updates a div on the page with that random name. This code can be used by Python programmers as a reference template for Web-app projects that require async update from various threads.

Demo

Demo TurboFlask

Installation

Just satisfy requirements.txt; code tested with Python3 on Chrome

pip install -r requirements.txt

Usage

flask run

Contributing

Pull requests are welcome.

License

MIT

About

Sample Python code that uses Turbo Flask (HotWIRE JS library)

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors