A Streamlit component for rendering process flowsheet diagrams with interactive selection
Project description
Streamlit Flowsheet Component
A Streamlit component for rendering interactive process flowsheet diagrams with node selection capabilities.
Features
- Interactive process flowsheet visualization with ReactFlow
- Node selection with detailed properties panel
- Collapsible navigation panel for easy node browsing
- Theme-aware (automatically adapts to Streamlit light/dark themes)
- Configurable display options (navigation panel, properties panel, node borders)
- Returns selected node data to Streamlit
Installation
pip install streamlit-flowsheet
Usage
import streamlit as st
from streamlit_flowsheet import render_flowsheet
import json
# Load your flowsheet data
with open("flowsheet_data.json", "r") as f:
flowsheet_data = json.load(f)
# Render the flowsheet
selected_node = render_flowsheet(
data=flowsheet_data,
show_navigation_panel=True,
show_properties=True,
show_border=True,
height=800
)
# Handle selection
if selected_node:
st.write(f"Selected: {selected_node[0]['name']}")
Parameters
data(dict): Flowsheet data in the CDF Simulator Model Revision Data formatshow_navigation_panel(bool): Show/hide the left navigation panel (default: True)show_properties(bool): Show/hide the properties panel on node selection (default: True)show_border(bool): Show/hide node borders (default: True)height(int): Component height in pixels (default: 800)
Development
Setup
cd streamlit-flowsheet
poetry install
cd streamlit_flowsheet/frontend
npm install
Build Frontend
cd streamlit_flowsheet/frontend
npm run build
Build Package
poetry build
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
streamlit_flowsheet-0.1.0.tar.gz
(20.6 MB
view details)
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 streamlit_flowsheet-0.1.0.tar.gz.
File metadata
- Download URL: streamlit_flowsheet-0.1.0.tar.gz
- Upload date:
- Size: 20.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.9 Darwin/25.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10025034e8ceca454f49aabc2d649d197a1f8904a1253e85e94f3623debddefa
|
|
| MD5 |
d9cb023d7bef990583852e16753566e8
|
|
| BLAKE2b-256 |
6bf38ea2b5bf9a7755a61cf9244c485cdbafd51749b39739cbf4c666baf482e6
|
File details
Details for the file streamlit_flowsheet-0.1.0-py3-none-any.whl.
File metadata
- Download URL: streamlit_flowsheet-0.1.0-py3-none-any.whl
- Upload date:
- Size: 29.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.9 Darwin/25.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c5b100565f8497c53781862d744632af809a563c37e19d83be35b65d64f3be0
|
|
| MD5 |
af498cdda1717560ad78e5e7a92855b3
|
|
| BLAKE2b-256 |
e674705e5cee971ae95874e20caa1d652b2c8d4a598a094bfd680326bce52e68
|