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.1.tar.gz
(6.4 kB
view details)
Built Distribution
File details
Details for the file py_fast_grpc-0.3.1.tar.gz
.
File metadata
- Download URL: py_fast_grpc-0.3.1.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.4 Linux/6.5.12-200.fc38.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98465338ed2abd2f9c5e4d3380978530188c89fb54359a6ced2d1fceee40f69a |
|
MD5 | 99e990428e8706494dc5602cc6953e05 |
|
BLAKE2b-256 | 5a5b8f54ea6949f3f41ba85f473a2841a7640a5800abb55d502811c8939bb15a |
File details
Details for the file py_fast_grpc-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: py_fast_grpc-0.3.1-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.4 Linux/6.5.12-200.fc38.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86832c37b193bfe2c71d36e28ed67dc10913b8078d3bb6f5db633875ec16b9f2 |
|
MD5 | 32fc0bc1f1d7d27ea572bb144605d8df |
|
BLAKE2b-256 | 7820549c3ee33ed3ea3ad5b0b24a6cfe1c210b89d794f52d4cb89568c3300a7a |