Skip to main content

Create interactive visualizations using natural language and LLMs

Project description

Vibe Widget

Create interactive visualizations using natural language and LLMs.

Installation

pip install vibe-widget

Or with uv:

uv pip install vibe-widget

Quick Start

import pandas as pd
import vibe_widget as vw

df = pd.DataFrame({
    'height': [150, 160, 170, 180, 190],
    'weight': [50, 60, 70, 80, 90]
})

vw.create("an interactive scatterplot of height and weight", df)

This will:

  1. Analyze your data structure
  2. Generate a React component via Claude API
  3. Return an HTML file with the interactive visualization

API Key Setup

Set your Anthropic API key:

export ANTHROPIC_API_KEY='your-api-key-here'

Or pass it directly:

vw.create(
    "a bar chart of sales by region", 
    df, 
    api_key="your-api-key-here"
)

Saving to File

vw.create(
    "an interactive line chart showing trends over time",
    df,
    output_path="output/visualization.html"
)

Development

Install with dev dependencies:

pip install -e ".[dev]"

Run tests:

pytest

Lint and format:

ruff check .
ruff format .

Type checking:

mypy src/

Features

  • 🚀 Modern Python packaging (pyproject.toml, src layout)
  • 🤖 LLM-powered visualization generation
  • ⚛️ React-based interactive widgets
  • 📊 Pandas DataFrame integration
  • 🔧 Extensible LLM provider system

License

MIT

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

vibe_widget-0.2.0.tar.gz (7.5 MB view details)

Uploaded Source

Built Distribution

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

vibe_widget-0.2.0-py3-none-any.whl (45.8 kB view details)

Uploaded Python 3

File details

Details for the file vibe_widget-0.2.0.tar.gz.

File metadata

  • Download URL: vibe_widget-0.2.0.tar.gz
  • Upload date:
  • Size: 7.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for vibe_widget-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a9e6d6a6bdf692c935fc48c1fc00c7cf1b3971cd58b7ad134a931dcf756a8d8c
MD5 c2681864a55a2c204a787f3fe2074816
BLAKE2b-256 86a8189b4f6c6d2082db25daa2fb885a2bc7a2794d3f234afec6993442e1da12

See more details on using hashes here.

File details

Details for the file vibe_widget-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: vibe_widget-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 45.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for vibe_widget-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58ba16c15b82335902e81e132266f125dfdcbc7eee078873ff88132e71fafda1
MD5 0d784a00cc1c3777ec58f7c900c1ffd0
BLAKE2b-256 1554832afeb89061c7eca285b336c727bc99614c51c5fc4af435c758e4aca75e

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