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.10.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for py_fast_grpc-0.1.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e71f37643dadf907747f78bc6ed83c9b80f7d530ada9a7cbe8993be45530024e |
|
MD5 | b67f1a24b12622e3a67f4e8668419268 |
|
BLAKE2b-256 | 2875df9eeb48b3e790f818611b0a2334a218a021b306fa2ff5f8389aa276ae6b |