Questions tagged [grpc-python]

Python implementation of gRPC: A high performance, open source, general RPC framework that puts mobile and HTTP/2 first.

gRPC is an open source remote procedure call (RPC) system initially developed at Google. It uses HTTP/2 for transport, Protocol Buffers as the interface description language, and provides features such as authentication, bidirectional streaming and flow control, blocking or nonblocking bindings, and cancellation and timeouts.

gRPC Basics - Python

401 questions
0
votes
1 answer

gRPC streaming in the separate process get stuck

I'm trying to create a client for testing my grpc server. In my grpc server I have a rpc NotificationStreaming() which streams a notification (unary-stream). Also I have bunch of synchronous rpc methods (unary-unary). In the main() below first I…
Anton
  • 420
  • 5
  • 15
0
votes
1 answer

How to run protoc for grpc python files using cmake?

I have a file my.proto and I want to create the corresponding my_pb2.py and my_pb2_grpc.py files using cmake. (Unfortunately, I cannot use other build system) Normally, I use protoc from grpcio-tools python module to do so: python3 -m…
jsofri
  • 227
  • 1
  • 10
0
votes
0 answers

How Azure Function Worker 'AzureFunctionsRpcMessages' selects its port

I am running Azure Function locally on an Ubuntu machine using VSCode Azure Function Extension. I created a local function, which runs on the default port 7071. When checking the the log however, I notice the following message indicating that…
0
votes
0 answers

how exactly does gRPC for python handles unix domain sockets

After trying a few things, I got to a point where I can run client-server gRPC connection that is UDS based on the same host. Since I didn't find any detailed documentation for this setup, my main concern is that I don't know if I use gRPC API…
jsofri
  • 227
  • 1
  • 10
0
votes
1 answer

Python GRPC unable to import generated file

I am trying to use GRPC using GRPC tutorial I have generated two files: helloworld_pb2_grpc.py helloworld_pb2.py I am trying to put these files under one folder called PB and the folder structure is like: #root/pb helloworld_pb2_grpc.py …
Nilay Singh
  • 2,201
  • 6
  • 31
  • 61
0
votes
0 answers

gRPC: From Node Js, How to send Array of float by using repeated bytes of protobuff to python

I would like to send a list of float list via nodejs and receive it in python using protobuff's repeated bytes type. The graph helps to understand the problem: I tried with this configuration and what I get on the python side is not really what I…
0
votes
1 answer

grpc_tools did not create xxx_grpc.py

I am learning grpc, but encounter an issue. create proto file as showing below (test.proto) run python3 -m grpc_tools.protoc -I ./protos --python_out=. ./protos/test.proto expect to have two files: test_pb2.py and test_pb2_grpc.py but only have…
galaxyan
  • 5,944
  • 2
  • 19
  • 43
0
votes
1 answer

How to Test ServiceInterceptor using grpcio-testing in Python

I have a proto file like syntax = "proto3"; package hello; message HelloRequest { } message HelloResponse { } service HelloService { rpc UnaryUnaryHello (HelloRequest) returns (HelloResponse) {} rpc UnaryStreamHello (HelloRequest)…
niltz
  • 1,014
  • 11
  • 28
0
votes
1 answer

Python grpc - reading in all messages before sending responses

I'm trying to understand if grpc server using streams is able to wait for all client messages to be read in prior to sending responses. I have a trivial application where I send in several numbers I'd like to add and return. I've set up a basic…
0
votes
0 answers

python grpc.channel._Rendevezous exception status Unknwon

I have a grpc connection established and i try to make a request in the channel but when i call the service from the client i get the following exception. Does anyone know something about it? Does the usage of threads is the reason for it? I can't…
0
votes
2 answers

how to loop faster through grpc response iterators with python

I'm calling a grpc service with python that responds with about a million iterator objects. At the moment I'm using list comprehension to access the 1 attribute I need from the iterators: stub = QueryStub(grpc_channel) return…
asleniovas
  • 193
  • 3
  • 21
0
votes
1 answer

How to get gRPC to properly serialize response

getting a strange error when trying simple gRPC implementation I.e. following the standard python example. Server seems to run OK, but get the error when I ping it with a client grpc: package pas; // The PAS service definition service PAS { //…
joshp
  • 706
  • 5
  • 22
0
votes
0 answers

limit number of concurrent_rpcs in grpc c++

I am using grpc for bidirection streaming service. Beause this is an online real-time service, and we don't want our clients to wait too long, so we want to limit the rpcs to a certain number and reject the extra requests. We are able to do it in…
0
votes
0 answers

How to determine if an argument was passed with a gRPC call or not?

Question: When parsing a gRPC call's request in my gRPC endpoint, how can I make use of a certain request. only if it was explicitly passed with the gRPC call? I have this in my .proto: message Object { bool enabled = 1; } I have…
fredrik
  • 9,631
  • 16
  • 72
  • 132
0
votes
1 answer

How do I build WHL packages after changing the code?

I added some log codes in grpc/third_party/protobuf/src/google/protobuf code, to help locate the problem, i install grpc python from source, but The change did not take effect. Please give me some advice, thanks. Supported Python Versions Python…
dhr
  • 1
  • 1