Skip to content
Advertisement

Tag: flask

How to get the position data from the joystick to the flask server?

I would like to get the position data from the js joystick o use it at the flask server. I tried using ajax: python: @app.route(‘/test’, methods=[‘GET’, ‘POST’]) def test_ajax(): Every time the position of the joystick changed I would like to send the position data to flask Answer You can simply use the callback function to send the joystick data.

How I can send data from Flask to JavaScript?

Hello I am new and building an application in Flask and Javascript. I have a problem with sending data from Flask do JavaScript. I have code in routes.py I want to send jsonify(slownik) to my code in JavaScript but I dont want to do it with render_template bacause it refresh a page and I need this data to display it

Send Wav file from js to flask

I have this code in js witch recod an audio from the browser and I need to send it back from js to flask How I should do that while making the file in wav format? Answer The following example creates a limited time audio recording and uploads it when finished. A form containing a blob is used for this.

List of list from flask to JS

My Python code calculate coordonates of devices and put it in a list. So i get a list of list in a python var my_devices_list = [ [“name1”, 11.1, 22.2] , [“name2”, 33.3, 44.4] ] i’m trying to pass this list to my JS code my python code : my JS code : the alert I get from the JS

How to integrate python chatbot to a website

I have created a chatbot in python. I have also created a UI in html, css and js and connected the python chatbot to ui using flask. This is how it looks. UI Image How to flow goes is when a user inputs in the chat ui, the content is sent to flask and from flask to python file. The

Advertisement