Skip to main content

nbinlineai

Ask AI questions inside a JupyterLab notebook. Each question and answer is an editable Markdown cell that stays with the notebook. You can refer to live Python values, offer selected functions as tools, inspect notebook cells and files, and choose when an image is attached to one question.

Notebook AI defaults, a question, and its saved answer

Start in JupyterLab

  1. Install nbinlineai in the environment that runs JupyterLab. In Extension Manager, search for nbinlineai and install it; then restart the whole Jupyter server. In a uv project, use uv add jupyterlab nbinlineai and launch with uv run jupyter lab.
  2. Open a Python notebook and choose Configure AI. Sign in with ChatGPT or save an OpenAI or Anthropic API key. Set the notebook's connection and model in AI defaults.
  3. Select a cell, click + AI Prompt, ask a question, and press Shift+Enter or Run AI. The answer appears in its own Markdown cell below the question.

The setup chapter covers connections, model choices, and hosted JupyterLab installs. ChatGPT uses your account allowance; API providers bill their own requests. The extension does not silently switch to a paid API connection.

Ask about live notebook work

Run a Python cell:

score = 7

def add_bonus(value: int) -> int:
    """Add a bonus to the live score."""
    return score + value

Then put this in an AI question:

What is $`score`? Call &`add_bonus` with value 3 and explain the result briefly.

$ reads a live value from the notebook's current Python kernel. & offers a function for the model to call; ask for the call explicitly when it matters. You can put tool declarations in an ordinary Markdown note above several questions. The variables and tools chapter explains what is available and how to keep declarations selective.

Questions use the notebook's Context choice and can include earlier code, notes, and completed AI exchanges. Details → Check context previews the current selection without contacting a provider. A saved answer can be edited like any other Markdown; turn off Keep answer before rerunning its question. JupyterLab's Run All Cells includes AI questions in order, while kept completed answers avoid repeating their tool actions. Read the manual for context, editing, and Run All.

Explore the tool catalog and examples

The Tool catalog lists each function and links to a normal Python or JupyterLab demonstration and a concise AI-tool question. The notebook examples include task walkthroughs and complete tool-catalog notebooks using disposable inputs. Open a copy before editing it. Generated code cells are left unexecuted for your review.

Browser-media tools can inspect selected outputs, capture from a source you approve, play or transform media, and attach an image to one question with explicit confirmation. A direct Python call returns a mutable receipt promptly; run its later inspection cell after permission, recording, or transfer finishes. An AI tool reply is an initial snapshot, so ask operation_status later before using a result ID. A capture or preview does not silently send its pixels to the model. Browser media operations explains receipts and cleanup.

Where your work lives

Questions, answers, and notebook defaults are saved in the .ipynb file. API keys are saved outside notebooks in the Jupyter server user's configuration; ChatGPT sign-in is managed by its account runtime. Tool calls can read or change files and kernel state with that user's permissions, so offer only the functions your question needs. A confirmed image attachment belongs to one question, and confirmation alone does not run it. Saved notebooks and privacy has the details.

Documentation · FAQ · Development · Report an issue

Licensed under GPL-3.0-only.

Metadata

Release files for nbinlineai 0.1.16

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

Source distribution (sdist)

Source distribution for nbinlineai 0.1.16
File Size Uploaded Provenance Actions
nbinlineai-0.1.16.tar.gz 2.5 MB Without provenance Details for nbinlineai-0.1.16.tar.gz

Built distribution (wheel)

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

Total release size: 4.6 MB

Release files / nbinlineai-0.1.16.tar.gz

Download URL nbinlineai-0.1.16.tar.gz
Size 2.5 MB
Tags Source
SHA-256 checksum
How to use checksums
80d8a7a0436f979f8706c131f8c4ec862e0fe4f863608b8ab3705043c26933e9
BLAKE2b-256 checksum
How to use checksums
54ccd7d2768eb5f50b9d047f5bbe96cc0ce1dada03e9083a44269cb3fc77f1cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / nbinlineai-0.1.16-py3-none-any.whl

Download URL nbinlineai-0.1.16-py3-none-any.whl
Size 2.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
85f036327a82e8cc74e75e883ff71853c0192240114740c01b3093a62563d206
BLAKE2b-256 checksum
How to use checksums
1fbee15ded9b8299992c02a0bb270c0af01ebbd1f5f26e6eae9dca14b4ad6f8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for nbinlineai 0.1.16

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.

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