JSON View AnyWidget
An interactive JSON viewer widget for Jupyter notebooks using React JSON View.
Features
- 🔍 Interactive JSON tree view with expand/collapse
- 🎨 Multiple theme support (monokai, solarized, etc.)
- 🎯 Support Jupyter notebooks and marimo
- 📝 Support Multi-line strings
Installation
From PyPI (Recommended)
pip install json-view-anywidget
Using uv
uv pip install json-view-anywidget
From Source
git clone https://github.com/bigeagle/anywidget-react-json-view.git
cd anywidget-react-json-view
uv pip install -e .
Quick Start
from rjv_anywidget import JsonWidget
# Create a simple JSON viewer
widget = JsonWidget({
"name": "John",
"age": 30,
"city": "New York"
})
widget
Advanced Usage
# Use different themes
widget = JsonWidget(
data=your_data,
theme="monokai" # Available themes: "rjv-default", "monokai", "solarized", etc.
)
# Display in Jupyter
widget
Development
Frontend Development
# Install dependencies
pnpm install
# Development mode (with hot reload)
pnpm run dev
# Build for production
pnpm run build
Python Package Development
# Build package
uv build
# Install locally for testing
uv pip install -e .
Project Structure
.
├── src/
│ ├── widget.tsx # React component source
│ ├── index.css # Component styles
│ └── rjv_anywidget/ # Python package
│ ├── __init__.py
│ ├── widget.py # JsonWidget class
│ └── static/ # React build output
├── pyproject.toml # Python package configuration
├── package.json # Frontend build configuration
└── dist/ # Build outputs
License
MIT License
Related Links
Metadata
Release files for json-view-anywidget 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| json_view_anywidget-0.1.1.tar.gz | 83.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| json_view_anywidget-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 167.2 kB
Release files / json_view_anywidget-0.1.1.tar.gz
| Download URL | json_view_anywidget-0.1.1.tar.gz |
|---|---|
| Size | 83.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d4b975327a580cbb47f49ad093a8b122c5a56f80adb1ed9ec045b064c31dd76d
|
|
BLAKE2b-256 checksum How to use checksums |
84bbbad811b7ccc62a9ef0513b7b90379ca242567f1770aef161fce1779deef6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.15
|
Release files / json_view_anywidget-0.1.1-py3-none-any.whl
| Download URL | json_view_anywidget-0.1.1-py3-none-any.whl |
|---|---|
| Size | 84.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90d44788bb6507995cb8f752488bb62dfde7bff11dffb6317e7a4574c8e790bb
|
|
BLAKE2b-256 checksum How to use checksums |
b27fb55637fab728158b42f8ff4ca9149600d1907c06fc381b4cd87d7f5a9c5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.15
|