redis-funnel
A distributed funnel middleware based on redis, management ui included.
Installation
You can install redis-funnel simply with pip:
pip install redis-funnel
Getting Started
Suppose you have a function named dummy runs across many processes, and executes very quickly:
import time
def dummy():
return time.time()
while True:
print dummy()
you wants to restrict its execution speed with a limited qps, e.g. 100:
import time
from redis_funnel.distributed import qps_factory
qps = qps_factory(host="localhost", port=6379, db=0)
@qps("1000001", "test", 100)
def dummy():
return time.time()
while True:
print dummy()
Warning: a redis server should be started first and listening on localhost:6379.
Also, if function dummy just runs in a single process, then you can just use qps decorator based on local memory, in which case you don't need a redis server running first:
import time
from redis_funnel.local import qps
@qps(100)
def dummy():
return time.time()
while True:
print dummy()
Management UI
TBD
Author
redis-funnel is developed and maintained by fanwei.zeng (stayblank@gmail.com). It can be found here:
Metadata
Release files for redis-funnel 0.0.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 |
|---|---|---|---|---|
| redis-funnel-0.0.1.tar.gz | 8.0 kB | Without provenance | Details for redis-funnel-0.0.1.tar.gz |
Release files / redis-funnel-0.0.1.tar.gz
| Download URL | redis-funnel-0.0.1.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a2e380794d1c3b7fb205c78da1a685f75c0716450ca44ee201c129e4a91b5dd4
|
|
BLAKE2b-256 checksum How to use checksums |
13a183ff56f9730a137e27d9c1cffe2087b81c1d8ba59131591b12c31cd7cad1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.10
|
Security for redis-funnel 0.0.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.