I wonder is there a convinient way to change method name? I've found some comments in Methods class, tryed to use decorators to change function __name__ values. Is there a possibility to include kwargs to method decorator, lke in jsonrpc add_method?
from jsonrpcserver import method, serve
@method(name='generic.ping')
def ping():
return "pong"
if __name__ == "__main__":
serve()
so calls like:
{
"id":"d3fa8fd5-259e-9e02-6d07-25dbf49e410f",
"jsonrpc":"2.0",
"method":"generic.ping"
}
will be possible?
I wonder is there a convinient way to change method name? I've found some comments in Methods class, tryed to use decorators to change function
__name__values. Is there a possibility to include kwargs to method decorator, lke in jsonrpc add_method?so calls like:
{ "id":"d3fa8fd5-259e-9e02-6d07-25dbf49e410f", "jsonrpc":"2.0", "method":"generic.ping" }will be possible?