Interactive Python code editor with inline execution results
Project description
pdit
Output-focused Python editor.
pdit lets you write regular Python files and see execution results inline, like a notebook but without cells. Edit in your browser or your favorite editor.
Quick Start
pip install pdit
pdit script.py
Features
- Output-focused - Results appear inline next to the code that generated them
- Just Python scripts - No notebooks, no cells, no special format. Work with plain
.pyfiles - File watching - Changes to the file on disk automatically reload in the editor
- Auto-run - Execute code automatically when the file changes
- Coding agents - Perfect companion for Claude Code, Cursor, and other AI coding tools that edit files
Rich Output
- IPython display - Rich outputs via IPython.display
- Matplotlib - Inline plot rendering
- Interactive DataFrames - Sortable, searchable tables
- Markdown - Format text output with Markdown
Output
Markdown
Top-level string output renders as Markdown, so headings, lists, and emphasis display cleanly.
HTML
Rich HTML output is supported for objects that implement _repr_html_(); see note: IPython.display.display.
IPython display
IPython display objects render inline; see IPython.display for details.
DataFrames
Pandas and Polars DataFrames render as interactive tables automatically.
Plots
Matplotlib figures display inline. Call plt.show().
Installation
For development installs or running from source, use uv.
# Install from dist branch (recommended, includes pre-built assets)
uv add git+https://github.com/vangberg/pdit@dist
# Or use directly with uvx
uvx --from git+https://github.com/vangberg/pdit@dist pdit script.py
# From cloned repo (for development)
git clone git@github.com:vangberg/pdit.git
cd pdit
uv pip install -e .
uv run pdit script.py
Usage
Start pdit with a Python file:
pdit script.py
This will:
- Start the local server on port 8888
- Open your browser automatically
- Load the script file in the editor
If you're running from source, use:
uv run pdit script.py
Options
pdit [OPTIONS] [SCRIPT]
Options:
--port INTEGER Port to run server on (default: 8888)
--host TEXT Host to bind to (default: 127.0.0.1)
--no-browser Don't open browser automatically
--help Show help message
Examples
# Start with script
pdit analysis.py
# Custom port
pdit --port 9000 script.py
# Start without opening browser
pdit --no-browser script.py
# Just start the editor (no script)
pdit
Development
See DEVELOPMENT.md for development setup and testing.
License
Private
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 pdit-0.1.0.tar.gz.
File metadata
- Download URL: pdit-0.1.0.tar.gz
- Upload date:
- Size: 392.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bed223b76cfec70bee8cacbbfea9be59e44f11d04d4f82fc49c76dbbcae0e951
|
|
| MD5 |
40418480c1343fef9dfd44e94282904b
|
|
| BLAKE2b-256 |
6de62b7b32fa948b5e976fc56140853ba4908b0de1af523a8dce622d4a2f7375
|
File details
Details for the file pdit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pdit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 385.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf3554be77bf7b33a2cef3675863201c206a1ebff0bb227607f8eb6b253e5fd3
|
|
| MD5 |
33f8f0b3fc01154461a7e9de0ab923e0
|
|
| BLAKE2b-256 |
2a38a623d9c73bd1876cf1c841b62c9aad950776b2064ef2af9a7d23df3c7a8a
|