Skip to content

pawelad/pymonzo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

431af9e · Mar 7, 2024
Feb 4, 2024
Apr 24, 2023
Mar 7, 2024
Mar 7, 2024
Apr 24, 2023
Apr 24, 2023
Jan 14, 2024
Mar 7, 2024
Jan 13, 2024
Aug 17, 2022
Mar 7, 2024
Mar 7, 2024
Apr 24, 2023
Jan 29, 2024
Mar 7, 2024

Repository files navigation

pymonzo

Package Version Supported Python Versions Read the Docs Codecov License Code style: black py.typed

Modern Python API client for Monzo public API.

  • Works on Python 3.8+
  • Fully type annotated
  • Explicitly defined and validated API schemas (via pydantic)
  • Easy authentication with automatic access token refreshing
  • Sensible defaults - don't specify account / pot ID if you only have one active
  • Optional rich support for pretty printing

This project is not officially affiliated with Monzo.

Installation

From PyPI (ideally, inside a virtualenv):

$ python -m pip install pymonzo

Quick start

Here's an example of what pymonzo can do:

>>> from pymonzo import MonzoAPI
>>> monzo_api = MonzoAPI()
>>> accounts = monzo_api.accounts.list()
>>> len(accounts)
2
>>> # Only one active account, so we don't need to pass it explicitly
>>> monzo_api.balance.get()
MonzoBalance(balance=75000, total_balance=95012, currency='GBP', spend_today=0, balance_including_flexible_savings=95012, local_currency='', local_exchange_rate=0, local_spend=[])
>>> from pymonzo.utils import n_days_ago
>>> transactions = monzo_api.transactions.list(since=n_days_ago(5))
>>> len(transactions)
8

Authors

Developed and maintained by Paweł Adamczak.

Source code is available at GitHub.

If you'd like to contribute, please take a look at the contributing guide.

Released under Mozilla Public License 2.0.