+
Skip to content

toransahu/grpc-eg-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gRPC Hands-on

Introduction

Collection of small examples of protobuff, servers, and clients based on gRPC.

Pre-requisites

  • Python > 2.7
  • pip, pipenv

Installation

# clone the repo
$ git clone htttps://github.com/toransahu/grpc-eg-py

# install python dependencies
$ pipenv --three install grpc

# activate the virtualenv shell
$ pipenv shell  

Run

# run the server
(grpc-eg)
$ python -m src.server.calc

# run the client
(grpc-eg)
$ python -m src.clients.calc

Run using grpcurl

$ grpcurl \
-plaintext \
-import-path=src \
-proto=src/proto/calc/calc.proto \
-d '{"n1": 1, "n2": 2}' \
localhost:50050 \
calc.Calculator.Add
{
  "n1": 3
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载