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()
async def say_hello(self, request: HelloRequest) -> HelloResponse:
return HelloResponse(text=f"Hello, {request.name}!")
app = FastGRPC(Greeter())
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.8.tar.gz
(4.3 kB
view hashes)
Built Distribution
Close
Hashes for py_fast_grpc-0.1.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e21076641aa56423d85df398f9ad11427839acafcb847e2cbddc9ece1f42ada9 |
|
MD5 | b9b3d954cd87cd16ef7b5a9277d11eb9 |
|
BLAKE2b-256 | 02ae8b150106d781eede96d24c44d8a33ead167095e9bd98aba6b9f24ec2b2cc |