Add gRPC to your FastAPI app in one line. No protobuf. No config. ~2× faster than HTTP/JSON. #15262
barakplasma
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The Pitch
You already have a FastAPI app. FastGRPC reads it at startup and gives you a fully working gRPC server — same handlers, same Pydantic models, zero new files to write or maintain.
That's the entire migration.
https://github.com/barakplasma/FastGRPC
Performance
Benchmarked on the same FastAPI app, same handler logic, 30,000 requests over ~1 minute with persistent connections (how production clients work):
aarch64, Python 3.13, httpx keep-alive vs grpc.aio persistent channel
Why gRPC is faster:
Installation
uv add git+https://github.com/barakplasma/FastGRPC.git # or pip install git+https://github.com/barakplasma/FastGRPC.gitRequires Python 3.10+. Installs
grpcio,grpcio-tools, andgrpcio-reflectionautomatically.Caution
This was developed with Claude Code and a lot of tests. Not running in production yet. Buyer beware.
Supports grpc reflection and generates .proto files for you too from the built in fastapi OpenAPI spec
Beta Was this translation helpful? Give feedback.
All reactions