Skip to main content

Open Bank Project CLI

A command line utility (CLI) to work with the Open Bank Project sandbox called obp.

With the obp cli you can:

  • Initiate an api connection to the sandbox
    • note you still need to sign-up from the sandbox homepage first to create your username & password
  • Get your DirectLogin token
  • Get your user information
  • Get your user id
  • Get banks
  • Get (your) accounts held at the bank

Also, depending on your account access you may:

  • Create a bank account
  • Add roles to a user
  • Import/Delete branches
  • Import dummy bank data

Install

pip install --user obp-python # Requires at least python 3

Warning: If your operating system defaults to python 2, your pip command might be:

pip3 install --user obp-python
#or 
pip3.6 install --user obp-python

Usage

Usage: obp [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  addaccount              📁 Add a bank account
  addbank                 🏦 Add a bank
  addcustomer             🧙 Add a customer
  addfx                   📉 Add exchange rate (FX)
  addrole                 🚧 Add a role for current user
  adduser                 📝 Add a user
  addview                 🧐 Add a view
  answerconsent           🚧 Answer consent
  createconsent           🚧 Add a consent
  deletebranches          ⚠️ 🏦 Delete all branches
  deletecardbyid          ⚠️ 💳 Delete card by id
  getaccountbyid          📁 Get account by id (includes balance)
  getaccountsheld         📁 Get list of accounts held
  getaccounttransactions  📁 Get transactions for an account
  getauth                 🔑 Get your DirectLogin token
  getbanks                🏦 Get list of banks
  getcardbyid             💳 Get card by id
  getcardbynumber         💳 Get card by card number
  getcards                💳 Get list of cards at bank
  getconsents             🚧 Get consents
  getconsentstatus        🚧 Get consent status- with certificate
  getcustomers            👥 Get list of customers
  getuser                 😃 Get your user info
  getuserid               📋 Get your user id
  getuseridbyusername     📋 Get user id by username
  getusers                😃 Get all users
  importaccounts          🚜 Import accounts from spreadsheet template
  importbranches          🚜 Import branches from spreadsheet template
  importcardattribues     🚜 Import card attributes from spreadsheet template
  importcards             🚜 Import cards from spreadsheet template
  importcustomers         🚜 Import customers from spreadsheet template
  importfx                🚜 📉 Load all foreign exchange rates (FX) to all...
  importtransactions      🚜 Import transactions from spreadsheet template
  importusers             🚜 Import users from spreadsheet template
  init                    💡 Initalize connection to your Open Bank Project...
  linkusertocustomer      🔗 Link user to a customer
  revokeconsent           🚧 Revoke consent
  sandboximport           🚜 Bulk import sandbox data from json input

Examples

You must initalize the obp cli once, by doing:

obp init

Generate Direct Login Token

obp init 
Please enter your API_HOST: api.example.com
Please enter your username:
Please enter your password: : 
Repeat for confirmation: 
... generating direct login token
Please enter your OBP_CONSUMER_KEY: # Go to api.example.com, then "Get API Key" to generate consumer key.
obp getauth # Displays your DirectLogin token

Contributing

Note You can ignore this is your just using the utlity. This is just for developing the utlity.

To work on this utility as a developer:

Building
# Setup python3 environment
virtualenv -p python3 venv
. venv/bin/activate
git clone <this-repo>
# Building wheels etc
python setup.py sdist bdist_wheel
# Installing your edits locally:
pip install -e <path-to-this-repo> # -e means Install  a  project  in editable mode (i.e.  setuptools "developmode")
# Work on utility..submit pull request 

Update history
  • 0.19 Added sandboximport utility obp sandboximport --example
  • 0.0.9 Switch to use OBP_API_HOST instead of OBP_ENDPOINT

Metadata

Release files for obp-python 0.206

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for obp-python 0.206
File Size Uploaded
obp_python-0.206.tar.gz 32.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for obp-python 0.206
File Interpreter ABI Platform
obp_python-0.206-py3-none-any.whl Python 3 none any Details

Total release size: 101.7 kB

Release files / obp_python-0.206.tar.gz

Download URL obp_python-0.206.tar.gz
Size 32.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7f23cd84257c6046831a456aea3c23c3cc1163b5bb822db11f4eaa5c0ba82db2
BLAKE2b-256 checksum
How to use checksums
218f014f11647796c5a00c0d18e73625a481a957c34f09a93188cdc3249e004f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.5.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

Release files / obp_python-0.206-py3-none-any.whl

Download URL obp_python-0.206-py3-none-any.whl
Size 69.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
729f721313b6f815f43da69a9a77cd99995a04d4bcf636a2347881c648a0050e
BLAKE2b-256 checksum
How to use checksums
b62cdb09e18ac0b3b0974aa2ee82f05a63f82b2737ade684e718c481862b95f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.5.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

Release history Release notifications | RSS feed

This release

0.206 This release

2 release files

0.205

2 release files

0.204

2 release files

0.203

2 release files

0.202

2 release files

0.201

2 release files

0.200

2 release files

0.199

2 release files

0.198

2 release files

0.197

2 release files

0.196

2 release files

0.195

2 release files

0.194

2 release files

0.192

1 release file

0.191

1 release file

0.190

1 release file

0.189

1 release file

0.188

1 release file

0.187

1 release file

0.186

1 release file

0.185

1 release file

0.184

1 release file

0.183

1 release file

0.182

1 release file

0.181

1 release file

0.19

1 release file

0.17

2 release files

0.16

2 release files

0.15

2 release files

0.14

2 release files

0.13

2 release files

0.11

2 release files

0.2

1 release file

0.1

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page