Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from grpc.beta import implementations
- import pwservice_pb2
- TIMEOUT_SECONDS = 10
- def run():
- channel = implementations.insecure_channel('localhost', 50051)
- stub = pwservice_pb2.beta_create_PasswordService_stub(channel)
- response = stub.ChangePassword(pwservice_pb2.ChangePasswordRequest(
- user='testuser', old_password='helloworld', new_password='newworld'),
- TIMEOUT_SECONDS)
- print "Password change response: ", response
- if __name__ == '__main__':
- run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement