I might not actually need this...?
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
399B

  1. import falcon
  2. class QuoteResource:
  3. def on_get(self, req, resp):
  4. """Handles GET requests"""
  5. quote = {
  6. 'quote': (
  7. "I've always been more interested in "
  8. "the future than in the past."
  9. ),
  10. 'author': 'Grace Hopper'
  11. }
  12. resp.media = quote
  13. api = falcon.API()
  14. api.add_route('/quote', QuoteResource())