API documentation

Helper functions

htping.helpers.check_url(url)[source]

Send HEAD request to the url and return the status code

Parameters

url (str) – URL to check

Returns

HTTP status code

Return type

int

htping.helpers.colorize(url, status)[source]

Print the URL and status in color to the terminal

Parameters
  • url (str) – URL to check

  • status (int) – status code to display

Returns

HTTP status code

Return type

int

CLI Commands

htping

Check url and print their HTTP statuses (w/ colors)

param urls

URL (or a tuple with multiple URLs) to check

type urls

str or tuple(str)

param daemon

If set to True, after checking all URLs, sleep for 5 seconds and check them again

type daemon

bool

htping [OPTIONS] URLS...

Options

-d, --daemon

Arguments

URLS

Required argument(s)