# HG changeset patch # User Dennis Concepcion Martin # Date 1633780630 -7200 # Node ID f3b9cb1eadefe355abbe7aafc8cd4e274c1912ca # Parent 4bf969ad1fb4963ba62b10afee8cf2a35f190264 add installation instructions diff -r 4bf969ad1fb4 -r f3b9cb1eadef .idea/bitcaviar.iml --- a/.idea/bitcaviar.iml Sat Oct 09 13:44:47 2021 +0200 +++ b/.idea/bitcaviar.iml Sat Oct 09 13:57:10 2021 +0200 @@ -5,7 +5,7 @@ - + \ No newline at end of file diff -r 4bf969ad1fb4 -r f3b9cb1eadef README.md --- a/README.md Sat Oct 09 13:44:47 2021 +0200 +++ b/README.md Sat Oct 09 13:57:10 2021 +0200 @@ -2,6 +2,9 @@ A simple Python wrapper for Bitcoin JSON-RPC API. ## Installation +```bash +pip install bitcaviar +``` ## Usage You should pass your `bitcoin-cli` directory and where you have the blockchain stored to each method. @@ -9,7 +12,10 @@ ```python from bitcaviar import config -bitcoin = config.Bitcoin(cli_dir='your/dir/to/bitcoin-cli', data_dir='/where/is/the/blockchain') +bitcoin = config.Bitcoin( + cli_dir='your/dir/to/bitcoin-cli', + data_dir='/where/is/the/blockchain' +) ``` ### Example 1 @@ -21,7 +27,11 @@ def main(): - bitcoin = config.Bitcoin(cli_dir='bitcoin-cli', data_dir='/Users/dennis/Bitcoin') + bitcoin = config.Bitcoin( + cli_dir='bitcoin-cli', + data_dir='/Users/dennis/Bitcoin' + ) + block_count = blockchain.get_block_count(bitcoin=bitcoin) print(block_count)