Hi , as I checked, the psycopg2 library is used for interacting with Postgres. It is implemented mostly in C to support multithread environment, which might not be compatible with Pipedream.
Could you try to use Pipedream builtin Postgres actions?
I understand what you are requesting and in a few workflows I have been. I’ll have to think through my current workflow. It is python that has gathered a CSV and needs to iterate every row (500+) and check or update values in the db. So doing this within Python code is preferred.
I’ve started looking at what other postgres python libraries there are to see if one of those will work.
It seems I’m able to get asyncpg to work, at least in synchronous mode, probably not in asynchronous mode.
I was getting some errors withpg8000 and py-postgresql . pg8000 may have been some issue with SSL and py-postgresql looks like some error with something under the hood in Pipedream as the error was pointing out invalid syntax (__init__.py, line 3)
grrr…trying to either make asyncpg operate synchronously or to make the Pipedream python code work async and I’m over my head on either. ChatGPT (my coding buddy!) is trying too, just not getting the right thing.
Interesting note. If I change **def** handler(pd: "pipedream"): to async**def** handler(pd: "pipedream"): and test the code block, it quickly returns Success, but it clearly didn’t run anything. I wonder if there should be an error or message about not find or running handler(pd).