Skip to content

Instantly share code, notes, and snippets.

@nmwalsh
Last active December 7, 2017 03:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nmwalsh/6903fe65a4d80c029eaa2806a38344bd to your computer and use it in GitHub Desktop.
Save nmwalsh/6903fe65a4d80c029eaa2806a38344bd to your computer and use it in GitHub Desktop.
# falcon.API instances are callable WSGI apps. Never change this.
app = falcon.API()
# Resources are represented by long-lived class instances. Each Python class becomes a different "URL directory"
info = InfoResource()
predicts = PredictsResource()
# things will handle all requests to the '/info' or '/predicts' URL path
app.add_route('/info', info)
app.add_route('/predicts', predicts)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment