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 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(request_model=HelloRequest, response_model=HelloResponse)
async def say_hello(self, request: HelloRequest) -> HelloResponse:
return HelloResponse(text=f"Hello, {request.name}!")
app = FastGRPC(Greeter(), reflection=True)
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.0.tar.gz
(3.8 kB
view details)
Built Distribution
File details
Details for the file py_fast_grpc-0.1.0.tar.gz
.
File metadata
- Download URL: py_fast_grpc-0.1.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.4 Linux/6.5.10-200.fc38.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e25003dce07b6181244fd03cb3a9f7fe02a8d038435a604686628680b11ef174 |
|
MD5 | 802996cd51bf3f6ed271cf843ed63e90 |
|
BLAKE2b-256 | 0d7a19674fcfc8778336d6c6b8e1d7dfa95bed7e4763cc8657cfcdb3d8ddb090 |
File details
Details for the file py_fast_grpc-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: py_fast_grpc-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.4 Linux/6.5.10-200.fc38.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6eb2e0a629488bf961db38aeb1fc0a6648a1eab06fc7fc8a0a1f942920701e59 |
|
MD5 | 57a8d0a668dd0ef9f88e6beec028fafb |
|
BLAKE2b-256 | aab6806d248b1048202dd821459ffa9b06c7bb34d24af88dd0cbcc467b48f81e |