gRPC Python Health Checking

Reference Python implementation of the gRPC Health Checking Protocol.

Library
PyPI
v1.84.0
45,347 stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
97 /100 Excellent
Development Activity 96
Maintenance 96
Community 96
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
80 /100 Excellent
Architecture 82
Code Quality 84
Innovation 74
Learning Curve 78

grpcio-health-checking is the official reference implementation of the gRPC Health Checking Protocol for Python. It provides a ready-made health servicer that you register on your gRPC server so clients, load balancers, and orchestration systems can query the health of individual services or the server as a whole.

Built on top of grpcio, it ships the standard grpc.health.v1 protobuf definitions and a HealthServicer that supports both the unary Check and the streaming Watch RPCs, in synchronous and asyncio flavors. It is the canonical way to expose Kubernetes-style health probes and client-side health-aware load balancing in Python gRPC applications.

What You Get

  • A HealthServicer implementing the standard Check and Watch RPCs from grpc.health.v1
  • An AsyncHealthServicer for asyncio-based gRPC servers
  • Bundled grpc.health.v1 protobuf messages and service stubs
  • Thread-safe status tracking so you can update service health at runtime

Common Use Cases

  • Exposing liveness/readiness health checks for gRPC services running in Kubernetes
  • Enabling client-side health-aware load balancing across gRPC backends
  • Reporting per-service health status that monitoring systems can poll or stream

Under The Hood

Architecture - The core is grpc_health/v1/health.py, which defines a HealthServicer implementing the Check and Watch methods from the health.proto service definition. Internal _Watcher objects, guarded by threading.Condition, buffer status responses and notify streaming Watch calls when a service’s status changes. An _async.py module provides AsyncHealthServicer, re-exported as aio, for asyncio servers. Generated health_pb2 and health_pb2_grpc modules supply the message and stub types.

Tech Stack - Pure Python packaged with setuptools (setup.py plus grpc_version/python_version helpers). It depends on grpcio (pinned to the matching version) and protobuf. The service contract comes from the bundled grpc.health.v1 health.proto compiled into Python stubs.

Code Quality - As part of the gRPC monorepo, it follows the project’s Apache-2.0 licensing headers, Bazel BUILD files, and CI. Concurrency is handled explicitly with locks and condition variables, and the servicer separates status storage from the RPC surface. The code is production-stable (Development Status :: 5).

API Design - Usage is minimal: construct HealthServicer, call add_HealthServicer_to_server, and call set(service, status) to update health. The Check/Watch split mirrors the wire protocol exactly, and the async variant preserves the same shape, so moving between sync and asyncio servers requires almost no code change.

Used by 6 apps in this directory

C++
68%
Apache 2.0

ClickHouse

Analytics · Data Engineering · Databases

50,116

Open-source column-oriented database that delivers real-time analytical queries on petabyte-scale data with millisecond latency.

View details
95
Repo Health
90
Technical
64
Dependency
Built with
C++ 68%
Python 14%
Updated 1 weeks ago
Go
86%
MIT

Hatchet

AI Development · Automation · Developer Tools

8,014

A Postgres-backed orchestration engine for background tasks, AI agents, and durable workflows that replaces Redis queues and multi-datastore durable execution platforms with a single self-hostable service.

View details
88
Repo Health
83
Technical
67
Dependency
Built with
Go 86%
Updated 1 weeks ago
Go
67%
Apache 2.0

OSV.dev

Security

2,948

Google's open-source vulnerability database that maps CVEs to exact package versions across 50+ ecosystems with a public API and data dumps.

View details
87
Repo Health
82
Technical
66
Dependency
Built with
Go 67%
Python 22%
Updated 1 weeks ago
Go
67%
Apache 2.0

OSV.dev

Security

2,948

Google's open-source vulnerability database that maps CVEs to exact package versions across 50+ ecosystems with a public API and data dumps.

View details
87
Repo Health
82
Technical
66
Dependency
Built with
Go 67%
Python 22%
Updated 1 weeks ago
Python
94%
Apache 2.0

SWIRL

Data Engineering · Databases · Search

3,047

Federated AI search and RAG across 100+ enterprise sources—no data extraction, no vector database required.

View details
62
Repo Health
83
Technical
65
Dependency
Built with
Python 94%
Updated 1 weeks ago
Python
70%
AGPL 3.0

Tracecat

AI Agents · Automation · Security

3,816

Open-source agentic security automation platform that runs AI agents and durable workflows at scale with sandboxed execution.

View details
89
Repo Health
88
Technical
66
Dependency
Built with
Python 70%
TypeScript 28%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers