Skip to main content

Plainbook: Natural Language Notebooks

Plainbooks allow users to create and communicate data analysis and science using natural language.

Plainbooks are notebooks that combine instructions and results, similarly to Jupyter notebooks. The difference is that Plainbook are in natural language: the code is generated "under the hood" using AI. The use of plain language allows you to share your data analysis and science with a much wider audience, including people who do not know how to code.

Plainbook can use multiple AIs to check that the code faithfully implements the natural language description, and can include tests to further validate the notebook. When you share a notebook, the recipients can also check that the code under the hood implements the natural-language tasks. Recipients can also edit the plainbook, regenerate the code, and rerun it, just as in Jupyter notebooks.

Thus, the goal of the Plainbook project is to replicate in natural language what made Jupyter notebooks so successful: the ability to share together code and results, so that any recipient can validate and modify the notebook. You can read more about the design of Plainbook in our paper.

Try Plainbook Now

Quick Start Videos:

Run on GitHub Codespaces (no installation needed):

  1. Click CodeCodespaces in the GitHub interface
  2. Wait ~3 minutes for the environment to set up
  3. Click Open in Browser for port 8080
  4. A trial Claude API key is provided; you can add your own in Settings

Example Notebooks:

Installation and use

You can install Plainbook with pip:

pip install plainbook

To open a plainbook (which will be created if it does not exist):

plainbook notebook.plnb

You can use any file name you like, with any extension you like.

AI API Keys. You need a Gemini or Claude API key to use Plainbook. Click on the Settings button (the gear on the top right) to see instructions on how to set them. Both providers offer free trial credits, and usage costs are typically low for regular notebook work.

Key Features

  • Natural language notebooks: Describe what you want in plain English; AI generates and validates the code.
  • Multiple AI providers: Use Gemini, Claude, or both—cross-check implementations for robustness.
  • Built-in testing: Write test cells to verify notebook behavior automatically.
  • Shareable & reproducible: Share notebooks with others who can modify, regenerate, and rerun your work.

Resources

Plainbook Structure

Plainbooks consist of three types of cells:

  • Action cells, where the user describes in natural language the action to be performed (e.g., "Load the dataset from file data.csv and display the first 10 rows"). The system converts the description to code, executes it, and displays the results below the cell.

  • Comment cells, where the user can add comments, section headers, and so forth, using markdown syntax.

  • Test cells, where the user can write properties that should hold at certain points of the notebook to check that everything is working as expected.

Differently from standard Jupyter notebooks, Plainbooks cells are guaranteed to be executed in order, from first to last, matching the order in which humans read the cells. Plainbooks relies on a checkpointing kernel to remember the execution state after each cell, so that it can re-run a cell without having to start from the beginning.

AI Providers Plainbook is designed to work with multiple AI providers, and users can choose which provider to use for code generation and checking. The system is designed to allow users to easily switch between providers, so that users can cross-check that the implementation obtained from one provider is considered valid by another provider. This avoids over-reliance on a single class of AI models. Currently, Plainbook supports Gemini and Claude models. You will need an API key for at least one such provider to use Plainbook.

Contributors

Papers

Implementation

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plainbook-0.2.6.tar.gz (3.2 MB view details)

Uploaded Source

Built Distribution

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

plainbook-0.2.6-py3-none-any.whl (4.7 MB view details)

Uploaded Python 3

File details

Details for the file plainbook-0.2.6.tar.gz.

File metadata

  • Download URL: plainbook-0.2.6.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for plainbook-0.2.6.tar.gz
Algorithm Hash digest
SHA256 bb62ea3e1947dc6e4bebc5ca20bbd2b48eaba8052e919c268bc221d4b23a4f74
MD5 6ef02b588903cf4f1363bae33b3950cd
BLAKE2b-256 e6eb19bf3748b4ebb026fdcc2448cba6580632b26118baf6c37260e8c70d5c30

See more details on using hashes here.

File details

Details for the file plainbook-0.2.6-py3-none-any.whl.

File metadata

  • Download URL: plainbook-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 4.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for plainbook-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 0b41b917228f44f56ef2cd8d3820429ef243ff15cd919068dfdad963fd199171
MD5 06dd0a66d2a6b8f6642915cc314d06f7
BLAKE2b-256 4862aaa8c77ece10924f2587f8506e7f215b51ee54bbb4cecb13562277eda3ef

See more details on using hashes here.

Release history Release notifications | RSS feed

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

This release

0.2.6 This release

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.1.12

2 files

0.1.10

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.20

2 files

0.0.19

2 files

0.0.18

2 files

0.0.17

2 files

0.0.16

2 files

0.0.15

2 files

0.0.14

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

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