Wait for service(s) to be available before executing a command.
Maintained. Last release over 2 years ago, commits in 14 of the last 26 weeks. Weaker on recent releases and release cadence.
pip install wait-for-it[!IMPORTANT] The wait-for-it project has a new home at https://github.com/hartwork/wait-for-it by now.
wait-for-it
Wait for service(s) to be available before executing a command.

wait-for-it is a script that will wait on the availability of one or more TCP services (i.e. host:port) before executing a user-defined command.
It is useful for synchronizing the spin-up of interdependent services, such as linked docker containers.
Since v2.0.0,
wait-for-itwill return the exit code of the executed command(s).
Check out the wait-for-it docs
Installation
$ pip install wait-for-it
Demo
Usage
Usage: wait-for-it [OPTIONS] [COMMANDS]...
Wait for service(s) to be available before executing a command.
Options:
-h, --help Show this message and exit.
-v, --version Show the version and exit.
-q, --quiet Do not output any status messages
-p, --parallel Test services in parallel rather than in serial
-t, --timeout seconds Timeout in seconds, 0 for no timeout [default: 15]
-s, --service host:port Services to test, in one of the formats: ':port',
'hostname:port', 'v4addr:port', '[v6addr]:port' or
'https://...'