website_checker
A simple python application for running checks against websites.
Usage
Install
$ pipx install website-checker
installed package site-check 0.1.0, Python 3.9.0
These apps are now globally available
- check
done! ✨ 🌟 ✨
# or install into system python with pip
# pip install website-checker
Example
Display help message
$ check --help
Usage: check [OPTIONS] COMMAND [ARGS]...
A simple python application for running checks against websites.
Options:
--debug / --no-debug Toggle debug mode.
--version Show the version and exit.
--help Show this message and exit.
Commands:
health Check website health.
latency Check website latency.
network Check website network connectivity.
Some examples
$ check network -u https://google.com -u https://blarg.com
{"event": {"check": "network", "input": {"timeout": 5, "url": "https://google.com"}, "output": "pass"}, "logger": "website-checker", "timestamp": "2020-11-30T05:27:23.413281"}
{"event": {"check": "network", "input": {"timeout": 5, "url": "https://blarg.com"}, "output": "fail"}, "logger": "website-checker", "timestamp": "2020-11-30T05:27:23.443994"}
$ check health -u https://google.com
{"event": {"check": "health", "input": {"timeout": 5, "url": "https://google.com"}, "output": "pass"}, "logger": "website-checker", "timestamp": "2020-11-30T05:27:49.413241"}
$ check latency -u https://google.com
{"event": {"check": "latency", "input": {"threshold": 500, "timeout": 5, "url": "https://google.com"}, "output": "pass"}, "logger": "website-checker", "timestamp": "2020-11-30T05:28:14.460530"}
# force a check failure with a latency threshold of 1ms
$ check latency --url https://google.com --threshold 1
{"event": {"check": "latency", "input": {"threshold": 1, "timeout": 5, "url": "https://google.com"}, "output": "fail"}, "logger": "website-checker", "timestamp": "2020-11-30T15:17:30.897261"}
Docker
The default Makefile target will run all stages in the Dockerfile.
$ make
# build all stages: base, workspace, build, release
docker build . -t website-checker
[+] Building 0.9s (22/22) FINISHED
...
# verify image and look at the size!
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
website-checker latest 4ea3d7e18eec 18 seconds ago 55.6MB
# run website check with container
$ docker run --rm -it website-checker \
health --url https://google.com
{"event": {"check": "health", "input": {"timeout": 5, "url": "https://google.com"}, "output": "pass"}, "logger": "website-checker", "timestamp": "2020-11-30T05:00:23.444290"}
License
Check out the LICENSE for more information.
Credits
Check out the CREDITS for more information.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
website-checker-0.3.2.tar.gz
(5.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file website-checker-0.3.2.tar.gz.
File metadata
- Download URL: website-checker-0.3.2.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/1.1.4 CPython/3.9.0 Linux/5.4.0-1031-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cea95f274da458b4dae8980260ed87867593283080c486b31a2b2cf2c189d67
|
|
| MD5 |
0dcdca9bad6650611aed19de3667ff04
|
|
| BLAKE2b-256 |
af36b76b50f400e3f6069963806ed9b241310d5bdd8a139987dd298abfbb0ee0
|
File details
Details for the file website_checker-0.3.2-py3-none-any.whl.
File metadata
- Download URL: website_checker-0.3.2-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/1.1.4 CPython/3.9.0 Linux/5.4.0-1031-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a90648769b01c8f3b3d606bf694c6586a329ba0f3a0fe5cc8090ae261ca6310
|
|
| MD5 |
320ffbe4be8f426de7d00bf2f14c5429
|
|
| BLAKE2b-256 |
9cc2bde372d9874bc045fab92c21b19a5ff199c65006fda0907c113ef21286fe
|