Can Anvil connect to external Bluetooth?, can we stream audio and create live feedback with Anvil

Anything that happens client-side in Anvil is happening through Javascript. Anvil just does a good job of hiding that from you and allowing you to write Python.

For anything that Anvil doesnā€™t support in Python (like connecting to a Bluetooth device), you have to use the Javascript bridge. How easy or hard that is depends entirely on the Javascript library youā€™re trying to use.

Hereā€™s a post showing one particular integration: Embedded interactive visualisations in Anvil using e.g. Vega Lite? - #2

And here are the docs on using Javascript from your Python code: Anvil Docs | Using JavaScript

One of the really cool things about the Anvil/Javascript bridge is that you can pass Python functions as Javascript callbacks, so you can work with many Javascript libraries entirely from inside form code.

2 Likes