Skip to main content

Stub API for Monzo

Project description

Stub API for Monzo.

Note about Monzo API deprecation

The Monzo API is essentially deprecated at this point. It has not been in active development since early 2016 (as far as I can tell), and will likely not be worked on until mid-2018, as the UK are introducing new regulations for open banking infrastructure which will influence the future of Monzo’s API. I’ll happily accept PRs to this repo, but given the state of the API’s development I have ceased working with the Monzo API myself so will not be maintaining this until API development picks up again.

Installation

The package is available on PyPI:

$ pip install monzo-api-stub

Usage

To run a server:

$ monzo-api

You can parse optional arguments to change the behaviour:

$ monzo-api --help
Usage: monzo-api [OPTIONS]

  Stub Monzo API

Options:
  --host TEXT             Address to bind to.
  --port INTEGER          Port for the HTTP server.
  --num-accounts INTEGER  Number of accounts to give the user
  --currency TEXT         Currency to use, pass "random" to use random
                          currencies
  --help                  Show this message and exit.

Note: This is not guaranteed to be API compatible. It is a best-effort attempt to provide a useful tool for developers building for the Monzo API.

Features

  • OAuth flow with immediate redirect, no need to enter an email address.

  • Test with pre-defined or random currencies.

  • Test as a user with multiple accounts.

Completeness

Since this is a stub API, most “business logic” on the server side isn’t implemented, and likely won’t be.

This should however be considered a work in progress, and any PRs that bring responses/endpoints closer to those of the real API, or any that add entirely missing endpoints, are very welcome.

Things that are missing:

  • OAuth exchange is fake - I’d like to add this in a basic way to make it easier to test the OAuth flow.

  • No auth headers required - Would be good to have a basic (optional?) auth check.

  • Verbose request logging - to help see what your client application is sending.

  • Loading custom data - to allow testing of specific cases that your app wants to handle.

  • Webhooks.

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

monzo-api-stub-0.1.3.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

monzo_api_stub-0.1.3-py2-none-any.whl (10.0 kB view details)

Uploaded Python 2

File details

Details for the file monzo-api-stub-0.1.3.tar.gz.

File metadata

File hashes

Hashes for monzo-api-stub-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ea10f9a033829ef57e54a535631f4f509faacca128027a9fade65e520e4e5f93
MD5 fb277036f0a5873edccb2245281d2aa5
BLAKE2b-256 c4c19c8f2b03e02e0010a17322a181497838264c8f60db18cba2e54fa462f50e

See more details on using hashes here.

File details

Details for the file monzo_api_stub-0.1.3-py2-none-any.whl.

File metadata

File hashes

Hashes for monzo_api_stub-0.1.3-py2-none-any.whl
Algorithm Hash digest
SHA256 990bdbee4844447f23863c4c609ce6eebec4b84cf8fb3d19fa23e7999ac0690e
MD5 a573a87050a7784360036e7dc8fd5d71
BLAKE2b-256 0d6c58bbfb5558d850cb85001d922eda166cb3785bec0f10f5718a331bdd156c

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