JsonRPC handler for python