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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file Flask-Wallet-RPC-0.1.5.tar.gz.
File metadata
- Download URL: Flask-Wallet-RPC-0.1.5.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
163d2bb6e5115fd436994263361ae77d2a7b0d420c6c3128f82102dcde386018
|
|
| MD5 |
f2e8930b040bfc571f687b2cbe3eb867
|
|
| BLAKE2b-256 |
21faf64d738290ab9373f37d680e71841767d8103b5a13da5772c99e37188734
|
File details
Details for the file Flask_Wallet_RPC-0.1.5-py3-none-any.whl.
File metadata
- Download URL: Flask_Wallet_RPC-0.1.5-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa0d4bba6cf1f0a6862d782f89e7ec6cbb67308f42e8e9d13d95c3d07e2898f9
|
|
| MD5 |
3f18b20eb769793437dcb806f750e2f5
|
|
| BLAKE2b-256 |
06d9a6d3c1bbb75306af8548a0bf3a733ce46d8ecb141089b6f21cbc5430959e
|