Blockchain dev with PYTHON3
francnstein
Posted on April 25, 2020
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
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
webdev Understanding HTTP, Cookies, Email Protocols, and DNS: A Guide to Key Internet Technologies
November 30, 2024