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(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.1.tar.gz
(3.8 kB
view details)
Built Distribution
File details
Details for the file py_fast_grpc-0.1.1.tar.gz
.
File metadata
- Download URL: py_fast_grpc-0.1.1.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 | 68298cc24d6567027f21af24ed90197403ca262fbbbc9808485d06dd3f3dde19 |
|
MD5 | a6206000478652554ffa09498c6d87ec |
|
BLAKE2b-256 | 2716b83a1fbe529d65b00cbdf70182e9e1756c0eb293b081a4997161d1481ae7 |
File details
Details for the file py_fast_grpc-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: py_fast_grpc-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.5 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 | 33403676931d0c76d4b9659e44e59b5925f0363f1be0cfd0aa51c4db17676c9e |
|
MD5 | ee69c201c0e6cb704b065ecc1a28ad42 |
|
BLAKE2b-256 | ffdd8a203c4c785ef99b105b68a5b0dfd2b2a2ac98f2fedf9a9cb8024ff9bdef |