Skip to content

Poogles/limitediterables

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Limited Iterables Build Status

Basic library to rate limit how quickly you get the next value out of an iterable.

Install

pip install limitediterables

Example

target = range(100)
slow_iter = LimitedIterable(target, limit=50)  # This gives us 50 messages a second.

for i in slow_iter:
    print(i)

Should be useful for rate limiting against APIs or anything else that's sensitive to number of requests.

Dev

pip install pytest
pytest

PRs accepted.

Releases

No releases published

Packages

No packages published

Languages