I have a simple loop like so: ``` python for i, subscriber in enumerate(account.findSubscribers()): print i, subscriber.id, subscriber.name, subscriber.email ``` which is constantly rate limited because the library is making requests too quickly. I'm having to either resort so some ugly monkey patching: ``` python #### MONKEY PATCH AWeberCollection._original_load_page_for_offset = AWeberCollection._load_page_for_offset def new_load_page_for_offset(self, offset): sleep(0.25) AWeberCollection._original_load_page_for_offset(self, offset) AWeberCollection._load_page_for_offset = new_load_page_for_offset #### MONKEY PATCH ``` or adding a delay at perhaps `i % 100`. Any better solutions?
I have a simple loop like so:
which is constantly rate limited because the library is making requests too quickly.
I'm having to either resort so some ugly monkey patching:
or adding a delay at perhaps
i % 100.Any better solutions?