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

Model Serving with sklearn and gRPC

Say I have an trained RandomForestClassifier model from sklearn. We're using gRPC to serve that model and provide predictions in real-time in a high traffic situation. From what I understand, gRPC can support multiple threads run concurrently. …
aesir
  • 565
  • 2
  • 13
  • 23
0
votes
1 answer

web-gRPC Performance Rate per second

I want to develop a system for trace and debugging an external device via COM port. Main service will be developed using python to receive, analyse & store logs data. We decided to stream log data to web browser with gRPC protocol and draw live…
0
votes
2 answers

grpc: when compiling proto files into python from maven, grpc.py files are missing

When I generate grpc files from python (running python -m grpc_tools.protoc), I get 2 files for each one of the X proto files, X_pb2.py and X_pb2_grpc.py. However by using compile-python maven goal from protobuf-maven-plugin (0.6.1), I only get the…
eftshift0
  • 26,375
  • 3
  • 36
  • 60
0
votes
1 answer

how to connect to specific grpc server process under so_reuseport

I have multiple GRPC servers, all bounded to the same port using GRPC linux so_reuseport option. This works great but for health checking I would like to iterate on all servers, one by one and identify unhealthy servers. Because they are all have…
Lior Cohen
  • 5,570
  • 2
  • 14
  • 30
0
votes
0 answers

does grpc with no encryption or authentication(InsecureChannel) works between 2 remote servers

I have a grpc client and server running in 2 different servers. with this setup, when I run client, below error is coming. Connect failed: {"created":"@1565697395.391945051","description":"Failed to connect to remote host: FD…
0
votes
0 answers

gRPC generated python script fails to find a local module in the same directory?

I have the following structure in my Python project: main.py sub1/ __init__.py foo.py bar.py grpc_generated_pb2.py grpc_generated_pb2_grpc.py I have been using the following approach to import local modules, for example, (in…
user1783732
  • 1,599
  • 5
  • 22
  • 44
0
votes
3 answers

why would i get AttributeError when run grpc demo in python3.7.4

i installed lib: googleapis-common-protos 1.6.0 grpcio 1.22.0 grpcio-tools 1.22.0 i run a simple demo,then an exception occurs: grpclib/grpcapi.py:1: in import…
Ali Zwd
  • 145
  • 2
  • 4
0
votes
1 answer

How to compile homegraph google api proto files for python usign grpcio_tools.protoc?

I'm trying to use gRPC to access to google home graph api. in this tutorial I've found an example on how to compile a proto file to get some python code that can be used by a client. The provided example generate some python files but they are not…
cunfusu
  • 97
  • 1
  • 9
0
votes
1 answer

python How to handle grpc stream after stream cancel() is called

I'm trying to write a python client to terminate a gRPC stream Proto: rpc Start (StartParameters) returns (stream Progress) {} In the client when I'm ready to terminate the stream, I tried calling stream.cancel() and then when I print the events of…
Ram
  • 13
  • 3
0
votes
1 answer

How to capture or save all the gRPC Stream

I'm trying to write a python client to listen to a gRPC stream (fire hose). It constantly keeps streaming. There is no "on completion". Proto: rpc Start (StartParameters) returns (stream Progress) {} In the client I tried writing the following,…
Ram
  • 13
  • 3
0
votes
1 answer

Locust invoking more requests than the number of users to simulate parameter

# # run command: locust --host=localhost:8000 # import inspect import time from settings import CONFIG from locust import Locust, TaskSet, task, events from lib.usermodule import user_create_service def stopwatch(func): def wrapper(*args,…
kosta
  • 4,302
  • 10
  • 50
  • 104
0
votes
1 answer

Creating small size docker grpc services with python

I am trying to create small docker images with grpc services in Python. To get an idea of the size, I have built a basic hello-world Python grpc service. In order to keep it "small" I have used a multi-stage build, where I start from a…
Mike
  • 3,775
  • 8
  • 39
  • 79
0
votes
1 answer

OpenVINO serving - Servable not found for request

I am trying to serve a OpenVINO model using procedure mentioned in OpenVINO model server repo but encountering the below issue when trying to get the metadata for the model. Command I am executing is python get_serving_meta.py --grpc_address…
Rachit Tayal
  • 1,190
  • 14
  • 20
0
votes
1 answer

grpc low level telemetry logging

I'm trying to measure the latency of my service at a lower level. Poking around I saw that it is possible to add a addStreamTracerFactory to the grpc builder. I've done this simple implementation like this and printed the logs: val server =…
Avba
  • 14,822
  • 20
  • 92
  • 192
0
votes
1 answer

'Protoc' command in a parent directory outputs entire source directory in the python_out directory

I have a directory named protos which holds a single .proto file, but will eventually hold many. This directory has a sibling named app , where I would like to dump the built grpc python files. I'm trying to write a simple bash script that will…
Alex
  • 183
  • 1
  • 10
1 2 3
26
27