Hey folks simple smile
We want to trigger a Prefect flow from another Python app….which is written in Python 2 😅 , hence we cannot use Prefect Client.
What approach would you suggest?
t
Tyler Wanner
05/12/2021, 3:51 PM
Hiya Ale! We don't have great support for custom "clientless" requests atm, but you could (depending on scale requirements and complexity) set up a python3 server like a live client passthrough,. The client constructs the requests and sends them to the API in a way that it can understand and trust(ish). I've used curl to trigger flows just fine, yet others have had trouble getting their requests to pass heavier requests past Cloud's endpoint protection tooling
Tyler Wanner
05/12/2021, 3:52 PM
you could set up a serverless function to use as that client layer
c
Chris White
05/12/2021, 4:26 PM
Hey @ale - you can definitely achieve this by preparing the request yourself, similar to this: https://github.com/cicdw/prefect-cloud-lambda/blob/master/lambda_handler.py
Note that in the example I linked, you’ll need to change all the camelCasing to -> snake_casing but otherwise it should work as-is
a
ale
05/12/2021, 4:27 PM
Hey @Tyler Wanner & @Chris White 🙂
Thanks for your reply folks!
Much appreciated 💪
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.