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_markdownorerrorif 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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| swarmauri_tool_jupyterexportmarkdown-1.4.0.tar.gz | 8.6 kB | Without provenance | Details for swarmauri_tool_jupyterexportmarkdown-1.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| swarmauri_tool_jupyterexportmarkdown-1.4.0-py3-none-any.whl | Python 3 | none | any | Details for swarmauri_tool_jupyterexportmarkdown-1.4.0-py3-none-any.whl |
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}
|
Security for swarmauri_tool_jupyterexportmarkdown 1.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.