gRPC xDS Configuration Dump Service
raw JSON → 1.80.0 verified Fri May 01 auth: no python
Provides a client for the gRPC Client Status Discovery Service (CSDS), enabling retrieval of xDS configuration dumps for debugging and observability. Version 1.80.0 requires Python >=3.9, follows gRPC's major release cadence.
pip install grpcio-csds Common errors
error ModuleNotFoundError: No module named 'grpc_csds' ↓
cause Package not installed or import name typo (e.g., using grpcio_csds).
fix
Run
pip install grpcio-csds and ensure import is from grpc_csds import .... error AttributeError: module 'grpc_csds' has no attribute 'ClientStatusDiscoveryServiceClient' ↓
cause Using deprecated v1alpha1 API or incorrect class name.
fix
Use
ClientStatusDiscoveryServiceStub from grpc_csds (v2) or import from grpc_csds.v2. error grpc.RpcError: ... Failed to fetch client status: xDS configuration not found ↓
cause gRPC channel not configured with xDS bootstrap.
fix
Set
GRPC_XDS_BOOTSTRAP environment variable to a valid JSON file or use grpc.xds_channel_credentials(). Warnings
gotcha Import uses underscore (grpc_csds), not hyphen (grpcio-csds) as in the package name. ↓
fix Use `from grpc_csds import ...` as the import path.
gotcha CSDS is only available if the gRPC channel is configured with xDS. Calling FetchClientStatus without xDS bootstrapping will cause errors. ↓
fix Ensure GRPC_XDS_BOOTSTRAP environment variable is set or use `xds_credentials` when creating the channel.
deprecated The v1alpha1 API is deprecated; use v2 API instead. ↓
fix Use `from grpc_csds.v2 import ...` instead of `from grpc_csds.v1alpha1 import ...`.
Imports
- ClientStatusDiscoveryServiceClient wrong
from grpcio_csds import ClientStatusDiscoveryServiceClientcorrectfrom grpc_csds import ClientStatusDiscoveryServiceClient - ClientStatusDiscoveryServiceStub
from grpc_csds import ClientStatusDiscoveryServiceStub
Quickstart
import grpc
from grpc_csds import ClientStatusDiscoveryServiceStub
from grpc_csds.v2.client_status_pb2 import ClientStatusRequest
channel = grpc.insecure_channel('localhost:8080')
stub = ClientStatusDiscoveryServiceStub(channel)
request = ClientStatusRequest(node_identifiers=[])
response = stub.FetchClientStatus(request)
print(response.config)