Skip to main content

energydb-inspect

A local visual inspector for energydb: a read-only dashboard over your Postgres + ClickHouse showing the asset tree, timeseries plots, a map of the assets, and the raw rows plus the SQL "under the hood".

The energydb-inspect dashboard: the asset tree, the timeseries plot for a selected series, the map of asset footprints, and the SQL under the hood

Inspect your energydb

Point it at any energydb. It is strictly read-only by default, so it is safe against production:

uvx energydb-inspect --pg-dsn postgresql://… --ch-url http://…
# or: pip install energydb-inspect && energydb-inspect --pg-dsn … --ch-url …

The dashboard opens at http://localhost:8000.

You can also pass the connection via the environment or a .env in the working directory. Prefer this for real credentials, so they don't show up in ps/shell history:

# .env
TIMEDB_PG_DSN=postgresql://…
TIMEDB_CH_URL=http://…
uvx energydb-inspect

Try it on a throwaway database

Spin up energydb's local-db (in the energydb repo, under local-db/):

docker compose up -d        # Postgres :5433 + ClickHouse :8123

Point the inspector at it. INSPECT_WRITABLE=1 enables the Reset button against the throwaway DB:

# .env
TIMEDB_PG_DSN=postgresql://postgres:devpassword@localhost:5433/devdb
TIMEDB_CH_URL=http://default:devpassword@localhost:8123/default
INSPECT_WRITABLE=1
uvx energydb-inspect        # dashboard at http://localhost:8000 (empty until you add data)

To fill it with a demo portfolio, run the example notebook below and watch the dashboard update live.

INSPECT_WRITABLE only works against a local database; to enable it against a remote host, also set INSPECT_TRUSTED_DB=1.

The example notebook

The repo ships a guided marimo notebook, energydb_inspect/notebooks/demo.py, that builds the demo portfolio step by step. It is run separately with marimo (from a checkout):

uv run --extra notebook python -m marimo edit energydb_inspect/notebooks/demo.py

It opens at http://localhost:2718. Run the cells top to bottom against a writable database (the local-db above) and watch the tree, map and plots fill in live in the dashboard.

Develop from source

git clone https://github.com/rebase-energy/energydb-inspect && cd energydb-inspect
uv sync

Run the backend (read-only API; also serves the built dashboard if web/dist has been bundled into energydb_inspect/_static) and the Vite dev server (hot reload) in two terminals:

INSPECT_WRITABLE=1 uv run python -m uvicorn energydb_inspect.app:app --reload --port 8000
cd web && npm install && npm run dev        # http://localhost:5173

On NixOS, bun/node may not be on PATH; use nix shell nixpkgs#bun -c bun run dev.

Web demo (in-browser, no database)

A zero-backend build of the dashboard exists for hosting a public "what is energydb" demo. See docs/HOSTING.md.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

energydb_inspect-0.8.0.tar.gz (32.8 MB view details)

Uploaded Source

Built Distribution

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

energydb_inspect-0.8.0-py3-none-any.whl (509.3 kB view details)

Uploaded Python 3

File details

Details for the file energydb_inspect-0.8.0.tar.gz.

File metadata

  • Download URL: energydb_inspect-0.8.0.tar.gz
  • Upload date:
  • Size: 32.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for energydb_inspect-0.8.0.tar.gz
Algorithm Hash digest
SHA256 0adb4e5c88212810f786d0dc3b7943fb73d650dd1b0b8ca42028a2a8159b2302
MD5 32a2d7d40db455f1719fcac2cf644aa5
BLAKE2b-256 0e24b90372a5fc99e6cffe55a75bc1f106e39ceec7be1c411e62e65d53468811

See more details on using hashes here.

Provenance

The following attestation bundles were made for energydb_inspect-0.8.0.tar.gz:

Publisher: publish.yml on rebase-energy/energydb-inspect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file energydb_inspect-0.8.0-py3-none-any.whl.

File metadata

File hashes

Hashes for energydb_inspect-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 77e2c259dac03b6f4e6e089687e076704200061463c9d8a156eba8b43c7a43e2
MD5 3e982d549b1dcd698dcd85e8b0dae19e
BLAKE2b-256 5399de8c8e5ad3efc1a78bb4693c1c7ebac0e745097d89f045435354bc8b119b

See more details on using hashes here.

Provenance

The following attestation bundles were made for energydb_inspect-0.8.0-py3-none-any.whl:

Publisher: publish.yml on rebase-energy/energydb-inspect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page