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.

23 lines
582 B

"""Tornado handlers for api specifications."""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from tornado import web
from ...base.handlers import IPythonHandler
import os
class APIHandler(web.StaticFileHandler, IPythonHandler):
def initialize(self):
web.StaticFileHandler.initialize(self, path=os.path.dirname(__file__))
@web.authenticated
def get(self):
self.log.debug("Serving api")
return web.StaticFileHandler.get(self, 'api.yaml')
default_handlers = [
(r"/api", APIHandler)
]