Skip to content

Instantly share code, notes, and snippets.

@nmwalsh
Created December 7, 2017 02:53
Show Gist options
  • Select an option

  • Save nmwalsh/844a2771d623daf40fb07cd9e51374c0 to your computer and use it in GitHub Desktop.

Select an option

Save nmwalsh/844a2771d623daf40fb07cd9e51374c0 to your computer and use it in GitHub Desktop.

Revisions

  1. nmwalsh created this gist Dec 7, 2017.
    8 changes: 8 additions & 0 deletions InfoResource
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    class InfoResource(object):
    def on_get(self, req, resp):
    """Handles GET requests"""
    resp.status = falcon.HTTP_200 # This is the default status
    resp.body = ('\nThis is an API for a deployed Datmo model, '
    'where it takes flower lengths as input and returns the predicted Iris species.\n'
    'To learn more about this model, send a GET request to the /predicts endpoint or visit the repository online at: \n\n'
    'https://datmo.com/nmwalsh/falcon-api-model\n\n')