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
- Beautify .proto files
- Add returning .proto files
- More unit tests
- Add documentation
- Add linters
- Add CI/CD
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.5.tar.gz
(6.7 kB
view hashes)
Built Distribution
Close
Hashes for py_fast_grpc-0.3.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be840a9a91754f5bf17b347860be20598d3329b1593ccfe30eb73600bb8947ff |
|
MD5 | 6e1761ba3f8667b39c9fc63b8900a8a9 |
|
BLAKE2b-256 | 4c3d9a1f0247bb8a2e54553d4b49ac196bec41ee1cc2cf6ae1370f1fd31a72ed |