A well maintained program to execute functions in queue as if only 1 worker is executing them one by one (High priority first). Works wonders when a series of time consuming tasks has to be performed but they need to be in sequence.
Project description
rateLimitedQueues v0.0.2
pip install rateLimitedQueues --upgrade
A well maintained program to execute functions in queue as if only 1 worker is executing them one by one (High priority first). Works wonders when a series of time consuming tasks has to be performed but they need to be in sequence.
To install:
pip install rateLimitedQueues --upgrade
pip3 install rateLimitedQueues --upgrade
python -m pip install rateLimitedQueues --upgrade
python3 -m pip install rateLimitedQueues --upgrade
Using this program is as simple as:
from rateLimitedQueues import Manager
rateLimiter = Manager(timeBetweenExecution=1, smallestWaitTime=0)
def mainFunction(url, headers, json, *args, **kwargs):
sleep(1)
print(args, kwargs)
for _ in range(10):
rateLimiter.queueAction(mainFunction, postFunction=functionToCallAfterMainFunction, postKwArgs={"kwarg1":True, "kwarg2": 20},
executePriority=3, executeThreaded=False,
'https://www.google.com',
headers={'Authorization': "Bearer 1234"},
json={})
This project is always open to suggestions and feature requests.
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
Built Distribution
Close
Hashes for rateLimitedQueues-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6050a24df709ded0ee8d5726dad5d67a50b99484d7e314ea4d19b16be4813690 |
|
MD5 | da88e328e315876e86927f821192a847 |
|
BLAKE2b-256 | 55bd15d3b6332556e0bae2beb727f2ecc22407e70d92b0883ce14a51676a6417 |