callrate-2018.4


توضیحات

Package to manage functions call rate
ویژگی مقدار
سیستم عامل -
نام فایل callrate-2018.4
نام callrate
نسخه کتابخانه 2018.4
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Anton Bautkin
ایمیل نویسنده antonbautkin@gmail.com
آدرس صفحه اصلی https://gitlab.com/goblenus/requestslimitrate
آدرس اینترنتی https://pypi.org/project/callrate/
مجوز MIT
# Install ``` python3 setup.py install ``` # Usage ``` python import threading from callrate import call_rate import time @call_rate(7, 10, False) def test_print(i): print("Thread -> {}".format(i)) def test_thread(i): while True: try: test_print(i) except: pass def main(): threads = [] for i in range(10): threads.append(threading.Thread(target=test_thread, args=(i, ))) threads[-1].start() for thread in threads: thread.join() if __name__ == "__main__": main() ``` # Warning Note that the `call_rate` and `CallRate` is thread safe (not process safe)


نحوه نصب


نصب پکیج whl callrate-2018.4:

    pip install callrate-2018.4.whl


نصب پکیج tar.gz callrate-2018.4:

    pip install callrate-2018.4.tar.gz