Skip to main content

Plain Language Notebooks

Project description

Plainbook: Natural Language Notebooks.

Authors:

Luca de Alfaro, dealfaro@acm.org

Overview

Plain Language Notebooks (Plainbook) allow you to create notebooks where the cells are written in natural language. The natural language is automatically converted to code via AI, and executed. The results of the execution are then displayed below the natural language cell.

In Plainbooks, natural language is the programming language. The goal of Plainbooks is to allow users to create and share notebooks in natural language, without having to write code, or understand the code that is shared with them. Actions to be performed are described in natural language, and the natural languate is retained, so users can edit it, improve it, and share it. We are building methods for verifying that the code implementation is faithful to the natural language description, so that users can trust the notebooks they receive from others.

Plain Language Notebooks have two type 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.

Differently from other notebook systems, Plainbooks are executed from start to end: random cell execution order, as in Jupyter notebooks, is not allowed. This ensures that the results are obtained in the same order in which a human reader would read the notebook.

This project is in an early stage of development.

Running Plainbook

plainbook path/to/notebook.nlb

(where .nlb is a Natural Language Notebook file; you can use other extensions if you wish). The file is created if it does not exist. For a list of command-lien options, do:

plainbook --help

If you want to be able to generate or check code from explanations, you need to add a Gemini API key in the settings (click on the gear icon in the top-right corner of the web interface).

Development

Run with:

python -m plainbook.main --debug

Running with the VSCode launch.json does not work, due to a VScode bug/quirk. See DEVELOP.md for development instructions, and see TODO.md for planned features.

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

plainbook-0.0.15.tar.gz (905.7 kB view details)

Uploaded Source

Built Distribution

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

plainbook-0.0.15-py3-none-any.whl (914.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: plainbook-0.0.15.tar.gz
  • Upload date:
  • Size: 905.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for plainbook-0.0.15.tar.gz
Algorithm Hash digest
SHA256 cdd9dcac06253495f5eaa723b92a681b7c5127a94923a7b8fb86ca62670de890
MD5 7a75fb0f9665b904a4f96bfddfc0cdf3
BLAKE2b-256 f5d43ebbcbdd885a7da96c15b22b46d0d9e35bb71a253bfbae7000b43363fe24

See more details on using hashes here.

File details

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

File metadata

  • Download URL: plainbook-0.0.15-py3-none-any.whl
  • Upload date:
  • Size: 914.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for plainbook-0.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 1528a5104de1aa5c9026973ddebc10edf54e299a18b34abd719810f14ae5a079
MD5 29151eac9327b5c0071962fda5298630
BLAKE2b-256 dc48595fa0b69b111f8ffe48065cfcd4187e01670c7c57af8bf7f264721b53a8

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