hmenyus / node-calls-python

Call Python from NodeJS directly in-process without spawning processes
MIT License
252 stars 26 forks source link

Support callback arguments #92

Open chfritz opened 4 days ago

chfritz commented 4 days ago

For the application I'm working on, it would be hugely beneficial if the arguments passed to call could include a callback that would be called at arbitrary times from the python code. Specifically we would like to use this for progress updates from a long-running python function.

Clearly there are some workaround, e.g., https://github.com/hmenyus/node-calls-python/issues/83#issuecomment-2101075120, or other, secondary communication mechanisms. But just like node-calls-python itself is motivated by the desire to avoid IPC and other such inter-process communication, it would be nice to be able to avoid the same for more fluent communication between python and node for the duration of the call.

hmenyus commented 3 days ago

Ok, noted. I will try to do something