dkapur17 / streamlit-flow

Streamlit Component to quickly create Interactive Flow Diagrams using React Flow
https://stflow.streamlit.app
MIT License
123 stars 11 forks source link

Add new property to nodes, function #25

Open jifcon opened 1 month ago

jifcon commented 1 month ago

I think it could be really useful to add one new property to the nodes, something like "function". If you inform a function name (code or part of the script) and there is a way to extract number and function in a dictionary o similar then we could use the flow to create a real data flow tool, and run it executing nodes in order and functions attached and it would have a similar functionality vs Knime or Orange3 or an ETL like tool, but under Streamlit.

Many thanks for your knowledge and effort!

dkapur17 commented 4 weeks ago

Hi @jifcon. Thanks for the suggestion. I'm not really sure how this would be integrated into the current library. Would the functions be defined in the python code and passed to the nodes in a constructor? Or would they be defined by the user somehow on the canvas? If it is defined in code, then does that mean the user only has access to certain types of nodes while building the flow on the canvas, each linked to a predefined function in the code? Or is it that in this way the user doesn't actually build the flow, but can only visualize it as the code runs on the server? Would love to hear more details about this.