OTA (Over-the-Air) Client Service API definitions for vehicle ECU software updates.
This is the API definition for ota-client.
pip install git+https://github.com/tier4/otaclient-api.git- Install build dependencies:
pip install -U pip build- Build the wheel package:
python -m build --wheel- The built package will be placed in the
./distdirectory.
Generate API documentation from proto files using Docker:
docker run --rm \
-v $(pwd)/docs:/out \
-v $(pwd)/proto:/protos \
pseudomuto/protoc-gen-doc \
--doc_opt=markdown,SERVICES.mdThe generated documentation will be placed in ./docs/SERVICES.md.
import grpc
from otaclient_pb2.v2 import otaclient_v2_pb2, otaclient_v2_pb2_grpc
# Create a gRPC channel
channel = grpc.insecure_channel('localhost:50051')
# Create a stub (client)
stub = otaclient_v2_pb2_grpc.OtaClientServiceStub(channel)
# Make a request
response = stub.Status(otaclient_v2_pb2.StatusRequest())- Python >= 3.8
Apache License 2.0 - see LICENSE for details.