Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bitcaviar

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitcaviar

A simple Python wrapper for Bitcoin JSON-RPC API

  • 0.0.2
  • PyPI
  • Socket score

Maintainers
1

pybitcoin

A simple Python wrapper for Bitcoin JSON-RPC API.

Installation

pip install bitcaviar

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()

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc