jupyter_server.nbconvert package#
Submodules#
Tornado handlers for nbconvert.
- class jupyter_server.nbconvert.handlers.NbconvertFileHandler(application, request, **kwargs)#
Bases:
JupyterHandlerAn nbconvert file handler.
- SUPPORTED_METHODS: Tuple[str, ...] = ('GET',)#
- auth_resource = 'nbconvert'#
- property content_security_policy#
The default Content-Security-Policy header
Can be overridden by defining Content-Security-Policy in settings[‘headers’]
- get(format, path)#
Get a notebook file in a desired format.
- Parameters:
download (bool, optional) – If true, set Content-Disposition: attachment
sanitize_html (bool, optional (html format only)) – If true, sanitize HTML (sets sanitize_html flag on nbconvert)
- class jupyter_server.nbconvert.handlers.NbconvertPostHandler(application, request, **kwargs)#
Bases:
JupyterHandlerAn nbconvert post handler.
- SUPPORTED_METHODS: Tuple[str, ...] = ('POST',)#
- auth_resource = 'nbconvert'#
- property content_security_policy#
The default Content-Security-Policy header
Can be overridden by defining Content-Security-Policy in settings[‘headers’]
- post(format)#
Convert a notebook file to a desired format.
- jupyter_server.nbconvert.handlers.find_resource_files(output_files_dir)#
Find the resource files in a directory.
- jupyter_server.nbconvert.handlers.get_exporter(format, **kwargs)#
get an exporter, raising appropriate errors
- jupyter_server.nbconvert.handlers.respond_zip(handler, name, output, resources)#
Zip up the output and resource files and respond with the zip file.
Returns True if it has served a zip file, False if there are no resource files, in which case we serve the plain output file.