RateLimiterX
RateLimiterX提供在指定时间内执行指定数量的任务功能,并且可以指定执行速度。另外支持以下功能:
- 设置执行速率:尽可能平均执行、尽可能快地执行
- 支持多个任务队列,每个队列可单独设置任务、速率等,例如多个代理设置不同的速率
使用说明
from ratelimiterx.ratelimiterx import RateLimiterX, Task, Speed
def example():
rl = RateLimiterX(10 * 1000, 10)
rate_limiterx_queue_id = init_ratelimiterx.create_queue(1000, 5)
def fun1():
# do something
pass
for i in range(10):
init_ratelimiterx.add_task(rate_limiter_queue_id, Task(fun1))
init_ratelimiterx.join()
init_ratelimiterx.destroy()
项目说明
目录说明
- README.md: 包含使用手册、项目说明
执行依赖安装
pip install -r requirements.txt
依赖固化
pip freeze > requirements.txt
打包
- pip install build
- python -m build
发布到pypi
- pip install twine
- python -m twine upload --repository pypi dist/*
- 输入用户名和API Token。
Metadata
Release files for RateLimiterX 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ratelimiterx-0.1.1.tar.gz | 6.5 kB | Without provenance | Details for ratelimiterx-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ratelimiterx-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for ratelimiterx-0.1.1-py3-none-any.whl |
Total release size: 12.3 kB
Release files / ratelimiterx-0.1.1.tar.gz
| Download URL | ratelimiterx-0.1.1.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4bf1a936f7ade8e558759db3f449f5f0f6d11ddf02657a29d56a7a70f2edf2cc
|
|
BLAKE2b-256 checksum How to use checksums |
2569e2b2ce8814147baded9852e8bf2d299110b4f6c4df0058004674ffce420b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.4
|
Release files / ratelimiterx-0.1.1-py3-none-any.whl
| Download URL | ratelimiterx-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fa40fa625c9d49a0c40f4968355b9b483efbd739c4bfd0649e4279242d7f4194
|
|
BLAKE2b-256 checksum How to use checksums |
6197a61b7526f80cae5124f80d4af7c04ffda425061fa6722cf182b07c0d3133
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.4
|
Security for RateLimiterX 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.