Modern Python API client for [Monzo](https://monzo.com/) public [API](https://docs.monzo.com/).
Project description
pymonzo
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
Release history Release notifications | RSS feed
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)
Built Distribution
pymonzo-1.0.0-py3-none-any.whl
(31.7 kB
view details)
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e1b3863c8fdbdd4b0ca78ec9afa355591c983ddee5487d04c7d12abb96d8a71 |
|
MD5 | 39f60b73c589df011feb9d75dca34633 |
|
BLAKE2b-256 | dfe062e1a9f813fc5297b1cfe0e98f09324b7d96a7c5c89f51c0b80b3e02b3ce |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e54a505b72406d379630506ecf28a1f2d637caeecf45b3c51e026b077a99438 |
|
MD5 | e56626faf4e2d9155ef3a5fc4241a1cc |
|
BLAKE2b-256 | b2a0ddf4426d6965ffa68ed0fc6734cce31bbd5da880ac25b04f8c7f3a264111 |