This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A python package provides speed limiting iterators other various helpers using the leaky token bucket algorithm.

Project Description

Speed limit utilities that use the token bucket algorithm internally.

An example:

>>> import string
>>> import time
>>>
>>> import speedlimit
>>>
>>> police = speedlimit.SpeedLimit(1)
>>>
>>> it = iter(string.ascii_lowercase)
>>> t_zero = time.time()
>>>
>>> for alpha in police.speed_limit_iter(it):
...     print("Got %s at %0.2f" % (alpha,  time.time() - t_zero))
...
Got a at 1.00
Got b at 2.00
Got c at 3.00
Got d at 4.00
Got e at 5.00
Got f at 6.00
Got g at 7.00
Got h at 8.00
Got i at 9.00
Got j at 10.00
Got k at 11.00
Got l at 12.00
Got m at 13.00
Got n at 14.00
Got o at 15.00
Got p at 16.00
Got q at 17.00
Got r at 18.00
Got s at 19.00
Got t at 20.00
Got u at 21.00
Got v at 22.00
Got w at 23.00
Got x at 24.00
Got y at 25.00
Got z at 26.00
Release History

Release History

This version
History Node

0.1.1

History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
speedlimit-0.1.1-py2.py3-none-any.whl (4.8 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Aug 22, 2015
speedlimit-0.1.1.tar.gz (3.4 kB) Copy SHA256 Checksum SHA256 Source Aug 22, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting