DEV Community


Python Pattern Design Help!!!

・1 min read

I am developing a service at work that generates a report on a weekly basis. The api I use to get the data can take a while so rather than blocking, the api returns a new url to the soon-to-be-completed report that I have to poll until the data returns. To generate my report, I have to make 5 calls to this api. In addition, data from 3 of the calls are related as they have to be combined and massaged to create a particular section of the my report. The data from the other 2 api calls can be copied to the report as returned. I was wondering what type of pattern should I use here. Async polling?

Discussion (0)