In this post we'll look at some new functionality available in Textual apps accessed via a browser and how it helps provide a more equal experience ac

Towards Textual Web Applications

submited by
Style Pass
2024-09-08 15:00:07

In this post we'll look at some new functionality available in Textual apps accessed via a browser and how it helps provide a more equal experience across platforms.

textual-serve is an open source project which allows you to serve and access your Textual app via a browser. The Textual app runs on a machine/server under your control, and communicates with the browser via a protocol which runs over websocket. End-users interacting with the app via their browser do not have access to the machine the application is running on via their browser, only the running Textual app.

For example, you could install harlequin (a terminal-based SQL IDE) on a machine on your network, run it using textual-serve, and then share the URL with others. Anyone with the URL would then be able to use harlequin to query databases accessible from that server. Or, you could deploy posting (a terminal-based API client) on a server, and provide your colleagues with the URL, allowing them to quickly send HTTP requests from that server, right from within their browser.

While you're interacting with the Textual app using your web browser, it's not running in your browser. It's running on the machine you've installed it on, similar to typical server driven web app. This creates some interesting challenges for us if we want to provide an equal experience across browser and terminal.

Leave a Comment