grpcalchemy

The Python micro framework for building gPRC application.


Keywords
grpcalchemy, grpc, grpc-python, grpc-server, python3
License
MIT
Install
pip install grpcalchemy==0.7.2

Documentation

gRPCAlchemy

Documentation Status

The Python micro framework for building gPRC application.

Installation

$ pipenv install grpcalchemy
✨🍰✨

Only Python 3.6+ is supported.

Example

Server

from grpcalchemy.orm import Message, StringField
from grpcalchemy import Server, Context, grpcmethod

class HelloMessage(Message):
    text: str

class HelloService(Server):
    @grpcmethod
    def Hello(self, request: HelloMessage, context: Context) -> HelloMessage:
        return HelloMessage(text=f'Hello {request.text}')

if __name__ == '__main__':
    HelloService().run()

Features

  • gPRC Service Support
  • gRPC Message Support
    • Scalar Value Types
    • Message Types
    • Repeated Field
    • Maps
  • Define Message With Type Hint
  • Middleware
  • App Context Manger
  • Error Handler Support
  • Streaming Method Support

TODO

  • Test Client Support
  • gRPC Client Support
    • Thoroughly Deprecate pb2 and pb2_grpc file
  • Multiple Processor Support
  • Async Server Support