The Valtu Python SDK is on PyPI

pip install valtu: a signed API client, webhook verification and enclave attestation checks for Python 3.9 and later, with the same behavior as the TypeScript wallet kit.

The Valtu team

Valtu now has an official Python SDK. Install it with:

pip install valtu

It works on Python 3.9 and later and has one dependency, cryptography.

What's in it

  • A signed API client. Every request is signed with your API key, and reads and idempotent writes are retried safely.
  • Webhook verification. construct_event checks the Ed25519 or HMAC signature and the timestamp before you trust a delivery.
  • Attestation checks. verify_attestation checks a hardware-signed attestation from our enclaves: the certificate chain, the signature, your nonce and the image measurement.
  • Exact amounts. to_base_units and from_base_units convert without floating point, and refuse floats.

A first payout

from valtu import Valtu, deposit_address

valtu = Valtu.from_env()
wallet = valtu.wallets.for_customer("cus_42")
print(deposit_address(wallet, "tron"))

amount = valtu.assets.to_base_units("USDT-TRC20", "25.50")
valtu.transfers.create(wallet_id=payouts_wallet_id, asset="USDT-TRC20", amount=amount, to=address, external_id="payout_981")

Keyword arguments are snake_case; the SDK sends the API's camelCase for you.

Open source

The source is on GitHub at Valtu-Wallet/valtu-python, and releases are published to PyPI straight from it. The TypeScript wallet kit is at Valtu-Wallet/wallet-kit.

Start with the integration guide and a free test workspace.

Keep reading

More from the blog

networks · developers One address, five networks: how EVM deposit addresses work With Valtu, a customer's 0x address is the same on Ethereum, BNB Chain, Polygon, Base and Lisk. Here is why that works, and what it means for deposits sent on any of them. payouts · developers Sending crypto payouts at scale: batches, approvals and limits Paying hundreds of sellers or employees in USDT is mostly an operations problem: never paying twice, getting the right people to approve, and keeping a wallet's queue moving. developers · payouts Never pay twice: retry-safe payouts with externalId Timeouts happen. With one field, a retried payout returns the original instead of sending the money again. How idempotency works in the Valtu API, including batches.

Start with a test workspace today.

Same dashboard, same API, free test coins. Go live when your team is ready.