flet icon indicating copy to clipboard operation
flet copied to clipboard

Docs / examples: How to connect a client websocket to running Flet app

Open hololeo opened this issue 3 years ago • 1 comments

Would be useful to get a guide on how to interact with the Fletd server with a running app. This way any client can send/receive commands to the running UI (javascript, web callbacks, command line, etc). They would do this without the flutter/flet front end just websocket.

Use case: Times square runs a big billboard displaying a Flet app. The operators can update the UI content with an non Flet app that connects to the websocket/running session Flet app.

Nice to have: Demonstrations with a python script and a javascript client.

hololeo avatar Jul 29 '22 17:07 hololeo

From a client perspective it's possible to "talk" to Flet server without a Python. It's WebSockets for now: https://github.com/flet-dev/flet/blob/main/server/protocol.md

We could add REST API in the future, but it's unclear how to receive events from user interaction then.

FeodorFitsner avatar Jul 29 '22 18:07 FeodorFitsner

I'm closing this issue. Feel free to start a new discussion or jump to Discord.

FeodorFitsner avatar Aug 27 '22 18:08 FeodorFitsner