westwallet-python-api is a WestWallet Public API wrapper for Python programming language. Use it for building payment solutions.
Install from pypi:
pip install -U westwallet-api
Install from latest source code (may be unstable):
pip install git+git://github.com/WestWallet/westwallet-python-api
# Send 0.1 ETH to 0x57689002367b407f031f1BB5Ef2923F103015A32fromwestwallet_apiimportWestWalletAPIfromwestwallet_api.exceptionsimportInsufficientFundsException, BadAddressExceptionclient=WestWalletAPI("your_api_key", "your_api_secret")
try:
sent_transaction=client.create_withdrawal(
"ETH", "0.1", "0x57689002367b407f031f1BB5Ef2923F103015A32"
)
exceptInsufficientFundsException:
# handle this casepassexceptBadAddressException:
# handle also this casepasselse:
print(sent_transaction.__dict__)fromwestwallet_apiimportWestWalletAPIclient=WestWalletAPI("your_api_key", "your_api_secret")
address=client.generate_address("XRP")
print(address.address, address.dest_tag)