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.2.1.tar.gz
(24.3 kB
view details)
Built Distribution
pymonzo-2.2.1-py3-none-any.whl
(35.5 kB
view details)
File details
Details for the file pymonzo-2.2.1.tar.gz
.
File metadata
- Download URL: pymonzo-2.2.1.tar.gz
- Upload date:
- Size: 24.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e65544474bc8c9dd818265bd43a4c22f6bceccbd5dc907cd1c9541535c96a58 |
|
MD5 | 0d1af6283c6088e1395633a0b0d0a1bc |
|
BLAKE2b-256 | d8785905cfbadddd7760a3b8364b8f085a1debaf98476bd2554a105d541500c6 |
Provenance
File details
Details for the file pymonzo-2.2.1-py3-none-any.whl
.
File metadata
- Download URL: pymonzo-2.2.1-py3-none-any.whl
- Upload date:
- Size: 35.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a3361630a576f0676fc3966af1a03921023e94de8ea62f6174bf4c9014dd726 |
|
MD5 | f7dc499e0ccc0cb4d2843a478e92ea79 |
|
BLAKE2b-256 | 56c8207dd695140a47c63f01c5fdc026aa9a868313796b330c0923edcea34574 |