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 0x57689002367b407f031f1BB5Ef2923F103015A32
from westwallet_api import WestWalletAPI
from westwallet_api.exceptions import InsufficientFundsException, BadAddressException
client = WestWalletAPI("your_api_key", "your_api_secret")
try:
sent_transaction = client.create_withdrawal(
"ETH", "0.1", "0x57689002367b407f031f1BB5Ef2923F103015A32"
)
except InsufficientFundsException:
# handle this case
pass
except BadAddressException:
# handle also this case
pass
else:
print(sent_transaction.__dict__)
from westwallet_api import WestWalletAPI
client = WestWalletAPI("your_api_key", "your_api_secret")
address = client.generate_address("XRP")
print(address.address, address.dest_tag)