Skip to main content

Export Jupyter notebooks into narrated, cell-labeled text.

Project description

Neurobyte

Export Jupyter notebooks into narrated, cell-labeled text for LLM contexts.

Features

  • Clean Export: Extracts code cells from .ipynb files.
  • Narrative Summary: Generates a header paragraph summarizing the code's intent.
  • Neurobyte Outline: Adds a structured outline with markdown headers.
  • Redaction: Automatically redacts sensitive patterns (API keys, BQ table IDs).
  • JSON Output: Machine-readable format for indexing and search.
  • Markdown Cells: Include # headers in the outline.
  • Custom Redaction: Add your own regex patterns.
  • Cell Selection: Export specific cell ranges.

Installation

pip install neurobyte

Usage

CLI

# Basic export
python -m neurobyte export notebook.ipynb

# Specify output file
python -m neurobyte export notebook.ipynb -o summary.txt

# JSON output
python -m neurobyte export notebook.ipynb --json

# Include markdown cells
python -m neurobyte export notebook.ipynb --include-markdown

# Custom redaction pattern
python -m neurobyte export notebook.ipynb --redact-pattern 'client_id=\d+'

# Export specific cells
python -m neurobyte export notebook.ipynb --cells 1-5

# Disable redaction
python -m neurobyte export notebook.ipynb --no-redact

Python API

import neurobyte as nb
from neurobyte.export import ExportOptions

# Basic export
nb.export_notebook("notebook.ipynb", "export.txt")

# With options
opts = ExportOptions(
    output_format="json",
    include_markdown=True,
    redact_secrets=True,
    extra_redact_patterns=["client_id=\\d+"],
    cell_indices=[1, 2, 3],
)
nb.export_notebook("notebook.ipynb", "export.json", options=opts)

# Export from live session (requires IPython)
nb.export_here("session.txt")

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

neurobyte-0.1.1.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neurobyte-0.1.1-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file neurobyte-0.1.1.tar.gz.

File metadata

  • Download URL: neurobyte-0.1.1.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for neurobyte-0.1.1.tar.gz
Algorithm Hash digest
SHA256 66aaf0e54045a3b2bc25bd2cfeb4d2ec06215adb73ee9577bd6d340788fac687
MD5 5399ff36e3e441c7c4cf252c6e9c4801
BLAKE2b-256 d5259e26ab33de1182bf0007b25b9dbccd5dd2bf670d108fb6b93f8fc115e2c6

See more details on using hashes here.

File details

Details for the file neurobyte-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: neurobyte-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for neurobyte-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0c562ccbcd2b88da8f66d87ae1879c57899b6d06866b52b0a65cae83dac788fc
MD5 f590f022b80c12d211f35841a0db432f
BLAKE2b-256 30c7b835dd176a5983deffcd09610be5e8ae318bd1def2454e9ff57b9c2135af

See more details on using hashes here.

Supported by

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