✨ Darsh
Data analytics, without the ceremony.
Extremely simple on the surface. Extremely powerful underneath.
You have data. You want a world-class, responsive dashboard. You probably don't want to spend your evening fighting with HTML, CSS, JavaScript, WebGL configuration, and 400 lines of boilerplate callbacks.
import darsh as da
data = da.load("sales.csv").clean()
da.dashboard(data)
da.get_app().run(port=8501)
No HTML. No CSS. No JavaScript. Zero ceremony.
⚡ Installation
pip install darsh
👉 Looking for recipes and guides? Check out HOW_TO_USE.md
🧠 The Visual Analytics Mental Model
Just like in Power BI, different charts answer different business questions. The golden rule to remember:
Bar = Compare | Line = Trend | Pie = Share | Scatter = Relationship
| Question | Visual Type | Core Purpose | Real-World Example |
|---|---|---|---|
| Which is bigger? | 📊 Bar Chart | Compare discrete categories | Sales by Product |
| Is it changing? | 📈 Line Chart | Track continuous trends over time | Monthly Revenue Trajectory |
| What's my slice? | 🥧 Pie / Donut | Parts of a whole (share %) | Market Share by Category |
| Are they linked? | 🔵 Scatter Plot | Discover correlation & clusters | Advertising Spend vs Sales |
🚀 Feature Highlights
- ⚡ Zero-Boilerplate Web App: Generates a high-performance, responsive web application directly from Python.
- 🌙 Native Dark & Light Themes: Deep space glassmorphic dark mode with interactive instant switcher (or
Cmd+D). - 📱 Streamlit-Style Off-Canvas Sidebar: Smooth collapsible drawer with mobile backdrop blur and keyboard shortcut (
Cmd+B). - 🔄 Real-Time Cross-Filtering: Dropdowns, sliders, and search inputs filter every chart on the canvas simultaneously.
- 🖱️ Interactive Mouse Navigation: Full mouse-pointer scroll zooming (
scrollZoom), click-and-drag panning, and double-click zoom reset. - 📋 Interactive Data Tables: Paginated, searchable tables (
da.table(df)). - 📈 Matplotlib & Plotly Power: Multi-line series, custom markers, line shapes (
spline/linear), custom axes, and dimensions (height&width). - 🌐 3D WebGL Visualization: Hardware-accelerated 3D scatter, line, and bar topology plots with rotational drag.
📖 Complete API Reference & Guide
1. Data Ingestion & Auto-Cleaning
# Load local CSV or remote URL
data = da.load("sales.csv")
# Wrap existing DataFrame
data = da.data(df)
# Automatic cleanup (missing values, duplicates, datetimes)
clean_df = da.load("sales.csv").clean().pandas()
2. App Setup & Layout Utilities
da.initialize(title="Dashboard", layout="wide", theme="light")
layout:"centered"(1350px width) or"wide"(100% full-screen canvas).theme:"light","dark", or"auto".
da.page_header(title, subtitle=None, accent_color="#007AFF", badge="🟢 Live")
Adds an Apple-styled top banner with title, subtitle, accent bar, and status badge.
da.header(text) & da.subheader(text)
Hierarchical section headings.
da.row(children)
Responsive horizontal flex grid.
da.table(df, title="Explorer", page_size=8)
Renders an interactive, paginated data table.
3. Reactive Sidebar & Cross-Filtering
da.sidebar([
da.sidebar_header("Global Filters"),
da.select_filter("Region", column="Region", options=["North America", "Europe", "Asia"]),
da.select_filter("Product", column="Product", options=["Hardware", "Software", "Services"]),
da.sidebar_divider(),
da.range_slider("Max Server Load", column="Server Load (%)", min_val=0, max_val=100, step=5),
da.search_filter("Search Regions", column="Region", placeholder="Type region name..."),
da.sidebar_divider(),
da.sidebar_text("Press Cmd+B to toggle sidebar, Cmd+D for Dark Mode.")
], title="Command Center", width=280, collapsed=False)
4. KPI Metric Cards
da.row([
da.metric("Total Revenue", "$48,250,000", delta="+18.5%"),
da.metric("Customer Churn", "1.2%", delta="-0.4%"),
da.metric("Net Promoter Score", "74", delta="+6 pts", delta_color="#5856D6")
])
5. 2D Interactive Charts
📈 Line Charts (Multi-Line & Markers)
# Multi-line with list of Y columns
da.line_chart(
df,
x="Month",
y=["Revenue", "Operating Cost", "Net Profit"],
colors=["#007AFF", "#FF9500", "#34C759"],
markers=True,
marker_size=6,
line_width=3.0,
title="Financial Performance Trajectory",
height=400
)
# Grouped multi-line by category
da.line_chart(
df,
x="Date",
y="Active Users",
color="Product", # Automatically plots 1 line per Product!
markers=True,
title="Active Users by Product Line"
)
📊 Bar Charts (Vertical, Horizontal, Stacked, Clustered)
da.bar_chart(df, x="Region", y="Revenue", color="#007AFF", orientation="v")
da.stacked_bar_chart(df, x="Quarter", y=["Hardware", "Software"], colors=["#007AFF", "#34C759"])
🥧 Pie & Donut Charts
da.donut_chart(df, labels="Category", values="Sales", hole=0.45, colors=["#007AFF", "#5856D6", "#FF9500"])
🔵 Scatter & Bubble Plots
da.scatter_chart(df, x="AdSpend", y="Sales", color="Region", size="CSAT", marker_size=10)
6. 3D WebGL Charting Engine
da.scatter_3d(df, x="Users", y="Load", z="CSAT", color="Product", title="3D System Telemetry")
da.line_3d(df, x="Date", y="Revenue", z="Users", color="#007AFF", title="Growth Trajectory 3D")
da.bar_3d(df, x="Region", y="Product", z="Revenue", colorscale="Blues", title="Revenue Matrix 3D")
7. Automatic Magic Dashboard
data = da.load("sales.csv").clean()
da.dashboard(data)
da.get_app().run(port=8501)
👨💻 Creator & Maintainer
Darsh was created by Satyam Rana, a Full-Stack Engineer, AI Practitioner, and Educator passionate about crafting high-performance developer tools and beautiful data systems.
📄 License
Darsh is open-source software licensed under the MIT License.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file darsh-0.3.0.tar.gz.
File metadata
- Download URL: darsh-0.3.0.tar.gz
- Upload date:
- Size: 26.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4372f37c062d6ced5d49da3afa98fde351038e66c03bed17a0bbdd4d4c8abe7
|
|
| MD5 |
625c12604110bce1aa81b1f94f8a010c
|
|
| BLAKE2b-256 |
03b686b4210b5e54cf282d9fde4e91f4ca57b19a1b3ff2c665f0153af2adcaf4
|
File details
Details for the file darsh-0.3.0-py3-none-any.whl.
File metadata
- Download URL: darsh-0.3.0-py3-none-any.whl
- Upload date:
- Size: 20.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed5866bf98673ca6fc119c14552f91cb13d5e0216a8c6e04d0a96545afb8a723
|
|
| MD5 |
b30708871b6950b8171f378ad26f89bf
|
|
| BLAKE2b-256 |
2d0a446879abbde3a58214a1fd4b4f2a6eaac1b4580a8548b46039c0dafbf45c
|