It's quite simple, just return an empty string with 204 status code:
@app.route('/')def hello(): # ... return '', 204