From: Hosang Kim Date: Wed, 2 Nov 2022 06:40:30 +0000 (+0900) Subject: aurum: make examples for guide X-Git-Tag: accepted/tizen/unified/20221103.165802^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d22cdccc54c652835e3351165603e1d85b7c9954;p=platform%2Fcore%2Fuifw%2Faurum.git aurum: make examples for guide Change-Id: I045c6b6c720c57deb0922bf232fbf46ae5ff1a76 --- diff --git a/examples/python/helloworld.py b/examples/python/helloworld.py new file mode 100644 index 0000000..2dbf7dc --- /dev/null +++ b/examples/python/helloworld.py @@ -0,0 +1,17 @@ +import grpc +from aurum_pb2 import * +from aurum_pb2_grpc import BootstrapStub + +def run(): + with grpc.insecure_channel('localhost:50051') as channel: +# If you have a proxy problem, use the below code instead of the above code. +# with grpc.insecure_channel('localhost:50051', options=(('grpc.enable_http_proxy', 0),)) as channel: + stub = BootstrapStub(channel) + getDeviceTime(stub) + +def getDeviceTime(stub): + response = stub.getDeviceTime(ReqGetDeviceTime(type='SYSTEM')) + print(response) + +if __name__ == '__main__': + run()