PyFlow icon indicating copy to clipboard operation
PyFlow copied to clipboard

Generate python code

Open Sup3rGeo opened this issue 7 years ago • 4 comments

Hi!

Is it available or planned anything like generating python code from the diagram?

Thanks

Sup3rGeo avatar Mar 18 '19 18:03 Sup3rGeo

Yes it is on road map for version 2, currently under development!

pedroCabrera avatar Mar 18 '19 19:03 pedroCabrera

@Sup3rGeo yes, but this will not be a normal python code. But special api, which is doing real work under the hood. However, generation normal python code is also will be possible, and we will provide examples

IlgarLunin avatar Mar 19 '19 08:03 IlgarLunin

Thanks, that's great news.

In fact, if PyFlow supports having any python function from any importable python module as nodes, and if it generates just plain python code out of the connections, then it will be able to work (without any kind of additional integration) for any application where some python scripting might be needed but users typically don't enjoy writing code (e.g. Test automation).

Sup3rGeo avatar Mar 19 '19 08:03 Sup3rGeo

I posted an issue (#82) suggesting a function definition system to add functions as nodes quickly and easily. It would allow adding not just python but other languages as well.It would essentially allow pyflow to act as a full IDE.

Basically an Asset library and a function library. One would contain the main functions of a language and the other contains a folder tree of installed libraries with a list of it´s functions.

The definitions file would either have to automatically convert arguments to node inputs or someone would have to replace the arguments with some kind of placeholder code like: function doSomething(<inputA, argumentName, string>,<inputB, argumentName, int>){ some code return=<outputA, argumentName, string>; }

That would take time but I think pyflow would be so useful with this feature plenty of people would be willing to create definitions for libraries. A language like C or C++ only has a few hundred functions so in a couple hours it could then be added to the editor.

excitedbox avatar Feb 17 '20 15:02 excitedbox