lnpanda
lnpanda allows you to query Bitcoin lightning network data using Pandas dataframes. Pandas is a powerful data science tool, and the combination can be used to find insights about your node. In addition, pandas dataframes are a just convenient and powerful way to interact with your node, while staying on the command line!
Install
pip install lnpanda
Environment Variables
Add information like node ip address, and directory containing:
- tls.cert
- admin.macaroon
export CRED_PATH=/path/to/macaroon/and/tls/cert
export LND_NODE_IP=192.168.1.xx
Basic Usage
from lnpanda import lnpanda
# initialize lnpanda object
a = lnpanda()
# Get info about channel balances and fee rates in 1 view
a.list_channels_and_fees()
# List routed transactions, shows eff_fee_rate of fwd
a.list_forwards()
Using pandas queries
# List channels with a fee rate > 100
a.list_channels_and_fees().query("fee_rate > 0.000100")
# Get sum of latest 25 routed transactions in sats
a.list_forwards().tail(25).fee_msat.sum()/1000
# Get a set of alias' of the last 10 outgoing forwards
outgoing_chan_ids = list(a.list_forwards().tail(10).chan_id_out)
set(map(lambda x: a.get_peer_alias(x), outgoing_chan_ids))
Metadata
Release files for lnpanda 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lnpanda-0.2.4-py3-none-any.whl | Python 3 | none | any | Details |
Release files / lnpanda-0.2.4-py3-none-any.whl
| Download URL | lnpanda-0.2.4-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bea701ef6ff254e71e1e5e21ca5ae4df2f9ad56d06c1485eb534cb38d53d0329
|
|
BLAKE2b-256 checksum How to use checksums |
8ba2e0bbb4af2bbb7eee6e77dc0ce7fd449ea8f2b966bf462f6708a280dffb4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10
|