Skip to main content

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri_tool_jupyterexportmarkdown


Swarmauri Tool Jupyter Export Markdown

Converts a Jupyter NotebookNode to Markdown using nbconvert’s MarkdownExporter. Injectable CSS and JS snippets let you tweak the output for static publishing.

Features

  • Accepts a notebook JSON string and returns rendered Markdown.
  • Optional inline CSS/JS injection to customize the exported document.
  • Returns a dict with exported_markdown or error if conversion fails.

Prerequisites

  • Python 3.10 or newer.
  • nbconvert/nbformat installed (pulled in automatically).

Installation

# pip
pip install swarmauri_tool_jupyterexportmarkdown

# poetry
poetry add swarmauri_tool_jupyterexportmarkdown

# uv (pyproject-based projects)
uv add swarmauri_tool_jupyterexportmarkdown

Quickstart

import json
import nbformat
from swarmauri_tool_jupyterexportmarkdown import JupyterExportMarkdownTool

notebook = nbformat.read("notebooks/example.ipynb", as_version=4)
notebook_json = json.dumps(notebook)

exporter = JupyterExportMarkdownTool()
response = exporter(
    notebook_json=notebook_json,
    extra_css="blockquote { color: gray; }",
    extra_js="console.log('Markdown ready');",
)

if "exported_markdown" in response:
    Path("notebooks/example.md").write_text(response["exported_markdown"], encoding="utf-8")
else:
    print("Error:", response["error"])

Tips

  • Use Markdown export when preparing notebooks for static docs, blogs, or README content.
  • Apply lightweight CSS/JS to adjust styling when the Markdown is embedded in HTML environments.
  • Combine with notebook execution tools to build pipelines (execute → convert to Markdown → publish).

Want to help?

If you want to contribute to swarmauri-sdk, read up on our guidelines for contributing that will help you get started.

Metadata

Release files for swarmauri_tool_jupyterexportmarkdown 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for swarmauri_tool_jupyterexportmarkdown 1.4.0
File Size Uploaded
swarmauri_tool_jupyterexportmarkdown-1.4.0.tar.gz 8.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for swarmauri_tool_jupyterexportmarkdown 1.4.0
File Interpreter ABI Platform
swarmauri_tool_jupyterexportmarkdown-1.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.3 kB

Release files / swarmauri_tool_jupyterexportmarkdown-1.4.0.tar.gz

Download URL swarmauri_tool_jupyterexportmarkdown-1.4.0.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7f796ed97138a371c670959fccdecdafb7b640832aa93572e559a6010d7b8ab2
BLAKE2b-256 checksum
How to use checksums
966717d59308f33c2e08f285d8ecf7b06c84132105ad740e51f6e9ef8a7f82e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / swarmauri_tool_jupyterexportmarkdown-1.4.0-py3-none-any.whl

Download URL swarmauri_tool_jupyterexportmarkdown-1.4.0-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
166f3a5e02881bf6a33a27582e4c97290df33a6ecbf4e549d9c00bf97ed91744
BLAKE2b-256 checksum
How to use checksums
c89b7936b7ae552d1364c1331ee492481b63427fe818e2967c13770865acc40d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 release files

1.3.2

2 release files

1.3.0

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page