Skip to main content

Interactive JSON viewer widget for Jupyter notebooks using React JSON View

Project description

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

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

json_view_anywidget-0.1.0.tar.gz (205.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

json_view_anywidget-0.1.0-py3-none-any.whl (208.2 kB view details)

Uploaded Python 3

File details

Details for the file json_view_anywidget-0.1.0.tar.gz.

File metadata

  • Download URL: json_view_anywidget-0.1.0.tar.gz
  • Upload date:
  • Size: 205.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.15

File hashes

Hashes for json_view_anywidget-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3c9fa6231ec86d30639077ca8d1451d9518a8fcd23ff0b8e46cba7306fa41ad6
MD5 38d1d1b879f8509e2a941dd406690232
BLAKE2b-256 19f6b07e7ec62ca7c3075fa043248c6404ade0572c1425f519ba68035e9ff7d2

See more details on using hashes here.

File details

Details for the file json_view_anywidget-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for json_view_anywidget-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe6f791d907ecfc1137227b87375b37050472eab49d968a2fff862177f101532
MD5 38a3191eba46d1b42d686aa0e46c73c8
BLAKE2b-256 dc0e427cb3ef462dfbe9bf4f8bea306feab0256e6cccc6b65adc3ec561cd84e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page