Skip to main content

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri_tool_jupyterexportpython


Swarmauri Tool Jupyter Export Python

Exports a Jupyter NotebookNode to a Python script using nbconvert’s PythonExporter with optional custom templates.

Features

  • Accepts a notebook object (nbformat.NotebookNode) and returns the rendered .py source.
  • Supports passing an nbconvert template for custom formatting.
  • Returns {"exported_script": ...} on success or {"error": ...} on failure.

Prerequisites

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

Installation

# pip
pip install swarmauri_tool_jupyterexportpython

# poetry
poetry add swarmauri_tool_jupyterexportpython

# uv (pyproject-based projects)
uv add swarmauri_tool_jupyterexportpython

Quickstart

import nbformat
from swarmauri_tool_jupyterexportpython import JupyterExportPythonTool

notebook = nbformat.read("notebooks/example.ipynb", as_version=4)
exporter = JupyterExportPythonTool()
result = exporter(notebook, template_file=None)

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

Tips

  • Use custom templates to control cell separators or code comments—pass a .tpl file via template_file.
  • Pair with notebook execution tools (execute → export to .py) to operationalize notebooks as Python scripts.

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_jupyterexportpython 0.10.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_jupyterexportpython 0.10.0
File Size Uploaded Provenance Actions
swarmauri_tool_jupyterexportpython-0.10.0.tar.gz 7.9 kB Without provenance Details for swarmauri_tool_jupyterexportpython-0.10.0.tar.gz

Built distribution (wheel)

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

Total release size: 16.9 kB

Release files / swarmauri_tool_jupyterexportpython-0.10.0.tar.gz

Download URL swarmauri_tool_jupyterexportpython-0.10.0.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8184f173b0a0d79e241fe7dbe2eff84290bd758e4c5ae509fc4a60b643f2a40e
BLAKE2b-256 checksum
How to use checksums
99830b3c9dd67dee171320e0b92b512fcb4bc2c90f257b561732bb78dfa0b69c
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_jupyterexportpython-0.10.0-py3-none-any.whl

Download URL swarmauri_tool_jupyterexportpython-0.10.0-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e86bab44e781a7149f4748b69d326880f2f3afafdf1671b52417b525a412775
BLAKE2b-256 checksum
How to use checksums
0a8fc6cac44d1cee6c9cef386b4177cd5188b4433bb7e05c7fb9db4517454efc
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_jupyterexportpython 0.10.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.

Release history Release notifications | RSS feed

This release

0.10.0 This release

2 release files No provenance

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