skillfed

wait-for-it

Wait for service(s) to be available before executing a command.

wait-for-it v2.3.0 202.1K downloads/30d#9,652 on PyPI14
Permissive license Active released

What it is and what it does

wait-for-it is a lightweight CLI utility that polls TCP ports (or HTTPS endpoints) to detect when services are ready, then runs a command you specify. It's designed for scenarios where one service depends on another being up first—the canonical use case is Docker Compose or Kubernetes-style orchestration where containers start in an unpredictable order. The tool can test services serially (one after another) or in parallel, with a configurable timeout (default 15 seconds, or unlimited if set to 0), and returns the exit code of the command it executes.

You invoke it from the shell with `--service` flags naming each host:port to check, optionally `--parallel` to test them concurrently, and a `--` separator followed by the command to run once all services are available. It's a pure Python script with only click as a runtime dependency, making it quick to install and run in containers or CI/CD pipelines.

Use it for:

  • Docker Compose entrypoint: wait for database and cache services to be ready before starting an application.
  • Kubernetes init container: ensure dependent microservices are reachable before the main pod starts.
  • CI/CD pipeline: delay test execution until all test infrastructure (mock servers, databases) is listening.
  • Local development: coordinate startup of multiple services in a Makefile or shell script.
  • Health-check orchestration: verify multiple endpoints are up before triggering a deployment step.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A command-line tool that waits for one or more TCP services to become available before executing a specified command, useful for coordinating startup of interdependent services.

Yes. It solves a common orchestration problem with minimal overhead, has no security vulnerabilities, is actively maintained, and carries a permissive license. Install it if you need to synchronize service startup in Docker, Kubernetes, or any shell-based workflow.

Install

wait-for-it on PyPI

pip

pip install wait-for-it

uv

uv add wait-for-it

poetry

poetry add wait-for-it

Installing wait-for-it

Before you install

Low install friction with a single runtime dependency (click). Actively maintained as of 2026-08-10 with recent releases, supporting modern Python versions 3.9 through 3.13.

License in practice

MIT license (permissive) means you can use, modify, and distribute this package with minimal restrictions, making it safe for both open-source and commercial projects.

Quickstart

pip install wait-for-it

wait-for-it --service www.google.com:80 -- echo "service is up"

Requires Python 3.9 or later; TCP connectivity to the target service(s) is necessary for the tool to function.

Verify before relying

  • Whether the tool supports IPv6 addresses beyond the documented '[v6addr]:port' format syntax.
  • Performance characteristics when testing many services in parallel mode.
  • Whether HTTPS service checks perform full TLS validation or only connection establishment.

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 1 — click
Maintenance actively maintained — 670 days since the last release
Last repo commit
First released
Downloads 202,112/month — #9,652 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: wait_for_it-2.3.0-py3-none-any.whl

License :: OSI Approved :: MIT LicenseOperating System :: POSIXProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: InternetTopic :: Utilities

Tags

wait for tcp service startupdocker container orchestrationservice readiness checkport availability pollingwait for host portservice dependency synchronizationhealth check before command
service-orchestrationdocker-composedevops

More Internet packages