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
- Requires python3
- Requires pip (see https://pip.pypa.io/en/stable/installing/)
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
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
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 ofOBP_ENDPOINT
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
obp_python-0.204.tar.gz
(31.4 kB
view details)
Built Distribution
File details
Details for the file obp_python-0.204.tar.gz
.
File metadata
- Download URL: obp_python-0.204.tar.gz
- Upload date:
- Size: 31.4 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e41137409496474d625cea4815acc0ff1463a6d1365a275ebfc96075b01021b |
|
MD5 | e8f7869fce00b00012708107297f06d4 |
|
BLAKE2b-256 | 139d35725f65f30348a8853b1a3a8e1ef928ab2556ab5a39fe9a06bc99810a66 |
File details
Details for the file obp_python-0.204-py3-none-any.whl
.
File metadata
- Download URL: obp_python-0.204-py3-none-any.whl
- Upload date:
- Size: 66.7 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | f84e10f152c55f1b4973e8348baa9f51f8f936c0a6f00a3584f72a1c4ae574f7 |
|
MD5 | f73a9e855b2b3699d22d11ab20e68ffa |
|
BLAKE2b-256 | 0d3bfe957cc8ffb251ffe4a335b8c57aa0dabb333b1ae93eec287d306e203b34 |