vention-grpc-py-sdk
Generated Python gRPC clients for vention-protos.
Install
pip install vention-grpc-py-sdk
Usage
import grpc
from vention.robots.v1 import robot_service_pb2_grpc
from vention import PROTOS_SHA
channel = grpc.insecure_channel("localhost:50550")
stub = robot_service_pb2_grpc.RobotServiceStub(channel)
print(f"built from vention-protos@{PROTOS_SHA}")
PROTOS_SHA is the vention-protos commit this wheel was generated from.
Vision service backends
The vention/vision/v1 services also ship generated backend interfaces, so calling
code can be written against an ABC and swapped between gRPC and a local
implementation.
from vention.vision.v1 import image_pb2
from vention.vision.v1.vision_service_abc import (
ImageServiceBackend,
create_image_service_backend,
register_image_service_backend,
)
backend = create_image_service_backend("grpc", target="localhost:41051")
response = backend.capture_image(image_pb2.CaptureImageRequest())
class InProcessImageService(ImageServiceBackend):
def capture_image(self, request): ...
def upload_image(self, requests): ...
def download_image(self, request): ...
register_image_service_backend("in_process", InProcessImageService)
backend = create_image_service_backend("in_process")
There is one <Service>Backend ABC, one <Service>GrpcBackend, and one
register_/create_ pair per service in vision_service.proto.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vention_grpc_py_sdk-0.0.68.tar.gz.
File metadata
- Download URL: vention_grpc_py_sdk-0.0.68.tar.gz
- Upload date:
- Size: 50.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
618976364a6141601259cc5263f6f674e8accfa6d46524aa2aa719c1c0831d9f
|
|
| MD5 |
3b4fee53fd65092ac51e6b8ccda949f2
|
|
| BLAKE2b-256 |
6b1b9d94960f44f34e1c2b3aff9ba7ed527a20c60ab021acf853423adb7d7000
|
File details
Details for the file vention_grpc_py_sdk-0.0.68-py3-none-any.whl.
File metadata
- Download URL: vention_grpc_py_sdk-0.0.68-py3-none-any.whl
- Upload date:
- Size: 121.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2499d9c6c6f297114998e071a7f266fad6280c00eb57ea1c8219769652104e0a
|
|
| MD5 |
e70699dc6701cbe8e4aca94c57173182
|
|
| BLAKE2b-256 |
b10c4d09a6c1ffb90c04aeebfb34afa97e4d1f4cb8c6de5f664e04d7207758bb
|