Skip to content
An example of gRPC with mutual TLS between Go and Python
Python Go Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
api
vendor
.gitignore
Makefile
README.md
client.py
go.mod
go.sum
server.go

README.md

gRPC with Mutual TLS Between Go and Python

Prereqs

Install Go support for Protocol Buffers and gRPC-Go:

# only on macOS
# other OS see: https://github.com/golang/protobuf#installation
brew install protobuf

# install proto file compiler plugin for Go
go get -u github.com/golang/protobuf/protoc-gen-go

# install these deps in a Go module folder (with go.mod)
go get -u github.com/golang/protobuf
go get -u google.golang.org/grpc

Create a new virtualenv project, and then install deps:

pip install grpcio grpcio-tools

Run server and client

First things first, run make to generate Go and Python code from api/metrics.proto file, and create all the certs needed when launching the server and client.

In one terminal window/split, run:

make server

In another terminal window/split, run:

make client

You will see gRPC response printed in the client side window/split.

You can’t perform that action at this time.