> ## Documentation Index
> Fetch the complete documentation index at: https://docs.walley.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Walley Python SDK

The Walley Python SDK (`walley-sdk`) lets a script, bot, or backend drive a Walley wallet the same way the browser does, but headlessly.

```bash theme={null}
pip install walley-sdk
```

```python theme={null}
from walley import Walley

w = Walley(
    key_file="~/.config/walley/alice.key",   # PEM or 24-word mnemonic file
    party_hint="walley-alice",
)

for balance in w.balances:
    print(balance.instrument_id, balance.total_balance)

commands = my_dapp.build_transaction(w.party_id)   # your own ledger Commands
result = w.transactions.execute(commands)          # fee-quoted, signed, submitted
```

## Self-custody, headless

Walley parties are **external Canton parties**: the private key never leaves your process. The SDK signs everything locally, meaning that the Walley API only ever sees public keys and signatures.

Create your wallet in the [Walley app](https://walley.cc) and back up its 24-word recovery phrase; the SDK signs in with that phrase (or the exported key) to drive the same party programmatically.

## What's in the box

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/python-sdk/quickstart">
    Install, sign in with a key file, and submit your first transaction.
  </Card>

  <Card title="Keys & Authentication" icon="key" href="/python-sdk/authentication">
    Key files, mnemonics, PEM — and how the SDK authenticates reads.
  </Card>

  <Card title="Transactions & Fees" icon="arrow-right-arrow-left" href="/python-sdk/transactions">
    Sign and submit your dApp's own commands; the deferred fee model.
  </Card>

  <Card title="Wallet Operations" icon="wallet" href="/python-sdk/wallet">
    Balances, holdings, transfers, preapprovals, and history.
  </Card>
</CardGroup>

<Note>
  The SDK is synchronous and dependency-light (`httpx`, `pydantic`, `cryptography`, `mnemonic`). Python 3.10+.
</Note>
