Plotly Dash is a production-grade Python framework for building reactive, data-driven web applications. It provides a declarative callback system (server-side, clientside, background, streaming), a rich component library (core components, data table, HTML wrappers), and a React/Redux frontend renderer. The architecture supports multiple backends (Flask, Quart, FastAPI), real-time communication via WebSocket, cross-process shared storage (local, diskcache, Redis), and an MCP (Model Context Protocol) server for AI/LLM integration. The monorepo includes component generation tooling, extensive testing infrastructure (unit, integration, visual, WebSocket, background callback), and performance benchmarks. While primarily an application framework, its data table, filtering syntax tree, and shared storage subsystems demonstrate strong data engineering patterns.
Redash is a full-stack business intelligence platform that enables users to connect to multiple data sources, write and schedule queries, build interactive visualizations, and create dashboards with alerting and sharing capabilities. The backend is a Python Flask application with SQLAlchemy for database access, Redis for caching and task queuing, and RQ for background job execution. The frontend is a React single-page application using Ant Design, Plotly, D3, and Leaflet, organized into pages for queries, dashboards, alerts, data sources, and administration. The system exposes a RESTful API for all operations and supports authentication via password, Google OAuth, SAML, LDAP, JWT, and API keys. The architecture follows a modular plugin pattern for query runners and visualizations. Over 35 query runners (e.g., PostgreSQL, BigQuery, Snowflake, MongoDB, Prometheus) are registered via a common base class, each implementing run_query, get_schema, and configuration_schema. The visualization library (viz-lib) is a separate package that registers chart types (line, bar, pie, map, table, cohort, sankey, etc.) with editors and renderers. Dashboards use a grid layout with widgets that can display visualizations, text, or embedded content. Alerts evaluate query results against conditions and send notifications to destinations like Slack, email, PagerDuty, and webhooks. Key data flows: users write SQL or use query runners to fetch data from connected sources; results are cached and can be visualized; dashboards aggregate multiple visualizations with parameter bindings; scheduled queries refresh results and trigger alerts. The system also supports embedding visualizations in external sites and public sharing of dashboards. While primarily an application, the extensive query runner and visualization plugin systems make it a flexible platform for data exploration and operational reporting.
Kaleido is a Python library for static image export of Plotly figures (PNG, SVG, PDF, etc.) by rendering them in a headless Chrome browser via the DevTools protocol. The library provides both async and sync APIs, with an optional singleton server mode for reuse across calls. It manages a pool of browser tabs for parallel rendering, supports chunked JSON transfer for large figures (>10MB), and includes profiling capabilities. The architecture is centered around the `Kaleido` class, which orchestrates browser lifecycle, tab allocation, and rendering through `_KaleidoTab` instances. The library is consumed by Plotly.py and can be used standalone or via CLI tools (`kaleido_mocker`, `kaleido_get_chrome`). Dependencies include `choreographer` (Python-DevTools bridge), `orjson`, and `logistro`. The test suite includes extensive integration tests with hundreds of Plotly figure mocks covering a vast range of trace types and layout features.