https://github.com/pawelad/pymonzo
Modern Python API client for Monzo public API.
https://github.com/pawelad/pymonzo
api-client monzo python
Last synced: 28 days ago
JSON representation
Modern Python API client for Monzo public API.
- Host: GitHub
- URL: https://github.com/pawelad/pymonzo
- Owner: pawelad
- License: mpl-2.0
- Created: 2016-11-12T10:00:59.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2024-04-13T15:48:34.000Z (about 1 year ago)
- Last Synced: 2024-04-14T04:52:43.017Z (about 1 year ago)
- Topics: api-client, monzo, python
- Language: Python
- Homepage: https://pymonzo.pawelad.dev/
- Size: 348 KB
- Stars: 20
- Watchers: 1
- Forks: 18
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-monzo - pymonzo - An awesome Python library that smartly wraps Monzo public API (Code & Client Libraries)
README
# pymonzo
[][pypi pymonzo]
[][pypi pymonzo]
[][rtfd pymonzo]
[][codecov pymonzo]
[][license]
[][black]
[][py.typed]Modern Python API client for [Monzo] public [API][monzo api docs].
- Works on Python 3.9+
- Fully type annotated
- Explicitly defined and validated API schemas (via [Pydantic])
- Sensible defaults (don't specify account / pot ID if you only have one active)
- Easy authentication (with automatic access token refreshing)
- (Optional) [Rich] support for pretty printingFor example usage, feel free to take a look at [pawelad/monz][github monz].
---
This project is not officially affiliated with [Monzo].
## Installation
From [PyPI] (ideally, inside a [virtualenv]):```console
$ python -m pip install pymonzo
```## Quick start
Here's an example of what `pymonzo` can do:```pycon
>>> 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][pawelad].Source code is available at [GitHub][github pymonzo].
If you'd like to contribute, please take a look at the
[contributing guide].Released under [Mozilla Public License 2.0][license].
[black]: https://github.com/psf/black
[codecov pymonzo]: https://app.codecov.io/github/pawelad/pymonzo
[contributing guide]: ./CONTRIBUTING.md
[github monz]: https://github.com/pawelad/monz
[github pymonzo]: https://github.com/pawelad/pymonzo
[license]: ./LICENSE
[monzo api docs]: https://docs.monzo.com/
[monzo developer tools]: https://developers.monzo.com/
[monzo]: https://monzo.com/
[pawelad]: https://pawelad.me/
[py.typed]: https://mortifex.xyz/py-typed
[pydantic]: https://github.com/pydantic/pydantic
[pypi pymonzo]: https://pypi.org/project/pymonzo/
[pypi]: https://pypi.org/
[rich]: https://github.com/Textualize/rich
[rtfd pymonzo]: https://pymonzo.rtfd.io/
[virtualenv]: https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/