3 ms·
An alternative, which doesn't require insane loading times, is to use any of the many great Python libraries that allow you to write web apps in Python, which g
by abidlabs 4y ago
An alternative, which doesn't require insane loading times, is to use any of the many great Python libraries that allow you to write web apps in Python, which get converted to JS web apps.
For example, I'm one of developers of Gradio [0], which lets you write your web app in Python, which gets rendered using Svelte-based components:
[0] https://www.gradio.dev https://www.gradio.dev
- juanci_to 4y agoThat's interesting. I played with Svelte a couple of times and I like it. But since it's kind of niche among the rest of JS frameworks, I'm wondering, what made you chose it over the alternatives?
- abidlabs 4y agoWe migrated from React to Svelte because of two reasons: (1) speed: Svelte does a lot of work during the compile-time, which led to much faster and more responsive web apps (2) developer learning curve: as we expanded our team, we found that front-end engineers found Svelte much more intuitive and faster to learn
- rahimnathwani 4y agoThe trade off is flexibility, right? I mean, with something like gradio, can you add e.g. an event listener to a specific DOM element?
- abidlabs 4y agoYou can, if that that specific DOM element is a Gradio component (e.g. a button, image, textbox, etc). Here's a very simple example: https://github.com/gradio-app/gradio/blob/main/demo/blocks_hello/run.py https://github.com/gradio-app/gradio/blob/main/demo/blocks_h...
- dragonwriter 4y ago> An alternative, which doesn't require insane loading times, is to use any of the many great Python libraries that allow you to write web apps in Python Sure, there are lots of things that do that. They don't let you build apps using the Python scientific stack that live entirely in the browser, because they tend to be transpilers plus implementations of a subset of the stdlib plus some browser-specific libraries, whereas PyScript bundles WASM-compiled versions of important Python ecosystem libraries. They have different strengths.