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
- Support nested models in schemas
- Add generating client
- 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.2.0.tar.gz
(5.5 kB
view hashes)
Built Distribution
Close
Hashes for py_fast_grpc-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ecc328c82ce3f5da44d68ea2d19e440381fd75a73dfcab690dddae27be16e62d |
|
MD5 | a10beffd92255ee7bec3411b3c3a2bd5 |
|
BLAKE2b-256 | e6c436dc6edeed7bd410d3106d45e87127d0f54a0c8353b519a1f4b97de3ac35 |