Using python to control hype api

Hi all,

Not too familiar with javascript, and I wang to be able to control a hype document from a python controler.... Any one got any ideas on how to start?

Thanks in advance.

Neil

Hype code runs client-side in the browser. Python isn't a browser-based language. So it is a little unclear on where the Python fits in for your question. Can you elaborate on your use case and how/where this will run? Do you have a python/django backend and want to configure the served Hype document? Or is this in an app where you're also leveraging python?

Loading Python compiled as WASM actually allows for you to control the Hype API but loading the Python Runtime that way requires a modern browser and adds an unacceptable amount of extra „weight“ to your projects 7MB+

Serversoftware is another story. That should be rather easy if your using Django etc. and would manly revolve around injecting data and JavaScript on the fly. There are also some Python projects that compile to JavaScript so that could be another option.

Finally, you can use Python in an export script scenario, but that has its limits to control Hype at runtime. You would either have to inject JavaScript defying the purpose or get into to nitty gritty of the Hype JSON loader. Either is not that easy.

1 Like