Skip to content

A minimal example for demonstrating gRPC in Python

License

Notifications You must be signed in to change notification settings

exponential-decay/basic-grpc-python

 
 

Repository files navigation

Basic gRPC in Python

Contains a minimal working example for rolling gRPC in Python.

Derived from: basic-grpc-python and updated to Python 3 with some example data relevant to my current work.

For more details: blog post.

Quickstart

git clone https://github.com/exponential-decay/basic-grpc-python
cd basic-grpc-python
pip install -r requirements.txt
python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. publish.proto
python server.py
python client.py

File reference

basic-grpc-python/
├── datum.py               # module containing a function
|
├── publish.proto          # protobuf definition file
|
├── publish_pb2_grpc.py    # generated class for server/client
├── publish_pb2.py         # generated class for message
|
├── server.py              # a server to expose the function
└── client.py              # a sample client

About

A minimal example for demonstrating gRPC in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%