gRPC simple and easy to use Python framework
Project description
Fast-gRPC
Fast-gRPC it is simple and easy to use Python gRPC framework.
Installation
pip install py-fast-grpc
Quick Start
from fast_grpc import FastGRPC, FastGRPCService, grpc_method
from pydantic import BaseModel
class HelloRequest(BaseModel):
name: str
class HelloResponse(BaseModel):
text: str
class Greeter(FastGRPCService):
@grpc_method(request_model=HelloRequest, response_model=HelloResponse)
async def say_hello(self, request: HelloRequest) -> HelloResponse:
return HelloResponse(text=f"Hello, {request.name}!")
app = FastGRPC(Greeter(), reflection=True)
app.run()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py_fast_grpc-0.1.3.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for py_fast_grpc-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27c026c4783f97fc00d7c9ba28f98fdfaff5142db0f6224035cc80a3165903ea |
|
MD5 | 99286255a66da80a04589aaec69bf267 |
|
BLAKE2b-256 | c1279846ea83d7bd17b2fd595fb3341011da4056b400926153e10552130ef0b1 |