slick-bitcoinrpc
Just another Python bitcoin-rpc client. Built as faster alternative to python-bitcoinlib rpc (https://github.com/petertodd/python-bitcoinlib) and python-bitcoinrpc (https://github.com/jgarzik/python-bitcoinrpc) using pycurl and ujson.
Installation
pip install slick-bitcoinrpc
Example
from slickrpc import Proxy
bitcoin = Proxy("http://%s:%s@127.0.0.1:8332"%(rpcuser, rpcpassword))
print(bitcoin.getblock(bitcoin.getbestblockhash()))
Performance Comparison
Method
Here’s bash script able to measure performance of such bitcoin rpc clients
RPC_URL='http://username:password@127.0.0.1:8332'
TASKS=(
"p.getinfo()"
"p.getblock(p.getbestblockhash())"
"map(lambda tx: p.getrawtransaction(tx['txid'], 1), p.listtransactions())"
)
SETUPS=(
"from slickrpc import Proxy; p = Proxy(service_url='$RPC_URL');"
"from bitcoinrpc.authproxy import AuthServiceProxy; p = AuthServiceProxy(service_url='$RPC_URL');"
"from bitcoin.rpc import Proxy; p = Proxy(service_url='$RPC_URL');"
)
for TASK in "${TASKS[@]}"
do
for SETUP in "${SETUPS[@]}"
do
python -m timeit -s "$SETUP" -n 1000 "$TASK"
done
done
Results
Values are best of 3, msec per loop
getinfo() |
p.getblock(p.getbestblockhash()) |
map(lambda tx: p.getrawtransaction( tx[‘txid’], 1), p.listtransactions() |
|
|---|---|---|---|
slick- bitcoinrpc |
1.01 msec |
1.17 msec |
27.7 msec |
python- bitcoinrpc |
2.53 msec |
3.89 msec |
41.9 msec |
python- bitcoinlib |
2.76 msec |
DeserializationExtraDataError |
AttributeError |
Metadata
Release files for slick-bitcoinrpc 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| slick-bitcoinrpc-0.1.4.tar.gz | 4.4 kB | Without provenance | Details for slick-bitcoinrpc-0.1.4.tar.gz |
Release files / slick-bitcoinrpc-0.1.4.tar.gz
| Download URL | slick-bitcoinrpc-0.1.4.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a4ff4b45489dbd4e8f3a1ed3d482bf915b9ebc1b11698fb523b4d9fbe3eeea6
|
|
BLAKE2b-256 checksum How to use checksums |
f0bc81d8c2296c5a4f7dbe5c9f822ac18d0547bf612589bf0e88b1e90c607d89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for slick-bitcoinrpc 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.