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
Release files for pantheon-notebook 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pantheon_notebook-0.1.3.tar.gz | 335.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pantheon_notebook-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 585.7 kB
Release files / pantheon_notebook-0.1.3.tar.gz
| Download URL | pantheon_notebook-0.1.3.tar.gz |
|---|---|
| Size | 335.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
926729bd85f299c4d3c3a9ee899b06631548ebe957dd3dd0b8e63bdfc6372385
|
|
BLAKE2b-256 checksum How to use checksums |
4bb7fb31bb321508edb5aaad752ca310e91bc17afb117e4b096025de550f0953
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.18
|
Release files / pantheon_notebook-0.1.3-py3-none-any.whl
| Download URL | pantheon_notebook-0.1.3-py3-none-any.whl |
|---|---|
| Size | 250.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e1bb817c047616b87b147b5d7bba46fa8ca1f4c6e02abb6e9416cb983720eabd
|
|
BLAKE2b-256 checksum How to use checksums |
37219739df22faec44fad53c1013468a494732aad5d6afb03df4eebe8e69bcaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.18
|