Queue system with key-based throttling implemented over Redis.
Project description
Queue system with key-based throttling implemented over Redis.
Free software: BSD 2-Clause License
Installation
pip install redis-throttled-queue
You can also install the in-development version with:
pip install https://github.com/ionelmc/python-redis-throttled-queue/archive/main.zip
Documentation
Development
To run all the tests run:
tox
Note, to combine the coverage data from all the tox environments run:
Windows |
set PYTEST_ADDOPTS=--cov-append tox |
---|---|
Other |
PYTEST_ADDOPTS=--cov-append tox |
Changelog
0.4.4 (2022-05-09)
Fixed missing usage key expiration when some queues are empty.
0.4.3 (2022-04-09)
Fixed buggy counts when duplicate values are pushed. For now the highest priority will be used when two identical values would be pushed.
0.4.2 (2022-04-02)
Refactored some duplicated code in the pop script.
0.4.1 (2022-03-31)
Fixed bogus error in cleanup() when db is completely empty.
0.4.0 (2022-03-31)
Added last_activity and idle_seconds attributes.
Added a cleanup() method.
0.3.1 (2022-03-31)
Renamed attributes (should be safe to mess with):
_limit becomes limit.
_resolution becomes resolution.
0.3.0 (2022-03-31)
Allowed pop(window) using any window value (str/bytes/int recommended tho).
0.2.0 (2022-03-31)
Fixed __len__ (was returning a string).
0.1.0 (2022-03-30)
First release on PyPI.
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
Hashes for redis-throttled-queue-0.4.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f812324fa97d6c886d2d31373a8656086903a3a90954de5a9e12ee849785db4 |
|
MD5 | 7e872fc1b9477c00c69f248cd60548ff |
|
BLAKE2b-256 | 9dc4da26e550bcdf22de01c7a426a4f28c70d1a21502ba94b4a53e068610f0e4 |
Hashes for redis_throttled_queue-0.4.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efcb5dd37ac75642227ff4e9d93a4e939cacac323cb6bdae0c1c68daf39a2f19 |
|
MD5 | bd47c57cd253e056b10a091c7b99b1a3 |
|
BLAKE2b-256 | 84a9aad9d4819fd678d2d73f87814074ac110f4203a05a532495420e9a068831 |