samrawal / eel-io-template

Template for getting a GUI and Python backend via Eel quickly up-and-running

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

eel-io-template

Template for getting a GUI and Python backend via Eel quickly up-and-running.

I often need to quickly spin up small scripts or applications to share with others that require a basic GUI. This is a bare-bones template that can easily be adapted for such use-cases.

This template uses the Eel library. To quickly get started:

# Set up virtual environment and install Eel
python3 -m venv env
source env/bin/activate
pip3 install eel

# Run the template
python3 app.py

Currently Built-In Methods

  • To send data from GUI (Javascript) and trigger a Python function, use the send_data() function in script.js.
  • To write to the onscreen log:
    • log("Log text here") from Javascript
    • eel.log('Log text here') from Python
  • To request data from GUI (Python), use the get_inputs() function:
    • data = eel.get_inputs()

Screenshot

./screenshots/screenshot1.png

About

Template for getting a GUI and Python backend via Eel quickly up-and-running


Languages

Language:HTML 46.5%Language:JavaScript 37.4%Language:Python 16.1%