Skip to main content

A Textual TUI for beautiful terminal data visualization from files, REST endpoints and more.

Project description

Ecstacy

Ecstacy

Beautiful data, right in your terminal.

CI PyPI version Downloads Python versions License Stars Forks Code style: ruff Made with Textual

Ecstacy is a Textual TUI for visualizing data from local files, REST endpoints, SQL, and WebSockets -- with charts, tables, sparklines, gauges, heatmaps and a JSON explorer. Any source feeds any visualization through a typed DataSet contract, and dashboards compose multiple panels from a single YAML file.

Splash screen

Splash screen
Home screen

Home screen
Sparkline chart

Sparkline chart
JSON explorer

JSON explorer

Install

pip install ecstacy

Then launch it:

ecstacy

You can also run it directly with uv from a clone of this repo:

uv sync
uv run ecstacy

Quick start

Open a file directly:

ecstacy file sample.csv --chart line
ecstacy file data.csv --chart bar --x region --y value
ecstacy file metrics.parquet --chart table --max-rows 1000
ecstacy file sheet.xlsx --sheet data --chart table

Auto-refresh a live source:

ecstacy file metrics.csv --refresh 5s --chart line
ecstacy rest https://api.example.com/metrics --refresh 10s --chart table

Press r to manually refresh the current chart.

Pipe data in from stdin:

cat data.csv | ecstacy file -
curl -s https://api.example.com/items.json | ecstacy file - --format json

Go headless -- print rows or export without launching the TUI:

ecstacy file data.csv --head 20
ecstacy file data.csv --tail 5 --export csv > out.csv
ecstacy rest https://api.example.com/items --export json > out.json
ecstacy file data.csv --export markdown > out.md

Query a REST endpoint:

ecstacy rest https://api.example.com/items --json-path data.items --chart table

Run a DuckDB SQL query:

ecstacy sql "select 1 as a, 2 as b" --chart table
ecstacy sql "select * from 'data.csv'" --db :memory: --chart line

Run a SQLite query:

ecstacy sqlite "select * from metrics" --db app.db --chart table

Stream from a WebSocket:

ecstacy socket ws://localhost:8765 --chart table

Open a multi-panel dashboard:

ecstacy dashboard ops.yaml

Inspect available themes, charts, or your config path:

ecstacy themes
ecstacy charts
ecstacy config path

Sources

Source Formats / protocol
file CSV, TSV, JSON, NDJSON, Parquet, log/text, Excel (xlsx)
stdin ecstacy file - -- CSV, TSV, JSON, NDJSON, log from pipe
rest HTTP/HTTPS JSON endpoints with dotted json-path
sql DuckDB queries (in-memory or file-backed)
sqlite SQLite queries (in-memory or file-backed)
socket WebSocket streaming JSON records

Visualizations

table (sortable, searchable, column picker, export), line, bar, histogram, scatter, sparkline, gauge, heatmap (correlation matrix), box plot, pie chart, summary card (count/mean/median/std/min/max), json tree.

Keys

Home: o open, d dashboard, t theme, ? help, q quit. Chart: n/right next chart, p/left previous chart, / query/transform, r refresh, t theme, esc back. Table: s sort by column, / focus search, c column picker, e export view, type to filter, esc clear. Dashboard: m toggle grid/single layout, n/p cycle panels, esc back.

Configuration

Ecstacy layers configuration in this order (later wins):

  1. Built-in defaults.
  2. User config: $XDG_CONFIG_HOME/ecstacy/config.yaml (or ~/.config/ecstacy/config.yaml).
  3. Project config: ./ecstacy.yaml in the current directory.
  4. Environment variables prefixed ECSTACY_ (e.g. ECSTACY_THEME=ecstacy-light).
  5. CLI flags.

On first run Ecstacy auto-creates the user config directory and a default config.yaml (it never overwrites an existing one).

Example config.yaml:

theme: ecstacy-dark
refresh: 0s
splash: true
max_rows: 1000

Dashboards

A dashboard YAML describes sources and panels. Each panel binds a source to a visualization with an optional column mapping. Source paths are resolved relative to the dashboard file, so dashboards are portable.

theme: ecstacy-dark
refresh: 5s
sources:
  - id: metrics
    kind: file
    path: ./sample.csv
panels:
  - source: metrics
    viz: line
    x: timestamp
    y: [revenue, margin]
  - source: metrics
    viz: bar
    category: region
    value: revenue

When refresh is set, dashboard panels re-fetch on that interval. Press m to switch between grid and single-panel layouts.

Architecture

  • core -- DataSet contract, plugin registry, transforms, store, scheduler.
  • sources -- file, rest, sql, sqlite, socket -- all registered plugins.
  • widgets -- visualization widgets, registered plugins.
  • screens -- splash, home, chart, dashboard, modal, help.
  • config -- defaults, Pydantic schema, layered config loader.
  • theming -- Textual themes and the global stylesheet.

Sources resolve to a typed DataSet (DataFrame + schema + meta). Widgets bind to a DataSet and a column mapping, so any source can feed any visualization.

Extending

Add a source by subclassing Source and decorating it with @registry.sources.register("name"). Add a visualization by creating a widget with a set_data(dataset, mapping) method and decorating it with @registry.viz.register("name").

Known limitations

  • Export is stdout-only (CSV/JSON/Markdown); no PNG/SVG yet.
  • No clipboard, Prometheus, InfluxDB, or Google Sheets source yet.
  • WebSocket streaming UI not yet implemented (batch fetch only).

License

MIT. See LICENSE.

Changelog

See CHANGELOG.md.

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

ecstacy_tui-0.4.0.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

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

ecstacy_tui-0.4.0-py3-none-any.whl (48.6 kB view details)

Uploaded Python 3

File details

Details for the file ecstacy_tui-0.4.0.tar.gz.

File metadata

  • Download URL: ecstacy_tui-0.4.0.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ecstacy_tui-0.4.0.tar.gz
Algorithm Hash digest
SHA256 21030b923ec79e1d5646c2744982e773641d0bad03b1cb6beaed828ec0031350
MD5 1c5fc412d9644d06c5fc7fc5b2de690a
BLAKE2b-256 d5851fc13b3714434a3ee8c5f566daa76c95911dfb18fa9aaf9f7a533eae9b73

See more details on using hashes here.

File details

Details for the file ecstacy_tui-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: ecstacy_tui-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 48.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ecstacy_tui-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a34c01001104bcdf2d96531a4c8584b3f8487f7d330854e610219577218d62e
MD5 d9e89134de1d249f2c3383081b87d226
BLAKE2b-256 77c7c5d012ed612c476aa472475e4b552635277a12a005d7082783f37d5eb45c

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