workflow can solve it, but I have no idea for it? Can you help me?
well, you need to overengineer it!
Thanks for you quick reply. Can you show me some code snippets or give me some hints about it? Any help will be as always appreciated.
execute python script as child process or as external 3rd party (api)
I don’t know how to execute the scripts as child process, can you show me some snippets or snapshots? Any help will be really appreciated.
you’ll create a server-script(in coredor) that runs python as child process
Thanks for your reply, I will try to learn it.
Basically what @munawir said.
I am new to Corteza.
It seems awesome with lot of flexibility, which makes my life lot easier.
Is there any milestone to implement Python for automation script?
There’s no implemented direct callout to python/bash scripts and I haven’t seen in on Corteza’s roadmap either.
There are a few ways I can think of to accomplish what you’re asking.
In my opinion the cleanest/easiest way would be to write a cloud function (using AWS lambda for example) in python, and then call it from a corteza workflow using the http step. Keep in mind that you’d need to secure the endpoint with some kind of authentication (or if possible whitelisted inbound ip addresses).
Thanks for your answer @shmuel .
It seems that I ‘have to’ do some over engineering.
To be cost effective, I am gonna selfhost python functions on other docker on same server. and invoke them with
That also makes sense.
Another option as mentioned here: Customize or script using golang? - #2 by darh is to implement your own automation server using python/grpc. I’m sure it would be a welcome contribution to the community but that would be a lot more work than what you’re suggesting.
Also, in my experience, simple rest web calls are easier to implement and debug than grpc (which is the protocol that the corteza server uses to communicate with the automation server)
I will stick to your first suggestion. Because I am more comfortable to do REST and also server side jobs.
Thanks for mentioning the alternative way.