Skip to main content

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.

Filename, size & hash SHA256 hash help File type Python version Upload date
Flask_Wallet_RPC-0.1.5-py3-none-any.whl (3.0 kB) Copy SHA256 hash SHA256 Wheel py3
Flask-Wallet-RPC-0.1.5.tar.gz (2.6 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page