Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the need for instantiating Methods #25

Closed
bcb opened this issue Sep 24, 2016 · 0 comments
Closed

Remove the need for instantiating Methods #25

bcb opened this issue Sep 24, 2016 · 0 comments
Labels

Comments

@bcb
Copy link
Member

bcb commented Sep 24, 2016

Rather than

methods = Methods()
@methods.add

It could just have an internal method registry, like:

from jsonrpcserver import methods

@methods.add
def ping():
    return 'pong'

if __name__ == '__main__':
    methods.serve_forever()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant