import os
import sys

api_grpc_path = "/home/test/Projects/git/testing-solution/python/tests/behave/test_holado/tools/django/api_grpc"
proto_path = os.path.join(api_grpc_path, "api_grpc", "api1", "proto")
sys.path.insert(0, proto_path)
#import account_pb2_grpc
import account_pb2
from account_pb2 import DESCRIPTOR
service_descriptor = DESCRIPTOR.services_by_name['UserController']

import grpc_requests
service_name = 'account.UserController'
method_name = 'List'
endpoint = '0.0.0.0:50051'
client = grpc_requests.StubClient.get_by_endpoint(endpoint, service_descriptors=[service_descriptor,])

result = client.request('account.UserController', 'List', {})

service = client.service('account.UserController')
result = service.List({})

res = list(result)


