mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-27 07:32:19 +00:00
[gRPC] Update the code generator for Python to produce typed handlers (#8326)
* Move `namer.h` and `idl_namer.h` to `include/codegen` so they can be reused from `grpc` dirqectory. * [gRPC] Update the Python generator to produce typed handlers and Python stubs if requested. * [gRPC] Document the newly added compiler flags.
This commit is contained in:
27
tests/service_test_grpc.fb.pyi
Normal file
27
tests/service_test_grpc.fb.pyi
Normal file
@@ -0,0 +1,27 @@
|
||||
# Generated by the gRPC FlatBuffers compiler. DO NOT EDIT!
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import grpc
|
||||
import typing
|
||||
|
||||
from service_test_generated import HelloRequest, HelloResponse
|
||||
|
||||
|
||||
class HelloServiceStub(object):
|
||||
def __init__(self, channel: grpc.Channel) -> None: ...
|
||||
def Hello(self, request: HelloRequest) -> HelloResponse: ...
|
||||
def StreamClient(self, request_iterator: typing.Iterator[HelloRequest]) -> HelloResponse: ...
|
||||
def StreamServer(self, request: HelloRequest) -> typing.Iterator[HelloResponse]: ...
|
||||
def Stream(self, request_iterator: typing.Iterator[HelloRequest]) -> typing.Iterator[HelloResponse]: ...
|
||||
|
||||
|
||||
class HelloServiceServicer(object):
|
||||
def Hello(self, request: HelloRequest, context: grpc.ServicerContext) -> HelloResponse: ...
|
||||
def StreamClient(self, request_iterator: typing.Iterator[HelloRequest], context: grpc.ServicerContext) -> HelloResponse: ...
|
||||
def StreamServer(self, request: HelloRequest, context: grpc.ServicerContext) -> typing.Iterator[HelloResponse]: ...
|
||||
def Stream(self, request_iterator: typing.Iterator[HelloRequest], context: grpc.ServicerContext) -> typing.Iterator[HelloResponse]: ...
|
||||
|
||||
|
||||
def add_HelloServiceServicer_to_server(servicer: HelloServiceServicer, server: grpc.Server) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user