Skip to main content

Beta Open Bank Project Python Utilities

Project description

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
  addrole             🚧 Add a role for current user
  adduser             📝 Add a user
  deletebranches      ⚠️ 🏦 Delete all branches
  getaccountbyid      📁 Get account by id (includes balance)
  getaccountsheld     📁 Get list of accounts held
  getauth             🔑 Get your DirectLogin token
  getbanks            🏦 Get list of banks
  getuser             😃 Get your user info
  getuserid           📋 Get your user id
  importaccounts      🚜 Import accounts from spreadsheet template
  importbranches      🚜 Import branches from spreadsheet template
  importtransactions  🚜 Import transactions from spreadsheet template
  importusers         🚜 Import users from spreadsheet template
  init                💡 Initalize connection to your Open Bank Project...
  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

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

obp_python-0.196.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

obp_python-0.196-py3-none-any.whl (39.9 kB view details)

Uploaded Python 3

File details

Details for the file obp_python-0.196.tar.gz.

File metadata

  • Download URL: obp_python-0.196.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for obp_python-0.196.tar.gz
Algorithm Hash digest
SHA256 bf7af09f35c388a2213ef2c6f2af5337a9233d425c9c87d8407b4f58914c9df5
MD5 bd2a5db9f5ffc0c4d6545ae57f33d25f
BLAKE2b-256 f459382463d401bb2629fe52fb8388079203d88ffbde1018b29851c9caa93505

See more details on using hashes here.

File details

Details for the file obp_python-0.196-py3-none-any.whl.

File metadata

  • Download URL: obp_python-0.196-py3-none-any.whl
  • Upload date:
  • Size: 39.9 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for obp_python-0.196-py3-none-any.whl
Algorithm Hash digest
SHA256 060de55f747ec6f28380eb5fa4b6e3d9d1b59cfcf93b91cc49b21eb9753fbde1
MD5 40eb4a53abe080ea304d7de4a6cfc9fe
BLAKE2b-256 0f528c07de9b3f71bda0f78db0bbdcd7c1233f88d2407d6573492b7509baf5ea

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