Fast, simple and thread-safe HTML/CSS/Python GUI framework


Dynamic JavaScript Libraries

Every Javascript Library turns into a Python module.

Easy to Distribute

You can easily distribute your application to users who has no Python binaries on their system.

Thread-Safe GUI

It keeps code quite simple.





Code



Sample 1: Working with Tensorflow

index.html: script tag for import
 <script type="text/python" import="module_a" call="main_func"></script>

module_a.py: Run tensorflow code in the background thread
import sys
import plynth
import plynth.js as js
import tensorflow as tf

def main_func():
    button = js.document.getElementById("a_button")
    button.onclick = start_calculation

@plynth.background
def start_calculation():
     mnist = tf.keras.datasets.mnist
     (x_train, y_train),(x_test, y_test) = mnist.load_data()



Sample 2: Calculator using Vue.js

import sys
import plynth
import plynth.js as js

class VueApp:
    def __init__(self):
        self.vue = js.Vue(
            dict(
                el="#root",
                data=dict(
                    mainResultText="0",
                    subDisplayText=""
                ),
                methods={
                    "click_number": self.click_number,
                    "click_operator": self.click_operator,
                }
            )
        )
    def click_operator(self, e):
        #
    def click_number(self, e):
        #




Videos
📁 More Videos