Skip to main content

Lightweight Bitcoin JSON-RPC Python asynchronous client

Project description

bitcoin-python-async-rpc

Lightweight Bitcoin async JSON-RPC Python client.

Serves as a tiny layer between an application and a Bitcoin daemon, its primary usage is querying the current state of Bitcoin blockchain, network stats, transactions...

If you want complete Bitcoin experience in Python, consult python-bitcoinlib .

Installation

$ pip install bitcoinrpc

Supported methods

Here is a list of supported methods, divided by their categories. Should you need method not implemented, wrap the call in BitcoinRPC.acall(<your_method>, ...) coroutine.

Blockchain

Method Supported?
getbestblockhash
getblock
getblockchaininfo
getblockhash
getblockheader
getblockstats
getdifficulty
getmempoolinfo
getnetworkhashps

Mining

Method Supported?
getmininginfo

Network

Method Supported?
getconnectioncount
getnetworkinfo

Raw transactions

Method Supported?
getrawtransaction

Usage

Minimal illustration (assuming Python 3.8, where you can run async code in console)

$ python -m asyncio
>>> import asyncio
>>>
>>> from bitcoinrpc import BitcoinRPC
>>> rpc = BitcoinRPC("127.0.0.1", 8332, "rpc_user", "rpc_passwd")
>>> await rpc.getconnectioncount()
10

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

bitcoinrpc-0.2.4.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bitcoinrpc-0.2.4-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file bitcoinrpc-0.2.4.tar.gz.

File metadata

  • Download URL: bitcoinrpc-0.2.4.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.1

File hashes

Hashes for bitcoinrpc-0.2.4.tar.gz
Algorithm Hash digest
SHA256 906789032a0e99e0bf59947966e581cac59011bb2806a27447edcd527b3f6dc7
MD5 4a63b766652e71e9d73d14ba6c3f0052
BLAKE2b-256 eb062446473d10bfc9ced734ad11769ee67dccdcb327a2f48f44377659a85059

See more details on using hashes here.

File details

Details for the file bitcoinrpc-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: bitcoinrpc-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.1

File hashes

Hashes for bitcoinrpc-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c47e5f774c3ee897460c67d9256e68115398f63a77e3c56b3e2c95b98a7b35a8
MD5 1aa1a187d697b653ae2e2969de19fb25
BLAKE2b-256 958f08dd7e13f79a8ec2a1dd6c4f363d84b7f47d8fe0c1d5b4f33f44c3d5094e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page