A package to ease log sending to Statuscope
Project description
python-package
Source code of the Python package that is on PyPI
sudo pip3 install statuscope
Example
from statuscope import Logger
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Sends logs to Statuscope.io')
parser.add_argument('-t',
'--token',
help='API token or task-specific token',
required=True)
parser.add_argument('-i',
'--task_id',
help='Task ID',
required=True)
args = parser.parse_args()
log_sender = Logger(args.token, args.task_id)
log_sender.daemon = True
log_sender.start()
counter = 0
while True:
counter = counter + 1
try:
time.sleep(1)
log_sender.add_log("Here is a log %s" % counter)
except KeyboardInterrupt:
print("Ctrl-C received, exiting...")
sys.exit()
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
statuscope-0.0.4.tar.gz
(2.4 kB
view details)
Built Distribution
File details
Details for the file statuscope-0.0.4.tar.gz
.
File metadata
- Download URL: statuscope-0.0.4.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bda246a386f9c6d14e8501ceec63fa55e7989cd2de15743c7ea0ec729ca60f3 |
|
MD5 | 9a3dc2e2cdd0b12210dbfe9539126ada |
|
BLAKE2b-256 | a0be239c63a3a7b72c6a368f0fabcc6663197fcda18c66abd10d7b1505976e80 |
File details
Details for the file statuscope-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: statuscope-0.0.4-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5df45e7e08960afbadf996d411c46c182b4e4a5746e23e1b83cc92ca9e87c9c6 |
|
MD5 | 3759a11ee4cfcfeb9a46811d17f829a2 |
|
BLAKE2b-256 | da2a565ba0281fc89d51d2c59cd298ef59fe826e14657765c322bc30e3e78ebc |