# python-grpc **Repository Path**: mirrors/python-grpc ## Basic Information - **Project Name**: python-grpc - **Description**: 该项目基于grpcio 开发,定义了一个通用的 GRPC 服务和函数 - **Primary Language**: Python - **License**: MIT - **Default Branch**: master - **Homepage**: https://www.oschina.net/p/python-grpc - **GVP Project**: No ## Statistics - **Stars**: 3 - **Forks**: 2 - **Created**: 2019-08-20 - **Last Updated**: 2026-01-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README python-grpc An Common Service RPC library ------ Based on `grpcio`,we define the common grpc service and function. By reflection & syntactic sugar,server side can provide rpc service easily, also client can declare rpc interface easily. Project Path Description ------ - `client`: grpc client demo - `server`: grpc server demo - `python-grpc`: python-grpc core module Tutorials ------ install python-grpc ``` pip3 install python-grpc ``` **Server Side** run grpc server in path `server` ``` python3 server.py ``` **Client Side** test grpc client in path `client` ``` python3 client.py ``` Common Service Define `service.proto` -------- ``` syntax = "proto3"; // Define Common Service service CommonService { // common rpc function rpc handle ( Request ) returns ( Response ) {} } // Request Type message Request { int32 serialize = 1; bytes request = 2; } // Response Type message Response { bytes response = 1; } ```