BolajiOlajide / ng_banks

Python Implementation for Lightweight Zero dependency npm package to get list of banks in Nigeria (Recognized by CBN)

Home Page:https://pypi.org/project/ng-banks/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NG_BANKS

Python implementation of ng-banks.

INSTALLATION

The package is available on Pypi for installation. To install simply run the command in your terminal

pip install ng_banks

The package contains two methods:

  • getBanks(): this method is used to retrieve all the banks in the system.

  • getBank(param): this method is used to retrieve a particular bank based on the parameter supplied. The parameter can either the be the slug of the bank or the bank code. For slugs or code that don't exist, this method returns None.

USAGE

>>> from ng_banks import getBank, getBanks

>>> getBanks() # should print an array of banks

>>> getBank('GTB') # returns {'name': 'GUARANTY TRUST BANK PLC', 'code': '058', 'slug': 'GTB', 'ussd_code': '*737#' }

>>> getBank('044') # returns {'name': 'ACCESS BANK PLC', 'code': '044', 'slug': 'ACC', 'ussd_code': '*901#' }

>>> addBank(name, code, slug, ussd_code) # Extend the list of banks on the fly. Returns a new bank dict or throws Exception if bank already exists.

CONTRIBUTORS

This package is authored by Bolaji Olajide.

About

Python Implementation for Lightweight Zero dependency npm package to get list of banks in Nigeria (Recognized by CBN)

https://pypi.org/project/ng-banks/

License:MIT License


Languages

Language:Python 100.0%