Skip to content

Demos dockerized Python grpc server, database, and text and http clients

Notifications You must be signed in to change notification settings

mdzhang/grpc-python-example

Repository files navigation

grpc_python_example

Demos the following:

  • a simple service that can return an Item from Postgres database using SQLAlchemy as an ORM, and Alembic for migrations
  • the following APIs to access the service:
  • example Dockerfile and docker-compose.yml file that dockerizes the service and its apis

Table of Contents

Description

(AFAIK)

grpc architecture diagram

Pros

gRPC server

  • Fast! Uses HTTP 2 and encodes requests in binary format

Language agnostic stubs

  • Don't have to reimplement same client in multiple languages
  • Stubs are just plain old objects/modules so don't have to worry about it not working with one framework or another
  • Just have to generate stub from protobuf definitions in an e.g. organization level .proto repository

Cons

  • Documentation is lacking
  • Few established best practices, conventions, code snippets etc.

About

Demos dockerized Python grpc server, database, and text and http clients

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages