akahu-py documentation

akahu-py is an unofficial Python client for the Akahu API.

Github: jason-s13r/akahu-py.

Command

akahu-py

Akahu CLI.

akahu-py [OPTIONS] COMMAND [ARGS]...

Commands

account

Account commands.

me

Get current user.

refresh

Get current user.

tokens
transactions

Transaction commands.

See Command Line for a full usage information.

> $ uv run akahu-py me
╒══════════════════╤════════════════╤═════════════════════╤════════╤════════════╤═══════════╤════════════════════════════════╕
│ Email             Preferred Name  Access Granted At    Mobile  First Name  Last Name  ID                             │
╞══════════════════╪════════════════╪═════════════════════╪════════╪════════════╪═══════════╪════════════════════════════════╡
│ user@example.com  User            2025-05-21 03:29:31                                 user_xxxxxxxxxxxxxxxxxxxxxxxxx │
╘══════════════════╧════════════════╧═════════════════════╧════════╧════════════╧═══════════╧════════════════════════════════╛

> $ uv run akahu-py account list --currency AUD
╒══════════╤═══════════════════╤═════════╤════════════════╤══════════╤═════════╤═══════════╕
│ Provider  Name               Type     Account Number  Currency  Current  Available │
╞══════════╪═══════════════════╪═════════╪════════════════╪══════════╪═════════╪═══════════╡
│ Wise      User AUD Balance   FOREIGN                  AUD       1000.00  1000.00   │
├──────────┼───────────────────┼─────────┼────────────────┼──────────┼─────────┼───────────┤
│                                       Total           AUD       1000.00  1000.00   │
╘══════════╧═══════════════════╧═════════╧════════════════╧══════════╧═════════╧═══════════╛

Python Client

Example usage:

from datetime import datetime, timedelta
from akahu.client import Client
# Initialize the client with your API key
config = Client.Config('your_app_token', 'your_user_token')
client = Client(config)

me = client.me.get()
print(f"Akahu user email: {me.email}")

end = datetime.now()
start = end - timedelta(days=7)

accounts = client.accounts.list()
for account in accounts:
   print(f"{account.name} ({account.formatted_account}): {account.balance.current} {account.balance.currency}")
   page = client.accounts.transactions(account.id).list(start, end)
   for transaction in page.items:
      print(f"   {transaction.amount} ({transaction.description})")
   else:
      if not page.size:
         print("    No transactions found.")