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

Perform action on Google Cloud Function install/setup

I'm writing a cloud function that process a pub/sub message which contains a grpc message. I would like, at install/(re)deploy time, the cloud function to perform some action: pull the protobuf definition from some GitHub repository and generate the…
0
votes
1 answer

How can I ensure each gRPC stream gets updated once and avoids race conditions?

What I'm trying to do: When I make an update to the state of an object, all gRPC clients should be given the update via a gRPC stream. It's important that each client gets every update, and that they get it exactly once. What I expect to happen:…
Kevin S
  • 930
  • 10
  • 19
0
votes
1 answer

How can I access grpc in cloud pub/sub using python?

I want to use google cloud pub/sub with grpc call in python. How can I implement? can someone provide good resources for this?
0
votes
1 answer

How to force multiprocessing on gRPC client-server framework for web crawling?

I am trying to build a web-crawler on python using gRPC. I have included the functions for crawling in the server file and I use the client to request a list of URLs from the user and send it to the server for the scraping part. Each url takes about…
Amruth Kiran
  • 31
  • 1
  • 8
0
votes
1 answer

How to send error details like as BadRequest

I need send rich structured error details on gRPC error. I think it's maybe like this: fv = BadRequest.FieldViolation(field="login", description="Name is not unique") bad_request =…
arturgspb
  • 1,004
  • 1
  • 12
  • 19
0
votes
0 answers

How to respond to client through thread - PYTHON

I'm trying (failing) to use gRPC (grpc.io) with threads. What I want that after receiving a request, scale it to a thread and respond through that thread, without the 'return' part of the gRPC. Here is my method: def CriaItem(self, request,…
Cecília Assis
  • 139
  • 1
  • 10
0
votes
2 answers

run grpc python example must use sudo command

Depend on this tutorials grpc basic I clone https://github.com/grpc/grpc to local, cd example/python/helloworld start server python greeter_server.py then start client python greeter_client.py, but get error Traceback (most recent call last): …
wkzq
  • 333
  • 4
  • 14
0
votes
0 answers

how to efficiently send back data from a server to a client with python grpc

I would like to know if there is a recommended way to return data back from a server to a client in GRPC python. Currently, I have a dedicated server's RPC call that blocks on every client call - it loops on a data queue(which blocks when empty) to…
Mike
  • 13
  • 2
  • 6
0
votes
1 answer

grpc error ...No handlers could be found for logger "grpc._common"

I am just getting a hang of grpc and tried to build a custom client-server procedure where the client sends an id and a name corresponding to the id. Here is the custom.proto file: syntax = "proto3" ; // Interface exported by the server service…
Kiran Baktha
  • 627
  • 2
  • 9
  • 20
0
votes
0 answers

Python grpcio best programming practice

There is a topic talking about best practic https://github.com/grpc/grpc-go/issues/682 But I am not sure at last, How to use grpcio in my program. I am using tensorflow-serving which is base on GRPC. My client is based on python sdk grpcio-1.8.3.…
Henry John
  • 89
  • 1
  • 9
-1
votes
1 answer

proto file, generated code in python and go

I am trying to generate python and go code using same proto file. My proto file looks like: message City { string name = 1; int32 street_no = 2; } When I generate the code in python using below command: python3 -m grpc_tools.protoc -I proto/…
u_peerless
  • 644
  • 2
  • 9
  • 23
1 2 3
26
27