Crypto Wallet RPC client for Flask, based on the Python module slick-bitcoinrpc
Project description
Flask-Wallet-RPC is a Crypto Wallet RPC client extension for Flask, based on the Python module slick-bitcoinrpc. Connects to the RPC server of your wallet.
Installation
Install the extension with one of the following commands:
$ easy_install Flask-Walet-RPC
or alternatively if you have pip installed:
$ pip install Flask-Wallet-RPC
Example 1
from flask import Flask
from flask_wallet_rpc import Walletrpc, wallet
app = Flask(__name__)
app.config.from_pyfile('mysettings.cfg')
w = Walletrpc(app)
@app.route('/')
def main():
return wallet.getwalletinfo()
Example 2
from flask import Flask
from flask_wallet_rpc import Walletrpc, wallet
rpc = Walletrpc()
def create_app('the-config.cfg'):
rpc.init_app(app)
Then in your blueprint.
from yourapp import wallet
bp = Blueprint('name_of_bp', __name__)
@bp.route('/')
def index():
return wallet.getwalletinfo()
Configuration
In your flask app config add:
WALLET_RPC_URL = "http://%s:%s@127.0.0.1:8332"%("Rpcuser", "Rpcpassword")
Replace Rpcuser and Rpcpassword with your wallets RPC info.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Flask-Wallet-RPC-0.1.3.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for Flask_Wallet_RPC-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c70fe6148e1e1e412c789e87d3ecb953d3c4d33e0e8ac4b1ea876902701ed4c1 |
|
MD5 | 24fa19ecc9e000d419cba10f621c2c3e |
|
BLAKE2b-256 | b3377f59de327706825b009848d5f7b8337cd5f7c41e4238171cdd41e2953870 |