I’ve got a scenario in which I need to be able to make an API post asynchronously with a method that involves uploading a file to a server, returning a url, and operating on it. I’ve got this working as it should with the python requests library. I’ve also got other requests library posts working asynchronously with the wonderful TDAsyncIO tox, but it doesn’t seem to work properly with media uploads (or at least I haven’t been able to find a way).
I’ve tried to find other ways to do this with requests, but none of them seem to format the file properly as request.post files argument does. I couldn’t seem to get the webclientDAT to do this either.
I finally did get a semi-functional async upload happening by wrapping the whole damn thing in an Engine comp, but that became a silly regex thing of pushing dictionaries in as text strings and re-combobulating them. I’m hoping for a better Derivative endorsed workaround that doesn’t require an end user to configure pip installs or deal with an EngineCOMP to achieve this relatively common API call. Anyone got any ideas?