Skip to content

Commit

Permalink
devel/py-ratelim: New port: Makes it easy to respect rate limits
Browse files Browse the repository at this point in the history
Ratelim is a simple Python library that limits the number of times a function
can be called during a time interval. It is particularly useful when using
online APIs, which commonly enforce rate limits.

Features

- Works in Py2 and Py3.
- Greedy and patient rate limiting.
- Preserves function signature.
  • Loading branch information
alonsobsd committed Apr 29, 2023
1 parent 382c9a3 commit 830b1bd
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions devel/Makefile
Expand Up @@ -5393,6 +5393,7 @@
SUBDIR += py-rapidfuzz
SUBDIR += py-rapidfuzz-capi
SUBDIR += py-rapidfuzz2
SUBDIR += py-ratelim
SUBDIR += py-ratelimiter
SUBDIR += py-rauth
SUBDIR += py-raven
Expand Down
20 changes: 20 additions & 0 deletions devel/py-ratelim/Makefile
@@ -0,0 +1,20 @@
PORTNAME= ratelim
PORTVERSION= 0.1.6
CATEGORIES= devel python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}

MAINTAINER= acm@FreeBSD.org
COMMENT= Makes it easy to respect rate limits
WWW= https://github.com/themiurgo/ratelim

LICENSE= MIT

RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}decorator>0:devel/py-decorator@${PY_FLAVOR}

USES= python:3.6+
USE_PYTHON= autoplist distutils

NO_ARCH= yes

.include <bsd.port.mk>
3 changes: 3 additions & 0 deletions devel/py-ratelim/distinfo
@@ -0,0 +1,3 @@
TIMESTAMP = 1680320725
SHA256 (ratelim-0.1.6.tar.gz) = 826d32177e11f9a12831901c9fda6679fd5bbea3605910820167088f5acbb11d
SIZE (ratelim-0.1.6.tar.gz) = 2793
9 changes: 9 additions & 0 deletions devel/py-ratelim/pkg-descr
@@ -0,0 +1,9 @@
Ratelim is a simple Python library that limits the number of times a function
can be called during a time interval. It is particularly useful when using
online APIs, which commonly enforce rate limits.

Features

- Works in Py2 and Py3.
- Greedy and patient rate limiting.
- Preserves function signature.

0 comments on commit 830b1bd

Please sign in to comment.