Skip to main content

Jupyter anywidget for sideloading pandoc wasm

Project description

jupyter_anywidget_pandoc

Example Jupyter anywidget that will sideload georgestagg/pandoc-wasm into the browser and support pandoc conversions using it.

For example:

from jupyter_anywidget_pandoc import pandoc_headless

# Load the headless widget
p = pandoc_headless()

# Wait for pandoc wasm to load (blocking;; does not work in JupyterLite)
p.ready()

# Try a conversion
# This is blocking - does not work in JupyerLite
output = p.convert("## Some markdown\nWith *feeling...*")
output
> '<h2 id="some-markdown">Some markdown</h2>\n<p>With <em>feeling…</em></p>'

#Non-blocking
p.base_convert("## Some markdown\nWith *feeling...*")
# When it's ready, collect from:
p.response
> {'status': 'processing'}
> {'status': 'completed', 'output_raw': '<p>Another example</p>'}

Installation

pip install jupyter_anywidget_pandoc

or with uv:

uv add jupyter_anywidget_pandoc

Open example.ipynb in JupyterLab, VS Code, for a demo...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyter_anywidget_pandoc-0.0.1.tar.gz (65.8 kB view details)

Uploaded Source

Built Distribution

jupyter_anywidget_pandoc-0.0.1-py2.py3-none-any.whl (67.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file jupyter_anywidget_pandoc-0.0.1.tar.gz.

File metadata

File hashes

Hashes for jupyter_anywidget_pandoc-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1cb74b2402a189bc086598ad44f8da013c1ca6013c67ce977a9a92527ba73aa3
MD5 e5f5f0e315fba13e19a824ad63fa763e
BLAKE2b-256 48fc0c8ebade9c51a93efb110816851dfe95dbb8d4b2929e0681c721ce7acfa8

See more details on using hashes here.

File details

Details for the file jupyter_anywidget_pandoc-0.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for jupyter_anywidget_pandoc-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1cb7cf22f3846e2f1d3227004a0db9e56587b79726f2be6ab8defeae7bcbb9d9
MD5 c4130b369800b7e1c8dbde66b975fd1a
BLAKE2b-256 fc8e6560426501cce33b80611323f5f70bb0cc55f4e9763effdaf605036929d2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page