A lightweight Jupyter-like notebook interface for Python with local code execution
Project description
๐ฏ IPyTool v0.3 - Lightweight Jupyter Alternative
A lightweight, browser-based Python notebook tool that looks and works just like Jupyter Notebook. Runs in your local Python environment - no Pyodide, no PyScript.
๐ฆ Installation
Install via pip:
pip install ipytool
๐ Quick Start
Just run:
ipytool
The notebook interface will automatically open in your default browser at http://localhost:5000.
โจ Key Features
๐ Version 0.3 Updates
- ๐ Markdown Cells - Full rich text documentation support
- ๐จ Beautiful Rendering - Headings, lists, tables, code blocks
- โ๏ธ Double-click Edit - Intuitive markdown editing
- ๐ Cell Type Toggle - Easy switch between Code/Markdown
Version 0.2 Features
- ๐ค Intelligent Autocomplete - VSCode-style code suggestions (
Ctrl+Space) - โฌ๏ธโฌ๏ธ Cell Reordering - Move cells up/down with arrow buttons
- โ Flexible Cell Addition - Insert cells at any position
- ๐ Smart DataFrame Display - Automatic HTML table rendering
- ๐ฆ Package Installation -
!pip installsupport with progress - ๐ฌ Interactive Input - Modal-based
input()function
๐จ Authentic Jupyter Interface
- Exact Jupyter Notebook design aur color scheme
- Professional typography aur spacing
In [1]:/Out[1]:execution counters- Hover-based cell toolbars
- Smooth animations aur transitions
๐ Powerful Code Execution
- Stateful execution - Variables persist across cells (Jupyter-like behavior)
- Full numpy, pandas, aur sabhi installed packages support
- Real-time output display with proper formatting
- Error messages with complete tracebacks
- Execution counter tracking
โจ๏ธ Professional Features
- Code Autocomplete - Python keywords, builtins, aur user-defined suggestions
- Keyboard shortcuts (Shift+Enter, Ctrl+Enter, Ctrl+Space)
- Cell management - Reorder, insert, delete
- Kernel restart capability
- Notebook save/load with JSON format
๐ง Enterprise-Grade Design
- Clean, minimal, professional UI
- Responsive design for all screen sizes
- Smooth state management
- Proper error handling
- Session-based architecture
๐ Quick Start
1. Install Dependencies
# Virtual environment already active
source venv/bin/activate
# Install requirements (already done)
pip install -r requirements.txt
2. Run the Application
python app.py
3. Open Browser
Navigate to: http://localhost:5000
๐ Usage Guide
Basic Operations
Create a New Cell
- Click
โbutton in toolbar - Or press
Bkey (when not in edit mode)
Run a Cell
- Click
โถ Runbutton - Or press
Shift+Enter(runs and selects next cell) - Or press
Ctrl+Enter(runs current cell)
Delete a Cell
- Click
๐button in cell toolbar (appears on hover)
Run All Cells
- Click
โถโถ Run Allbutton in toolbar
Advanced Features
Using input() Function
# This now works perfectly!
name = input("Enter your name: ")
age = input("Enter your age: ")
print(f"Hello {name}, you are {age} years old!")
A modal dialog will appear for each input() call.
Save Notebook
- Enter notebook name in top input field
- Click
๐พbutton - Notebook saved in
notebooks/folder as JSON
Load Notebook
- Click
๐ Loadbutton - Enter notebook name
- Notebook loads with all cells and outputs
Restart Kernel
- Click
โณ Restartbutton - All variables cleared
- New session created
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Shift+Enter |
Run cell and select next |
Ctrl+Enter |
Run current cell |
Tab |
Indent code (in cell) |
B |
Insert cell below |
๐งช Testing Examples
Example 1: NumPy & Pandas
# Cell 1
import numpy as np
import pandas as pd
arr = np.arange(10)
df = pd.DataFrame({
"values": arr,
"squared": arr ** 2
})
print(df)
# Cell 2 - Variables persist!
total = df["squared"].sum()
print(f"Total: {total}")
Example 2: Interactive Input
# Cell 1
name = input("What's your name? ")
age = int(input("What's your age? "))
print(f"\nHello {name}!")
print(f"In 10 years, you'll be {age + 10} years old.")
Example 3: Data Analysis
# Cell 1
import pandas as pd
import numpy as np
# Create sample data
data = pd.DataFrame({
'product': ['A', 'B', 'C', 'D'],
'sales': [100, 150, 200, 175],
'profit': [20, 35, 50, 40]
})
print(data)
# Cell 2 - Analyze the data
data['profit_margin'] = (data['profit'] / data['sales']) * 100
print("\nWith Profit Margins:")
print(data)
print(f"\nAverage Profit Margin: {data['profit_margin'].mean():.2f}%")
๐ Project Structure
pyide/
โโโ app.py # Flask backend with session management
โโโ requirements.txt # Python dependencies
โโโ static/
โ โโโ index.html # Jupyter-style UI
โ โโโ main.js # Frontend logic with input() support
โ โโโ styles.css # Professional Jupyter styling
โโโ notebooks/ # Saved notebooks (JSON format)
โโโ venv/ # Python virtual environment
โโโ README.md # This file
๐ง Technical Architecture
Backend (Flask)
- Session Management: UUID-based sessions with isolated namespaces
- Code Execution:
exec()with proper stdout/stderr capture - Input Handling: Interactive input() support with callback mechanism
- State Persistence: Variables persist across cells within same session
- Error Handling: Full traceback capture and display
Frontend (Vanilla JS)
- Cell Management: Dynamic cell creation/deletion with execution counters
- Input Modal: Beautiful dialog for
input()function calls - Keyboard Shortcuts: Jupyter-like keyboard navigation
- Real-time Updates: Async execution with loading states
- Session Tracking: Maintains connection to backend session
Storage
- Notebooks saved as JSON in
notebooks/folder - Contains: cell code, outputs, execution counts
- Easy to version control and share
๐จ Design Philosophy
Yeh tool enterprise-grade software ki tarah design kiya gaya hai:
- โ Professional Look - Exact Jupyter Notebook appearance
- โ Clean Code - Modular, well-commented, maintainable
- โ User Experience - Smooth interactions, helpful feedback
- โ Reliability - Proper error handling, state management
- โ Performance - Efficient rendering, async operations
- โ Extensibility - Easy to add new features
๐ Troubleshooting
Port Already in Use
# Find and kill process on port 5000
lsof -ti:5000 | xargs kill -9
# Or use different port
# Edit app.py: app.run(..., port=5001)
Module Not Found
# Ensure virtual environment is active
source venv/bin/activate
# Reinstall requirements
pip install -r requirements.txt
Session Lost
- Click
โณ Restartbutton to create new session - Or refresh the page
๐ Future Enhancements
Possible improvements for even more professional feel:
- Markdown cells support
- Rich output (plots, images, HTML)
- Code syntax highlighting
- Auto-completion
- Cell output collapsing
- Export to .ipynb format
- Multiple kernel support
- Real-time collaboration
๐ Notes
- Security: Yeh tool sirf local use ke liye hai. Production deployment ke liye proper security measures add karein.
- Python Environment: Same Python environment use hota hai jahan Flask run ho raha hai.
- Browser Support: Modern browsers (Chrome, Firefox, Edge, Safari) mein best kaam karta hai.
๐จโ๐ป Developer Notes
Code quality professional standards follow karta hai:
- Backend: Clean Flask routes with proper error handling
- Frontend: Modular JavaScript with clear function separation
- Styling: Professional CSS with Jupyter-matching design
- Documentation: Extensive comments and docstrings
๐ Enjoy Coding!
Ab aap ek professional Jupyter Notebook experience enjoy kar sakte hain apne local machine par! ๐
Happy Coding! ๐ปโจ
Project details
Release history Release notifications | RSS feed
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 ipytool-1.0.0.tar.gz.
File metadata
- Download URL: ipytool-1.0.0.tar.gz
- Upload date:
- Size: 67.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f0a0b261ae837e7c6e91baf7221a9c5f17eabaa25877342c86d28e9288c0110
|
|
| MD5 |
2b65751fb2d281a6fe7f5ed5943da47c
|
|
| BLAKE2b-256 |
f462cfd2e179056dfdffdb7653ab499ab3fb4c601b7c6ce771980df802f54356
|
File details
Details for the file ipytool-1.0.0-py3-none-any.whl.
File metadata
- Download URL: ipytool-1.0.0-py3-none-any.whl
- Upload date:
- Size: 61.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d332c7e7229da67ce045e956f808aa395ec8c0d789bd4675ea5132b865a29c7e
|
|
| MD5 |
11a987adcd5138a84d3065013e07cc9c
|
|
| BLAKE2b-256 |
b7f8caf5c63f2ff54ee8b8dc0320b7ea17294c7f13d120226ccd79fb590ad133
|