Created
August 30, 2016 14:04
-
-
Save kgriffs/66c6182363cc6be81a983c01a53c17d6 to your computer and use it in GitHub Desktop.
Falcon URI template pattern
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Thing(object): | |
| URI_TEMPLATE = '/things/{tid}' | |
| def on_get(self, req, resp, tid): | |
| pass | |
| # ... | |
| thing = Thing() | |
| app = falcon.API() | |
| app.add_route(thing.URI_TEMPLATE, thing) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment