Flask app with endpoints