Modern Python API client for Monzo public API.
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
- 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.
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-2.0.0.tar.gz
(23.4 kB
view details)
Built Distribution
pymonzo-2.0.0-py3-none-any.whl
(33.9 kB
view details)
File details
Details for the file pymonzo-2.0.0.tar.gz
.
File metadata
- Download URL: pymonzo-2.0.0.tar.gz
- Upload date:
- Size: 23.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90bff57d3c0fd3c0407925c1d67d54e0df03cca7b5112b35af6652dde38476c2 |
|
MD5 | 159a2c82650eb7f2339ce0816eb57ece |
|
BLAKE2b-256 | 8c743cea58df2b67ef42d99795cca1e5c53cd81e57cc9b6608c7e8b76d487976 |
File details
Details for the file pymonzo-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: pymonzo-2.0.0-py3-none-any.whl
- Upload date:
- Size: 33.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b81590510f4000aa0da2ceee691e51cd7e9ce9b9659da5d9833d72de6cacef2 |
|
MD5 | fb6eb7cd4c093bd12faf78bc3e38cc13 |
|
BLAKE2b-256 | b440a09e6a934ccbddf9d254652339672ae7806c0ea848105669effd0bc2394f |