apiserver.py · GitHub
https://gist.github.com/earonesty/ab07b4c0fea2c226e75b3d538cc0dc55Create your handlers by inheriting from ApiServer and tagging them with @ApiRoute ("/path"). Alternately you can use the ApiServer () directly, and call add_handler ("path", function) Raise errors by raising ApiError (code, message, description=None) Return responses by simply returning a dict () or str () object Parameter to handlers is a dict ()