Create an advanced REST API with Python