Python notebook.base.handlers.IPythonHandler() Examples

The following are 2 code examples of notebook.base.handlers.IPythonHandler(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module notebook.base.handlers , or try the search function .
Example #1
Source File: handlers.py    From jupyter_http_over_ws with Apache License 2.0 5 votes vote down vote up
def __init__(self, *args, **kwargs):
    websocket.WebSocketHandler.__init__(self, *args, **kwargs)
    handlers.IPythonHandler.__init__(self, *args, **kwargs)

    ca_certs = None
    if self.request.protocol == 'https':
      ca_certs = self.config.get('NotebookApp', {}).get('certfile')
      if not ca_certs:
        raise ValueError('HTTPS requires the NotebookApp.certfile setting to '
                         'be present.')
    self.ca_certs = ca_certs 
Example #2
Source File: handlers.py    From jupyter_http_over_ws with Apache License 2.0 5 votes vote down vote up
def check_origin(self, origin):
    # The IPythonHandler implementation of check_origin uses the
    # NotebookApp.allow_origin setting.
    return handlers.IPythonHandler.check_origin(self, origin)