'GET and POST a list with 1 million json objects in python

I am making a GET call to an API EP which will return me a list of json objects. The total count of json objects is 1 million. The header will indicate this count. I will be making multiple API calls to get the million json objects. I need to POST this 1 million json objects back to a different EP. What is a good way of implementing this ? Do I need to fetch all response first and then POST them ? Will this not mean holding a list with 1 million json object in Memory ? or can I POST while I am getting back the GET response parallelly ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source