Brief description of what this PR does, and why it is needed.
Fixes #XXX
Optional. Screenshots, curl examples, etc.
| from apistar import App, Include, Route, schema | |
| from apistar.docs import docs_routes | |
| from apistar.http import Response | |
| from apistar.statics import static_routes | |
| _hotdogs = ['hotdog', 'hotdogs'] | |
| class Hotdog(schema.String): |
| # ~/.tmuxinator/health.yml | |
| name: health | |
| root: ~/code/health/ | |
| # Optional tmux socket | |
| # socket_name: foo | |
| # Runs before everything. Use it to start daemons etc. | |
| pre: |
| def safeget(dct, *keys): | |
| dct = dict(dct) | |
| for key in keys: | |
| try: | |
| dct = dct[key] | |
| except (KeyError, AttributeError, TypeError) as e: | |
| return None | |
| return dct |