Blockchain and Python Packages

Jishnu P
Blockchain Experts
Published in
2 min readNov 28, 2017

Python 2 and python 3 are supported in ‘blockchain.info’ , there are 7 modules in the package.

Blockchain and Python Packages

Blockchain can be simply defined as a ledger distributed over internet to store the transaction details.It can be also used to track the assets in a network.

The applications of Blockchain are increasing day by day.Some of the applications are Smart Contracts,Crypto Currency,Health care applications,Governance solutions,IOT ,etc.By using python we can develop all these applications.Python is a high level language and interact with the public ledger API of Blockchain ‘blockchain.info’ package .The python packages for Blockchain are described below.

Python 2 and python 3 are supported in ‘blockchain.info’ , there are 7 modules in the package,namely

  • blockexplorer
  • create wallet
  • exchange rates
  • pushtx
  • v2.receive
  • Statistics
  • Wallet
  1. blockexplorer

To perform Blockchain manipulation operations it has 10 inbuilt functions.

  • get_block()
  • get_tx()
  • get_address()
  • get_block_height()
  • get_xpub()
  • get_multi_address()
  • get_unspent_outputs()
  • get_latest_block()
  • get_unconfirmed_text()
  • get_blocks()

2.createwallet module

Basic operations connected to a digital wallet is managed with this module,for financial transactions we need digital wallet.To use ‘Createwallet’ and ‘Wallet’ modules we have to run an instance of service-my-wallet-v3.For creation of wallet we need an ‘api_code’ also.The function available in createwallet module is ‘create_wallet’.

3.exchangerates modules

The digital currency exchanges are managed by this module.The two built in functions are

  • get_ticker
  • to_btc

4.pushtx module

The transaction broadcasting is managed by this module.It contains one function and will return an exception if the transaction is a misrepresented one.

5.v2.recieve module

This is the fastest way to receive automated bitcoin payments.The functions used are

  • recieve
  • callback_log

6.statistics module

This is used to acquire the complete blockchain statistics.We use the function ‘get’ in this module.

7.wallet module

For creating a digital wallet we use createwallet module.It have many in built functions

  • send
  • send_many
  • get_balance
  • list_address
  • get_address
  • new_address
  • archive_address
  • unarchive_address

For complete and detailed information(including examples using source code) visit Blockchain Expert

--

--