git: 830b1bd0714c - main - devel/py-ratelim: New port: Makes it easy to respect rate limits
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 30 Apr 2023 00:33:29 UTC
The branch main has been updated by acm:
URL: https://cgit.FreeBSD.org/ports/commit/?id=830b1bd0714ca15eb725e9fef45033ea82ca00a3
commit 830b1bd0714ca15eb725e9fef45033ea82ca00a3
Author: Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
AuthorDate: 2023-04-29 23:50:32 +0000
Commit: Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
CommitDate: 2023-04-29 23:50:32 +0000
devel/py-ratelim: New port: Makes it easy to respect rate limits
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.
---
devel/Makefile | 1 +
devel/py-ratelim/Makefile | 20 ++++++++++++++++++++
devel/py-ratelim/distinfo | 3 +++
devel/py-ratelim/pkg-descr | 9 +++++++++
4 files changed, 33 insertions(+)
diff --git a/devel/Makefile b/devel/Makefile
index c7ced4982b07..8ad10b2bbd4c 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -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
diff --git a/devel/py-ratelim/Makefile b/devel/py-ratelim/Makefile
new file mode 100644
index 000000000000..2419e71315be
--- /dev/null
+++ b/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>
diff --git a/devel/py-ratelim/distinfo b/devel/py-ratelim/distinfo
new file mode 100644
index 000000000000..3a00f1c3ffab
--- /dev/null
+++ b/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
diff --git a/devel/py-ratelim/pkg-descr b/devel/py-ratelim/pkg-descr
new file mode 100644
index 000000000000..d66a0a20baca
--- /dev/null
+++ b/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.