https://github.com/agoose77/nbconvert_remote
Simple RESTful API to nbconvert. Also includes built-in web interface
https://github.com/agoose77/nbconvert_remote
api jupyter nbconvert notebook rest web
Last synced: about 2 months ago
JSON representation
Simple RESTful API to nbconvert. Also includes built-in web interface
- Host: GitHub
- URL: https://github.com/agoose77/nbconvert_remote
- Owner: agoose77
- Created: 2018-10-06T16:17:34.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-09T09:31:43.000Z (over 6 years ago)
- Last Synced: 2025-01-16T04:14:53.362Z (3 months ago)
- Topics: api, jupyter, nbconvert, notebook, rest, web
- Language: Jupyter Notebook
- Homepage:
- Size: 77.1 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nbconvert_remote (`nbconvert_http`)
HTTP frontend to `nbconvert`. Only exposes configuration support (via nested dictionaries) for the REST API.
Exposes both web and REST-JSON frontends (on `/` and `/api/convert` respectively)Install with pip: `pip install git+https://github.com/agoose77/nbconvert_remote.git#egg=nbconvert_http`
# Usage
## Web
* Launch from shell `nbconvert-http`.
* Navigate to `/` on the appropriate address (host, port), default `(0.0.0.0, 8000)`.
Note, the web interface uses a custom LaTeX template for LaTeX derived exporters, in order to support citations. Defining a cell with the tag `bibliography` will cause the cell to be hidden, and its contents passed to LaTeX as a bib file.

## REST
* Send JSON object to `/api/convert` with the format `{'notebook': ..., 'exporter': ...}`. Optionally pass `'config'` key to set configuration data (see [nbconvert](https://nbconvert.readthedocs.io/en/latest/config_options.html)).
* Parse JSON response with the format `{'body': ..., 'resources': ..., 'mime-type': ...}` where `body` will be a Base-64 encoded string if the result of nbconvert was bytes.