Install Python SDK
pip install py-algorand-sdk
or
pip3 install py-algorand-sdk
- Another Way
python3 -m pip install py-algorand-sdk
Clone Sandbox Code
git clone https://github.com/algorand/sandbox.git
cd sandbox
./sandbox up testnet -v
Start
from algosdk import account, encoding
# generate an account
private_key, address = account.generate_account()
print("Private key:", private_key)
print("Address:", address)
# check if the address is valid
if encoding.is_valid_address(address):
print("The address is valid!")
else:
print("The address is invalid.")
python3 example.py