🔌 A simple CLI tool to check the connectivity of one or more sites!
- Add support for multiple files
- Add support for multiple timeouts
- Add flag for verbose output
- Add flag for single URL
- Add API support (working on it!)
$ git clone github.com/vaishnav-mk/connectivity-checker
$ cd connectivity-checker
$ python -m cli --help
Usage: connectivity-checker [options]
Options:
-m, --multi <url> Multiple URLs to check (separated by a whitespace)
-f, --file <file> The files containing the URLs to check
-t, --timeout <time> The timeouts in milliseconds (default: [5000])
-h, --help output usage information
-u, --url <url> The URL to check
-v, --verbose output the result of the check in verbose mode (default: false)
-s, --status only display the results with the provided status codes
$ python -m cli -f urls.txt more-urls.txt
$ python -m cli -u https://google.com -t 5 5 5 7
$ python -m cli -m https://google.com,https://github.com
$ python -m cli -u https://google.com -v
$ python -m cli -u https://google.com -s 200 404
$ python -m cli -u https://google.com -su
-
API Info:
-
- API package used: FastAPI
-
- Documentation: Swagger
-
- API docs:
/docs
- API docs:
-
API Endpoints:
-
- Base URL:
127.0.0.1
- Base URL:
-
- Port:
8000
- Port:
-
- Docs:
/docs
- Docs:
$ GET / - Returns the API info
$ GET /ping - Returns pong!
$ POST /check - Returns the statuses of an array of URLs
$ POST /validate - Returns valid URLs from an array of URLs