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()
TODO
- Add middlewares support
- Add returning .proto files
- Add unit tests
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.3.0.tar.gz
(6.5 kB
view hashes)
Built Distribution
Close
Hashes for py_fast_grpc-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6ff4182d5f33069cf32829c640aaeecb642c6e59e1dce5f42b574880ecb8b78 |
|
MD5 | 65d80afa93f67b823ee276f00108ac6a |
|
BLAKE2b-256 | bd0db36fe571ed954d45954380223cf2aaa696996a1fedc060a8caacb8dc00d1 |