Complete the code to import the Flask library needed to create a REST API.
from [1] import Flask
We import Flask from the flask module to create the REST API.
Complete the code to create a Flask app instance named 'app'.
app = [1](__name__)The Flask app is created by calling Flask(__name__).
Fix the error in the route decorator to handle GET requests at '/status'.
@app.route('/status', methods=[[1]])
The route should accept GET requests, so the method is 'GET'.
Fill both blanks to return a JSON response with device status and HTTP status code 200.
return [1]({'status': 'online'}), [2]
Use jsonify to create a JSON response and return HTTP status code 200 for success.
Fill all three blanks to run the Flask app on host '0.0.0.0' and port 5000 with debug mode on.
if __name__ == '__main__': app.run(host=[1], port=[2], debug=[3])
To make the app accessible on the local network, use host '0.0.0.0', port 5000, and enable debug mode with True.