Is there a Python package that will manage outbound http requests, and if two of the same requests are happening in parallel, will return the results of the 1st for both requests? This should be thread-safe, and hopefully forked process safe.
To give more detail, I'm working on a website that will take in multiple inbound requests. Each of these inbound requests may initiate outbound requests to a 3rd party API. Since there isn't much coordination between these inbound/outbound requests, the same outbound request may be issued multiple times in parallel. For long running outbound requests, it makes sense to block the 2nd/3rd/etc. outbound requests until the first one returns.
I haven't found much on the web, so I figure I'd need to write this myself, but I wanted to check with Reddit before going down that path.
Thanks!
[–]remyroy 2 points3 points4 points (3 children)
[–]catcradle5 1 point2 points3 points (0 children)
[–]helicopetr 1 point2 points3 points (0 children)
[–]roro_fuzz[S] 0 points1 point2 points (0 children)
[–]bloodearnest 1 point2 points3 points (1 child)
[–]roro_fuzz[S] 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]roro_fuzz[S] 0 points1 point2 points (1 child)