Skip to main content

What is Monzoh?

Monzoh is a Python library that makes it easy to work with the Monzo Developer API. It enables developers to build applications that interact with their Monzo bank account.

Features

  • Full Monzo API Coverage: Access all Monzo API endpoints including accounts, transactions, pots, attachments, receipts, webhooks, and feed items
  • Type-Safe: Built with Pydantic models for complete type safety and runtime validation
  • Simple OAuth2: Easy-to-use OAuth2 authentication flow with automatic token management
  • Comprehensive Error Handling: Custom exception types for different API error conditions
  • Mock Mode: Built-in mock data for testing without API calls
  • Well-Tested: Comprehensive test suite with high code coverage

Quick Example

from monzoh import MonzoClient

# Initialize client with OAuth2 authentication
client = MonzoClient()

# List all accounts
accounts = client.accounts.list()
print(f"Found {len(accounts)} accounts")

# Get account balance
balance = client.accounts.get_balance(account_id=accounts[0].id)
print(f"Balance: {balance.balance / 100:.2f} {balance.currency}")

# List recent transactions
transactions = client.transactions.list(
    account_id=accounts[0].id,
    limit=10
)
for transaction in transactions:
    print(f"{transaction.description}: {transaction.amount / 100:.2f}")

API Coverage

Monzoh provides comprehensive coverage of the Monzo API:
FeatureStatusDescription
OAuth2 AuthenticationComplete OAuth2 flow with token management
AccountsList accounts and get balance information
TransactionsList, retrieve, and annotate transactions
PotsManage savings pots and transfers
AttachmentsUpload and manage transaction attachments
ReceiptsAdd detailed receipt information to transactions
WebhooksRegister and manage webhook endpoints
Feed ItemsCreate custom feed items

Installation

Install Monzoh using your preferred package manager:
pip install monzoh

Requirements

  • Python 3.9 or higher
  • A Monzo developer account and OAuth2 credentials
  • Internet connection for API calls (unless using mock mode)

Get Started

Ready to start building with Monzoh? Check out our quickstart guide to get up and running in minutes.
I