Standalone python function call controller
Project description
throttle
Standalone python function call controller
How to use
Install
pip3 install throttle
Usage
from throttle import task
# two consequence foo calling own at least 0.1 second interval
@task(min_interval=0.1)
def foo(*args, **kwargs):
print(args, kwargs)
foo(1, 2, 3)
How it works
throttle
builds a tiny local socket network with master-slave topology.
So any call of registered function is controller by the master node's controller algorithm.
Controller
- MinIntervalController
- MockController
TODOs
- Take dynamic local network construction and high availability into consideration
- More control algorithm choices
About author
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
fn-throttle-0.0.1.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for fn_throttle-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e068a91dd125c7025dc0b6907b53423d834691f8c07a790baa893e197c14f8b6 |
|
MD5 | 3bd4b1a69e494aa5245197fba4904463 |
|
BLAKE2b-256 | 549b416289eec86d9273a3acef04ad4de46f36845d6ca4dd06021625ab3ce43d |