Registry / type-stubs / types-grpcio-health-checking

types-grpcio-health-checking

JSON →
library1.0.0.20260518pypypiunverified

This package provides static type checking stubs for the `grpcio-health-checking` library, enabling tools like MyPy to validate usage of `grpc_health.v1` modules. It is part of the `typeshed` project, which supplies type hints for many popular Python packages. The current version is 1.0.0.20260408, with releases tied to updates of the underlying runtime library.

pip install types-grpcio-health-checking
INSTALL
IMPORT
SIG · TYPES-GRPCIO-HEALT
T
types-grpcio-health-checking
type-stubspythonv1.0.0.20260518
Install
3.3s avg
Import
411ms
Disk
163MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.0.20260518 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.940 runs
installs and imports cleanly · install 0.0s · import 0.537s · 18.4MB
glibc
py 3.103.940 runs
installs and imports cleanly · install 3.3s · import 0.285s · 243MB
163MB installed
● package 163MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

HealthServicer
from grpc_health_stubs.v1.health import HealthServicer
from grpc_health_stubs.v1.health import HealthServicer

This quickstart demonstrates how to use the type hints provided by `types-grpcio-health-checking` in a `grpcio-health-checking` service implementation. It highlights the correct import paths and how type annotations enhance code clarity and enable static analysis. Note that the `types-` package is for type checking, not for runtime execution; the actual runtime code requires `grpcio` and `grpcio-health-checking`.

import grpc from grpc_health.v1 import health_pb2 from grpc_health.v1.health import HealthServicer # This example demonstrates using type hints provided by types-grpcio-health-checking. # For this code to run, 'grpcio' and 'grpcio-health-checking' must also be installed. # The 'types-' package primarily assists static analysis tools like MyPy. class MyHealthServicer(HealthServicer): """ An example gRPC Health Servicer implementation. The type hints for `request` and the return value are validated by type checkers (like mypy) thanks to the 'types-grpcio-health-checking' package providing stubs for 'grpcio-health-checking'. """ def Check(self, request: health_pb2.HealthCheckRequest, context: grpc.ServicerContext) -> health_pb2.HealthCheckResponse: """ Implements the Check method of the gRPC Health Service. """ print(f"Received health check for service: {request.service}") # In a real application, you'd check actual service status here. if request.service == "myservice": return health_pb2.HealthCheckResponse(status=health_pb2.HealthCheckResponse.ServingStatus.SERVING) return health_pb2.HealthCheckResponse(status=health_pb2.HealthCheckResponse.ServingStatus.NOT_SERVING) def Watch(self, request: health_pb2.HealthCheckRequest, context: grpc.ServicerContext) -> health_pb2.HealthCheckResponse: """ Implements the Watch method (streaming). For simplicity, this example just yields a single response. """ yield health_pb2.HealthCheckResponse(status=health_pb2.HealthCheckResponse.ServingStatus.SERVING) # To verify type-checking with MyPy: # 1. Ensure you have 'grpcio', 'grpcio-health-checking', 'types-grpcio-health-checking', and 'mypy' installed. # 2. Save this code as 'health_types_example.py'. # 3. Run: mypy health_types_example.py # If 'types-grpcio-health-checking' were missing, mypy would report errors for `HealthServicer` and other type hints.
Debug
Known issues
gotchaThis package provides only type stubs and does not contain any runtime code. Its sole purpose is to provide type information for static analysis tools like MyPy.
fix
Install `grpcio` and `grpcio-health-checking` for runtime functionality. Install `types-grpcio-health-checking` only for type checking purposes.
affects: All versions
gotchaDo not attempt to import symbols directly from `types_grpcio_health_checking`. The stub package augments the original `grpcio-health-checking` library. All imports should be made from `grpc_health.v1` modules as if the stubs were not present.
fix
Always use standard `from grpc_health.v1 import ...` import statements. The `types-` package is picked up automatically by type checkers.
affects: All versions
breakingType stubs are tightly coupled to the API of the runtime library they type. If you upgrade `grpcio-health-checking` to a new major version, the corresponding `types-grpcio-health-checking` stubs might become outdated or incorrect, potentially leading to type errors or undetected runtime issues.
fix
Always keep your `types-grpcio-health-checking` version in sync with your `grpcio-health-checking` version. Refer to the `typeshed` repository for specific version compatibility information.
affects: All versions (when underlying library changes)
gotchaThe version numbering for `types-` packages from `typeshed` (e.g., `1.0.0.20260408`) indicates the upstream package version (1.0.0) and the date the stub was generated/updated (20260408). It does not necessarily match the exact versioning scheme of the runtime `grpcio-health-checking` package.
fix
Understand that the date suffix signifies the freshness of the stub, not a direct API version. Always consult `typeshed` or `grpcio-health-checking` documentation for specific compatibility.
affects: All versions
Upgrade
Version history
1.0.0.20260518latest on PyPI · released May 18, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
40 hits · last 30 days
node
36
OpenAI (training)
1
Resources
types-grpcio-health-checking — pip install types-grpcio-health-checking · libregistry