Skip to main content

Rate limit messages

Project description

tweetlimiter

Package to estimate the rate of a message stream and to limit the number of message.

Quickstart

Install the package using pip

$ pip install tweetlimiter

Usage:

import tweetlimiter as tl

limiter = tl.Limiter(target=1, damp_rate=0.1)

for msg in stream():  # loop over messages
    decision = limiter.filter(msg.time, msg.followers)
    if decision:
        pass  # process

Project details


Download files

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

Source Distribution

tweetlimiter-0.1.0.tar.gz (3.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page