# 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)
```
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)
Metadata
Release files for callrate 2018.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| callrate-2018.4.tar.gz | 1.6 kB | Details |
Release files / callrate-2018.4.tar.gz
| Download URL | callrate-2018.4.tar.gz |
|---|---|
| Size | 1.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
774b353df508785326d42fbf81ab87c2bc83b5748f591d34da917e3a3bca8e42
|
|
BLAKE2b-256 checksum How to use checksums |
ddf8c262b32a96ba3bcad9878afe07e2bb133447d6baf8b47282a313e271a37f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |