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
Links
Project details
Release history Release notifications | RSS feed
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 details)
File details
Details for the file tweetlimiter-0.1.0.tar.gz
.
File metadata
- Download URL: tweetlimiter-0.1.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.12.0 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33c8a273ff33d0305082878366ce8f67be89682f1874d2f9a6bf6e234e5076b1 |
|
MD5 | eab33b10da24a3c112ecf8f8e671819b |
|
BLAKE2b-256 | 6b4fb8b533734cf92767d61af4d64bfc97b236344e0c2d5061ad1845e61d49ef |