Blockchain dev with PYTHON3

francnstein

francnstein

Posted on April 25, 2020

Blockchain dev with PYTHON3

I started working on Blockchain dev with PYTHON. The app below gives you the balance of your Ether. A work in progress, but excited at where this will go.

"""
from web3 import Web3

infura_url = 'https://infura.io info here'
web3 = Web3(Web3.HTTPProvider(infura_url))

print(web3.isConnected())

print(web3.eth.blockNumber)

balance = web3.eth.getBalance('your key here')

print(web3.fromWei(balance, 'ether'))

"""

https://web3py.readthedocs.io/en/stable/web3.eth.html

FRANCNSTEIN Β© 2020 | Created 𝗐𝗂𝗍𝗁 ❀

πŸ’– πŸ’ͺ πŸ™… 🚩
francnstein
francnstein

Posted on April 25, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related