Skip to content

Instantly share code, notes, and snippets.

@xeroc
Created April 5, 2018 10:38
Show Gist options
  • Save xeroc/31f0ef8a03953f91ad44cde8ab0a5022 to your computer and use it in GitHub Desktop.
Save xeroc/31f0ef8a03953f91ad44cde8ab0a5022 to your computer and use it in GitHub Desktop.
from flask import Flask, jsonify
from bitshares import BitShares
app = Flask(__name__)
bitshares = BitShares()
@app.route("/<call>/<parameter>")
def callit(call, parameter):
f = getattr(bitshares.rpc, call)
return jsonify(dict(f(parameter)))
if __name__ == "__main__":
app.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment