Skip to main content

A JupyterLab extension for Pantheon CLI integration with floating input widget

Project description

Pantheon Notebook

A JupyterLab extension that integrates Pantheon CLI capabilities into Jupyter notebooks through a floating input widget.

Features

  • 🎯 Floating Input Widget: A non-intrusive floating panel at the bottom of JupyterLab
  • 💬 Natural Language to Code: Generate code using natural language descriptions
  • ⌨️ Keyboard Shortcuts:
    • Enter: Send query
    • Ctrl/Cmd + Enter: Send query (alternative)
    • Shift + Enter: New line in input
    • Ctrl + Up/Down: Navigate query history
  • 🔄 Query History: Access previous queries easily
  • 📝 Direct Cell Insertion: Generated code is automatically inserted into notebook cells
  • 🎨 Theme Support: Adapts to JupyterLab light/dark themes

Installation

Development Installation

  1. Clone the repository:
git clone https://github.com/yourusername/pantheon-notebook.git
cd pantheon-notebook
  1. Install the package in development mode:
# Install package dependencies
pip install -e .

# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite

# Rebuild extension TypeScript source after making changes
jlpm build
  1. Start JupyterLab:
jupyter lab

Production Installation

pip install pantheon-notebook

Development

Setup

# Install dependencies
jlpm install

# Build TypeScript source
jlpm build

# Build TypeScript source in watch mode
jlpm watch

# Build extension
jlpm build:labextension

Project Structure

pantheon-notebook/
├── src/                          # TypeScript source files
│   ├── index.ts                 # Extension entry point
│   └── widget.ts                # Floating input widget implementation
├── style/                       # CSS styles
│   └── index.css               # Widget styles
├── pantheon_notebook/          # Python package
│   └── __init__.py            # Python package initialization
├── package.json                # Node.js package configuration
├── tsconfig.json              # TypeScript configuration
└── pyproject.toml             # Python package configuration

Usage

  1. Open JupyterLab
  2. The Pantheon floating widget will appear at the bottom of the interface
  3. Type your query in natural language (e.g., "Load data.csv and show first 5 rows")
  4. Press Enter to generate code
  5. The generated code will be inserted as a new cell in your notebook
  6. Edit the generated code as needed

Roadmap

  • Backend integration with Pantheon CLI
  • Streaming code generation
  • Context-aware code generation (analyze existing notebook cells)
  • Support for multiple programming languages (Python, R, Julia)
  • Code execution options (auto-execute, preview mode)
  • Advanced UI features (code preview, syntax highlighting)
  • Export/import query history
  • Collaborative features

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT

http://127.0.0.1:8888/lab?token=b68740cbea579cb06fbaf61e54fa5093efa041674915814

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

pantheon_notebook-0.1.0.tar.gz (287.3 kB view details)

Uploaded Source

Built Distribution

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

pantheon_notebook-0.1.0-py3-none-any.whl (188.1 kB view details)

Uploaded Python 3

File details

Details for the file pantheon_notebook-0.1.0.tar.gz.

File metadata

  • Download URL: pantheon_notebook-0.1.0.tar.gz
  • Upload date:
  • Size: 287.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.10

File hashes

Hashes for pantheon_notebook-0.1.0.tar.gz
Algorithm Hash digest
SHA256 39db657ea7042b392dfb8212423ca72941e93e61a8ec5cdc8ffa5353faf4f1ab
MD5 24f90805362b5971ff638a6a9675f91d
BLAKE2b-256 73d778351d263135014cd9d7db59d25718b86aa1a7f0823dc4b414fab5bcc4a3

See more details on using hashes here.

File details

Details for the file pantheon_notebook-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pantheon_notebook-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 337faaf92ae65e782b83128c9f0d9966b24b1d48e6dae5acc803644ac89baf63
MD5 0b18e164f69bc4a2350a882f4c48c65a
BLAKE2b-256 5cecf2acd5dc38326cce6f35cd1c4cf4f03a0aa87b95e0ff2732baffd2924aef

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