Skip to main content

Modern Python API client for [Monzo](https://monzo.com/) public [API](https://docs.monzo.com/).

Project description

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

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymonzo-1.0.0.tar.gz (21.6 kB view details)

Uploaded Source

Built Distribution

pymonzo-1.0.0-py3-none-any.whl (31.7 kB view details)

Uploaded Python 3

File details

Details for the file pymonzo-1.0.0.tar.gz.

File metadata

  • Download URL: pymonzo-1.0.0.tar.gz
  • Upload date:
  • Size: 21.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for pymonzo-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4e1b3863c8fdbdd4b0ca78ec9afa355591c983ddee5487d04c7d12abb96d8a71
MD5 39f60b73c589df011feb9d75dca34633
BLAKE2b-256 dfe062e1a9f813fc5297b1cfe0e98f09324b7d96a7c5c89f51c0b80b3e02b3ce

See more details on using hashes here.

File details

Details for the file pymonzo-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pymonzo-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 31.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for pymonzo-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e54a505b72406d379630506ecf28a1f2d637caeecf45b3c51e026b077a99438
MD5 e56626faf4e2d9155ef3a5fc4241a1cc
BLAKE2b-256 b2a0ddf4426d6965ffa68ed0fc6734cce31bbd5da880ac25b04f8c7f3a264111

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page