Both options are available.. 😄
1) Python - Using Engine API with Websocket or Server Side Extension for adding capabilities.
You can check my GitHub sample projects for reference..
Websocket - Qlik, Engine API, Python
SSE - Python, Qlik, ML
2) JS- Straight forward.. Qlik Mashup docs explains it pretty well. Link .
Idea is to get Qlik global object reference hosted by Qlik Engine and use all exposed API methods i.e. opening apps and getting Hypercube data.
You can also refer to enigma.js for using Engine API.
I hope this helps.