DEV Community

Cover image for Blockchain dev with PYTHON3
francnstein
francnstein

Posted on

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 𝗐𝗂𝗍𝗁 ❀

Top comments (0)