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 queryCtrl/Cmd + Enter: Send query (alternative)Shift + Enter: New line in inputCtrl + 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
- Clone the repository:
git clone https://github.com/yourusername/pantheon-notebook.git
cd pantheon-notebook
- 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
- 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
- Open JupyterLab
- The Pantheon floating widget will appear at the bottom of the interface
- Type your query in natural language (e.g., "Load data.csv and show first 5 rows")
- Press Enter to generate code
- The generated code will be inserted as a new cell in your notebook
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pantheon_notebook-0.1.1.tar.gz.
File metadata
- Download URL: pantheon_notebook-0.1.1.tar.gz
- Upload date:
- Size: 304.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7dc233789e6ec07050bfa2d54b74f2a19ed46577bc3a60a4bbdc927b5c703435
|
|
| MD5 |
0f951d9718e2b9be14625b955d631b18
|
|
| BLAKE2b-256 |
2b03bf29732668da558d3c34ecbbeff702759c73abbb6419d7eff61687127d20
|
File details
Details for the file pantheon_notebook-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pantheon_notebook-0.1.1-py3-none-any.whl
- Upload date:
- Size: 206.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09c2ce082cef73893c6f92d68576d084e03ae5b1d85c280fe1df543e49ee3317
|
|
| MD5 |
4fb77a4f96aeed9401206c575117df71
|
|
| BLAKE2b-256 |
3f7a2a8f5f27b738b47a24258ea89eb3036051ae5ae1d0a325c34d2db3e97084
|