title: How to slow down asynchrounous API calls to match API limits?
body: <p>I have a list of ~300K URLs for an API i need to get data from. </p>
  
  <p>The API limit is 100 calls per second. </p>
  
  <p>I have made a class for the asynchronous but this is working to fast and I am hitting an error on the API. </p>
  
  <p>How do I slow down the asynchronous, so that I can make 100 calls per second? </p>
  
  <pre><code>import grequests
  
  lst = ['url.com','url2.com']
  
  class Test:
      def __init__(self):
          self.urls = lst
  
      def exception(self, request, exception):
          print ("Problem: {}: {}".format(request.url, exception))
  
      def async(self):
          return grequests.map((grequests.get(u) for u in self.urls), exception_handler=self.exception, size=5)
  
  
  
      def collate_responses(self, results):
          return [x.text for x in results]
  
  test = Test()
  #here we collect the results returned by the async function
  results = test.async()
  response_text = test.collate_responses(results)
  </code></pre>