| Name | Date | Size | #Lines | LOC | ||
|---|---|---|---|---|---|---|
| .. | - | - | ||||
| BUILD.bazel | D | 22-Oct-2025 | 2 KiB | 64 | 56 | |
| Dockerfile.client | D | 22-Oct-2025 | 689 | 27 | 17 | |
| Dockerfile.server | D | 22-Oct-2025 | 697 | 27 | 17 | |
| README.md | D | 22-Oct-2025 | 1.5 KiB | 34 | 23 | |
| csm_greeter_client.py | D | 22-Oct-2025 | 5.6 KiB | 197 | 162 | |
| csm_greeter_server.py | D | 22-Oct-2025 | 5.9 KiB | 221 | 183 | |
| helloworld.proto | D | 22-Oct-2025 | 1.1 KiB | 39 | 32 |
README.md
1# gRPC Python CSM Hello World Example 2 3This CSM example builds on the [Python xDS Example](https://github.com/grpc/grpc/tree/master/examples/python/xds) and changes the gRPC client and server to accept configuration from an xDS control plane and test CSM observability. 4 5## Configuration 6 7The client takes the following command-line arguments - 8* `--target` - By default, the client tries to connect to the target "xds:///helloworld:50051" and gRPC would use xDS to resolve this target and connect to the server backend. This can be overridden to change the target. 9* `--secure_mode` - Whether to use xDS to retrieve server credentials. Default value is False. 10* `--prometheus_endpoint` - Endpoint used for prometheus. Default value is localhost:9464. 11 12 13The server takes the following command-line arguments - 14* `--port` - Port on which the Hello World service is run. Defaults to 50051. 15* `--secure_mode` - Whether to use xDS to retrieve server credentials. Default value is False. 16* `--server_id` - The server ID to return in responses. 17* `--prometheus_endpoint` - Endpoint used for prometheus. Default value is `localhost:9464`. 18 19## Building 20 21From the gRPC workspace folder: 22 23Client: 24``` 25docker build -f examples/python/observability/csm/Dockerfile.client -t "us-docker.pkg.dev/grpc-testing/examples/csm-o11y-example-python-client" . 26``` 27 28Server: 29``` 30docker build -f examples/python/observability/csm/Dockerfile.server -t "us-docker.pkg.dev/grpc-testing/examples/csm-o11y-example-python-server" . 31``` 32 33And then push the tagged image using `docker push`. 34