krish-adi / barfi

Python Flow Based Programming environment that provides a graphical programming environment.
https://barfi.readthedocs.io
MIT License
672 stars 73 forks source link

"hidden" inputs/outputs? #3

Closed zabrewer closed 2 years ago

zabrewer commented 2 years ago

Is there an option for hidden inputs or outputs? meaning a default input/output that is carried down each block without the user interaction?

krish-adi commented 2 years ago

Hey @zabrewer,

Interesting option. Haven't actually thought about that. Do you have a specific use case in mind? So I can design the option around it.

zabrewer commented 2 years ago

@krish-adi - I needed to access a dynamic api_session (e.g. initial connection to an API that comes from another library) to make other calls using that connection but after testing I believe I can store the object in streamlit's st.session and access it in each downstream execution block from st.session.

Users after the initial invitation should not see the session but I needed to re-access it rather than setting up a new TCP connection to the API every time.

I love this project and appreciate your work.

krish-adi commented 2 years ago

Thanks @zabrewer .

Your implementation of passing down state is better than passing it down through a hidden variable.