A simple Python wrapper for Bitcoin JSON-RPC API
Project description
pybitcoin
A simple Python wrapper for Bitcoin JSON-RPC API.
Installation
Usage
You should pass your bitcoin-cli
directory and where you have the blockchain stored to each method.
from bitcaviar import config
bitcoin = config.Bitcoin(cli_dir='your/dir/to/bitcoin-cli', data_dir='/where/is/the/blockchain')
Example 1
Get the number of blocks in the blockchain
from bitcaviar import config
from bitcaviar import blockchain
def main():
bitcoin = config.Bitcoin(cli_dir='bitcoin-cli', data_dir='/Users/dennis/Bitcoin')
block_count = blockchain.get_block_count(bitcoin=bitcoin)
print(block_count)
if __name__ == '__main__':
main()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for bitcaviar-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0aca32c8791cc8532b1eb17aea612a527c51423bf186784ee14418eaacb5f5c8 |
|
MD5 | 6b65bc345c1403902f32f39a227be987 |
|
BLAKE2b-256 | 5f98f8f531a5c1ca244250727f46ec390db4ad434dc114ae95c70612613b88cd |