wait-for-it
Wait for service(s) to be available before executing a command.
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-ituv
uv add wait-for-itpoetry
poetry add wait-for-itInstalling 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
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
portendPortend monitors TCP ports to check whether…
permissive · top 5,000 on PyPI
waitingWaiting is a lightweight library for polling a…
permissive · top 15,000 on PyPI
busypieProvides expressive, fluent API for…
permissive · top 15,000 on PyPI
polling2Polling2 lets you wait for a function to return…
permissive · top 5,000 on PyPI
waiterWaiter provides iteration-based retry and…
permissive · top 15,000 on PyPI
stcrestclientProvides a Python ReST API client library and…
permissive · top 15,000 on PyPI
stopitProvides context managers and decorators to…
permissive · top 15,000 on PyPI
opensandboxOpenSandbox SDK provides low-level Python…
permissive · top 15,000 on PyPI
timeout-samplerPolls a function repeatedly within a timeout…
permissive · top 15,000 on PyPI
wait-for2Provides an alternate implementation of…
permissive · top 15,000 on PyPI