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.1.tar.gz (83.2 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.1-py3-none-any.whl (84.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for json_view_anywidget-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d4b975327a580cbb47f49ad093a8b122c5a56f80adb1ed9ec045b064c31dd76d
MD5 0036f5a84d508d4c9885c2051c7fd571
BLAKE2b-256 84bbbad811b7ccc62a9ef0513b7b90379ca242567f1770aef161fce1779deef6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for json_view_anywidget-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 90d44788bb6507995cb8f752488bb62dfde7bff11dffb6317e7a4574c8e790bb
MD5 8e17fec67fa45bae83b133de50eaf937
BLAKE2b-256 b27fb55637fab728158b42f8ff4ca9149600d1907c06fc381b4cd87d7f5a9c5c

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