from bottle import run, route import json list_of_movies = ['The King of Pythons', "The Lord of the Horns"] @route('/movies') def get_movies(): return json.dumps(list_of_movies) run(host='localhost', port=8080)