Created
April 5, 2018 10:38
-
-
Save xeroc/31f0ef8a03953f91ad44cde8ab0a5022 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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