# Install: $ pip install arweave-python-client
from arweave.arweave_lib import Wallet, Transaction
WALLET_FILE_PATH = "path/to/wallet.json"
FILE_TO_UPLOAD = "path/to/file/to/upload.png"
with open(FILE_TO_UPLOAD, "rb", buffering=0) as file_handler:
tx = Transaction(
Wallet(WALLET_FILE_PATH),
file_handler=file_handler,
file_path=FILE_TO_UPLOAD
)
print(tx.get_price) # Gets transaction price in Winston (1/1000000000000th of 1 Arweave)
tx.sign()
tx.send()