Swarmauri Markdown publishing tool for converting Jupyter notebooks into documentation-ready Markdown.
Project description
Swarmauri Jupyter Export Markdown Tool
swarmauri_tool_jupyterexportmarkdown converts a Jupyter notebook dictionary into Markdown using nbconvert.MarkdownExporter, with optional template selection and inline style resources for static publishing workflows.
Why
- Convert notebooks into documentation-friendly Markdown.
- Feed notebook output into static-site, docs, and content pipelines.
- Keep notebook-to-Markdown generation inside a Swarmauri tool interface.
Features
- Accepts notebook content as a Python dictionary.
- Normalizes list-based cell sources before export.
- Exports with
nbconvert.MarkdownExporter. - Supports optional custom templates.
- Supports optional style resources for embedded export customization.
FAQ
What kind of input does this tool expect?
It expects a JSON-like Python dictionary representing a notebook, not a raw file path and not a JSON string.
Does it write a .md file?
No. It returns Markdown content in exported_markdown.
What is the styles argument for?
It lets callers pass style content into the nbconvert resources structure for custom Markdown export workflows.
Installation
uv add swarmauri_tool_jupyterexportmarkdown
pip install swarmauri_tool_jupyterexportmarkdown
Usage
from swarmauri_tool_jupyterexportmarkdown import JupyterExportMarkdownTool
notebook = {
"cells": [
{"cell_type": "markdown", "metadata": {}, "source": ["# Demo"]},
{
"cell_type": "code",
"metadata": {},
"execution_count": None,
"outputs": [],
"source": ["print('hello')"],
},
],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 5,
}
result = JupyterExportMarkdownTool()(notebook_json=notebook)
print(result["exported_markdown"])
Examples
Export Markdown with a custom template
result = JupyterExportMarkdownTool()(
notebook_json=notebook,
template="lab",
)
Export Markdown with custom styles
result = JupyterExportMarkdownTool()(
notebook_json=notebook,
styles="pre { font-size: 0.9rem; }",
)
Related Packages
swarmauri_tool_jupyterexporthtmlswarmauri_tool_jupyterexportlatexswarmauri_tool_jupyterexportpythonswarmauri_tool_jupyterexecuteandconvertswarmauri_tool_jupyterreadnotebook
Foundational Swarmauri Packages
More Documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swarmauri_tool_jupyterexportmarkdown-0.11.0.dev1.tar.gz.
File metadata
- Download URL: swarmauri_tool_jupyterexportmarkdown-0.11.0.dev1.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df7a64a4023e8424ebfe4f1ceb125b13f2d7edb7d9cd3f521d2893c60e3ce7e6
|
|
| MD5 |
d4222bf23e8989719ea46c874584e6c1
|
|
| BLAKE2b-256 |
acf5a3bd57933e110eae20bd1a4f2507afa5325e63068ce53da1859bae64160d
|
File details
Details for the file swarmauri_tool_jupyterexportmarkdown-0.11.0.dev1-py3-none-any.whl.
File metadata
- Download URL: swarmauri_tool_jupyterexportmarkdown-0.11.0.dev1-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7373622e7c9bcd2cfb471c96466a850b7961f6fab51436aeac7fe7e4ffc64864
|
|
| MD5 |
a4f7a8843563393fddb3ed73e3fdda7f
|
|
| BLAKE2b-256 |
16a41775187c09e5cd09d01fc86320774a043140359b2d24b2e5dcfe34b4dfe8
|