Creating Rest Api Endpoints In Python List