dashipopashi
v0.0.15
Published
An experimental library for integrating interactive charts into existing JavaScript applications.
Downloads
915
Maintainers
Readme
dashi
Dashi is a JavaScript library that allows configuring server-side widgets and plugging them into existing web frontends.
Note, this library is experimental and under development still.
How it is supposed to work
Users write the widgets in, e.g. Python, and a REST server implements three endpoints to publish the widgets:
GET /contributions
: Called once after application UI starts up. Returns an object whose keys are contribution points (e.g., "panels") and whose values are arrays of contribution objects.POST /layout/{contribPoint}/{contribIndex}
: Called once for every contribution when it becomes visible in the UI. Returns the contribution's initial component treePOST /callback
: Called when users interact with the component tree or on application state changes. Returns an array of contribution changes where each contribution change contains an array of actions to be applied to the component tree.
The following sequence diagram depicts how the library is supposed to work. The top shows the JavaScript frontend that uses this library. The bottom shows the lifeline of the backend REST server.
How to run the demo
git clone https://github.com/bcdev/dashi.git
Run the server
cd dashi/dashipy
conda env create
conda activate dashi
pip install -ve .
python -m dashipy.demo.server
Run the UI
cd ../dashi
npm install
npm run dev